import math
#initialisation of variables
V=230.0
P=1000.0
R=V**2/P
#Calculations
a=math.pi/4
V_or1=(math.sqrt(2)*V/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a)+.5*math.sin(2*a))
P1=V_or1**2/R
a=math.pi/2
V_or2=(math.sqrt(2)*V/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a)+.5*math.sin(2*a))
P2=V_or2**2/R
#Results
print("when firing angle delay is of 45deg")
print("power absorbed=%.2f W" %P1)
print("when firing angle delay is of 90deg")
print("power absorbed=%.2f W" %P2)
import math
#initialisation of variables
V=230.0
E=150.0
R=8.0
#Calculations
th1=math.sin(math.radians(E/(math.sqrt(2)*V)))
I_o=(1/(2*math.pi*R))*(2*math.sqrt(2)*230*math.cos(math.radians(th1))-E*(math.pi-2*th1*math.pi/180))
P=E*I_o
I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*(math.pi-2*th1*math.pi/180)+V**2*math.sin(math.radians(2*th1))-4*math.sqrt(2)*V*E*math.cos(math.radians(th1))))
P_r=I_or**2*R
pf=(P+P_r)/(V*I_or)
#Results
print("avg charging curent=%.4f A" %I_o)
print("power supplied to the battery=%.2f W" %P)
print("power dissipated by the resistor=%.3f W" %P_r)
print("supply pf=%.3f" %pf)
import math
#initialisation of variables
V=230.0
E=150.0
R=8.0
a=35.0
#Calculations
th1=math.degrees(math.asin(E/(math.sqrt(2)*V)))
th2=180-th1
I_o=(1/(2*math.pi*R))*(math.sqrt(2)*230*(math.cos(math.radians(a))-math.cos(math.radians(th2)))-E*((th2-a)*math.pi/180))
P=E*I_o
I_or=math.sqrt((1/(2*math.pi*R**2))*((V**2+E**2)*((th2-a)*math.pi/180)-(V**2/2)*(math.sin(math.radians(2*th2))-math.sin(math.radians(2*a)))-2*math.sqrt(2)*V*E*(math.cos(math.radians(a))-math.cos(math.radians(th2)))))
P_r=I_or**2*R
pf=(P+P_r)/(V*I_or)
#Results
print("avg charging curent=%.4f A" %I_o)
print("power supplied to the battery=%.2f W" %P)
print("power dissipated by the resistor=%.2f W" %P_r)
print("supply pf=%.4f" %pf)
#Answers have small variations from that in the book due to difference in the rounding off of digits.
import math
#initialisation of variables
B=210
f=50.0 #Hz
w=2*math.pi*f
a=40.0 #firing angle
V=230.0
R=5.0
L=2*10**-3
#Calculations
t_c1=(360-B)*math.pi/(180*w)
V_o1=(math.sqrt(2)*230/(2*math.pi))*(math.cos(math.radians(a))-math.cos(math.radians(B)))
I_o1=V_o1/R
E=110
R=5
L=2*10**-3
th1=math.degrees(math.asin(E/(math.sqrt(2)*V)))
t_c2=(360-B+th1)*math.pi/(180*w)
V_o2=(math.sqrt(2)*230/(2*math.pi))*(math.cos(math.radians(a))-math.cos(math.radians(B)))
I_o2=(1/(2*math.pi*R))*(math.sqrt(2)*230*(math.cos(math.radians(a))-math.cos(math.radians(B)))-E*((B-a)*math.pi/180))
V_o2=R*I_o2+E
#Results
print("for R=5ohm and L=2mH")
print("ckt turn off time=%.3f msec" %(t_c1*1000))
print("avg output voltage=%.3f V" %V_o1)
print("avg output current=%.4f A" %I_o1)
print("for R=5ohm % L=2mH and E=110V")
print("ckt turn off time=%.3f msec" %(t_c2*1000))
print("avg output current=%.4f A" %I_o2)
print("avg output voltage=%.3f V" %V_o2)
import math
#initialisation of variables
V_s=230.0
f=50.0
R=10.0
a=60.0
#Calculations
V_m=(math.sqrt(2)*V_s)
V_o=V_m/(2*math.pi)*(1+math.cos(math.radians(a)))
I_o=V_o/R
V_or=(V_m/(2*math.sqrt(math.pi)))*math.sqrt((math.pi-a*math.pi/180)+.5*math.sin(math.radians(2*a)))
I_or=V_or/R
P_dc=V_o*I_o
P_ac=V_or*I_or
RE=P_dc/P_ac
FF=V_or/V_o
VRF=math.sqrt(FF**2-1)
TUF=P_dc/(V_s*I_or)
PIV=V_m
#Results
print("rectification efficiency=%.4f" %RE)
print("form factor=%.3f" %FF)
print("voltage ripple factor=%.4f" %VRF)
print("t/f utilisation factor=%.4f" %TUF)
print("PIV of thyristor=%.2f V" %PIV)
import math
#initialisation of variables
V=1000.0
fos=2.5 #factor of safety
I_TAV=40.0
#Calculations
V_m1=V/(2*fos)
P1=(2*V_m1/math.pi)*I_TAV
V_m2=V/(fos)
P2=(2*V_m2/math.pi)*I_TAV
#Results
print("for mid pt convertor")
print("power handled=%.3f kW" %(P1/1000))
print("for bridge convertor")
print("power handled=%.3f kW" %(P2/1000))
import math
#initialisation of variables
V_s=230.0
V_m=math.sqrt(2)*V_s
R=.4
I_o=10
I_or=I_o
E=120.0
#Calculations
a1=math.degrees(math.acos((E+I_o*R)*math.pi/(2*V_m)))
pf1=(E*I_o+I_or**2*R)/(V_s*I_or)
E=-120.0
a2=math.degrees(math.acos((E+I_o*R)*math.pi/(2*V_m)))
pf2=(-E*I_o-I_or**2*R)/(V_s*I_or)
#Results
print("firing angle delay=%.2f deg" %a1)
print("pf=%.4f" %pf1)
print("firing angle delay=%.2f deg" %a2)
print("pf=%.4f" %pf2)
import math
#initialisation of variables
V_s=230.0
f=50.0
a=45.0
R=5.0
E=100.0
#Calculations
V_o=((math.sqrt(2)*V_s)/(2*math.pi))*(3+math.cos(math.radians(a)))
I_o=(V_o-E)/R
P=E*I_o
#Results
print("avg o/p current=%.3f A" %I_o)
print("power delivered to battery=%.4f kW" %(P/1000))
import math
#initialisation of variablesV_s=230
f=50.0
a=50.0
R=6.0
E=60.0
V_o1=((math.sqrt(2)*2*V_s)/(math.pi))*math.cos(math.radians(a))
I_o1=(V_o1-E)/R
#ATQ after applying the conditions
V_o2=((math.sqrt(2)*V_s)/(math.pi))*math.cos(math.radians(a))
I_o2=(V_o2-E)/R
print("avg o/p current=%.3f A" %I_o1)
print("avg o/p current after change=%.2f A" %I_o2)
import math
#initialisation of variables
V_s=230.0
V_m=math.sqrt(2)*V_s
a=45.0
R=10.0
#Calculations
V_o=(2*V_m/math.pi)*math.cos(math.radians(a))
I_o=V_o/R
V_or=V_m/math.sqrt(2)
I_or=I_o
P_dc=V_o*I_o
P_ac=V_or*I_or
RE=P_dc/P_ac
FF=V_or/V_o
VRF=math.sqrt(FF**2-1)
I_s1=2*math.sqrt(2)*I_o/math.pi
DF=math.cos(math.radians(a))
CDF=.90032
pf=CDF*DF
HF=math.sqrt((1/CDF**2)-1)
Q=2*V_m*I_o*math.sin(math.radians(a))/math.pi
#Results
print("rectification efficiency=%.4f" %RE)
print("form factor=%.4f" %FF)
print("voltage ripple factor=%.4f" %VRF)
print("pf=%.5f" %pf)
print("HF=%.5f" %HF)
print("active power=%.2f W" %P_dc)
print("reactive power=%.3f Var" %Q)
import math
#initialisation of variables
V_s=230.0
V_m=math.sqrt(2)*V_s
a=45.0
R=10.0
#Calculations
V_o=(V_m/math.pi)*(1+math.cos(math.radians(a)))
I_o=V_o/R
V_or=V_s*math.sqrt((1/math.pi)*((math.pi-a*math.pi/180)+math.sin(math.radians(2*a))/2))
I_or=I_o
P_dc=V_o*I_o
P_ac=V_or*I_or
RE=P_dc/P_ac
FF=V_or/V_o
VRF=math.sqrt(FF**2-1)
I_s1=2*math.sqrt(2)*I_o*math.cos(math.radians(a/2))/math.pi
DF=math.cos(math.radians(a/2))
CDF=2*math.sqrt(2)*math.cos(math.radians(a/2))/math.sqrt(math.pi*(math.pi-a*math.pi/180))
pf=CDF*DF
HF=math.sqrt((1/CDF**2)-1)
Q=V_m*I_o*math.sin(math.radians(a))/math.pi
#Results
print("form factor=%.3f" %FF)
print("rectification efficiency=%.4f" %RE)
print("voltage ripple factor=%.3f" %VRF)
print("DF=%.4f" %DF)
print("CDF=%.4f" %CDF)
print("pf=%.4f" %pf)
print("HF=%.4f" %HF)
print("active power=%.3f W" %P_dc)
print("reactive power=%.2f Var" %Q)
#Answers have small variations from that in the book due to difference in the rounding off of digits.
import math
#initialisation of variables
V_s=230.0
R=10.0
#Calculations
V_ml=math.sqrt(2)*V_s
V_om=3*V_ml/(2*math.pi)
V_o=V_om/2
th=30
a=math.degrees(math.acos((2*math.pi*math.sqrt(3)*V_o/(3*V_ml)-1)))-th
I_o=V_o/R
V_or=V_ml/(2*math.sqrt(math.pi))*math.sqrt((5*math.pi/6-a*math.pi/180)+.5*math.sin(math.radians(2*a+2*th)))
I_or=V_or/R
RE=V_o*I_o/(V_or*I_or)
#Results
print("delay angle=%.1f deg" %a)
print("avg load current=%.3f A" %I_o)
print("rms load current=%.3f A" %I_or)
print("rectification efficiency=%.4f" %RE)
import math
#initialisation of variables
V=400.0
V_ml=math.sqrt(2)*V
v_T=1.4
a1=30.0
#Calculations
V_o1=3*V_ml/(2*math.pi)*math.cos(math.radians(a1))-v_T
a2=60.0
V_o2=3*V_ml/(2*math.pi)*math.cos(math.radians(a2))-v_T
I_o=36
I_TA=I_o/3
I_Tr=I_o/math.sqrt(3)
P=I_TA*v_T
#Results
print("for firing angle = 30deg")
print("avg output voltage=%.3f V" %V_o1)
print("for firing angle = 60deg")
print("avg output voltage=%.2f V" %V_o2)
print("avg current rating=%.0f A" %I_TA)
print("rms current rating=%.3f A" %I_Tr)
print("PIV of SCR=%.1f V" %V_ml)
print("power dissipated=%.1f W" %P)
import math
#initialisation of variables
E=200
I_o=20
R=.5
#Calculations
V_o1=E+I_o*R
V_s=230
V_ml=math.sqrt(2)*V_s
a1=math.degrees(math.acos(V_o1*math.pi/(3*V_ml)))
th=120
I_s=math.sqrt((1/math.pi)*I_o**2*th*math.pi/180)
P=E*I_o+I_o**2*R
pf=P/(math.sqrt(3)*V_s*I_s)
V_o2=E-I_o*R
a2=math.degrees(math.acos(-V_o2*math.pi/(3*V_ml)))
#Results
print("firing angle delay=%.3f deg" %a1)
print("pf=%.3f" %pf)
print("firing angle delay=%.2f deg" %a2)
import math
#initialisation of variables
V=230.0
f=50.0
#Calculations
w=2*math.pi*f
a1=0
t_c1=(4*math.pi/3-a1*math.pi/180)/w
a2=30
t_c2=(4*math.pi/3-a2*math.pi/180)/w
#Results
print("for firing angle delay=0deg")
print("commutation time=%.2f ms" %(t_c1*1000))
print("peak reverse voltage=%.2f V" %(math.sqrt(2)*V))
print("for firing angle delay=30deg")
print("commutation time=%.2f ms" %(t_c2*1000))
print("peak reverse voltage=%.2f V" %(math.sqrt(2)*V))
import math
#initialisation of variables
a=30.0
R=10.0
P=5000.0
#Calculations
V_s=math.sqrt(P*R*2*math.pi/(2*3)/(math.pi/3+math.sqrt(3)*math.cos(math.radians(2*a))/2))
V_ph=V_s/math.sqrt(3)
I_or=math.sqrt(P*R)
V_s=I_or*math.pi/(math.sqrt(2)*3*math.cos(math.radians(a)))
V_ph=V_s/math.sqrt(3)
#Results
print("per phase voltage percent V_ph=%.3f V" %V_ph)
print("for constant load current")
print("V_ph=%.2f V" %V_ph)
import math
#initialisation of variables
a=30.0
R=10.0
P=5000.0
#Calculations
V_s=math.sqrt(P*R*4*math.pi/(2*3)/(2*math.pi/3+math.sqrt(3)*(1+math.cos(math.radians(2*a)))/2))
V_ph=V_s/math.sqrt(3)
I_or=math.sqrt(P*R)
V_s=I_or*2*math.pi/(math.sqrt(2)*3*(1+math.cos(math.radians(a))))
V_ph=V_s/math.sqrt(3)
#Results
print("per phase voltage percent V_ph=%.3f V" %V_ph)
print("for constant load current")
print("V_ph=%.2f V" %V_ph)
import math
#initialisation of variables
a=90.0
R=10.0
P=5000.0
#Calculations
V_s=math.sqrt(P*R*4*math.pi/(2*3)/((math.pi-math.pi/2)+(math.sin(math.radians(2*a)))/2))
V_ph=V_s/math.sqrt(3)
I_or=math.sqrt(P*R)
V_s=I_or*2*math.pi/(math.sqrt(2)*3*(1+math.cos(math.radians(a))))
V_ph=V_s/math.sqrt(3)
#Results
print("per phase voltage percent V_ph=%.2f V" %V_ph)
print("for constant load current")
print("V_ph=%.1f V" %V_ph)
import math
#initialisation of variables
E=200.0
I_o=20.0
R=.5
#Calculations
V_o=E+I_o*R
V_s=230
V_ml=math.sqrt(2)*V_s
a=math.degrees(math.acos(V_o*2*math.pi/(3*V_ml)-1))
a1=180-a
I_sr=math.sqrt((1/math.pi)*I_o**2*(a1*math.pi/180))
P=V_o*I_o
pf=P/(math.sqrt(3)*V_s*I_sr)
#Results
print("firing angle delay=%.2f deg" %a)
print("pf=%.2f" %pf)
import math
#initialisation of variables
V_s=400.0
f=50.0
I_o=15.0
a=45.0
#Calculations
I_TA=I_o*120.0/360.0
I_Tr=math.sqrt(I_o**2*120/360)
I_sr=math.sqrt(I_o**2*120/180)
V_ml=math.sqrt(2)*V_s
V_o=3*V_ml*math.cos(math.radians(a))/math.pi
V_or=V_ml*math.sqrt((3/(2*math.pi))*(math.pi/3+math.sqrt(3/2)*math.cos(math.radians(2*a))))
I_or=I_o
P_dc=V_o*I_o
P_ac=V_or*I_or
RE=P_dc/P_ac
VA=3*V_s/math.sqrt(3)*I_sr
TUF=P_dc/VA
pf=P_ac/VA
#Results
print("rectification efficiency=%.5f" %RE)
print("TUF=%.4f" %TUF)
print("Input pf=%.3f" %pf)
import math
#initialisation of variables
I=10.0
a=45.0
V=400.0
f=50.0
#Calculations
DF=math.cos(math.radians(a))
I_o=10
I_s1=4*I_o/(math.sqrt(2)*math.pi)*math.sin(math.pi/3)
I_sr=I_o*math.sqrt(2.0/3.0)
I_o=1 #suppose
CDF=I_s1/I_sr
THD=math.sqrt(1/CDF**2-1)
pf=CDF*DF
P=(3*math.sqrt(2)*V*math.cos(math.radians(a))/math.pi)*I
Q=(3*math.sqrt(2)*V*math.sin(math.radians(a))/math.pi)*I
#Results
print("DF=%.3f" %DF)
print("CDF=%.3f" %CDF)
print("THD=%.5f" %THD)
print("PF=%.4f" %pf)
print("active power=%.2f W" %P)
print("reactive power=%.2f Var" %Q)
import math
#initialisation of variables
print("for firing angle=30deg")
a=30.0
V=400.0
V_ml=math.sqrt(2)*V
V_o=3*V_ml*math.cos(math.radians(a))/math.pi
E=350
R=10
#Calculations
I_o=(V_o-E)/R
I_or=I_o
P1=V_o*I_o
I_sr=I_o*math.sqrt(2.0/3.0)
VA=3*V/math.sqrt(3)*I_sr
pf=P1/VA
a=180-60
V=400
V_ml=math.sqrt(2)*V
V_o=3*V_ml*math.cos(math.radians(a))/math.pi
E=-350
R=10
I_o=(V_o-E)/R
I_or=I_o
P2=-V_o*I_o
I_sr=I_o*math.sqrt(2.0/3.0)
VA=3*V/math.sqrt(3)*I_sr
pf=P2/VA
print("power delivered to load=%.2f W" %P1)
print("pf=%.4f" %pf)
print("for firing advance angle=60deg")
print("power delivered to load=%.2f W" %P2)
print("pf=%.4f" %pf)
#Answers have small variations from that in the book due to difference in the rounding off of digits.
import math
#initialisation of variables
a=0
u=15.0
#Calculations
i=math.cos(math.radians(a))-math.cos(math.radians(a+u))
a=30
u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a
a=45
u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a
a=60
u=math.degrees(math.acos(math.cos(math.radians(a))-i))-a
#Results
print("for firing angle=30deg")
print("overlap angle=%.1f deg" %u)
print("for firing angle=45deg")
print("overlap angle=%.1f deg" %u)
print("for firing angle=60deg")
print("overlap angle=%.2f deg" %u)
import math
#initialisation of variables
E=400.0
I_o=20.0
R=1
#Calculations
V_o=E+I_o*R
f=50.0
w=2*math.pi*f
L=.004
V=230 #per phase voltage
V_ml=math.sqrt(6)*V
a=math.degrees(math.acos(math.pi/(3*V_ml)*(V_o+3*w*L*I_o/math.pi)))
print("firing angle delay=%.3f deg" %a)
u=math.degrees(math.acos(math.pi/(3*V_ml)*(V_o-3*w*L*I_o/math.pi)))-a
#Results
print("overlap angle=%.2f deg" %u)
#Answers have small variations from that in the book due to difference in the rounding off of digits.
import math
#initialisation of variables
V=400.0
f=50.0
w=2*math.pi*f
R=1
E=230
I=15.0
#Calculations
V_o=-E+I*R
V_ml=math.sqrt(2)*V
a=math.degrees(math.acos(V_o*2*math.pi/(3*V_ml)))
L=0.004
a=math.degrees(math.acos((2*math.pi)/(3*V_ml)*(V_o+3*w*L*I/(2*math.pi))))
u=math.degrees(math.acos(math.cos(math.radians(a))-3*f*L*I/V_ml))-a
#Results
print("firing angle=%.3f deg" %a)
print("firing angle delay=%.3f deg" %a)
print("overlap angle=%.3f deg" %u)
#Answers have small variations from that in the book due to difference in the rounding off of digits.
import math
#initialisation of variables
V=230.0 #per phase
f=50.0
#Calculations
V_ml=math.sqrt(3.0)*math.sqrt(2)*V
w=2*math.pi*f
a1=60.0
L=0.015
i_cp=(math.sqrt(3)*V_ml/(w*L))*(1-math.sin(math.radians(a1)))
#Results
print("circulating current=%.4f A" %i_cp)
import math
#initialisation of variables
V=230.0
V_m=math.sqrt(2)*V
a=30.0
#Calculations
V_o=2*V_m* math.cos(math.radians(a))/math.pi
R=10
I_o=V_o/R
I_TA=I_o*math.pi/(2*math.pi)
I_Tr=math.sqrt(I_o**2*math.pi/(2*math.pi))
I_s=math.sqrt(I_o**2*math.pi/(math.pi))
I_o=I_s
pf=(V_o*I_o/(V*I_s))
#Results
print("avg o/p voltage=%.3f V" %V_o)
print("avg o/p current=%.2f A" %I_o)
print("avg value of thyristor current=%.3f A" %I_TA)
print("rms value of thyristor current=%.2f A" %I_Tr)
print("pf=%.4f" %pf)
#Answers have small variations from that in the book due to difference in the rounding off of digits.
import math
#initialisation of variables
V=230.0
V_m=math.sqrt(2)*V
a=30.0
L=.0015
#Calculations
V_o=2*V_m* math.cos(math.radians(a))/math.pi
R=10
I_o=V_o/R
f=50
w=2*math.pi*f
V_ox=2*V_m*math.cos(math.radians(a))/math.pi-w*L*I_o/math.pi
u=math.degrees(math.acos(math.cos(math.radians(a))-I_o*w*L/V_m))-a
I=I_o
pf=V_o*I_o/(V*I)
#Results
print("avg o/p voltage=%.3f V" %V_ox)
print("angle of overlap=%.3f deg" %u)
print("pf=%.4f" %pf)
#Answers have small variations from that in the book due to difference in the rounding off of digits.
import math
#initialisation of variables
V=415.0
V_ml=math.sqrt(2)*V
a1=35.0 #firing angle advance
#Calculations
a=180-a1
I_o=80.0
r_s=0.04
v_T=1.5
X_l=.25 #reactance=w*L
E=-3*V_ml*math.cos(math.radians(a))/math.pi+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi
#Results
print("mean generator voltage=%.3f V" %E)
import math
#initialisation of variables
V=415.0
V_ml=math.sqrt(2)*V
R=0.2
I_o=80
r_s=0.04
v_T=1.5
#Calculations
X_l=.25 #reactance=w*L
a=35
E=-(-3*V_ml*math.cos(math.radians(a))/math.pi+I_o*R+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi)
a1=35
a=180-a1
E=(-3*V_ml*math.cos(math.radians(a))/math.pi+I_o*R+2*I_o*r_s+2*v_T+3*X_l*I_o/math.pi)
#Results
print("when firing angle=35deg")
print("mean generator voltage=%.3f V" %E)
print("when firing angle advance=35deg")
print("mean generator voltage=%.3f V" %E)
import math
#initialisation of variables
R=5.0
V=230.0
#Calculations
V_mp=math.sqrt(2)*V
a=30.0
E=150.0
B=180-math.degrees(math.asin(E/V_mp))
I_o=(3/(2*math.pi*R))*(V_mp*(math.cos(math.radians(a+30))-math.cos(math.radians(B)))-E*((B-a-30)*math.pi/180))
#Results
print("avg current flowing=%.2f A" %I_o)
import math
#initialisation of variables
a=30.0
V=230.0
#Calculations
V_m=math.sqrt(2)*V
V_o=V_m*(1+math.cos(math.radians(a)))/math.pi
E=100
R=10
I_o=(V_o-E)/R
I_TA=I_o*math.pi/(2*math.pi)
I_Tr=math.sqrt(I_o**2*math.pi/(2*math.pi))
I_s=math.sqrt(I_o**2*(1-a/180)*math.pi/(math.pi))
I_or=I_o
P=E*I_o+I_or**2*R
pf=(P/(V*I_s))
f=50
w=2*math.pi*f
t_c=(1-a/180)*math.pi/w
#Results
print("\navg o/p current=%.2f A" %I_o)
print("avg o/p voltage=%.3f V" %V_o)
print("avg value of thyristor current=%.2f A" %I_TA)
print("rms value of thyristor current=%.3f A" %I_Tr)
print("avg value of diode current=%.2f A" %I_TA)
print("rms value of diode current=%.3f A" %I_Tr)
print("pf=%.4f" %pf)
print("circuit turn off time=%.2f ms" %(t_c*1000))
import math
#initialisation of variables
V=230.0
V_m=math.sqrt(2)*V
L=0.05
f=50.0
#Calculations
w=2*math.pi*f
a=30
i_cp=2*V_m*(1-math.cos(math.radians(a)))/(w*L)
R=30.0
i_l=V_m/R
i1=i_cp+i_l
i2=i_cp
#Results
print("peak value of circulating current=%.3f A" %i_cp)
print("peak value of current in convertor 1=%.3f A" %i1)
print("peak value of current in convertor 2=%.3f A" %i2)
import math
#initialisation of variables
f=50.0
w=2*math.pi*f
R=5.0
L=0.05
#Calculations
phi=math.degrees(math.atan(w*L/R))
phi=90+math.degrees(math.atan(w*L/R))
#Results
print("for no current transients")
print("triggering angle=%.2f deg" %phi)
print("for worst transients")
print("triggering angle=%.2f deg" %phi)