# Chapter 7: Impedance Transformers¶

## Example 7.1, Page 236¶

In [1]:
import math

#Variable declaration
RL=100  #ohms
Zo=50   #ohms
PM=0.05 #reflection co-efficient
c=3.0*10**8  #m/s
f=900*10**6 #Hz

#Calculations
lamda=c/f
Z1=math.sqrt(RL*Zo)
l=lamda/4
fractional_bandwidth=2-4/math.pi*math.acos(abs(2*PM*math.sqrt(Zo*RL)/(RL-Zo)/math.sqrt(1-PM**2)))

#Results
print "Z1=%f ohm\nl=%.4f m\nfractional bandwidth=%.7f"%(Z1,l,fractional_bandwidth)

Z1=70.710678 ohm
l=0.0833 m
fractional bandwidth=0.1808967


## Example 7.5, Page 258¶

In [2]:
import math

#Variable declaration
delf=0.6   #fractional bandwidth
fo=1
Zo=100     #ohms

#Calculations
Qz=math.acos(1./math.sqrt(2)*math.cos((2-delf/fo)/4*math.pi))
Qm=math.acos(math.sqrt(2)*math.cos(Qz))
Z_L=5.
k=math.sqrt((Z_L-1)**2/(4*Z_L*math.tan(Qz)**4))
Pm=math.sqrt(k**2/(1+k**2))
Z1=math.sqrt(math.sqrt(((Z_L-1)**2/(4*math.tan(Qz)**4))+Z_L)+((Z_L-1)/(2*math.tan(Qz)**2)))
Z2=Z_L/Z1*Zo
Z_in=Z1**2/Z2**2*Z_L*10**4
F=(Z_in-1)/(Z_in+1)

#Results

Qz=1.2440 rad