summaryrefslogtreecommitdiff
path: root/Modern_Communication_Circuits_by_J_R_Smith/2-Small_Signal_Amplifiers.ipynb
blob: f9c228ae7e136c03615c697ebaa07e2013b49403 (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
{
"cells": [
 {
		   "cell_type": "markdown",
	   "metadata": {},
	   "source": [
       "# Chapter 2: Small Signal Amplifiers"
	   ]
	},
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.10: SSA_Ex_2_10.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Small Signal Amplifiers\n",
"//example 2.10 page no 51\n",
"//given\n",
"Z1=1*10^3//asumming impedance value for required specification\n",
"Av=-50//voltage gain\n",
"Zf=-Av*Z1//feedback impedance\n",
"mprintf('Z1=%d K ohm \n feedback impedance (Zf)= %d K ohm',Z1*1e-3,Zf*1e-3)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.11: SSA_Ex_2_11.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Small Signal Amplifiers\n",
"//example 2.11 pag no 51\n",
"//given\n",
"wL=10^6//bandwidth\n",
"R1=1*10^3//taking resistance value for required specification\n",
"Av=-50//voltage gain\n",
"Rf=-Av*R1//feedback resistance\n",
"C=(wL*Rf)^-1//capacitance\n",
"mprintf('R1=%d K ohm \n feedback resistance= %d K  ohm \n capacitance= %d pF',R1*1e-3,Rf*1e-3,C*1e12)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.12: SSA_Ex_2_12.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Small Signal Amplifiers\n",
"//example 2.12 page no 53\n",
"//given\n",
"Aa=10^4//open loop gain\n",
"Rf=10^4//feedback resistance\n",
"Ri=100//input resistance\n",
"Av=-(Rf/Ri)/(1+(Ri+Rf)*(Aa*Ri))//actual amplifier gain\n",
"disp(Av,'the actual amplifier gain is ')"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.13: SSA_Ex_2_13.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Bipolar transistor amplifiers\n",
"//example 2.13 page no 53\n",
"//given\n",
"G=90//low frequency gain in dB\n",
"Ao=(G/20)//low frequency open loop gain\n",
"wT=150*10^6//gain bandwidth product\n",
"wo=wT/Ao//bandwidth\n",
"disp('the transfer function is')\n",
"disp('Av=3.16*e4/(1+jw/(2*pi*4.7*e3))')"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.14: SSA_Ex_2_14.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Small Signal Amplifiers\n",
"//example 2.14 page no 57\n",
"//given\n",
"Z1=1*10^3//assuming impedance value for required specification\n",
"Av=100//voltage gain\n",
"Z2=(Av-1)*Z1\n",
"mprintf('Z1=%d Kohm \n Z2=%d Kohm',Z1*1e-3,Z2*1e-3)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.1: SSA_Ex_2_1.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Small Signal Amplifiers\n",
"//example 2.1 page no 17\n",
"//given\n",
"B=100//current gain\n",
"Ic=10^-3//collector bias current\n",
"//kT/q=0.026 where as k=Boltzmanns constant T=temperature q=charge on an electron\n",
"rpi=(0.026*B)/Ic//base emitter resistance\n",
"mprintf('the base emitter resistance is %d ohm',rpi)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.2: SSA_Ex_2_2.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Small Signal Amplifiers\n",
"//example 2.2 page no 22\n",
"//given\n",
"Ic=10^-3//collector bias current\n",
"B=100//current gain\n",
"RL=4*10^3//load resistance\n",
"Rs=50//source resistance\n",
"gm=40*Ic//transconductance\n",
"rpi=B/gm//base emitter resistance\n",
"Av=(B*RL)/(rpi+Rs*(1+B))//voltage gain\n",
"disp(Av,'the voltage gain is ')\n",
"Ai=B/(1+B)//current gain\n",
"disp(Ai,'the current gain is ')\n",
"Zi=1/gm//input impedance\n",
"mprintf('the input impedance is %d ohm',Zi)\n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.3: SSA_Ex_2_3.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Small Signal Amplifiers\n",
"//example 2.3 page no 25\n",
"//given\n",
"Ic=40*10^-3//collector bias current\n",
"B=40//current gain\n",
"RL=50//load resistance\n",
"Rs=50//source resistance\n",
"rpi=(0.026*B)/Ic//base emitter resistance\n",
"Av=(B*RL)/(rpi+Rs+(1+B)*RL)//voltage gain\n",
"Ai=(1+B)//current gain\n",
"Ap=Ai*Av//power gain\n",
"mprintf('the power gain is %f \n',Ap)\n",
"Zo=(rpi+Rs)/(1+B)//output impedance\n",
"mprintf('the amplifier output impedance as per seen by 50 ohm \nresistance is %f ohm',Zo)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.4: SSA_Ex_2_4.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Small Signal Amplifiers\n",
"//example 2.4 page no 30\n",
"//given\n",
"VDS=15\n",
"IDSS=8*10^-3\n",
"gmo=4*10^-3\n",
"rd=13*10^3\n",
"ID=2*10^-3//drain current\n",
"Vs=0//source is grounded Vgs=Vg-Vs=Vi\n",
"RL=2*10^3//load resistance\n",
"R_L=(RL*rd)/(RL+rd)//equivalent load resistance\n",
"gm=gmo*sqrt(ID/IDSS)//transconductance\n",
"Av=-gm*R_L//voltage gain Av=Vo/Vi=-gm*R_L\n",
"mprintf('the midband voltage gain is %f ',Av)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.5: SSA_Ex_2_5.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Small Signal Amplifiers\n",
"//example 2.5 page no 32\n",
"//given\n",
"gm=60*10^-3//transconductance\n",
"Si=50//antenna source impedance\n",
"rd=2.5*10^3\n",
"Zo=rd/(1+gm*rd)//output impedance without load\n",
"RL=200//load resistance\n",
"zo1=200*Zo/(200+Zo)//output impedance with load\n",
"Av=gm*(rd*RL/rd+RL)/(1+gm*(rd*RL/rd+RL))//voltage gain\n",
"mprintf('the voltage gain is %f ',Av)\n",
"\n",
"\n",
""
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.6: SSA_Ex_2_6.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Small Signal Amplifiers\n",
"//example 2.6 page no 36\n",
"//given\n",
"RL=50//load resistance\n",
"gm=0.2//tranceconductance\n",
"B=100//current gain\n",
"rpi=B/gm//transistor input resistance\n",
"disp(rpi,'the transistor input resistance is ')\n",
"disp('The load resistance seen bythe first stage will be the 2k ohm resistor in parallel with Rb2 and the input impedance of the second stage That is R_L=1.05*10^3')\n",
"R_L=1.05*10^3\n",
"Rs=500//source resistance\n",
"IC1=2*10^-3//collector bias current\n",
"gm1=40*IC1//tranceconductance\n",
"disp(gm1,'the tranceconductance is in ohm ')\n",
"rpi1=B/gm1//transistor input resistance\n",
"disp(rpi1,'the transistor input resistance is in ohm ')\n",
"Av1=-gm1*R_L*(rpi1/(rpi1+Rs))//the voltage gain of first \n",
"disp(Av1,'the voltage gain of second stage is closed to unity the voltage gain of first is ')"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.8: SSA_Ex_2_8.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Small Signal Amplifiers\n",
"//example 2.8 page no 42\n",
"//given\n",
"disp('Assuming Vi (input voltage)=1')\n",
"V1=(5+10^6)/(5+2*10^6)//voltage on the positive terminal\n",
"V2=10^6/(5+2*10^6)//the voltage on the inverting terminal\n",
"ed=V1-V2//differential voltage\n",
"ec=(V1+V2)/2//common-mode voltage\n",
"Ad=2*10^3//differentail gain\n",
"Ac=2*10^-3//common mode gain (here 20% of differentail gain)\n",
"Vo=Ad*ed+Ac*ec//actual amplifier output\n",
"mprintf('the voltage gain is %3.2e Volts',Vo)"
   ]
   }
,
{
		   "cell_type": "markdown",
		   "metadata": {},
		   "source": [
			"## Example 2.9: SSA_Ex_2_9.sce"
		   ]
		  },
  {
"cell_type": "code",
	   "execution_count": null,
	   "metadata": {
	    "collapsed": true
	   },
	   "outputs": [],
"source": [
"clc\n",
"//Chapter 2:Small Signal Amplifiers\n",
"//example 2.9 page no 45\n",
"//given\n",
"ed=5*10^-3//differential voltage\n",
"ec=2.5*10^-3//common-mode voltage\n",
"gm=1.5*10^-3//tranceconductance\n",
"rd=500*10^3\n",
"Rs=150*10^3//source resistance\n",
"RL=10*10^3//load resistance\n",
"Ac=-gm*RL/(1+2*gm*Rs)//common mode gain \n",
"Ad=gm*RL/2//differential gain\n",
"Vo=ec*Ac+ed*Ad//actual amplifier output\n",
"mprintf('the output to the applied signal is %f mV',Vo*1e3)\n",
""
   ]
   }
],
"metadata": {
		  "kernelspec": {
		   "display_name": "Scilab",
		   "language": "scilab",
		   "name": "scilab"
		  },
		  "language_info": {
		   "file_extension": ".sce",
		   "help_links": [
			{
			 "text": "MetaKernel Magics",
			 "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
			}
		   ],
		   "mimetype": "text/x-octave",
		   "name": "scilab",
		   "version": "0.7.1"
		  }
		 },
		 "nbformat": 4,
		 "nbformat_minor": 0
}