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
|
{
"metadata": {
"name": "",
"signature": "sha256:f3e57a0086738fdcfc0c2ba196533f123679df702a6579b464c4a555347a158e"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 6 - REPRESENTATION AND PERFORMANCE OF LONG TRANSMISSION LINES "
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E1 - Pg 168"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate A,B,C,D\n",
"import math \n",
"import cmath\n",
"import numpy\n",
"#Given data :\n",
"r=0.22##ohm\n",
"x=0.45##ohm\n",
"g=4.*10.**-9##S\n",
"b=2.53*10.**-6##S\n",
"f=50.##Hz\n",
"l=1000.##Km\n",
"#Using Convergent series of complex angles\n",
"z=r+1j*x##ohm\n",
"y=g+1j*b##ohm\n",
"Z=z*l##ohm\n",
"Y=y*l##ohm\n",
"YZ=Y*Z##ohm\n",
"Y2Z2=YZ**2.##ohm\n",
"Y3Z3=YZ**3.##ohm\n",
"A=1.+YZ/2.+Y2Z2/24.+Y3Z3/720.##ohm\n",
"D=A##oh,m\n",
"B=Z*(1.+YZ/6.+Y2Z2/120.+Y3Z3/5040.)##ohm\n",
"C=Y*(1.+YZ/6.+Y2Z2/120.+Y3Z3/5040.)##ohm\n",
"print '%s' %(\"Auxiliary Constants by using Convergent series of complex angles : \")#\n",
"print \"A = \",A#\n",
"print \"B = \",B#\n",
"print \"C = \",C#\n",
"#Using Convergent series of real angles\n",
"A=cmath.cosh(cmath.sqrt(YZ))##ohm\n",
"D=A##ohm\n",
"B=cmath.sqrt(Z/Y)*cmath.sinh(cmath.sqrt(YZ))##ohm\n",
"C=cmath.sqrt(Y/Z)*cmath.sinh(cmath.sqrt(YZ))##ohm\n",
"A=cmath.cosh(cmath.sqrt(YZ))##ohm\n",
"print '%s' %(\"Auxiliary Constants by using Convergent series of real angles : \")#\n",
"print '%s %.2f %s %.2f' %(\"A, magnitude is \",abs(A),\" and angle in degree is \",cmath.phase(A)*180/math.pi)#\n",
"print '%s %.2f %s %.2f' %(\"B, magnitude is \",abs(B),\" and angle in degree is \",cmath.phase(B)*180/math.pi)#\n",
"print '%s %.4f %s %.2f' %(\"C, magnitude is \",abs(C),\" and angle in degree is \",cmath.phase(C)*180/math.pi)#\n",
"print '%s' %(\"We obtain same result by both of the methods.\")\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Auxiliary Constants by using Convergent series of complex angles : \n",
"A = (0.471555198201+0.229032046676j)\n",
"B = (142.776787567+386.558406193j)\n",
"C = (-0.000206399312625+0.00207114180387j)\n",
"Auxiliary Constants by using Convergent series of real angles : \n",
"A, magnitude is 0.52 and angle in degree is 25.90\n",
"B, magnitude is 412.08 and angle in degree is 69.73\n",
"C, magnitude is 0.0021 and angle in degree is 95.69\n",
"We obtain same result by both of the methods.\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E2 - Pg 169"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate Sending end line voltage in kV,Sending end current in A, magnitude is\n",
"import math\n",
"import cmath\n",
"\n",
"#Given data :\n",
"Z=200.*(math.cos(80.*math.pi/180.) + 1j*math.sin(80.*math.pi/180.))##ohm\n",
"Y=0.0013*(math.cos(90.*math.pi/180.) + 1j*math.sin(90.*math.pi/180.))#S/phase\n",
"P=80.*10.**6##W\n",
"pf=0.8##power factor\n",
"VRL=220.*1000.##V\n",
"VR=VRL/math.sqrt(3.)##V\n",
"IR=P/math.sqrt(3.)/VRL/pf##A\n",
"fi=math.acos(pf)*180/math.pi##degree\n",
"IR=IR*(math.cos(-fi*math.pi/180.) + 1j*math.sin(-fi*math.pi/180.))##A\n",
"YZ=Y*Z##ohm\n",
"Y2Z2=YZ**2##ohm\n",
"Y3Z3=YZ**3##ohm\n",
"A=1.+YZ/2.+Y2Z2/24+Y3Z3/720##ohm\n",
"D=A##oh,m\n",
"B=Z*(1.+YZ/6.+Y2Z2/120.+Y3Z3/5040.)##ohm\n",
"C=Y*(1.+YZ/6.+Y2Z2/120.+Y3Z3/5040.)##mho\n",
"VS=A*VR+B*IR##V\n",
"VSL=math.sqrt(3.)*abs(VS)##V\n",
"print '%s %.2f' %(\"Sending end line voltage in kV : \",VSL/1000.)#\n",
"IS=C*VR+D*IR##\n",
"print '%s %.2f %s %.2f' %(\"Sending end current in A, magnitude is \",abs(IS),\" and angle in degree is \",cmath.phase(IS)*180/math.pi)#\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Sending end line voltage in kV : 263.59\n",
"Sending end current in A, magnitude is 187.48 and angle in degree is 7.66\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E3 - Pg 176"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate Constant A0,Constant B0,Constant C0,Constant D0\n",
"import math\n",
"import cmath\n",
"#Given data :\n",
"VRL=220.##kV\n",
"VR=VRL/math.sqrt(3.)##V\n",
"P=10.*10**6##VA\n",
"Z=1.+1j*8.##ohm(in %)\n",
"Zse=Z/100.*VRL**2./100.##ohm/phase\n",
"A=0.9*(math.cos(0.6*math.pi/180.) + 1j*math.sin(0.6*math.pi/180.))##Auxiliary constant\n",
"D=A ##Auxiliary constant\n",
"\n",
"B=153.2*(math.cos(84.6*math.pi/180.) + 1j*math.sin(84.6*math.pi/180.))##Auxiliary constant\n",
"C=0.0012*(math.cos(90*math.pi/180.) + 1j*math.sin(90*math.pi/180.))##Auxiliary constant\n",
"A0=A+C*Zse##constant\n",
"B0=B+D*Zse##ohm#constant\n",
"C0=C##mho or S#constant\n",
"D0=A##constant\n",
"print '%s %.4f %s %.2f' %(\"Constant A0, magnitude is \",abs(A0),\" and angle in degree is \",cmath.phase(A0)*180/math.pi)#\n",
"print '%s %.f %s %.2f' %(\"Constant B0(ohm), magnitude is \",abs(B0),\" and angle in degree is \",cmath.phase(B0)*180/math.pi)#\n",
"print '%s %.4f %s %.2f' %(\"Constant C0(S), magnitude is \",abs(C0),\" and angle in degree is \",cmath.phase(C0)*180/math.pi)#\n",
"print '%s %.1f %s %.2f' %(\"Constant D0, magnitude is \",abs(D0),\" and angle in degree is \",cmath.phase(D0)*180/math.pi)#\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Constant A0, magnitude is 0.8536 and angle in degree is 1.02\n",
"Constant B0(ohm), magnitude is 188 and angle in degree is 84.39\n",
"Constant C0(S), magnitude is 0.0012 and angle in degree is 90.00\n",
"Constant D0, magnitude is 0.9 and angle in degree is 0.60\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E4 - Pg 177"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate Constant A0,Constant B0,Constant C0,Constant D0\n",
"import math\n",
"import cmath\n",
"#Given data :\n",
"A=0.98*(math.cos(2.*math.pi/180.) + 1j*math.sin(2.*math.pi/180.))##Auxiliary constant\n",
"D=A##Auxiliary constant\n",
"B=28.*(math.cos(69.*math.pi/180.) + 1j*math.sin(69.*math.pi/180.))##Auxiliary constant\n",
"Zse=12.*(math.cos(80.*math.pi/180.) + 1j*math.sin(80.*math.pi/180.))##ohm\n",
"C=(A*D-1)/B##Auxiliary constant\n",
"A0=A+C*Zse##constant\n",
"B0=B+2.*A*Zse+C*Zse**2.##ohm#constant\n",
"C0=C##mho or S#constant\n",
"D0=A0##constant\n",
"print '%s %.2f %s %.2f' %(\"Constant A0, magnitude is \",abs(A0),\" and angle in degree is \",cmath.phase(A0)*180/math.pi)#\n",
"print '%s %.2f %s %.2f' %(\"Constant B0(ohm), magnitude is \",abs(B0),\" and angle in degree is \",cmath.phase(B0)*180/math.pi)#\n",
"print '%s %.2f %s %.f' %(\"Constant C0(S), magnitude is \",abs(C0),\" and angle in degree is \",cmath.phase(C0)*180/math.pi)#\n",
"print '%s %.3f %s %.2f' %(\"Constant D0, magnitude is \",abs(D0),\" and angle in degree is \",cmath.phase(D0)*180/math.pi)#\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Constant A0, magnitude is 0.96 and angle in degree is 3.53\n",
"Constant B0(ohm), magnitude is 50.89 and angle in degree is 75.24\n",
"Constant C0(S), magnitude is 0.00 and angle in degree is 53\n",
"Constant D0, magnitude is 0.958 and angle in degree is 3.53\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E5 - Pg 177"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate \n",
"import math \n",
"import cmath\n",
"#Given data :\n",
"A=0.92*(math.cos(5.3*math.pi/180.) + 1j*math.sin(5.3*math.pi/180.))#Auxiliary constant\n",
"D=A##Auxiliary constant\n",
"B=65.3*(math.cos(81*math.pi/180.) + 1j*math.sin(81*math.pi/180.))##Auxiliary constant\n",
"ZT=100*(math.cos(70*math.pi/180.) + 1j*math.sin(70*math.pi/180.))##ohm\n",
"YT=0.0002*(math.cos(-75.*math.pi/180.) + 1j*math.sin(-75.*math.pi/180.))##S\n",
"C=(A*D-1)/B##Auxiliary constant\n",
"A0=A*(1+2*YT*ZT)+B*(YT)+C*ZT*(1+YT*ZT)##constant\n",
"B0=2.*A*ZT+B+C*ZT**2##ohm#constant\n",
"C0=2.*A*YT*(1.+YT*ZT)+B*YT**2.+C*(1.+YT*ZT)**2.##mho or S#constant\n",
"D0=A0##constant\n",
"print '%s %.5f %s %.2f' %(\"Constant A0, magnitude is \",abs(A0),\" and angle in degree is \",cmath.phase(A0)*180/math.pi)#\n",
"print '%s %.2f %s %.2f' %(\"Constant B0(ohm), magnitude is \",abs(B0),\" and angle in degree is \",cmath.phase(B0)*180/math.pi)#\n",
"print '%s %.6f %s %.1f' %(\"Constant C0(S), magnitude is \",abs(C0),\" and angle in degree is \",cmath.phase(C0)*180/math.pi)#\n",
"print '%s %.2f %s %.2f' %(\"Constant D0, magnitude is \",abs(D0),\" and angle in degree is \",cmath.phase(D0)*180/math.pi)#\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Constant A0, magnitude is 0.84340 and angle in degree is 26.45\n",
"Constant B0(ohm), magnitude is 233.85 and angle in degree is 84.30\n",
"Constant C0(S), magnitude is 0.003442 and angle in degree is 50.9\n",
"Constant D0, magnitude is 0.84 and angle in degree is 26.45\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example E6 - Pg 178"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate \n",
"import math \n",
"import cmath\n",
"#Given data :\n",
"A=0.945*math.cos(1.02*math.pi/180.) + 1j*math.sin(1.02*math.pi/180.)##Auxiliary constant\n",
"D=A##Auxiliary constant\n",
"B=82.3*math.cos(73.03*math.pi/180.) + 1j*math.sin(73.03*math.pi/180.)##ohm#Auxiliary constant\n",
"C=0.001376*math.cos(90.4*math.pi/180.) + 1j*math.sin(90.4*math.pi/180.)##S#Auxiliary constant\n",
"#part (i)\n",
"Y=C##S\n",
"Z=2.*(A-1)/C##ohm\n",
"print '%s' %(\"For equivalent T-network : \")#\n",
"print '%s %.6f %s %.1f' %(\"Shunt admittance in S, magnitude is \",abs(Y),\" and angle in degree is \",cmath.phase(Y)*180/math.pi)#\n",
"print '%s %.2f %s %.1f' %(\"Impedance in ohm, magnitude is \",abs(Z),\" and angle in degree is \",cmath.phase(Z)*180/math.pi)#\n",
"print '%s' %(\"For equivalent pi-network : \")#\n",
"Z=B##ohm\n",
"print '%s %.2f %s %.2f' %(\"Series Impedance in ohm, magnitude is \",abs(Z),\" and angle in degree is \",cmath.phase(Z)*180/math.pi)#\n",
"Y=2.*(A-1)/B##S\n",
"print '%s %.6f %s %.2f' %(\"Shunt admittance in S, magnitude is \",abs(Y),\" and angle in degree is \",cmath.phase(Y)*180/math.pi)#\n",
"#For T-Network Value of Z is wrog in the book.\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"For equivalent T-network : \n",
"Shunt admittance in S, magnitude is 0.999976 and angle in degree is 90.0\n",
"Impedance in ohm, magnitude is 0.12 and angle in degree is 72.1\n",
"For equivalent pi-network : \n",
"Series Impedance in ohm, magnitude is 24.04 and angle in degree is 2.28\n",
"Shunt admittance in S, magnitude is 0.004821 and angle in degree is 159.83\n"
]
}
],
"prompt_number": 15
}
],
"metadata": {}
}
]
}
|