import math
#initialisation of variables
V_s=230.0
V_m=math.sqrt(2)*V_s
R=10.0
a=30.0
#Calculations
V_or=(V_m/math.sqrt(2))*math.sqrt((1/math.pi)*(math.pi-a*math.pi/180+math.sin(math.radians(2*a))/2))
I_or=V_or/R
I_s=I_or
pf=(I_or**2*R)/(V_s*I_s)
#Results
print("rms value of o/p current=%.2f A" %I_or)
print("rms value of o/p current for each convertor=%.2f A" %(I_or/math.sqrt(2)))
print("rms value of o/p current for each thyristor=%.3f A" %(I_or/2))
print("i/p pf=%.4f" %pf)
import math
#initialisation of variables
V_s=400.0
V_ph=V_s/2
a=160.0
#Calculations
r=math.cos(math.radians(180-a))
m=3
V_or=r*(V_ph*(m/math.pi)*math.sin(math.pi/m))
R=2
X_L=1.5
th=math.degrees(math.atan(X_L/R))
Z=math.sqrt(R**2+X_L**2)
I_or=V_or/Z
P=I_or**2*R
#Results
print("rms o/p voltage=%.3f V" %V_or)
print("rms o/p current=%.2f A" %I_or)
print("phase angle of o/p current=%.2f deg" %-th)
print("o/p power=%.2f W" %P)
import math
#initialisation of variables
V_s=400.0
V_ph=V_s/2
V_l=V_ph*math.sqrt(3)
a=160.0
#Calculations
r=math.cos(math.radians(180-a))
m=6
V_or=r*(V_l*(m/math.pi)*math.sin(math.pi/m))
R=2
X_L=1.5
th=math.degrees(math.atan(X_L/R))
Z=math.sqrt(R**2+X_L**2)
I_or=V_or/Z
P=I_or**2*R
#Results
print("rms o/p voltage=%.2f V" %V_or)
print("rms o/p current=%.2f A" %I_or)
print("phase angle of o/p current=%.2f deg" %-th)
print("o/p power=%.2f W" %P)
import math
#initialisation of variables
V_l=400.0
V_ml=math.sqrt(2)*V_l
m=6
f=50.0
w=2*math.pi*f
L=.0012
I=40.0
#Calculations
V_or1=(V_ml*(m/math.pi)*math.sin(math.pi/m))*math.cos(math.radians(a))
V_omx1=V_or1-3*w*L*I/math.pi
V_rms1=V_omx1/math.sqrt(2)
a2=30.0
V_or2=(V_ml*(m/math.pi)*math.sin(math.pi/m))*math.cos(math.radians(a))
V_omx2=V_or2-3*w*L*I/math.pi
V_rms2=V_omx2/math.sqrt(2)
#Results
print("for firing angle=0deg")
a1=0
print("rms value of load voltage=%.2f V" %V_rms2)
print("for firing angle=30deg")
print("rms value of load voltage=%.2f V" %V_rms2)