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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 6 - Multitransistor and Multistage Amplifier"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6_1 Page No. 168"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Av= 0.10\n",
"Av(dB)=20*log10(Av)= -20.00 dB \n",
"Av= 0.71\n",
"Av(dB)=20*log10(Av)= -3.01 dB \n",
"Av= 1.00\n",
"Av(dB)=20*log10(Av)= 0.00 dB \n",
"Av= 10.00\n",
"Av(dB)=20*log10(Av)= 20.00 dB \n",
"Av= 100.00\n",
"Av(dB)=20*log10(Av)= 40.00 dB \n",
"Av= 1000.00\n",
"Av(dB)=20*log10(Av)= 60.00 dB \n"
]
}
],
"source": [
"from math import log10\n",
"from __future__ import division \n",
"Av=0.1\n",
"print \"Av= %0.2f\"%(Av) #Voltage gain\n",
"AvdB=20*log10(Av)\n",
"print \"Av(dB)=20*log10(Av)= %0.2f\"%(AvdB),\"dB \" #Voltage gain in decibel\n",
"Av=0.707\n",
"print \"Av= %0.2f\"%(Av) #Voltage gain\n",
"AvdB=20*log10(Av)\n",
"print \"Av(dB)=20*log10(Av)= %0.2f\"%(AvdB),\"dB \" #Voltage gain in decibel\n",
"Av=1\n",
"print \"Av= %0.2f\"%(Av) #Voltage gain\n",
"AvdB=20*log10(Av)\n",
"print \"Av(dB)=20*log10(Av)= %0.2f\"%(AvdB),\"dB \" #Voltage gain in decibel\n",
"Av=10\n",
"print \"Av= %0.2f\"%(Av) #Voltage gain\n",
"AvdB=20*log10(Av)\n",
"print \"Av(dB)=20*log10(Av)= %0.2f\"%(AvdB),\"dB \" #Voltage gain in decibel\n",
"Av=100\n",
"print \"Av= %0.2f\"%(Av) #Voltage gain\n",
"AvdB=20*log10(Av)\n",
"print \"Av(dB)=20*log10(Av)= %0.2f\"%(AvdB),\"dB \" #Voltage gain in decibel\n",
"Av=1000\n",
"print \"Av= %0.2f\"%(Av) #Voltage gain\n",
"AvdB=20*log10(Av)\n",
"print \"Av(dB)=20*log10(Av)= %0.2f\"%(AvdB),\"dB \" #Voltage gain in decibel\n",
"#NOTE:calculated voltage gain in dB for Av=0.707 is -3.0116117dB "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6_2 Page No. 169"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Ri= 500.00 ohm\n",
"RL= 50.00 ohm\n",
"Vom= 1.00 volts\n",
"Vim= 0.00 volts\n",
"Av(in dB)=20*log10(Vo/Vi)= 60.00 dB \n",
"Iim= Vim/Ri= 0.00 A\n",
"Iom= Vom/RL= 0.02 A\n",
"Ai=20*log10(Io/Ii)= 80.00 dB \n",
"pi= Vi**2/Ri= 0.00 W\n",
"po= Vo**2/RL= 0.01 W\n",
"Ap=10*log10(po/pi)= 70.00 dB \n"
]
}
],
"source": [
"from math import sqrt,log10\n",
"from __future__ import division \n",
"Ri=0.5*10**(3)\n",
"print \"Ri= %0.2f\"%(Ri)+ \" ohm\" # Amplifier input resistance\n",
"RL=0.05*10**(3)\n",
"print \"RL= %0.2f\"%(RL)+ \" ohm\" # Load resistance\n",
"Vom=1\n",
"print \"Vom= %0.2f\"%(Vom),\" volts\" # Output voltage \n",
"Vo=Vom/sqrt(2)#RMS value of Output voltage \n",
"Vim=1*10**(-3)\n",
"print \"Vim= %0.2f\"%(Vim),\" volts\" # Peak Input voltage\n",
"Vi=Vim/sqrt(2)#RMS Input voltage \n",
"Av=20*log10(Vo/Vi)\n",
"print \"Av(in dB)=20*log10(Vo/Vi)= %0.2f\"%(Av),\" dB \" #Voltage gain in decibel\n",
"Iim=Vim/Ri\n",
"print \"Iim= Vim/Ri= %0.2f\"%(Iim),\" A\" # Input peak current\n",
"Ii=Iim/sqrt(2) #RMS value of input current\n",
"Iom=Vom/RL \n",
"print \"Iom= Vom/RL= %0.2f\"%(Iom),\" A\" # Output peak current\n",
"Io=Iom/sqrt(2) #RMS value of Output current\n",
"Ai=20*log10(Io/Ii)\n",
"print \"Ai=20*log10(Io/Ii)= %0.2f\"%(Ai),\" dB \" #Current gain in decibel\n",
"pi=Vi**2/Ri\n",
"print \"pi= Vi**2/Ri= %0.2f\"%(pi),\" W\" # Input power \n",
"po=Vo**2/RL\n",
"print \"po= Vo**2/RL= %0.2f\"%(po),\" W\" # Output power \n",
"Ap=10*log10(po/pi)\n",
"print \"Ap=10*log10(po/pi)= %0.2f\"%(Ap),\" dB \" #Power gain in decibel"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6_3 Page No. 172"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"RL= 1000.00 ohm\n",
"RF= 500000.00 ohm\n",
"Beta_o = 50.00\n",
"rbe= 1000.00 ohm\n",
"gm = 0.05 A/V\n",
"rc= 50000.00 ohm\n",
"part(i)\n",
"Adm1=(-gm*RL)= -50.00\n",
"Adm2=(0.5*gm*RL)= 25.00\n",
"Rid=2*rbe= 2000.00 ohm\n",
"Acm=(-RL)/(2*RF)= -1.00e-03\n",
"Ric=Beta_o*RF= 2.50e+07 ohm\n",
"CMRR=2*gm*RF= 50000.00\n",
"part(ii)\n",
"Vi1= -5.00e-04 volts\n",
"Vi2= 5.00e-04 volts\n",
"Vcm= 0.01 volts\n",
"Vd=Vi1-Vi2= -1.00e-03 volts\n",
"Vod=abs(Vd*Adm2)= 0.03 volts\n",
"Voc=abs(Vcm*Acm)= 1.00e-05 volts\n",
"percentage error=(Voc/Vod)*100= 0.04 %\n",
"part(iii)\n",
"RLeff=(RL*Rid)/(RL+Rid)= 666.67 ohm\n",
"Adm=gm*RLeff= 33.33\n",
"Acm=(-RLeff)/(2*RF)= -6.67e-04\n",
"CMRR=abs(Adm/(Acm))= 50000.00\n"
]
}
],
"source": [
"from __future__ import division \n",
"RL=1*10**(3)\n",
"print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n",
"RF=500*10**(3)\n",
"print \"RF= %0.2f\"%(RF)+ \" ohm\" #Feedback resistance\n",
"Beta_o=50\n",
"print \"Beta_o = %0.2f\"%(Beta_o) #BJT gain\n",
"rbe=1*10**(3)\n",
"print \"rbe= %0.2f\"%(rbe)+ \" ohm\" #Base-emitter resistance\n",
"gm=50*10**(-3)\n",
"print \"gm = %0.2f\"%(gm),\" A/V\"# transconductance for BJT \n",
"rc=50*10**(3)\n",
"print \"rc= %0.2f\"%(rc)+ \" ohm\" #collector resistance\n",
"print \"part(i)\"\n",
"Adm1=(-gm*RL)\n",
"print \"Adm1=(-gm*RL)= %0.2f\"%(Adm1) # Differential mode gain for BJT for DIDO and SIDO modes\n",
"Adm2=(0.5*gm*RL)\n",
"print \"Adm2=(0.5*gm*RL)= %0.2f\"%(Adm2) # Differential mode gain for BJT for DISO and SISO modes\n",
"Rid=2*rbe\n",
"print \"Rid=2*rbe= %0.2f\"%(Rid)+ \" ohm\" #input differential mode resistance\n",
"Acm=(-RL)/(2*RF)\n",
"print \"Acm=(-RL)/(2*RF)= %0.2e\"%(Acm) # Common mode gain for BJT for DISO and SISO modes\n",
"Ric=Beta_o*RF\n",
"print \"Ric=Beta_o*RF= %0.2e\"%(Ric)+ \" ohm\" # common mode input resistance\n",
"CMRR=2*gm*RF\n",
"print \"CMRR=2*gm*RF= %0.2f\"%(CMRR) # common mode rejection ratio\n",
"print \"part(ii)\"\n",
"Vi1=(-0.5)*10**(-3)\n",
"print \"Vi1= %0.2e\"%(Vi1),\" volts\" # input voltage1 \n",
"Vi2=(+0.5)*10**(-3)\n",
"print \"Vi2= %0.2e\"%(Vi2),\" volts\" # input voltage2\n",
"Vcm=(10)*10**(-3)\n",
"print \"Vcm= %0.2f\"%(Vcm),\" volts\" # common mode voltage\n",
"Vd=Vi1-Vi2\n",
"print \"Vd=Vi1-Vi2= %0.2e\"%(Vd),\" volts\" # differential voltage\n",
"Vod=abs(Vd*Adm2)\n",
"print \"Vod=abs(Vd*Adm2)= %0.2f\"%(Vod),\" volts\" # output differential voltage for DISO and SISO modes\n",
"Voc=abs(Vcm*Acm)\n",
"print \"Voc=abs(Vcm*Acm)= %0.2e\"%(Voc),\" volts\" # output common mode voltage\n",
"Error=(Voc/Vod)*100\n",
"print \"percentage error=(Voc/Vod)*100= %0.2f\"%(Error),\"%\"#percentage error due to CM signal\n",
"print \"part(iii)\"\n",
"RLeff=(RL*Rid)/(RL+Rid)\n",
"print \"RLeff=(RL*Rid)/(RL+Rid)= %0.2f\"%(RLeff)+ \" ohm\" # Effective load resistance\n",
"Adm=gm*RLeff\n",
"print \"Adm=gm*RLeff= %0.2f\"%(Adm) # Modified Differential mode gain for BJT for DIDO and SIDO modes\n",
"Acm=(-RLeff)/(2*RF)\n",
"print \"Acm=(-RLeff)/(2*RF)= %0.2e\"%(Acm) # Modified Common mode gain for BJT for DISO and SISO modes\n",
"CMRR=abs(Adm/(Acm))\n",
"print \"CMRR=abs(Adm/(Acm))= %0.2f\"%(CMRR) # Modified common mode rejection ratio\n",
"#NOTE: In Book, Formulae used for Acm in part(iii) is written as Acm=(-RL)/(2*RF)but ans is calculated by using RLeff in place of RL.So i have written formulae as Acm=(-RLeff)/(2*RF) in programming.\n",
"# Assigned variable name: in part(i) Adm for DIDO and SIDO modes is represented by Adm1 and Adm for DISO and SISO modes is represented by Adm2 to resist any anamoly in the programming."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6_4 Page No. 175"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"VCC= 10.00 volts\n",
"VEE=VCC= 10.00 volts\n",
"IQ = 0.00 ampere\n",
"VBE= 0.70 volts\n",
"part(i)\n",
"RL=VCC/IQ= 5000.00 ohm\n",
"Pomax=VCC**2/(2*RL)= 0.01 W\n",
"PDC=2*VCC*IQ= 0.04 W\n",
"Efficiency,Etta_max=(Pomax/PDC)*100= 25.00 %\n",
"PDmax=VCC*IQ= 0.02 W\n",
"part(ii)\n",
"Vcm= 5.00 volts\n",
"Po=Vcm**2/(2*RL)= 2.50e-03 W\n",
"Efficiency,Etta=(Po/PDC)*100= 6.25 %\n",
"PDCavg=PDmax-Po= 0.02 W\n"
]
}
],
"source": [
"from __future__ import division \n",
"VCC=(10)\n",
"print \"VCC= %0.2f\"%(VCC),\" volts\" # Collector voltage supply\n",
"VEE=VCC\n",
"print \"VEE=VCC= %0.2f\"%(VEE),\" volts\" # Emitter supply voltage\n",
"IQ=2*10**(-3)\n",
"print \"IQ = %0.2f\"%(IQ),\" ampere\" # operating current for CC class-Aamplifier\n",
"VBE=(0.7)\n",
"print \"VBE= %0.2f\"%(VBE),\" volts\" # Base-emitter voltage \n",
"print \"part(i)\"\n",
"RL=VCC/IQ\n",
"print \"RL=VCC/IQ= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n",
"Pomax=VCC**2/(2*RL)\n",
"print \"Pomax=VCC**2/(2*RL)= %0.2f\"%(Pomax),\" W\" # maximum Output power \n",
"PDC=2*VCC*IQ\n",
"print \"PDC=2*VCC*IQ= %0.2f\"%(PDC),\" W\" # Total D.C power supply\n",
"Etta_max=(Pomax/PDC)*100\n",
"print \"Efficiency,Etta_max=(Pomax/PDC)*100= %0.2f\"%(Etta_max),\"%\" #maximum power amplifier conversion efficiency\n",
"PDmax=VCC*IQ\n",
"print \"PDmax=VCC*IQ= %0.2f\"%(PDmax),\" W\" # maximum power dissipation \n",
"print \"part(ii)\"\n",
"Vcm=(5)\n",
"print \"Vcm= %0.2f\"%(Vcm),\" volts\" # common mode voltage\n",
"Po=Vcm**2/(2*RL)\n",
"print \"Po=Vcm**2/(2*RL)= %0.2e\"%(Po),\" W\" # Output power \n",
"Etta=(Po/PDC)*100\n",
"print \"Efficiency,Etta=(Po/PDC)*100= %0.2f\"%(Etta),\" %\" # power amplifier conversion efficiency\n",
"PDCavg=PDmax-Po#Using law of conservation of energy\n",
"print \"PDCavg=PDmax-Po= %0.2f\"%(PDCavg),\" W\" # Average power dissipated in BJT"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6_5 Page No. 178"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"VCC= 10.00 volts\n",
"VEE=VCC= 10.00 volts\n",
"ICQ_0 = 1.00e-02 ampere\n",
"RL= 5.00 ohm\n",
"part(i)\n",
"Po=0.00 W\n",
"PDC=2*VCC*ICQ_0= 0.20 W\n",
"part(ii)\n",
"Vcm=VCC = 10.00 volts\n",
"Icm = VCC/RL=2.00e+00 ampere\n",
"Po=(1/2)*(Icm*Vcm)=10.00 W\n",
"ICavg=(Icm)/(pi)=6.37e-01 ampere\n",
"PDC=2*VCC*ICavg= 12.73 W\n",
"Efficiency,Etta=(Po/PDC)*100= 78.54 %\n",
"part(iii)\n",
"Vcm1= 5.00 volts\n",
"ICavg1=(Vcm1)/(pi*RL)=3.18e-01 ampere\n",
"Po1=(Vcm1**2)/(2*RL)=2.50 W\n",
"PDC1=2*VCC*ICavg1= 6.37e+00 W\n",
"Efficiency,Etta=(Po1/PDC1)*100= 39.27 %\n"
]
}
],
"source": [
"from math import pi,sqrt\n",
"from __future__ import division \n",
"VCC=(10)\n",
"print \"VCC= %0.2f\"%(VCC),\" volts\" # Collector voltage supply\n",
"VEE=VCC\n",
"print \"VEE=VCC= %0.2f\"%(VEE),\" volts\" # Emitter supply voltage\n",
"ICQ_0=10*10**(-3)\n",
"print \"ICQ_0 = %0.2e\"%(ICQ_0),\" ampere\" # Zero signal collector current\n",
"RL=5\n",
"print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n",
"print \"part(i)\"\n",
"Po=0# Since Output power at Zero signal condition is Zero\n",
"print \"Po=%0.2f\"%(Po),\" W\" # Output power at Zero signal condition\n",
"PDC=2*VCC*ICQ_0\n",
"print \"PDC=2*VCC*ICQ_0= %0.2f\"%(PDC),\" W\" # Total D.C power supply for Zero signal condition\n",
"print \"part(ii)\"\n",
"Vcm=VCC#For Full output voltage swing Vcm=VCC\n",
"print \"Vcm=VCC = %0.2f\"%(Vcm),\" volts\" # common mode voltage for full swing condition\n",
"Icm=VCC/RL\n",
"print \"Icm = VCC/RL=%0.2e\"%(Icm),\" ampere\" # common mode current\n",
"Po=(1/2)*(Icm*Vcm)\n",
"print \"Po=(1/2)*(Icm*Vcm)=%0.2f\"%(Po),\" W\" # Output power at full swing condition\n",
"ICavg=(Icm)/(pi)\n",
"print \"ICavg=(Icm)/(pi)=%0.2e\"%(ICavg),\" ampere\" # Average value of common mode current\n",
"PDC=2*(ICavg*VCC)\n",
"print \"PDC=2*VCC*ICavg= %0.2f\"%(PDC),\" W\" # Total D.C power supply for full swing condition\n",
"Etta=(Po/PDC)*100\n",
"print \"Efficiency,Etta=(Po/PDC)*100= %0.2f\"%(Etta),\" %\" # power amplifier conversion efficiency\n",
"print \"part(iii)\"\n",
"Vcm1=(5)#given value\n",
"print \"Vcm1= %0.2f\"%(Vcm1),\" volts\" # common mode voltage for output swing Vcm=5 V\n",
"ICavg1=(Vcm1)/(pi*RL)\n",
"print \"ICavg1=(Vcm1)/(pi*RL)=%0.2e\"%(ICavg1),\" ampere\" # Average value of common mode current\n",
"Po1=(Vcm1**2)/(2*RL)\n",
"print \"Po1=(Vcm1**2)/(2*RL)=%0.2f\"%(Po1),\" W\" # Output power for output swing Vcm=5 V\n",
"PDC1=2*(ICavg1*VCC)\n",
"print \"PDC1=2*VCC*ICavg1= %0.2e\"%(PDC1),\" W\" # Total D.C power supply for output swing Vcm=5 V\n",
"Etta=(Po1/PDC1)*100\n",
"print \"Efficiency,Etta=(Po1/PDC1)*100= %0.2f\"%(Etta),\" %\" # power amplifier conversion efficiency for output swing Vcm=5 V\n",
"# NOTE:Correct value of Efficiency,Etta=(Po1/PDC1)*100= 39.269908 % for part(iii) but book ans is 39.31%(because of approximation used during calculation)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 6_6 Page No. 180"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Av= 100000.00\n",
"VCC= 10.00 volts\n",
"vo= VCC=10.00 volts\n",
"Vdmax= VCC/Av=1.00e-04 volts\n"
]
}
],
"source": [
"from __future__ import division \n",
"Av=1*10**(5)\n",
"print \"Av= %0.2f\"%(Av) #Voltage gain\n",
"VCC=(10)\n",
"print \"VCC= %0.2f\"%(VCC),\" volts\" # Collector voltage supply\n",
"vo=VCC\n",
"print \"vo= VCC=%0.2f\"%(vo),\" volts\" # maximum output voltage\n",
"Vdmax=VCC/Av\n",
"print \"Vdmax= VCC/Av=%0.2e\"%(Vdmax),\" volts\" # Difference input voltage at OP-amp terminals"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|