⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 h_plane1.m

📁 patchantenna matlab code
💻 M
字号:
function [h_plane, theta]= h_plane1(fr, width, Leff, h, directdB);

% This function was created by Gazi K ASadullah
% fr= Resonant Frequency in GHz.
% w= Width of the microstrip
% h= Thickness of the microstrip
% Er = Di electric Constant
% The function will calculate the Length of the microstrip Antenna.
% References: 
% Microwave Engineering - Third edition- David Pozar
% Microwave filters, Impedence-matching, Networks, and Coupling structures - Mathaei Young Jones
% Passive and Active filters- Theory and implementations - Wai-kai-Chen.
% Digital Signal Processing using MATLAB- Vinay K Ingle.
% Stripline Circuit design- Harlan Howe

% Antenna THeory: Analysis and Design -Balanis

fr=fr*(1e+9);
c=(2.9986e+8)*1000 ;%mm/sec
lamda_o=c/fr; %mm
ko=(2*pi)/lamda_o;


theta = (0.01):(pi/1000):pi;
    
%phi=-90:5:90;
r=1;
%const=((-j)*2*width*ko*(exp(-j*ko*r)))/(4*pi*r);
const=((j)*width*ko*(exp((-j)*ko*r)))/(pi*r);
%B=   sin(((ko*width)/2)*cos(theta));
%C=(((ko*h)/2)*cos(theta));
B= ((sin(((ko*width)/2)*cos(theta)))/(((ko*width)/2)*cos(theta)));
C= (sin(((ko*h)/2)*sin(theta)))/(((ko*h)/2)*sin(theta));
%B=(sin((ko*width*cos(theta))/2))/((ko*width*cos(theta)/2));
D= sin(theta);
% used the equation from the book : " Microstrip Antenna by I.J. Bahl
%plane= ((20*log10(abs(const*(B*C*D)))));
plane1 = (abs(const*(B*C*D)));
plane_max=max(plane1);
h_plane = (20*log10(plane1/plane_max)) + directdB;
%offset = 40;
%plane = plane - max(plane);
%checking the negative values of plane
%for n=1:1:(i-1)
%    if ((plane(n)+offset) < 0)
 %       plane(n)=0;
 %   end
 %end
%plane(1000)
%plane1=max(abs(plane))
%plane1=max(abs(plane))
%plane2=min(abs(plane))

%[E_plane, phi]= e_plane(fr, width, Leff, h);
%[phi,RHO] = cart2pol(theta,h_plane);
%hplane=abs(h_plane);
%a=plane + plane1;
%min(a)
%max(a)

%polarhg(theta, plane +offset ,'g'), title ('H-Plane E(\theta)' );
polarhg(theta',h_plane','rlim',[min(h_plane) 10],'rtick',[-30 -20 -10 0 10],'tstep',60,'color','r'),... 
title ('H-Plane E(\phi) (normlized)' );
plotedit on;
max(theta)*180/pi
min(theta)*180/pi
%'rtick',[-30 -20 -10 0 10],

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -