import math
#initialisation of variables
If=4000.0 # fault current
I=5*1.25 # operating current of relay
#Calculations
CT=400.0/5 # CT ratio
PSM=If/(I*CT) # plug setting multiplier
#Results
print("PSM =%.2f" %PSM)
print("operating time for PSM=8 is 3.2sec.")
print("actual operating time = 1.92 sec.")
import math
#initialisation of variables
Z=1000.0*complex(math.cos(math.radians(60)),math.sin(math.radians(60))) #impedence
X=math.cos(math.radians(50))*1000*math.cos(math.radians(60))
Xl=1000.0*math.cos(math.radians(60))
Xc=Xl-X
#Calculations
C=1000000.0/(314.0*Xc)
#Results
#Answers don't match due to difference in rounding off of digits
print("X= %.2f" %X)
print("Xc= %.2f" %Xc)
print("C(micro farads)= %.2f" %C)
import math
#initialisation of variables
Isec1=4000.0/40# secondary current(amps)
PSM=100.0/5# PSM if 100% setting is used
Isec2=4000.0/40
PSM2=100.0/6.25#PSM if setting used is 125%
TMSb=0.72/2.5
#Calculations
PSM1=5000.0/(6.25*40)
to=2.2
tb=to*TMSb
PSMa=5000/(6.25*80)
TMS=1.138/3
PSMa1=6000/(6.25*80)
ta=(2.6*.379)
#Results
print("Actual operating time of realy at b=%.3f sec" %tb)
print("Actual operating time of realy at a=%.3f sec " %ta)
import math
#initialisation of variables
Vph=6600/(math.sqrt(3))
Ifull=5000/(math.sqrt(3)*6.6)
#Calculations
Ib=Ifull*.25
x=Ib*800.0/Vph
#Results
print("Percent of the winding remains unprotected = %.2f " %x)
import math
#initialisation of variables
Iph=10000.0/math.sqrt(3) # phase voltage of alternator(V)
x=1.8*100*10*1000.0/(5*Iph)
#Calculations
print("(i) percent winding which remains unprotected=%.2f " %x)
Ip=Iph*.2
R=1.8*1000.0/(5*Ip)
#Results
print("(ii)minimum value of earthing resistance required to protect 80 percent of winding =%.4f ohms" %R)
import math
#initialisation of variables
Ic=360-320 # the difference current (amp)
Io=40*5/400.0
#Calculations
Avg=(360+320)/2 # average sum of two currents
Iavg=340*5/400.0
Ioc=.1*Iavg +0.2
#Results
print("operating current=%.3f amp. " %Ioc)
print("since current through operating coil is %.3f amp. " %Io)
print("therefore Relay will not operate ")
import math
#initialisation of variables
Il=400*6.6/33.0 # line current on star side of PT(amps)
#Calculations
Ic=5/math.sqrt(3.0) # current in CT secondary
#Results
print(" The CT ratio on HT will be %d : %.3f" %(Il,Ic))
import math
#initialisation of variables
Il=10000.0/((math.sqrt(3.0))*132)
ILV=10000/((math.sqrt(3.0))*6.6)
#Calculations
a=5.0/math.sqrt(3.0)
#Results
print("Ratio of CT on LV side is %.3f : %.3f" %(ILV,a))
print("Ratio of CT on HT side is %.3f : %d" %(Il,5))
import math
#initialisation of variables
Vs=110.0
I=1.0
#Calculations
R2=Vs/(complex(3, -math.sqrt(3))*I)
c=abs(R2)
print("R2=%.2f ohms" %c)
R1=2*c
d=abs(R1)
C=(10**6)/(0.866*d*314)
print("R1=%.2f ohms " %R1)
print("C=%.1f micro farads " %C)
Vt=d*complex(-0.5,-0.866) + complex(c,-55 )
#Results
print(" Voltage across the terminals of the relay will be (V)= {0:.5f}+{1:.5f}i" .format(Vt.real, Vt.imag))
import math
#initialisation of variables
Ic=5*0.25 # operating current(amp)
Vsec=5.0/1.25 # secondary voltage(V)
Bm=1.4
f=50
N=50
#Calculations
V=15*Vsec
A=60/(4.44*Bm*f*N)
#Results
print("The knee point must be slightly higher than =%.3f V " %V)
print("Area of cross section=%.6f m_2 " %A)
import math
#initialisation of variables
#Calculations
o_p=5*5*(.1+.1) +5
#Results
print(" VA output of CT =%.0f VA\n " %o_p)