How to tackle the given issue?
3 ビュー (過去 30 日間)
古いコメントを表示
I copied the given code from the following Mathworks site: https://www.mathworks.com/help/phased/ref/phased.rootmusicestimator.step.html
clear all;clc
u=[10 4; 45 -2];%u=[Azimuth1 Elevation1; Azimuth2 Elevation2];
% u=[10 4; 45 -2; 65 -8];% 3 Sources
% u=[10 4; 45 -2; 65 -8; 80 0];% 4 Sources
dim=length(u);
M=15;% No. of Antenna Elements
r=1.5;% Radius of UCA
fs = 8000;% Sample rate
fc = 150e6;% Operating frequency
t = (0:1/fs:1).';
x1 = cos(2*pi*t*500);% 1st baseband signal
x2 = cos(2*pi*t*600);% 2nd baseband signal
% x3 = cos(2*pi*t*700);% 3rd baseband signal
% x4 = cos(2*pi*t*800);% 4th baseband signal
%sUCA = phased.UCA('NumElements',M,'Radius',r);% Create UCA Array
sUCA = phased.UCA('NumElements',M,'Radius',r);% Create UCA Array
%x = collectPlaneWave(sUCA,[x1 x2],u',fc);% Plane wave signals
x = collectPlaneWave(sUCA,[x1 x2],u',fc);
% x = collectPlaneWave(sUCA,[x1 x2 x3],u',fc);% Plane wave signals
% x = collectPlaneWave(sUCA,[x1 x2 x3 x4],u',fc);% Plane wave signals
%%%%%%%%%%%%%%%%%%%%%%%%%%%%55
% 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)));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
% Create the phased.RootMUSICEstimator System object™.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sDOA = phased.RootMUSICEstimator('SensorArray',sUCA,'OperatingFrequency',fc,...
'NumSignalsSource','Property',...
'NumSignals',2);%----------------------- (1)-Two signals
% sDOA = phased.RootMUSICEstimator('SensorArray',sUCA,'OperatingFrequency',fc,...
% 'NumSignalsSource','Property',...
% 'NumSignals',3);%---------------------- (2)-Three signals
% sDOA = phased.RootMUSICEstimator('SensorArray',sUCA,'OperatingFrequency',fc,...
% 'NumSignalsSource','Property',...
% 'NumSignals',4);%---------------------- (3)-Four signals
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
% Solve for the azimuth angles for zero degrees elevation.
%%%%%%%%%%%%%%%%%%%%%%%%%%%
elang = 0;
doas = step(sDOA, x + noise, elang);
az = sort(doas)
%%%%%%%%%%%%%%%%%%%%
% Swapping vector b
%%%%%%%%%%%%%%%%%%%%
% [~, ix] = sort(u); % u is my desired vector
% [~, ix1(ix)] = sort(doas);
% Estimated = doas(ix1);
When I run this code for two signlas, it gives me about correct result i.e., the azimuth angles are estimated correctly in variable az.
Likewise, when I run it for 3 signals, it gives me about the correct result only when I keep the 3rd Elevation angle at -8 in vector u. But when I change its value to say for example -50, then the 3rd angle is estimated wrongly. Why is it so?
Further, when I run it for the four signlas and I keep the 4th Elevation angle at 0 in vector u, then it estimates about the correct results but when I change its value to say for example +40 or -50 etc., it estimates the wrong result. Why is it so also?
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Beamforming and Direction of Arrival Estimation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!