📄 doaestimate1.m
字号:
lambda = 2; % wavelength.
D = 0.5*lambda; % Element separation.
T = 2000; % Number of snapshots.
K = 7; % Number of digital antenna channels.
theta = d2r([45 60 30 135])'; % Target angles. The number of targets is
% given by the number of target angles.
phi = zeros(size(theta)); % Target angles.
SNR = [10 10 10 10]'; % Signal to noise ratio in dB at each
% antenna element!?!
alpha = d2r([0 0 0 0])'; % Start phases of the target signals.
dalpha = d2r([5.4 18 7.2 12.6])'; % A constant phase shift between snapshots.
% Means targets movements at constant velocity.
dist=Inf*ones(size(theta)); % Distances to the sources.
tgtModel = 'const'; % Target type to simulate.
noiseModel = 'rndnw'; % Noise type to simulate.
%noiseModel = 'rndn'; % Noise type to simulate.
MMu = 4; % Number of targets that MUSIC believes in.
% ----------------------------------------------------------------------- %
% Commands.
% ----------------------------------------------------------------------- %
ant = defant('isotropULA',[K,D]); % Define the antenna.
ww=[theta, phi, SNR, alpha, dalpha, dist, eye(size(theta,1))];
sig = compsim4(ant, lambda, T, tgtModel,ww, noiseModel, eye(K));
spect1 = sdoaspc('music',sig,[],MMu); % Estimate the DOA-spectrum
% with MUSIC.
R = ecorrm(sig); % Estimate the antenna signals
% correlation matrix.
spect2 = sdoaspc('cbf',R); % Estimate the DOA-spectrum
% with conventional beamform.
spect3 = sdoaspc('eigvec',R); % Estimate the DOA-spectrum
spect4 = sdoaspc('pisa',R); % Estimate the DOA-spectrum
figure,splot2(spect1,'',spect2,'',spect3,'',spect4) % Plot all DOA-spectrums.
legend('Music','Conventional beamforming','Eigenvector method','Pisarenko')
%printfm dbtex1a.eps [] 12
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -