summaryrefslogtreecommitdiff
path: root/Basic_Electrical_Engineering/Chapter13.ipynb
blob: 163431b5161cc6018cfc23d4d67067188fea449f (plain)
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
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 13: TRANSFORMERS"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.1,Page number: 374"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the voltage across the secondary of the transformer.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "E_p=6400              #Primary voltage(in Volts)  \n",
      "f=50                  #Frequency of primary supply(in Hertz)\n",
      "N1=480                #Number of turns in the primary of the transformer\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "flux_m=E_p/(4.44*f*N1)\n",
      "N2=20.0\n",
      "Es=4.44*f*N2*flux_m\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The peak value of the flux produced in the core is %.2f Wb.\" %(flux_m)\n",
      "print \"(b)The voltage across the secondary winding if it has 20 turns is %.2f V.\" %(Es)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The peak value of the flux produced in the core is 0.06 Wb.\n",
        "(b)The voltage across the secondary winding if it has 20 turns is 266.67 V.\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.2,Page number: 377"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the peak value of the flux density in the core.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "f=50.0                #Operating frequency of the transformer(in Hertz)\n",
      "N1=30.0               #Number of turns in the primary of transformer\n",
      "N2=350.0              #Number of turns in the secondary of transformer\n",
      "A=250e-04             #Cross-sectional area of the core(in square-metres)\n",
      "E1=230.0              #Voltage of the supply(in Volts)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "flux_m=E1/(4.44*f*N1)\n",
      "B_m=flux_m/A\n",
      "E2=E1*(N2/N1)\n",
      "I2=100.0\n",
      "I1=I2*(N2/N1)\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The peak value of flux density in the core is %.2f T.\" %(B_m)\n",
      "print \"(b)The voltage induced in the secondary winding is %e V.\" %(E2)\n",
      "print \"(c)The primary current when the secondary current is 100 A is %e A.\" %(I1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The peak value of flux density in the core is 1.38 T.\n",
        "(b)The voltage induced in the secondary winding is 2.683333e+03 V.\n",
        "(c)The primary current when the secondary current is 100 A is 1.166667e+03 A.\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.3,Page number: 377"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the turns-ratio of the transformer.\"\"\"\n",
      "\n",
      "from math import sqrt\n",
      "\n",
      "#Variable Declaration:\n",
      "Req=50.0               #Output resistance of the source(in Ohms) \n",
      "R_L=800.0              #Load resistance(in Ohms)  \n",
      "\n",
      "\n",
      "#Calculations:\n",
      "K=sqrt(R_L/Req)\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The turns-ratio of the transformer to be used for maximising the load power is %d.\" %(K)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The turns-ratio of the transformer to be used for maximising the load power is 4.\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.4,Page number: 378"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the load current in the ac circuit.\"\"\"\n",
      "\n",
      "from cmath import rect,phase\n",
      "from math import degrees\n",
      "\n",
      "#Calculations:\n",
      "V=rect(30,0)\n",
      "Ip=V/(20+20*1j+(pow(2,2)*(2-10*1j)))\n",
      "I_L=2.0*Ip\n",
      "\n",
      "#Result:\n",
      "print \"The load current is %.3f A at a phase angle of %.3f degrees.\" %(abs(I_L),degrees(phase(I_L)))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The load current is 1.744 A at a phase angle of 35.538 degrees.\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.5,Page number: 378 "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the output of the transformer in kVA.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "B_m=1.1               #Maximum magnetic flux density(in Weber per square-metre)\n",
      "A=150e-04             #Cross-sectional area of the core(in square-metres)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "flux_m=B_m*A\n",
      "N2=66\n",
      "f=50\n",
      "Z_L=4.0\n",
      "E2=4.44*N2*f*flux_m\n",
      "V2=E2\n",
      "I2=V2/Z_L\n",
      "output=(I2*V2)/1000.0\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The output when connected to a load of 4 Ohms impedance is %.3f kVA.\" %(output)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The output when connected to a load of 4 Ohms impedance is 14.612 kVA.\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.6,Page number: 378 "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the number of turns in each winding of the transformer.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "A=9e-04               #Cross-sectional area of the core(in square-metre)       \n",
      "E1=230.0              #Primary Voltage(in Volts)\n",
      "E2=110.0              #Secondary Voltage(in Volts)\n",
      "E3=6.0                #Tertiary Voltage(in Volts)\n",
      "f=50.0                #Operating frequency of the transformer(in Hertz)\n",
      "Bm=1.0                #Maximum magnetic flux density(in Tesla)  \n",
      "\n",
      "\n",
      "#Calculations:\n",
      "flux_m=Bm*A\n",
      "N3_half=E3/(4.44*f*flux_m)\n",
      "N3=2*N3_half\n",
      "N1=N3_half*(E1/E3)\n",
      "N2=N3_half*(E2/E3)\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The total number of turns on the primary winding is %d turns.\" %(N1)\n",
      "print \"The total number of turns on the secondary winding is %d turns.\" %(N2)\n",
      "print \"The total number of turns on the tertiary winding is %d turns.\" %(N3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The total number of turns on the primary winding is 1151 turns.\n",
        "The total number of turns on the secondary winding is 550 turns.\n",
        "The total number of turns on the tertiary winding is 60 turns.\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.7,Page number: 380"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the no-load power factor of the transformer.\"\"\"\n",
      "\n",
      "from math import sqrt,pow\n",
      "\n",
      "#Variable Declaration:\n",
      "VA=350.0              #Input at no-load(in Volt-Amperes) \n",
      "V1=230.0              #Primary voltage(in Volts)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "Io=VA/V1\n",
      "Pi=110.0\n",
      "pf=Pi/(V1*Io)\n",
      "Iw=Io*pf\n",
      "Im=sqrt(pow(Io,2)-pow(Iw,2))\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The loss component of no-load current is given as %.4f A.\" %(Iw)\n",
      "print \"The magnetising component of no-load current is %.4f A.\" %(Im)\n",
      "print \"The no-load power factor is %.4f.\" %(pf)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The loss component of no-load current is given as 0.4783 A.\n",
        "The magnetising component of no-load current is 1.4446 A.\n",
        "The no-load power factor is 0.3143.\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.8,Page number: 382"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the hysterisis and eddy-current losses of the transformer.\"\"\"\n",
      "\n",
      "\n",
      "#Variable Declaration:\n",
      "f=50.0                #Operating frequency of the transformer(in Hertz)\n",
      "eq1=100.0             #Iron loss at 60 Hz(in Watts)\n",
      "eq2=60.0              #Iron loss at 40 Hz(in Watts)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "\"\"\" P_h=A*f ; P_e=B*f*f ; \n",
      "    \n",
      "    P_i=P_h+P_e=(A*f)+(B*f*f); \"\"\"\n",
      "\n",
      "A=((eq2*36)-(eq1*16))/((40*36)-(60*16))\n",
      "B=((eq1*4)-(eq2*6))/((3600*4)-(1600*6))\n",
      "P_h=A*f\n",
      "P_e=B*f*f\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The Hysteresis loss at 50 Hz is %.2f W.\" %(P_h) \n",
      "print \"The Eddy-current loss at 50 Hz is %.2f W.\" %(P_e) "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Hysteresis loss at 50 Hz is 58.33 W.\n",
        "The Eddy-current loss at 50 Hz is 20.83 W.\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.9,Page number: 385"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the primary current snd the primary power factor.\"\"\"\n",
      "\n",
      "from math import acos,degrees,cos\n",
      "from cmath import phase,rect\n",
      "\n",
      "#Variable Declaration:\n",
      "V1=440.0              #Primary voltage(in Volts)\n",
      "V2=110.0              #Secondary voltage(in Volts)\n",
      "I_0_mod=5.0           #No-load current(in Amperes) \n",
      "I2=120.0              #Secondary current(in Amperes) \n",
      "\n",
      "\n",
      "#Calculations:\n",
      "phi_0=acos(0.2)\n",
      "phi_2=acos(0.8)\n",
      "K=V2/V1\n",
      "I1_load_mod=K*I2\n",
      "I1_load=rect(I1_load_mod,-phi_2)\n",
      "I0=rect(I_0_mod,-phi_0)\n",
      "I1_total=I0+I1_load\n",
      "pf_primary=cos(phase(I1_total))\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The primary current is %.2f A at a phase angle of %.2f degrees.\" %(abs(I1_total),degrees(phase(I1_total)))\n",
      "print \"The primary power factor is %.3f lagging.\" %(pf_primary)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The primary current is 33.90 A at a phase angle of -42.49 degrees.\n",
        "The primary power factor is 0.737 lagging.\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.10,Page number: 390"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the equivalent resistance as referred to the primary and secondary.\"\"\"\n",
      "\n",
      "from math import sqrt\n",
      "\n",
      "#Variable Declaration:\n",
      "VA=50e03              #Power rating of the transformer(in Volt-Amperes) \n",
      "V1=4400.0             #Primary voltage(in Volts) \n",
      "V2=220.0              #Secondary voltage(in Volts)\n",
      "R1=3.45               #Primary resistance(in Ohms)\n",
      "R2=0.009              #Secondary resistance(in Ohms)\n",
      "X1=5.2                #Leakage reactance of primary(in Ohms)\n",
      "X2=0.015              #Leakage reactance of secondary(in Ohms)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "I1=VA/V1\n",
      "I2=VA/V2\n",
      "K=V2/V1\n",
      "Re1=R1+(R2/(K*K))\n",
      "Re2=(K*K*R1)+R2\n",
      "Xe1=X1+(X2/(K*K))\n",
      "Xe2=(K*K*X1)+X2\n",
      "Ze1=sqrt((Re1*Re1)+(Xe1*Xe1))\n",
      "Ze2=sqrt((Re2*Re2)+(Xe2*Xe2))\n",
      "tot_copp_loss=(I1*I1*R1)+(I2*I2*R2)\n",
      "tot_copp_eq_p=I1*I1*Re1\n",
      "tot_copp_eq_s=I2*I2*Re2\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The equivalent resistance as referred to the primary is %.2f Ohms.\" %(Re1)\n",
      "print \"(b)The equivalent resistance as referred to the secondary is %.4f Ohms.\" %(Re2)\n",
      "print \"(c)The equivalent reactance as referred to the primary is %.2f Ohms.\" %(Xe1)\n",
      "print \"(d)The equivalent reactance as referred to the secondary is %.3f Ohms.\" %(Xe2)\n",
      "print \"(e)The equivalent impedance as referred to the primary is %.2f Ohms.\" %(Ze1)\n",
      "print \"(f)The equivalent impedance as referred to the secondary is %.4f Ohms.\" %(Ze2)\n",
      "print \"(g)The total copper loss by using the individual resistances of the two windings is %.2f W.\" %(tot_copp_loss)\n",
      "print \"   By considering equivalent resistances,\"\n",
      "print \"   Total copper loss(referred to primary equivalent resistance)=%.2f W.\" %(tot_copp_eq_p)   \n",
      "print \"   Total copper loss(referred to secondary equivalent  resistance)=%.2f W\" %(tot_copp_eq_s)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The equivalent resistance as referred to the primary is 7.05 Ohms.\n",
        "(b)The equivalent resistance as referred to the secondary is 0.0176 Ohms.\n",
        "(c)The equivalent reactance as referred to the primary is 11.20 Ohms.\n",
        "(d)The equivalent reactance as referred to the secondary is 0.028 Ohms.\n",
        "(e)The equivalent impedance as referred to the primary is 13.23 Ohms.\n",
        "(f)The equivalent impedance as referred to the secondary is 0.0331 Ohms.\n",
        "(g)The total copper loss by using the individual resistances of the two windings is 910.38 W.\n",
        "   By considering equivalent resistances,\n",
        "   Total copper loss(referred to primary equivalent resistance)=910.38 W.\n",
        "   Total copper loss(referred to secondary equivalent  resistance)=910.38 W\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.11,Page number: 393"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the full-load regulation for different load power factors.\"\"\"\n",
      "\n",
      "from math import cos,acos,sin\n",
      "\n",
      "#Variable Declaration:\n",
      "VA=40e03              #Power rating of the transformer(in Volt-Amperes)   \n",
      "V1=6600.0             #Primary voltage(in Volts) \n",
      "V2=250.0              #Secondary voltage(in Volts)\n",
      "R1=10.0               #Primary resistance(in Ohms)\n",
      "R2=0.02               #Secondary resistance(in Ohms)\n",
      "Xe1=35.0              #Equivalent leakage reactance as referred to the primary(in Ohms)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "K=V2/V1\n",
      "I2=VA/V2\n",
      "Re2=(K*K*R1)+R2\n",
      "Xe2=(K*K*Xe1)\n",
      "pf=1\n",
      "phi=acos(pf)\n",
      "per_reg_a=(((I2*Re2*pf)+(I2*Xe2*sin(phi)))/V2)*100\n",
      "pf=0.8\n",
      "phi=acos(pf)\n",
      "per_reg_b=(((I2*Re2*pf)+(I2*Xe2*sin(phi)))/V2)*100\n",
      "pf=0.8\n",
      "phi=acos(pf)\n",
      "per_reg_c=(((I2*Re2*pf)-(I2*Xe2*sin(phi)))/V2)*100\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)For unity power factor of the load:\"\n",
      "print \"The full-load percentage regulation is %.3f percent.\" %(per_reg_a)\n",
      "print \"\\n(b)For  power factor of the load=0.8 lagging:\"\n",
      "print \"The full-load percentage regulation is %.3f percent.\" %(per_reg_b)\n",
      "print \"\\n(c)For power factor of the load=0.8 leading:\"\n",
      "print \"The full-load percentage regulation is %.3f percent.\" %(per_reg_c)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)For unity power factor of the load:\n",
        "The full-load percentage regulation is 2.198 percent.\n",
        "\n",
        "(b)For  power factor of the load=0.8 lagging:\n",
        "The full-load percentage regulation is 3.687 percent.\n",
        "\n",
        "(c)For power factor of the load=0.8 leading:\n",
        "The full-load percentage regulation is -0.170 percent.\n"
       ]
      }
     ],
     "prompt_number": 24
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.12,Page number: 396"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the number of turns in each winding.\"\"\"\n",
      "\n",
      "from math import sqrt \n",
      "\n",
      "#Variable Declaration:\n",
      "f=50.0                #Operating frequency of the transformer(in Hertz)\n",
      "E1=5000.0             #Primary voltage at no-load(in Volts)\n",
      "E2=250.0              #Secondary voltage at no-load(in Volts)\n",
      "VA_full=150e03        #Power rating of the transformer(in Volt-Ampere)  \n",
      "flux=0.06             #Maximum core flux(in Weber)\n",
      "Pi=1500.0             #Core losses(in Watts)\n",
      "Pc_FL=1800.0          #Full-load copper losses(in Watts)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "N2=E2/(4.44*f*flux)\n",
      "N1=(E1/E2)*round(N2,0)\n",
      "pf=1\n",
      "Po=0.5*VA_full*pf\n",
      "Pc=0.5*0.5*Pc_FL\n",
      "effi_b=(Po/(Po+Pi+Pc))*100\n",
      "pf=0.8\n",
      "Po=VA_full*pf\n",
      "Pc=Pc_FL\n",
      "effi_c=(Po/(Po+Pi+Pc))*100\n",
      "x=sqrt(Pi/Pc_FL)\n",
      "VA_load=VA_full*x\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The number of turns in the primary winding is %d.\" %(round(N1,0)) \n",
      "print \"   The number of turns in the secondary winding is %d.\" %(round(N2,0))\n",
      "print \"(b)The efficiency at half rated kVA and unity power factor is %.3f percent\" %(effi_b)\n",
      "print \"(c)The efficiency at full load and 0.8 power factor lagging is %.3f percent.\" %(effi_c)\n",
      "print \"(d)The kVA load for maximum efficiency is %d kVA.\" %(round((VA_load/1000),0))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The number of turns in the primary winding is 380.\n",
        "   The number of turns in the secondary winding is 19.\n",
        "(b)The efficiency at half rated kVA and unity power factor is 97.466 percent\n",
        "(c)The efficiency at full load and 0.8 power factor lagging is 97.324 percent.\n",
        "(d)The kVA load for maximum efficiency is 137 kVA.\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.13,Page number: 397"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the all-day efficiency of a distribution transformer.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "kVA_FL=200.0          #Power rating of transformer at full-load(in Volt-Ampere)            \n",
      "Pc_FL=3.02            #Full-load copper losses(in kilo-Watts)  \n",
      "Pi=1.6                #Iron-losses(in kilo-Watts) \n",
      "\n",
      "\n",
      "#Calculations:\n",
      "Pi_24_hrs=24.0*Pi\n",
      "\"\"\" For 80 kW load at unity power factor in 6 hrs:\"\"\"\n",
      "Po_1=80\n",
      "t1=6\n",
      "pf_1=1\n",
      "output_ene_1=Po_1*t1\n",
      "kVA_1=Po_1/pf_1\n",
      "Pc_1=pow((kVA_1/kVA_FL),2)*Pc_FL*t1\n",
      "\"\"\" For 160 kW load at 0.8 power factor in 8 hrs:\"\"\"\n",
      "Po_2=160\n",
      "t2=8\n",
      "pf_2=0.8\n",
      "output_ene_2=Po_2*t2\n",
      "kVA_2=Po_2/pf_2\n",
      "Pc_2=pow((kVA_2/kVA_FL),2)*Pc_FL*t2\n",
      "\"\"\" For no load period of 10 hrs:\"\"\"\n",
      "Po_3=0\n",
      "t3=10\n",
      "output_ene_3=0\n",
      "Pc_3=0\n",
      "Po_total=output_ene_1+output_ene_2+output_ene_3\n",
      "Pc_total=Pc_1+Pc_2+Pc_3\n",
      "all_day_effi=Po_total/(Po_total+Pc_total+Pi_24_hrs)\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The all day efficiency of the distribution transformer is %.3f percent.\" %(all_day_effi*100)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The all day efficiency of the distribution transformer is 96.414 percent.\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.14,Page number: 398"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the apparent power rating of an autotransformer.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "V_rated=120.0          #Voltage rating of the transformer(in Volts)\n",
      "VA=12e03               #Power rating of the transformer(in Volt-Ampere)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "I1=VA/V_rated\n",
      "I2=I1\n",
      "input_app_pow=240*I1\n",
      "output_app_pow=120*2*I1\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"In auto-tranformer mode, the input apparent power is %d kVA and the output apparent power is %d kVA.\" %(round((input_app_pow/1000),0),round((output_app_pow/1000),0))\n",
      "print \"Thus, the apparent power capacity of the 12-kVA transformer is doubled by the auto-transformer connection.\"\n",
      "print \"In effect,half the apparent power is transformed and half is conducted directly to the secondary side.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "In auto-tranformer mode, the input apparent power is 24 kVA and the output apparent power is 24 kVA.\n",
        "Thus, the apparent power capacity of the 12-kVA transformer is doubled by the auto-transformer connection.\n",
        "In effect,half the apparent power is transformed and half is conducted directly to the secondary side.\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.15,Page number: 401"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the secondary line voltage on no load when the windings are connected(a)star/delta,(b)delta/star.\"\"\"\n",
      "\n",
      "from math import sqrt\n",
      "\n",
      "#Variable Declaration:\n",
      "V_L1=3300.0           #Supply voltage(in Volts)\n",
      "Np=840.0              #Number of turns in the primary\n",
      "Ns=72.0               #Number of turns in the secondary\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "Vph_1a=V_L1/sqrt(3)\n",
      "Vph_2a=Vph_1a*(Ns/Np)\n",
      "V_L2a=Vph_2a\n",
      "Vph_1b=V_L1\n",
      "Vph_2b=Vph_1b*(Ns/Np)\n",
      "V_L2b=Vph_2b*sqrt(3)\n",
      "\n",
      "\n",
      "#Result:\n",
      "print(\"(a)For star/delta connection: \")\n",
      "print \"The secondary line voltage on no load is %.2f V.\" %(V_L2a)\n",
      "print(\"(b)For delta/star connection: \")\n",
      "print \"The secondary line voltage on no load is %.2f V.\" %(V_L2b)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)For star/delta connection: \n",
        "The secondary line voltage on no load is 163.31 V.\n",
        "(b)For delta/star connection: \n",
        "The secondary line voltage on no load is 489.92 V.\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.16,Page number: 403"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the magnetising current and the core-loss current in a single-phase transformer.\"\"\" \n",
      " \n",
      "from math import sqrt\n",
      "\n",
      "#Variable Declaration:\n",
      "VA=12e03              #Power rating of the transformer(in Volt-Ampere) \n",
      "Vp=400.0              #Primary voltage(in Volts)\n",
      "Vs=200.0              #Secondary voltage(in Volts)\n",
      "Wo=120.0              #Power in open-circuit test(in Watts)   \n",
      "V1=200.0              #Voltage in open-circuit test(in Volts)\n",
      "I_0=1.3               #Current in open-circuit test(in Amperes)\n",
      "Isc=30.0              #Current in short-circuit test(in Amperes)\n",
      "Wsc=200.0             #Power in short-circuit test(in Watts)\n",
      "Vsc=22.0              #Voltage in short-circuit test(in Volts)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "Iw=Wo/V1\n",
      "Im=sqrt((I_0*I_0)-(Iw*Iw))\n",
      "R_0=V1/Iw\n",
      "X_0=V1/Im\n",
      "K=Vs/Vp\n",
      "I_FL=VA/Vp\n",
      "Re1=Wsc/(Isc*Isc)\n",
      "Ze1=Vsc/Isc\n",
      "Xe1=sqrt((Ze1*Ze1)-(Re1*Re1))\n",
      "Re2=K*K*Re1\n",
      "Xe2=K*K*Xe1\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The magnetising current is %.2f A and the core-loss current is %.2f A\" %(Im,Iw)\n",
      "print \"(b)The parameters of equivalent circuit as referred to the low voltage winding(secondary winding) are: \\n    Re2=%.4f ohm \\n    Xe2=%.4f ohm\" %(Re2,Xe2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The magnetising current is 1.15 A and the core-loss current is 0.60 A\n",
        "(b)The parameters of equivalent circuit as referred to the low voltage winding(secondary winding) are: \n",
        "    Re2=0.0556 ohm \n",
        "    Xe2=0.1747 ohm\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.17,Page number: 404"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the secondary emf in a transformer.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "VA=25.0e03            #Power rating of the transformer(in VA)\n",
      "N1=500.0              #Number of turns in the primary winding \n",
      "N2=40.0               #Number of turns in the secondary winding\n",
      "V1=3e03               #Voltage of the supply connected to primary(in Volts)\n",
      "f=50.0                #Frequency of the supply(in Hertz)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "K=N2/N1\n",
      "E2=K*V1\n",
      "I1=VA/V1\n",
      "I2=I1/K\n",
      "flux=V1/(4.44*f*N1)\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The secondary emf is %.2f V.\" %(E2)\n",
      "print \"(b)The primary current on full-load is %.2f A and the secondary current on full-load is %.2f A.\" %(I1,I2)\n",
      "print \"(c)The maximum flux in the core is %.4f Wb.\" %(flux)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The secondary emf is 240.00 V.\n",
        "(b)The primary current on full-load is 8.33 A and the secondary current on full-load is 104.17 A.\n",
        "(c)The maximum flux in the core is 0.0270 Wb.\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.18,Page number: 404"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the active cross-sectional area of the core.\"\"\"\n",
      "\n",
      "from math import sqrt\n",
      "\n",
      "#Variable Declaration:\n",
      "N1=50.0               #Number of turns in the primary winding\n",
      "B=1.0                 #Maximum flux density(in Tesla)\n",
      "f=50.0                #Frequency rating of the transformer(in Hertz)\n",
      "V=230.0               #Voltage rating of the transformer(in Volts)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "E1=V\n",
      "flux=E1/(4.44*f*N1)\n",
      "A=flux/B\n",
      "\"\"\"Due to the insulation of laminations from each other,the gross area is about 10% greater than the active area.\"\"\" \n",
      "gross=1.1*A\n",
      "a=sqrt(gross)\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The active cross sectional area of the core is %.5f square m.\" %(A)\n",
      "print \"(b)The side of a square core is %.2f m.\" %(a)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The active cross sectional area of the core is 0.02072 square m.\n",
        "(b)The side of a square core is 0.15 m.\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.19,Page number: 405"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the output of the transformer in kVA.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "A=150e-04             #Cross-sectional area of the core(in square metres)\n",
      "Bm=1.1                #Maximum flux density(in Tesla)\n",
      "f=50.0                #Frequency of the supply(in Hertz)\n",
      "N2=66.0               #Number of turns in the secondary winding\n",
      "Z_L=4.0               #Load impedance(in Ohms)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "flux=Bm*A\n",
      "E2=4.44*flux*f*N2\n",
      "I2=E2/Z_L\n",
      "kVA=(E2*I2)/1000.0\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The output in kVA when connected to a 4 Ohms load impedance is %.2f kVA.\" %(kVA)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The output in kVA when connected to a 4 Ohms load impedance is 14.61 kVA.\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.20,Page number: 405"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the magnetising current and the iron loss.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "I0=1.0                #No-load primary current(in Amperes)\n",
      "pf=0.24               #Power factor\n",
      "V1=11e03              #Primary voltage(in Volts)\n",
      "V2=400                #Secondary voltage(in Volts)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "Iw=I0*pf\n",
      "Im=sqrt((I0*I0)-(Iw*Iw))\n",
      "Pi=V1*I0*pf\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The core-loss current is %.2f A.\" %(Iw) \n",
      "print \"(b)The magnetising current is %.3f A.\" %(Im)\n",
      "print \"(c)The iron loss is %.2f W.\" %(Pi)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The core-loss current is 0.24 A.\n",
        "(b)The magnetising current is 0.971 A.\n",
        "(c)The iron loss is 2640.00 W.\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.21,Page number: 405"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the supply voltage and the power factor.\"\"\"\n",
      "\n",
      "from cmath import rect,phase\n",
      "from math import degrees,radians\n",
      "\n",
      "#Variable Declaration:\n",
      "K=0.5                    #Turns ratio of the step-down transformer\n",
      "R1=2.5                   #Resistance of the primary winding(in Ohms)\n",
      "X1=6.0                   #Reactance of the primary winding(in Ohms)\n",
      "R2=0.25                  #Resistance of the secondary winding(in Ohms)\n",
      "X2=1                     #Reactance of the secondary winding(in Ohms)\n",
      "Im=51.5e-03              #Magnetising current(in Amperes)\n",
      "Iw=20.6e-03              #Core-loss current(in Amperes)\n",
      "Z_L=rect(25,radians(30)) #Load impedance(in Ohms)\n",
      "Vo=50.0                  #Output voltage(in Volts)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "Z1=R1+1j*X1\n",
      "Z2=R2+1j*X2\n",
      "V2=rect(Vo,0)\n",
      "I2=V2/Z_L\n",
      "E2=V2+(I2*Z2)\n",
      "E1=E2/K\n",
      "E1_minus=-E1\n",
      "I1_a=-I2*K\n",
      "\"\"\"Im lags -E1 by 90 degrees and Iw is in phase with -E1.\"\"\"\n",
      "Im_com=rect(Im,(phase(E1_minus)-radians(90)))\n",
      "Iw_com=rect(Iw,phase(E1_minus))\n",
      "I1=I1_a+Im_com+Iw_com\n",
      "V1=E1_minus+(I1*Z1)\n",
      "pf_ang=phase(V1)-phase(I1)\n",
      "pf=cos(pf_ang)\n",
      "\n",
      "\n",
      "#Result:I\n",
      "print \"The supply voltage is %.4f V at a phase angle of %.2f degrees.\" %(abs(V1),degrees(phase(V1)))\n",
      "print \"The current drawn from the supply is %.4f A at a phase angle of %.2f degrees.\" %(abs(I1),degrees(phase(I1)))\n",
      "print \"The power factor is %.3f lagging.\" %(pf)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The supply voltage is 108.6120 V at a phase angle of -176.35 degrees.\n",
        "The current drawn from the supply is 1.0451 A at a phase angle of 148.19 degrees.\n",
        "The power factor is 0.815 lagging.\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.22,Page number: 406"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the copper loss in the transformer.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "K=0.25                #Turns ratio of the step-down transformer\n",
      "R1=1.4                #Resistance of the primary(in Ohms)\n",
      "X1=5.5                #Reactance of the primary(in Ohms)\n",
      "R2=0.06               #Resistance of the secondary(in Ohms)\n",
      "X2=0.04               #Reactance of the secondary(in Ohms)\n",
      "Vsc=24.0              #Voltage of the HV winding(in Volts)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "Re1=R1+(R2/(K*K))\n",
      "Xe1=X1+(X2/(K*K))\n",
      "Ze1=sqrt((Re1*Re1)+(Xe1*Xe1))\n",
      "Isc=Vsc/Ze1\n",
      "I1=Isc\n",
      "I2=I1/K\n",
      "P=I1*I1*Re1\n",
      "pf=P/(Vsc*I1)\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The current in the LV winding is %.3f A.\" %(I2)\n",
      "print \"(b)The copper loss in the transformer is %.2f W.\" %(P)\n",
      "print \"(c)The power factor is %.4f.\" %(pf)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The current in the LV winding is 14.594 A.\n",
        "(b)The copper loss in the transformer is 31.42 W.\n",
        "(c)The power factor is 0.3588.\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.23,Page number: 406"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the regulation and efficiency.\"\"\"\n",
      "\n",
      "from math import acos\n",
      "\n",
      "#Variable Declaration:\n",
      "VA=20e03              #Power rating of the transformer(in Volt-Amperes)\n",
      "V1=2200.0             #Voltage of the primary winding(in Volts)\n",
      "V2=220.0              #Voltage of the secondary winding(in Volts)\n",
      "f=50.0                #Frequency rating of the transformer(in Hertz)\n",
      "Vsc=86.0              #Voltage measured during short-circuit test(in Volts)\n",
      "Isc=10.5              #Current measured during short-circuit test(in Amperes)\n",
      "Psc=360.0             #Power measured during short-circuit test(in Watts)\n",
      "Voc=220.0             #Voltage measured during open-circuit test(in Volts)\n",
      "Ioc=4.2               #Current measured during open-circuit test(in Amperes)\n",
      "Poc=148.0             #Power measured during open-circuit test(in Watts)\n",
      "pf=0.8                #Lagging power factor\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "Ze1=Vsc/Isc\n",
      "Re1=Psc/(Isc*Isc)\n",
      "Xe1=sqrt((Ze1*Ze1)-(Re1*Re1))\n",
      "I1=VA/V1\n",
      "reg=(I1*((Re1*pf)+(Xe1*sin(acos(pf)))))/V1\n",
      "Pc=(I1/Isc)*(I1/Isc)*Psc\n",
      "Pi=Poc\n",
      "Po=VA*pf\n",
      "effi=Po/(Po+Pc+Pi)\n",
      "pf_sc=Re1/Ze1\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The regulation at 0.8 pf lagging at full load is %.2f per cent.\" %(reg*100)    \n",
      "print \"   The efficiency is %.2f per cent.\" %(effi*100)\n",
      "print \"(b)The power factor on short circuit is %.3f lagging.\" %(pf_sc)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The regulation at 0.8 pf lagging at full load is 2.94 per cent.\n",
        "   The efficiency is 97.45 per cent.\n",
        "(b)The power factor on short circuit is 0.399 lagging.\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.24,Page number: 407"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the efficiency at half of full-load current.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "VA=200e03             #Power rating of the transformer(in VA)\n",
      "effi_FL=0.98          #Full-load efficiency of the transformer\n",
      "pf=0.8                #Lagging power factor\n",
      "x=0.75                #Fraction of load at which maximum efficiency occurs\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "Po=VA*pf\n",
      "Pin=Po/effi_FL\n",
      "tot_loss=Pin-Po\n",
      "Pc=tot_loss/(1+(x*x))\n",
      "Pi=tot_loss-Pc\n",
      "x_new=0.5\n",
      "P1=(x_new*x_new*Pc)+Pi\n",
      "effi_half=(Po/2.0)/((Po/2.0)+P1)\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"The efficiency at half of full-load current is %.3f per cent.\" %(effi_half*100)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The efficiency at half of full-load current is 97.922 per cent.\n"
       ]
      }
     ],
     "prompt_number": 21
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.25,Page number: 408"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the efficiency at different rated kVAs.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "VA=150e03             #Power rating of the transformer(in Volt-Amperes)\n",
      "V1=5000.0             #Voltage of the primary winding(in Volts)\n",
      "V2=250.0              #Voltage of the secondary winding(in Volts)\n",
      "f=50.0                #Frequency rating of the transformer(in Hertz)\n",
      "Pc=1.8e03             #Full-load copper losses(in Watts)\n",
      "Pi=1.5e03             #Core losses(in Watts)\n",
      "flux=60e-03           #Maximum core flux(in Webers)\n",
      "pf=0.8                #Lagging power factor\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "N2=V2/(4.44*f*flux)\n",
      "N1=round(N2,0)*(V1/V2)\n",
      "\"\"\"Case 1:\"\"\"\n",
      "Po=(VA*pf)\n",
      "effi_a=Po/(Po+Pi+Pc)\n",
      "\"\"\"Case 2:\"\"\"\n",
      "pf=1.0\n",
      "Po=0.5*VA*pf\n",
      "Pc_new=0.5*0.5*Pc\n",
      "effi_b=Po/(Po+Pi+Pc_new)\n",
      "\n",
      "x=sqrt(Pi/Pc)\n",
      "VA_max_effi=x*VA\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The number of turns in the primary winding is %d turns.\" %(round(N1,0))\n",
      "print \"   The number of turns in the secondary winding is %d turns.\" %(round(N2,0))\n",
      "print \"(b)The efficiency at full rated kVA with 0.8 pf lagging is %.2f percent.\" %(effi_a*100)  \n",
      "print \"(c)The efficiency at half rated kVA with unity pf is %.2f percent.\" %(effi_b*100)\n",
      "print \"(d)The kVA load for maximum efficieny is %d kVA.\" %(round((VA_max_effi/1000),0)) "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The number of turns in the primary winding is 380 turns.\n",
        "   The number of turns in the secondary winding is 19 turns.\n",
        "(b)The efficiency at full rated kVA with 0.8 pf lagging is 97.32 percent.\n",
        "(c)The efficiency at half rated kVA with unity pf is 97.47 percent.\n",
        "(d)The kVA load for maximum efficieny is 137 kVA.\n"
       ]
      }
     ],
     "prompt_number": 30
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.26,Page number: 409 "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the impedance on the high voltage side.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "VA=50e03              #Power rating of the transformer(in VA)\n",
      "V1=2400.0             #Voltage of primary winding(in Volts)\n",
      "V2=240.0              #Voltage of secondary winding(in Volts)\n",
      "f=50.0                #Frequency rating of the transformer(in Hertz)\n",
      "LV=240.0              #Low tension voltage(in Volts)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "I2=VA/V2\n",
      "Z_L=V2/I2\n",
      "K=V2/V1\n",
      "Zeq=Z_L/(K*K)\n",
      "I_high=K*I2\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The load impedance connected to the LV side is %.3f Ohms.\" %(Z_L)\n",
      "print \"(b)The load impedance referred to to the high voltage side is %.2f Ohms.\" %(Zeq)\n",
      "print \"(c)The current referred to the high voltage side is %.3f A.\" %(I_high) "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The load impedance connected to the LV side is 1.152 Ohms.\n",
        "(b)The load impedance referred to to the high voltage side is 115.20 Ohms.\n",
        "(c)The current referred to the high voltage side is 20.833 A.\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 13.27,Page number: 409"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Question:\n",
      "\"\"\"Finding the kVA output of the transformer.\"\"\"\n",
      "\n",
      "#Variable Declaration:\n",
      "VA=10e03              #Power rating of the transformer(in VA)\n",
      "V1=2300.0             #Voltage of HT winding(in Volts)\n",
      "V2=230.0              #Voltage of LT winding(in Volts)\n",
      "f=50.0                #Frequency rating of the transformer(in Hertz)\n",
      "\n",
      "\n",
      "#Calculations:\n",
      "I_HT=VA/V1\n",
      "I_LT=VA/V2\n",
      "I2=I_HT+I_LT\n",
      "I1=I_LT\n",
      "kVA_out=(V1*I2)/1000.0\n",
      "VA_c=(V1*I1)\n",
      "VA_i=V1*(I2-I1)\n",
      "K=V1/(V1+V2)\n",
      "\n",
      "\n",
      "#Result:\n",
      "print \"(a)The current distribution in the windings: load current=%.2f A and the input current is %.2f A.\" %(I2,I1)\n",
      "print \"(b)The kVA output is %.2f kVA.\" %(kVA_out)\n",
      "print \"(c)The volt-amperes transferred conductively is %.2f kVA\" %(VA_c/1000.0) \n",
      "print \"   The volt-amperes transferred inductively is %.2f kVA\" %(VA_i/1000.0)\n",
      "print \"(d)The saving in copper as compared to the two-winding transformer is %.2f per cent.\" %(K*100)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The current distribution in the windings: load current=47.83 A and the input current is 43.48 A.\n",
        "(b)The kVA output is 110.00 kVA.\n",
        "(c)The volt-amperes transferred conductively is 100.00 kVA\n",
        "   The volt-amperes transferred inductively is 10.00 kVA\n",
        "(d)The saving in copper as compared to the two-winding transformer is 90.91 per cent.\n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}