summaryrefslogtreecommitdiff
path: root/Electronic_devices_and_circuits_by_I.J_Nagrath/Chapter6.ipynb
blob: 721c027d23d06e6b8d91e4b83b1a6ea3ab127573 (plain)
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
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
{
 "metadata": {
  "name": "",
  "signature": "sha256:b6947316bc65682adaa8d93a4eda990ab9271382dd0514c03ae855d300a77db0"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 6: Feedback Amplifiers And Oscillators"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.1,Page number 331"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "Vo=12.            #output voltage(V)\n",
      "f=1.5*10**3       #frequency(Hz)\n",
      "h=0.25            #second harmonic content(%) \n",
      "ho=2.5            #reduced harmonic content of output(%)\n",
      "A=100             #power amplifier gain\n",
      "\n",
      "#Calculations\n",
      "Vd=Vo*h              #second harmonic content in output(V)\n",
      "Vd1=Vo*ho            #reduced value of second harmonic content(V)\n",
      "beta=((Vd1/Vd)-1)/A  #feedback gain from formula Vd1=Vd/(1+beta*A) \n",
      "Vs=Vo*(1+beta*A)/A   #signal voltage(V) from formula (A/(1+Beta*A))*Vs \n",
      "V=Vo/A               #signal input needed without feedback        \n",
      "s=Vs/V               #additional signal amplification needed before feedback amplifier\n",
      "\n",
      "#Results\n",
      "print\"feedback gain is\",beta\n",
      "print\"signal input to the overall system is\",s"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "feedback gain is 0.09\n",
        "signal input to the overall system is 10.0\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.2,Page number 332"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "w2=10**4.             #corner frequency(rad/s)  \n",
      "w2new=10**5.          #new corner frequency(rad/s)  \n",
      "Ao=1000.              #high frquency response        \n",
      "\n",
      "#Calculations\n",
      "beta=((w2new/w2)-1)/Ao #feedback factor\n",
      "Anew=Ao/(1+beta*Ao)   #overall gain of amplifier from formula w2new=w2(1+beta*Ao)\n",
      "p=w2*Ao               #gain bandwidth product without feedback from formula Anew=Ao/1+beta*Ao\n",
      "pnew=Anew*w2new       #gain bandwidth product with feedback\n",
      "\n",
      "#Results\n",
      "print\"beta is\",beta\n",
      "print\"overall gain is\",Anew\n",
      "print\"gain-bandwidth products with and without feedback are\",p,\"and\",pnew,\"resp.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "beta is 0.009\n",
        "overall gain is 100.0\n",
        "gain-bandwidth products with and without feedback are 10000000.0 and 10000000.0 resp.\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.3,Page number 333"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "A=100.                               #high frquency response        \n",
      "Af=100                               #gain     \n",
      "A1=A**2                              #forward gain\n",
      "A1new=50                             #gain reduces to 50%  \n",
      "\n",
      "#Calculations\n",
      "beta=((A1/Af)-1)/A1                  #feedback factor\n",
      "Afnew=A1new**2/(1+beta*A1new**2)     #new value of A\n",
      "g=Af-Afnew                           #reduction in overall gain\n",
      "\n",
      "#Results\n",
      "print\"% change in gain of feedback unit is\",round(g,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "% change in gain of feedback unit is 2.91\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.4,Page number 337"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "beta=0.008                   #positive gain \n",
      "\n",
      "#Calculations\n",
      "Ao=-(8/beta)**(1/3)          #A=Ao/2,so beta(A^3)=-1\n",
      "\n",
      "#Results\n",
      "print\"% change in gain of feedback unit is\",round(Ao/1E-1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "% change in gain of feedback unit is -10.0\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.5Page number 337"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import cmath\n",
      "from math import pi,degrees\n",
      "\n",
      "#Variable declarations\n",
      "A = complex(0,60)                  #amplifier\n",
      "B = complex(0,30)                  #amplifier\n",
      "AB = A*B\n",
      "C = (1+A)/AB                       #condition for oscillation\n",
      "phi = cmath.phase(C)               #phase\n",
      "\n",
      "#Result\n",
      "print \"C =\",round(abs(C),4),\"with phase =\",round(degrees(phi),2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "C = 0.0333 with phase = -90.95\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.7,Page number 347"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "Rbb=8*10**3                  #base resistance(k ohms)\n",
      "eta=0.7                     #efficiency\n",
      "R1=0.2                      #R1(k ohms)\n",
      "Rt=40*10**3                 #Rt(ohms)\n",
      "Ct=0.12*10**-6              #capacitance(F)\n",
      "Vv=2                        #capacitor is charged to voltage(V)\n",
      "Iv=10*10**-3                #current to capacitor(A)\n",
      "Ip=10*10**-3                 #peak current(A)\n",
      "Vd=0.7                      #diode voltage(V)\n",
      "V=12.                        #voltage(V)\n",
      "\n",
      "#Calculations\n",
      "#Part a\n",
      "Rb1=eta*Rbb    #base resistance(ohms) \n",
      "Rb2=Rbb-Rb1             #base resistance(ohms)\n",
      "\n",
      "#Part b\n",
      "Vp=Vd+((Rb1+R1)*V/(Rbb+R1))    #peak voltage(V)\n",
      "\n",
      "#Part c\n",
      "Rtmin=(V-Vv)/Iv          #Rt minimum(k ohms)        \n",
      "Rtmax=(V-Vp)/Ip          #Rt minimum(k ohms)  \n",
      "\n",
      "#Part d\n",
      "Rb11=.12                #resistance during discharge(ohms)\n",
      "t1=Rt*Ct*1.27           #charging time(mS)\n",
      "t2=(Rb11+R1)*Ct*1.52    #discharging time(uS)\n",
      "T=t1+t2                 #cycle time\n",
      "foscE=1/T               #oscillations frequency(Hz)\n",
      "foscA=1/(Rt*Ct*1.2)     #oscillations frequency(Hz)\n",
      "\n",
      "#Part e\n",
      "vR1=(R1*V)/(R1+Rbb)             #vR1 at discharging period\n",
      "vR1d=(R1*(Vp-Vd))/(R1+Rb11)      #vR1 at discharging period\n",
      "\n",
      "#Results\n",
      "print\"Rb1 and Rb2 are\",round((Rb1/1E+3),1),\"k ohms and\",round((Rb2/1E+3),1),\"k ohms resp.\"\n",
      "print\"Vp is\",round(Vp,1),\"V\"\n",
      "print\"Rtmin is\",round(Rtmin/1E+3),\",k ohms and Rtmax is\",round(Rtmax/1E+1),\"k ohms,hence Rt is in the range\"\n",
      "print\"foscE is\",round(foscE),\"Hz and foscA is\",round(foscA),\"Hz\"\n",
      "print\"vR1 is\",round((vR1/1E-3),3),\"and vRd1 is\",round(vR1d,2),\"V (range of Rt is wrong in the book)\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rb1 and Rb2 are 5.6 k ohms and 2.4 k ohms resp.\n",
        "Vp is 9.1 V\n",
        "Rtmin is 1.0 ,k ohms and Rtmax is 29.0 k ohms,hence Rt is in the range\n",
        "foscE is 164.0 Hz and foscA is 174.0 Hz\n",
        "vR1 is 0.3 and vRd1 is 5.25 V (range of Rt is wrong in the book)\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.8,Page number 350"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "A=1500                         #voltage gain\n",
      "beta=1/25.                     #current gain \n",
      "\n",
      "#Calculations\n",
      "#Part a\n",
      "Af=A/(1+A*beta)                 #voltage gain with feedback\n",
      "\n",
      "#Part b\n",
      "g=0.1                        #amplifier gain changes by 10%=0.1\n",
      "gf=g/(1+A*beta)              #% by which its gain in feedback mode changes dAf/Af\n",
      "\n",
      "#Results\n",
      "print\"Amplifier gain with feedback is\",round(Af,1)\n",
      "print\"% by which gain in feedback changes is\",round((gf/1E-2),3),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Amplifier gain with feedback is 24.6\n",
        "% by which gain in feedback changes is 0.164 %\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.9,Page number 351"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "A=500                      #voltage gain\n",
      "beta=1/20.                 #current gain\n",
      "Ro=50*10**3                #output resistance(ohms) \n",
      "Ri=1.5*10**3               #input resistance(ohms)\n",
      "\n",
      "#Calculations\n",
      "#Part a\n",
      "Af=A/(1+A*beta)            #voltage gain with feedback   \n",
      "\n",
      "#Part b\n",
      "Rif=Ri*(1+(A*beta))         #input resistance(k ohms)\n",
      "Rof=Ro/(1+A*beta)           #output resistance(k ohms)\n",
      "\n",
      "#Results\n",
      "print\"Amplifier gain is\",round(Af,2)\n",
      "print\"input resistance is\",round(Rif/1E+3),\"K ohms and output resistance is\",round((Rof/1E+2),2),\"Kohms\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Amplifier gain is 19.23\n",
        "input resistance is 39.0 K ohms and output resistance is 19.23 Kohms\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.10,Page number 351"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "Ro=50*10**3                 #output resistance(ohms)\n",
      "Rd=10*10**3                 #drain resistance(ohms)\n",
      "R1=800*10**3                #resistance(ohms)\n",
      "R2=200*10**3                #resistance(ohms)\n",
      "gm=5500*10**-6              #transconduuctance(us)\n",
      "\n",
      "#Calculations\n",
      "r=(Rd*Ro)/(Rd+Ro)            #Rd||Ro\n",
      "R=R1+R2                      #combined resistance of R1 and R2\n",
      "Rl=(R*r)/(R+r)               #load resistance(ohms)\n",
      "A=-gm*Rl                     #voltage gain without feedback\n",
      "beta=R2/(R1+R2)              #current gain \n",
      "Af=A/(1+A*beta)              #voltage gain with feedback\n",
      "\n",
      "#Results\n",
      "print\"Amplifier gain with feedback is\",round((Af/1E+1),1),\"and without feedback is\",A"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Amplifier gain with feedback is -4.5 and without feedback is -45.452\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.11,Page number 352"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "Re=1.25*10**3              #emitter resistance(ohms)\n",
      "Rc=4.8*10**3                #collector resistance(ohms)\n",
      "Rb=800*10**3               #base resistance(ohms)     \n",
      "rpi=900                    #dynamic resistance(ohms)\n",
      "Vcc=16                     #supply voltage(V)\n",
      "beta=100.                  #current gain \n",
      "\n",
      "#Calculations\n",
      "A=-(beta/rpi)             #amplifier voltage gain  \n",
      "B=-Re                     \n",
      "V=(A*Rc)/(1+B*A)          #V=Vo/Vs\n",
      "   \n",
      "#Results\n",
      "print\"Amplifier voltage gain is\",round(V,1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Amplifier voltage gain is -3.8\n"
       ]
      }
     ],
     "prompt_number": 58
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.12,Page number 352"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " import math\n",
      "\n",
      "#Variable declaration\n",
      "C1=800*10**-9                   #capacitance(F)\n",
      "C2=2400*10**-9                  #capacitance(F)\n",
      "L=50*10**-6                     #inductance(H)\n",
      "\n",
      "#Calculations\n",
      "Ceq=(C1*C2)/(C1+C2)                #equivalent capacitance(F)\n",
      "fo=1/(2*math.pi*math.sqrt(L*Ceq))  #output frequency(Hz)\n",
      "\n",
      "#Results\n",
      "print\"the oscillation frequency is\",round((fo/1E+3),2),\"KHz\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the oscillation frequency is 29.06 KHz\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.13,Page number 353"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "C=200*10**-9               #capacitance(F)\n",
      "Lrcf=0.5*10**-3            #shunt across L2\n",
      "L1=800*10**-6              #inductance(H)\n",
      "L2=800*10**-6              #inductance(H)\n",
      "M=200*10**-6              \n",
      "\n",
      "#Calculations\n",
      "L21=(L2*Lrcf)/(L2+Lrcf)                  #effective value of L2(uH)\n",
      "Leq=L1+L21+2*M                           #equivalent inductance(H)\n",
      "fo=1/(2*math.pi*math.sqrt(Leq*C))        #output frequency(Hz)\n",
      "\n",
      "#Results\n",
      "print\"the oscillation frequency is\",round((fo/1E+3),2),\"KHz\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the oscillation frequency is 9.17 KHz\n"
       ]
      }
     ],
     "prompt_number": 13
    }
   ],
   "metadata": {}
  }
 ]
}