Hi guys, i'm trying to simulate the MUSIC algorithm on rectangular array. Here i post an example found in book "Digital signal and image processing" but there is a little problem. The array is on XY plane, then i confirmed the exact conversion from cartesian to polar, as written here: function A = array2D(dzeta,phi,loc_array) dtorad=pi/180; M=size(loc_array,2); K=length(dzeta); A=(zeros(M,K)); for kk=1:K tk=dzeta(kk)*dtorad; pk=phi(kk)*dtorad; beta = [cos(pk)*sin(tk);sin(pk)*sin(tk);cos(tk)]; %xOy [x,y,z] A(:,kk) = exp(2*pi*2j*(loc_array.')*beta); end From the polar model,now i have 0°<dzeta (elevation) <90° right, and -180°<phi(azimuth)<180° because x is weighted by cos(pk), ok. Below there is MUSIC script( only row is wrong) clear all N=100; K=3;M=25; sigma=0.3; dzeta = [10 30 70]; phi=[19 -40 -30]; %dzeta=elevation phi=azimuth loc_array = zeros(3,M); % array = phased.URA('Size',[5 5],'ElementSpacing',[0.05 0.05]); % loc_array = getElementPosition(array); % loc_array(1:2,:) = loc_array(2:3,:); % loc_array(1,:) = 0; for xx=1:5 for yy=1:5 loc_array(1:2,(xx-1)*5+yy)=[xx-1,yy-1]'/2-1; end end Aalpha = array2D(dzeta,phi,loc_array); sn = rand(K,N); bn=sigma*(randn(M,N)+i*randn(M,N)); xn = Aalpha*sn + bn; R=zeros(M); R = (xn*xn')/N; [U, D, V] = svd(R); vnoise = V(:,(K+1):M); PIest = vnoise*vnoise'; plage_theta=(0:0.5:90); 0<elevation<90 ltheta=length(plage_theta); plage_phi=(0:0.5:90); % PROBLEM!!!! DOA is done if 0<phi<90 !!! <-------------- lphi=length(plage_phi); music2d = zeros(ltheta,lphi); for iphi=1:lphi ph =plage_phi(iphi); for itheta=1:ltheta th=plage_theta(itheta); aij = array2D(th,ph,loc_array); music2d(itheta,iphi) = -log10(abs(aij'*PIest*aij)); end end imagesc(plage_phi,plage_theta,music2d); grid on; The problem is the row : plage_phi=(0:0.5:90); if i change the interval between -180:180, or 0:360 the spectrum has some peaks that i don't want. I don't understand...Why?? I want -180 to 180, not 0:90. I'm very grateful if you look this post. Thanks Stefano --------------------------------------- Posted through http://www.DSPRelated.com
Rectangular Antenna Array Model
Started by ●August 12, 2015