📄 rmsa.m
字号:
% The following program computes some important parameters of a rectangular% microstrip patch antenna%Te inputs to the program are the thickness of the substrate h ,the%desired resonant frequency fr , the width of the feed microstrip and%the dielectric constant of the substrate Er.The layout is shown below.It uses inset feed% %% <---------- L ------------->% % ___________________ % | | ____| | Feed microstrip% | | |______|____________% | | |% W | W0 |% | | __________________| % | | |_____ % | |___________________|% <------>% y0clear all;% warning off MATLAB:divideByZero;fr1=input('Enter the resonant frequency in GHz : ');Er=input('\n Enter the dielectric constant of the substrate : ');h1=input('\n Enter the thickness of the substrate in mm : ')Zc=input('\n Enter the characterstic impedance needed for the microstrip transmission line: ')fr=fr1*1e9;h=h1*1e-3;% Velocity of light in vacuumc0=299792458;%Wavelength in free space LambdaLambda0=c0/fr;% Free space wave impedanceZ0=120*pi;%Determining the width of the microstrip transmission line needed A=(pi*sqrt(2*(Er+1)))*(Zc/Z0)+((Er-1)/(Er+1))*(0.23+0.11/Er); ratio1=4/(0.5*exp(A)-exp(-A)); B=(pi/(2*sqrt(Er)))*(Z0/Zc); ratio2=((Er-1)/(pi*Er))*(log(B-1)+0.39-0.61/Er)+(2/pi)*(B-1-log(2*B-1)); if ratio1 <= 2 ratio = ratio1; else ratio = ratio2; end W_tln=h*ratio;% Width of the patchW=(c0/(2*fr))*sqrt(2/(Er+1));% The effective dielectric constantEreff=(Er+1)/2+((Er-1)/2)*(power((1+12*h/W),-0.5));% Wavelength in effective mediumLambda=Lambda0/sqrt(Ereff);% Speed of light in effective medium c=c0/sqrt(Ereff);%Length of microstrip TLN for a 360 degree phase shiftL_tln=Lambda% The correction of length delL due to the fringingdelL=0.412*h*((Ereff+0.3)*(W/h+0.264))/((Ereff-0.258)*(W/h+0.8));% Correct length neededL=Lambda/2-2*delL;%The feed inset required% Calculation of the conductance k0=2*pi/Lambda0; X=k0*W;%Calculation of the integral of sin(x)/x syms t; f=sin(t)./t; SiX=quadl(inline('f'),eps,X); I1=-2+cos(X)+sin(X)./X+X*SiX; G1= I1/(120*(pi^2));Rin0=1/(2*G1);% Use cos^4 dependencey0=(L/pi)*acos((power((Zc/Rin0),0.25)));disp('All the values are in microns');EreffWidth_trans_line=W_tln/1e-6W_Patch=W/1e-6L_Patch=L/1e-6inset=y0/1e-6
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -