Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

xperiment # 7: Formulation of the YBus of given Power System Network using MATAB

shown in figure 1:

Figure 1: Single Line Diagram of Power System


Procedure:

To formulate the Ybus matrix in MATLAB the following procedure must be followed:

Open a MATALB.
Open a new file and write the code for the Ybus in a new script.
When the code is completed then save the code.
Put the values of Zbus by entering the different columns of Zbus.
After that, run the code.
It will show the Ybus.

ZBus matrix:

To enter values in Zbus the following method is adopted. First, we will enter values in columns
and then we will enter them in a matrix.

when we run the code, it will show us the matrix of Z.


z=

0 1.0000 0 1.0000

0 2.0000 0 0.8000

1.0000 2.0000 0 0.4000

1.0000 3.0000 0 0.2000

2.0000 3.0000 0 0.2000

47
3.0000 4.0000 0 0.0800

MATLAB Code:

Ybus:
The MATLAB code of the formulation of Function Ybus is below:

Output:
The output that Matlab will give us is the Ybus that is formulated by Matlab of the power system
that was under consideration.
Ybus =

0.0000 - 8.5000i 0.0000 + 2.5000i 0.0000 + 5.0000i 0.0000 + 0.0000i

0.0000 + 2.5000i 0.0000 - 8.7500i 0.0000 + 5.0000i 0.0000 + 0.0000i

0.0000 + 5.0000i 0.0000 + 5.0000i 0.0000 -22.5000i 0.0000 +12.5000i

0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 +12.5000i 0.0000 -12.5000i

48
xperiment # 8: Formulation of the ZBus

LAB TASK:

For the given Zbus :

CASE 1: Adding impedance from a new bus to the reference bus.

Add new impedance


Z=10
MATLAB Code:

Output:
>> Case1

zold =

1 2 3

4 5 6

7 8 9

zb =

10

ans =

1 2 3 0

4 5 6 0

7 8 9 0

0 0 0 10

49
CASE 2: Adding impedance from a new bus to the reference bus.

Add new impedance


Z=10
MATLAB Code:

Ouput:

>> Case2

zold =

1 2 3

4 5 6

7 8 9

zb =

10

ans =

1 2 3 3

4 5 6 6

7 8 9 9

7 8 9 19

50
CASE 3: Adding impedance from an existing bus to the reference bas.

Add new impedance in last bus


Z=10
MATLAB Code:

Ouput:

>> Case3

zold =

1 2 3

51
4 5 6

7 8 9

zb =

10

Znew =

-0.1053 0.7368 1.5789

1.7895 2.4737 3.1579

3.6842 4.2105 4.7368

ans =

1 2 3 3

4 5 6 6

7 8 9 9

7 8 9 19

CASE 4: Adding Impedance between two existing buses.

Add new impedance between bus 2 and 3


Z=10
MATLAB Code:

52
Ouput:

>> Case4

zold =

1 2 3

2 5 6

3 6 9

zb =

10

Znew =

0.9167 1.9167 2.7500

1.9167 4.9167 5.7500

2.7500 5.7500 8.2500

ans =

1 2 3 -1

2 5 6 -1

3 6 9 -3

-1 -1 -3 12

53
Experiment
In this lab we are given a Ybus matrix. We are asked to perform BUS reduction technique in MATLAB. There are two main
methods to remove a bus from Y matrix without drawing the modified power circuit.

1. KRON-REDUCTION Method:
This method has following steps.
Move the bus to be removed at the end of matrix.
Divide matrix in 4 parts.

2. DIRECT method:
In this method we compute each element of new Ybus matrix using following formula:

Where k is the bus we want to remove.

LAB TASK:

For the given Ybus:

CASE 1:

Remove last 2 buses using KRON-REDUCTION method.


MATLAB Code:

Output:

Y matrix after the removal of BUS3 and BUS4

Ynew =

0.0000 - 4.8736i 0.0000 + 4.0736i

0.0000 + 4.0736i 0.0000 - 4.8736i

54
CASE 2:

Using direct method:


i. Remove BUS 4.
ii. After removing BUS4, remove BUS3 from the resultant matrix.

MATLAB Code:

Output:

Y matrix after the removal of BUS4

Ynew1 =

0.0000 - 8.4111i 0.0000 + 1.3889i 0.0000 + 6.2222i

0.0000 + 1.3889i 0.0000 - 6.9111i 0.0000 + 4.7222i

0.0000 + 6.2222i 0.0000 + 4.7222i 0.0000 -10.9444i

Y matrix after the removal of both BUS3 and BUS4

Ynew2 =

0.0000 - 4.8736i 0.0000 + 4.0736i

0.0000 + 4.0736i 0.0000 - 4.8736i

55
xperiment # 10: Load Flow analysis using Gauss-

Gauss-Seidal Method:

Gauss-Seidel Method is used to solve the linear system Equations. This method is named after the German Scientist
Carl Friedrich Gauss and Philipp Ludwig Siedel. It is a method of iteration for solving n linear equation with the
unknown variables. This method is very simple and uses in digital computers for computing.

MATLAB Code:

56
Output:
Power Flow Solution by Gauss-Seidel Method

Maximum Power Mismatch = 0.000851026

No. of Iterations = 50

Bus Voltage Angle ------Load------ ---Generation--- Injected

No. Mag. Degree MW Mvar MW Mvar Mvar

1 1.060 0.000 0.000 0.000 262.387 -7.377 0.000

2 1.038 -5.454 21.700 12.700 40.000 36.297 0.000

3 1.020 -8.063 2.400 1.200 0.000 0.000 0.000

4 1.011 -9.735 7.600 1.600 0.000 0.000 0.000

5 1.005 -14.432 94.200 19.000 0.000 34.674 0.000

6 1.010 -11.491 0.000 0.000 0.000 0.000 0.000

7 1.000 -13.229 22.800 10.900 0.000 0.000 0.000

57
8 1.010 -12.250 30.000 30.000 0.000 37.062 0.000

9 1.048 -14.541 0.000 0.000 0.000 0.000 0.000

10 1.039 -16.143 5.800 2.000 0.000 0.000 19.000

11 1.082 -14.541 0.000 0.000 0.000 17.745 0.000

12 1.059 -15.404 11.200 7.500 0.000 0.000 0.000

13 1.071 -15.404 0.000 0.000 0.000 8.895 0.000

14 1.025 -16.886 6.200 1.600 0.000 0.000 0.000

15 0.997 -17.130 8.200 2.500 0.000 0.000 0.000

16 1.044 -15.984 3.500 1.800 0.000 0.000 0.000

17 1.035 -16.302 9.000 5.800 0.000 0.000 0.000

18 0.989 -18.128 3.200 0.900 0.000 0.000 0.000

19 0.987 -18.514 9.500 3.400 0.000 0.000 0.000

20 1.021 -16.674 2.200 0.700 0.000 0.000 0.000

21 1.019 -16.732 17.500 11.200 0.000 0.000 0.000

22 1.018 -16.760 0.000 0.000 0.000 0.000 0.000

23 0.995 -17.351 3.200 1.600 0.000 0.000 0.000

24 1.001 -17.270 8.700 6.700 0.000 0.000 4.300

25 1.005 -16.832 0.000 0.000 0.000 0.000 0.000

26 0.988 -17.261 3.500 2.300 0.000 0.000 0.000

27 1.016 -16.289 0.000 0.000 0.000 0.000 0.000

28 1.008 -12.173 0.000 0.000 0.000 0.000 0.000

29 0.997 -17.535 2.400 0.900 0.000 0.000 0.000

30 0.985 -18.431 10.600 1.900 0.000 0.000 0.000

Total 283.400 126.200 302.387 127.296 23.300

Line Flow and Losses

--Line-- Power at bus & line flow --Line loss-- Transformer

from to MW Mvar MVA MW Mvar tap

1 262.387 -7.377 262.490

2 178.419 -13.334 178.917 5.458 10.535

58
3 83.892 5.940 84.102 2.858 7.298

2 18.300 23.597 29.861

1 -172.961 23.869 174.601 5.458 10.535

4 45.997 0.770 46.004 1.123 -0.440

5 83.034 1.710 83.051 3.027 8.355

6 62.299 -2.758 62.360 2.093 2.429

3 -2.400 -1.200 2.683

1 -81.033 1.357 81.045 2.858 7.298

4 78.628 -2.535 78.669 0.785 1.388

4 -7.600 -1.600 7.767

2 -44.874 -1.210 44.890 1.123 -0.440

3 -77.843 3.923 77.941 0.785 1.388

6 70.765 -17.293 72.848 0.616 1.224

12 44.339 12.936 46.188 0.000 4.641 0.932

5 -94.200 15.674 95.495

2 -80.007 6.645 80.282 3.027 8.355

7 -14.212 8.978 16.811 0.138 -1.704

6 0.000 0.000 0.000

2 -60.206 5.187 60.429 2.093 2.429

4 -70.149 18.517 72.552 0.616 1.224

7 37.513 -0.402 37.515 0.368 -0.586

8 29.795 -8.761 31.056 0.113 -0.524

9 27.678 -6.794 28.499 0.000 1.584 0.978

10 15.798 1.256 15.848 0.000 1.285 0.969

28 19.567 -8.899 21.495 0.064 -13.009

7 -22.800 -10.900 25.272

59
5 14.350 -10.682 17.889 0.138 -1.704

6 -37.145 -0.184 37.145 0.368 -0.586

8 -30.000 7.062 30.820

6 -29.683 8.236 30.804 0.113 -0.524

28 -0.356 -1.131 1.186 0.001 -4.356

9 0.000 0.000 0.000

6 -27.678 8.378 28.918 0.000 1.584

11 -0.001 -17.186 17.186 0.000 0.559

10 27.681 8.821 29.053 0.000 0.846

10 -5.800 17.000 17.962

6 -15.798 0.029 15.798 0.000 1.285

9 -27.681 -7.976 28.807 0.000 0.846

20 7.269 5.736 9.259 0.074 0.166

17 4.724 3.111 5.656 0.010 0.025

21 22.427 16.984 28.133 0.255 0.549

22 3.257 -0.893 3.377 0.077 0.016

11 0.000 17.745 17.745

9 0.001 17.745 17.745 0.000 0.559

12 -11.200 -7.500 13.479

4 -44.339 -8.295 45.108 0.000 4.641

13 0.000 -8.798 8.798 0.000 0.097

14 14.600 7.550 16.437 0.296 0.616

15 10.656 -2.707 10.994 0.713 0.140

16 7.879 4.724 9.187 0.071 0.149

13 0.000 8.895 8.895

12 -0.000 8.895 8.895 0.000 0.097

60
14 -6.200 -1.600 6.403

12 -14.304 -6.934 15.896 0.296 0.616

15 8.116 5.359 9.726 0.199 0.180

15 -8.200 -2.500 8.573

12 -9.943 2.847 10.342 0.713 0.140

14 -7.917 -5.179 9.460 0.199 0.180

18 7.791 -0.122 7.792 0.066 0.134

23 1.856 -0.074 1.858 0.003 0.007

16 -3.500 -1.800 3.936

12 -7.808 -4.575 9.050 0.071 0.149

17 4.313 2.774 5.129 0.020 0.046

17 -9.000 -5.800 10.707

16 -4.294 -2.728 5.087 0.020 0.046

10 -4.714 -3.086 5.634 0.010 0.025

18 -3.200 -0.900 3.324

15 -7.726 0.256 7.730 0.066 0.134

19 4.528 -1.129 4.667 0.014 0.029

19 -9.500 -3.400 10.090

18 -4.514 1.158 4.660 0.014 0.029

20 -4.988 -4.584 6.775 0.016 0.320

20 -2.200 -0.700 2.309

19 5.004 4.905 7.007 0.016 0.320

10 -7.194 -5.570 9.098 0.074 0.166

21 -17.500 -11.200 20.777

61
10 -22.172 -16.435 27.599 0.255 0.549

22 4.664 5.215 6.996 0.005 0.011

22 0.000 0.000 0.000

10 -3.180 0.909 3.307 0.077 0.016

21 -4.658 -5.204 6.984 0.005 0.011

24 7.843 4.314 8.951 0.089 0.139

23 -3.200 -1.600 3.578

15 -1.853 0.081 1.854 0.003 0.007

24 -1.339 -1.673 2.143 0.006 0.013

24 -8.700 -2.400 9.025

22 -7.754 -4.175 8.807 0.089 0.139

23 1.345 1.686 2.156 0.006 0.013

25 -2.299 0.075 2.301 0.010 0.017

25 0.000 0.000 0.000

24 2.309 -0.058 2.310 0.010 0.017

26 3.526 2.343 4.233 0.045 0.067

27 -5.829 -2.278 6.259 0.042 0.081

26 -3.500 -2.300 4.188

25 -3.481 -2.275 4.158 0.045 0.067

27 0.000 0.000 0.000

25 5.871 2.359 6.328 0.042 0.081

28 -19.189 -5.743 20.029 -0.000 1.538

29 6.174 1.647 6.390 0.087 0.164

30 7.094 1.665 7.286 0.165 0.310

28 0.000 0.000 0.000

62
27 19.189 7.281 20.523 -0.000 1.538 0.968

8 0.357 -3.225 3.244 0.001 -4.356

6 -19.503 -4.110 19.931 0.064 -13.009

29 -2.400 -0.900 2.563

27 -6.087 -1.483 6.265 0.087 0.164

30 3.720 0.627 3.773 0.034 0.065

30 -10.600 -1.900 10.769

27 -6.929 -1.355 7.060 0.165 0.310

29 -3.686 -0.562 3.728 0.034 0.065

Total loss 18.943 24.405

63
Experiment # 11: Load Flow analysis using Newton-

Newton-Raphson Method:

Newton Raphson Method is an iterative technique for solving a set of various nonlinear equations with an equal
number of unknowns. There are two methods of solutions for the load flow using Newton Raphson Method. The first
method uses rectangular coordinates for the variables while the second method uses the polar coordinate form. Out of
these two methods the polar coordinate form is used widely.

MATLAB Code:

64
Output:
Power Flow Solution by Newton-Raphson Method

Maximum Power Mismatch = 8.33954e-07

No. of Iterations = 4

Bus Voltage Angle ------Load------ ---Generation--- Injected

No. Mag. Degree MW Mvar MW Mvar Mvar

1 1.060 0.000 0.000 0.000 262.323 -17.220 0.000

2 1.043 -5.525 21.700 12.700 40.000 49.404 0.000

3 1.021 -8.048 2.400 1.200 0.000 0.000 0.000

4 1.013 -9.716 7.600 1.600 0.000 0.000 0.000

5 1.010 -14.431 94.200 19.000 0.000 36.266 0.000

6 1.011 -11.458 0.000 0.000 0.000 0.000 0.000

7 1.003 -13.206 22.800 10.900 0.000 0.000 0.000

65
8 1.010 -12.190 30.000 30.000 0.000 32.884 0.000

9 1.049 -14.501 0.000 0.000 0.000 0.000 0.000

10 1.040 -16.102 5.800 2.000 0.000 0.000 19.000

11 1.082 -14.501 0.000 0.000 0.000 17.303 0.000

12 1.060 -15.364 11.200 7.500 0.000 0.000 0.000

13 1.071 -15.364 0.000 0.000 0.000 8.310 0.000

14 1.025 -16.844 6.200 1.600 0.000 0.000 0.000

15 0.997 -17.090 8.200 2.500 0.000 0.000 0.000

16 1.044 -15.943 3.500 1.800 0.000 0.000 0.000

17 1.036 -16.261 9.000 5.800 0.000 0.000 0.000

18 0.990 -18.085 3.200 0.900 0.000 0.000 0.000

19 0.988 -18.470 9.500 3.400 0.000 0.000 0.000

20 1.022 -16.631 2.200 0.700 0.000 0.000 0.000

21 1.020 -16.689 17.500 11.200 0.000 0.000 0.000

22 1.019 -16.717 0.000 0.000 0.000 0.000 0.000

23 0.996 -17.309 3.200 1.600 0.000 0.000 0.000

24 1.002 -17.226 8.700 6.700 0.000 0.000 4.300

25 1.006 -16.787 0.000 0.000 0.000 0.000 0.000

26 0.989 -17.216 3.500 2.300 0.000 0.000 0.000

27 1.018 -16.243 0.000 0.000 0.000 0.000 0.000

28 1.009 -12.134 0.000 0.000 0.000 0.000 0.000

29 0.998 -17.487 2.400 0.900 0.000 0.000 0.000

30 0.986 -18.380 10.600 1.900 0.000 0.000 0.000

Total 283.400 126.200 302.323 126.948 23.300

Line Flow and Losses

--Line-- Power at bus & line flow --Line loss-- Transformer

from to MW Mvar MVA MW Mvar tap

1 262.323 -17.220 262.888

66
2 178.661 -22.351 180.054 5.519 10.689

3 83.662 5.131 83.819 2.838 7.207

2 18.300 36.704 41.013

1 -173.142 33.040 176.266 5.519 10.689

4 45.975 2.693 46.054 1.119 -0.479

5 83.186 1.688 83.203 3.009 8.237

6 62.281 -0.717 62.285 2.073 2.342

3 -2.400 -1.200 2.683

1 -80.824 2.076 80.851 2.838 7.207

4 78.424 -3.276 78.493 0.779 1.368

4 -7.600 -1.600 7.767

2 -44.856 -3.172 44.968 1.119 -0.479

3 -77.645 4.644 77.784 0.779 1.368

6 70.607 -16.514 72.513 0.608 1.194

12 44.294 13.442 46.289 -0.000 4.645 0.932

5 -94.200 17.266 95.769

2 -80.177 6.549 80.444 3.009 8.237

7 -14.023 10.718 17.650 0.151 -1.686

6 0.000 0.000 0.000

2 -60.209 3.058 60.286 2.073 2.342

4 -69.999 17.708 72.204 0.608 1.194

7 37.339 -2.110 37.398 0.364 -0.606

8 29.751 -5.159 30.195 0.106 -0.547

9 27.689 -6.468 28.434 -0.000 1.572 0.978

10 15.808 1.367 15.867 -0.000 1.285 0.969

28 19.621 -8.397 21.343 0.064 -13.045

67
7 -22.800 -10.900 25.272

5 14.174 -12.404 18.835 0.151 -1.686

6 -36.974 1.504 37.005 0.364 -0.606

8 -30.000 2.884 30.138

6 -29.645 4.612 30.001 0.106 -0.547

28 -0.355 -1.728 1.764 0.000 -4.362

9 0.000 0.000 0.000

6 -27.689 8.041 28.832 -0.000 1.572

11 -0.000 -16.771 16.771 0.000 0.532

10 27.689 8.730 29.032 0.000 0.843

10 -5.800 17.000 17.962

6 -15.808 -0.083 15.808 -0.000 1.285

9 -27.689 -7.887 28.790 0.000 0.843

20 7.284 5.766 9.290 0.075 0.167

17 4.739 3.128 5.678 0.010 0.025

21 22.419 16.969 28.117 0.254 0.547

22 3.255 -0.893 3.375 0.077 0.016

11 0.000 17.303 17.303

9 0.000 17.303 17.303 0.000 0.532

12 -11.200 -7.500 13.479

4 -44.294 -8.796 45.159 -0.000 4.645

13 0.000 -8.226 8.226 -0.000 0.084

14 14.594 7.545 16.429 0.296 0.615

15 10.639 -2.713 10.980 0.710 0.140

16 7.861 4.691 9.154 0.070 0.148

13 0.000 8.310 8.310

68
12 -0.000 8.310 8.310 -0.000 0.084

14 -6.200 -1.600 6.403

12 -14.298 -6.930 15.889 0.296 0.615

15 8.098 5.330 9.695 0.198 0.179

15 -8.200 -2.500 8.573

12 -9.929 2.853 10.331 0.710 0.140

14 -7.901 -5.152 9.432 0.198 0.179

18 7.786 -0.118 7.787 0.065 0.133

23 1.843 -0.084 1.845 0.003 0.007

16 -3.500 -1.800 3.936

12 -7.791 -4.543 9.018 0.070 0.148

17 4.291 2.743 5.092 0.020 0.046

17 -9.000 -5.800 10.707

16 -4.271 -2.697 5.051 0.020 0.046

10 -4.729 -3.103 5.656 0.010 0.025

18 -3.200 -0.900 3.324

15 -7.721 0.251 7.725 0.065 0.133

19 4.521 -1.151 4.665 0.014 0.029

19 -9.500 -3.400 10.090

18 -4.507 1.179 4.659 0.014 0.029

20 -4.993 -4.579 6.775 0.016 0.320

20 -2.200 -0.700 2.309

19 5.009 4.899 7.007 0.016 0.320

10 -7.209 -5.599 9.128 0.075 0.167

69
21 -17.500 -11.200 20.777

10 -22.165 -16.422 27.585 0.254 0.547

22 4.665 5.222 7.002 0.005 0.011

22 0.000 0.000 0.000

10 -3.178 0.909 3.306 0.077 0.016

21 -4.659 -5.211 6.990 0.005 0.011

24 7.838 4.302 8.941 0.089 0.138

23 -3.200 -1.600 3.578

15 -1.840 0.091 1.842 0.003 0.007

24 -1.360 -1.691 2.170 0.006 0.013

24 -8.700 -2.400 9.025

22 -7.749 -4.164 8.797 0.089 0.138

23 1.366 1.704 2.184 0.006 0.013

25 -2.317 0.060 2.318 0.010 0.018

25 0.000 0.000 0.000

24 2.327 -0.042 2.328 0.010 0.018

26 3.546 2.368 4.264 0.046 0.068

27 -5.873 -2.326 6.317 0.043 0.082

26 -3.500 -2.300 4.188

25 -3.500 -2.300 4.188 0.046 0.068

27 0.000 0.000 0.000

25 5.916 2.408 6.387 0.043 0.082

28 -19.202 -5.746 20.043 -0.000 1.536

29 6.191 1.672 6.413 0.087 0.165

30 7.094 1.666 7.287 0.164 0.309

70
28 0.000 0.000 0.000

27 19.202 7.282 20.536 -0.000 1.536 0.968

8 0.356 -2.635 2.659 0.000 -4.362

6 -19.557 -4.647 20.102 0.064 -13.045

29 -2.400 -0.900 2.563

27 -6.104 -1.507 6.287 0.087 0.165

30 3.704 0.607 3.754 0.034 0.064

30 -10.600 -1.900 10.769

27 -6.930 -1.357 7.061 0.164 0.309

29 -3.670 -0.543 3.710 0.034 0.064

Total loss 18.923 24.048

71
xperiment # 12: To Evaluate Voltages for a 4-Bus Power System Using Node Equations in

This lab is very simple. In this lab we are given a Ybus matrix and a current matrix and we have to find the corresponding
voltages for the given system.

Node:

Node refers to any point on a circuit where two or more circuit elements meet. For two nodes to be different,
their voltages must be different.

Admittance:

Admittance (Y) is a measure of how easily a circuit or device will allow a current to flow. It is defined as the
inverse of the impedance (Z). The SI unit of admittance is the siemens (symbol S).

YBus Matrix:

In power engineering, admittance matrix or Ybus matric is an n x n matrix describing a power system with n
buses. It represents the nodal admittance of the buses in a power system. The Y Matrix is also one of the data
requirements needed to formulate a power flow study.

Self admittance:

The Y Matrix diagonal elements are called the self-admittances at the nodes, and each equals the sum of all the
admittances terminating on the node identified by the repeated subscripts.

Mutual admittance:

The non-diagonal elements of Ybus are the mutual admittances of the nodes, and each equals the negative of the
sum of all admittances connected directly between the nodes identified by the double subscripts.

Properties of Ybus matrix:

Following are some general properties of Ybus matrix.

i. It is always a symmetrical matrix


ii. Its Diagonal elements are +ive.
iii. Its Non-diagonal elements are -ive.
iv. It is a complex matrix.
v. Mostly it is non-singular matrix.
vi. It is a sparse matrix. i.e. most of the entities are zero.

Lab task:

For the given Ybus and I matrices, find corresponding V matrix.

, ,

72
We know that

Or

This is the basic formula that we are going to use in our MATLAB code.

MATLAB Code:

Output:

Z=

0.0000 + 0.6809i 0.0000 + 0.5691i 0.0000 + 0.6327i 0.0000 + 0.6284i

0.0000 + 0.5691i 0.0000 + 0.6809i 0.0000 + 0.6173i 0.0000 + 0.6216i

0.0000 + 0.6327i 0.0000 + 0.6173i 0.0000 + 0.7174i 0.0000 + 0.6661i

0.0000 + 0.6284i 0.0000 + 0.6216i 0.0000 + 0.6661i 0.0000 + 0.6988i

V=

56.2114 - 0.4098i

66.7886 - 0.4902i

60.8848 - 0.4445i

61.2266 - 0.4475i

73

You might also like