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
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 16 Op-Amp Negative Feedback"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 16.1 Page No 385"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The output voltage = 49.98 mV\n",
"The error voltage = 0.50 µV\n"
]
}
],
"source": [
"# given data\n",
"A=100000.0##unit less\n",
"R1= 98.0*10**3## Ω\n",
"R2= 2.0*10**3## Ω\n",
"Vin= 1.*10**-3## V\n",
"B= R2/(R1+R2)## unit less\n",
"A_CL= 1/B## unit less\n",
"A_CL= A/(1+A*B)## unit less\n",
"# The output voltage \n",
"Vout= Vin*A_CL## V\n",
"# The error voltage \n",
"Verror= Vout/A## V\n",
"Vout= Vout*10**3## mV\n",
"Verror= Verror*10**6## µV\n",
"print \"The output voltage = %.2f mV\"%Vout\n",
"print \"The error voltage = %.2f µV\"%Verror"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 16.2 Page No 386"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The value of A_CL = 49.88\n",
"The value of Vout = 49.88 mV\n",
"The value of Verror = 2.49 µV\n"
]
}
],
"source": [
"# given data\n",
"A=20000#\n",
"B= 0.02#\n",
"Vin= 1## mV\n",
"Vin= Vin*10**-3## V\n",
"# The closed loop voltage gain,\n",
"A_CL= A/(1+A*B)#\n",
"# The output voltage,\n",
"Vout= Vin*A_CL## V\n",
"# The error voltage,\n",
"Verror= Vout/A## V\n",
"Vout= Vout*10**3## mV\n",
"Verror= Verror*10**6## µV\n",
"print \"The value of A_CL = %.2f\"%A_CL\n",
"print \"The value of Vout = %.2f mV\"%Vout\n",
"print \"The value of Verror = %.2f µV\"%Verror"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 16.3 Page No 389"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The closed loop input impedence = 201.80 MΩ\n",
"The closed loop output impedence = 0.74 Ω\n"
]
}
],
"source": [
"# given data\n",
"A=100000.0#\n",
"R1= 100.0*10**3## Ω\n",
"R2= 100.0## Ω\n",
"r_in= 2.0*10**6## Ω\n",
"r_out= 75.0## Ω\n",
"B= R2/(R1+R2)## unit less\n",
"# The closed loop input impedence \n",
"r_in_CL= (1+A*B)*r_in## Ω\n",
"# The closed loop output impedence \n",
"r_out_CL= r_out/(1+A*B)## Ω\n",
"r_in_CL=r_in_CL*10**-6## Mohm\n",
"print \"The closed loop input impedence = %.2f MΩ\"%r_in_CL\n",
"print \"The closed loop output impedence = %.2f Ω\"%r_out_CL"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 16.4 Page No 389"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The closed loop voltage gain = 1.00\n",
"The closed-loop input impedance = 202.00 MΩ\n",
"The closed-loop output impedance = 7.50e-04 Ω\n",
"The output offset voltage = 5.51 mV\n"
]
}
],
"source": [
"# given data\n",
"A=100.0#\n",
"R_B= 39.0*10**3## Ω\n",
"r_in= 2.0*10**6## Ω\n",
"r_out= 75.0## Ω\n",
"Vin_off= 2.0*10**-3## V\n",
"I_B1= 90.0*10**-9## A\n",
"I_in_off= 20.0*10**-9## A\n",
"# The closed loop voltage gain \n",
"B=1## unit less\n",
"# The closed-loop input impedance\n",
"r_in_CL= (1.0+A*B)*r_in## Ω\n",
"r_in_CL= r_in_CL*10**-6## Mohm\n",
"print \"The closed loop voltage gain = %.2f\"%B\n",
"print \"The closed-loop input impedance = %.2f MΩ\"%r_in_CL\n",
"A=100000.0#\n",
"# The closed-loop output impedance\n",
"r_out_CL= r_out/A## Ω\n",
"print \"The closed-loop output impedance = %.2e Ω\"%r_out_CL\n",
"#Let V= V1-V2 = Vin_off+I_B1*R_B\n",
"V= Vin_off+I_B1*R_B## A\n",
"# The output offset voltage \n",
"Voo_CL= A*V/A## V\n",
"Voo_CL= Voo_CL*10**3## mV\n",
"print \"The output offset voltage = %.2f mV\"%Voo_CL"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 16.5 Page No 393"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The closed-loop voltage gain = 22.00\n",
"The desensitivity = 4545.45\n"
]
}
],
"source": [
"# given data\n",
"R_F= 22.0*10**3## Ω\n",
"R_S= 1.0*10**3## Ω\n",
"A= 100000.0## unit less\n",
"# The closed-loop voltage gain\n",
"A_CL= R_F/R_S#\n",
"# The desensitivity\n",
"desensitivity= A/A_CL#\n",
"print \"The closed-loop voltage gain = %.2f\"%A_CL\n",
"print \"The desensitivity = %.2f\"%desensitivity"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 16.6 Page No 396"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"For A_CL= 1000, The value of f_CL = 1.00 kHz\n",
"For A_CL= 100, The value of f_CL = 10.00 kHz\n",
"For A_CL= 10, The value of f_CL = 100.00 kHz\n",
"For A_CL= 1, The value of f_CL = 1.00 MHz\n"
]
}
],
"source": [
"# given data\n",
"f_unity= 1.0*10**6## Hz\n",
"# For A_CL= 1000, The value of f_CL\n",
"A_CL= 1000.0#\n",
"f_CL= f_unity/A_CL## Hz\n",
"f_CL= f_CL*10**-3## kHz\n",
"print \"For A_CL= 1000, The value of f_CL = %.2f kHz\"%f_CL\n",
"# For A_CL= 100, The value of f_CL\n",
"A_CL= 100.0#\n",
"f_CL= f_unity/A_CL## Hz\n",
"f_CL= f_CL*10**-3## kHz\n",
"print \"For A_CL= 100, The value of f_CL = %.2f kHz\"%f_CL\n",
"# For A_CL= 10, The value of f_CL\n",
"A_CL= 10.0#\n",
"f_CL= f_unity/A_CL## Hz\n",
"f_CL= f_CL*10**-3## kHz\n",
"print \"For A_CL= 10, The value of f_CL = %.2f kHz\"%f_CL\n",
"# For A_CL= 1, The value of f_CL\n",
"A_CL= 1.0#\n",
"f_CL= f_unity/A_CL## Hz\n",
"f_CL= f_CL*10**-6## MHz\n",
"print \"For A_CL= 1, The value of f_CL = %.2f MHz\"%f_CL"
]
}
],
"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
}
|