import math
#initialisation of variables
V_s=250.0
R_l=5.0
I_l=20.0
V_l1=math.sqrt(V_s**2-(R_l*I_l)**2)
reg1=(V_s-V_l1)/V_s*100
pf1=1.0
#Calculations
P_l1=V_l1*I_l*pf1 #load power
P_r1=V_s*I_l*pf1 #max powwible system rating
utf1=P_l1*100/P_r1
pf2=0.5
#(.5*V_l)**2+(.866*V_l+R_l*I_l)**2=V_s**2
#after solving
V_l2=158.35
reg2=(V_s-V_l2)/V_s*100
P_l2=V_l2*I_l*pf2 #load power
P_r2=V_s*I_l #max powwible system rating
utf2=P_l2*100/P_r2
#Results
print("for pf=1")
print("load voltage=%.2f V" %V_l1)
print("voltage regulation=%.2f" %reg1)
print("system utilisation factor=%.3f" %utf1)
print("energy consumed(in units)=%.1f" %(P_l1/1000))
print("for pf=.5")
print("load voltage=%.2f V" %V_l2)
print("voltage regulation=%.2f" %reg2)
print("system utilisation factor=%.3f" %utf2)
print("energy consumed(in units)=%.2f" %(P_l2/1000))
import math
#initialisation of variables
f=50.0
V_s=230.0
I_m1=2
pf1=.3
#Calculations
I_c1=I_m1*math.sin(math.radians(math.degrees(math.acos(pf1))))
C1=I_c1/(2*math.pi*f*V_s)
I_m2=5
pf2=.5
I_c2=I_m2*math.sin(math.radians(math.degrees(math.acos(pf2))))
C2=I_c2/(2*math.pi*f*V_s)
I_m3=10
pf3=.7
I_c3=I_m3*math.sin(math.radians(math.degrees(math.acos(pf3))))
C3=I_c3/(2*math.pi*f*V_s)
#Results
print("at no load")
print("value of capacitance=%.3f uF" %(C1*10**6))
print("at half full load")
print("value of capacitance=%.3f uF" %(C2*10**6))
print("at full load")
print("value of capacitance=%.3f uF" %(C3*10**6))
import math
#initialisation of variables
I_c=10.0
f=50.0
V_s=230.0
#Calculations
C=I_c/(2*math.pi*f*V_s)
I_l=10
L=V_s/(2*math.pi*f*I_l)
#Results
print("value of capacitance=%.3f uF" %(C*10**6))
print("value of inductor=%.3f mH" %(L*1000))
import math
#initialisation of variables
V_s=230.0
I_L=10.0
X_L=V_s/I_L
I_f1=6.0
#B=2*a-math.sin(2*a)
B=2*math.pi-I_f1*math.pi*X_L/V_s
a=0
i=1.0
for a in range(1,360):
b=2*a*math.pi/180-math.sin(math.radians(2*a))
if math.fabs(B-b)<=0.001 : #by hit and trial
i=2
break
print("firing angle of TCR = %.1f deg" %a)
#(a-.01)*180/math.pi)
import math
#initialisation of variables
L=.01
#Calculations
print("for firing angle=90deg")
a=90*math.pi/180
L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a))
print("effective inductance=%.0f mH" %(L_eff*1000))
print("for firing angle=120deg")
a=120*math.pi/180
L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a))
print("effective inductance=%.3f mH" %(L_eff*1000))
print("for firing angle=150deg")
a=150*math.pi/180
L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a))
print("effective inductance=%.2f mH" %(L_eff*1000))
print("for firing angle=170deg")
a=170*math.pi/180
L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a))
print("effective inductance=%.3f H" %L_eff)
print("for firing angle=175deg")
a=175*math.pi/180
L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a))
#Results
print("effective inductance=%.2f H" %L_eff)
print("for firing angle=180deg")
a=180*math.pi/180
L_eff=math.pi*L/(2*math.pi-2*a+math.sin(2*a))
print("effective inductance=%.3f H" %L_eff)
#random value at firing angle =180 is equivalent to infinity as in answer in book
import math
#initialisation of variables
Q=100.0*10**3
V_s=11.0*10**3
#Calculations
f=50.0
L=V_s**2/(2*math.pi*f*Q)
#Results
print("effective inductance=%.4f H" %L)