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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 3 : Operational Amplifier Characteristics "
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.1 Page No.108"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data \n",
"\n",
"Ri = 10*10**3\n",
"R1 = 10*10**6\n",
"Acl = 10\n",
"\n",
"# Solution \n",
"\n",
"Rf = Acl * R1\n",
"Rt = 47*10**3\n",
"Rs = (Rt**2)/(Rf - (2*Rt))\n",
"\n",
"# Displaying the results\n",
"\n",
"print \"The value of Rf = \",Rf/10**6,\"Mega Ohms\"\n",
"print \"Thevalue of Rs = \",Rs,\"Ohms\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of Rf = 100 Mega Ohms\n",
"Thevalue of Rs = 22 Ohms\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.2 Page No.110"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data\n",
"\n",
"Rf = 10*10**3\n",
"R1 = 10**3\n",
"Vios = 10*10**-3\n",
"Ib = 300*10**-9\n",
"Ios = 50*10**-9\n",
"\n",
"# Solution \n",
"# Solution for part a\n",
"Vot1 = (1 + (Rf/R1))*Vios + Rf*Ib\n",
"# Solution for part b \n",
"Rcomp = (Rf * R1)/(Rf + R1)\n",
"# Solution for part c\n",
"Vot2 = (1+(Rf/R1))*Vios + Rf*Ios \n",
"\n",
"# Displaying the values \n",
"\n",
"print \"The value of maximum output offset due to Vios and Ib = \", int( Vot1*10**3),\"mV\"\n",
"print \"The value of Rcomp = \",Rcomp,\"Ohms\" # Given answer in the textbook is not correct please make the change \n",
"print \"The value of maximum output offset if Rcomp is connected = \",Vot2*10**3,\"mV\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of maximum output offset due to Vios and Ib = 113 mV\n",
"The value of Rcomp = 909 Ohms\n",
"The value of maximum output offset if Rcomp is connected = 110.5 mV\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.3 Page No.111"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data \n",
"\n",
"Acl = 100\n",
"Temp0 = 25\n",
"Temp1 = 50\n",
"Vodrift = 0.15*10**-3\n",
"\n",
"# Solution \n",
"\n",
"Vos = Vodrift * (Temp1 - Temp0)\n",
"Vo = Vos * Acl\n",
"\n",
"# Displaying the results \n",
"\n",
"print \"The value of Input offset voltage = \",Vos*10**3,\"mV\"\n",
"print \"The value of Ooutput voltage = \",int(Vo*10**3),\"mV\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of Input offset voltage = 3.75 mV\n",
"The value of Ooutput voltage = 375 mV\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.4 Page No.125"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data \n",
"from scipy import signal\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"Vpp = 6.0\n",
"Frequency = 2*10**6\n",
"\n",
"# Solution \n",
"\n",
"WL = 1.0/Frequency # Calculating the wavelength \n",
"SR = Vpp/(WL/2) # Calculating the slew rate\n",
"\n",
"# Displaying the results \n",
"\n",
"print \"The value of slew rate is =\",int(SR*10**-6),\"V/us\"\n",
"\n",
"# Ploting the result \n",
"\n",
"Vp = 3\n",
"t = np.linspace(0, 1, 500)\n",
"plt.plot(t, -Vp*abs(signal.sawtooth(2 * np.pi * 2 * t))) # Note : Triangular wave is the absolute of sawtooth wave\n",
"plt.ylim(-3,0)\n",
"plt.title(\"Output wave form of example 3.4\")\n",
"plt.ylabel(\"Amplitude (V)\")\n",
"plt.xlabel(\"Time(t)\")\n",
"plt.show()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of slew rate is = 24 V/us\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.5 Page No.126"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math \n",
"# Given data \n",
"\n",
"Acl = 50\n",
"Slew_rate = 0.5\n",
"frequency = 20*10**3\n",
"# solution \n",
"\n",
"Vm = round((Slew_rate * 10**6)/(2*math.pi * frequency),2)\n",
"Vo = 2 * Vm\n",
"Vpeak_to_peak = Vo/Acl\n",
"\n",
"# Displaying the outputs \n",
"\n",
"print \"The peak voltage is =\",Vm,\"V peak\"\n",
"print \"The peak to peak voltage =\",Vo,\"V peak to peak\"\n",
"print \"The value of maximum input voltage is =\",int(Vpeak_to_peak*10**3),\"mVpeak to peak \" \n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The peak voltage is = 3.98 V peak\n",
"The peak to peak voltage = 7.96 V peak to peak\n",
"The value of maximum input voltage is = 159 mVpeak to peak \n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 3.6 Page No.127"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Given data \n",
"\n",
"Vptpi = 500*10**-3 #input peak to peak voltage \n",
"Vptpo = 3\n",
"Tr = 4*10**-6\n",
"\n",
"# Solution \n",
"\n",
"Vdelta = (0.9 - 0.1) * Vptpo\n",
"SR = (Vdelta / Tr ) * 10**-6\n",
"\n",
"# Display the values \n",
"\n",
"print \"The value of delta V = \",Vdelta,\"V\"\n",
"print \"The slew rate is = \",SR,\"V/us\"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The value of delta V = 2.4 V\n",
"The slew rate is = 0.6 V/us\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|