How to tackle the given issue?

1 visualizzazione (ultimi 30 giorni)
Sadiq Akbar
Sadiq Akbar il 10 Ago 2023
Commentato: Sadiq Akbar il 12 Ago 2023
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 Commenti
Torsten
Torsten il 11 Ago 2023
Modificato: Torsten il 11 Ago 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
Sadiq Akbar il 12 Ago 2023
Thank you very much dear Torsten for your kind guidance. I visited the given link. Then I clicked the button "Creare Service Request" . With this, a new page was opend like this(see attachments 1). Next I don't understand what to do because there is no option like "Ask question"? So can you guide me further what to do and how to do it?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Beamforming and Direction of Arrival Estimation in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by