# Chapter No 8 - Transmission Line¶

## Example8.1, page no 313¶

In :
from __future__ import division
from math import sqrt, pi
#Given
#a
L=1.2*10**-3#distributed inductance
C=0.05*10**-6#distributed capacitance
Zo=sqrt(L/C)#Characteristic Impedance
print 'The characteristic Impedance is Zo= %0.2f ohm'%(Zo)
Wo=1# Assumedfor ease of calculation
G=1J*sqrt(L*C)*Wo
print '\nPropagation constant is Gama={0:0.1f}+{1:0.2e}j W'.format(G.real,G.imag)
#b
#i
lamda=0.4e3#wavelength=Line length
c=3e8
f=c/lamda
#ii
L=L*0.4
C=C*0.4
v=1/(sqrt(L*C))
print '\n The freq at which the line length is equal to wavelength is: %d KHz\n The velocity of propagation is: %0.2f km/sec'%(f*1e-3,v*1e-3)

The characteristic Impedance is Zo= 154.92 ohm

Propagation constant is Gama=0.0+7.75e-06j W

The freq at which the line length is equal to wavelength is: 750 KHz
The velocity of propagation is: 322.75 km/sec


## Example8.2, page no 314¶

In :
from math import cos, sin, tan,pi
#Given
v=3e8# velocty of light
f=1.2e6# Operating Freq
lamda=v/f
#print lamda)
l=100# length of the Tx-Line
phi=2*(pi*l)/(lamda)# Phase shift in degrees
Zo=500# Characteristic impedance
#a Open circuited Line

Zin=-1J*Zo*(cos(phi)/sin(phi))

#b Short circuited Line
Z1in=1J*Zo*tan(phi)
print 'The phase shift is: %d degrees'%(phi*180/pi)
print 'Open Circuited line impedance: {0:0.2f}'.format(-Zin.imag),'ohms'
print 'Short Circuited line impedance: {0:.2f}'.format(Z1in.imag),'ohms'

The phase shift is: 144 degrees
Open Circuited line impedance: -688.19 ohms
Short Circuited line impedance: -363.27 ohms


## Example8.3, page no 315¶

In :
from __future__ import division
from cmath import exp,sqrt,log,atan,pi
#Given
f=1600
w=1000
Zoc=2460*exp(1J*-86.5*pi/180)# Open circuited Line impedance
Zsc=21.5*exp(1J*14*pi/180)# Short circuited Line impedance
Zo=sqrt(Zoc*Zsc)# Characteristic impedance
A=(sqrt(Zsc/Zoc)).real# tan(a+ jBeta) = A + jB
B=(sqrt(Zsc/Zoc)).imag
l=1/4
alpha=(1/(4*l))*log(((1+A**2+B)**2)/(((1-A)**2)+B**2)) #Attenuation Constant
Beta=(1/(2*l))*atan((2*B)/(1-A**2-B))  #phase constant

#the tx-Line parameters
R=(Zo*complex(alpha,Beta)).real
L=(Zo*complex(alpha,Beta)).imag
G=(complex(alpha,Beta)/Zo).real
C=(complex(alpha,Beta)/Zo).imag
print 'The Characteristic impedance:Zo= '
print Zo
print 'The value of Alpha={0:.3f} '.format(alpha.real),'nepere/km\n'
print 'The value of Beta= {0:0.3f}'.format(Beta.real)
print 'the tx-Line parameters are\nR= %0.2f ohms\nL= %0.2f mH\nG= %0.2f umhos\nC= %0.2f mF\n'%(R,L,G*1e6,C*1e3)

# Note :  There are some calculation errors in the solution presented in the book

The Characteristic impedance:Zo=
(185.464726748-135.988363959j)
The value of Alpha=0.263  nepere/km

The value of Beta= 0.308
the tx-Line parameters are
R= 90.72 ohms
L= 21.46 mH
G= 128.80 umhos
C= 1.76 mF



## Example8.4, page no 316¶

In :
from __future__ import division
from math import sqrt,pi
#Given
d=0.7# distance between two insertions
#print Ld_m)
#print Rd_m)
R=20+Rd_m#Line resistance
L=Ld_m# Line inductance
C=0.05e-6# Line Capacitance
alfa=0.5*R*sqrt(C/L)#Attenuation Constant
#
fc=(pi*d*sqrt(L*C))**-1#cut off freq
print 'The atenuation constant is %0.3f nepers/mile\nThe Cut-off Freq is %d KHz'%(alfa,fc*1e-3)

# Note :  There are some calculation errors in the solution presented in the book

The atenuation constant is 0.011 nepers/mile
The Cut-off Freq is 6 KHz


## Example8.5, page no 317¶

In :
from cmath import exp,pi
#Given
a=0.7#attenuation constant
b=0.3#phase constant
Gamma=a+(1J*b)#propagation constant
l=0.5# half length of line( for midpoint)
Vs=10# Excitation voltage
V_mod=Vs*(exp(-a*l))#Magnitude of the Vs

phi=b*l*180/pi#phase shift
V=V_mod*(exp(-1J*(phi*pi/180)))#voltage at the mid point
print 'the voltage at the mid point of the line is \n {0:0.2f}+{0:.2f}j\n V with Angle = -%0.2fdegrees'.format(V.real,V.imag)%phi

# Note :  There are some calculation errors in the solution presented in the book

the voltage at the mid point of the line is
6.97+6.97j
V with Angle = -8.59degrees


## Example8.6, page no 317¶

In :
from cmath import pi,sqrt,polar,phase,exp
#Given
R=0.01
l=1e3
L=1e-6
G=1e-6
C=0.001e-6
f=1.59e3# operating freq
w=2*pi*f# angular freq
#a
Zo=sqrt((R+(1J*w*L))*0.35/(G+(1J*w*C)))#characteristic impedance
Z0=polar(Zo)
Z0r=Z0
Z0i=Z0
#b

Beta=sqrt(0.5*(sqrt((((R**2)+(round(w**2)*(L**2)))*(round(G**2)+(round(w**2)*(C**2)))))-(round(R*G)-((w**2)*L*C))))#Phase constant

v=w/Beta#phase velocity

#c
Alpha=sqrt(0.5*(sqrt((((R**2)+((w**2)*(L**2)))*((G**2)+((w**2)*(C**2)))))+((R*G)-((w**2)*L*C))))#attenuation constant
Vs=1#Assumed for easeof calculation
A=(Vs-(Vs*exp(-Alpha*l)))*100
print 'The characteristic impedance Zo= %0.2f /_%0.2f ohm\n'%(Z0r,Z0i*180/pi)
print ' The Phase velocity is: v= %3.2e m/sec\n Percent decrease in the voltage is %0.2f%c'%(v.real,A.real,'%')

# Note :  There are some calculation errors in the solution presented in the book

The characteristic impedance Zo= 22.20 /_-19.66 ohm

The Phase velocity is: v= 2.88e+07 m/sec
Percent decrease in the voltage is 14.91%


## Example8.15, page no 334¶

In :
from cmath import cosh,polar,pi
#GivenR=0.01
x=10#line length
Zo=100# characteristic impedance
a=0.1# attenuation constant
Beta=0.05# phase constant
Is=20e-3# source current
Gamma=a+ 1J*Beta# propagation constant

Ii=polar(I)
I_r=Ii
I_i=Ii

print 'The current received is= %0.2f mA  at phase%0.2f'%(1000*I_r,I_i*180/pi)

The current received is= 13.64 mA  at phase-22.59


## Example8.15, page no 348¶

In :
from cmath import exp,polar,cosh,sinh,pi

#Given
l=100# Tx-line length
ZR=200#Terminal resistance
Zo=600#Characteristic impedance
a=0.01#attenuation constant
Beta=0.03#phase constant
d=0#reflection coeff at load is Zero
Gamma=a+1J*Beta#propagation constant
Kd=((ZR-Zo)/(ZR+Zo))*exp(-2*Gamma*d)#reflection coeff at point D d km from load
Kdd=polar(Kd)
Kdr=Kdd
Kdi=Kdd
d1=100# distance
Ks=((ZR-Zo)/(ZR+Zo))*exp(-2*Gamma*d1)#reflection coeff at the sending end
[Ksr,Ksi]=polar(Ks)
Zin=Zo*(((ZR*cosh(Gamma*l))+(Zo*sinh(Gamma*l)))/((Zo*cosh(Gamma*l))+(ZR*sinh(Gamma*l))))#Input impedance
Zz=polar(Zin)
Zinr=Zz
Zini=Zz
print 'The input impedance is %0.2f /_%0.2fdeg\nReflection Coeff is %0.2f /_%0.2fdeg'%(Zinr,Zini*180/pi,Ksr,Ksi*180/pi)

# Note :  There are some calculation errors in the solution presented in the book

The input impedance is 526.81 /_-2.18deg
Reflection Coeff is 0.07 /_-163.77deg


## Example8.16, page no 349¶

In :
from cmath import sqrt,polar,pi
#Given
L=1e-3#inductance
R=40# Resistance
C=0.1e-6# capacitance
G=1e-6#conductance
w=5000# angular freq
Zo=sqrt(complex(R,(w*L))/complex(G,(w*C)))#Characteristic impedance
#Zr=sqrt(sqrt(R**2+(w*L)**2)/sqrt(G**2+(w*C)**2))
Zz=polar(Zo)
ZoR=Zz
ZoI=Zz
print 'The characteristic impedance is %0.2f /_%0.2fdeg'%(ZoR,ZoI*180/pi)

# Note :  There are some calculation errors in the solution presented in the book

The characteristic impedance is 283.94 /_-41.38deg


## Example8.17, page no 349¶

In :
from cmath import polar,exp
#Given
l=0.5#half line distance
Vs=10#Excitation voltage
Gamma=0.7+1J*0.3#propagation constant
Vv=polar(Vs*(exp(-Gamma*l)))#vtg at mid point
Vr=Vv
Vi=Vv
print 'The voltage at the mid point of the line is %0.2f /_%0.2f '%(Vr,Vi*180/pi)

The voltage at the mid point of the line is 7.05 /_-8.59


## Example8.18, page no350¶

In :
from math import sqrt
#Given
Zo=50# characteristic impedance
P=500e-3#Supplied power
S=1.4#VSWR on the line
Emax=sqrt(Zo*S*P)#Max vtg

Emin=sqrt(Zo*P/S)# Min vtg
print 'The max voltage on line is %0.2f V\n The min voltage on line is %0.2f V'%(Emax,Emin)

The max voltage on line is 5.92 V
The min voltage on line is 4.23 V


## Example8.19, page no 350¶

In :
from math import sqrt
#Given
Zo=100# Characteristic Impedance
f=100e3# Operating freq
#a
K=(Zr-Zo)/(Zo+Zr)#Vtg Reflection coeff

#b
S=(1+K)/(1-K)#VSWR

#c+d
Emax=sqrt(Zr*P)#Max line vltg
Imin=Emax/Zr#Min line current

Emin=Emax/S# Min line vltg
Imax=S*Imin#Max line current

#e
R=14000/40

Zr=(Zo**2)/R#
print '\nThe voltage reflection coeff is %0.2f\nThe VSWR is %0.2f\n\n\nThe Max and min voltage and crresponding crrent is\n Emax= %0.2fV Imin= %0.2fmA\n Emin= %0.2fV Imax= %0.2fmA\n\n The Termination resistance should be %0.2f ohm'%(K,S,Emax,Imin*1e3,Emin,Imax*1e3,Zr)

The voltage reflection coeff is 0.17
The VSWR is 1.40

The Max and min voltage and crresponding crrent is
Emax= 3.74V Imin= 26.73mA
Emin= 2.67V Imax= 37.42mA

The Termination resistance should be 28.57 ohm


## Example8.20, page no 352¶

In :
from math import exp,log
#Given
V=0.5#receiving vtg
Vs=2#Source vtg
al=-log(V/Vs)#attenuation

al2=al*1.5
V=Vs*exp(-al2)#receiving voltage
print 'the receiving voltage will be %0.2f V'%(V)

the receiving voltage will be 0.25 V


## Example8.22, page no352¶

In :
from cmath import sqrt
#Given
Zin=25+1J*15# Internal Impedance
f=3e6#operating freq
v=3e8#light velocity
L=v/(4*f)#length of the line

Zo=sqrt(Zin*Zr)#Characteristic Impedance

print 'The lrngth should be %d metres\nThe Characteristic Impedance should be %0.2f ohms'%(L,Zo.real)

The lrngth should be 25 metres
The Characteristic Impedance should be 48.79 ohms


## Example8.23, page no353¶

In :
from math import sqrt,pi
from __future__ import division
#Given
#a
L=1e-3# inductance
C=61.25e-9#capacitance
Ld=44e-3#coil inductance
d=2#distance intervals after which coils are added
Lt=(L*2)+(Ld*2)#total inductance
Ct=C*2#total capacitance
fc=(pi*sqrt(Lt*Ct))**-1#cut off freq

#b
I=100e-3#milliameter range
R=1#milliameter resistance
Zo=100#characteristic impedance
Zin=(Zo**2)/R#input impedance

Er=I*R#
Es=Er*sqrt(Zin/Zo)
print 'The cut-off freq is %0.2f KHz \n the voltage being measured is %d V'%(fc*1e-3,Es)

The cut-off freq is 3.03 KHz
the voltage being measured is 1 V


## Example8.24, page no 354¶

In :
from math import sqrt
#Given
f=20e6#tuned freq
ZR=100#Equivalent aerial Resistance
Zin=500#input impedance
c=3e8
lamda=c/f
l=lamda/4#lamda/4 Transformer

Zo=sqrt(Zin*ZR)#Characteristic impedance
print 'the Length of the transformer(stub) is %0.2f metres\n The characteristic impedance of this transformer is %d ohms'%(l,round(Zo))

the Length of the transformer(stub) is 3.75 metres
The characteristic impedance of this transformer is 224 ohms


## Example8.25, page no 354¶

In :
from math import pi,cos,sin
#Given
lamda=5#wavelength
Zo=200#Characteristic impedance
Zo1=100#Zo'

The sending end (Source end)impedance (Zl)is: