Polar plot draw line at -3dB opening
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Maxime Michel
le 9 Mar 2019
Réponse apportée : Da Huang
le 14 Mar 2019
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.
0 commentaires
Réponse acceptée
Star Strider
le 9 Mar 2019
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:
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.
0 commentaires
Plus de réponses (1)
Da Huang
le 14 Mar 2019
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.
0 commentaires
Voir également
Catégories
En savoir plus sur Antennas, Microphones, and Sonar Transducers dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!