from __future__ import division
import math
import cmath
#initializing the variables:
f = 1910;# in Hz
b = 0.05;# in rad/km
#calculation:
w = 2*math.pi*f
#wavelength
Y = 2*math.pi/b
#speed of transmission
u = f*Y
#Results
print "\n\n Result \n\n"
print "\n wavelength Y is ",round(Y,1)," km"
print "\n speed of transmission ",round(u,1),"km/sec"
from __future__ import division
import math
import cmath
#initializing the variables:
L = 0.004;# in Henry/loop
C = 0.004E-6;# in F/loop
f = 1000;# in Hz
#calculation:
w = 2*math.pi*f
#phase delay
b = w*(L*C)**0.5
#wavelength
Y = 2*math.pi/b
#speed of transmission
u = f*Y
#Results
print "\n\n Result \n\n"
print "\n phase delay is ",round(b,3)," rad/km"
print "\n wavelength Y is ",Y," km"
print "\n speed of transmission ",u,"km/sec"
from __future__ import division
import math
import cmath
#initializing the variables:
a = 0.25;# in Np/km
b = 0.20;# in rad/km
Vs = 5;# in Volts
n = 10;# in km
f = 2000;# in Hz
#calculation:
w = 2*math.pi*f
#the voltage 10 km down the line
r = a + 1j*b
VR = Vs*cmath.e**(-1*n*r)
#Results
print "\n Result \n\n"
print "voltage 10 km down the line is ",round(abs(VR),2),"/_",round(cmath.phase(complex(VR.real,VR.imag))*180/math.pi,2),"deg V"
from __future__ import division
import math
import cmath
#initializing the variables:
a = 0.5;# in Np/km
b = 0.25;# in rad/km
rvs = 2;# in Volts
thetavs = 0;# in degrees
rzo = 800;# in ohm
thetazo = -25;# in degrees
n = 5;# in km
#calculation:
#voltage
Vs = rvs*math.cos(thetavs*math.pi/180) + 1j*rvs*math.sin(thetavs*math.pi/180)
#characteristic impedance
Zo = rzo*math.cos(thetazo*math.pi/180) + 1j*rzo*math.sin(thetazo*math.pi/180)
# receiving end voltage
r = a + 1j*b
VR = Vs*cmath.e**(-1*n*r)
#Receiving end current,
IR = VR/Zo
#Results
print "\n\n Result \n\n"
print "Receiving end current, IR is ",round(abs(IR)*1E3,3),"/_",round(cmath.phase(complex(IR.real,IR.imag))*180/math.pi,2),"deg mA"
from __future__ import division
import math
import cmath
#initializing the variables:
Vs = 8;# in Volts
VR = 2;# in Volts
x = 2;
#calculation:
# receiving end voltage VR = Vs*e**(-nr)
#e**-nr = p
p = VR/Vs
#If the line is doubled in length, then
VR = Vs*(p)**2
#Results
print "\n\n Result \n\n"
print "\n Receiving end voltage If the line is doubled in length, VR is ",abs(VR)," V"
from __future__ import division
import math
import cmath
#initializing the variables:
rzoc = 800;# in ohm
thetazoc = -50;# in degrees
rzsc = 413;# in ohm
thetazsc = -20;# in degrees
f = 1500;# in Hz
#calculation:
#open circuit impedance
Zoc = rzoc*math.cos(thetazoc*math.pi/180) + 1j*rzoc*math.sin(thetazoc*math.pi/180)
#short circuit impedance
Zsc = rzsc*math.cos(thetazsc*math.pi/180) + 1j*rzsc*math.sin(thetazsc*math.pi/180)
#characteristic impedance Zo
Zo = (Zoc*Zsc)**0.5
#Results
print "\n\n Result \n\n"
print "characteristic impedance Zo is",round(abs(Zo)),"/_",round(cmath.phase(complex(Zo.real,Zo.imag))*180/math.pi,2),"deg ohm"
from __future__ import division
import math
import cmath
#initializing the variables:
R = 15;# in ohm/loop km
L = 0.0034;# in H/loop km
C = 10E-9;# in F/km
G = 3E-6;# in S/km
f = 2000;# in Hz
#calculation:
w = 2*math.pi*f
#characteristic impedance Zo
Zo = ((R + 1j*w*L)/(G + 1j*w*C))**0.5
#Results
print "\n\n Result \n\n"
print "characteristic impedance Zo is ",round(abs(Zo),0),"/_",round(cmath.phase(complex(Zo.real,Zo.imag))*180/math.pi,2),"deg ohm"
from __future__ import division
import math
import cmath
#initializing the variables:
L = 0.0005;# in H/loop km
C = 0.12E-6;# in F/km
f = 400000;# in Hz
#calculation:
w = 2*math.pi*f
#characteristic impedance Zo
Zo = (L/C)**0.5
#the propagation coefficient
r = 1j*w*(L*C)**0.5
#the attenuation coefficient
a = r.real
#the phaseshift coefficient
b = r.imag
#wavelength
Y = 2*math.pi/b
#velocity of propagation
u = f*Y
#Results
print "\n\n Result \n\n"
print "\n characteristic impedance Zo is ",abs(Zo),"ohm"
print "\n propagation coefficient is ",a," +(",round(b,2),")i"
print "\n wavelength Y is ",round(Y*1E3,0),"m"
print "\n speed of transmission ",round(u,2),"km/sec"
from __future__ import division
import math
import cmath
#initializing the variables:
R = 25;# in ohm/loop km
L = 0.005;# in H/loop km
C = 0.04E-6;# in F/km
G = 80E-6;# in S/km
f = 1000;# in Hz
#calculation:
w = 2*math.pi*f
#characteristic impedance Zo
Zo = ((R + 1j*w*L)/(G + 1j*w*C))**0.5
#the propagation coefficient
r = ((R + 1j*w*L)*(G + 1j*w*C))**0.5
#the attenuation coefficient
a = r.real
#the phaseshift coefficient
b = r.imag
#Results
print "\n\n Result \n\n"
print "characteristic impedance Zo is",round(abs(Zo),2),"/_",round(cmath.phase(complex(Zo.real,Zo.imag))*180/math.pi,2),"deg ohm"
print "\n propagation coefficient is ",round(abs(r),4),"/_",round(cmath.phase(complex(a,b))*180/math.pi,2),"deg"
print "\n attenuation coefficient is ",round(a,4)," Np/km"
print "\n the phase-shift coefficient ",round(b,4)," rad/km"
from __future__ import division
import math
import cmath
#initializing the variables:
R = 8;# in ohm/loop km
L = 0.003;# in H/loop km
C = 7500E-12;# in F/km
G = 0.25E-6;# in S/km
f = 1000;# in Hz
n = 300;# in km
Zg = 400 + 1j*0;# in ohm
Vg = 10;# in Volts
#calculation:
w = 2*math.pi*f
#characteristic impedance Zo
Zo = ((R + 1j*w*L)/(G + 1j*w*C))**0.5
#the propagation coefficient
r = ((R + 1j*w*L)*(G + 1j*w*C))**0.5
#the attenuation coefficient
a = r.real
#the phaseshift coefficient
b = r.imag
#the sending-end current,
Is = Vg/(Zg + Zo)
#the receiving-end current,
IR = Is*cmath.e**(-1*n*r)
#wavelength
Y = 2*math.pi/b
#velocity of propagation
u = f*Y
#Results
print "\n\n Result \n\n"
print "characteristic impedance Zo is",round(abs(Zo),1),"/_",round(cmath.phase(complex(Zo.real,Zo.imag))*180/math.pi,2),"deg ohm"
print "propagation coefficient is ",round(abs(r),5),"/_",round(cmath.phase(complex(r.real,r.imag))*180/math.pi,2),"deg"
print "attenuation coefficient is ",round(a,5)," Np/km and the phaseshift coefficient ",round(b,5)," rad/km"
print "sending-end current Is is ",round(abs(Is)*1E3,3),"/_",round(cmath.phase(complex(Is.real,Is.imag))*180/math.pi,2),"deg mA"
print "receiving-end current IR is",round(abs(IR)*1E3,3),"/_",round(cmath.phase(complex(IR.real,IR.imag))*180/math.pi,2),"deg mA"
print "wavelength Y is ",round(Y,1)," km"
print "speed of transmission ",round(u,1),"km/sec"
from __future__ import division
import math
import cmath
#initializing the variables:
R = 10;# in ohm/loop km
L = 0.0015;# in H/loop km
C = 0.06E-6;# in F/km
G = 1.2E-6;# in S/km
#calculation:
#the condition for minimum distortion is given by LG = CR, from which,
Lm = C*R/G
dL = Lm - L
#Results
print "\n\n Result \n\n"
print "\n inductance should be increased by ",round(dL*1E3,1),"mH/loop km for minimum distortion"
from __future__ import division
import math
import cmath
#initializing the variables:
R = 80;# in ohm/loop km
C = 5E-9;# in F/km
G = 2E-6;# in S/km
f = 1500;# in Hz
#calculation:
w = 2*math.pi*f
#the condition for minimum distortion is given by LG = CR, from which, inductance
L = C*R/G
#attenuation coefficient,
a = (R*G)**0.5
#phase shift coefficient,
b = w*(L*C)**0.5
#propagation coefficient,
r = a + 1j*b
#velocity of propagation,
u = 1/(L*C)**0.5
#wavelength
Y = u/f
#Results
print "\n\n Result \n\n"
print "\n inductance is ",round(L,2)," H"
print "\n propagation coefficient is ",round(a,2)," +(",round(b,2),")i"
print "\n speed of transmission ",round(u,2),"km/sec"
print "\n wavelength Y is ",round(Y,2)," km"
from __future__ import division
import math
import cmath
#initializing the variables:
Zo = 75;# in ohm
ZR = 250;# in ohm
VR = 10;# in Volts
#calculation:
#reflection coefficient
p = (Zo - ZR)/(Zo + ZR)
#Current flowing in the terminating load
IR = VR/ZR
#incident current, Ii
Ii = IR/(1 + p)
#incident voltage, Vi
Vi = Ii*Zo
#reflected current, Ir
Ir = IR - Ii
#reflected voltage, Vr
Vr = -1*Ir*Zo
#Results
print "\n\n Result \n\n"
print "\n reflection coefficient is ",round(p,3),""
print "\n incident current, Ii is ",round(Ii,4)," A"
print "\n incident voltage, Vi is ",round(Vi,2)," V"
print "\n reflected current, Ir is ",round(Ir,4)," A"
print "\n reflected voltage, Vr is ",round(Vr,2)," V"
from __future__ import division
import math
import cmath
#initializing the variables:
Zo = 500 - 1j*40;# in ohm
ZR1 = 500 + 1j*40;# in ohm
ZR2 = 600 + 1j*0;# in ohm
#calculation:
#reflection coefficient
p1 = (Zo - ZR1)/(Zo + ZR1)
p2 = (Zo - ZR2)/(Zo + ZR2)
p1mag = abs(p1)
p2mag = abs(p2)
#Results
print "\n\n Result \n\n"
print "\n reflection coefficient (a)",p1mag," and (b)", round(p2mag,2),""
#(b) the incident voltage
from __future__ import division
import math
import cmath
#initializing the variables:
rzo = 500;# in ohm
thetazo = 0;# in degrees
ZR = 320 + 1j*240;# in ohm
rvr = 20;# in volts
thetavr = 35;# in degrees
#calculation:
#voltage
VR = rvr*math.cos(thetavr*math.pi/180) + 1j*rvr*math.sin(thetavr*math.pi/180)
#characteristic impedance
Zo = rzo*math.cos(thetazo*math.pi/180) + 1j*rzo*math.sin(thetazo*math.pi/180)
#the ratio of the reflected to the incident voltage
#vr = VR/Vi
vr = (ZR - Zo)/(Zo + ZR)
vrmag = abs(vr)
#incident voltage, Vi
Vi = VR/vr
#Results
print "\n\n Result \n\n"
print "\n the magnitude of the ratio Vr : Vi is ",round(vrmag,3),""
print "\n incident voltage, Vi is ",round(abs(Vi),1),"/_",round(cmath.phase(complex(Vi.real,Vi.imag))*180/math.pi,2),"deg V"
from __future__ import division
import math
import cmath
#initializing the variables:
rzo = 600;# in ohm
thetazo = 0;# in degrees
ZR = 400 + 250j;# in ohm
#calculation:
#characteristic impedance
Zo = rzo*math.cos(thetazo*math.pi/180) + 1j*rzo*math.sin(thetazo*math.pi/180)
#reflection coefficient
p = (Zo - ZR)/(Zo + ZR)
pmag = abs(p)
#standing-wave ratio,
s = (1 + pmag)/(1 - pmag)
#Results
print "\n\n Result \n\n"
print "\n reflection coefficient, is ",round(abs(p),4),"/_",round(cmath.phase(complex(p.real,p.imag))*180/math.pi,2),"deg"
print "\n standing-wave ratio, s is ",round(s,3),""
from __future__ import division
import math
import cmath
#initializing the variables:
rp = 0.2;
thetap = -120;# in degrees
Zo = 80;# in ohm
Ir = 0.01;# in Amperes
#calculation:
#reflection coefficient
p = rp*math.cos(thetap*math.pi/180) + 1j*rp*math.sin(thetap*math.pi/180)
#standing-wave ratio,
s = (1 + rp)/(1 - rp)
#load impedance ZR
ZR = Zo*(1 - p)/(1 + p)
#incident current
Ii = Ir*(s + 1)/(s - 1)
#Results
print "\n\n Result \n\n"
print "\n standing-wave ratio, s is ",s,""
print "\n load impedance ZR is ",round(ZR.real,2)," +(",round(ZR.imag,1),")i ohm"
print "\n incident current is ",Ii," A"
from __future__ import division
import math
import cmath
#initializing the variables:
s = 1.6;
Pi = 0.2;# in Watts
#calculation:
#reflected power, Pr
Pr = Pi*((s - 1)/(s + 1))**2
#Results
print "\n\n Result \n\n"
print "\n reflected power, Pr is ",round(Pr*1E3,2)," mW"