Error: SpatialSmoothing should not be larger than -1 (Phased Array Toolbox)
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Honglei Chen
2018-8-15
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 个评论
Honglei Chen
2018-8-16
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
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Antennas, Microphones, and Sonar Transducers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!