Vous êtes sur la page 1sur 9

EXPERIMENT NO.

TITLE: Assemble Bus Impedance Matrix using building algorithm.


OBJECTIVE: To construct a Bus Impedance Matrix ( ) using building algorithm.
SOLUTION METHODOLOGY: The following task has been completed using the following
methodology:
To create the input file which includes the data for the building algorithm. The data should
include:
i. Number of steps involved in the z-bus building process (n).
ii. New bus number which is being added (b).
iii. Old bus number which is being added (t).
iv. Real component of the impedance between two buses (zr).
v. Imaginary component of the impedance between two buses (zi).
vi. The case number (c) to which a particular case belongs.
Switch-case method is implemented for the bus building process.
Case 1:A branch is added between a new bus k and a reference bus
Zjk =Zkj=0 ; j=1,2,m
Zkk=Zb
m=m+1

Case 2: A branch is added between new bus k to old bus l


Zkj=Zlk ; j=1,2,..m
Zjk=Zkj ; j=1,2,..m
Zkk=Zll+Zb
m=m+1

Case 3: A branch is added between old bus k and reference bus


Zij= Zijold (Zik Zkj )/(Zkk + Zb) ; i=1, 2..m
; j=1, 2...m
Case 4: A link is added between two old bus k and l
Zijnew=Zijold - (Zik-Zil)(Zkj-Zlj) /(Zb+Zkk+Zll-Zkl-Zlk) ; i=1 , 2..m
; j=1 , 2..m
At each step, the following case number is read from the input file by the code and then the
following case number is executed so as to construct the .
The whole Switch-case procedure will be repeated n number of times, where n = number of
steps involved in the building process.
After each step the code will display the modified .
The code terminates after all the steps have been completed and thus in the process displays
the final , which is a product of the building algorithm which we have implemented.

ALGORITHM:
The following algorithm was used to formulate the code to construct Impedance matrix ( ) using
building algorithm:
Step 1 : Read the number of steps n of the building process from the input file.
Step 2 : Initialize the order of the matrix, size = 0.
Step 3 : Read the case number from the input file and store it in variable casez.
Step 4 : Set the step counter i = 1.
Step 5 : If the value of casez=1 or 2 then increment the value of size by 1 by:
size = size+1,
else dont increment the value of size.
Step 6 : If casez = 1, then go to Step 7.
If casez = 2, then go to Step 8.
If casez = 3, then go to Step 9
If casez = 4, then go to Step 10
If casez 1 or 2 or 3 or 4 , then go to Step 11
Step 7 : The following steps are followed:
i. Read the new bus number from the input file and store in variable b.
ii. Read the line impedance value from the input file and store in variable z.
iii. Set the size counter j = 1.
iv. Put the value at (j,size) = 0.
v. And to make the matrix symmetric, (size,j) = (j,size).
vi. If j = size, go to line vii, else increment j by 1 and go to line iv.
vii. Put (size,size) = z.
viii. Display the modified .
Step 8 : The following steps are followed:
i. Read the new bus number from the input file and store it in variable b.
ii. Read the old bus number from the input file and store it in variable t.
iii. Read the line impedance value from input file and store it in variable z.
iv. Set the size counter j = 1.
v. Put the value at (j,size) = (j,t).
vi. And to make matrix symmetric (size,j) = (j,size).
vii. If j = size, go to line viii else increment j by 1 and go to line v.
viii. Put (size,size) = z+ (t,t).
ix. Display the modified
Step 9 : The following steps are to be followed:
i. Read the old bus number from the input file and store it in variable t.
ii. Read the value of line impedance from the input file and store it in variable z.
iii. Implement the following formula:

zbus = zbus -

iv. Display the modified z-bus.


Step 10 : The following steps are to be followed:
i. Read the originating bus number from input file and store it in variable b.
ii. Read the terminating bus number from input file and store it in variable t.
iii. Read the value of line impedance from input file and store it in variable z.
iv. Implement the following formula:

zbus = zbus

v. Display the modified z-bus.


Step 11 : Print Invalid case and decrement the step counter i by 1 as follows:
i=i-1
Step 12 : If i = n, then go to Step 13, else increment the value of i by 1 and go to Step 5.
Step 13 : Terminate the program.
SINGLE LINE DIAGRAM:

Fig 3
In the following data set bus 1 has been taken as reference bus, i.e. it has been numbered from 0 and
the numbers of the rest has been decremented by 1.

Table 3.1: Bus Data for IEEE-6 bus system

Table 3.2 : Generator Data for IEEE-6 bus system


DATA INPUT FILE:
The z-bus data was stored in a file named zbusdata.txt.
Z-bus data input:

Table 3.3 : Line data for IEEE 6 bus system


N b t Zr Zc
11 1 0 0.1 0.2
0 3 0 0.05 0.2
0 4 0 0.08 0.3
0 1 2 0.05 0.25
0 1 3 0.05 0.1
0 1 4 0.1 0.3
0 1 5 0.07 0.2
0 2 4 0.12 0.26
0 2 5 0.02 0.1
0 3 4 0.2 0.4
0 4 5 0.1 0.3

The cases were stored in a file named cases.txt.

case input file:

c=[11124424444]

PROGRAM FILE:

clc

clear all

size=0;

X=importdata('zbusdata.txt',' ',1);

C=importdata('cases.txt',' ',1);

n=X.data(1,1);

for i=1:n

casez=C.data(i,1);

if casez= =1||casez = =2

size=size+1;

else
size=size+0;

end;

switch(casez)

case 1

b=X.data(i,2);

z=complex(X.data(i,4),X.data(i,5));

for j=1:size

zbus(j,size)=0;

zbus(size,j)=zbus(j,size);

end;

zbus(size,size)=z;

fprintf('\nThe modified z-bus is as follows:\n');

disp(zbus);

case 2

b=X.data(i,2);

t=X.data(i,3);
z=complex(X.data(i,4),X.data(i,5));

for j=1:size

zbus(j,size)=zbus(j,b);

zbus(size,j)=zbus(j,size);

end;

zbus(size,size)=z+zbus(t,t);

fprintf('\nThe modified z-bus is as follows\n');

disp(zbus);

case 3

t=X.data(i,3);
z=complex(X.data(i,4),X.data(i,5));

zbus=zbus-((1/(zbus(t,t)+z))*zbus(:,t)*zbus(t,:));

fprintf('\nThe modified z-bus is as follows\n');

disp(zbus);

case 4

b=X.data(i,2);

t=X.data(i,3);

z=complex(X.data(i,4),X.data(i,5));

zbus=zbus-((1/(z+zbus(b,b)+zbus(t,t)-

2*zbus(b,t)))*(zbus(:,b)-zbus(:,t))*(zbus(b,:)-zbus(t,:)));

fprintf('\nThe modified z-bus is as follows\n');

disp(zbus);

otherwise

i=i-1;

fprintf('\nInvalid case\n');

end;

end;

OUTPUT FILE:

The modified z-bus is as follows:

0.1000 + 0.2000i

The modified z-bus is as follows:

0.1000 + 0.2000i 0.0000 + 0.0000i

0.0000 + 0.0000i 0.0500 + 0.2000i

The modified z-bus is as follows:

0.1000 + 0.2000i 0.0000 + 0.0000i 0.0000 + 0.0000i


0.0000 + 0.0000i 0.0500 + 0.2000i 0.0000 + 0.0000i

0.0000 + 0.0000i 0.0000 + 0.000i 0.0800 + 0.3000i

The modified z-bus is as follows

0.1000 + 0.2000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.1000 + 0.2000i

0.0000 + 0.0000i 0.0500 + 0.2000i 0.0000 + 0.0000i 0.0000 + 0.0000i

0.0000 + 0.0000i 0.0000 + 0.0000i 0.0800 + 0.3000i 0.0000 + 0.0000i

0.1000 + 0.2000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.1000 + 0.3000i

The modified z-bus is as follows

0.0586 + 0.1341i 0.0000 + 0.0000i 0.0379 + 0.1012i 0.0586 + 0.1341i

0.0000 + 0.0000i 0.0500 + 0.2000i 0.0000 + 0.0000i 0.0000 + 0.0000i

0.0379 + 0.1012i 0.0000 + 0.0000i 0.0568 + 0.1518i 0.0379 + 0.1012i

0.0586 + 0.1341i 0.0000 + 0.0000i 0.0379 + 0.1012i 0.0586 + 0.2341i

The modified z-bus is as follows

0.0586 + 0.1341i 0.0000 + 0.0000i 0.0379 + 0.1012i 0.0586 + 0.1341i

0.0000 + 0.0000i 0.0500 + 0.2000i 0.0000 + 0.0000i 0.0000 + 0.0000i

0.0379 + 0.1012i 0.0000 + 0.0000i 0.0568 + 0.1518i 0.0379 + 0.1012i

0.0586 + 0.1341i 0.0000 + 0.0000i 0.0379 + 0.1012i 0.0645 + 0.2106i

The modified z-bus is as follows

0.0586 + 0.1341i 0.0000 + 0.0000i 0.0379 + 0.1012i 0.0586 + 0.1341i 0.0586 + 0.1341i

0.0000 + 0.0000i 0.0500 + 0.2000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i

0.0379 + 0.1012i 0.0000 + 0.0000i 0.0568 + 0.1518i 0.0379 + 0.1012i 0.0379 + 0.1012i

0.0586 + 0.1341i 0.0000 + 0.0000i 0.0379 + 0.1012i 0.0645 + 0.2106i 0.0586 + 0.1341i

0.0586 + 0.1341i 0.0000 + 0.0000i 0.0379 + 0.1012i 0.0586 + 0.1341i 0.1286 + 0.3341i

The modified z-bus is as follows


0.0445 + 0.1075i 0.0134 + 0.0403i 0.0285 + 0.0810i 0.0421 + 0.0919i 0.0445 + 0.1075i

0.0134 + 0.0403i 0.0408 + 0.1409i 0.0083 + 0.0302i 0.0131 + 0.0626i 0.0134 + 0.0403i

0.0285 + 0.0810i 0.0083 + 0.0302i 0.0507 + 0.1365i 0.0274 + 0.0694i 0.0285 + 0.0810i

0.0421 + 0.0919i 0.0131 + 0.0626i 0.0274 + 0.0694i 0.0471 + 0.1446i 0.0421 + 0.0919i

0.0445 + 0.1075i 0.0134 + 0.0403i 0.0285 + 0.0810i 0.0421 + 0.0919i 0.1145 + 0.3075i

The modified z-bus is as follows

0.0385 + 0.0980i 0.0194 + 0.0548i 0.0245 + 0.0738i 0.0372 + 0.0880i 0.0243 + 0.0694i

0.0194 + 0.0548i 0.0359 + 0.1193i 0.0121 + 0.0412i 0.0190 + 0.0690i 0.0325 + 0.0979i

0.0245 + 0.0738i 0.0121 + 0.0412i 0.0481 + 0.1310i 0.0239 + 0.0664i 0.0152 + 0.0521i

0.0372 + 0.0880i 0.0190 + 0.0690i 0.0239 + 0.0664i 0.0438 + 0.1435i 0.0243 + 0.0757i

0.0243 + 0.0694i 0.0325 + 0.0979i 0.0152 + 0.0521i 0.0243 + 0.0757i 0.0473 + 0.1554i
The modified z-bus is as follows

0.0380 + 0.0977i 0.0189 + 0.0541i 0.0259 + 0.0755i 0.0358 + 0.0859i 0.0238 + 0.0688i

0.0189 + 0.0541i 0.0358 + 0.1179i 0.0127 + 0.0445i 0.0187 + 0.0652i 0.0323 + 0.0967i

0.0259 + 0.0755i 0.0127 + 0.0445i 0.0458 + 0.1234i 0.0256 + 0.0755i 0.0160 + 0.0549i

0.0358 + 0.0859i 0.0187 + 0.0652i 0.0256 + 0.0755i 0.0429 + 0.1329i 0.0236 + 0.0724i

0.0238 + 0.0688i 0.0323 + 0.0967i 0.0160 + 0.0549i 0.0236 + 0.0724i 0.0470 + 0.1544i

The modified z-bus is as follows

0.0373 + 0.0971i 0.0199 + 0.0552i 0.0252 + 0.0748i 0.0342 + 0.0835i 0.0259 + 0.0720i

0.0199 + 0.0552i 0.0346 + 0.1157i 0.0136 + 0.0459i 0.0205 + 0.0695i 0.0300 + 0.0908i

0.0252 + 0.0748i 0.0136 + 0.0459i 0.0452 + 0.1224i 0.0243 + 0.0727i 0.0177 + 0.0588i

0.0342 + 0.0835i 0.0205 + 0.0695i 0.0243 + 0.0727i 0.0403 + 0.1246i 0.0268 + 0.0836i

0.0259 + 0.0720i 0.0300 + 0.0908i 0.0177 + 0.0588i 0.0268 + 0.0836i 0.0432 + 0.1392i

CONCLUSION: Thus from the following assignment we have seen constructed the impedance matrix
for a 6 bus system using building algorithm.

REFERENCES:

[1]IEEE data: http://shodhganga.inflibnet.ac.in/bitstream/10603/16900/13/13_appendix.pdf

Vous aimerez peut-être aussi