# Chapter 5 IMPEDENCE MATCHING AND TUNNING¶

## Exa 5.1 page no:254¶

In [1]:
#program to design an L section matching network
from math import pi,sqrt
from sympy import I

# program to design an L section matching network to match a series RC load.
Rl=200;Xl=-100;f=500*10**6;Zo=100;
B1=(Xl+sqrt(Rl/Zo)*sqrt(Rl**2+Xl**2-(Rl*Zo)))/(Rl**2+Xl**2);
B2=(Xl-sqrt(Rl/Zo)*sqrt(Rl**2+Xl**2-(Rl*Zo)))/(Rl**2+Xl**2);
C1=(B1/(2*pi*f))*10**12;
L2=(-1/(B2*2*pi*f))*10**9;
X1=(1/B1)+((Xl*Zo)/Rl)-(Zo/(B1*Rl));
X2=(1/B2)+((Xl*Zo)/Rl)-(Zo/(B2*Rl));
L1=(X1/(2*pi*f))*10**9;
C2=(-1/(X2*2*pi*f))*10**12;
print"inductor of first circuit in nH = %.3f"%L1
print"capacitor of the first circuit in pF = %.3f"%C1
print"inductor of second circuit in nH = %.3f"%L2
print"capacitor of the second circuit in pF = %.3f"%C2
print"\"NOTE:−for above specific problem Rl>Zo, positive X implies inductor , negative X implies capacitor , positive B implies capacitor and negative B implies inductor .\""

inductor of first circuit in nH = 38.985
capacitor of the first circuit in pF = 0.923
inductor of second circuit in nH = 46.139
capacitor of the second circuit in pF = 2.599
"NOTE:−for above specific problem Rl>Zo, positive X implies inductor , negative X implies capacitor , positive B implies capacitor and negative B implies inductor ."


## Exa 5.5 page no:275¶

In [2]:
#design quarter wave matching transformer
from math import sqrt,pi,acos

#program to design a single section quarter wave matching transformer .
Zo=50; # characteristic impedence .
fo=3*10**9;swr=1.5; # maximum limit of swr.
Z1=sqrt(Zo*Zl); # characteristic impedence of the matching section .
taom=(swr-1)/(swr+1);
frac_bw=2-(4/pi)*acos((taom/sqrt(1-taom**2))*(2*sqrt(Zo*Zl)/abs(Zl-Zo))); # fractional bandwidth .
print "charecteristic impedence of matching section = %.2f"%Z1
print " fractional bandwidth = %.2f"%frac_bw

charecteristic impedence of matching section = 22.36
fractional bandwidth = 0.29


## Exa 5.6 page no:280¶

In [3]:
#design three section binomial transformer
from math import pi,acos

Zl=50.;Zo=100.;N=3;taom=0.05;
A=(2**-N)*abs((Zl-Zo)/(Zl+Zo));
frac_bw=2.-(4/pi)*acos(0.5*(taom/A)**2);
c=1.
Z1=Zo*((Zl/Zo)**((2.**-N)*(c**N)));
print "Z1 = %.2f"%Z1
c=3.**(1/3)
Z2=Z1*((Zl/Zo)**((2.**-N)*(c**N)));
print "Z2 = %.2f"%Z2
c=3.**(1/3)
Z3=Z2*((Zl/Zo)**((2.**-N)*(c**N)));
print "Z3 = %.2f"%Z3
# answers may vary due to round off errors

Z1 = 91.70
Z2 = 84.09
Z3 = 77.11


## Exa 5.7 page no:288¶

In [4]:
#design three section chebysev transfomer
from math import pi,cosh
from sympy import asec,acosh

Zl=100.;Zo=50.;taom=0.05;N=3;A=0.05;
thetam=asec(cosh((1/N)*acosh((1/taom)*abs((Zl-Zo)/(Zl+Zo)))))*(180/pi);
x=(cosh((1./N)*acosh((1./taom)*abs((Zl-Zo)/(Zl+Zo)))))
tao_o=A*(x**3)/2;
tao_1=(3*A*(x**3-x))/2; # from symmetry tao 3=tao
Z1=Zo*((1+tao_o)/(1-tao_o));
Z2=Z1*((1+tao_1)/(1-tao_1));
Z3=Zl*((1-tao_o)/(1+tao_o));
print "the characteristic impedences are = %.2f ,%.2f ,%.2f"%(Z1,Z2,Z3)

the characteristic impedences are = 57.27 ,69.84 ,87.30