www.gusucode.com > phased 案例源码 matlab代码程序 > phased/CompareSmoothedNonsmoothedCovarianceMatricesExample.m
%% Comparison of Smoothed and Nonsmoothed Covariance Matrices % Construct a 10-element half-wavelength-spaced uniform line array % receiving two plane waves arriving from 0° and -25° azimuth. % Both elevation angles are 0°. Assume the two signals are partially % correlated. The SNR for each signal is 5 dB. The noise is spatially and % temporally Gaussian white noise. First, create the spatial covariance % matrix from the signal and noise. Then, solve for the number of signals, % using |rootmusicdoa|. Next, perform spatial smoothing on the covariance % matrix, using |spsmooth|, and solve for the signal arrival angles again % using |rootmusicdoa|. %% % Set up the array and signals. Then, generate the spatial covariance % matrix for the array from the signals and noise. N = 10; d = 0.5; elementPos = (0:N-1)*d; angles = [0 -25]; ac = [1 1/5]; scov = ac'*ac; R = sensorcov(elementPos,angles,db2pow(-5),scov); %% % Solve for the arrival angles using the original covariance matrix. Nsig = 2; doa = rootmusicdoa(R,Nsig) %% % The solved-for arrival angles are wrong - they do not % agree with the known angles of arrival used to create the covariance % matrix. %% % Next, solve for the arrival angles using a smoothed covariance matrix. % Perform spatial smoothing to detect L-1 coherent signals. Choose L = 3. Nsig = 2; L = 2; RSM = spsmooth(R,L); doasm = rootmusicdoa(RSM,Nsig) %% % In this case, computed angles do agree with the known angles of arrival.