3dB beamwidth from matrix
13 次查看(过去 30 天)
显示 更早的评论
I have a matrix H(360x180) containing the energy levels in dB. I have the following 3D-beampattern plotted from H:
How can I find the 3dB beamwidth (in degrees across elevation & azimuth) of the mainlobe?
0 个评论
采纳的回答
Image Analyst
2012-2-4
Looks to me like there is no lobe above 3 dB. If you mean -3 dB then there is one or maybe 2 peaks. How do you define width? Do you want just the x and y widths at the -3 dB level, or do you want to extend out, or "fall down," the lobe well past the -3 dB cutting level? If it's the latter you might need some kind of region growing process. If it's the former, simply threshold and call regionprops() asking for the bounding box. Two lines of code.
binaryImage = H > -0.3;
measurements = regionprops(binaryImage, 'BoundingBox');
Here's a full blown demo:
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
workspace; % Make sure the workspace panel is showing.
fontSize = 20;
% Create sample data.
H = peaks(90);
H = 11*mat2gray(H) - 13;
% Display it.
subplot(2, 2, 1);
surf(H);
xlabel('Azimuth [deg]', 'FontSize', fontSize);
ylabel('Elevation [deg]', 'FontSize', fontSize);
% Enlarge figure to full screen.
set(gcf, 'units','normalized','outerposition',[0 0 1 1]); % Maximize figure.
set(gcf,'name','Demo by ImageAnalyst','numbertitle','off')
% Threshold the image
binaryImage = H > -3;
% Display it.
subplot(2, 2, 2);
imshow(binaryImage);
axis on;
xlabel('Azimuth [deg]', 'FontSize', fontSize);
ylabel('Elevation [deg]', 'FontSize', fontSize);
measurements = regionprops(binaryImage, 'BoundingBox');
bb = [measurements.BoundingBox]
x1 = bb(1);
x2 = x1 + bb(3);
y1 = bb(2);
y2 = y1 + bb(4);
% Plot box over image.
hold on;
plot([x1 x2 x2 x1 x1], [y1 y1 y2 y2 y1], 'r-', 'LineWidth', 2);
message = sprintf('The Azimuth Width at -3 dB = %.1f\nThe Elevation Width at -3 dB = %.1f', ...
bb(3), bb(4));
msgbox(message);
4 个评论
Bjorn Gustavsson
2012-2-6
Don't calculate beam-widths _directly_ from the azimuth and zenith angles you get out. The beam-width are not the difference between min and max azimuth and zenith angles.
HTH
Mohammad Khishe
2012-9-21
更多回答(1 个)
Bjorn Gustavsson
2012-2-2
You could use contourc:
C = contourc(X,Y,H,[-3 -3]);
where you get the 3-dB curve from the C array that is built thisly:
C = [level1 x1 x2 x3 ... level2 x2 x2 x3 ...;
pairs1 y1 y2 y3 ... pairs2 y2 y2 y3 ...]
HTH
7 个评论
Bjorn Gustavsson
2012-2-4
Zozo, I think you got me wrong.
Even the main lobe might not be nice-n-elliptical. If you try my suggestion you will see if it is, or if it is more irregular, and if you have side-lobes with more than -3 dB gain.
THEN, you can judge if it is just to take any 2 points on opposing sides of the beam-centre or if you have to be more clever - like for example check the dot-product of the line-of-sight vectors between "all" unique combinations to find the one with largest beam-width, the average beam-width and whatnot.
HTH.
Mohammad Khishe
2012-9-21
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!