Issue with 3D graphing of DOA methods and PlotSpectrum()
1 view (last 30 days)
Show older comments
Hello!
I'm working a project where I'm using multiple DOA esimation methods, and I've been running into issues graphing 2D estimators. In the graph below, I'd like to graph a 3D plot, where the axes are Power (dB), Azimuth Angle, and Elevation angle, like as the one seen on the 2D MUSIC example page. However, when I graph my 2D estimators, I recieve the following:
It seems to me that it's taking a 2D slice of the 3D graph, given that the title says "at Elevation 0.00 Degrees". Does anyone know how I can fix this or change the elevation degree number? I've posted the code I'm using below for reference (rxsig/datacube is the URA data I'm using).
%% 2D Estimator Setup
fc = f0;
lambda = physconst('LightSpeed')/fc;
arraytwo = phased.URA('Size',[numAntY numAntX],'ElementSpacing',[lambda/2 lambda/2]);
estimator_twoBeamscan = phased.BeamscanEstimator2D('SensorArray',arraytwo,'OperatingFrequency',fc,'DOAOutputPort',true,'NumSignals',1);
estimator_twoMUSIC = phased.MUSICEstimator2D('SensorArray',arraytwo,'OperatingFrequency',fc,'ForwardBackwardAveraging',true,'DOAOutputPort',true,'NumSignalsSource','Property','NumSignals',1);
%% 2D Estimator Runtime
rxsig = dataCube(:,1:(numAntY * numAntX));
estimatorList = {estimator_twoBeamscan, estimator_twoMUSIC};
estimatorTitle = {'2D Beamscan', '2D MUSIC'};
for i = 1:length(estimatorList)
curr_estimator = estimatorList{i};
[~,doas] = curr_estimator(rxsig);
fprintf('%s %s %s%s %s \n',estimatorTitle{i},'values at location',num2str(c_location),':',num2str(doas));
plotSpectrum(curr_estimator)
legend({estimatorTitle{i}},'Location','northeastoutside')
hold on
end
0 Comments
Answers (1)
nick
on 22 Nov 2023
Hi Nat,
I understand that you facing issue an related to obtaining a 3D plot for multiple DOA estimation methods. The graphs obtained are 2D and show the elevation to be zero degrees.
The 'ElevationScanAngles' Property in function 'phased.MUSICEstimator2D' is by default set to 0. To obtain non zero value of elevation angle the user has to specify the range as shown below:
%% Assumptions for unspecified constants in the shared code
f0 = 10e5;
numAntX = 7;
numAntY = 7;
dataCube = cos(2*pi*160*[1:100]);
%% 2D Estimator Setup
fc = f0;
lambda = physconst('LightSpeed')/fc;
arraytwo = phased.URA('Size',[numAntY numAntX],'ElementSpacing',[lambda/2 lambda/2]);
estimator_twoBeamscan = phased.BeamscanEstimator2D('SensorArray',arraytwo,'OperatingFrequency',fc,'DOAOutputPort',true,'AzimuthScanAngles',-50:.5:50,...
'ElevationScanAngles',-30:.5:30,'NumSignals',1);
estimator_twoMUSIC = phased.MUSICEstimator2D('SensorArray',arraytwo,'OperatingFrequency',fc,'ForwardBackwardAveraging',true,'DOAOutputPort',true,'NumSignalsSource','Property', 'AzimuthScanAngles',-50:.5:50,...
'ElevationScanAngles',-30:.5:30,'NumSignals',1);
[~,doas] = estimator_twoBeamscan(dataCube(:,1:49))
plotSpectrum(estimator_twoBeamscan)
You may refer to the following documentation to learn more about the properties of 'phased.MUSICEstimator2D' :
Hope it helps,
Regards,
Neelanshu
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!