Error: SpatialSmoothing should not be larger than -1 (Phased Array Toolbox)
3 views (last 30 days)
Show older comments
I'm getting the error below using RootMUSICEstimator. When I set SpatialSmoothing=0 I get the same error. When I set it to -2, the error is 'Expected SpatialSmoothing to be nonnegative'
Error using coder.internal.assert (line 33) The value of SpatialSmoothing should not be larger than -1.
Error in coder.internal.errorIf (line 7) coder.internal.assert(~cond, msgID, varargin{:});
Error in phased.internal.AbstractULADOA/validatePropertiesImpl (line 48) coder.internal.errorIf(cond,'phased:phased:internal:AbstractULADOA:InvalidSpatialSmoothing', M - 2);
Error in phased.internal.AbstractULASubspaceDOA/validatePropertiesImpl (line 59) validatePropertiesImpl@phased.internal.AbstractULADOA(obj);
Error in phased.RootMUSICEstimator/validatePropertiesImpl (line 211) validatePropertiesImpl@phased.internal.AbstractULASubspaceDOA(obj);
Error in Array16 (line 19) ang = rootmusicangle(signal)
Fs=44100;
H = phased.OmnidirectionalMicrophoneElement;
array=phased.UCA('NumElements',16,'Radius',0.15,'Element',H);
rootmusicangle = phased.RootMUSICEstimator('SensorArray',array,...
'OperatingFrequency',Fs,...
'NumSignalsSource','Property','NumSignals',1);
rootmusicangle.ForwardBackwardAveraging = true;
timepoint=[49.6, 49.7];
Fs=44100;
timepoint=timepoint.*Fs;
signal=audioread('E:\Dropbox (MIT)\YilinGuo\16SoundUSB\16SoundUSB-multichannel.wav',timepoint);
ang = rootmusicangle(signal)
0 Comments
Accepted Answer
Honglei Chen
on 15 Aug 2018
Thanks for bringing this to our attention, the error is misleading and we should fix it. The real reason behind the scene is that to use RootMUSIC algorithm on a UCA, the array needs to satisfy certain condition. However, before I going into the details, I have several observations:
1. Looks like you are using a microphone array yet in rootmusicangle, the propagation speed is set to speed of light, so that seems to be incorrect. 2. You set the operating frequency as Fs, but these two are not the same. In fact, it's not clear to me whether your signal is modulated at a carrier. If your signal is indeed unmodulated, then RootMUSIC algorithm is not the right choice and you may need to find some other technqiues to do direction of arrival estimation.
Could you clarify your application and I'd be happy to help identify if there is something in the toolbox that can help.
HTH
2 Comments
Honglei Chen
on 16 Aug 2018
I haven't got chance to test it out, but I would say for unmodulated signal, you may want to try the cross correlation based algorithms. There is an example in the toolbox, not really for unmodulated signal but you should be able to modify it to give it a try.
HTH
More Answers (0)
See Also
Categories
Find more on Antennas, Microphones, and Sonar Transducers in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!