import math
#initialisation of variables
P=.5 #P=V_g*I_g
s=130 #s=V_g/I_g
#Calculations
I_g=math.sqrt(P/s)
V_g=s*I_g
E=15
R_s=(E-V_g)/I_g
#Results
print("Gate source resistance=%.2f ohm" %R_s)
#Answers have small variations from that in the book due to difference in the rounding off of digits.
import math
#initialisation of variables
R_s=120 #slope of load line is -120V/A. This gives gate source resistance
print("gate source resistance=%.0f ohm" %R_s)
P=.4 #P=V_g*I_g
E_s=15
#Calculations
#E_s=I_g*R_s+V_g % after solving this
#120*I_g**2-15*I_g+0.4=0 so
a=120
b=-15
c=0.4
D=math.sqrt((b**2)-4*a*c)
I_g=(-b+D)/(2*a)
V_g=P/I_g
#Results
print("\ntrigger current=%.2f mA" %(I_g*10**3))
print("\nthen trigger voltage=%.3f V" %V_g)
I_g=(-b-D)/(2*a)
V_g=P/I_g
print("\ntrigger current=%.2f mA" %(I_g*10**3))
print("\nthen trigger voltage=%.2f V" %V_g)
import math
#initialisation of variables
#V_g=1+10*I_g
P_gm=5 #P_gm=V_g*I_g
#after solving % eqn becomes 10*I_g**2+I_g-5=0
a=10.0
b=1.0
c=-5
#Calculations
I_g=(-b+math.sqrt(b**2-4*a*c))/(2*a)
E_s=15
#using E_s=R_s*I_g+V_g
R_s=(E_s-1)/I_g-10
P_gav=.3 #W
T=20*10**-6
f=P_gav/(P_gm*T)
dl=f*T
#Results
print("Reistance=%.3f ohm" %R_s)
print("Triggering freq=%.0f kHz" %(f/1000))
print("Tduty cycle=%.2f" %dl)
import math
#initialisation of variables
I=.1
E=200.0
L=0.2
#Calculations
t=I*L/E
R=20.0
t1=(-L/R)*math.log(1-(R*I/E))
L=2.0
t2=(-L/R)*math.log(1-(R*I/E))
#Results
print("in case load consists of (a)L=.2H")
print("min gate pulse width=%.0f us" %(t*10**6))
print("(b)R=20ohm in series with L=.2H")
print("min gate pulse width=%.3f us" %(t1*10**6))
print("(c)R=20ohm in series with L=2H")
print("min gate pulse width=%.2f us" %(t2*10**6))
import math
#initialisation of variables
def theta(th):
I_m=1 #supposition
I_av=(I_m/(2*math.pi))*(1+math.cos(math.radians(th)))
I_rms=math.sqrt((I_m/(2*math.pi))*((180-th)*math.pi/360+.25*math.sin(math.radians(2*th))))
FF=I_rms/I_av
I_rms=35
I_TAV=I_rms/FF
return I_TAV
#Calculations
print("when conduction angle=180")
th=0
I_TAV=theta(th)
print("avg on current rating=%.3f A" %I_TAV)
print("when conduction angle=90")
th=90
I_TAV=theta(th)
#Results
print("avg on current rating=%.3f A" %I_TAV)
print("when conduction angle=30")
th=150
I_TAV=theta(th)
print("avg on current rating=%.3f A" %I_TAV)
import math
#initialisation of variables
def theta(th):
n=360.0/th
I=1.0 #supposition
I_av=I/n
I_rms=I/math.sqrt(n)
FF=I_rms/I_av
I_rms=35
I_TAV=I_rms/FF
return I_TAV
#Calculations
th=180.0
I_TAV1=theta(th)
th=90.0
I_TAV2=theta(th)
th=30.0
I_TAV3=theta(th)
#Results
print("when conduction angle=180")
print("avg on current rating=%.3f A" %I_TAV)
print("when conduction angle=90")
print("avg on current rating=%.1f A" %I_TAV2)
print("when conduction angle=30")
print("avg on current rating=%.4f A" %I_TAV3)
import math
#initialisation of variables
f=50.0 #Hz
#Calculations
I_sb=3000.0
t=1/(4*f)
T=1/(2*f)
I=math.sqrt(I_sb**2*t/T)
r=(I_sb/math.sqrt(2))**2*T
#Results
print("surge current rating=%.2f A" %I)
print("\nI**2*t rating=%.0f A^2.s" %r)
import math
#initialisation of variables
V_s=300.0 #V
R=60.0 #ohm
L=2.0 #H
#Calculations
t=40*10**-6 #s
i_T=(V_s/R)*(1-math.exp(-R*t/L))
i=.036 #A
R1=V_s/(i-i_T)
#Results
print("maximum value of remedial parameter=%.3f kilo-ohm" %(R1/1000))
import math
#initialisation of variables
V_p=230.0*math.sqrt(2)
#Calculations
R=1+((1)**-1+(10)**-1)**-1
A=V_p/R
s=1 #s
t_c=20*A**-2*s
#Results
print("fault clearance time=%.4f ms" %(t_c*10**3))
import math
#initialisation of variables
V_s=math.sqrt(2)*230 #V
L=15*10**-6 #H
I=V_s/L #I=(di/dt)_max
R_s=10 #ohm
v=I*R_s #v=(dv/dt)_max
#Calculations
f=50 #Hz
X_L=L*2*math.pi*f
R=2
I_max=V_s/(R+X_L)
FF=math.pi/math.sqrt(2)
I_TAV1=I_max/FF
FF=3.98184
I_TAV2=I_max/FF
#RESULTS
print("(di/dt)_max=%.3f A/usec" %(I/10**6))
print("\n(dv/dt)_max=%.2f V/usec" %(v/10**6))
print("\nI_rms=%.3f A" %I_max)
print("when conduction angle=90")
print("I_TAV=%.3f A" %I_TAV1)
print("when conduction angle=30")
print("I_TAV=%.3f A" %I_TAV2)
print("\nvoltage rating=%.3f V" %(2.75*V_s)) #rating is taken 2.75 times of peak working voltage unlike 2.5 to 3 times as mentioned int book.
import math
#initialisation of variables
T_jm=125
th_jc=.15 #degC/W
th_cs=0.075 #degC/W
#Calculations
dT=54 #dT=T_s-T_a
P_av=120
th_sa=dT/P_av
T_a=40 #ambient temp
P_av=(T_jm-T_a)/(th_sa+th_jc+th_cs)
if (P_av-120)<1 :
print("selection of heat sink is satisfactory")
dT=58 #dT=T_s-T_a
P_av=120
th_sa=dT/P_av
T_a=40 #ambient temp
P_av=(T_jm-T_a)/(th_sa+th_jc+th_cs)
if (P_av-120)<1 :
print("selection of heat sink is satisfactory")
V_m=math.sqrt(2)*230
R=2
I_TAV=V_m/(R*math.pi)
P_av=90
th_sa=(T_jm-T_a)/P_av-(th_jc+th_cs)
dT=P_av*th_sa
print("for heat sink")
print("T_s-T_a=%.2f degC" %dT)
print("\nP_av=%.0f W" %P_av)
P=(V_m/2)**2/R
eff=P/(P+P_av)
print("\nckt efficiency=%.3f pu" %eff)
a=60 #delay angle
I_TAV=(V_m/(2*math.pi*R))*(1+math.cos(math.radians(a)))
print("\nI_TAV=%.2f A" %I_TAV)
dT=46
T_s=dT+T_a
T_c=T_s+P_av*th_cs
T_j=T_c+P_av*th_jc
#Results
print("\ncase temp=%.2f degC" %T_c)
print("\njunction temp=%.2f degC" %T_j)
import math
#initialisation of variables
T_j=125.0 #degC
T_s=70.0 #degC
th_jc=.16 #degC/W
th_cs=.08 #degC/W
#Calculations
P_av1=(T_j-T_s)/(th_jc+th_cs)
T_s=60 #degC
P_av2=(T_j-T_s)/(th_jc+th_cs)
inc=(math.sqrt(P_av2)-math.sqrt(P_av1))*100/math.sqrt(P_av1)
#Results
print("Total avg power loss in thristor sink combination=%.2f W" %P_av1)
print("Percentage inc in rating=%.2f" %inc)
import math
#initialisation of variables
R=25000.0
I_l1=.021 #I_l=leakage current
I_l2=.025
I_l3=.018
I_l4=.016
#V1=(I-I_l1)*R
#V2=(I-I_l2)*R
#V3=(I-I_l3)*R
#V4=(I-I_l4)*R
#V=V1+V2+V3+V4
#Calculations
V=10000.0
I_l=I_l1+I_l2+I_l3+I_l4
#after solving
I=((V/R)+I_l)/4
R_c=40.0
V1=(I-I_l1)*R
#Resluts
print("voltage across SCR1=%.0f V" %V1)
V2=(I-I_l2)*R
print("\nvoltage across SCR2=%.0f V" %V2)
V3=(I-I_l3)*R
print("\nvoltage across SCR3=%.0f V" %V3)
V4=(I-I_l4)*R
print("\nvoltage across SCR4=%.0f V" %V4)
I1=V1/R_c
print("\ndischarge current through SCR1=%.3f A" %I1)
I2=V2/R_c
print("\ndischarge current through SCR2=%.3f A" %I2)
I3=V3/R_c
print("\ndischarge current through SCR3=%.3f A" %I3)
I4=V4/R_c
print("\ndischarge current through SCR4=%.3f A" %I4)
import math
#initialisation of variables
V_r=1000 #rating of SCR
I_r=200 #rating of SCR
V_s=6000 #rating of String
I_s=1000 #rating of String
#Calculations
print("when DRF=.1")
DRF=.1
n_s=V_s/(V_r*(1-DRF))
print("number of series units=%.0f" %math.ceil(n_s))
n_p=I_s/(I_r*(1-DRF))
print("\nnumber of parrallel units=%.0f" %math.ceil(n_p))
print("when DRF=.2")
DRF=.2
#Results
n_s=V_s/(V_r*(1-DRF))
print("number of series units=%.0f" %math.ceil(n_s))
n_p=I_s/(I_r*(1-DRF))
print("\nnumber of parrallel units=%.0f" %math.ceil(n_p))
import math
#initialisation of variables
V1=1.6 #on state voltage drop of SCR1
V2=1.2 #on state voltage drop of SCR2
I1=250.0 #current rating of SCR1
I2=350.0 #current rating of SCR2
#Calculations
R1=V1/I1
R2=V2/I2
I=600.0 #current to be shared
#for SCR1 % I*(R1+R)/(total resistance)=k*I1 (1)
#for SCR2 % I*(R2+R)/(total resistance)=k*I2 (2)
#(1)/(2)
R=(R2*I2-R1*I1)/(I1-I2)
#Results
print("RSequired value of resistance=%.3f ohm" %R)
import math
#initialisation of variables
f=2000.0 #Hz
C=0.04*10**-6
n=.72
#Calculations
R=1/(f*C*math.log(1/(1-n)))
V_p=18
V_BB=V_p/n
R2=10**4/(n*V_BB)
I=4.2*10**-3 #leakage current
R_BB=5000
R1=(V_BB/I)-R2-R_BB
#Results
print("R=%.2f kilo-ohm" %(R/1000))
print("\nR2=%.2f ohm" %R2)
print("\nR1=%.0f ohm" %R1)
import math
#initialisation of variables
V_p=18.0
n=.72
V_BB=V_p/n
I_p=.6*10**-3
I_v=2.5*10**-3
V_v=1
#Calculations
R_max=V_BB*(1-n)/I_p
print("R_max=%.2f kilo-ohm" %(R_max/1000))
R_min=(V_BB-V_v)/I_v
print("\nR_min=%.2f kilo-ohm" %(R_min/1000))
C=.04*10**-6
f_min=1/(R_max*C*math.log(1/(1-n)))
print("\nf_min=%.3f kHz" %(f_min/1000))
f_max=1/(R_min*C*math.log(1/(1-n)))
print("\nf_max=%.2f kHz" %(f_max/1000))