Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
162 views69 pages

Electrical Power System II Scilab Code

Electrical Power System II scilab code for EEE

Uploaded by

sonu8401singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views69 pages

Electrical Power System II Scilab Code

Electrical Power System II scilab code for EEE

Uploaded by

sonu8401singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

1

Contents

List of Scilab Solutions 4

1 A Scilab Program Obtain Voltage Regulation And Efficiency


Of A Short Transmission Line. 6

2 A Scilab Program To Evaluate Performance Of Short Trans-


mission Line Using Graphical Method 9

3 Finding Voltage Regulation And Efficiency Of A Medium


Transmission Line Using Nominal T Method Through Scilab 12

4 Finding Voltage Regulation And Efficiency Of A Medium


Transmission Line Using Nominal Pi Method Through Scilab 15

5 Finding Voltage Regulation And Efficiency Of A Medium


Transmission Line Using End Condenser Method Through
Scilab 20

6 A Scilab Program To Evaluate Performance Of Medium


Transmission Line Using Graphical Method 25

7 Finding voltage regulation and efficiency of a long transmis-


sion line using Rigorous solution method through SCILAB 28

8 A Scilab Program To Evaluate Performance Of Long Trans-


mission Line Using Graphical Method 32

9 A Scilab Program To Find Permissible Frequency And Length


For Limiting Ferranti Effect In Long Transmission Lines. 35

2
10 A Scilab Program For Computing The Abcd Parameters Of
Short, Medium And Long Transmission Lines 38

11 A Scilab Program For Conversion Of Unsymmetrical Ac


Phasors Into Symmetrical Components 46

12 A Scilab Program For Conversion Of Symmetrical Compo-


nents Into Ac Phasors 51

13 Modification Of Zbus Matrix For Short Circuit Study Using


Scilab Programming 54

14 Symmetrical Fault Analysis Using Scilab Programming 64

3
List of Experiments

Solution 1.1 exp1 . . . . . . . . . . . . . . . . . . . . . . . . . 6


Solution 2.2 exp2 . . . . . . . . . . . . . . . . . . . . . . . . . 9
Solution 3.3 exp3 . . . . . . . . . . . . . . . . . . . . . . . . . 12
Solution 4.4 exp4 . . . . . . . . . . . . . . . . . . . . . . . . . 15
Solution 5.5 exp5 . . . . . . . . . . . . . . . . . . . . . . . . . 20
Solution 6.6 exp6 . . . . . . . . . . . . . . . . . . . . . . . . . 25
Solution 7.7 exp7 . . . . . . . . . . . . . . . . . . . . . . . . . 28
Solution 8.8 exp8 . . . . . . . . . . . . . . . . . . . . . . . . . 32
Solution 9.9 exp9 . . . . . . . . . . . . . . . . . . . . . . . . . 35
Solution 10.10 exp10 . . . . . . . . . . . . . . . . . . . . . . . . . 38
Solution 11.11 exp11 . . . . . . . . . . . . . . . . . . . . . . . . . 46
Solution 12.12 exp12 . . . . . . . . . . . . . . . . . . . . . . . . . 51
Solution 13.13 exp13 . . . . . . . . . . . . . . . . . . . . . . . . . 54
Solution 14.14 exp14 . . . . . . . . . . . . . . . . . . . . . . . . . 64

4
List of Figures

1.1 exp1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.1 exp2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.1 exp3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

4.1 exp4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.1 exp5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

6.1 exp6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

7.1 exp7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

8.1 exp8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

9.1 exp9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

10.1 exp10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
10.2 exp10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

11.1 exp11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
11.2 exp11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

12.1 exp12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

13.1 exp13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
13.2 exp13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

14.1 exp14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
14.2 exp14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

5
Experiment: 1

A Scilab Program Obtain


Voltage Regulation And
Efficiency Of A Short
Transmission Line.

Scilab code Solution 1.1 exp1

1 // Experiment −1
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 //Aim : A SCILAB program o b t a i n v o l t a g e r e g u l a t i o n
and e f f i c i e n c y o f a s h o r t t r a n s m i s s i o n l i n e .
7
8 clc ;
9 clear all ;
10 VRLL =220; VR = VRLL / sqrt (3) ;
11 Z = (0.15+ %i *2* %pi *60*1.3263 e -3) *40; // c h a n g e
frequency or length
12
13 disp ( ’ ( a ) ’ )

6
14 SR =304.8+ %i *228.6; // l e g g i n g power f a c t o r
15 IR = conj ( SR ) /(3* conj ( VR ) ) ;
16 IS = IR ;
17 VS = VR + Z * IR ;
18 VSLL = sqrt (3) * abs ( VS )
19 SS = 3* VS * conj ( IS )
20 REG = ( VSLL - VRLL ) / VRLL *100
21 Eff = real ( SR ) / real ( SS ) *100
22 mprintf ( ’ S e n d i n g e n d l i n e v o l t a g e = %f kV \n ’ , VSLL )
23 mprintf ( ’ S e n d i n g Apprent power = %f MVA \n ’ , SS )
24 mprintf ( ’ R e g u l a t i o n = %f %% \n ’ , REG )
25 mprintf ( ’ E f f i c i e n c y = %f %% \n ’ , Eff )
26
27 disp ( ’ ( b ) ’ )
28 SR =304.8 - %i *228.6; // l e a d i n g power f a c t o r
29 IR = conj ( SR ) /(3* conj ( VR ) ) ; IS = IR ;
30 VS = VR + Z * IR ;
31 VSLL = sqrt (3) * abs ( VS )
32 SS = 3* VS * conj ( IS )
33 REG = ( VSLL - VRLL ) / VRLL *100
34 Eff = real ( SR ) / real ( SS ) *100
35 mprintf ( ’ S e n d i n g e n d l i n e v o l t a g e = %f kV \n ’ , VSLL )
36 mprintf ( ’ S e n d i n g Apprent power = %f MVA \n ’ , SS )
37 mprintf ( ’ R e g u l a t i o n = %f %% \n ’ , REG )
38 mprintf ( ’ E f f i c i e n c y = %f %% \n ’ , Eff )
39
40 // o u t p u t : −
41 // ( a )
42 // S e n d i n g e n d l i n e v o l t a g e = 2 5 0 . 0 1 8 6 5 0 kV
43 // S e n d i n g Apprent power = 3 2 2 . 7 9 5 1 6 5 MVA
44 // R e g u l a t i o n = 1 3 . 6 4 4 8 4 1 %
45 // E f f i c i e n c y = 9 4 . 4 2 5 2 0 6 %
46 //
47 // ( b )
48 // S e n d i n g e n d l i n e v o l t a g e = 2 1 0 . 2 8 8 3 8 3 kV
49 // S e n d i n g Apprent power = 3 2 2 . 7 9 5 1 6 5 MVA
50 // R e g u l a t i o n = −4.414372 %
51 // E f f i c i e n c y = 9 4 . 4 2 5 2 0 6 %

7
Figure 1.1: exp1

52 //

8
Experiment: 2

A Scilab Program To Evaluate


Performance Of Short
Transmission Line Using
Graphical Method

Scilab code Solution 2.2 exp2

1 // Experiment −2
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 //Aim : A SCILAB program t o e v a l u a t e p e r f o r m a n c e o f
s h o r t t r a n s m i s s i o n l i n e u s i n g g r a p h i c a l method
7
8
9 clear all ;
10 clc ;
11 // T h i s program c a l c u l a t e s the percentage r e g u l a t i o n
of a short transmission line
12 // I t i s assumed t h a t t h e r e c e i v i n g end v o l t a g e Vr
and m a g n i t u d e o f c u r r e n t I r a r e c o n s t a n t

9
13 Vr = 220 e3 ; // r e c e i v i n g end v o l t a g e
14 R = 33.5; // i n p u t l i n e r e s i s t a n c e
15 X = 138; // l i n e r e a c t a n c e
16 Z = R + X * %i ; // l i n e i m p e d a n c e
17 Irmag = 164.02; // r e c e i v i n g end c u r r e n t m a g n i t u d e
18 // T h i s Irmag i s assumed t o be c o n s t a n t . T h i s w i l l
change the a n g l e o f
19 // p h a s o r o f I r i n t h e v e c t o r d i a g r a m o v e r t h e r a n g e
of pf set in f o l l o w i n g l i n e
20 pf = 1: -0.001:0.5; // power f a c t o r

21 Irang = acos ( pf ) ;
22 Ir = Irmag * exp ( - %i * Irang ) ; // For
l a g g i n g power f a c t o r
23 Vs = ( Vr / sqrt (3) ) + Ir * Z ; // s q r t ( 3 )
i s u s e d h e r e a s we n e e d t o do a p e r
phase a n a l y s i s
24 VrNL = abs ( Vs ) ;
25 VrFL = abs ( Vr / sqrt (3) ) ;
26 per_vol_regu = (( VrNL - VrFL ) / VrFL ) *100;
27 plot ( pf , per_vol_regu , ’− ’ ) ;
28 xlabel ( ’ power f a c t o r ’ )
29 ylabel ( ’ v o l t a g e r e g u l a t i o n ’ )
30 title ( ’ Graph o f power f a c t o r v / s v o l t a g e r e g u l a t i o n ’
)
31
32 // For l e a d i n g power f a c t o r r a n g e , a n g l e s h o u l d be
p o s i t i v e So ,
33
34 Ir = Irmag * exp ( %i * Irang ) ;
35
36 Vs = ( Vr / sqrt (3) ) + Ir * Z ;
37
38 VrNL = abs ( Vs ) ; // a b s o l u t e v a l u e o f Vs
39
40 VrFL = abs ( Vr / sqrt (3) ) ; // a b s v a l u e o f Vr p e r p h a s e
41
42 per_vol_regu = (( VrNL - VrFL ) / VrFL ) *100;

10
Figure 2.1: exp2

43 plot ( pf , per_vol_regu , ’ r ∗ ’ ) ;
44 legend ( ’ L a g g i n g Power F a c t o r ’ , ’ L e a d i n g Power F a c t o r ’
)
45 // g t e x t ( ’ Vreg v s l a g g i n g pf ’ )
46 // g t e x t ( ’ Vreg v s l e a d i n g pf ’ )

11
Experiment: 3

Finding Voltage Regulation


And Efficiency Of A Medium
Transmission Line Using
Nominal T Method Through
Scilab

Scilab code Solution 3.3 exp3

1 // Experiment −3
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 // Aim ; F i n d i n g v o l t a g e r e g u l a t i o n and e f f i c i e n c y
o f a medium t r a n s m i s s i o n l i n e u s i n g n o m i n a l T
method t h r o u g h SCILAB
7
8 clc ;
9 clear all ;
10 R =10;
11 XL =20;

12
12 Y = 4e -4;
13 VRLL =66 e3 ;
14 PR =10000 e3 ;
15 pf =0.8; // c h a n g e power f a c t o r o f l o a d
16 VR =66 e3 / sqrt (3) ;
17 Z = R + %i * XL ;
18 IR = PR /( sqrt (3) * VRLL * pf ) ;
19 IR_COMPLEX = IR *( cos ( acos (0.8) ) - %i * sin ( acos (0.8) ) ) ;
20 VM = VR + IR_COMPLEX *( Z /2) ;
21 IC = %i * Y * VM ;
22 IS = IR_COMPLEX + IC ;
23 VS = VM + IS *( Z /2) ;
24 [ VS_abs , Phase_VS ]= polar ( VS ) ;
25 [ IS_abs , Phase_IS ]= polar ( IS ) ;
26 VS_abs ;
27 IS_abs
28 VSLL = VS * sqrt (3) ;
29 VSLL_abs = abs ( VSLL ) /1000
30 PHASE_DIFF = Phase_VS - Phase_IS ;
31 SendingEnd_PF = cos ( PHASE_DIFF )
32 PS =3* abs ( VS ) * abs ( IS ) * cos ( PHASE_DIFF ) ;
33 EFF =( abs ( PR ) / abs ( PS ) ) *100
34 REG = 100*(( abs ( VSLL ) - abs ( VRLL ) ) ) / abs ( VRLL )
35 mprintf ( ’ S e n d i n g e n d C u r r e n t = %f A \n ’ , IS_abs )
36 mprintf ( ’ S e n d i n g e n d L i n e V o l t a g e = %f kV \n ’ ,
VSLL_abs )
37 mprintf ( ’ S e n d i n g e n d Power f a c t o r = %f \n ’ ,
SendingEnd_PF )
38 mprintf ( ’ E f f i c i e n c y = %f %% \n ’ , EFF )
39 mprintf ( ’ R e g u l a t i o n = %f %% \n ’ , REG )
40
41
42 // Output : −
43 //
44 // S e n d i n g e n d Current = 100.533214 A
45 // S e n d i n g e n d L i n e V o l t a g e = 6 9 . 5 4 3 9 2 5 kV
46 // S e n d i n g e n d Power f a c t o r = 0 . 8 5 3 1 2 2
47 // E f f i c i e n c y = 96.796480 %

13
Figure 3.1: exp3

48 // R e g u l a t i o n = 5 . 3 6 9 5 8 3 %
49 //

14
Experiment: 4

Finding Voltage Regulation


And Efficiency Of A Medium
Transmission Line Using
Nominal Pi Method Through
Scilab

Scilab code Solution 4.4 exp4

1 // Experiment −4
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 // Aim : F i n d i n g v o l t a g e r e g u l a t i o n and e f f i c i e n c y
o f a medium t r a n s m i s s i o n l i n e u s i n g n o m i n a l PI
method t h r o u g h SCILAB
7
8 mode (0) ;
9
10 clc
11 clear all

15
12 disp ( ’ Nominal PI Method f o r medium t r a n s m i s s i o n l i n e
’)
13 R = input ( ’ E n t e r t h e T o t a l l i n e R e s i s t a n c e i n Ohms :
’ ) ; // T o t a l L i n e R e s i s t a n c e i n Ohms l i k e 10
Ohms
14 XL = input ( ’ E n t e r t h e T o t a l l i n e I n d u c t i v e R e a c t a n c e
i n Ohms : ’ ) ; // T o t a l l i n e I n d u c t i v e R e a c t a n c e
i n Ohms l i k e 50 Ohms
15 Y = input ( ’ E n t e r t h e T o t a l l i n e S u s e p t a n c e i n Seimen
: ’ ) ; // T o t a l l i n e S u s e p t a n c e i n Seimen l i k e 10
e −4 Seimen
16 f = input ( ’ E n t e r t h e F r e q u e n c y i n Hz : ’ ) ; //
F r e q u e n c y i n Hz l i k e 50 Hz
17 PR = input ( ’ E n t e r t h e R e c i e v i n g End Power i n Watt : ’
) ; // R e c i e v i n g End Power i n V o l t l i k e 20 e 6 W
18 VRLL = input ( ’ E n t e r t h e R e c i e v i n g End L i n e V o l t a g e i n
V o l t : ’ ) ; // R e c i e v i n g End L i n e V o l t a g e i n V o l t
l i k e 66 e 3 V
19 pf = input ( ’ E n t e r R e c i e v i n f End L a g g i n g Power F a c t o r
: ’ ) ; // R e c i e v i n f End L a g g i n g Power F a c t o r l i k e
0.9
20 Z = R + %i * XL ;
21 VR = VRLL / sqrt (3) ;
22
23 IR = PR /( sqrt (3) * VRLL * pf ) ;
24 IR_COMPLEX = IR *( cos ( acos ( pf ) ) - %i * sin ( acos ( pf ) ) ) ;
25
26 IC1 = %i * Y /2* VR ;
27
28 IL = IR_COMPLEX + IC1 ;
29
30 VS = VR + IL * Z ;
31
32 IC2 = %i * Y /2* VS ;
33
34 IS = IL + IC2
35
36 [ VS_abs , Phase_VS ]= polar ( VS ) ;

16
37 [ IS_abs , Phase_IS ]= polar ( IS ) ;
38 VS_abs ;
39 IS_abs ;
40 VSLL = VS * sqrt (3) ;
41 VSLL_abs = abs ( VSLL ) /1000
42 PHASE_DIFF = Phase_VS - Phase_IS ;
43 SendingEnd_PF = cos ( PHASE_DIFF ) ;
44
45 PS =3* abs ( VS ) * abs ( IS ) * cos ( PHASE_DIFF )
46 EFF =( abs ( PR ) / abs ( PS ) ) *100
47 REG = 100*(( abs ( VSLL ) - abs ( VRLL ) ) ) / abs ( VRLL )
48
49 mprintf ( ’ S e n d i n g e n d C u r r e n t = %f A \n ’ , IS_abs )
50 mprintf ( ’ S e n d i n g e n d L i n e V o l t a g e = %f kV \n ’ ,
VSLL_abs )
51 mprintf ( ’ S e n d i n g e n d Power f a c t o r = %f \n ’ ,
SendingEnd_PF )
52 mprintf ( ’ E f f i c i e n c y = %f %% \n ’ , EFF )
53 mprintf ( ’ R e g u l a t i o n = %f %% \n ’ , REG )
54
55
56 // o u t p u t : −
57 //
58 // Nominal PI Method f o r medium t r a n s m i s s i o n l i n e
59 // E n t e r t h e T o t a l l i n e R e s i s t a n c e i n Ohms : 10
60 // E n t e r t h e T o t a l l i n e I n d u c t i v e R e a c t a n c e i n Ohms :
50
61 // E n t e r t h e T o t a l l i n e S u s e p t a n c e i n Seimen : 10 e −4
62 // E n t e r t h e F r e q u e n c y i n Hz : 50
63 // E n t e r t h e R e c i e v i n g End Power i n Watt : 20 e 6
64 // E n t e r t h e R e c i e v i n g End L i n e V o l t a g e i n V o l t : 6 6 e 3
65 // E n t e r R e c i e v i n f End L a g g i n g Power F a c t o r : 0 . 9
66 // I S =
67 //
68 // 170.90917 − 44.112456 i
69 // VSLL abs =
70 //
71 // 76.021348

17
72 // PS =
73 //
74 // 2 1 0 4 7 6 9 7 . + 1 . 0 9 4D−09 i
75 // EFF =
76 //
77 // 95.022274
78 // REG =
79 //
80 // 15.183861
81 // S e n d i n g e n d C u r r e n t = 1 7 6 . 5 1 0 2 0 8 A
82 // S e n d i n g e n d L i n e V o l t a g e = 7 6 . 0 2 1 3 4 8 kV
83 // S e n d i n g e n d Power f a c t o r = 0 . 9 0 5 6 0 4
84 // E f f i c i e n c y = 9 5 . 0 2 2 2 7 4 %
85 // R e g u l a t i o n = 1 5 . 1 8 3 8 6 1 %

18
Figure 4.1: exp4

19
Experiment: 5

Finding Voltage Regulation


And Efficiency Of A Medium
Transmission Line Using End
Condenser Method Through
Scilab

Scilab code Solution 5.5 exp5

1 // Experiment −5
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 // Aim : F i n d i n g v o l t a g e r e g u l a t i o n and e f f i c i e n c y
o f a medium t r a n s m i s s i o n l i n e u s i n g End
C o n d e n s e r method t h r o u g h SCILAB
7
8 mode (0) ;
9
10 clc
11 clear all

20
12 disp ( ’ End C o n d e n s o r Method f o r medium t r a n s m i s s i o n
line ’)
13 R =25 // ( ’ E n t e r t h e l i n e R e s i s t a n c e i n Ohms : ’ )
14 X =80 // ( ’ E n t e r t h e l i n e I n d u c t i v e R e a c t a n c e i n
Ohms : ’ )
15 Y =14 e -4 // ( ’ E n t e r t h e l i n e S u s e p t a n c e i n Seimen :
’)
16 f =50 // ( ’ E n t e r t h e f r e q u e n c y : ’ )
17 PR =15 e6 // ( ’ E n t e r t h e R e c i e v i n g End Power i n Watt :
’)
18 VRLine =66 e3 // ( ’ E n t e r t h e R e c i e v i n g End L i n e
Voltage in Volt : ’ )
19 Pf =0.8 // ( ’ E n t e r R e c i e v i n f End L a g g i n g Power F a c t o r
: ’)
20 // X = 2∗ %pi ∗ f ∗L
21 Z = R + X * %i ;
22 //Y = %i ∗ 2 ∗ %pi ∗ f ∗C
23
24 IR = PR /( VRLine * Pf ) ;
25
26 Pfang = acos ( Pf ) ;
27
28 IR_Complex = IR *( Pf - %i * sin ( Pfang ) ) ;
29
30 IC_Complex = %i * Y * VRLine ;
31
32 IS = IR_Complex + IC_Complex
33
34 Voltage_drop = IS * Z ;
35
36 VS = VRLine + IS * Z
37
38 [ VS_abs , Phase_VS ]= polar ( VS ) ;
39
40 [ IS_abs , Phase_IS ]= polar ( IS ) ;
41
42 VS_abs ;
43 IS_abs ;

21
44
45 PHASE_DIFF = Phase_VS - Phase_IS ;
46 SendingEnd_PF = cos ( PHASE_DIFF ) ;
47 Sending_End_PF = abs ( SendingEnd_PF )
48 PS = abs ( VS ) * abs ( IS ) * cos ( PHASE_DIFF ) ;
49 EFF =( abs ( PR ) / abs ( PS ) ) *100
50 REG = 100*(( abs ( VS ) - abs ( VRLine ) ) ) / abs ( VRLine )
51
52 //
53 // o u t p u t : −
54 //
55 // End C o n d e n s o r Method f o r medium t r a n s m i s s i o n l i n e
56 // R =
57 //
58 // 25.
59 // X =
60 //
61 // 80.
62 // Y =
63 //
64 // 0.0014
65 // f =
66 //
67 // 50.
68 // PR =
69 //
70 // 15000000.
71 // VRLine =
72 //
73 // 66000.
74 // Pf =
75 //
76 // 0.8
77 // I S =
78 //
79 // 227.27273 − 78.054545 i
80 // VS =
81 //

22
82 // 77926.182 + 16230.455 i
83 // Se nd in g E nd P F =
84 //
85 // 0.8596751
86 // EFF =
87 //
88 // 91.220706
89 // REG =
90 //
91 // 20.603752

23
24

Figure 5.1: exp5


Experiment: 6

A Scilab Program To Evaluate


Performance Of Medium
Transmission Line Using
Graphical Method

Scilab code Solution 6.6 exp6

1 // Experiment −6
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 // Aim : A SCILAB program t o e v a l u a t e p e r f o r m a n c e o f
medium t r a n s m i s s i o n l i n e u s i n g g r a p h i c a l method
7
8 clear all ;
9 clc ;
10 // Program t o calculate voltage regulation of
n o m i n a l PI method o f medium l e n g t h t r a n s m i s s i o n
line
11 // L i n e p a r a m e t e r s a r e t a k e n from S t e v e n s o n a s
b e f o r e . One may u s e any o t h e r d a t a u s i n g t h e

25
%commented i n p u t f u n c t i o n s
12 Vr = 220 e3 ; // i n p u t ( ’ E n t e r t h e v a l u e o f Vr = ’ ) ;
13 R = 33.5; // i n p u t ( ’ E n t e r t h e v a l u e o f R = ’ ) ;
14 X = 138; // i n p u t ( ’ E n t e r t h e v a l u e o f X = ’ ) ;
15 pf = 0.9; // i n p u t ( ’ E n t e r t h e v a l u e o f p f = ’ ) ;
16 Pr = 50 e6 ; // i n p u t ( ’ E n t e r t h e v a l u e o f p r = ’ ) ;
17 Y = %i *0.3 e -3; // i n p u t ( ’ E n t e r t h e v a l u e o f Y = ’ ) ;
18 Z = R + X * %i ;
19 Irmag = Pr /( sqrt (3) * Vr * pf ) ;
20 pf = 0.5:0.001:1;
21 Irang = acos ( pf ) ; // A n g l e i n r a d i a n
22 Ir = Irmag * exp ( - %i * Irang ) ;
23 // Irmag i s k e p t c o n s t a n t . Only I r p h a s o r r o t a t e s . −
ve s i g n i s u s e d b e c a u s e o f l a g g i n g power f a c t o r
%and t o i n d i c a t e t h a t w i t h Vr a s r e f e r e n c e p h a s o r
, a n g l e o f I r s h o u l d be n e g a t i v e . I r a n g s h o u l d be
%in r a d i a n o n l y . I t w i l g i v e wrong r e s u l t , i f
Irang i s in degrees
24
25 Ir1 = Irmag * exp ( %i * Irang ) ; // For l e a d i n g power
factor
26 // C a l c u l a t i o n s f o r l a g g i n g power f a c t o r f o r medium
line length
27 Vs = Vr / sqrt (3) + ( Ir +( Y /2) * Vr / sqrt (3) ) * Z ; //
a l l t e r m s a r e o f v o l t a g e and a r e p h a s e v a l u e s
28 VrNLm = abs ( Vs / (1+(( Y * Z ) /2) ) ) ;
29 VrFLm = abs ( Vr / sqrt (3) ) ;
30 per_vol_regulag = ( ( VrNLm - VrFLm ) / VrFLm ) * 100;
31 // C a l c u l a t i o n s f o r l e a d i n g power f a c t o r f o r medium
line length
32 Vs1m = Vr / sqrt (3) + ( Ir1 +( Y /2) * Vr / sqrt (3) ) * Z ;
33 // a l l t e r m s a r e o f v o l t a g e and a r e i n p h a s e v a l u e s
34 VrNL1m = abs ( Vs1m / (1+(( Y * Z ) /2) ) ) ;
35 per_vol_regulead = ( ( VrNL1m - VrFLm ) / VrFLm ) * 100;
36 // p l o t t h e two w a v e f o r m s on t h e same g r a p h
37 plot ( pf , per_vol_regulag , ’ r ’ ,pf , per_vol_regulead , ’ ∗ ’ )
;
38

26
Figure 6.1: exp6

39 xlabel ( ’ power f a c t o r ’ )
40 ylabel ( ’ v o l t a g e r e g u l a t i o n ’ )
41 title ( ’ Medium l i n e v o l t a g e r e g u l a t i o n ’ )
42 legend ( ’ L a g g i n g Power F a c t o r ’ , ’ L e a d i n g Power F a c t o r ’
)
43 // g t e x t ( ’ Vreg v s l a g g i n g pf ’ )
44 // g t e x t ( ’ Vreg v s l e a d i n g pf ’ )

27
Experiment: 7

Finding voltage regulation and


efficiency of a long transmission
line using Rigorous solution
method through SCILAB

Scilab code Solution 7.7 exp7

1 // Experiment −7
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 // Aim : F i n d i n g v o l t a g e r e g u l a t i o n and e f f i c i e n c y
of a long transmission l i n e using Rigorous
s o l u t i o n method t h r o u g h SCILAB
7
8 mode (0) ;
9
10 clc
11 clear all
12 disp ( ’ R i g o r o u s Method f o r Long t r a n s m i s s i o n l i n e ’ )
13 R = input ( ’ E n t e r t h e T o t a l l i n e R e s i s t a n c e i n Ohms :

28
’ ) ; // T o t a l l i n e R e s i s t a n c e i n Ohms l i k e 32
Ohms
14 XL = input ( ’ E n t e r t h e T o t a l l i n e I n d u c t i v e R e a c t a n c e
i n Ohms : ’ ) ; // T o t a l l i n e I n d u c t i v e R e a c t a n c e
i n Ohms l i k e 50 Ohms
15 y = input ( ’ E n t e r t h e T o t a l l i n e S u s e p t a n c e i n Seimen
: ’ ) ; // T o t a l l i n e S u s e p t a n c e i n Seimen l i k e
0.0003
16 f = input ( ’ E n t e r t h e f r e q u e n c y i n Hz : ’ ) ; //
f r e q u e n c y i n Hz l i k e 50 Hz
17 PR = input ( ’ E n t e r t h e R e c i e v i n g End Power i n Watt : ’
) ; // R e c i e v i n g End Power i n Watt l i k e 20 e 6
18 VRLL = input ( ’ E n t e r t h e R e c i e v i n g End L i n e V o l t a g e i n
V o l t : ’ ) ; // R e c i e v i n g End L i n e V o l t a g e i n V o l t
l i k e 110 e 3
19 pf = input ( ’ E n t e r R e c i e v i n f End L a g g i n g Power F a c t o r
: ’ ) ; // R e c i e v i n f End L a g g i n g Power F a c t o r l i k e
0.8
20 Z = R + %i * XL ;
21 Y = %i * y ;
22 VR = VRLL / sqrt (3) ;
23 IR = PR /( sqrt (3) * VRLL * pf ) ;
24
25 A = 1+ ( Z * Y ) /2 + ( Z * Z * Y * Y ) /24; //A= c o s h ( s q r t (Y∗Z
))
26
27 B = sqrt ( Y * Z ) + (( Y * Z ) ^(3/2) ) /6; //B = s i n h ( s q r t (
Y∗Z ) )
28
29 VS = VR * A + IR * sqrt ( Z / Y ) * B ; //VS = VR∗ c o s h ( s q r t (Y
∗Z ) ) + IR ∗ s q r t ( Z/Y) ∗ s i n h ( s q r t (Y∗Z ) )
30
31 IS = VR * sqrt ( Y / Z ) * B + IR * A ; // I S = VR∗ s q r t (Y/Z ) ∗
s i n h ( s q r t (Y∗Z ) ) + IR ∗ c o s h ( s q r t (Y∗Z ) )
32
33 [ VS_abs , Phase_VS ]= polar ( VS ) ;
34 [ IS_abs , Phase_IS ]= polar ( IS ) ;
35 VS_abs ;

29
36 IS_abs ;
37 VSLL = VS * sqrt (3) ;
38 VSLL_abs = abs ( VSLL ) /1000;
39 Phase_VS ;
40 Phase_IS ;
41
42 PHASE_DIFF = Phase_VS - Phase_IS ;
43
44 SendingEnd_PF = cos ( PHASE_DIFF ) ;
45
46 PS =3* VS_abs * IS_abs * cos ( PHASE_DIFF ) ;
47 EFF =( abs ( PR ) / abs ( PS ) ) *100;
48 REG = 100*(( abs ( VSLL ) - abs ( VRLL ) ) ) / abs ( VRLL ) ;
49
50 mprintf ( ’ \n\ n S e n d i n g e n d C u r r e n t = %f A \n ’ , IS_abs )
51 mprintf ( ’ S e n d i n g e n d L i n e V o l t a g e = %f kV \n ’ ,
VSLL_abs )
52 mprintf ( ’ S e n d i n g e n d Power f a c t o r = %f \n ’ ,
SendingEnd_PF )
53 mprintf ( ’ E f f i c i e n c y = %f %% \n ’ , EFF )
54 mprintf ( ’ R e g u l a t i o n = %f %% \n ’ , REG )
55
56
57 // o u t p u t : −
58 //
59 // R i g o r o u s Method f o r Long t r a n s m i s s i o n l i n e
60 // E n t e r t h e T o t a l l i n e R e s i s t a n c e i n Ohms : 32
61 // E n t e r t h e T o t a l l i n e I n d u c t i v e R e a c t a n c e i n Ohms :
50
62 // E n t e r t h e T o t a l l i n e S u s e p t a n c e i n Seimen : 0 . 0 0 0 3
63 // E n t e r t h e f r e q u e n c y i n Hz : 50
64 // E n t e r t h e R e c i e v i n g End Power i n Watt : 20 e 6
65 // E n t e r t h e R e c i e v i n g End L i n e V o l t a g e i n V o l t : 1 1 0
e3
66 // E n t e r R e c i e v i n f End L a g g i n g Power F a c t o r : 0 . 8
67 //
68 //
69 // S e n d i n g e n d C u r r e n t = 1 3 1 . 6 7 4 0 1 8 A

30
Figure 7.1: exp7

70 // S e n d i n g e n d L i n e V o l t a g e = 1 1 7 . 0 1 5 9 3 2 kV
71 // S e n d i n g e n d Power f a c t o r = 0 . 9 9 8 8 4 7
72 // E f f i c i e n c y = 75.028310 %
73 // R e g u l a t i o n = 6.378120 %

31
Experiment: 8

A Scilab Program To Evaluate


Performance Of Long
Transmission Line Using
Graphical Method

Scilab code Solution 8.8 exp8

1 // Experiment −8
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 // Aim : A SCILAB program t o e v a l u a t e p e r f o r m a n c e o f
l o n g t r a n s m i s s i o n l i n e u s i n g g r a p h i c a l method
7
8 clc
9 clear all
10 disp ( ’ R i g o r o u s Method f o r Long t r a n s m i s s i o n line
u s i n g g r a p h i c a l method ’ )
11 R =32 // ( ’ E n t e r t h e T o t a l l i n e R e s i s t a n c e i n Ohms :
’)
12 XL =50 // ( ’ E n t e r t h e T o t a l l i n e I n d u c t i v e R e a c t a n c e

32
i n Ohms : ’ )
13 y =0.003 // ( ’ E n t e r t h e T o t a l l i n e S u s e p t a n c e i n
Seimen : ’ )
14 f =50 // ( ’ E n t e r t h e f r e q u e n c y : ’ )
15 PR = 20 e6 // ( ’ E n t e r t h e R e c i e v i n g End Power i n Watt :
’)
16 VRLL =110 e3 // ( ’ E n t e r t h e R e c i e v i n g End L i n e V o l t a g e
in Volt : ’ )
17 pf =0.8 ,
18 Z = R + %i * XL ;
19 Y = %i * y ;
20 VR = VRLL / sqrt (3) ;
21 IR = PR /( sqrt (3) * VRLL * pf ) ;
22 A = 1+ ( Z * Y ) /2 + ( Z * Z * Y * Y ) /24; //A= c o s h ( s q r t (Y∗Z
))
23
24 B = sqrt ( Y * Z ) + (( Y * Z ) ^(3/2) ) /6; //B = s i n h ( s q r t (
Y∗Z ) )
25
26 pf = 1: -0.01:0.5
27
28
29 Irang = acos ( pf ) ; // A n g l e i n r a d i a n
30
31 Ir = IR * exp ( - %i * Irang ) ;
32 Ir1 = IR * exp ( %i * Irang ) ;
33
34
35 VS = VR * A + Ir * sqrt ( Z / Y ) * B ; //VS = VR∗ c o s h ( s q r t (Y
∗Z ) ) + IR ∗ s q r t ( Z/Y) ∗ s i n h ( s q r t (Y∗Z ) )
36
37 VS1 = VR * A + Ir1 * sqrt ( Z / Y ) * B ; //VS = VR∗ c o s h ( s q r t
(Y∗Z ) ) + IR ∗ s q r t ( Z/Y) ∗ s i n h ( s q r t (Y∗Z ) )
38
39
40 [ VS_abs , Phase_VS ]= polar ( VS ) ;
41 [ VS1_abs , Phase_VS1 ]= polar ( VS1 ) ;
42

33
Figure 8.1: exp8

43 VSLL = VS ;
44 VSLL1 = VS1 ;
45 REGlag = 100*(( abs ( VSLL ) - abs ( VR ) ) ) / abs ( VR )
46 REGlead = 100*(( abs ( VSLL1 ) - abs ( VR ) ) ) / abs ( VR )
47
48
49 plot ( pf , REGlag , ’ g− ’ ) ;
50 plot ( pf , REGlead , ’ b ’ ) ;
51
52 xlabel ( ’ power f a c t o r ’ )
53 ylabel ( ’ v o l t a g e r e g u l a t i o n ’ )
54 title ( ’ Long T r a n s m i s s i o n l i n e v o l t a g e r e g u l a t i o n ’ )
55 legend ( ’ L a g g i n g Power F a c t o r ’ , ’ L e a d i n g Power F a c t o r ’
)

34
Experiment: 9

A Scilab Program To Find


Permissible Frequency And
Length For Limiting Ferranti
Effect In Long Transmission
Lines.

Scilab code Solution 9.9 exp9

1 // Experiment −9
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 // Aim : A SCILAB Program t o f i n d p e r m i s s i b l e
f r e q u e n c y and l e n g t h f o r l i m i t i n g F e r r a n t i e f f e c t
in long transmission l i n e s .
7
8
9 clc ;
10 clear all ; // C l e a r A l l V a r i a b l e s & Command Window
11 Standard_f =50;

35
12 l =400;
13 VSLL =220 e3 ; // D e f i n i n g Given DATA
14 r =0.125; // D e f i n i n g Given DATA
15 x =0.4; // D e f i n i n g Given DATA
16 y = %i *2.8 e -6; // D e f i n i n g Given DATA
17 R=r*l;
18 X=x*l;
19 Y=y*l;
20 z = r + %i * x ;
21 Z = R + %i * X ;
22 A =1+ Y * Z /2; // D e f i n i n g ABCD P a r a m e t e r s
23 B = Z *(1+ Y * Z /6) ; // D e f i n i n g ABCD
Parameters
24 C = Y *(1+ Y * Z /6) ; // D e f i n i n g ABCD P a r a m e t e r s
25 D = A ; // D e f i n i n g ABCD P a r a m e t e r s
26
27 No_load_VRLL = VSLL / A ;
28 NoLoad_VRLL = abs ( No_load_VRLL ) /1000 // D i s p l a y
No Load V o l t a g e a t R e c e i v i n g
29 NoLoad_VR = NoLoad_VRLL / sqrt (3) ; // C a l c u l a t e
V o l t a g e p e r Phase
30 NoLoad_IS = abs ( C * NoLoad_VR ) // C a l c u l a t e
S e n d i n g end C u r r e n t
31
32 VRLL_MAX =235 e3 ; // D e f i n e l i m i t
, t h e r e c e i v i n g end V o l t
33 new_A = VSLL / VRLL_MAX ; // E v a l u a t e
Parameter A f o r VRLL MAX
34 l = sqrt ( real ((2* new_A -2) / y / z ) ) ; // E q u a t i o n f o r
maximum Length
35 Permisible_Lenth = abs ( l ) // Find t h e
Magnitude o u t o f Complex
36
37 VRLL_MAX2 =250 e3 ; // S i m i l a r t o
above
38 new_A2 = VSLL / VRLL_MAX2 ;
39 Max_Permisible_f = abs ((2500* sqrt ( R ^2* Y ^2/10000+ X * Y *(
new_A2 -1) /1250) -25* R * Y ) / X / Y )

36
Figure 9.1: exp9

40
41 mprintf ( ’ No Load V o l t a g e a t R e c e i v i n g end = %f kV \n
\n ’ , NoLoad_VRLL )
42 mprintf ( ’ No l o a d S e n d i n g end C u r r e n t = %f A \n\n ’ ,
NoLoad_IS )
43 mprintf ( ’ P e r m i s s i b l e l e n g t h = %f Km \n\n ’ ,
Permisible_Lenth )
44 mprintf ( ’ Max . P e r m i s s i b l e F r e q u e n c y = %f Hz \n\n ’ ,
Max_Permisible_f )
45
46
47 // o u t p u t : −
48 //
49 // No Load V o l t a g e a t R e c e i v i n g end = 2 4 1 . 5 3 7 8 1 1 kV
50 //
51 //No l o a d S e n d i n g end C u r r e n t = 0 . 1 5 1 5 2 8 A
52 //
53 // P e r m i s s i b l e l e n g t h = 3 2 2 . 2 4 3 7 5 4 Km
54 //
55 //Max . P e r m i s s i b l e F r e q u e n c y = 6 3 . 6 7 8 6 4 1 Hz

37
Experiment: 10

A Scilab Program For


Computing The Abcd
Parameters Of Short, Medium
And Long Transmission Lines

Scilab code Solution 10.10 exp10

1 // Experiment −10
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 // Aim : A SCILAB program f o r c o m p u t i n g t h e ABCD
p a r a m e t e r s o f s h o r t , medium and l o n g t r a n s m i s s i o n
lines
7
8 clc
9 clear all
10 disp ( ’ E n t e r y o u r c h o i c e : ’ )
11 disp ( ’ 1 : f o r s h o r t t r a n s m i s s i o n l i n e ’ )
12 disp ( ’ 2 : f o r medium t r a n s m i s s i o n l i n e ’ )
13 disp ( ’ 3 : f o r l o n g t r a n s m i s s i o n l i n e ’ )

38
14 check = input ( ’ E n t e r y o u r c h o i c e : ’ )
15 R = input ( ’ E n t e r t h e l i n e R e s i s t a n c e i n Ohms : ’ )
16 L = input ( ’ E n t e r t h e l i n e I n d u c t a n c e i n Henry : ’ )
17 C = input ( ’ E n t e r t h e l i n e C a p a c i t a n c e i n Farad : ’ )
18 f = input ( ’ E n t e r t h e f r e q u e n c y : ’ )
19 X = 2* %pi * f * L
20 Z = R + %i * X ;
21 Y = %i *2* %pi * f * C
22 if ( check ==1)
23 Adata = 1; // ABCD i n c a r t e s i a n form
24 Bdata = Z ; // ABCD i n c a r t e s i a n form
25 Cdata = 0; // ABCD i n c a r t e s i a n form
26 Ddata = 1; // ABCD i n c a r t e s i a n form
27 Result = [ Adata , Bdata , Cdata , Ddata ]
28 mprintf ( ’ABCD c o n s t a n t f o r S h o r t T r a n s m i s s i o n l i n e \n
A c o n s t a n t = %f \n B c o n s t a n t= %f + i %f ohm
\n C c o n s t a n t=%f mho \n D c o n s t a n t = %f \n ’ ,
Adata , real ( Bdata ) , imag ( Bdata ) , Cdata , Ddata )
29 end
30
31 if ( check ==2)
32 disp ( ’ E n t e r 1 f o r Nominal T−method ’ )
33 disp ( ’ E n t e r 2 f o r Nominal PI−method ’ )
34 s = input ( ’ E n t e r y o u r c h o i c e : ’ )
35 if ( s ==1)
36 Adata = 1 + ( Y * Z ) /2;
37 Bdata = Z *(1 + ( Y * Z ) /4) ;
38 Cdata = Y ;
39 Ddata = (1 + ( Y * Z ) /2) ;
40
41 Result = [ Adata , Bdata , Cdata , Ddata ]
42 mprintf ( ’ABCD c o n s t a n t f o r Medium T r a n s m i s s i o n
line
Nominal T−method \n A c o n s t a n t = %f + i %f \n
B c o n s t a n t= %f + i % f ohm \n C c o n s t a n t=%f + i %f
mho \n D c o n s t a n t = %f + i % f \n ’ , real ( Adata ) ,
imag ( Adata ) , real ( Bdata ) , imag ( Bdata ) , real ( Cdata ) ,
imag ( Cdata ) , real ( Ddata ) , imag ( Ddata ) )
43 else

39
44 Adata = 1 + ( Y * Z ) /2;
45 Bdata = Z
46 Cdata = Y * (1 + ( Y * Z ) /4) ;
47 Ddata = (1 + ( Y * Z ) /2) ;
48 Result = [ Adata , Bdata , Cdata , Ddata ]
49 mprintf ( ’ABCD c o n s t a n t f o r Medium T r a n s m i s s i o n l i n e
Nominal PI−method \n A c o n s t a n t = %f + i %f \n
B c o n s t a n t= %f + i % f ohm \n C c o n s t a n t=%f + i %f
mho \n D c o n s t a n t = %f + i % f \n ’ , real ( Adata ) ,
imag ( Adata ) , real ( Bdata ) , imag ( Bdata ) , real ( Cdata ) ,
imag ( Cdata ) , real ( Ddata ) , imag ( Ddata ) )
50 end end
51
52 if ( check ==3)
53 Adata = cosh ( sqrt ( Y * Z ) ) ;
54 Bdata = ( sqrt ( Z / Y ) * sinh ( sqrt ( Y * Z ) ) ) ;
55 Cdata = (1/ sqrt ( Z / Y ) * sinh ( sqrt ( Y * Z ) ) ) ;
56 Ddata = cosh ( sqrt ( Y * Z ) ) ;
57 Result = [ Adata , Bdata , Cdata , Ddata ];
l i n e \n
58 mprintf ( ’ABCD c o n s t a n t f o r Long T r a n s m i s s i o n
A c o n s t a n t = %f + i %f \n B c o n s t a n t= %f + i % f
ohm \n C c o n s t a n t=%f + i %f mho \n D c o n s t a n t =
%f + i % f \n ’ , real ( Adata ) , imag ( Adata ) , real ( Bdata
) , imag ( Bdata ) , real ( Cdata ) , imag ( Cdata ) , real ( Ddata )
, imag ( Ddata ) )
59 end
60
61 //
62 // o u t p u t : −
63 //
64 // For S h o r t T r a n s m i s s i o n l i n e
65 //
66 // E n t e r y o u r c h o i c e :
67 //
68 // 1 : f o r s h o r t t r a n s m i s s i o n l i n e
69 //
70 // 2 : f o r medium t r a n s m i s s i o n l i n e
71 //

40
72 // 3 : f o r l o n g t r a n s m i s s i o n l i n e
73 // E n t e r y o u r c h o i c e : 1
74 // E n t e r t h e l i n e R e s i s t a n c e i n Ohms : 20
75 // E n t e r t h e l i n e I n d u c t a n c e i n Henry : 50
76 // E n t e r t h e l i n e C a p a c i t a n c e i n Farad : 0 . 0 0 0 3
77 // E n t e r t h e f r e q u e n c y : 50
78 //ABCD c o n s t a n t f o r S h o r t T r a n s m i s s i o n l i n e
79 // A c o n s t a n t = 1 . 0 0 0 0 0 0
80 // B c o n s t a n t= 2 0 . 0 0 0 0 0 0 + i 1 5 7 0 7 . 9 6 3 2 6 8 ohm
81 // C c o n s t a n t = 0 . 0 0 0 0 0 0 mho
82 // D c o n s t a n t = 1 . 0 0 0 0 0 0
83 //
84 //
85 // For Nominal T method o f medium T r a n s m i s s i o n l i n e
86 //
87 // E n t e r y o u r c h o i c e :
88 //
89 // 1 : f o r s h o r t t r a n s m i s s i o n l i n e
90 //
91 // 2 : f o r medium t r a n s m i s s i o n l i n e
92 //
93 // 3 : f o r l o n g t r a n s m i s s i o n l i n e
94 // E n t e r y o u r c h o i c e : 2
95 // E n t e r t h e l i n e R e s i s t a n c e i n Ohms : 20
96 // E n t e r t h e l i n e I n d u c t a n c e i n Henry : 50
97 // E n t e r t h e l i n e C a p a c i t a n c e i n Farad : 0 . 0 0 0 3
98 // E n t e r t h e f r e q u e n c y : 50
99 //
100 // E n t e r 1 f o r Nominal T−method
101 //
102 // E n t e r 2 f o r Nominal PI−method
103 // E n t e r y o u r c h o i c e : 1
104 //ABCD c o n s t a n t f o r Medium T r a n s m i s s i o n l i n e Nominal
T−method
105 // A c o n s t a n t = − 7 3 9 . 2 2 0 3 3 0 + i 0 . 9 4 2 4 7 8
106 // B c o n s t a n t= − 1 4 7 8 4 . 4 0 6 6 0 2 + i − 5 7 9 7 9 5 9 . 4 8 9 5 1 0 ohm
107 // C c o n s t a n t = 0 . 0 0 0 0 0 0 + i 0 . 0 9 4 2 4 8 mho
108 // D c o n s t a n t = − 7 3 9 . 2 2 0 3 3 0 + i 0 . 9 4 2 4 7 8

41
109 //
110 // For Nominal PI method o f medium T r a n s m i s s i o n l i n e
111 //
112 // E n t e r y o u r c h o i c e :
113 //
114 // 1 : f o r s h o r t t r a n s m i s s i o n l i n e
115 //
116 // 2 : f o r medium t r a n s m i s s i o n l i n e
117 //
118 // 3 : f o r l o n g t r a n s m i s s i o n l i n e
119 // E n t e r y o u r c h o i c e : 2
120 // E n t e r t h e l i n e R e s i s t a n c e i n Ohms : 20
121 // E n t e r t h e l i n e I n d u c t a n c e i n Henry : 50
122 // E n t e r t h e l i n e C a p a c i t a n c e i n Farad : 0 . 0 0 0 3
123 // E n t e r t h e f r e q u e n c y : 50
124 //
125 // E n t e r 1 f o r Nominal T−method
126 //
127 // E n t e r 2 f o r Nominal PI−method
128 // E n t e r y o u r c h o i c e : 2
129 //ABCD c o n s t a n t f o r Medium T r a n s m i s s i o n l i n e Nominal
PI−method
130 // A c o n s t a n t = − 7 3 9 . 2 2 0 3 3 0 + i 0 . 9 4 2 4 7 8
131 // B c o n s t a n t= 2 0 . 0 0 0 0 0 0 + i 1 5 7 0 7 . 9 6 3 2 6 8 ohm
132 // C c o n s t a n t = −0.044413 + i − 3 4 . 7 8 7 8 1 3 mho
133 // D c o n s t a n t = − 7 3 9 . 2 2 0 3 3 0 + i 0 . 9 4 2 4 7 8
134 //
135 //
136 // For l o n g T r a n s m i s s i o n l i n e
137 //
138 // E n t e r y o u r c h o i c e :
139 //
140 // 1 : f o r s h o r t t r a n s m i s s i o n l i n e
141 //
142 // 2 : f o r medium t r a n s m i s s i o n l i n e
143 //
144 // 3 : f o r l o n g t r a n s m i s s i o n l i n e
145 // E n t e r y o u r c h o i c e : 3

42
146 // E n t e r t h e l i n e R e s i s t a n c e i n Ohms : 20
147 // E n t e r t h e l i n e I n d u c t a n c e i n Henry : 50
148 // E n t e r t h e l i n e C a p a c i t a n c e i n Farad : 0 . 0 0 0 3
149 // E n t e r t h e f r e q u e n c y : 50
150 //ABCD c o n s t a n t f o r Long T r a n s m i s s i o n l i n e
151 // A c o n s t a n t = 0 . 7 1 2 9 6 0 + i 0 . 0 1 7 1 8 3
152 // B c o n s t a n t= 7 . 3 1 0 5 2 7 + i 2 8 6 . 4 3 5 8 2 6 ohm
153 // C c o n s t a n t = 0 . 0 0 0 0 4 2 + i 0 . 0 0 1 7 1 9 mho
154 // D c o n s t a n t = 0 . 7 1 2 9 6 0 + i 0 . 0 1 7 1 8 3

43
44

Figure 10.1: exp10


45
Figure 10.2: exp10
Experiment: 11

A Scilab Program For


Conversion Of Unsymmetrical
Ac Phasors Into Symmetrical
Components

Scilab code Solution 11.11 exp11

1 // Experiment −11
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 // Aim : A SCILAB program f o r c o n v e r s i o n o f
u n s y m m e t r i c a l AC p h a s o r s i n t o s y m m e t r i c a l
c o m p o n e n ts
7
8
9
10 clc
11
12 disp ( ’ E n t e r y o u r c h o i c e : ’ ) ;
13

46
14 disp ( ’ 1 f o r p h a s o r t o s y m m e t r i c a l ; 2 f o r
symmetrical to phasor ’ );
15 choice = input ( ’ E n t e r y o u r t r a n s f o r m a t i o n t y p e= ’ ) ;
16
17 alpha = -0.5+ %i *0.866;
18 if ( choice ==1)
19
20 Va = input ( ’ E n t e r t h e v a l u e o f c o m p l e x p h a s e v o l t a g e
VA= ’ ) // c o m p l e x p h a s e v o l t a g e VA=200 − %i ∗ 1 0 0
21 Vb = input ( ’ E n t e r t h e v a l u e o f c o m p l e x p h a s e v o l t a g e
VB= ’ ) // c o m p l e x p h a s e v o l t a g e VB= −36.59 − %i
∗209.804
22 Vc = input ( ’ E n t e r t h e v a l u e o f c o m p l e x p h a s e v o l t a g e
VC= ’ ) // E n t e r t h e v a l u e o f c o m p l e x p h a s e v o l t a g e
VC= 1 3 6 . 5 9 +%i ∗ 3 0 9 . 8 0
23 disp ( ’ P o s i t i v e s e q u e n c e component = ’ ) ;
24 Va1 =( Va +( alpha * Vb ) +( alpha ) ^2* Vc ) /3
25 mprintf ( ’ Va1 = %f + i % f \n ’ , real ( Va1 ) , imag ( Va1 ) )
26
27 disp ( ’ N e g a t i v e s e q u e n c e component = ’ ) ;
28 Va2 =[ Va +( alpha ^2) * Vb +( alpha * Vc ) ]/3
29 mprintf ( ’ Va2 = %f + i % f \n ’ , real ( Va2 ) , imag ( Va2 ) )
30
31 disp ( ’ Z e r o s e q u e n c e component = ’ ) ;
32 Va0 =[ Va + Vb + Vc ]/3
33 mprintf ( ’ Va0 = %f + i % f \n ’ , real ( Va0 ) , imag ( Va0 ) )
34 end
35
36 if ( choice ==2)
37
38 Va1 = input ( ’ E n t e r t h e v a l u e o f p o s i t i v e s e q u e n c e
v o l t a g e Va1= ’ ) ; // p o s i t i v e s e q u e n c e v o l t a g e Va1
=200 − %i ∗ 1 0 0
39 Va2 = input ( ’ E n t e r t h e v a l u e o f n e g a t i v e s e q u e n c e
v o l t a g e Va2= ’ ) ; // n e g a t i v e s e q u e n c e v o l t a g e Va2
=−100
40 Va0 = input ( ’ E n t e r t h e v a l u e o f z e r o s e q u e n c e v o l t a g e
Va0= ’ ) ; // z e r o s e q u e n c e v o l t a g e Va0=100

47
41 disp ( ’ Complex v o l t a g e Va = ’ ) ;
42
43 Va =[ Va1 + Va2 + Va0 ]
44 mprintf ( ’ Va = %f + i % f \n ’ , real ( Va ) , imag ( Va ) )
45
46 disp ( ’ Complex V o l t a g e Vb= ’ ) ;
47 Vb =[( alpha ^2* Va1 ) +( alpha * Va2 ) + Va0 ]
48 mprintf ( ’ Vb = %f + i % f \n ’ , real ( Vb ) , imag ( Vb ) )
49
50 disp ( ’ Complex V o l t a g e Vc= ’ ) ;
51 Vc =[( alpha * Va1 ) +( alpha ^2* Va2 ) + Va0 ]
52 mprintf ( ’ Vc = %f + i % f \n ’ , real ( Vc ) , imag ( Vc ) )
53 end
54
55 //
56 // o u t p u t : −
57 //
58 // f o r p h a s o r t o s y m m e t r i c a l :
59 //
60 // E n t e r y o u r c h o i c e :
61 //
62 // 1 f o r p h a s o r t o s y m m e t r i c a l ; 2 for symmetrical
to phasor
63 // E n t e r y o u r t r a n s f o r m a t i o n t y p e =1
64 // E n t e r t h e v a l u e o f c o m p l e x p h a s e v o l t a g e VA=200 −
%i ∗ 1 0 0
65 // E n t e r t h e v a l u e o f c o m p l e x p h a s e v o l t a g e VB= −36.59
− %i ∗ 2 0 9 . 8 0 4
66 // E n t e r t h e v a l u e o f c o m p l e x p h a s e v o l t a g e VC= 1 3 6 . 5 9
+%i ∗ 3 0 9 . 8 0
67 //
68 // P o s i t i v e s e q u e n c e component =
69 // Va1 = 1 9 9 . 9 9 4 3 5 8 + i − 9 9 . 9 8 6 0 8 3
70 //
71 // N e g a t i v e s e q u e n c e component =
72 // Va2 = − 9 9 . 9 9 2 8 9 1 + i − 0 . 0 1 1 1 1 7
73 //
74 // Z e r o s e q u e n c e component =

48
75 // Va0 = 1 0 0 . 0 0 0 0 0 0 + i − 0 . 0 0 1 3 3 3
76 //
77 //
78 //
79 // f o r s y m m e t r i c a l t o p h a s o r :
80 //
81 // E n t e r y o u r c h o i c e :
82 //
83 // 1 f o r p h a s o r t o s y m m e t r i c a l ; 2 f o r s y m m e t r i c a l
to phasor
84 // E n t e r y o u r t r a n s f o r m a t i o n t y p e =2
85 // E n t e r t h e v a l u e o f p o s i t i v e s e q u e n c e v o l t a g e Va1
=200 − %i ∗ 1 0 0
86 // E n t e r t h e v a l u e o f n e g a t i v e s e q u e n c e v o l t a g e Va2
=−100
87 // E n t e r t h e v a l u e o f z e r o s e q u e n c e v o l t a g e Va0=100
88 //
89 // Complex v o l t a g e Va =
90 //Va = 2 0 0 . 0 0 0 0 0 0 + i − 1 0 0 . 0 0 0 0 0 0
91 //
92 // Complex V o l t a g e Vb=
93 //Vb = − 3 6 . 5 9 1 2 0 0 + i − 2 0 9 . 8 0 4 4 0 0
94 //
95 // Complex V o l t a g e Vc=
96 // Vc = 1 3 6 . 5 9 5 6 0 0 + i 3 0 9 . 8 0 0 0 0 0

49
Figure 11.1: exp11

Figure 11.2: exp11

50
Experiment: 12

A Scilab Program For


Conversion Of Symmetrical
Components Into Ac Phasors

Scilab code Solution 12.12 exp12

1 // Experiment −12
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 // Aim : A SCILAB program f o r c o n v e r s i o n o f
s y m m e t r i c a l c o m po n e n t s i n t o AC p h a s o r s
7
8
9 // To f i n d S y m m e t r i c a l Components f o r 3− p h a s e
U n b a l a n c e d System
10
11
12 clc ;
13 clear all ;
14
15 Q =[3 310

51
16 5 105
17 4 12
18 ]
19 i = sqrt ( -1) ;
20 n =3; // Number o f P h a s e s
21 a =1.0*( cos ((360/ n ) * %pi /180) + %i * sin ((360/ n ) * %pi /180) )
;
22 a2 = a ^2;
23 // C o n v e r s i o n from P o l a r t o C a r t e s i a n Form o f M a t r i x
I
24 Ia = Q (1) *( cos ( Q (4) * %pi /180) + %i * sin ( Q (4) * %pi /180) ) ;
25 Ib = Q (2) *( cos ( Q (5) * %pi /180) + %i * sin ( Q (5) * %pi /180) ) ;
26 Ic = Q (3) *( cos ( Q (6) * %pi /180) + %i * sin ( Q (6) * %pi /180) ) ;
27 // D e f i n e s y m m e t r i c a l c om p o n e n t s t r a n s f o r m a t i o n
matrix
28 A = [1 1 1
29 1 a2 a
30 1 a a2 ];
31 A012 = inv ( A ) *[ Ia ; Ib ; Ic ];
32 // To c h e c k t h e r e s u l t s
33 Add0 = A012 (1) + A012 (2) + A012 (3) ; // T h i s i s I a
34 Add1 = A012 (1) + a2 * A012 (2) + a * A012 (3) ; // T h i s i s I b
35 Add2 = A012 (1) + a * A012 (2) + a2 * A012 (3) ; // T h i s i s I c
36 // S y m m e t r i c a l Components i n C a r t e s i a n Form
37 Symm3 = [ A012 (1) A012 (2) A012 (3)
38 A012 (1) a2 * A012 (2) a * A012 (3)
39 A012 (1) a * A012 (2) a2 * A012 (3) ];
40 // S y m m e t r i c a l Components i n P o l a r Form
41 // Sym3Abs=a b s ( Symm3 )
42 [ sym3abs , Sym3Angle ]= polar ( Symm3 )
43 sym3angle = Sym3Angle *180/ %pi
44 disp ( ’ [ Magnitude , A n g l e ] ’ )
45 mprintf ( ’ \n ’ )
46 for i =1:3
47 for j =1:3
48 mprintf ( ’ [%. 3 f ,%. 3 f ] ’ , sym3abs (i , j ) ,
sym3angle (i , j ) )
49 end

52
Figure 12.1: exp12

50 mprintf ( ’ \n ’ )
51 end
52
53 // End o f t h e Program
54
55
56 // o u t p u t : −
57 //
58 // [ Magnitude , A n g l e ]
59 //
60 // [ 3 . 8 1 7 , 3 5 . 5 5 8 ] [ −0.276 , −19.726]
[ −0.276 ,13.835]
61 // [ − 0 . 2 7 6 , − 1 9 . 7 2 6 ] [3.817 ,60.635]
[ −0.276 ,53.517]
62 // [ − 0 . 2 7 6 , 1 3 . 8 3 5 ] [ −0.276 ,53.517]
[3.817 , −84.773]
63 //

53
Experiment: 13

Modification Of Zbus Matrix


For Short Circuit Study Using
Scilab Programming

Scilab code Solution 13.13 exp13

1 // Experiment −13
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 // Aim : M o d i f i c a t i o n o f Zbus m a t r i x f o r s h o r t
c i r c u i t s t u d y u s i n g SCILAB Programming
7
8
9 // D i s p l a y mode
10 mode (0) ;
11
12 clc ;
13 clear ;
14 s = input ( ’ E n t e r S i z e
o f Z bus M a t r i x : ’ ) // S i z e o f Z
bus M a t r i x l i k e 3 o r 4
15 mprintf ( ’ E n t e r %g X %g M a t r i x ’ ,s , s )

54
16
17 Zorg = input ( ’ ’ ) // Z o r g l i k e [ 1 2 3 ; 4 5 6 ; 7 8 9 ]
18 disp ( ’ E n t e r 1 f o r Type 1 2 f o r Type 2 3 f o r Type 3
and 4 f o r Type 4 Zbus m o d i f i c a t i o n ’ )
19 check = input ( ’ E n t e r Your C h o i c e : ’ )
20
21 if check ==1 then
22
23 Zb = input ( ’ E n t e r v a l u e o f I m p i d a n c e b e t w e e n New
Bus and R e f e r e n c e : ’ ) // v a l u e o f I m p i d a n c e b e t w e e n
New Bus and R e f e r e n c e l i k e 10 o r 20 e t c .
24 l = max ( size ( Zorg ) ) ;
25 Znew = zeros ( l +1 , l +1) ;
26 for i = 1: l +1
27 for j = 1: l +1
28 if i <=( l ) & j <=( l ) then
29 Znew (i , j ) = Zorg (i , j ) ;
30 elseif i == l +1 & j == l +1 then
31 Znew (i , j ) = Zb ;
32 else
33 Znew (i , j ) = Znew (i , j ) ;
34 end ;
35 end ;
36 end ;
37 Znew
38 end ;
39
40
41
42 if check ==2 then
43 bc = input ( ’ E n t e r t h e Bus number where Impedance i s
C o n n e c t e d : ’ ) // Bus number where Impedance i s
Connected i n between d e f i n e matrix l i k e 1 or 2 or
3
44 Zb = input ( ’ E n t e r v a l u e o f I m p i d a n c e b e t w e e n New
Bus and e x i s t i n g Bus : ’ ) // I m p i d a n c e b e t w e e n New
Bus and e x i s t i n g Bus l i k e 10 o r 20
45 l = max ( size ( Zorg ) ) ;

55
46 row = Zorg ( bc ,:) ;
47 column = Zorg (: , bc ) ;
48 for i = 1: l + 1
49 for j = 1: l + 1
50 if i <= l & j <= l
51 Znew (i , j ) = Zorg (i , j ) ;
52 elseif i == l +1
53 for p =1: l
54 Znew (i , p ) = row ( p ) ;
55 end
56 elseif j == l + 1
57 for q =1: l
58 Znew (q , j ) = column ( q ) ;
59 end
60 end
61 if i == l + 1 & j == l + 1
62 Znew (i , j ) = Zb + Zorg ( bc , bc ) ;
63 end
64 end
65 end
66 Znew
67 end
68
69 if check ==4 then
70 aa = input ( ’ E n t e r t h e From Bus number where
Impedance i s C o n n e c t e d : ’ ) // From Bus number
where Impedance i s C o n n e c t e d i n b e t w e e n
d e f i n e matrix l i k e 2
71 bb = input ( ’ E n t e r t h e To Bus number where
Impedance i s C o n n e c t e d : ’ ) // To Bus number
where Impedance i s C o n n e c t e d i n b e t w e e n
d e f i n e matrix l i k e 3
72 Zb = input ( ’ E n t e r v a l u e o f I m p i d a n c e b e t w e e n
e x i s t i n g B u s e s : ’ ) // I m p i d a n c e b e t w e e n e x i s t i n g
B u s e s l i k e 10 o r 20
73 l = max ( size ( Zorg ) ) ;
74
75 Zb_row = Zorg ( aa ,:) - Zorg ( bb ,:) ;

56
76 Zb_col = Zorg (: , aa ) - Zorg (: , bb ) ;
77 xy =(( Zb_col * Zb_row ) /( Zorg ( aa , aa ) + Zorg ( bb , bb ) + Zb
-2* Zorg ( aa , bb ) ) ) ;
78
79 Znew = Zorg - xy
80
81
82 end
83 if check ==3 then
84 aa = input ( ’ E n t e r t h e Bus number where
Impedance i s C o n n e c t e d t o R e f e r e n c e : ’ )
// Bus number where Impedance i s
Connected to R e f e r e n c e l i k e 1 or 2 or 3
85 Zb = input ( ’ E n t e r v a l u e o f I m p i d a n c e
b e t w e e n E x i s t i n g Bus and R e f e r e n c e : ’ )
// v a l u e o f I m p i d a n c e b e t w e e n E x i s t i n g
Bus and R e f e r e n c e l i k e 10 o r 20
86 l = max ( size ( Zorg ) ) ;
87
88 Zb_row = Zorg ( aa ,:) ;
89 Zb_col = Zorg (: , aa ) ;
90 xy =(( Zb_col * Zb_row ) /( Zorg ( aa , aa ) + Zb ) ) ;
91
92 Znew = Zorg - xy
93 end
94
95 //
96 // o u t p u t : −
97 //
98 // For Type−1 Zbus M o d i f i c a t i o n
99 //
100 //
101 // E n t e r S i z e o f Z bus M a t r i x : 3
102 // s =
103 //
104 // 3.
105 // E n t e r 3 X 3 M a t r i x
106 // [ 1 2 3 ; 4 5 6 ; 7 8 9 ]

57
107 // Z o r g =
108 //
109 // 1. 2. 3.
110 // 4. 5. 6.
111 // 7. 8. 9.
112 //
113 // E n t e r 1 f o r Type 1 2 f o r Type 2 3 f o r Type 3 and
4 f o r Type 4 Zbus m
114 // odification
115 // E n t e r Your C h o i c e : 1
116 // c h e c k =
117 //
118 // 1.
119 // E n t e r v a l u e o f I m p i d a n c e b e t w e e n New Bus and
Reference :10
120 // Zb =
121 //
122 // 10.
123 // Znew =
124 //
125 // 1. 2. 3. 0.
126 // 4. 5. 6. 0.
127 // 7. 8. 9. 0.
128 // 0. 0. 0. 10.
129 //
130 //
131 //
132 // For Type−2 Zbus M o d i f i c a t i o n
133 //
134 //
135 // E n t e r S i z e o f Z bus M a t r i x : 3
136 // s =
137 //
138 // 3.
139 // E n t e r 3 X 3 M a t r i x
140 // [ 1 2 3 ; 4 5 6 ; 7 8 9 ]
141 // Z o r g =
142 //

58
143 // 1. 2. 3.
144 // 4. 5. 6.
145 // 7. 8. 9.
146 //
147 // E n t e r 1 f o r Type 1 2 f o r Type 2 3 f o r Type 3 and
4 f o r Type 4 Zbus m
148 // odification
149 // E n t e r Your C h o i c e : 2
150 // c h e c k =
151 //
152 // 2.
153 // E n t e r t h e Bus number where Impedance i s C o n n e c t e d
: 2
154 // bc =
155 //
156 // 2.
157 // E n t e r v a l u e o f I m p i d a n c e b e t w e e n New Bus and
e x i s t i n g Bus : 15
158 // Zb =
159 //
160 // 15.
161 // Znew =
162 //
163 // 1. 2. 3. 2.
164 // 4. 5. 6. 5.
165 // 7. 8. 9. 8.
166 // 4. 5. 6. 20.
167 //
168 // For Type−3 Zbus M o d i f i c a t i o n
169 //
170 //
171 // E n t e r S i z e o f Z bus M a t r i x : 3
172 // s =
173 //
174 // 3.
175 // E n t e r 3 X 3 M a t r i x
176 // [ 1 2 3 ; 4 5 6 ; 7 8 9 ]
177 // Z o r g =

59
178 //
179 // 1. 2. 3.
180 // 4. 5. 6.
181 // 7. 8. 9.
182 //
183 // E n t e r 1 f o r Type 1 2 f o r Type 2 3 f o r Type 3 and
4 f o r Type 4 Zbus m
184 // odification
185 // E n t e r Your C h o i c e : 3
186 // c h e c k =
187 //
188 // 3.
189 // E n t e r t h e Bus number where Impedance i s C o n n e c t e d
to Reference :3
190 // aa =
191 //
192 // 3.
193 // E n t e r v a l u e o f I m p i d a n c e b e t w e e n E x i s t i n g Bus and
R e f e r e n c e : 20
194 // Zb =
195 //
196 // 20.
197 // Znew =
198 //
199 // 0.2758621 1.1724138 2.0689655
200 // 2.5517241 3.3448276 4.137931
201 // 4.8275862 5.5172414 6.2068966
202 //
203 // For Type−4 Zbus M o d i f i c a t i o n
204 //
205 //
206 // E n t e r S i z e o f Z bus M a t r i x : 3
207 // s =
208 //
209 // 3.
210 // E n t e r 3 X 3 M a t r i x
211 // [ 1 2 3 ; 4 5 6 ; 7 8 9 ]
212 // Z o r g =

60
213 //
214 // 1. 2. 3.
215 // 4. 5. 6.
216 // 7. 8. 9.
217 //
218 // E n t e r 1 f o r Type 1 2 f o r Type 2 3 f o r Type 3 and
4 f o r Type 4 Zbus m
219 // odification
220 // E n t e r Your C h o i c e : 4
221 // c h e c k =
222 //
223 // 4.
224 // E n t e r t h e From Bus number where Impedance i s
Connected : 2
225 // aa =
226 //
227 // 2.
228 // E n t e r t h e To Bus number where Impedance i s
Connected : 3
229 // bb =
230 //
231 // 3.
232 // E n t e r v a l u e o f I m p i d a n c e b e t w e e n e x i s t i n g B u s e s :
30
233 // Zb =
234 //
235 // 30.
236 // Znew =
237 //
238 // 0.90625 1.90625 2.90625
239 // 3.90625 4.90625 5.90625
240 // 6.90625 7.90625 8.90625

61
Figure 13.1: exp13

62
Figure 13.2: exp13

63
Experiment: 14

Symmetrical Fault Analysis


Using Scilab Programming

Scilab code Solution 14.14 exp14

1 // Experiment −14
2 // windows V i s t a − 32− B i t
3 // S c i l a b − 5 . 5 . 2
4
5
6 // Aim : S y m m e t r i c a l F a u l t a n a l y s i s u s i n g SCILAB
programming
7
8 mode (0) ;
9
10 clc ;
11 clear all ;
12
13 SA = input ( ’ E n t e r A l t e r n a t o r R a t i n g i n kVA : ’ ) ; //
A l t e r n a t o r R a t i n g i n kVA=10 e 3
14 XA = input ( ’ E n t e r A l t e r n a t o r % R e a c t a n c e : ’ ) ; //
A l t e r n a t o r % R e a c t a n c e = 10%
15 ST = input ( ’ E n t e r T r a n s f o r m e r R a t i n g i n kVA : ’ ) ; //
T r a n s f o r m e r R a t i n g i n kVA =5e 3

64
16 XT = input ( ’ E n t e r T r a n s f o r m e r % R e a c t a n c e : ’ ) ; //
T r a n s f o r m e r % R e a c t a n c e =5%
17 VL = input ( ’ E n t e r T r a n s m i s s i o n l i n e V o l t a g e i n kV : ’
) ; // T r a n s m i s s i o n l i n e V o l t a g e i n kV=10
18 XL = input ( ’ E n t e r T r a n s m i s s i n L i n e R e a c t a n c e i n Ohm
: ’ ) ; // T r a n s m i s s i n L i n e R e a c t a n c e i n Ohm=4
19 RL = input ( ’ e n t e r T r a n s m i s s i o n L i n e R e s i s t a n c e i n
Ohm : ’ ) ; // T r a n s m i s s i o n L i n e R e s i s t a n c e i n Ohm
=1
20
21 Base_kVA = max ( SA , ST ) ;
22
23 PXA = ( Base_kVA / SA ) * XA ; // P e r c e n t a g e R e a c t a n c e o f
Alternator
24
25 PXT = ( Base_kVA / ST ) * XT ; // P e r c e n t a g e R e a c t a n c e o f
Transformer
26
27 PXL = ( Base_kVA * XL ) /(10* VL * VL ) ; // P e r c e n t a g e
Reactance of Transmission l i n e
28
29 PRL = ( Base_kVA * RL ) /(10* VL * VL ) ; // P e r c e n t a g e
Resistance of Transmission l i n e
30 disp ( ’ F a u l t a t F1 means a t s o u r c e s i d e and F a u l t a t
F2 means a t l o a d s i d e ’ )
31 disp ( ’ E n t e r 1 f o r F a u l t a t F1 o r 2 f o r F a u l t a t F2 ’ )
32
33 check = input ( ’ E n t e r Your C h o i c e f o r S y m a t r i c a l
Fault in Transmission l i n e : ’ )
34
35 if check ==2 then
36
37 TX = PXA + PXT + PXL ; // T o t a l P e r c e n t a g e R e a c t a n c e
38
39 TR = PRL ; // T o t a l P e r c e n t a g e R e s i s t a n c e
40
41 PZ = sqrt ( TX * TX + TR * TR ) ; // T o t a l P e r c e n t a g e
Impidance

65
42
43 Short_Circuit_kVA = Base_kVA *(100/ PZ ) ;
44 Short_Circuit_Current = Short_Circuit_kVA /( sqrt (3) * VL
);
45 mprintf ( ’ S h o r t C i r c u i t kVA f o r F a u l t a t F2 : %f kVA
\n ’ , Short_Circuit_kVA )
46 mprintf ( ’ S h o r t C i r c u i t C u r r e n t f o r F a u l t a t F2 : %f
A \n ’ , Short_Circuit_Current )
47 end
48
49 if check ==1 then
50 TX = PXA + PXT ; // T o t a l P e r c e n t a g e R e a c t a n c e
51
52 Short_Circuit_kVA1 = Base_kVA *(100/ TX ) ;
53 Short_Circuit_Current1 = Short_Circuit_kVA1 /( sqrt (3) *
VL ) ;
54 mprintf ( ’ S h o r t C i r c u i t kVA f o r F a u l t a t F1 : %f kVA
\n ’ , Short_Circuit_kVA1 )
55 mprintf ( ’ S h o r t C i r c u i t C u r r e n t f o r F a u l t a t F1 : %f
A \n ’ , Short_Circuit_Current1 )
56 end
57
58
59 // o u t p u t : −
60 //
61 // S y m a t r i c a l F a u l t F1 a t s o u r c e s i d e :
62 //
63 // E n t e r A l t e r n a t o r R a t i n g i n kVA : 1 0 e 3
64 // E n t e r A l t e r n a t o r % R e a c t a n c e : 1 0
65 // E n t e r T r a n s f o r m e r R a t i n g i n kVA : 5 e 3
66 // E n t e r T r a n s f o r m e r % R e a c t a n c e : 5
67 // E n t e r T r a n s m i s s i o n l i n e V o l t a g e i n kV : 1 0
68 // E n t e r T r a n s m i s s i n L i n e R e a c t a n c e i n Ohm : 4
69 // e n t e r T r a n s m i s s i o n L i n e R e s i s t a n c e i n Ohm : 1
70 //
71 // F a u l t a t F1 means a t s o u r c e s i d e and F a u l t a t F2
means a t l o a d s i d e
72 //

66
73 // E n t e r 1 f o r F a u l t a t F1 o r 2 f o r F a u l t a t F2
74 // E n t e r Your C h o i c e f o r S y m a t r i c a l F a u l t i n
Transmission l i n e : 1
75 // c h e c k =
76 //
77 // 1.
78 // S h o r t C i r c u i t kVA f o r F a u l t a t F1 : 5 0 0 0 0 . 0 0 0 0 0 0
kVA
79 // S h o r t C i r c u i t C u r r e n t f o r F a u l t a t F1 :
2886.751346 A
80 //
81 // S y m a t r i c a l F a u l t F2 a t l a o d s i d e :
82 //
83 // E n t e r A l t e r n a t o r R a t i n g i n kVA : 1 0 e 3
84 // E n t e r A l t e r n a t o r % R e a c t a n c e : 1 0
85 // E n t e r T r a n s f o r m e r R a t i n g i n kVA : 5 e 3
86 // E n t e r T r a n s f o r m e r % R e a c t a n c e : 5
87 // E n t e r T r a n s m i s s i o n l i n e V o l t a g e i n kV : 1 0
88 // E n t e r T r a n s m i s s i n L i n e R e a c t a n c e i n Ohm : 4
89 // e n t e r T r a n s m i s s i o n L i n e R e s i s t a n c e i n Ohm : 1
90 //
91 // F a u l t a t F1 means a t s o u r c e s i d e and F a u l t a t F2
means a t l o a d s i d e
92 //
93 // E n t e r 1 f o r F a u l t a t F1 o r 2 f o r F a u l t a t F2
94 // E n t e r Your C h o i c e f o r S y m a t r i c a l F a u l t i n
Transmission l i n e : 2
95 // c h e c k =
96 //
97 // 2.
98 // S h o r t C i r c u i t kVA f o r F a u l t a t F2 : 1 6 4 3 9 . 8 9 8 7 3 1
kVA
99 // S h o r t C i r c u i t C u r r e n t f o r F a u l t a t F2 : 9 4 9 . 1 5 7 9 9 6
A

67
Figure 14.1: exp14

68
Figure 14.2: exp14

69

You might also like