How to set the received signal in DoA algorithm?
5 views (last 30 days)
Show older comments
Ali Movahed
on 24 May 2017
Edited: Walter Roberson
on 26 May 2017
Hello everyone,
I am trying to localize the direction of Arrival of my imported Signal using MUSIC algorithm. The size of my Signal (X) is 18182*32 which 32 is the number of the microphones. I use this Syntax to define my Signal: Y = collectPlaneWave(H,X,ANG,FREQ,C). Here I have attached the code and the error as well. The erros says somthing about a Zero value in my Signal which I could not get rid of. I would be grateful to get any help or comments from you.
The error is:
Error using coder.internal.errorIf (line 8)
The AIC algorithm is not applicable when one of the eigenvalues of signal covariance matrix is zero.
Error in phased.internal.aictest (line 22)
coder.internal.errorIf(any(eigenvals==0), ...
Error in phased.MUSICEstimator2D/getNumSignals (line 267)
D = phased.internal.aictest(eigenvals,K,fb);
Error in phased.MUSICEstimator2D/privDOASpectrum (line 224)
Nsig = getNumSignals(obj,eigenvals,obj.pNumSnapshots,fb);
Error in phased.MUSICEstimator2D/stepImpl (line 155)
numSignals = privDOASpectrum(obj,X);
Error in DOA32 (line 39)
[ang] = step(hDoA,x);
You need Phased Array System Toolbox to run the code.
Regards
Accepted Answer
Honglei Chen
on 24 May 2017
Looks like you didn't add any noise so the AIC errors out. You can just add some noise, like
Y = Y + sqrt(npow/2)*(randn(size(Y))+1i*randn(size(Y)))
where npow is the noise power.
HTH
6 Comments
Honglei Chen
on 26 May 2017
Sorry I didn't look at your script carefully. In your script, you have this line
x=collectPlaneWave(h,randn(1000,32),ang,100e3,c);
This means there are 32 signals impinging on your array. I'm actually not sure what you mean here, it seems to me that you are thinking this is the signal on the array where each column is the signal on a specific element? I assume this is why you make all the ang to represent 32 same angles? If that's the case, it is not how collectPlaneWave works. If actually considers each column in the input as a separate signal. Thus, if I want to model two independent signals, I would do
x=collectPlaneWave(h,randn(1000,2),[10 20;20 0],100e3,c);
The output on the other hand would be 32 columns to reflect that this is the signal collected on a 32-element array. And the output signal will contain both signal specified in the function call.
Does that clarify things? Please let me know if I understand the problem wrong.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!