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
|
{
"metadata": {
"name": "",
"signature": "sha256:e13354825bf2b4dbe3b80a8d5cababd4cb08909e23bd09123fe19184d491856f"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 2 - Resistive Capacitive RC Circuits"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E3 - Pg 36"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Calculate voltage after 8ms\n",
"c=1.#Capacitance of capacitor(in micro farad)\n",
"vs=6.#Source voltage(in volts)\n",
"r=10.#Resistor(in kilo ohm)\n",
"vi=-3.#Initial voltage(in volts)\n",
"t=8.#Time (in milli sec)\n",
"e=vs-((vs-vi)*2.718**(-t/(r*c)))\n",
"print '%s %.2f' %('Voltage after 8ms(in volts)=',e)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Voltage after 8ms(in volts)= 1.96\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E4 - Pg 38"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Determine (a)Ec at 1.5ms (b)Ec at 6ms\n",
"r1=1.#Resistor(in kilo ohm)\n",
"c1=1.#Capacitance(in micro farad)\n",
"e1=10.#Voltage(in volts)\n",
"r2=20.#Resistor(in kilo ohm)\n",
"c2=0.1#Capacitance(in micro farad)\n",
"e2=12.#Voltage(in volts)\n",
"t1=r1*c1*0.78\n",
"e=e1*1.\n",
"ec1=e*t1\n",
"t2=r2*c2*0.025\n",
"E=e2*1.\n",
"ec2=E*t2\n",
"print '%s %.1f %s %.1f'%('(a)Ec at 1.5ms(in volts) =',ec1,'\\n(b)Ec at 6ms(in volts) =',ec2)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"(a)Ec at 1.5ms(in volts) = 7.8 \n",
"(b)Ec at 6ms(in volts) = 0.6\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E5 - Pg 46"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Calculate Rise time,time for capacitor to charge to required amount and time required for complete charging\n",
"V=5.#Voltage source(in volts)\n",
"r=39.#Resistor(in kilo ohm)\n",
"c=500.#Capacitance of capacitor(in pf)\n",
"tr=2.2*r*c*10.**(-3)\n",
"t=r*c*10.**(-3)\n",
"tc=5*r*c*10.**(-3)\n",
"print '%s %.1f %s %.1f %s %.1f' %('Rise time=',tr,'\\ntime for 63.2% charging=',t,'\\nand time required for complete charging(in micro sec)=',tc)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Rise time= 42.9 \n",
"time for 63.2% charging= 19.5 \n",
"and time required for complete charging(in micro sec)= 97.5\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E6 - Pg 47"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Calculate minimum square wave frequency\n",
"C=1.#Coupling capacitor(in micro farad)\n",
"R=1.#Input resistance(in Mega ohm)\n",
"t=0.01#Tilt\n",
"PW=t*R*C\n",
"f=1./(2.*PW)\n",
"print '%s %.f' %('Frequency required(in hertz)=',f)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Frequency required(in hertz)= 50\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E7 - Pg 47"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Determine fastest rise time\n",
"r=600.#Output resistance(in ohms)\n",
"c=30.#Input capacitance(in pf)\n",
"tr=2.2*r*c*10.**(-3)\n",
"print '%s %.1f' %('Fastest rise time(in ns)=',tr)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Fastest rise time(in ns)= 39.6\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E8 - Pg 49"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Calculate voltage at 14 ms \n",
"Eo=0#Voltage at t=0sec(in volt)\n",
"E=20.#Peak voltage(in volts)\n",
"r=3.3#Resistance(in kilo ohm)\n",
"c=1.#Capacitance(in micro farad)\n",
"t1=4.#Time(in ms)\n",
"t2=2.#Time(in ms)\n",
"e1=E-((E-Eo)*(2.718)**(-t1/(r*c)))\n",
"e2=Eo-((Eo-e1)*(2.718)**(-t1/(r*c)))\n",
"e3=E-((E-e2)*(2.718)**(-t1/(r*c)))\n",
"e3=Eo-((Eo-e3)*(2.718)**(-t2/(r*c)))\n",
"print '%s %.2f' %('Voltage at 14ms(in volts)=',e3)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Voltage at 14ms(in volts)= 8.34\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E9 - Pg 50"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Determine max and min voltage at which capacitor voltage will settle\n",
"E=20.#Peak voltage(in volts)\n",
"t=4.#Time interval(in ms)\n",
"r=3.3#Resistance(in kilo ohms)\n",
"c=1.#Capacitance(in micro farad)\n",
"Emax=E/(1.+(2.718**(-t/(r*c))))\n",
"Emin=E-Emax\n",
"print '%s %.2f %s %.2f' %('Maximum voltage(in volts)=',Emax, '\\n minimum voltage(in volts)=',Emin)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Maximum voltage(in volts)= 15.41 \n",
" minimum voltage(in volts)= 4.59\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E10 - Pg 52"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Calculate output voltage for (a)10V and 1ms Pw (b)10V and 2ms PW (c)20V and 1ms PW\n",
"e1=10.#Voltage applied(in volts)\n",
"e0=0#Voltage at t=0sec(in volts)\n",
"t1=1.#PW(in ms)\n",
"t2=2.#PW(in ms)\n",
"e2=20.#Input voltage(in volts)\n",
"r=10.#Resistance(in kilo ohm)\n",
"c=20.#Capacitance(in micro farad)\n",
"eo1=(e1-((e1-e0)*(2.718)**(-t1/(r*c))))*1000\n",
"eo2=(e1-((e1-e0)*(2.718)**(-t2/(r*c))))*1000\n",
"eo3=(e2-((e2-e0)*(2.718)**(-t1/(r*c))))*1000\n",
"print '%s %.f %s %.f %s %.f' %('Output voltage for\\n(a)(in mv)=',eo1,'\\n(b)(in mv)=',eo2,'\\n(c)(in mv)=',eo3)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Output voltage for\n",
"(a)(in mv)= 50 \n",
"(b)(in mv)= 99 \n",
"(c)(in mv)= 100\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E11 - Pg 59"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Calculate output voltage for (a)10V and (b)20V\n",
"E1=10.#Input voltage(in volts)\n",
"E2=20.#Input voltage(in volts)\n",
"c=1.#Capacitance(in micro farad)\n",
"r=1.#Resistance(in kilo ohm)\n",
"t=100.#Pulse width(in ms)\n",
"i1=(c*E1*10.**(-6.))/(t*10.**(-3.))\n",
"eo1=i1*r*1000.\n",
"print '%s %.1f' %('Output voltage for (a)(in volts)=',eo1)\n",
"i2=(c*E2*10.**(-6.)/(t*10.**(-3.)))\n",
"eo2=i2*r*1000.\n",
"print '%s %.1f' %('Output voltage for (b)(in volts)=',eo2)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Output voltage for (a)(in volts)= 0.1\n",
"Output voltage for (b)(in volts)= 0.2\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E12 - Pg 59"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Caption:Calculate amplitude of output waveform for (a)Rise time (b)Fall time\n",
"r=1.#Resistance(in kilo ohm)\n",
"c=100.#Capacitance(in pf)\n",
"tr=1.#Rise time(in micro sec)\n",
"tf=3.#Fall time(in micro sec)\n",
"e1=8.#Change in voltage for rise time(in volts)\n",
"e2=-8.#Change in voltage for fall time(in volts)\n",
"eo1=r*c*0.001*e1/tr\n",
"print '%s %.1f' %('Amplitude of output waveform for (a)Rise time(in volts)=',eo1)\n",
"eo2=r*c*0.001*e2/tf\n",
"print '%s %.2f' %('Amplitude of output waveform for (b)Fall time(in volts)=',eo2)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Amplitude of output waveform for (a)Rise time(in volts)= 0.8\n",
"Amplitude of output waveform for (b)Fall time(in volts)= -0.27\n"
]
}
],
"prompt_number": 1
}
],
"metadata": {}
}
]
}
|