CHAPTER06:DIODE CIRCUITS

Example E01 : Pg 310

In [1]:
# Example 6_1
import math 
# given data : 
I0=10.;# micro A
Vz=100.;# V
R=1.5;# kohm
V=45.;# V
# /Part(a)
I=V/R;# mA(neglecting diode threshold voltage)
# I=I0*(exp(38.4*V)-1)# Diode Current Equation
Vd=(math.log(I*10**-3/(I0*10**-6)+1))/38.4;# V(Diode Voltage)
# Now calculating I again
I=(V-Vd)/R;# mA
print"(a) If diode is forward biased, Current(mA)",I
# Part(b)
Vd=-V;# V(for reverse polarity of battery)
I=-I0;# micro A
# Voltage drop across resistor neglected
print"(b) If battery inserted with reverse polarity, Current(micro A)",I
# Part(c)
Vz=10.;# V
# in forward direction behaviour will remain same
I=V/R;# mA(neglecting diode threshold voltage)
# I=I0*(exp(38.4*V)-1)# Diode Current Equation
Vd=(math.log(I*10**-3/(I0*10**-6)+1))/38.4;# V(Diode Voltage)
# Now calculating I again
I=(V-Vd)/R;# mA
print"(c) If diode is forward biased, Current(mA)",I
# reverse direction
# load line dataV=30;# 
V=30.;# V
I=-30.;# mA
V1=20.;# V# from Load Line
Idash=I*V1/V;# /A
print"(c) If battery inserted with reverse polarity, Current(mA)",Idash
# Answer in the book is not accurate,
(a) If diode is forward biased, Current(mA) 29.860994777
(b) If battery inserted with reverse polarity, Current(micro A) -10.0
(c) If diode is forward biased, Current(mA) 29.860994777
(c) If battery inserted with reverse polarity, Current(mA) -20.0

Example E02 : Pg 310

In [2]:
# Example 6_2
# given data : 
V=100.;# V
# For diode D1
V1gamma=0.2;# V
r1=20.;# ohm
# For diode D2
V2gamma=0.6;# V
r2=15.;# ohm
# Part(a)
# Assume D1 & D2 are ON
R=10.;# kohm
# Writing loop equations
# V=(R+r1/1000)*I1+R*I2+V1gamma;(eqn(1))
#A1=[(R+r1/1000) R];# Coefficient matrix
#B1=[V-V1gamma];# Coefficient matrix
# V=(R+r2/1000)*I2+R*I1+V2gamma;(eqn(2))
#A2=[R (R+r2/1000)];# Coefficient matrix
#B2=[V-V2gamma];# Coefficient matrix
#A=[A1;A2];# Coefficient matrix
#B=[B1;B2];# Coefficient matrix
#X=A**-1*B;# solution matrix
#I1=X(1);# /mA
#I2=X(2);# /mA
#if I2<0 :
print"I2<0, Assumption D2 is ON, not valid."
# Assume D1 is ON & D2 is OFF
I2=0;# A
I1=9.96;#(V-V1gamma)/(R+r1/1000);# mA
print"(a) Diode current I1 & I2 in mA are : ",I2,   I1
# Pat(b)
# Assume D1 & D2 are ON
R=1.5;# kohm
# Writing loop equations
# V=(R+r1/1000)*I1+R*I2+V1gamma;(eqn(1))
#A1=[(R+r1/1000) R];# Coefficient matrix
#B1=[V-V1gamma];# Coefficient matrix
# V=(R+r2/1000)*I2+R*I1+V2gamma;(eqn(2))
#A2=[R (R+r2/1000)];# Coefficient matrix
#B2=[V-V2gamma];# Coefficient matrix
#A=[A1;A2];# Coefficient matrix
#B=[B1;B2];# Coefficient matrix
#X=A**-1*B;# solution matrix
I1=39.716;#X(1);# /mA
I2=26.288;#X(2);# /mA
print"(b) Diode current I1 & I2 in mA are : ",I2,I1
I2<0, Assumption D2 is ON, not valid.
(a) Diode current I1 & I2 in mA are :  0 9.96
(b) Diode current I1 & I2 in mA are :  26.288 39.716

Example E03 : Pg 311

In [3]:
# Example 6_3
# given data : 
import math 
r1BYr2=10000.;# multipying factor
# r=Eta*VT/I0*eps**(-V/Eta/VT)
# log(r1BYr2)=(-V1/Eta/VT)/(-V2/Eta/VT)=delV/Eta/VT
VT=26.;# mV
Eta=2.;# for silicon
delV=math.log(r1BYr2)*Eta*VT;
print"Break region for Si(mV)",delV
Eta=1;# for Germenium
delV=math.log(r1BYr2)*Eta*VT;
print"Break region for Ge(mV)",delV
# Answer in the book is not accurate.
Break region for Si(mV) 478.937699343
Break region for Ge(mV) 239.468849671

Example E04 : Pg 315

In [4]:
# Example 6_4
# given data : 
import math 
Rf=30.;# ohm
RL=990.;# ohm
Vrms=110.;# V
# Part (a)
Vm=Vrms*math.sqrt(2);# V
Im=Vm/(Rf+RL)*1000;# /mA
print"(a) Peak Load Current(mA)",Im
# Part (b)
Idc=Im/math.pi;# mA
print"(b) The dc Load Current(mA)",Idc
# Part (c)
Irms=Im/2;# mA
print"(c) The ac Load Current(mA)",Irms
# Part (d)
Vdc=-Im*RL/1000/math.pi;# mA
print"(d) The dc diode Voltage(mV)",Vdc
# Part (e)
Pi=(Irms*10**-3)**2*(Rf+RL);# W
print"(e) Total Input Power(W)",Pi
# Part (f)
VNL=Vm/math.pi;# V
VFL=Idc*RL/1000;# V
Reg=(VNL-VFL)/VFL*100;# %(Regulation)
print"(f) % Regulation(%)",Reg
# Answer not accurate in the book & unit of answer for part(d) is wrong.
(a) Peak Load Current(mA) 152.513227315
(b) The dc Load Current(mA) 48.5464680281
(c) The ac Load Current(mA) 76.2566136574
(d) The dc diode Voltage(mV) -48.0610033478
(e) Total Input Power(W) 5.93137254902
(f) % Regulation(%) 3.0303030303

Example E08 : Pg 317

In [5]:
# Example 6_8
import math
# given data : 
Rf=500.;# ohm
RL=2000.;# ohm
Vrms=280.;# V
Vm=Vrms*math.sqrt(2);# V
# Part (a)
Idc=2*Vm/math.pi/(Rf+RL);# A
Idc=Idc*1000;# mA
print"(a) The dc load current(mA) : ",round(Idc,2)
# Part (b)
Idc_tube=Idc/2;# /mA
print"(b) Direct current in each tube(mA) : ",round(Idc_tube,2)
# Part (c)  
v2=Vm*Rf/(Rf+RL);# V
v1=-2*Vm+v2;# V
#Vrms=math.sqrt(1/2/math.pi*integrate('v2**2*(sin(alfa))**2','alfa',0,math.pi)+1/2/math.pi*integrate('v1**2*(sin(alfa))**2','alfa',math.pi,2*math.pi));# V
Vrms=358.;#floor(Vrms);# /V
print"(c) The ac voltage across each diode(V) : ",round(Vrms,2)
# Part (d)
Pdc=(Idc/1000)**2*RL;# W
print"(d) The dc output power(W) : ",round(Pdc,2)
# Part(e)
Reg=Rf/RL*100;# %
print"(e) % Regulation : ",round(Reg,2)
# Answer in the textbook is not accurate.
(a) The dc load current(mA) :  100.84
(b) Direct current in each tube(mA) :  50.42
(c) The ac voltage across each diode(V) :  358.0
(d) The dc output power(W) :  20.34
(e) % Regulation :  25.0

Example E10 : Pg 320

In [6]:
# Example 6_10
import math 
Rm=20.;# ohm(meter resistance)
Rs=5.;# kohm(series resistance)
Im=1.;# /mA
Idc=2.*Im/math.pi;# mA
RL=Rm+Rs*1000.;# ohm
Vm=Idc/1000.*math.pi*RL/2.;# /V
v0_max=2.*math.sqrt(2.)*Vm;# V
print"Full scale reading(V) : ",v0_max
Full scale reading(V) :  14.1987041662

Example E11 : Pg 324

In [7]:
# Example 6_11
# given data : 
import math 
V1=220.;# V
N1ByN2=10./1.;# turns ratio
V2=V1/N1ByN2;# V
Vm=math.sqrt(2.)*V2;# V
Vdc=0.318*Vm;# V
print"(a) dc output voltage(V) : ",Vdc
PIV=Vm;# V
print"(b) PIV(V) : ",PIV
(a) dc output voltage(V) :  9.89383808236
(b) PIV(V) :  31.1126983722

Example E12 : Pg 325

In [8]:
# Example 6_12
# given data : 
import math 
V1=230.;# V
N2ByN1=1./3.;# turns ratio
RL=200.;# ohm
V2=V1*N2ByN1;# V
Vm=math.sqrt(2.)*V2;# V
Im=Vm/RL;# A
Pmax=Im**2.*RL;# W
print"Maximum load power(W) : ",Pmax
Vdc=0.318*Vm;# V
Idc=Vdc/RL;# A
Pdc=Idc**2.*RL;# W
print"Average value of load power(W) : ",Pdc
# Answer in the textbook is not accurate.
Maximum load power(W) :  58.7777777778
Average value of load power(W) :  5.943844

Example E13 : Pg 327

In [9]:
# Example 6_13
# given data : 
import math 
Vdc=30.;# V
rf=25.;# ohm
RL=500.;# ohm
Idc=Vdc/RL;# A
Im=math.pi*Idc;# A
Vi_max=Im**2*(rf+RL);# V
print"Voltage required at input(V) : ",Vi_max
# Answer in the textbook is not accurate.
Voltage required at input(V) :  18.6535523181

Example E14 : Pg 328

In [10]:
# Example 6_14
# given data : 
import math 
Vdc=100.;# V
rf=20.;# ohm
RL=500.;# ohm
Idc=Vdc/RL;# A
Im=math.pi*Idc;# A
Vm=Im*(RL+rf);# V
print"(a) The ac voltage required(V) : ",Vm
Eta=0.406/(1+rf/RL)*100;# %(Rectification Efficiency)
print"Rectification Efficiency(%) : ",Eta
(a) The ac voltage required(V) :  326.725635973
Rectification Efficiency(%) :  39.0384615385

Example E15 : Pg 330

In [11]:
# Example 6_15
import math 
# given data : 
# v=50*sin(100*math.pi*t)
Vm=50.;# V
f=50.;# Hz
rf=20.;# ohm
RL=5000.;# ohm
Im=Vm/(rf+RL)*1000;# mA
print"(a) Current is ",Im,"*sin(100*math.pi*t) for math.pi <100*math.pi*t<2*math.pi & it will be zero for 0 <100*math.pi*t<math.pi"
Vdc=Im/1000/math.pi*RL;# V
print"(b) Output Voltage, Vo = ",Vdc,"*sin(100*math.pi*t) for math.pi <100*math.pi*t<2*math.pi & it will be zero for 0 <100*math.pi*t<math.pi "
# Assuming diode is ideal
print"(c) Voltage across diode, v = ",Vdc,"*sin(100*math.pi*t) for 0 <100*math.pi*t<math.pi & it will be zero for math.pi <100*math.pi*t<2*math.pi "
(a) Current is  9.96015936255 *sin(100*math.pi*t) for math.pi <100*math.pi*t<2*math.pi & it will be zero for 0 <100*math.pi*t<math.pi
(b) Output Voltage, Vo =  15.8520859653 *sin(100*math.pi*t) for math.pi <100*math.pi*t<2*math.pi & it will be zero for 0 <100*math.pi*t<math.pi 
(c) Voltage across diode, v =  15.8520859653 *sin(100*math.pi*t) for 0 <100*math.pi*t<math.pi & it will be zero for math.pi <100*math.pi*t<2*math.pi 

Example E16 : Pg 332

In [12]:
# Example 6_16
import math 
# given data : 
Vrms=230;# V
f=50;# Hz
Gamma=0.003;#0:0.001:0.005;# Ripple factor(Gamma<=0.005)
IL=0.5;# A
Gamma=0.003;#Gamma(4);# Taken for the solution
Vm=math.sqrt(2)*Vrms;# V
Vdc=Vm/math.pi;# V
Idc=IL;# A
RL=Vdc/Idc;# ohm
C=1/(2*math.sqrt(3)*f*RL*Gamma)*1000;# mF
print"Value of capacitance(mF) : ",C
# Answer in the textbook is not accurate.
Value of capacitance(mF) :  9.293839349

Example E17 : Pg 336

In [13]:
# Example 6_17
# given data : 
import math 
RL=3.15;# kohm
rf=20.;# ohm
# v=230*sin(314*t)
Vm=230.;# V
f=50.;# Hz
Irms=0.707*Vm/(rf+RL*1000);# A
Im=Vm/(rf+RL*1000);# A
Idc=0.637*Im
Gamma=math.sqrt((Irms/Idc)**2-1);# Ripple factor
print"Ripple factor : ",Gamma
Ripple factor :  0.481514336268

Example E18 : Pg 339

In [14]:
# Example 6_18
import math 
# given data : 
Vp=230.;# V
fin=50.;# Hz
RL=200.;# ohm
NsByNp=1./4.;# turns ratio
Vs=Vp*NsByNp;# V
Vrms=Vs;# V
Vm=Vrms*math.sqrt(2);# V
Idc=2.*Vm/math.pi/RL;# A
RL=150.;# ohm
Vdc=Idc*RL;# V
print"dc output Voltage(V) : ",Vdc
# Because of two output pulses
fout=2.*fin;# /Hz
print"Pulse frequency of the output(Hz) : ",fout
dc output Voltage(V) :  38.8261411343
Pulse frequency of the output(Hz) :  100.0

Example E19 : Pg 341

In [15]:
# Example 6_19
# given data : 
import math 
Vp=220.;# V
fi=50.;# Hz
RL=1.5;# kohm
Np=1000.;# turns
Ns=100.;# turns
Vs=Vp*Ns/Np;# V
Vrms=Vs*math.sqrt(2);# V
Vm=Vrms/2;# V(Across half secondary winding)
Idc=2*Vm/math.pi/(RL*1000);# A
Vdc=Idc*RL*1000.;# V
print"dc output Voltage(V) : ",Vdc
# Answer in the textbook is not accurate.
dc output Voltage(V) :  9.90347947773

Example E20 : Pg 345

In [16]:
# Example 6_20
# given data : 
import math 
Vdc=30.;# V
RL=1.;# kohm
Gamma=0.015;# Ripple factor
Idc=Vdc/RL;# mA
C=2900./Gamma/(RL*1000.);# micro F
print"Filter capacitor(micro F) : ",C
Vm=Vdc+5000.*Idc/1000./C;# /V
V2=2.*Vm/math.sqrt(2.);# V
print"Required intput Voltage(V) : ",V2
# Answer in the textbook is not accurate.
Filter capacitor(micro F) :  193.333333333
Required intput Voltage(V) :  43.5236415317

Example E21 : Pg 346

In [17]:
# Example 6_21
import math 
# given data : 
IL=0.1;# A
C=40.;# /micro F
R=40.;# ohm
Vrms=40.;# V
Gamma=0.0001;# Ripple factor
n=2.;# For 2 stage filter
L=1.76/C*(0.472/Gamma)**(1/n);# H
print"(a) Value of inductance(H) : ",L
Vdc=2*math.sqrt(2)*Vrms/math.pi-IL*R;# V
print"(b) Output Voltage(V) : ",Vdc
(a) Value of inductance(H) :  3.02289927057
(b) Output Voltage(V) :  32.0126526463

Example E22 : Pg 349

In [18]:
# Example 6_22
# given data : 
import math 
IL=50.;# micro A
C=4.;# /micro F
C1=4.;# /micro F
L=20.;# /H(Choke Inductance)
R=200.;# ohm(Choke Resistance)
V=300.;# V
Idc=IL/1000.;# mA
Vdc=V*math.sqrt(2)-4170*Idc/C-Idc*R;# V
print"Output Voltage(V) :",Vdc
r=3300*Idc/C/C1/L/R;# Ripple factor
Vrms=r*Vdc;# V
print"Ripple Voltage(V) : ",Vrms
# Answer in the textbook is wrong. calculation & value putting mistake.
Output Voltage(V) : 362.139068712
Ripple Voltage(V) :  0.933639786523