Chapter 3 : Transmission Lines

Example 3.1 Page No : 4

In [2]:
#Given:
Z_ch = 100            #in ohms
S = 5                 #VSWR (unitless)

#calclations
Z = Z_ch*S 


#---output---#
print 'The terminating impedence =',Z, 'ohms'
The terminating impedence = 500 ohms

Example 3.2 Page No : 5

In [5]:
import math 

#Given
e = 2.718
R = 8
f = 2000                                                   #in ohm/kilometer

#calculations
L = 2*10**-3                                               #in henry/kilometer
C = 0.002*10**-6                                           #in farad/kilometer
G = 0.07*10**-6                                            #second/kilometer
                                                           #in hertz
                                                           #Since [w=2*(pi)*f] & [Zch={(R+jwL)/(G+jwC)}**0.5]
w = 2*math.pi*f                                            #in radians
                                                           #Z_ch=((R+(w*L)j)/(G+(w*C)j))**0.5 #computing characteristic impedance
Z_ch = (complex(R,w*L)/complex(G,w*C))**0.5                #computing characteristic impedance
y = Z_ch
a = y.real                                                 #atteneuation consmath.tant
b = y.imag                                                 #phase consmath.tant
V_in = 2                                                   #in volts
l = 500                                                    #in kilometers
Z_in = Z_ch                                                #Since line terminated at its char. imped. so, Z_in=Z_ch=Z(load)
I_s = V_in/Z_in
Imag = (((((I_s).real)**2)+(((I_s).imag)**2))**0.5)*10**3  #in milliampere
Iang = math.atan((I_s).imag/(I_s).real)*(180/math.pi)      #in degrees
I = Imag*e**-1.99                                          #I=Is*e**-yl
P = I*I*(Z_ch).real


#---output--#
print "Characteristic impedance (in ohms) =",Z_ch,4
print "Atteneuation constant (in NP/km) =",round(a,4)
print "Phase constant (in radian/km) =",round(b,4)
                                                         #P(power delivered)=I*I*REAL(Z_ch)

print "Power delivered to load (in microwatt =",round(P,4),")"
Characteristic impedance (in ohms) = (1012.50018135-155.813417548j) 4
Atteneuation constant (in NP/km) = 1012.5002
Phase constant (in radian/km) = -155.8134
Power delivered to load (in microwatt = 72.1418 )

Example 3.3 Page No : 13

In [6]:
import math 

#calculations
b = 0.02543                   #in rad/km


#calulations
w = 4*math.pi*10**3           #in rad/sec
V_p = w/b                     # phase velocity



#---output---#
print "Phase velocity (in km/sec) =",round(V_p,4)
Phase velocity (in km/sec) = 494155.3525

Example 3.4 Page No : 18

In [7]:
import math 

#calculations
f = 37.5*10**6                           #frequency(in hertz)
wl = (3*10**8)/f                         #wavelength (in meters)
Z_l = 100                                #in ohms
Z_o = 200                                #in ohms
l = 5*wl/4                               #length of line (in meters)
b = 2*math.pi/wl
                                         #At generator end,
Z_i = Z_o*(complex(Z_l,Z_o*math.tan(b*l))/complex(Z_o,Z_l*math.tan(b*l)))
V_s = 200*Z_i / 200 + Z_i
I_s = 200/(200+Z_i)
P_avg = V_s*I_s                          #in watts
I_load=(P_avg/Z_l)**0.5                  #in amps




#---output---#
print "Current drawn from generator(in amps) =",round((I_s).real,4)
                                         #for a lossless line , P(avg)*I_input=P(avg)*I_load

print "Power delivered to load (in watts) =",round((P_avg).real,4)
                                         #Real(Vs*Is)=Real(Vs*I_load)

print "Current flowing in load (in amps) =",round((I_load).real,4)
Current drawn from generator(in amps) = 0.3333
Power delivered to load (in watts) = 266.6667
Current flowing in load (in amps) = 1.633

Example 3.5 Page No : 22

In [8]:
import math 


Z_o = 50                                           #in ohms


#calculations
f = 300*10**6                                      #in Hz
Z_l = complex(50,50)                               #in ohms
wl =(3*10**8)/f                                    #wavelength(in meters)
P =((Z_l-Z_o)/(Z_l+Z_o))
P_mag = (((P).real**2)+((P).imag**2))**0.5
P_ang = math.atan((P).imag/(P).real)*180/math.pi   #in degrees
S = (1+P_mag)/(1-P_mag)



#---output---#
print "Reflection coefficient =",P
print "Magnitude of reflection coeffcient =",round(P_mag,4)
print "Angle (in degree) =",round(P_ang,4)
print "VSWR =",round(S,4)
Reflection coefficient = (0.2+0.4j)
Magnitude of reflection coeffcient = 0.4472
Angle (in degree) = 63.4349
VSWR = 2.618

Example 3.6 Page No : 25

In [17]:
import math 
import numpy


Z_l = 100.                                       #in ohms
Z_o = 600.                                       #in ohms


#calcuations
f = 100.*10**6                                   #in Hz
wl = complex((3.*10**8)/f)
                                                #Position of stub is :
m = complex((Z_l*Z_o)/(Z_l-Z_o))**0.5

pos = (wl/(2*math.pi))*math.atan((Z_l/Z_o)**0.5)   #in meters

l = (wl/(2*math.pi))*(numpy.arctan(m))                #in meters



#---output---#
print "Position of stub (in meters) =",(pos)
print "Length of stub (in meters) =",(abs(l))


#####   m is a complex number hence can not take its atan    #####
Position of stub (in meters) = (0.185063785822+0j)
Length of stub (in meters) = 0.751272516719

Example 3.7 Page No : 28

In [18]:
import math 



Z_o = 50
S = 3.2
X_min = 0.23                            #in terms of wavelength(wl))
                                        #So :

#calculations
Z_l = Z_o*(complex(1,-S*math.tan(2*math.pi*X_min))/complex(S,-math.tan(2*math.pi*X_min)))        #in ohms
Z_lmag = (((Z_l).real**2)+((Z_l).imag**2))**0.5
Z_lang = math.tan((Z_l).imag/(Z_l).real)


#---output---#
print "The load impedance"
print "magnitude (in ohms) =",round(Z_lmag,4)
print "angle (in degrees) =",round(Z_lang*180/math.pi,4)
The load impedance
magnitude (in ohms) = 148.4532
angle (in degrees) = -21.5039

Example 3.8 Page No : 32

In [20]:
import math 

#---varibles--#
Z_o = 50                           #in ohms
Z_l = 100                          #in ohms


#calculations
f = 300*10**3                      #in Hz
P_l = 50*10**(-3)                  #in watts
wl = (3*10**8)/f
p =(Z_l-Z_o)/(Z_l+Z_o)
S =(1+abs(p))/(1-abs(p))
                                   #Since real Zl > Zo , 
pos = wl/4
V_max = (P_l*Z_l)**0.5
V_min = V_max/S


#---output---#
print "VSWR =",round(S,4)
print "First Vmax is located --->at the load "
print "First Vmin is located at --->(wavelength/4)= ",round(pos,4),"(in meters)"
print "Vmax (in volts) =",round(V_max,4)
print "Vmin (in volts) =",round(V_min,4)
print "Zin at Vmin (in ohms) =:",round(Z_o/S,4)
print "Zin at Vmax (in ohms) =",round(Z_o*S,4)
VSWR = 1.0
First Vmax is located --->at the load 
First Vmin is located at --->(wavelength/4)=  250.0 (in meters)
Vmax (in volts) = 2.2361
Vmin (in volts) = 2.2361
Zin at Vmin (in ohms) =: 50.0
Zin at Vmax (in ohms) = 50.0

Example 3.9 Page No : 37

In [22]:
import math 


Z_o = 600.             #in ohm
Z_s = 50.              #in ohm
l = 200.               #in meter
Z_l = 500.             #in ohm

#calculations
p = (Z_l-Z_o)/(Z_l+Z_o)
ref_los = 10*(math.log(1/(1-(abs(p))**2)))/(math.log(10))   #in dB
tran_los = ref_los



#---output---#

print "Reflection loss (in dB) =",round(ref_los,4)
                                                          #attenuation loss= 0 dB
                                                          #Transmisson loss = (attenuation loss)+(reflection loss) = (reflection loss)

print "Transmisson loss (in dB) =",round(tran_los,4)
ret_los=10*((math.log(abs(p)))/(math.log(10)))
print "Return loss(in dB) =",round(ret_los,4)
Reflection loss (in dB) = 0.036
Transmisson loss (in dB) = 0.036
Return loss(in dB) = -10.4139

Example 3.10 Page No : 45

In [23]:
import math 


#variables
e=2.718
f=1000                                           #in Hz
l=10000                                          #in meters
Z_sc=complex(2631,1289)                          #in ohms
Z_oc=complex(221,-137)                           #in ohms


#calculations
Z_o=(Z_sc*Z_oc)**0.5
Z_mag=((Z_o).real**2+(Z_o).imag**2)**0.5
Z_ang=(math.atan(((Z_o).imag)/(Z_o).real))*180/math.pi
x=((Z_oc/Z_sc)**0.5)
                                                 #x=math.tanh(v*l)
                                                 #As, math.tanh(t)=[e**t-e**-t]/[e**t+e**-t]
v=complex(261,2988)/l
a=(v).real
b=(v).imag


#output
print "Characteristic impedance (in ohms) =",round(Z_mag,4)
print "Angle (in degrees) =",round(Z_ang,4)
print "Phase velocity (in meter per sec.) =",round(2*math.pi*f/b,4)
Characteristic impedance (in ohms) = 872.8129
Angle (in degrees) = -2.8468
Phase velocity (in meter per sec.) = 21028.0633