www.gusucode.com > matlab编程遗传算法计算匹配电路源码程序 > code1/code/MATLAB源代码/microstrip_line_cal.m

    function Z0_f = microstrip_line_cal(w,h,t,er,f_1GHz)
%microstrip_line_cal 计算微带传输线的特征阻抗,w为微带线宽度,h为介质高度,t为导带厚度,单位均为mm,er为介质相对介电常数,f_1GHz为频率,单位GHz 
%   此处显示详细说明
e0=8.854187817*10^-12;
u0=4*pi*10^-7;
n0=sqrt(u0/e0);
c=299792457.4*10^3;
wavelength=c/(f_1GHz*10^9);

if w/h<1/2/pi
    w_=(w/h+1.25/pi*t/h*(1+log(4*pi*w/t)))*h;
else w_=(w/h+1.25/pi*t/h*(1+log(2*h/t)))*h;
end

if w/h<1
    F=(1+12*h/w)^-0.5+0.04*(1-w/h)^2;
else F=(1+12*h/w)^-0.5;
end
Eeff_0=(er+1)/2+(er-1)/2*F-(er-1)/4.6*t/h/sqrt(w/h);

A=4*h*sqrt(er-1)/wavelength*0.5*(1+2*log10(1+w/h))^2;
Eeff_f=((sqrt(er)-sqrt(Eeff_0))/(1+4*A^-1.5)+sqrt(Eeff_0))^2;

if w/h<1
    Z0=n0/(2*pi*sqrt(Eeff_0))*log(8*h/w_+0.25*w_/h);
else  Z0=n0/sqrt(Eeff_0)*(w_/h+1.393+0.667*log(w_/h+1.444))^-1;
end

Z0_f=Z0*(Eeff_f-1)/(Eeff_0-1)*sqrt(Eeff_0/Eeff_f);
end