summaryrefslogtreecommitdiff
path: root/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter5.ipynb
blob: 437b0a3635551c18790381f60d0663489dd7d7f8 (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
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
{
 "metadata": {
  "name": "",
  "signature": "sha256:9eef90d3b867f35b7e7b7ae71f5d96e96e47a495dc677c7492d34992d7905497"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 5:Large Signals Amplifiers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.1,Page number 280"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "Rb=1*10**3                    #base resistance(ohms)\n",
      "Vcc=20                        #supply voltage(V)\n",
      "Rc=20                         #collector resistance(ohms) \n",
      "beeta=25                      #current gain \n",
      "Vbe=0.7                       #base to emitter voltage(V) \n",
      "ib=10*10**-3                  #base current(ohms)\n",
      "\n",
      "#Calculations\n",
      "Ibq=(Vcc-Vbe)/Rb               #current(A)\n",
      "Icq=beeta*Ibq                  #current(A)\n",
      "Vceq=Vcc-(Icq*Rc)              #collector voltage(V)\n",
      "ic=beeta*ib                    #collector current(A)\n",
      "Po=((ic/(math.sqrt(2)))**2)*Rc #output voltage(V)\n",
      "Pi=Vcc*Icq                     #input power(W)\n",
      "eta=(Po/Pi)*100                #efficiency     \n",
      "Pd=Pi-((Icq**2)*Rc)-Po         #power dissipated(W)   \n",
      "\n",
      "#Results\n",
      "print\"input power is Pi\",Pi,\"W\"\n",
      "print\"output power is Po\",Po,\"W\"\n",
      "print\"power dissipated is\",round(Pd,1),\"W\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "input power is Pi 9.65 W\n",
        "output power is Po 0.625 W\n",
        "power dissipated is 4.4 W\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.2,Page number 283"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration \n",
      "Rl=500                           #load resistance(ohms)\n",
      "Vceq=50                          #queinscent collector voltage(V)\n",
      "beetamin=30                      #current gain minimum(at Q)\n",
      "Icq=0.4                          #queinscent collector current(A)\n",
      "Ibq=8                            #queinscent base current(mA)\n",
      "\n",
      "#Calculations\n",
      "Rac=Vceq/Icq                       #ac resistance(ohms)\n",
      "beeta=(Icq*10**-3)/Ibq             #current gain\n",
      "Re=5/Icq                           #emitter resistance(ohms)\n",
      "Rc=(512.5*Rac)/(512.5-Rac)         #as Re+Rl=500+12.5=512.5\n",
      "Vcc=5+Vceq+(Icq*Rc)                #supply voltage(V)   \n",
      "Rb=(beetamin*Re)/10                #base resistance(ohms)\n",
      "R1=39.5                            #solving 125=Rc||(Rl+Re) and Vbb=Vcc*(R1/(R1+R2))\n",
      "R2=750\n",
      "Pi=120*Icq                         #Vcc chosen as 120\n",
      "r=(Rc*Rl)/(Rc+Rl)\n",
      "Poac=(100/(2*math.sqrt(2)))**2/r  #output power(W)\n",
      "etamax=Poac/Pi                    #efficiency\n",
      "Poac1=(100/(2*math.sqrt(2)))**2/Rl #ac power absorbed by load(W)\n",
      "eta=Poac1/Pi   \n",
      "Pc=(Icq**2)*Rc                  #power lost in Rc(W)\n",
      "Pe=(Icq**2)*Re                  #power lost in Re(W)\n",
      "Pd=Pi-Pc-Pe-Poac                  #power consumed(W)\n",
      "\n",
      "#Results\n",
      "print\"input power is Pi\",Pi,\"W\"\n",
      "print\"output power is Po\",round(Poac,2),\"W\"\n",
      "print\"dissipated power is\",round(Pd,2),\"W\"\n",
      "print\"values of R1,R2,Re and Rc are\",R1,\"ohms,\",R2,\"ohms,\",Re,\"ohms and\",round(Rc),\"ohms resp. (Calculated value of Rc is wrong in the book)\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "input power is Pi 48.0 W\n",
        "output power is Po 10.06 W\n",
        "dissipated power is 9.49 W\n",
        "values of R1,R2,Re and Rc are 39.5 ohms, 750 ohms, 12.5 ohms and 165.0 ohms resp. (Calculated value of Rc is wrong in the book)\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.3,Page number 285"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "Pmax=10                         #power maximum(W)\n",
      "Ic=1                            #collector current(A)\n",
      "Vcemax=100                      #max collector to emitter current(V)\n",
      "Vcemin=2                        #min collector to emitter current(V)\n",
      "\n",
      "#Calculations\n",
      "#Part a\n",
      "Vceq=46                       #Vce at Q point             \n",
      "Icq=0.21                      #Ic  at Q point             \n",
      "Vcc=92                        #supply voltage(V)\n",
      "ic=0.42                       #collector current(A) \n",
      "\n",
      "#Part b\n",
      "Rl=Vceq/Icq                       #load resistance(ohms)\n",
      "\n",
      "#Part c\n",
      "Pi=Vcc*Icq                        #input power(W)\n",
      "Po=((ic/(2*math.sqrt(2)))**2)*Rl  #output power(W)\n",
      "eta=(Po/Pi)*100                   #efficiency\n",
      "\n",
      "#Results\n",
      "print\"Rl for maximum power input is\",round(Rl),\"ohms\"\n",
      "print\"input power is is\",Pi,\"W\"\n",
      "print\"Po is\",Po\n",
      "print\"eta is\",eta,\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Rl for maximum power input is 219.0 ohms\n",
        "input power is is 19.32 W\n",
        "Po is 4.83\n",
        "eta is 25.0 %\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.4,Page number 286"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "Vcc=15                   #supply voltage(V)\n",
      "beeta=40.                #current gain\n",
      "Icq=5.                   #Ic at Q(mA)\n",
      "Vceq=7.5                 #Vce at Q(V)      \n",
      "icswing=10               #swing in ic(mA) \n",
      "\n",
      "#Calculations\n",
      "#Part a\n",
      "Rl=Vceq/Icq*10**-3       #load resistance(ohms)    \n",
      "\n",
      "#Part b\n",
      "Ibq=Icq/beeta            #base current at Q(uA)\n",
      "\n",
      "#Part c\n",
      "ibswing=icswing/beeta                   #swing in ib(mA)\n",
      "Pac=Rl*(icswing/(2*math.sqrt(2)))**2    #ac power(W)\n",
      "Pdc=Vcc*(Icq*10**-3)                    #dc power(W)\n",
      "eta=(Pac/Pdc)*100                       #efficiency\n",
      "\n",
      "#Results\n",
      "print\"a)value of Rl is\",round(Rl/1E-6),\"ohms\"\n",
      "print\"b)Ibq is\",round(Ibq/1E-3),\"uA\"\n",
      "print\"c)ac power output is\",round((Pac/1E-3),2),\"mW\"\n",
      "print\"efficiency is\",eta,\"%\"\n",
      "print\"corresponding swing in ib is\",ibswing,\"mA\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a)value of Rl is 1500.0 ohms\n",
        "b)Ibq is 125.0 uA\n",
        "c)ac power output is 18.75 mW\n",
        "efficiency is 25.0 %\n",
        "corresponding swing in ib is 0.25 mA\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.5,Page number 288"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "Vcc=Vce=10                  #supply voltage(V)  \n",
      "Icq=140*10**-3              #Ic at Q point(A)\n",
      "Rl=8                        #load resistance(ohms)\n",
      "vce=16                      #instantaneous collector to emitter voltage(V)\n",
      "ic=235*10**-3               #instantaneous collector current(A)\n",
      "\n",
      "#Calculations\n",
      "RL=Vcc/Icq\n",
      "r=math.sqrt(RL/Rl)                             #load resistance for max ac swing(ohms)\n",
      "Po=(vce*ic)/(2*math.sqrt(2)*2*math.sqrt(2))    #output power(W)\n",
      "Pi=Vcc*Icq                                     #input power(W)   \n",
      "eta=Po/Pi                                      #efficiency\n",
      "Pd=Pi-Po                                       #dissipated power(W)  \n",
      "\n",
      "#Results\n",
      "print\"a)transformation ratio is\",round(r)\n",
      "print\"c)power output is\",Po,\"W\"\n",
      "print\"efficiency is\",round(eta*100,2),\"%\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a)transformation ratio is 3.0\n",
        "c)power output is 0.47 W\n",
        "efficiency is 33.57 %\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.6,Page number 290"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "Rl=4.5                    #load resistance(ohms)\n",
      "Vceq=50                   #Vc at point Q(V)\n",
      "Icq=400*10**-3            #Ic at Q(A)\n",
      "Re=12.5                   #emitter resistance(ohms)\n",
      "Vcemax=90                 #from figure \n",
      "Vcemin=10                 #from figure\n",
      "Icmax=730                 #max Ic(mA)\n",
      "Icmin=30                  #min Ic(mA)   \n",
      "\n",
      "#Calculations\n",
      "#Part a\n",
      "Rac=Vceq/Icq                #ac resistance(ohms)\n",
      "n=math.sqrt(Rac/Rl)         #as n=N1/N2 and Rac=(N1/N2)^2*Rl\n",
      "\n",
      "#Part b\n",
      "Vcc=Vceq+(Icq*Re)           #supply voltage(V)   \n",
      "\n",
      "#Part c\n",
      "vce=Vcemax-Vcemin                                    #instantaneous collector to emitter voltage(V)\n",
      "ic=Icmax-Icmin                                       #instantaneous collector current(mA)\n",
      "Po=(vce*ic)/((2*math.sqrt(2))*(2*math.sqrt(2)))      #output voltage(V)\n",
      "Pi=Vcc*Icq                                           #input voltage(V)  \n",
      "eta=(Po/Pi)*100                                      #efficiency\n",
      "Pd=Pi-(Icq**2*Re)-Po*10**-3                          #dissipated power(W)\n",
      "\n",
      "#Results\n",
      "print\"a)transformation ratio is\",round(n,2)\n",
      "print\"b)Vcc is\",Vcc,\"V\"\n",
      "print\"c)power efficiency for the load is\",round((eta/1E+3),1),\"%\"\n",
      "print\"power dissipated is\",Pd,\"W\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a)transformation ratio is 5.27\n",
        "b)Vcc is 55.0 V\n",
        "c)power efficiency for the load is 31.8 %\n",
        "power dissipated is 13.0 W\n"
       ]
      }
     ],
     "prompt_number": 36
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.7,Page number 295"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Finding input power,output power,Pd,efficiency,\n",
      "\n",
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "Vcc=30                        #supply voltage(V)\n",
      "Rl=16                         #load resistance(ohms)    \n",
      "n=2                           #transformation ratio\n",
      "Im=1                          #peak value of current(A)\n",
      "etamax=78.54                  #max efficiency(%)\n",
      "\n",
      "#Calculations\n",
      "#Part a\n",
      "Rl1=Rl*(n/2)**2                  #load resistance(ohms)\n",
      "Pi=(2*Vcc*Im)/math.pi            #input power(W)\n",
      "Pimax=(2*Vcc**2)/((math.pi)*Rl1) #input power max(W)\n",
      "\n",
      "#Part b\n",
      "Po=((Im**2)*Rl1)/2               #output power(W)\n",
      "Pomax=(Vcc**2)/(2*Rl1)           #output power max(W)\n",
      "\n",
      "#Part c\n",
      "eta=Po/Pi                        #efficiency\n",
      "                \n",
      "\n",
      "#Part d\n",
      "P=((2*Vcc*Im)/math.pi)-((Im**2*Rl1)/2) #Power dissipated by transistors(W)\n",
      "Pd=P/2                                 #power dissipated by each transistors\n",
      "Pmax=(2*Vcc**2)/((math.pi)**2*Rl1)     #max power dissipated by transistors\n",
      "Pdmax=Pmax/2                           #max power dissipated by each transistor\n",
      "\n",
      "#Results\n",
      "print\"a)input power is\",round(Pi,1),\"W and  max input power is\",round(Pimax,2),\"W\"\n",
      "print\"b)output power \",Po,\"W and max output power is\",round(Pomax,2),\"W\"\n",
      "print\"c)power efficiency for the load is\",round((eta/1E-2),2),\"% and its max value is\",etamax,\"%\"\n",
      "print\"power dissipated by each transiator is\",round(Pd,1),\"W and  max value is\",round(Pdmax,1),\"W\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a)input power is 19.1 W and  max input power is 35.81 W\n",
        "b)output power  8 W and max output power is 28.0 W\n",
        "c)power efficiency for the load is 41.89 % and its max value is 78.54 %\n",
        "power dissipated by each transiator is 5.5 W and  max value is 5.7 W\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.8,Page number 296"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#Variable declaration\n",
      "Pd=10\n",
      "\n",
      "#Calculations\n",
      "#Part a\n",
      "Poacmax=10.                #as Pd=Po(ac)max by class A\n",
      "\n",
      "#Part b\n",
      "Pd=2*Poacmax               #power dissipated(W)\n",
      "Poacmax1=146/2             #max output power by class B\n",
      "f=Poacmax1/Poacmax         #factor by which power of class B is greater than class A\n",
      "                \n",
      "#Results\n",
      "print\"maximum signal output powerclass A produce is\",Poacmax,\"W\"\n",
      "print\"maximum signal output powerclass  produce is\",Poacmax1,\"W\"\n",
      "print\"factor by which power in class b is larger than power in class A transformer is\",f"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "maximum signal output powerclass A produce is 10.0 W\n",
        "maximum signal output powerclass  produce is 73 W\n",
        "factor by which power in class b is larger than power in class A transformer is 7.3\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.9,Page number 300"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "Vcc=30.                          #supply voltage(V)\n",
      "Im=1                             #peak value of current(A)\n",
      "Rl=10.                           #load resistance(ohms)\n",
      "\n",
      "#Calculations\n",
      "#Part a\n",
      "Pi=(Vcc*Im)/math.pi             #input power(W)\n",
      "Pimax=(Vcc**2)/(math.pi*2*Rl)   #max input power(W)\n",
      "\n",
      "#Part b\n",
      "Po=((Im**2)*Rl)/2               #output power(W)\n",
      "Pomax=(Vcc**2)/(8*Rl)           #output power max(W)\n",
      "\n",
      "#Part c\n",
      "eta=Po/Pi                     #efficiency\n",
      "etamax=Pomax/Pimax            #efficiency max                \n",
      "\n",
      "#Part d\n",
      "Pd=Pi-Po                             #Power dissipated by transistors(W)                            \n",
      "Pmax=(Vcc**2)/(2*(math.pi)**2*Rl)    #max power dissipated by transistors\n",
      "                              \n",
      "#Results\n",
      "print\"a)input power is \",round(Pi,2),\"W and max input power is\",round(Pimax,2),\"W\"\n",
      "print\"b)output power is \",Po,\"W and max output power is\",round(Pomax,2),\"W\"\n",
      "print\"c)power efficiency for the load is\",round((eta/1E-2),2),\"% and its max value is\",round((etamax/1E-2),2),\"%\"\n",
      "print\"power dissipated and its max value are\",round(Pd,2),\"W and\",round(Pmax,2),\"W\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a)input power is  9.55 W and max input power is 14.32 W\n",
        "b)output power is  5.0 W and max output power is 11.25 W\n",
        "c)power efficiency for the load is 52.36 % and its max value is 78.54 %\n",
        "power dissipated and its max value are 4.55 W and 4.56 W\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.10,Page number 303"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "P1=2                          #transistor power(W)\n",
      "Rl=5*10**3.                   #load resistance()\n",
      "Ic=35                         #collector current(mA)   \n",
      "\n",
      "#Calculations\n",
      "Bo=40-Ic                           \n",
      "B1=math.sqrt((2*P1)/Rl)\n",
      "B2=Bo\n",
      "D2=(B2/B1)*100                #second harmonic distortion(%)\n",
      "\n",
      "#Results\n",
      "print\"second harmonic distortion is\",round((D2/1E+3),2),\"%\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "second harmonic distortion is 17.68 %\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.12,Page number 314"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "Vcc=15.                            #supply voltage(V)\n",
      "Rl=10.                             #load resistance(ohms)\n",
      "\n",
      "#Calculations\n",
      "#Part a\n",
      "Immax=Vcc/Rl                      #max peak current(A)\n",
      "Irmsmax=Immax/(math.sqrt(2))      #max rms current(A)\n",
      "Pomax=Irmsmax**2*Rl               #max output power(W)\n",
      "Pi=(2*Vcc*Immax)/math.pi          #max input power(W)\n",
      "eta=Pomax/Pi                      #efficiency\n",
      "\n",
      "#Part b \n",
      "Im=(2*Vcc)/(math.pi*Rl)                       #peak current(A)\n",
      "Pdmax=((2*Vcc*Im)/(math.pi))-((Im**2*Rl)/2)   #max power dissipated(W)\n",
      "eta1=((Im**2)*Rl*math.pi)/(2*2*Vcc*Im)        #efficiency\n",
      "\n",
      "#Results\n",
      "print\"a)max signal output power,collector dissipation  are\",Pomax,\"W,\",round(Pi,2),\"W and efficiency is\",round((eta/1E-2),2),\"%\"\n",
      "print\"b)max dissipation of each transistor and corresponding efficiency is\",round(Pdmax,2),\"W and\",eta1,\"resp.\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "a)max signal output power,collector dissipation  are 11.25 W, 14.32 W and efficiency is 78.54 %\n",
        "b)max dissipation of each transistor and corresponding efficiency is 4.56 W and 0.5 resp.\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.13,Page number 315"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculations\n",
      "eta=0.5              #As Po(ac)=Vcc^2/2*pi^2*Rl and Pi(dc)=Vcc^2/pi^2*Rl\n",
      "                     #put these in eta=Po(ac)/Pi(dc) which is 1/2=0.5  \n",
      "    \n",
      "#Results\n",
      "print\"push pull amplifier efficiency is\",round(eta/1E-2),\"%\"\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "push pull amplifier efficiency is 50.0 %\n"
       ]
      }
     ],
     "prompt_number": 27
    }
   ],
   "metadata": {}
  }
 ]
}