In [2]:

```
from math import sqrt
Es=20##rms value of the supply voltage
Ep=sqrt(2)*Es##peak value
print "\n Therefore peak value of the input voltage is %.4f V \n"%(Ep)
print "\n Therefore forward and reverse blocking voltge of SCR>%.4f V \n"%(Ep)
Rl=30##load resistance
Ih=5e-3##holding current
Vtm=1.7##state voltage drop
Vl_peak=Ep-Vtm#
print "\n Vl_peak=%.4f V \n"%(Vl_peak)
Il_peak=Vl_peak/Rl#
print "\n Il_peak=%.4f A \n"%(Il_peak)
Il_rms=Il_peak/2#
print "\n rms value of current flowing through the SCR is %.3f A \n"%(Il_rms)
#SCR current rating should be greater than Il_rms
Es_off=Vtm+Ih*Rl##voltage which cause SCR to switch off
print "\n voltage which cause SCR to switch off is %.2f V \n"%(Es_off)
```

In [3]:

```
from math import sin, pi
print "Refer to the figure-6.19 shown"
Es=25##rms value of the supply voltage
Vd1=0.7##diode drop
Vg=0.75##SCR triggering voltage
alpha1=10##minimum phase angle
alpha2=90##maximum phase angle
Ep=sqrt(2)*Es##peak value
Es1=Ep*sin(alpha1*pi/180)
Es2=Ep*sin(alpha2*pi/180)
Vt=Vd1+Vg##voltage across R3
print "\n Position of R2 at top to trigger at 10 degree "
Vr1=Es1-Vt##since Vt=Vr2+Vr3
#I1_min>>Ig ie 200 microA
I1_min=1e-3#
R1=Vr1/I1_min#
print "\n Therefore R1=%.4f kohm \n"%(R1*1e-3)
print " We use R1=4.7 kohm standard value \n\n"
R1=4.7e3##standard value R1
x=Vt/I1_min##x=R2+R3
print " Position of R2 at bottom to trigger at 90 degree "
Vr3=Vt#
I1=Es2/(R1+x)#
R3=Vr3/I1#
print "\n Therefore R3=%.2f ohm \n"%(R3)
print " We use R3=270 ohm standard value \n"
R3=270##standard value R3
R2=x-R3##since x=R2+R3
print "\n Therefore R2=%.2f kohm \n"%(R2*1e-3)
print " We use the pot=1.5 kohm standard value for precise judgement"
```

In [4]:

```
from math import log
Rt=5##resistance in kohm
Ct=0.1##capacitance in micro farad
n=0.58##standoff ratio
T=Rt*Ct*log(1/(1-n))##time period in seconds
fo=1/T##frequency of oscillations
fo=fo#
print "\n Therefore frequency of oscillation is %.3f kHz \n"%(fo)
```

In [5]:

```
from math import log
Vbb=20#
Ct=0.1e-6##capacitance
Rt=10e3##resistance
Vv=1.5##valley potential
Vd=0.7##cut in voltage of diode
n=0.6##stand off ratio
Vp=n*Vbb+Vd#
print "We know that Vp=Vbb(1-exp(-T/(Rt*Ct)))"
x=(Vp-Vv)/Vbb##x=(1-exp(-T/(Rt*Ct))
y=1-x##y=exp(-T/(Rt*Ct)
z=Rt*Ct#
T=-log(y)*z##time period
fo=1/T##frequency of oscillations
fo=fo*1e-3#
print "\n Therefore frequency of oscillation is %.3f kHz \n"%(fo)
```

In [6]:

```
Vbb=30#
Vv=0.8##valley potential
Iv=15e-3
Vd=0.7##cut in voltage of diode
n=0.33##stand off ratio
Vp=18#
Ip=35e-6#
print " For turn ON"
print "\n Rt<(Vbb-Vp)/Ip"
Rt=(Vbb-Vp)/Ip#
print "\n therefore Rt<%.0f 0hm \n"%(Rt)
print " \n For turn OFF"
print "\n Rt>(Vbb-Vv)/Iv"
Rt1=(Vbb-Vv)/Iv
print "\n therefore Rt>%.0f 0hm \n"%(Rt1)
print "\n So range of Rt is %.3f kohm< Rt <%.2f kohm \n"%(Rt1*1e-3,Rt*1e-3)
```