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
|
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 15 : Operational Amplifier"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 15.1a, Page No 572"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#initialisation of variables\n",
"v11=50.0 #in microV\n",
"v21=-50.0 #in microV\n",
"#Second Set of Input Signal\n",
"v12=1050.0 #in microV\n",
"v22=950.0 #in microV\n",
"p=100.0 #Common Mode Rejection Ratio\n",
"\n",
"#Required Formulae\n",
"#vo = Ad*vd*(1+vc/p*vd) .... p = commom mode rejection ratio\n",
"#Ad will be same for both case, So let us write Vo = vo/Ad = Ad*(1+vc/p*vd)\n",
"\n",
"#Calculations\n",
"#First Set of Values\n",
"vd1=v11-v21#in microV\n",
"vc1=(v11+v21)/2#in microV\n",
"Vo1 = vd1*(1+vc1/(p*vd1))\n",
"\n",
"#Second Set of Values\n",
"vd2=v12-v22#in microV\n",
"vc2=(v12+v22)/2#in microV\n",
"Vo2 = vd2*(1+vc2/(p*vd2))\n",
"\n",
"#Results\n",
"print(\"Percentage difference in output signal = %.2f v \" %(100*(Vo2-Vo1)/Vo1))\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Percentage difference in output signal = 10.00 v \n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 15.1b, Page No 572"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#initialisation of variables\n",
"v11=50.0 #in microV\n",
"v21=-50.0 #in microV\n",
"#Second Set of Input Signal\n",
"v12=1050.0 #in microV\n",
"v22=950.0 #in microV\n",
"p=100.0 #Common Mode Rejection Ratio\n",
"\n",
"#Required Formulae\n",
"#vo = Ad*vd*(1+vc/p*vd) .... p = commom mode rejection ratio\n",
"#Ad will be same for both case, So let us write Vo = vo/Ad = Ad*(1+vc/p*vd)\n",
"\n",
"#Calculations\n",
"#First Set of Values\n",
"vd1=v11-v21#in microV\n",
"vc1=(v11+v21)/2#in microV\n",
"Vo1 = vd1*(1+vc1/(p*vd1))\n",
"\n",
"#Second Set of Values\n",
"vd2=v12-v22#in microV\n",
"vc2=(v12+v22)/2#in microV\n",
"Vo2 = vd2*(1+vc2/(p*vd2))\n",
"\n",
"\n",
"#Now we have to calculate the same thing with common mode rejection ratio = 10000\n",
"\n",
"p=10000#Common Mode Rejection Ratio\n",
"\n",
"#First Set of Values\n",
"vd1=v11-v21#in microV\n",
"vc1=(v11+v21)/2#in microV\n",
"Vo1 = vd1*(1+vc1/(p*vd1))\n",
"\n",
"#Second Set of Values\n",
"vd2=v12-v22#in microV\n",
"vc2=(v12+v22)/2#in microV\n",
"Vo2 = vd2*(1+vc2/(p*vd2))\n",
"\n",
"#Results\n",
"print(\"Percentage difference in output signal = %.2f v \" %(100*(Vo2-Vo1)/Vo1))\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Percentage difference in output signal = 0.10 v \n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 15.2 Page No 576"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#initialisation of variables\n",
"Vbe1=0.7\n",
"Vce3=0.2\n",
"I3=5.0\n",
"R3=0.4\n",
"Vee=5\n",
"Vcc=5\n",
"Ic1=2.5\n",
"Rc=1.0\n",
"\n",
"#Calculations\n",
"Vcmmin=Vbe1+Vce3+(I3*R3)-Vee\n",
"Vcmmax=Vcc-(Ic1*Rc)+0.6\n",
"\n",
"#Results\n",
"print(\"The Vcm can vary from = %.2f v to \" %Vcmmin)\n",
"print(\"%.2f v \" %Vcmmax)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Vcm can vary from = -2.10 v to \n",
"3.10 v \n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 15.3 Page No 583"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#initialisation of variables\n",
"Vbe2=0.7\n",
"Vce1=0.2\n",
"I1=0.99\n",
"R1=2.2\n",
"Vee=6\n",
"Vcc=6\n",
"Ic2=0.495\n",
"R2=7.75\n",
"Vbc2=0.6\n",
"\n",
"#Calculations\n",
"Vcmmin=Vbe2+Vce1+(I1*R1)-Vee\n",
"Vcmmax=Vcc-(Ic2*R2)+0.6\n",
"\n",
"#Results\n",
"print(\"The Vcm can vary from = %.2f v to \" %Vcmmin)\n",
"print(\"%.2f v \" %Vcmmax)\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The Vcm can vary from = -2.92 v to \n",
"2.76 v \n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 15.4 Page No 596"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#initialisation of variables\n",
"\n",
"f=32.0 #feedback in dB\n",
"#from the Bodes plot we get that Avo = 2510\n",
"Avo = 2510.0 #gain\n",
"print('The parameters are R , r (for Rdash), C (for Cdash)')\n",
"#Desensivity D = B*Rmo = Avo*(R/(R+r))\n",
"#20log10(D ) = f\n",
"\n",
"#Calculations\n",
"k = f - (20*math.log(Avo,10))\n",
"#Let (R+r)/R = l\n",
"l = 1.0/(10**(k/20))\n",
"#R/(R+r) = fp/fz\n",
"#For 45degree phase margin and 32dB of low frequency feedback we find by trial and error method from the graph\n",
"fz = 10#in MHz\n",
"fp = fz*l\n",
"#to determine c we can arbitrarily choose R\n",
"R = 1000.0 #in ohm\n",
"\n",
"#Results\n",
"print(\"R = %.2f ohm \" %R)\n",
"r = (l-1)*R\n",
"print(\"r = %.2f ohm \" %r)\n",
"C = 1/(2*math.pi*fz*r*10**-6)\n",
"print(\"C = %.2f pF \" %C)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The parameters are R , r (for Rdash), C (for Cdash)\n",
"R = 1000.00 ohm \n",
"r = 62048.35 ohm \n",
"C = 0.26 pF \n"
]
}
],
"prompt_number": 5
}
],
"metadata": {}
}
]
}
|