Chapter 6: Impedance-Matching Networks

Example 6.1, Page 194

In [1]:
import math

#Variable declaration
Zo=100
ZL=complex(50,-75)
B=2*math.pi
XL=-0.75
RL=0.5
Y_L=Zo/ZL

#Calculations&Results
G_L=Y_L.real
B_L=Y_L.imag
print "Y_L=",Y_L
A=G_L*(G_L-1)+B_L**2
print "A=%.4f"%A
ds=(math.degrees(math.atan((XL+math.sqrt(XL**2-A*(1-RL)))/A)))/B
print "ds=%f*lambda"%ds            
ds=(math.degrees(math.atan((XL-math.sqrt(XL**2-A*(1-RL)))/A)))/B
print "ds=%f*lambda"%ds
X_s=-1.2748
Ls=1./B*1./math.degrees(math.atan(X_s))
print "Ls=%f*lambda"%Ls
X_s=1.2748
Ls=1./B*1/math.degrees(math.atan(X_s))
print "Ls=%f*lambda"%Ls
#Incorrect solution in the textbook
Y_L= (0.615384615385+0.923076923077j)
A=0.6154
ds=-3.457805*lambda
ds=-10.166064*lambda
Ls=-0.003067*lambda
Ls=0.003067*lambda

Example 6.3, Page 199

In [2]:
import math
import cmath

#Variable declaration
FL=0.4*cmath.exp(complex(0,-30*math.pi/180))
Fin=0.2*cmath.exp(complex(0,45*math.pi/180))

#Calculations&Results
Z_L=(1+FL)/(1-FL)
Z_in=(1+Fin)/(1-Fin)
Y_in=(1-Fin)/(1+Fin)
print "Z_L=",Z_L
print "Z_in=",Z_in
print "Y_in=",Y_in
#Y_in=(1+complex(0,(Z_L*math.tan(Bl*math.pi/180))))/(Z_L+complex(0,math.tan(Bl*math.pi/180)))
Y_in1=1/Z_in
print "Y_in=",Y_in1
Z_L= (1.79802341883-0.856201628016j)
Z_in= (1.26790036339+0.37355872701j)
Y_in= (0.725709860248-0.213814318065j)
Y_in= (0.725709860248-0.213814318065j)

Example 6.5, Page 208

In [3]:
import math

#Variable declaration
RL=50
Rs=75

#Calculations
R1=math.sqrt(Rs*(Rs-RL))
R2=math.sqrt(RL**2*Rs/(Rs-RL))
attenuation=20*math.log10(R2*RL/(R1*(R2+RL)+R2*RL))

#Result
print "\nR1=%.1f ohm\nR2=%.1f ohm\nattenuation(dB)=%.2f dB"%(R1,R2,attenuation)
R1=43.3 ohm
R2=86.6 ohm
attenuation(dB)=-7.48 dB

Example 6.6, Page 210

In [5]:
import math

#Variable declaration
Rp=600    #ohms
Rs=50     #ohms
W=2*math.pi*400*10**6
Q=math.sqrt(Rp/Rs-1)

#Calculations
Xs=Q*Rs
Xp=Rp/Q
Cs=1./W/Xs
Lp=Xp/W
Ls=Xs/W
Cp=1./W/Xp

#Results
print "\nQ=%.4f\nXs=%.4f ohm\nXp=%.4f ohm\nCs=%.2e F\nLp=%.3e H\nLs=%.3e H\nCp=%.2e F" %(Q,Xs,Xp,Cs,Lp,Ls,Cp)
Q=3.3166
Xs=165.8312 ohm
Xp=180.9068 ohm
Cs=2.40e-12 F
Lp=7.198e-08 H
Ls=6.598e-08 H
Cp=2.20e-12 F

Example 6.7, Page 212

In [6]:
import math

#Variable declaration
Rp=600   #ohm
Rs=173.2    #ohm
Q=math.sqrt(Rp/Rs-1)

#Calculations&Results
Xs=Q*Rs
Xp=Rp/Q
print "Q=%.6f\nXs=%.4f ohm\nXp=%.4f ohm\n" %(Q,Xs,Xp)
Rp=173.2    #ohm
Rs=50         #ohm
Q=math.sqrt(Rp/Rs-1)
Xs=Q*Rs
Xp=Rp/Q
print "\nQ=%.4f\nXs=%.4f ohm\nXp=%.4f ohm\n"%(Q,Xs,Xp)
Q=1.569778
Xs=271.8856 ohm
Xp=382.2196 ohm


Q=1.5697
Xs=78.4857 ohm
Xp=110.3386 ohm

Example 6.8, Page 213

In [7]:
import math

#Variable declaration
f=500*10**6
W=2*math.pi*f
Rp=50
Rs=10
Q=math.sqrt(Rp/Rs-1)

#Calculations
Xs=Q*Rs
Xp=Rp/Q
Ls=(Xs-10)/W
Cp=1/W/Xp
Cs=1/W/(Xs+10)
Lp=Xp/W

#Result
print "\nQ=%.0f\nXs=%.0f ohm\nXp=%.0f ohm\nLs=%.4e H\nCp=%.4e F\nCs=%.3e F\nLp=%.4e H"%(Q,Xs,Xp,Ls,Cp,Cs,Lp)
Q=2
Xs=20 ohm
Xp=25 ohm
Ls=3.1831e-09 H
Cp=1.2732e-11 F
Cs=1.061e-11 F
Lp=7.9577e-09 H

Example 6.9, Page 215

In [8]:
import math

#Variable declaration
ZL=10**3/complex(8,-12)
Rp=50
W=2*math.pi*10**9
Rs=ZL.real
Q=math.sqrt(Rp/Rs-1)

#Calculations
Xs=Q*Rs
Xc=Xs+ZL.imag
Xp=Rp/Q
C=1/W/Xc
L=Xp/W

#Result
print "ZL=",ZL
print "\nQ=%.4f\nXs=%.4f ohm\nXp=%.4f ohm\nC=%.4e F\nL=%.4e H\n"%(Q,Xs,Xp,C,L)
print "\nXs=57.6923-21.0654 ohm\nXp=91.2909 ohm\nCp=1.7434 F"
ZL= (38.4615384615+57.6923076923j)

Q=0.5477
Xs=21.0663 ohm
Xp=91.2871 ohm
C=2.0208e-12 F
L=1.4529e-08 H


Xs=57.6923-21.0654 ohm
Xp=91.2909 ohm
Cp=1.7434 F

Example 6.10, Page 217

In [9]:
import math

#Variable declaration
W=2*math.pi*10**9
Gs=0.02
Gp=0.008
Q=math.sqrt(Gs/Gp-1)

#Calculations
Bs=Gs/Q
Bp=Q*Gp

#Result
print "\nQ=%.4f\nBs=%.4f S\nBp=%.2f S\n"%(Q,Bs,Bp)
Q=1.2247
Bs=0.0163 S
Bp=0.01 S