summaryrefslogtreecommitdiff
path: root/Linear_Integrated_Circuits_by_J._B._Gupta/chapter04_2.ipynb
blob: a745c198834c3ca1cb1740808809c9d0cacd5524 (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
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter-4 : Frequency Response Of An Op-Amp"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 4.1 - Page No 134"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "# Given data\n",
      "Vin= 0.5 # in V\n",
      "Av= 10 \n",
      "I_B_max= 1.5 # in micro amp\n",
      "I_B_max=I_B_max*10**-6 # in A\n",
      "# Let\n",
      "I1=100*I_B_max # in A\n",
      "R1= Vin/I1 # in ohm\n",
      "Rf= Av*R1 # in ohm\n",
      "# R2= R1 || Rf = R1 (approx.)\n",
      "R2= R1 # in ohm\n",
      "print \"Value of I1 = %0.f micro amp\" %(I1*10**6)\n",
      "print \"Value of R1 = %0.1f kohm\" %(R1*10**-3)\n",
      "print \"Value of R2 = %0.1f kohm\" %(R2*10**-3)\n",
      "print \"Value of Rf = %0.f kohm\" %(Rf*10**-3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Value of I1 = 150 micro amp\n",
        "Value of R1 = 3.3 kohm\n",
        "Value of R2 = 3.3 kohm\n",
        "Value of Rf = 33 kohm\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 4.2 - Page No 134"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import log10\n",
      "# Given data\n",
      "Vin= 50 # in mV\n",
      "Vin = Vin*10**-3 # in V\n",
      "I_B_max= 200 # in nA\n",
      "I_B_max=I_B_max*10**-9 # in A\n",
      "I1=100*I_B_max # in A(assumed)\n",
      "Av=100 \n",
      "R1= Vin/I1 # in \u03a9\n",
      "print \"The value of  R1 = %0.1f k\u03a9 (Standard value 2.2 k\u03a9)\" %(R1*10**-3)\n",
      "R1= 2.2 # kohm (standard value)\n",
      "Rf= Av*R1 # in kohm\n",
      "print \"The value of Rf = %0.f k\u03a9\" %Rf\n",
      "# R2 = R1 || Rf = R1 (approx)\n",
      "R2= R1 # in kohm\n",
      "print \"The value of R2 = %0.1f k\u03a9\" %R2\n",
      "Av= 20*log10(Av) # in dB\n",
      "C1= 100 # in pF\n",
      "R1= 1.5 # in k\u03a9\n",
      "C2= 3 # in pF\n",
      "print \"Voltage gain = %0.f dB\" %Av\n",
      "print \"Value of C1 = %0.f pF\" %C1\n",
      "print \"Value of C2 = %0.f pF\" %C2\n",
      "print \"Value of R1 = %0.1f k\u03a9\" %R1"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of  R1 = 2.5 k\u03a9 (Standard value 2.2 k\u03a9)\n",
        "The value of Rf = 220 k\u03a9\n",
        "The value of R2 = 2.2 k\u03a9\n",
        "Voltage gain = 40 dB\n",
        "Value of C1 = 100 pF\n",
        "Value of C2 = 3 pF\n",
        "Value of R1 = 1.5 k\u03a9\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 4.3 - Page No 136\n",
      "    "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "A_VD= 200 # in V/mV\n",
      "A_VD=A_VD*10**3 # in V/V\n",
      "B1=1 # in MHz\n",
      "B1=B1*10**6 # in Hz\n",
      "f1=B1 \n",
      "f0= f1/A_VD # in Hz\n",
      "print \"Cut-off frequency = %0.f Hz\" %f0"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Cut-off frequency = 5 Hz\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 4.4 - Page No 143\n",
      "    "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from numpy import pi\n",
      "# Given data\n",
      "Vin= 15 # in volt\n",
      "SR= 0.8 # in V/micro sec\n",
      "SR=SR*10**6 # in V/sec\n",
      "omega= SR/Vin \n",
      "f= omega/(2*pi) # in Hz\n",
      "print \"Full power bandwidth = %0.1f kHz\" %(f*10**-3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Full power bandwidth = 8.5 kHz\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 4.5 - Page No 143\n",
      "    "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "SR= 2 # in V/micro sec\n",
      "del_v_in= 0.5 # in volt\n",
      "del_t=10 #in micro sec\n",
      "del_v_inBYdel_t= del_v_in/del_t # in V/micro sec\n",
      "# v_out= A_CL*v_in\n",
      "A_CL= SR/del_v_inBYdel_t \n",
      "print \"Closed-loop gain = %0.f \" %A_CL"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Closed-loop gain = 40 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 4.6 - Page No 144"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "Vpp= 3 # in volts\n",
      "del_V= Vpp*(90-10)/100 # in volts\n",
      "del_t= 4 # in micro sec\n",
      "SR_required= del_V/del_t # in V/micro sec\n",
      "print \"The required SR = %0.1f V/micro sec\" %SR_required\n",
      "print \"(i)  The 741 op-amp has an SR of 0.5 volts per micro second. It is too slow so it cannot be used\"\n",
      "print \"(ii) The 318 op-amp has an SR of 50 volts per micro second. It is fast enough and can be used.\"\n",
      "SR= 50 # V/micro sec\n",
      "# Rise time using a 318 op-amp,\n",
      "del_t= del_V/SR # in micro sec \n",
      "del_t= del_t*10**3 # in ns\n",
      "print \"     The reise time using 318 op-amp = %0.f ns\" %del_t\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The required SR = 0.6 V/micro sec\n",
        "(i)  The 741 op-amp has an SR of 0.5 volts per micro second. It is too slow so it cannot be used\n",
        "(ii) The 318 op-amp has an SR of 50 volts per micro second. It is fast enough and can be used.\n",
        "     The reise time using 318 op-amp = 48 ns\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 4.7 - Page No 144"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from numpy import pi\n",
      "# Given data\n",
      "Vout= 6 # in volts\n",
      "Vin= 20*10**-3 # in V\n",
      "Vrms= 1.414\n",
      "Vout_peak= 6*Vrms # in volts\n",
      "f_max= 15 # in kHz\n",
      "# Required closed loop gain\n",
      "A_CL= Vout/Vin \n",
      "# Required SR\n",
      "SRmax= 2*pi*Vout_peak*f_max # in V/micro sec\n",
      "print \"(i)  The 741 has an SR of 0.5 V/micro sec. It is too slow and would distort the sine wave output.\"\n",
      "print \"(ii) The 318 has an SR of 50 V/micro sec. It is fast enough to develop a 6 Vrms sine wave output at 15 kHz.\"\n",
      "f_1per= 15 # kHz\n",
      "# The gain bandwidth,\n",
      "GBW= 7*A_CL*f_1per # in kHz\n",
      "GBW= GBW*10**-3 # in MHz\n",
      "print \"     The gain bandwidth = %0.1f MHz\" %GBW\n",
      "print \"     The GBW for 318 op-amp is only 15 MHz. So even though the 318 op-amp satisfies the SR requirement but\"\n",
      "print \"     it does not have a large enough GBW to proved a gain of 300 (\u00b11 %) at 15 kHz\"\n",
      "\n",
      "A_CL= 10\n",
      "GBW10= 7*A_CL*f_1per # in kHz\n",
      "GBW10= GBW10*10**-3 # in MHz\n",
      "print \"GBW (Gain of 10) = %0.2f MHz\" %GBW10\n",
      "A_CL= 30\n",
      "GBW30= 7*A_CL*f_1per # in kHz\n",
      "GBW30= GBW30*10**-3 # in MHz\n",
      "print \"GBW (Gain of 30) = %0.2f MHz\" %GBW30\n",
      "print \"The 318 op-amp has a large enough gain bandwidth to operate both amplifiers.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(i)  The 741 has an SR of 0.5 V/micro sec. It is too slow and would distort the sine wave output.\n",
        "(ii) The 318 has an SR of 50 V/micro sec. It is fast enough to develop a 6 Vrms sine wave output at 15 kHz.\n",
        "     The gain bandwidth = 31.5 MHz\n",
        "     The GBW for 318 op-amp is only 15 MHz. So even though the 318 op-amp satisfies the SR requirement but\n",
        "     it does not have a large enough GBW to proved a gain of 300 (\u00b11 %) at 15 kHz\n",
        "GBW (Gain of 10) = 1.05 MHz\n",
        "GBW (Gain of 30) = 3.15 MHz\n",
        "The 318 op-amp has a large enough gain bandwidth to operate both amplifiers.\n"
       ]
      }
     ],
     "prompt_number": 30
    }
   ],
   "metadata": {}
  }
 ]
}