Polar plot draw line at -3dB opening

6 次查看(过去 30 天)
I am drawing a radiation diagram for an antenna but I need to draw what we call the 3dB opening which is the region where the antenna receives 3dB less than it's maximum. Below is the code I have and as you will see, the maximum is -18.2 so the 3dB opening would be where the polar plot intersects the -21.2dB 'line'.
angl = 0:10:360;
pow = [-18.2 -18.5 -19.7 -21 -22.3 -23 -24.1 -28.1 -33 -37.8 -34 -32.4 -33.1 -32.8 -34.2 -36 -37.9 -39.2 -40 -40 -39.2 -36 -34.2 -32.8 -33.1 -32.4 -34 -37.8 -33 -28.1 -24.1 -23 -22.3 -21 -19.7 -18.5 -18.2];
R = deg2rad(angl);
powc = pow - max(pow);
powc(powc<-40) = -40;
h = polarplot(R, pow + 40, 'Linewidth', 1, 'color', [.21 .81 .94]);
haxes = get(h, 'Parent');
haxes.RTickLabel = {'-40 dB', '-30 dB', '-20 dB'};
title('Diagramme de rayonnement antenne TP-LINK TL-AN2409A');
I'm not sure how I could get two lines from the center to the edge of the plot which interesect the plot line at -21.2dB.
Any help is appreciated.
EDIT:
If there is a way to smooth the plot, I'd love to know how to do that also.

采纳的回答

Star Strider
Star Strider 2019-3-9
From your description, this seems to work:
angl = 0:10:360;
pow = [-18.2 -18.5 -19.7 -21 -22.3 -23 -24.1 -28.1 -33 -37.8 -34 -32.4 -33.1 -32.8 -34.2 -36 -37.9 -39.2 -40 -40 -39.2 -36 -34.2 -32.8 -33.1 -32.4 -34 -37.8 -33 -28.1 -24.1 -23 -22.3 -21 -19.7 -18.5 -18.2];
R = deg2rad(angl);
powc = pow - max(pow);
powc(powc<-40) = -40;
hpp = -21.2;
db3(1) = interp1(pow(1:5), R(1:5), hpp); % Half-Power Angle 1
db3(2) = interp1(pow(end-4:end), R(end-4:end), hpp); % Half-Power Angle 2
figure
h = polarplot(R, pow + 40, 'Linewidth', 1, 'color', [.21 .81 .94]);
hold on
polarplot([0 0; db3(1) db3(2)], [-40 -40; hpp hpp]+40, '-r') % -3dB Opening’ Lines
hold off
haxes = get(h, 'Parent');
haxes.RTickLabel = {'-40 dB', '-30 dB', '-20 dB'};
title('Diagramme de rayonnement antenne TP-LINK TL-AN2409A');
producing:
Polar plot draw line at -3dB opening - 2019 03 09.png
If you want the lines to go to the edge of the plot, replace ‘hpp’ here:
polarplot([0 0; db3(1) db3(2)], [-40 -40; hpp hpp]+40, '-r') % -3dB Opening’ Lines
with the radius of the edge of the plot, that being ‘max(rlim)’.
You could smoothe the plot with a cubic or similar interpolation, using the interp1 function, first using the linspace function to define ‘R’ with a larger number of grid points.
Experiment to get the result you want.

更多回答(1 个)

Da Huang
Da Huang 2019-3-14
if you have antenna toolbox or phase array toolbox, you can use polarpattern function to plot your own pattern. it also provide the measurement tools in it, right click on the figure, you will see a lot of options there.
the command will be:
polarpattern(angl,pow)
then right click in the plot to discover the tools.

类别

Help CenterFile Exchange 中查找有关 Antennas, Microphones, and Sonar Transducers 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by