E-plane and H-plane patterns of a rectangular microstrip patch

23 次查看(过去 30 天)
I am trying to recreate a polar plot of gain in dB, but I am not sure how to create the graph. Any help is appreciated. This is what I have so far:
if true
% code
% the following values are given on page 836
dielectric_const = 2.2; % unitless
h = 0.1588; % in cm
f = 10e9; % in Hz
L = 0.906; % in cm
L_e = 1.068; % in cm
E0 = 1; % in V/cm, generic value of 1 given
V0 = h*E0; % in V
theta = pi/2; % in radians
k0 = (2*pi*f)/(3e8); % wavenumber
W = 1.185; % width in cm
phi = linspace(0, pi/2, 1e3);
theta = pi/2;
r = 1;
a = (k0*h)/2;
b = (k0*L_e)/2;
c = k0*W;
d = c/2;
e = cos(phi);
f = sin(phi);
multiplier = i*(c*V0*exp(-1*i*k0*r)/pi*r);
n_1 = sin(a*e);
n_2 = cos(b*f);
d_1 = a*e;
% E plane, eq. 14-45
E_phi = (multiplier.*n_1.*n_2)./d_1;
end

采纳的回答

David Goodmanson
David Goodmanson 2017-12-13
Hi Maximiliano,
Before getting to the plot, there are a couple of things in the code that need to be changed. [1] In the multiplier, there should be some more parentheses included so that you are dividing by r instead of multiplying by it. [2] Since all units are in cm, you need a different value for c than 3e8. Anyway I will assume that you have a good function of E_phi vs. phi.
From the Eplane plot it looks like you want directivity and not gain, i.e. 0 dB as the maximum value. The following code is an example of such a plot, which has multiple curves but certainly works for just one. You can make the obvious change to have the angle go counterclockwise as in the Eplane plot.
I thought that the polaraxes command would work conveniently like the rlim command does, but not so. It looks like it can be made to work, but it’s a hassle. The ‘get’ command does a good job.
% reproduces a set of dipole antenna patterns
% from a book I don't know the name of
theta = (-1:.001:1)*pi;
lambda = 1; % arbitrary value, cancels out
d = lambda*[1/50 1/4 1/2 3/4 1]'; % full antenna length, both halves
k = 2*pi/lambda;
kd2 = k*d/2;
[THeta Kd2] = meshgrid(theta,kd2);
y = (cos(Kd2.*cos(THeta))-cos(Kd2))./sin(THeta);
% --------- plot
y = 20*log10(abs(y)); % dB
ymax = max(y,[],2);
y = y-ymax; % set max = 0dB to obtain directivity
y(y<-40) = -40; % set a lower limit
fig(1)
polarplot(theta,y)
rlim([-40 0]);
% polaraxes command doesn't work with the following syntax
% polaraxes('thetazerolocation','top','thetadir','clockwise')
set(gca,'thetazerolocation','top','thetadir','clockwise');
legend('lambda/50','lambda/4','lambda/2','3 lambda/4','lambda')

更多回答(1 个)

mohamed moumou
mohamed moumou 2021-1-3
Thank you very match sir for this script code Matlab. it helps me

类别

Help CenterFile Exchange 中查找有关 Analysis, Benchmarking, and Verification 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by