1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
|
{
"metadata": {
"name": "",
"signature": "sha256:b6ca6f88473b518209629b5a50e034951050cc84cc7fdfcdcdfe2cbba83ff5c4"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter03:Diodes"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex3.1:pg-143"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Example 3.1: Peak value of diode current and maximum reverse voltage\n",
"#v_s is sinusoidal input voltage with peak 24V\n",
"#battery charges to 12V\n",
"I_d=(24-12)/100.0\n",
"max_v_rev=24+12.0;\n",
"print round(I_d,2),\"peak value of diode current (A)\\n\",round(max_v_rev,2),\"maximum reverse voltage acrossthe diode (V)\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"0.12 peak value of diode current (A)\n",
"36.0 maximum reverse voltage acrossthe diode (V)\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex3.2:pg-145"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Example 3.2 : Values of Iand V for the circuit given\n",
"print \"Consider fig 3.6(a). Assume both diodes are conducting\"\n",
"I_D2=(10-0)/10.0;\n",
"I=(0-(-10))/5.0-I_D2; # node eqution at B for fig 3.6(a)\n",
"V_B=0;\n",
"V=0;\n",
"print I,\"= I (mA)\\n\", V,\"= V (V)\\n\" ,\"D_1 is conducting as assumed originally\"\n",
"print \"Consider fig 3.6(a). Assume both diodes are conducting\"\n",
"I_D2=(10-0)/5.0;\n",
"I=(0-(-10.0))/10-2; # node eqution at B for fig 3.6(b)\n",
"print I,\"= I (mA)\\n \", V,\"=V (V)\"\n",
"print \"Implies assumption is wrong. lets assume D_1 is off and D_2 is on\"\n",
"I_D2=(10-(-10))/15.0;\n",
"V_B=-10+10.0*I_D2;\n",
"I=0;\n",
"print I,\"= I (mA)\\n\", round(V_B,1),\"= V (V)\\n D_1 is reverse biased\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Consider fig 3.6(a). Assume both diodes are conducting\n",
"1.0 = I (mA)\n",
"0 = V (V)\n",
"D_1 is conducting as assumed originally\n",
"Consider fig 3.6(a). Assume both diodes are conducting\n",
"-1.0 = I (mA)\n",
" 0 =V (V)\n",
"Implies assumption is wrong. lets assume D_1 is off and D_2 is on\n",
"0 = I (mA)\n",
"3.3 = V (V)\n",
" D_1 is reverse biased\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex3.3:pg-150"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Example 3.3 : Evaluating junction scaling constant\n",
"#i-I_S*exp(v/(n*V_T)) implies I_S=i*exp(-v/(n*V_T))\n",
"n=1;\n",
"i=10**-3; # (A)\n",
"v=700; # (V)\n",
"V_T=25; # (V)\n",
"I_S=i*exp(-v/(n*V_T))\n",
"print round(I_S,17),\"= I_S (A) for n=1\"\n",
"n=2;\n",
"I_S=i*exp(-v/(n*V_T))\n",
"print round(I_S,11),\"= I_S (A) for n=2\"\n",
"print \"These values implies I_S is 1000 times greater \""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"6.9e-16 = I_S (A) for n=1\n",
"8.3e-10 = I_S (A) for n=2\n",
"These values implies I_S is 1000 times greater \n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex3.4:pg-154"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Example 3.4: To determine I_D and V_D\n",
"V_DD=5; # (V)\n",
"R=1000; # (ohm)\n",
"I_1=1*10**-3; # (A)\n",
"V_D=0.7; # (V)\n",
"V_1=V_D;\n",
"I_D=(V_DD-V_D)/R;\n",
"I_2=I_D;\n",
"V_2=V_1+0.1*log10(I_2/I_1);\n",
"I_D=(V_DD-V_2)/R;\n",
"print round(I_D*1000.0,3),\"= The diode current (mA)\"\n",
"V_D=V_2+0.1*log10(I_D/I_2)\n",
"print round(V_D,3),\"= The diode volage (V)\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"4.237 = The diode current (mA)\n",
"0.763 = The diode volage (V)\n"
]
}
],
"prompt_number": 14
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex3.5:pg-157"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Example 3.5 : Repeating example 3.4 using piecewise linear model\n",
"V_D0=0.65; # (V)\n",
"r_D=20; # (ohm)\n",
"R=1000; # (ohm)\n",
"V_DD=5; # (V)\n",
"I_D=(V_DD-V_D0)/(R+r_D);\n",
"print round(I_D*1000,2),\"= I_D (mA)\"\n",
"V_D=V_D0+I_D*r_D;\n",
"print round(V_D,3),\"= The diod voltage (V)\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"4.26 = I_D (mA)\n",
"0.735 = The diod voltage (V)\n"
]
}
],
"prompt_number": 18
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex3.6:pg-162"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Example 3.6 : Power supply ripple\n",
"V_S=10; # V_S=V_+\n",
"V_D=0.7; # (V)\n",
"R=10*10**3; # (ohm)\n",
"n=2;\n",
"V_T=25*10**-3; # (V)\n",
"V_s=1; # (V)\n",
"I_D=(V_S - V_D)/R;\n",
"r_D=n*V_T/I_D;\n",
"v_d=V_s*r_D/(R+r_D);\n",
"print round(v_d*1000,2),\"= v_d(peak (mV))\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"5.35 = v_d(peak (mV))\n"
]
}
],
"prompt_number": 21
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex3.7:pg-163"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Example 3.7 : Percentage change in regulated voltage\n",
"V_DD=10; # (V)\n",
"V_D=0.7*3; # string of 3 diodes provide this constant voltage\n",
"R=1*10**3;\n",
"I_D=(V_DD-V_D)/R;\n",
"n=2;\n",
"V_T= 25*10**-3; # (V)\n",
"r_d=n*V_T/I_D; # incremental resistance \n",
"r=3*r_d; # total incremental resistance\n",
"deltav_O=2*r/(r+R); # deltav is peak to peak change in output voltage\n",
"print round(deltav_O*1000,1),\"is Percentage change (mV) in regulated voltage caused by 10% change in power supply\"\n",
"I=2.1*10**-3; # The current drawn from the diode string\n",
"deltav_O=-I*r; # Decrease in voltage across diode string\n",
"print round(deltav_O*1000,1),\"is Decrease in voltage across diode string (mV)\"\n",
"# The answer in the textbook is slightly different due to approximation"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"37.3 is Percentage change (mV) in regulated voltage caused by 10% change in power supply\n",
"-39.9 is Decrease in voltage across diode string (mV)\n"
]
}
],
"prompt_number": 24
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex3.8:pg-169"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Example 3.8 : line regulation load regulation\n",
"\n",
"V_Z=6.8; # (V)\n",
"I_Z=0.005; # (A)\n",
"r_Z=20; # (ohm)\n",
"V=10; # V=V_+\n",
"R=0.5*10**3; # (ohm)\n",
"\n",
"# 3.8a\n",
"V_ZO=V_Z-r_Z*I_Z;\n",
"I_Z=(V-V_ZO)/(R+r_Z)\n",
"V_O=V_ZO+I_Z*r_Z;\n",
"print round(V_O,2),\"= V_O (V)\"\n",
"\n",
"# 3.8b\n",
"deltaV=1; # change in V is +1 and -1\n",
"deltaV_O=deltaV*r_Z/(R+r_Z); # corresponding change in output voltage\n",
"print round(deltaV_O*1000,1),\"= Line regulation (mV/V)\"\n",
"\n",
"# 3.8c\n",
"I_L=1*10**-3; # load current\n",
"deltaI_L=1*10**-3;\n",
"deltaI_Z=-1*10**-3; # change in zener current\n",
"deltaV_O=r_Z*deltaI_Z;\n",
"print round(deltaV_O*1000),\"= Load regulation (mV/mA)\"\n",
"\n",
"# 3.8d\n",
"I_L=6.8/2000; # load current with load resistance of 2000\n",
"deltaI_Z=-I_L;\n",
"deltaV_O=r_Z*deltaI_Z;\n",
"print round(deltaV_O*1000,2),\"= Corresponding change in zener voltage (mV) for zener current change of -3.4mA\"\n",
"\n",
"# 3.8e\n",
"R_L=0.5*10**3; # (ohm)\n",
"V_O=V*R_L/(R+R_L);\n",
"print V_O,\"V_O (V) for R_L=0.5K ohm\"\n",
"\n",
"# 3.8f\n",
"I_Z=0.2*10**-3; # Zener t be at the edge of breakdown I_Z=I_ZK\n",
"V_Z=6.7; # V_Z=V_ZK\n",
"I_Lmin=(9-6.7)/0.5; # Lowest current supplied to R\n",
"I_L=I_Lmin-I_Z; # load current\n",
"R_L=V_Z/I_L;\n",
"print round(R_L,1),\"= R_L (Kohm)\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"6.83 = V_O (V)\n",
"38.5 = Line regulation (mV/V)\n",
"-20.0 = Load regulation (mV/mA)\n",
"-68.0 = Corresponding change in zener voltage (V) for zener current change of -3.4mA\n",
"5.0 V_O (V) for R_L=0.5K ohm\n",
"1.5 = R_L (Kohm)\n"
]
}
],
"prompt_number": 29
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex3.9:pg-181"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Example 3.9 : Value of capacitance C that will result in peak-peak ripple of 2V\n",
"V_P=100.0; # (V)\n",
"V_r=2.0; # (V)\n",
"f=60.0; # (Hz)\n",
"R=10.0*10**3; # (ohm)\n",
"I_L=V_P/R;\n",
"C=V_P/(V_r*f*R);\n",
"print round(C*1000000,1),\"= C (microF)\"\n",
"wdeltat=math.sqrt(2*V_r/V_P);\n",
"print wdeltat,\"= Conduction angle (rad)\"\n",
"i_Dav=I_L*(1+math.pi*math.sqrt(2*V_P/V_r));\n",
"print round(i_Dav*1000),\"= i_Dav (A)\"\n",
"i_Dmax=I_L*(1+2*math.pi*math.sqrt(2*V_P/V_r));\n",
"print round(i_Dmax*1000),\"= i_Dmax (mA)\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"83.3 = C (microF)\n",
"0.2 = Conduction angle (rad)\n",
"324.0 = i_Dav (A)\n",
"638.0 = i_Dmax (mA)\n"
]
}
],
"prompt_number": 35
}
],
"metadata": {}
}
]
}
|