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
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
|
{
"metadata": {
"name": "",
"signature": "sha256:5db7f11d16032beee814462a087253a6b78ac4c2f805e28898833a5c147fee39"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h1>Chapter 32: The superposition theorem</h1>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 1, page no. 564</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"rv1 = 100;# in volts\n",
"rv2 = 50;# in volts\n",
"thetav1 = 0;# in degrees\n",
"thetav2 = 90;# in degrees\n",
"r1 = 25;# in ohm\n",
"R = 20;# in ohm\n",
"r2 = 10;# in ohm\n",
"\n",
" #calculation:\n",
" #voltage\n",
"V1 = rv1*math.cos(thetav1*math.pi/180) + 1j*rv1*math.sin(thetav1*math.pi/180)\n",
"V2 = rv2*math.cos(thetav2*math.pi/180) + 1j*rv2*math.sin(thetav2*math.pi/180)\n",
" #The circuit diagram is shown in Figure 32.7. Following the above procedure:\n",
" #The network is redrawn with the 50/_90\u00b0 V source removed as shown in Figure 32.8\n",
" #Currents I1, I2 and I3 are labelled as shown in Figure 32.8.\n",
"I1 = V1/(r1 + r2*R/(R + r2))\n",
"I2 = (r2/(r2 + R))*I1\n",
"I3 = (R/(r2 + R))*I1\n",
" #The network is redrawn with the 100/_0\u00b0 V source removed as shown in Figure 32.9\n",
" #Currents I4, I5 and I6 are labelled as shown in Figure 32.9.\n",
"I4 = V2/(r2 + r1*R/(r1 + R))\n",
"I5 = (r1/(r1 + R))*I4\n",
"I6 = (R/(r1 + R))*I4\n",
" #Figure 32.10 shows Figure 32.9 superimposed on Figure 32.8, giving the currents shown.\n",
" #Current in the 20 ohm load,\n",
"I20 = I2 + I5\n",
" #Current in the 100/_0\u00b0 V source\n",
"IV1 = I1 - I6\n",
" #Current in the 50/_90\u00b0 V source\n",
"IV2 = I4 - I3\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n (a)current in the 20 ohm load is \",round(I20.real,2),\" + (\",round(I20.imag,2),\")i A\"\n",
"print \"\\n (b)Current in the 100/_0deg V source is \",round(IV1.real,2),\" + (\",round(IV1.imag,2),\")i A\"\n",
"print \"\\n (b)Current in the 50/_90deg V source is \",round(IV2.real,2),\" + (\",round(IV2.imag,2),\")i A\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
" (a)current in the 20 ohm load is 1.05 + ( 1.32 )i A\n",
"\n",
" (b)Current in the 100/_0deg V source is 3.16 + ( -1.05 )i A\n",
"\n",
" (b)Current in the 50/_90deg V source is -2.11 + ( 2.37 )i A"
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 2, page no. 566</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"V1 = 12;# in volts\n",
"V2 = 20;# in volts\n",
"R1 = 5;# in ohm\n",
"R2 = 4;# in ohm\n",
"R3 = 2.5;# in ohm\n",
"R4 = 6;# in ohm\n",
"R5 = 2;# in ohm\n",
"\n",
"#calculation:\n",
" #Removing the 20 V source gives the network shown in Figure 32.12.\n",
" #Currents I1 and I2 are shown labelled in Figure 32.12\n",
"Re1 = (R4*R5/(R4 + R5)) + R3\n",
"Re2 = Re1*R2/(Re1 + R2) + R1\n",
"I1 = V1/Re2\n",
"I2 = (R2/(Re1 + R2))*I1\n",
" #Removing the 12 V source from the original network gives the network shown in Figure 32.14.\n",
" #Currents I3, I4 and I5 are shown labelled in Figure 32.14.\n",
"Re3 = (R1*R2/(R1 + R2)) + R3\n",
"Re4 = Re3*R4/(Re3 + R4) + R5\n",
"I3 = V2/Re4\n",
"I4 = (R4/(Re3 + R4))*I3\n",
"I5 = (R1/(R1 + R2))*I4\n",
" #Superimposing Figure 32.14 on Figure 32.12 shows that the current flowing in the 4 ohm resistor is given by\n",
"Ir4 = I5 - I2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\ncurrent in the 4 ohm resistor of the network is \",round(Ir4,2),\" A\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
"current in the 4 ohm resistor of the network is 0.48 A"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 3, page no. 567</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"rv1 = 30;# in volts\n",
"rv2 = 30;# in volts\n",
"thetav1 = 45;# in degrees\n",
"thetav2 = -45;# in degrees\n",
"R1 = 4;# in ohm\n",
"R2 = 4;# in ohm\n",
"R3 = 1j*3;# in ohm\n",
"R4 = -1j*10;# in ohm\n",
"\n",
" #calculation:\n",
" #voltage\n",
"V1 = rv1*math.cos(thetav1*math.pi/180) + 1j*rv1*math.sin(thetav1*math.pi/180)\n",
"V2 = rv2*math.cos(thetav2*math.pi/180) + 1j*rv2*math.sin(thetav2*math.pi/180)\n",
" #The network is redrawn with V2 removed, as shown in Figure 32.17.\n",
" #Current I1 and I2 are shown in Figure 32.17. From Figure 32.17,\n",
"Re1 = R4*(R2 + R3)/(R4 + R3 + R2)\n",
"Re2 = Re1 + R1\n",
" #current\n",
"I1 = V1/Re2\n",
"I2 = (R4/(R2 + R3 + R4))*I1\n",
" #The original network is redrawn with V1 removed, as shown in Figure 32.18\n",
" #Currents I3 and I4 are shown in Figure 32.18. From Figure 32.18,\n",
"Re3 = R1*(R2 + R3)/(R1 + R3 + R2)\n",
"Re4 = Re3 + R4\n",
"I3 = V2/Re4\n",
"I4 = (R1/(R2 + R3 + R1))*I3\n",
" #If the network of Figure 32.18 is superimposed on the network of Figure 32.17, \n",
" #it can be seen that the current in the (4+i3) ohm impedance is given by\n",
"Ir4i3 = I2 - I4\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"current in (4 + i3) ohm impedance of the network is \",round(Ir4i3.real,2),\" + (\",round( Ir4i3.imag,2),\")i A\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"current in (4 + i3) ohm impedance of the network is 2.15 + ( 0.42 )i A\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 4, page no. 568</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"E1 = 5 + 0j;# in volts\n",
"E2 = 2 + 4j;# in volts\n",
"Z1 = 3 + 4j;# in ohm\n",
"Z2 = 2 - 5j;# in ohm\n",
"Z3 = 6 + 8j;# in ohm\n",
"\n",
"#calculation:\n",
" #The original network is redrawn with E2 removed, as shown in Figure 32.20.\n",
" #Currents I1, I2 and I3 are labelled as shown in Figure 32.20.\n",
"Ze1 = Z3*Z2/(Z3 + Z2)\n",
"Ze2 = Ze1 + Z1\n",
" #current\n",
"I1 = E1/Ze2\n",
"I2 = (Z2/(Z3 + Z2))*I1\n",
"I3 = (Z3/(Z3 + Z2))*I1\n",
" #The original network is redrawn with E1 removed, as shown in Figure 32.22\n",
" #Currents I4, I5 and I6 are shown labelled in Figure 32.22 \n",
" #with I4 flowing away from the positive terminal of the E2 source.\n",
"Ze3 = Z3*Z1/(Z3 + Z1)\n",
"Ze4 = Ze3 + Z2\n",
"I4 = E2/Ze4\n",
"I5 = (Z1/(Z3 + Z1))*I4\n",
"I6 = (Z3/(Z3 + Z1))*I4\n",
" #If the network of Figure 32.18 is superimposed on the network of Figure 32.17, \n",
" #it can be seen that the current in the (4+i3) ohm impedance is given by\n",
"i1 = I1 + I6\n",
"i2 = I3 + I4\n",
"i3 = I2 - I5\n",
" #magnitude\n",
"i1mag = abs(i1)\n",
"i2mag = abs(i2)\n",
"E1mag = abs(E1)\n",
"E2mag = abs(E2)\n",
" #phase\n",
"phi1 = cmath.phase(complex(i1.real,i1.imag))\n",
"phi2 = cmath.phase(complex(i2.real,i2.imag))\n",
" #voltage across the(6 + i8) ohm impedance\n",
"V6i8 = i3*Z3\n",
"V6i8m = abs(V6i8)\n",
" #power\n",
"P = (E1mag*i1mag*math.cos(phi1)) + (E2mag*i2mag*math.cos(phi2 - cmath.phase(complex(E2.real,E2.imag))))\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n(a)currents are: \\n \",round(i1.real,2),\" + (\",round( i1.imag,2),\")i A, \\n \",round(i2.real,2),\" + (\",round(i2.imag,2),\")i A \\n and \",round(i3.real,2),\" + (\",round(i3.imag,2),\")i A\"\n",
"print \"\\n(b)current in the (6 + i8) ohm resistor of the network is \",round(V6i8m,2),\" V\"\n",
"print \"\\n(c)the total active power delivered to the network is \",round(P,2),\" W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
"(a)currents are: \n",
" 0.57 + ( 0.62 )i A, \n",
" 0.56 + ( 1.33 )i A \n",
" and 0.01 + ( -0.71 )i A\n",
"\n",
"(b)current in the (6 + i8) ohm resistor of the network is 7.09 V\n",
"\n",
"(c)the total active power delivered to the network is 9.29 W"
]
}
],
"prompt_number": 5
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h3>Example 5, page no. 571</h3>"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"\n",
"from __future__ import division\n",
"import math\n",
"import cmath\n",
"#initializing the variables:\n",
"rv1 = 50;# in volts\n",
"rv2 = 30;# in volts\n",
"thetav1 = 0;# in degrees\n",
"thetav2 = 90;# in degrees\n",
"R1 = 20;# in ohm\n",
"R2 = 5;# in ohm\n",
"R3 = -1j*3;# in ohm\n",
"R4 = 8;# in ohm\n",
"R5 = 8;# in ohm\n",
"\n",
"#calculation:\n",
" #voltage\n",
"V1 = rv1*math.cos(thetav1*math.pi/180) + 1j*rv1*math.sin(thetav1*math.pi/180)\n",
"V2 = rv2*math.cos(thetav2*math.pi/180) + 1j*rv2*math.sin(thetav2*math.pi/180)\n",
" #The network is redrawn with the V2 source removed, as shown in Figure 32.26.\n",
" #Currents I1 to I5 are shown labelled in Figure 32.26. \n",
" #current\n",
"Re1 = R4*R5/(R5 + R4) + R3\n",
"Re2 = Re1*R2/(R2 + Re1)\n",
"I1 = V1/(Re2 + R1)\n",
"I2 = (Re1/(R2 + Re1))*I1\n",
"I3 = (R2/(Re1 + R2))*I1\n",
"I4 = (R4/(R4 + R5))*I3\n",
"I5 = I3 - I4\n",
" #The original network is redrawn with the V1 source removed, as shown in Figure 32.27.\n",
" #Currents I6 to I10 are shown labelled in Figure 32.27\n",
"Re3 = R1*R2/(R1 + R2)\n",
"Re4 = Re3 + R3\n",
"Re5 = Re4*R4/(Re4 + R4)\n",
"Re6 = Re5 + R5\n",
"I6 = V2/Re6\n",
"I7 = (Re4/(Re4 + R4))*I6\n",
"I8 = (R4/(Re4 + R4))*I6\n",
"I9 = (R1/(R1 + R2))*I8\n",
"I10 = (R2/(R1 + R2))*I8\n",
" #current flowing in the capacitor is given by\n",
"Ic = I3 - I8\n",
" #magnitude of the current in the capacitor\n",
"Icmag = abs(Ic)\n",
"\n",
"i1 = I2 + I9\n",
"i1mag = abs(i1)\n",
" #magnitude of the p.d. across the 5 ohm resistance is given by\n",
"Vr5m = i1mag*R2\n",
" #Active power dissipated in the 20 ohm resistance is given by\n",
"i2 = I1 - I10\n",
"i2mag = abs(i2)\n",
"phii2 = cmath.phase(complex(i2.real,i2.imag))\n",
"Pr20 = R1*(i2mag)**2\n",
" #Active power developed by the V1\n",
"P1 = rv1*i2mag*math.cos(phii2)\n",
" #Active power developed by V2 source\n",
"i3 = I6 - I5\n",
"i3mag = abs(i3)\n",
"phii3 = cmath.phase(complex(i3.real,i3.imag))\n",
"P2 = rv2*i3mag*math.cos(phii3 - (thetav2*math.pi/180))\n",
" #Total power developed\n",
"P = P1 + P2\n",
"\n",
"\n",
"#Results\n",
"print \"\\n\\n Result \\n\\n\"\n",
"print \"\\n(a)the magnitude of the current flowing in the capacitor is \",round(Icmag,2),\" A\"\n",
"print \"\\n(b) the p.d. across the 5 ohm resistance is \",round(Vr5m,2),\" V\"\n",
"print \"\\n(c)the active power dissipated in the 20 ohm resistance is \",round(Pr20,0),\" W\"\n",
"print \"\\n(d)the total active power taken from the supply is \",round(P,1),\" W\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
" Result \n",
"\n",
"\n",
"\n",
"(a)the magnitude of the current flowing in the capacitor is 2.11 A\n",
"\n",
"(b) the p.d. across the 5 ohm resistance is 5.85 V\n",
"\n",
"(c)the active power dissipated in the 20 ohm resistance is 111.0 W\n",
"\n",
"(d)the total active power taken from the supply is 191.9 W"
]
}
],
"prompt_number": 1
}
],
"metadata": {}
}
]
}
|