www.gusucode.com > phased 案例源码 matlab代码程序 > phased/EstimateRootMUSICDOAforUCAExample.m

    %% Root-MUSIC Estimation of DOA for UCA
% Using the root-MUSIC algorithm, estimate the azimuth angle of arrival of
% two signals received by a 15-element UCA having a 1.5 meter radius. The
% antenna operating frequency is 150 MHz. The actual direction of arrival
% of the first signal is 10 degrees in azimuth and 4 degrees in elevation.
% The direction of arrival of the second signal is 45 degrees in azimuth
% and -2 degrees in elevation. In estimating the directions of arrival,
% assume the signals arrive from 0 degrees elevation.

% Copyright 2015 The MathWorks, Inc.


%%
% Set the frequencies of the signals to 500 and 600 Hz. Set the sample rate
% to 8 kHz and the operating frequency to 150 MHz. Then, create the
% baseband signals, the UCA array and the plane wave signals.
fs = 8000;
fc = 150e6;
t = (0:1/fs:1).';
x1 = cos(2*pi*t*500);
x2 = cos(2*pi*t*600);
sUCA = phased.UCA('NumElements',15,...
    'Radius',1.5);
x = collectPlaneWave(sUCA,[x1 x2],[10 4; 45 -2]',fc);

%%
% Add random complex gaussian white noise to the signals.
rs = RandStream('mt19937ar','Seed',0);
noise = 0.1/sqrt(2)*(randn(rs,size(x))+1i*randn(rs,size(x)));

%%
% Create the phased.RootMUSICEstimator System object
sDOA = phased.RootMUSICEstimator('SensorArray',sUCA,...
    'OperatingFrequency',fc,...
    'NumSignalsSource','Property',...
    'NumSignals',2);

%%
% Solve for the azimuth angles for zero degrees elevation.
elang = 0;
doas = step(sDOA, x + noise, elang);
az = sort(doas)