How to tackle the given issue?
Ältere Kommentare anzeigen
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?
6 Kommentare
Torsten
am 10 Aug. 2023
You should ask the author of the code.
Sadiq Akbar
am 10 Aug. 2023
Dyuman Joshi
am 10 Aug. 2023
You should contact MATLAB Support - https://in.mathworks.com/support/contact_us.html?s_tid=hc_trail
Sadiq Akbar
am 11 Aug. 2023
The code seems to be created by the MATLAB staff.
So use the button "Creare Service Request" under
and ask your question.
Sadiq Akbar
am 12 Aug. 2023
Antworten (0)
Kategorien
Mehr zu Descriptive Statistics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!