HI, i'm implementing all the steps of music algorithm, but i believe there are some problems.
This is m script:
N= 50; % number of antenna
K= 6; %number of signal
f0=10; %frequency of signal
fs=100; %sampling frequency
d = 0.5; %distance/lambda ratio
t = 0:1/fs:1;
x1= sin(2*pi*3*f0*t);
x2= 2*sin(2*pi*f0*t);
x3 = cos(2*pi*f0*t);
x = x1+x2+x3 + wgn(1,length(t),0); % signal + white noise
[t_matrix Rx]= corrmtx(x,N-1,'mod'); %Rx is autocorrelation matrix NxN.
[a_vector a_value] = eig(Rx); % find eigenvalues and eigenvector
[a_val_sort index]= sort(diag(a_value),1,'descend');
a_vett_sort=a_vector (:,index);
Qn = a_vett_sort(:,K+1:N); %noise subspace
angles = -90:1:90;
steering = exp(-i*2*pi*d*(0:N-1)'*sind(angles)); %steering matrix
for m= 1:length(angles)
spectrum(m)= 1/(steering(:,m)'*Qn*Qn'*steering(:,m));
end
grid on;
plot(angles,abs(spectrum));
I'm not sure of value of K and its relation with signals x1,x2,x3.
The spectrum is very strange, i don't understand why it's simmetric!
I find always +/- angles.
If is use SVD insted eig?? Rx is always square, and i believe i don't need SVD.
Is there anyone who may help me?
Thanks very much to all!