# Chapter 03 : Diode Circuits and Rectifiers¶

## Example 3.2, Page No 55¶

In [26]:
import math
#initialisation of variables
V_s=400.0  #V
V_o=100.0    #V
L=100.0      #uH
C=30.0       #uF

#Calculations
t_o=math.pi*math.sqrt(L*C)
print("conduction time of diode = %.2f us" %t_o)
#in book solution is t_o=54.77 us. The ans is incorrect as %pi is not muliplied in ans. Formulae mentioned in correct.
I_p=(V_s-V_o)*math.sqrt(C/L)

#Results
print("Peak current through diode=%.2f A" %I_p)
v_D=-V_s+V_o
print("Voltage across diode = %.2f V" %v_D)

conduction time of diode = 172.07 us
Peak current through diode=164.32 A
Voltage across diode = -300.00 V


## Example 3.6, Page No 61¶

In [27]:
import math

#initialisation of variables

R=10             #ohm
L=0.001           #H
C=5*10**-6       #F
V_s=230          #V
xi=R/(2*L)

#Calculations
w_o=1/math.sqrt(L*C)
w_r=math.sqrt((1/(L*C))-(R/(2*L))**2)
t=math.pi/w_r

#Results
print('Conduction time of diode=%.3f us'%(t*10**6))
t=0
di=V_s/L
print('Rate of change of current at t=0 is %.2f A/s' %di)

Conduction time of diode=237.482 us
Rate of change of current at t=0 is 230000.00 A/s


## Example 3.7 Page No 69¶

In [28]:
import math

#initialisation of variables
I_or=100             #A
R=1.0       #assumption

#Calculations
V_m=I_or*2*R
I_o=V_m/(math.pi*R)
q=200       #Ah
t=q/I_o

#Results
print("time required to deliver charge=%.02f hrs" %t)

time required to deliver charge=3.14 hrs


## Example 3.8, Page No 70¶

In [29]:
import math
#initialisation of variables
V_s=230.0    #V
P=1000       #W
R=V_s**2/P

#Calculations
V_or=math.sqrt(2)*V_s/2
P_h=V_or**2/R
print("Power delivered to the heater = %.2f W" %P_h)
V_m=math.sqrt(2)*230
I_m=V_m/R

#Results
print("Peak value of diode current = %.2f A" %I_m)
pf=V_or/V_s
print("Input power factor=%.2f" %pf)

Power delivered to the heater = 500.00 W
Peak value of diode current = 6.15 A
Input power factor=0.71


## Example 3.9 Page No 71¶

In [30]:
import math
#initialisation of variables
V_s=230        #V
V_m=V_s*math.sqrt(2)
E=150          #V

#Calculations
theta1=math.degrees(E/(math.sqrt(2)*V_s))
R=8        #ohm
f=50    #Hz

#Results
print("avg value of charging current=%.2f A" %I_o)
P_d=E*I_o
print("\npower delivered to battery=%.2f W" %P_d)
print("\nrms value of the load current=%.2f A" %I_or)
pf=(E*I_o+I_or**2*R)/(V_s*I_or)
print("\nsupply pf=%.3f" %pf)
P_dd=I_or**2*R
print("\npower dissipated in the resistor=%.2f W" %P_dd)
q=1000.00         #Wh
t=q/P_d
print("\ncharging time=%.2f hr" %t)
n=P_d*100/(P_d+P_dd)
print("rectifier efficiency =%.2f  " %n)
PIV=math.sqrt(2)*V_s+E
print("PIV of diode=%.2f V" %PIV)
#solutions have small variations due to difference in rounding off of digits

avg value of charging current=4.97 A

power delivered to battery=745.11 W

rms value of the load current=9.29 A

supply pf=0.672

power dissipated in the resistor=690.74 W

charging time=1.34 hr
rectifier efficiency =51.89
PIV of diode=475.27 V


## Example 3.10 Page No 78¶

In [31]:
import math

#initialisation of variables
V_s=230            #V
t_rr=40*10**-6    #s reverde recovery time

#Calculations
V_o=2*math.sqrt(2)*V_s/math.pi
V_m=math.sqrt(2)*V_s
f=50
v_avg1=V_r1*100/V_o*10**3
f=2500
v_avg2=V_r2*100/V_o

#Results
print("when f=50Hz")
print("Percentage reduction in avg o/p voltage=%.2f x 10^-3" %v_avg1)
print("when f=2500Hz")
print("Percentage reduction in avg o/p voltage = %.3f" %v_avg2)

when f=50Hz
Percentage reduction in avg o/p voltage=3.95 x 10^-3
when f=2500Hz
Percentage reduction in avg o/p voltage = 9.549


## Example 3.11, Page No 79¶

In [32]:
import math
#initialisation of variables
V_s=230         #V
R=10.0        #ohm

#Calculations
V_m=math.sqrt(2)*V_s
V_o=2*V_m/math.pi
print("Avg value of o/p voltage = %.2f V" %V_o)
I_o=V_o/R
print("Avg value of o/p current = %.2f A" %I_o)
I_DA=I_o/2
print("Avg value of diode current=%.2f A" %I_DA)
I_Dr=I_o/math.sqrt(2)

#Results
print("rms value of diode current=%.2f A" %I_Dr)
print("rms value of o/p current = %.2f A" %I_o)
print("rms value of i/p current = %.2f A" %I_o)
pf=(V_o/V_s)
print("supply pf = %.2f" %pf)

Avg value of o/p voltage = 207.07 V
Avg value of o/p current = 20.71 A
Avg value of diode current=10.35 A
rms value of diode current=14.64 A
rms value of o/p current = 20.71 A
rms value of i/p current = 20.71 A
supply pf = 0.90


## Example 3.12 Page No 80¶

In [33]:
import math

#initialisation of variables
V_s=230.0    #V
R=1000.0      #ohm
R_D=20.0    #ohm

#Calculations
V_m=math.sqrt(2)*V_s
I_om=V_m/(R+R_D)

#Results
print("Peak load current = %.2f A" %I_om)
I_o=I_om/math.pi
print("dc load current = %.2f A" %I_o)
V_D=I_o*R_D-V_m/math.pi
print("dc diode voltage = %.2f V" %V_D)
V_on=V_m/math.pi
V_o1=I_o*R
vr=(V_on-V_o1)*100/V_on
print("Voltage regulation(in percent)=%.2f" %vr)

Peak load current = 0.32 A
dc load current = 0.10 A
dc diode voltage = -101.51 V
Voltage regulation(in percent)=1.96


## Example 3.13 Page No 82¶

In [34]:
import math
#initialisation of variables
V_L=6.8   #V
V_smax=20*1.2    #V
V_smin=20*.8     #V
I_Lmax=30*1.5   #mA
I_Lmin=30*0.5  #mA
I_z=1          #mA

#Calculations
R_smax=(V_smax-V_L)/((I_Lmin+I_z)*10**-3)
print("max source resistance = %.2f ohm" %R_smax)
R_smin=(V_smin-V_L)/((I_Lmax+I_z)*10**-3)
print("Min source resistance = %.2f ohm" %R_smin)  #in book solution, error is committed in putting the values in formulea(printing error) but solution is correct
R_Lmax=V_L*1000/I_Lmin
print("Max load resistance = %.2f ohm" %R_Lmax)
R_Lmin=V_L*1000/I_Lmax
V_d=0.6      #V
V_r=V_L-V_d

#Results
print("Voltage rating of zener diode=%.2f V" %V_r)

max source resistance = 1075.00 ohm
Min source resistance = 200.00 ohm
Max load resistance = 453.33 ohm
Voltage rating of zener diode=6.20 V


## Example 3.14 Page No 83¶

In [35]:
import math

#initialisation of variables
I2=200*10**-6      #A
V_z=20       #V
R_G=500.0   #hm

#Calculations
R2=(V_z/I2)-R_G
print("R2=%.2f kilo-ohm" %(R2/1000))

V_v=25      #V
I1=I2
R1=(V_v-V_z)/I1

#Results
print("R1=%.0f kilo-ohm"%(R1/1000))

R2=99.50 kilo-ohm
R1=25 kilo-ohm


## Example 3.15, Page No 92¶

In [36]:
import math

#initialisation of variables
V_s=2*230          #V

#Calculations
V_o=(math.sqrt(2)*V_s)/math.pi
R=60                #ohm
P_dc=(V_o)**2/R
TUF=0.2865
VA=P_dc/TUF

#RESULTS
print("kVA rating of the transformer = %.2f kVA" %(VA/1000));

kVA rating of the transformer = 2.49 kVA


## Example 3.16, Page No 92¶

In [37]:
import math
#initialisation of variables
tr=0.5       #turns ratio
I_o=10.0
V=230.0
V_s=V/tr

#Calculations
V_m=math.sqrt(2)*V_s
V_o=2*V_m/math.pi
phi1=0
#displacemnt angle=0 as fundamnetal component of i/p source current in phase with source voltage
I_s1=4*I_o/(math.sqrt(2)*math.pi)
I_s=math.sqrt(I_o**2*math.pi/math.pi)
CDF=I_s1/I_o
pf=CDF*DF
HF=math.sqrt((I_s/I_s1)**2-1)
CF=I_o/I_s

#Results
print("o/p voltage = %.2f V" %V_o)
print("distortion factor = %.2f" %DF)
print("i/p pf=%.2f" %pf)
print("Current displacent factor=%.2f" %CDF)
print("Harmonic factor = %.2f" %HF)
print("Creast factor = %.2f" %CF)

o/p voltage = 414.15 V
distortion factor = 1.00
i/p pf=0.90
Current displacent factor=0.90
Harmonic factor = 0.48
Creast factor = 1.00


## Example 3.17, Page No 94¶

In [38]:
import math
#initialisation of variables
V_o=230.0
R=10.0
V_s=V_o*math.pi/(2*math.sqrt(2))
I_o=V_o/R
I_m=math.sqrt(2)*V_s/R
I_DAV=I_m/math.pi

#Calculations
#avg value of diode current
I_Dr=I_m/2
PIV=math.sqrt(2)*V_s
I_s=I_m/math.sqrt(2)
TF=V_s*I_s

#Results
print("peak diode current=%.2f A" %I_m)
print("I_DAV=%.2f A" %I_DAV)
print("I_Dr=%.2f A" %I_Dr)   #rms value of diode current
print("PIV=%.1f V" %PIV)
print("Transformer rating = %.2f kVA" %(TF/1000))

peak diode current=36.13 A
I_DAV=11.50 A
I_Dr=18.06 A
PIV=361.3 V
Transformer rating = 6.53 kVA


## Example 3.18, Page No 103¶

In [39]:
import math
#initialisation of variables
tr=5
V=1100.0
R=10.0

#Calculations
print("In case of 3ph-3pulse type")
V_ph=V/tr
V_mp=math.sqrt(2)*V_ph
V_o=3*math.sqrt(3)*V_mp/(2*math.pi)
print("avg o/p voltage=%.1f V" %V_o)
I_mp=V_mp/R
I_D=(I_mp/math.pi)*math.sin(math.pi/3)
print("\navg value of diode current=%.3f A" %I_D)
I_Dr=I_mp*math.sqrt((1/(2*math.pi))*(math.pi/3+.5*math.sin(2*math.pi/3)))
print("\nrms value of diode current=%.2f A" %I_Dr)
V_or=V_mp*math.sqrt((3/(2*math.pi))*(math.pi/3+.5*math.sin(2*math.pi/3)))
P=(V_or**2)/R
print("\npower delivered=%.1f W" %P)
print("in case of 3ph-M6 type")
V_ph=V_ph/2
V_mp=math.sqrt(2)*V_ph
V_o=3*V_mp/(math.pi)
I_mp=V_mp/R
I_D=(I_mp/math.pi)*math.sin(math.pi/6)
I_Dr=I_mp*math.sqrt((1/(2*math.pi))*(math.pi/6+.5*math.sin(2*math.pi/6)))
V_or=V_mp*math.sqrt((6/(2*math.pi))*(math.pi/6+.5*math.sin(2*math.pi/6)))
P=(V_or**2)/R

#Results
print("avg o/p voltage=%.2f V" %V_o)
print("\navg value of diode current=%.2f A" %I_D)
print("\nrms value of diode current=%.2f A" %I_Dr)
print("\npower delivered=%.0f W" %P)

In case of 3ph-3pulse type
avg o/p voltage=257.3 V

avg value of diode current=8.577 A

rms value of diode current=15.10 A

power delivered=6841.3 W
in case of 3ph-M6 type
avg o/p voltage=148.55 V

avg value of diode current=2.48 A

rms value of diode current=6.07 A

power delivered=2211 W


## Example 3.19, Page No 115¶

In [40]:
import math
#initialisation of variables
V_o=400
R=10

#Calculations
V_ml=V_o*math.pi/3
V_s=V_ml/(math.sqrt(2)*math.sqrt(3))
I_m=V_ml/R
I_s=.7804*I_m
tr=3*V_s*I_s

#Results
print("transformer rating=%.1f VA" %tr)
I_Dr=.5518*I_m
print("\nrms value of diode current=%.3f A" %I_Dr)
I_D=I_m/math.pi
print("\navg value of diode current=%.3f A" %I_D)
print("\npeak diode current=%.2f A" %I_m)
PIV=V_ml
print("\nPIV=%.2f V" %PIV)

transformer rating=16770.3 VA

rms value of diode current=23.114 A

avg value of diode current=13.333 A

peak diode current=41.89 A

PIV=418.88 V


## Example 3.20, Page No 116¶

In [41]:
import math
#initialisation of variables
V_l=230
E=240
R=8

#Calculations
V_ml=math.sqrt(2)*V_l
V_o=3*V_ml/math.pi
I_o=(V_o-E)/R
P_b=E*I_o
P_d=E*I_o+I_o**2*R
phi1=0
I_s1=2*math.sqrt(3)*I_o/(math.sqrt(2)*math.pi)
I_s=math.sqrt(I_o**2*2*math.pi/(3*math.pi))
CDF=I_s1/I_s
pf=DF*CDF
HF=math.sqrt(CDF**-2-1)
tr=math.sqrt(3)*V_l*I_o*math.sqrt(2/3)

#Results
print("Power delivered to battery=%.1f W" %P_b)
print("Power delivered to load=%.2f W" %P_d)
print("Displacement factor=%.2f" %DF)
print("Current distortion factor=%.3f" %CDF)
print("i/p pf=%.3f"%pf)
print("Harmonic factor=%.2f" %HF)
print("Tranformer rating=%.2f VA" %tr)
#answers have small variations from the book due to difference in rounding off of digits

Power delivered to battery=2118.3 W
Displacement factor=1.00
Current distortion factor=0.955
i/p pf=0.955
Harmonic factor=0.31
Tranformer rating=0.00 VA


## Example 3.21, Page No 122¶

In [42]:
import math
#initialisation of variables
f=50  #Hz
V=230.0

#Calculations
V_m=math.sqrt(2)*V
R=400.0
RF=0.05
C=(1/(4*f*R))*(1+(1/(math.sqrt(2)*RF)))

#Results
print("capacitor value=%.2f uF" %(C/10**-6))
V_o=V_m*(1-1/(4*f*R*C))
print("o/p voltage with filter=%.2f V" %V_o)
V_o=2*V_m/math.pi
print("o/p voltage without filter=%.2f V" %V_o)

capacitor value=189.28 uF
o/p voltage with filter=303.79 V
o/p voltage without filter=207.07 V


## Example 3.22, Page No 122¶

In [43]:
import math
#initialisation of variables
f=50
CRF=0.05
R=300

#Calculations
L=math.sqrt((CRF/(.4715*R))**-2-R**2)/(2*2*math.pi*f)
print("L=%.2f H" %L)
R=30
L=math.sqrt((CRF/(.4715*R))**-2-R**2)/(2*2*math.pi*f)

#Results
print("\nL=%.2f H" %L)
L=0
CRF=.4715*R/math.sqrt(R**2+(2*2*math.pi*f*L)**2)
print("\nCRF=%.2f" %CRF)

L=4.48 H

L=0.45 H

CRF=0.47


## Example 3.23, Page No 127¶

In [44]:
import math
#initialisation of variables
R=50
L_L=10*10**-3
f=50.0
w=2*math.pi*f

#Calculations
C=10/(2*w*math.sqrt(R**2+(2*w*L_L)**2))

#Results
print("C=%.2f uF" %(C*10**6))
VRF=0.1
L=(1/(4*w**2*C))*((math.sqrt(2)/(3*VRF))+1)
print("\nL=%.2f mH" %(L*10**3))

C=315.83 uF

L=45.83 mH