# Chapter 3: Transmission Lines¶

## Example 3.1, Page 60¶

In [1]:
import cmath
import math

#Variable declaration
#resistance of line (ohm/m)
R=0.015
#operating frequency(Hz)
n=1.6*10**9
#angular frequency
w=2*math.pi*n
#inductance of line(H/m)
L=0.002*10**(-6)
#conductance of line(S/m)
G=0.1*10**(-3)
#capacitance of line(F/m)
C=0.012*10**(-12)

#Calculations&Results
Z=complex(R,w*L)     #impedance per unit length
print "Z = ",Z,"ohm/m"
print "Y = ",Y,"S/m"
Zo = cmath.sqrt(Z/Y)
print "Zo = ",Zo,"ohm"

Z =  (0.015+20.106192983j) ohm/m
Y =  (0.0001+0.000120637157898j) S/m
Zo =  (337.01818622+121.379454311j) ohm


## Example 3.2, Page 65¶

In [2]:
import math

#Variable declaration
Vp=2.5*10**8     #m/s

#Calculations&Results
Vin=75./(50+75)*3*complex(math.cos(0),math.sin(0))     #V
Iin=3./(50+75)*complex(math.cos(0),math.sin(0))         #A

b=W/Vp
print "V=1.8*cos(2*pi*10^8*t-0.8*pi*z)\ni=0.024*cos(2*pi*10^8*t-0.8*pi*z)"

B=2.5133 rad/m
V=1.8*cos(2*pi*10^8*t-0.8*pi*z)
i=0.024*cos(2*pi*10^8*t-0.8*pi*z)


## Example 3.3, Page 66¶

In [3]:
import math
import cmath

#Variable declaration
R=2            #ohm/m
G=0.5*10**(-3)  #S/m
L=8*10**-9            #H/m
C=0.23*10**-12           #F/m
W=2*math.pi*10**9           #Hz
Y=15.29*10**-4*cmath.exp(complex(0,1.2377))
Z=50.31*cmath.exp(complex(0,1.531))

#Calculations
Zo=cmath.sqrt(complex(R,W*L)/complex(G,W*C))
y=cmath.sqrt(Z*Y)

#Results
print "Zo = ",Zo,"ohm"
print "y = ",y,"/m"

Zo =  (179.427415+26.5059877044j) ohm
y =  (0.0514121346966+0.272545009872j) /m
a=0.0514Np/m


## Example 3.5, Page 70¶

In [4]:
import math

#Variable declaration
lamda=1.   #signal wavelength,m
Zin=150   #ohms
ZL=300    #ohms

#Calculations
Zo=math.sqrt(Zin*ZL)

#Results
print "(a)d = %.2f m"%(lamda/4)
print "(b)Zo = %.3f ohm"%(math.sqrt(Zin*ZL))
print "(c)FL = %.4f"%((ZL-Zo)/(ZL+Zo))

(a)d = 0.25 m
(b)Zo = 212.132 ohm
(c)FL = 0.1716


## Example 3.6, Page 70¶

In [5]:
import math

#Variable declaration
Zin=45    #ohm
ZL=20       #ohm
b=0.5/2      #cm
Er=2.1
L=200*10**-9     #H
f=3*10**9       #Hz
C=55.63*Er*10**-12    #F

#Calculations&Results
Zo=math.sqrt(Zin*ZL)
print "Zo=%.0f ohm"%Zo
k=30/math.sqrt(200*10**-9/(55.63*Er*10**-12))
a=b/math.exp(k)
print "a=%f cm"%a
lamda=1./(f*math.sqrt(L*C))
print "lambda=%.5f m"%lamda
d=lamda/4
print "d=%f m = %.3f cm"%(d,d*100)

Zo=30 ohm
a=0.121075 cm
lambda=0.06896 m
d=0.017240 m = 1.724 cm


## Example 3.7, Page 71¶

In [6]:
import math

#Variable declaration
Zo1=80    #ohms
ZL=50     #ohms
h=1.6     #mm
Er=2.3
Zo=math.sqrt(Zo1*ZL)  #ohms
A=1.4635
B=6.1739
qo=150.

#Calculations&Results
W=h*(2/math.pi*(6.1739-1-math.log(2*6.1739-1)+(2.3-1)/(2*2.3)*(math.log(6.1739-1)+0.39-0.61/2.3)))
print "W=%.1f mm"%W
F=(1+12*h/W)**(-1./2)
print "F=%.6f"%F
Ee=(2.3+1)/2+(2.3-1)/2*0.383216-(2.3-1)/4.6*0.005/math.sqrt(2.0656)
print "Ee=%.1f"%Ee
F=4*h*math.sqrt(Er-1)/qo*(0.5+(1+2*math.log10(1+W/h))**2)
print "F=%f"%F
Ee=((math.sqrt(2.3)-math.sqrt(1.9))/(1+4*F**(-1.5))+math.sqrt(1.9))**2
print "Ee(f)=%f"%Ee
q=3.*10**8/(2*10**9*math.sqrt(1.9))
print "q=%f m"%q
length_of_line=q/4
print "length of line=%.3f m"%length_of_line

W=3.3 mm
F=0.383217
Ee=1.9
F=0.213701
Ee(f)=1.909192
q=0.108821 m
length of line=0.027 m


## Example 3.8, Page 75¶

In [7]:
import math

#Variable declaration
Zo=50           #ohms
C=100*10**(-12) #Capacitance,F
a=1.15*10**(-3) #Np/m

#Calculations
L=C*Zo**2
R=a*math.sqrt(L/C)
G=R*C/L
vp=1/math.sqrt(L*C)

#Results
print "(a)R = %.3f ohm/m"%(a*math.sqrt(L/C))
print "(b)L = %.1e H/m"%(C*Zo**2)
print "(c)G = %.1e S/m"%(R*C/L)
print "(d)vp = %.e m/s"%(1/math.sqrt(L*C))

(a)R = 0.057 ohm/m
(b)L = 2.5e-07 H/m
(c)G = 2.3e-05 S/m
(d)vp = 2e+08 m/s


## Example 3.9, Page 76¶

In [8]:
import cmath

#Variable declaration
Zin=complex(30,60)        #ohm
Zsc=complex(0,53.1)        #ohm
Zoc=complex(0,-48.3)            #ohm

#Calculations&Results
Zo=cmath.sqrt(Zsc*Zoc)
print "Zo = %.4f ohms"%Zo.real
ZL=Zoc*(Zsc-Zin)/(Zin-Zoc)
print "ZL =",ZL,"ohms"

Zo = 50.6432 ohms
ZL = (11.6343241568+6.30008979411j) ohms


## Example 3.10, Page 76¶

In [9]:
import math
import cmath

#Variable declaration
Zoc=complex(0,-54.6)  #ohm
Zsc=complex(0,103)    #ohm
d=1.5                 #m

#Calculations&Results
Zo=cmath.sqrt(Zoc*Zsc)
print "Zo= %.f ohms"%Zo.real
#y=1/d*cmath.atanh(cmath.sqrt(Zsc/Zoc))
y=1./2./d*cmath.log(complex(1,1.8969)/complex(1,-1.8969))
print "y= %.4f /m"%y.imag   #real part negligible

Zo= 75 ohms
y= 0.7238 /m


## Example 3.11, Page 77¶

In [10]:
import math
import cmath

#Variable declaration
Vp=200*10**6             #m/S
Zo=50   #ohm
Zs=50     #ohm
Vs=100   #volt
ZL=complex(100,50)       #ohm
l=10     #m

#Calculations&Results
Zin=Zo*(complex(ZL,(Zo*math.tan(B*l)))/complex(Zo,(ZL*math.tan(B*l))))
print "Zin=",Zin,"ohms"

VA=Vs/(Zs+Zin)*Zin
print "VA= %.4f V,phase = %.2f degrees"%(math.sqrt(VA.real**2+VA.imag**2),math.degrees(math.atan(VA.imag/VA.real)))

ZTh=Zo*complex(Zs,Zo*cmath.tan(B*l))/complex(Zo,Zs*cmath.tan(B*l))
print "ZTh=",ZTh,"ohms"

Vin=50*cmath.exp(complex(0,-8.168))
VTh=2*Vin
print "VTh= %.f V,phase = %.2f degrees"%(math.sqrt(VTh.real**2+VTh.imag**2),math.degrees(math.atan(VTh.imag/VTh.real)))

VL=VTh/(ZTh+ZL)*ZL
print "VL= %.f V,phase = %.2f degrees"%(math.sqrt(VL.real**2+VL.imag**2),math.degrees(math.atan(VL.imag/VL.real)))

F=(complex(19.21,3.52)-50)/(complex(19.21,3.52)+50)
print "F=",F

Z=10
F_mag = math.sqrt(F.real**2+F.imag**2)
F_imag = math.degrees(math.atan(F.imag/F.real))
VL=50*(cmath.exp(complex(0,(-B*Z)))+F_mag*cmath.exp(complex(0,(B*Z)+2.9769)))
print "VL= %.4f V,phase = %.2f degrees"%(math.sqrt(VL.real**2+VL.imag**2),math.degrees(math.atan(VL.imag/VL.real)))

B = 0.8168 rad/m
Zin= (19.2092724257+3.52061311811j) ohms
VA= 28.1812 V,phase = 7.47 degrees
ZTh= (50+6.51267575189e-16j) ohms
VTh= 100 V,phase = 72.01 degrees
VL= 71 V,phase = 80.14 degrees
F= (-0.44115007149+0.0732964636851j)
VL= 70.7101 V,phase = 80.13 degrees


## Example 3.12, Page 78¶

In [11]:
import math
import cmath

#Variable declaration
R=250    #ohm

#Calculations
V250=60*math.sqrt(2)/11*cmath.exp(complex(0,-45./180*cmath.pi)) #volt
Pd=(V250.real**2+V250.imag**2)/(2*R)

#Results
print "V250=",V250
print "Pd=%.3f mW"%(Pd*10**3)

V250= (5.45454545455-5.45454545455j)
Pd=119.008 mW


## Example 3.13, Page 84¶

In [12]:
import math

#Variable declaration
ZL=complex(73,-42.5)  #ohms
Zo=complex(50,.01)    #ohms

#Calculations&Results
F=(ZL-Zo)/(ZL+Zo)
p=math.sqrt(F.real**2+F.imag**2)
VSWR=(1+p)/(1-p)
print "F= %.4f,phase = %.2f degrees"%(p,math.degrees(math.atan(F.imag/F.real)))
print "VSWR=%.4f"%VSWR

F= 0.3714,phase = -42.53 degrees
VSWR=2.1818


## Example 3.14, Page 85¶

In [13]:
import math

#Variable declaration
q=2          #m
d1=.4        #m
Z2=1
S=2.4

#Calculations
Z_L=complex(1,-S*math.tan(B*d1))/complex(S,-math.tan(B*d1))

#Results
print "Z_L=",Z_L
print "ZL=",Z_L*100

Z_L= (1.65000669415-0.961767520999j)
ZL= (165.000669415-96.1767520999j)


## Example 3.15, Page 87¶

In [14]:
import math

#Variable declaration
ZL=complex(50,100)  #ohms
Zo=50               #ohms
Bl=math.pi/2

#Calculations
Z_in=Zo*(complex(0,Zo)/complex(0,ZL))
F=(ZL-Zo)/(ZL+Zo)
F_mag=math.sqrt(F.real**2+F.imag**2)
F_phase = math.degrees(math.atan(F.imag/F.real))
VSWR=(1+F_mag)/(1-F_mag)
Z_L=ZL/Zo

#Results
print "Z_in=",Z_in
print "F=%.4f,phase=%d degrees"%(F_mag,F_phase)
print "VSWR=%.4f"%VSWR
print "Z_L=",Z_L

Z_in= (10-20j)
F=0.7071,phase=45 degrees
VSWR=5.8284
Z_L= (1+2j)