import math
#initialisation of variables
L=5.0*10**-3 #mH
C=20.0*10**-6 #µF
V_s=200 #V
#Calculations
w_o=math.sqrt(1/(L*C)) #rad/s
t_o=math.pi/w_o #ms
#Results
print('conduction time of thyristor = %.2f ms' %(t_o*1000))
print('voltage across thyristor=%.0f V' %V_s)
import math
#initialisation of variables
C=20.0*10**-6 #µF
L=5.0*10**-6 #µH
V_s=230.0 #V
#Calculations
I_p=V_s*math.sqrt(C/L) #A
w_o=math.sqrt(1/(L*C)) #rad/sec
t_o=math.pi/w_o #µS
I_o=300
a = math.degrees(math.asin(I_o/(2*V_s)))
V_ab = V_s*math.cos(math.radians(a)) #V
t_c=C*V_ab/I_o #µs
#Calculations
print("conduction time of auxillery thyristor=%.2f us" %(t_o*10**6))
print("voltage across main thyristor=%.2f V" %V_ab)
print("ckt turn off time=%.2f us" %(t_c*10**6))
import math
#initialisation of variables
V_s=200.0 #V
R1=10.0 #Ω
R2=100.0 #Ω
C=0 # value of capacitor
#Calculations
I1=V_s*(1/R1+2/R2) #A
I2=V_s*(2/R1+1/R2) #A
t_c1=40*10**-6
fos=2 #factor of safety
C1=t_c1*fos/(R1*math.log(2))
C2=t_c1*fos/(R2*math.log(2))
if C1 > C2 :
C = C1*10**6
else :
C = C2*10**6
#Results
print("peak value of current through SCR1=%.2f A" %I1);
print("Peak value of current through SCR2=%.2f A" %I2);
print("Value of capacitor=%.2f uF" %C);
import math
#initialisation of variables
V_s=230.0 #V
L=20*10**-6 #µH
C=40*10**-6 #µF
I_o=120.0 #A
#Calculations
I_p=V_s*math.sqrt(C/L) #A
t_c=C*V_s/I_o #µs
w_o=math.sqrt(1/(L*C))
t_c1=math.pi/(2*w_o) #µs
#Results
print("current through main thyristor=%.2f A" %(I_o+I_p))
print("Current through auxillery thyristor=%.2f A" %I_o)
print("Circuit turn off time for main thyristor=%.2f us" %(t_c*10**6))
print("Circuit turn off time for auxillery thyristor=%.2f us" %(t_c1*10**6))
import math
#initialisation of variables
C_j=25*10**-12 #pF
I_c=5*10**-3 #charging current
V_s=200.0 #V
R=50.0 #Ω
#Calculations
C=(C_j*V_s)/(I_c*R)
#RESULTS
print("Value of C=%.2f µF" %(C*10**6))
import math
#initialisation of variables
V_s=200.0 #V
R=5.0 #Ω
#Calculations
C=10.0*10**-6
#for turn off V_s*(1-2*exp(-t/(R*C)))=0, so after solving
t_c=R*C*math.log(2.0)
#Results
print("circuit turn off time=%.2f us" %(t_c*10**6))
import math
#initialisation of variables
R=1.0 #Ω
L=20*10**-6 #µH
C=40*10**-6 #µF
#Calculations
w_r=math.sqrt((1/(L*C))-(R/(2*L))**2)
t_1=math.pi/w_r
#Results
print("conduction time of thyristor=%.3f us" %(t_1*10**6))
import math
#initialisation of variables
dv=400*10.0**-6 #dv=dv_T/dt(V/s)
V_s=200.0 #v
R=20.0 #Ω
#Calculations
C=V_s/(R*dv)
C_j=.025*10**-12
C_s=C-C_j
I_T=40;
R_s=1/((I_T/V_s)-(1/R))
#value of R_s in book is wrongly calculated
#Results
print("R_s=%.2f ohm" %R_s)
print("C_s=%.3f uF" %(C_s/10**6))
import math
#initialisation of variables
V_s=200.0 #V
C=20.0*10**-6 #µH
L=0.2*10**-3 #µF
i_c=10.0
#Calculations
i=V_s*math.sqrt(C/L)
w_o=1.0/math.sqrt(L*C)
t_1 = (1/w_o)*math.degrees(math.asin(i_c/i))
t_o=math.pi/w_o
t_c=t_o-2*t_1
#Results
print("reqd time=%.2f us" %(t_1*10**6))
print("ckt turn off time=%.2f us" %(t_c*10**6))
print("ckt turn off time=%.5f us" %t_1)
#solution in book wrong, as wrong values are selected while filling the formuleas
import math
#initialisation of variables
L=1.0 #µH
R=50.0 #Ω
V_s=200.0 #V
t=0.01 #sec
Vd=0.7
#Calculations
tau=L/R
i=(V_s/R)*(1-math.exp(-t/tau))
t=8*10**-3
i1=i-t*Vd
#Results
print("current through L = %.2f A" %i1)
i_R=0 #current in R at t=.008s
print("Current through R = %.2f A" %i_R)
import math
#initialisation of variables
#initialisation of variables
L=1.0 #H
R=50.0 #ohm
V_s=200.0 #V
#Calculations
tau=L/R
t=0.01 #s
i=(V_s/R)*(1-math.exp(-t/tau))
C=1*10**-6 #F
V_c=math.sqrt(L/C)*i
#Results
print("current in R,L=%.2f A" %i)
print("voltage across C=%.2f kV" %(V_c/1000))