#Variable declaration
I=50.0; #Surge current, A
t=12.0; #Time for which surge current lasts, ms
circuit_fusing_rating_max=90; #Maximum circuit fusing rating, A²s
#Calculation
circuit_fusing_rating=I**2*(t*10**-3); #Circuit fusing rating, A²s
#Result
if(circuit_fusing_rating<circuit_fusing_rating_max):
print("The device will not be destroyed.");
else:
print("The device will be destroyed.");
#Variable declaration
I2_t_rating=50.0; #circuit fuse rating, A²s
Is=100.0; #Surge current, A
#Calculation
t_max=(I2_t_rating/Is**2)*1000; #Maximum allowable duration, ms
#Result
print("The maximum allowable duration =%dms"%t_max);
#Variable declaration
R=220.0; #Gate resistor, Ω
I_G=7.0; #Gate current, mA
V_GK=0.7; #Junction voltage, V
#Calculation
V_in=V_GK+(I_G/1000)*R; #Input voltage, V (Kirchhoff's voltage law)
#Result
print("The required input voltage=%.2fV."%V_in);
from math import asin
from math import cos
from math import pi
#Variable declaration
I_G=1.0; #Gate current, mA
V_m=200.0; #Peak value of input sinusoidal voltage, V
v=100.0; #Forward breakdown voltage of SCR, V
R_L=100.0; #Load resistance, Ω
#Calculation
#(i)
#v=Vm*sin(theta)
#Finding angle theta, for input voltage (v)= (V_f)forward_breakdown_voltage
theta=asin(v/V_m); #angle for input voltage = forward breakdown voltage, rad
theta=theta*180/pi; #angle for input voltage = forward breakdown voltage, degrees
alpha=round(theta,0); #Firing angle, degrees
#(ii)
phi=180-alpha; #Conduction angle, degrees
#(iii)
V_avg=(V_m/(2*pi))*(1+cos(alpha*pi/180)); #Average voltage, V
I_avg=V_avg/R_L; #Average current, A
#Result
print("(i) The firing agle=%d°"%alpha);
print("(ii) The conduction angle=%.0f°"%phi);
print("(iii) The average current=%.4fA "%I_avg);
#Note: In the text book has approximated the average current to 0.5925A but in the code it gets approximated to 0.5940A.
from math import asin
from math import cos
from math import pi
from math import floor
#Variable declaration
I_G=1.0; #Gate current, mA
V_m=400.0; #Peak value of input sinusoidal voltage, V
v=150.0; #Forward breakdown voltage of SCR, V
R_L=200.0; #Load resistance, Ω
#Calculation
#(i)
#v=Vm*sin(theta)
#Finding angle theta, for input voltage (v)= (V_f)forward_breakdown_voltage
theta=asin(v/V_m); #angle for input voltage = forward breakdown voltage, rad
theta=theta*180/pi; #angle for input voltage = forward breakdown voltage, degrees
alpha=theta; #Firing angle, degrees
#(ii)
V_av=floor((V_m/(2*pi))*(1+cos(alpha*pi/180))*10)/10; #Average voltage, V
#(iii)
I_av=V_av/R_L; #Average current, A
#(iv)
P_out=V_av*I_av; #Output power, W
#Result
print("(i) The firing agle=%d°"%alpha);
print("(ii) The average output voltage=%.1f V"%V_av);
print("(iii) The average current=%.3fA "%I_av);
print("(iv) The output power=%.2f W"%P_out);
from math import asin
#Variable declaration
v=180.0; #Forward breakdown voltage, V
V_m=240.0; #Peak value of input voltage, V
w=314.0; #Angular frequency of input ,rad/s
#Calculation
#v=Vm*sin(w*t)
#So, t=asin(v/Vm)/w
t=(asin(v/V_m)/w)*1000; #Time for which SCR remains off, ms
#Result
print("The SCR remains off for %.1f ms."%t);
from math import pi
from math import cos
from math import floor
#Variable declaration
I_dc=1.0; #d.c load current, A
alpha=30.0; #Firing angle, °
#Calculation
I_av=I_dc; #Average current(= d.c current), A
#Since, Iav=(Vm/(2*pi*RL))*(1+cos(alpha)) and Im=Vm/RL
I_m=floor((2*pi*I_av/(1+cos(alpha*pi/180)))*100)/100; #Peak-load current, A
#Result
print("Peak-load current=%.2f A."%I_m);
from math import sqrt
from math import pi
from math import sin
#Variable declaration
alpha=60.0; #Firing angle, °
P=100.0; #Power rating of tungsten lamp, W
V=110.0; #Voltage rating of tungsten lamp, V
V_ac=110.0; #a.c supply voltage, V
#Calculation
V_m=V_ac*sqrt(2); #Peak value of input voltage, V
alpha=alpha*pi/180; #firing angle, rad
#Since, E_rms²=(1/2*pi) ∫ V_m²sin²(theta) d(theta), limits: alpha to pi
# E_rms²=Vm²*((2*(pi-alpha) + sin(2*alpha))/(8*pi)),
# E_rms=Vm*sqrt((2*(pi-alpha) + sin(2*alpha))/(8*pi)),
E_rms=round(V_m*sqrt((2*(pi-alpha) + sin(2*alpha))/(8*pi))); #r.m.s voltage developed in the lamp, V
RL=V**2/P; #Load resistance, Ω
I_rms=E_rms/RL; #r.m.s current developed in the lamp, A
#Result
print("The r.m.s voltage developed in the lamp=%d V."%E_rms);
print("The r.m.s current developed in the lamp=%.2f A."%I_rms);
from math import cos
from math import pi
#Variable declaration
RL=100.0; #Load resistance, Ω
V_m=200.0; #Peak a.c voltage, V
alpha=60; #firing angle, °
#Calculation
#(i)
V_av=(V_m/pi)*(1+cos(alpha*pi/180)); #D.C output voltage, V
#(ii)
I_av=V_av/RL; #Load current, A
#Result
print("(i) d.c output voltage=%.1f V."%V_av);
print("(ii) Load current=%.3f A"%I_av);
from math import sqrt
from math import pi
from math import sin
#Variable declaration
alpha=60.0; #Firing angle, °
P=100.0; #Power rating of tungsten lamp, W
V=110.0; #Voltage rating of tungsten lamp, V
V_ac=110.0; #a.c supply voltage, V
#Calculation
V_m=round(V_ac*sqrt(2)); #Peak value of input voltage, V
alpha=alpha*pi/180; #firing angle, rad
#Since, E_rms²=(1/2*pi) ∫ V_m²sin²(theta) d(theta), limits: alpha to pi
# E_rms²=Vm²*((2*(pi-alpha) + sin(2*alpha))/(8*pi)),
# E_rms=Vm*sqrt((2*(pi-alpha) + sin(2*alpha))/(8*pi)),
E_rms=V_m*sqrt((2*(pi-alpha) + sin(2*alpha))/(4*pi)); #r.m.s voltage developed in the lamp, V
RL=V**2/P; #Load resistance, Ω
I_rms=E_rms/RL; #r.m.s current developed in the lamp, A
#Result
print("The r.m.s voltage developed in the lamp=%.1f V."%E_rms);
print("The r.m.s current developed in the lamp=%.2f A."%I_rms);
#Variable declaration
VCC=15; #Suuply voltage, V
V_T=0.7; #Gate trigger voltage, V
I_T=7.0; #Gate trigger current, mA
I_H=6.0; #Holding current. mA
R_Vin=1; #Resistance at Vin, kΩ
R_VCC=100; #Resistance at Vcc, Ω
#Calculation
#(i) when SCR is off, there is no current, therefore no voltage drop across the resistor
V_out=VCC; #Output voltage, when SCR is off, V
#(ii)
V_in=V_T+I_T*R_Vin; #Input voltage required to trigger the SCR, V
#(iii)
#Since, I_H=(Vcc-VT)/R_Vin;
VCC_SCR_open=(I_H/1000)*R_VCC+V_T; #Decreased value of supply voltage at which SCR opens, V
#Result
print("(i) The output voltage when SCR is off=%dV."%V_out);
print("(ii) The input voltage required to trigger the SCR=%.1f V."%V_in);
print("(iii) The decreased supply voltage at which SCR opens=%.1f V."%VCC_SCR_open);
#Variable declaration
Vz=5.6; #zener voltage, V
V_T=0.7; #Trigger voltage of SCR, V
#Calculation
VCC=Vz+V_T; #Required supply voltage to turn on the crowbar, V
#Result
print("The required supply voltage to turn on the crowbar=%.1fV."%VCC);
#Variable declaration
Vz=12; #Zener breakdown voltage, V
V_T=1.5; #Trigger voltage, V
tolerance_z=10.0; #Tolerance of zener diode, %
#Calculation
Vz_max=Vz*(1+tolerance_z/100); #Maximum value of zener breakdown, V
Vz_min=Vz*(1-tolerance_z/100); #Minimum value of zener breakdown, V
V_crowbar=Vz_max+V_T; #Maximum value of supply voltage for crowbarring, V
#Result
print("The maximum value of supply voltage for crowbarring=%.1fV"%V_crowbar);
#Variable declaration
VCC=25.0; #Supply voltage, V
#Calculation
#When brights light is on, LASCR conducts and thus gets short circuited to ground, hence,
V_out=0; #Output voltage, V
print("Output voltage when bright light is on=%dV"%V_out);
#When brights light is off, LASCR stops conducting and thus no current through resistor, hence,
V_out=VCC; #Output voltage, V
print("Output voltage when bright light is off=%dV"%V_out);