Mat ZLab
Mat ZLab
Mat ZLab
2.2 OBJECTIVES
i. To write a computer program to form bus admittance matrix Y, given the impedances of
the elements of a power network and their connectivity (mutual coupling between elements
neglected)
ii. To modify the matrix Y to effect specified changes in the configuration of the network.
iii. To obtain network solution, that is, to determine the bus voltages given bus current injections.
iv. To obtain certain specified columns of the bus impedance matrix Z or the full matrix Z using the
factors of Y or the inverse of Y.
Y V = I (2.1)
Z I =V (2.2)
These matrices are important building blocks of power system modelling and analysis. The Z is mainly
used in fault analysis while Y is mainly used in power flow and stability analysis.
2-1
Generation
Load
G I1 yg1 yd2
2
1 1 y12 2
Short line
y ‘23
Short line Long line y13 y23
y ‘23
3
Shunt
Compensation 3
y30 yd3
Load
In Fig.2.2, the admittances of the generator, loads and transmission lines are given in per unit to
system MVA base. The ground is taken as reference node.
2-2
where
Y11 = ( yg1 + y12 +y13)
Y22 = (yd2 + y12 + y23 + y’ 23) (2.6)
Y33 = (yd3 + y30 + y23 + y’ 23 + y13)
Y12 = Y21 = -y12
Y13 = Y31 = -y13
Y23 = Y32 = -y23
The matrix equation (2.5) can be extended to an ‘n’ node system. The steps invol ved in assembling bus
admittance matrix may be extracted from equations (2.5) and (2.6) and are given below.
2. The off-diagonal element Yij of the matrix is equal to the negative of the sum of the admittances of
all elements connected between the nodes i and j.
2.4.3 Equivalent Circuit of A Transformer With Off-Nominal Tap for the Purpose of Formation
of Bus Admittance Matrix
A two – winding transformer with off- nominal turns ratio, connected between nodes k and m is shown
in Fig 2.3. In this representation, the turns ratio is normalized as a:1 and the non–unity side is called the
tap side which is taken as the sending end side. The series admittance of the transformer is connected to
the unity side.
Ik a :1 aIk y Im
k t m
k
. m
m
Vk/a
Vk Vm
Fig.2.3 Transformer with off-nominal tap
Im
k Ik y/a m
o o
y{1-(1/a)} Vm
Vk y/a {(1/a)-1}
y -y Vk/a aIk
-y y Vm = Im (2.7)
It can be checked by applying the Two-Rule method to buses k and m in Fig.2.4 that the bus admittance
PDWUL[IRUWKHFLUFXLWLQ)LJDQGWKDWLQHTXDWLRQDUHWKHVDPH+HQFHWKH - equivalent circuit
for transformer with off–nominal tap is that in Fig.2.4 and the contribution of this transformer to bus
admittance matrix Y of the power system to which it is connected is (refer equation (2.8))
2-4
Algorithm
Step 1: Initialize Y with all elements set to zero
Step 2: Read the line list, one line at-a-time and update Y by adding the respective
contribution, equation (2.10)
Step 3: Read the transformer list, one transformer at-a-time and update Y by adding the
respective contribution, equation (2.9)
Step 4: Read the shunt element list, one element at-a-time and update Y by adding the
respective contribution, equation (2.11)
Modification 1: Add an element with impedance z, connected between the reference node of the
partial network and a new node (r+1).
Zm = Z 0 (2.13)
0 z
Modification 2: Add an element with impedance z, connected between an existing node i and a
new node (r+1).
Z Zi (2.14)
Zm =
ZiT (Zii + z)
2-5
Modification 3 : Add an element with impedance z, connected between an existing node i and
the reference node of the partial network.
Rule 3 : The modified matrix Zm of dimension r x r is obtained through a two step process. In
the first step, assume that the added element is between the existing node i and a fictitious node (r+1)
(instead of the reference node) and obtain the modified matrix Z’ of dimension (r+1) x (r+1) by
augmenting Z with an extra row and column as in (2.14). The second step is to connect the fictitious
node (r+1) by zero impedance link to the reference node whose voltage is zero and to obtain the final
matrix Zm of dimension r x r by applying Kron’s -reduction to the last row and column to obtain
Modification 4 : Add an element with impedance z, connected between existing nodes i and j.
Rule 4 : The modified matrix Zm of dimension r x r is given by
Zm = Z – c b b T (2.16)
where b = Zi - Zj (2.17)
c= (z + Zii +Zjj – 2Zij)-1 (2.18)
Zi, Zj : ith and jth columns of Z
Zii, Zjj, Zij: iith , jjthand ijth elements of Z
Note:
Step 1:
Start with a partial network composed only of those elements connected directly to reference node. Let
the number of these elements be r. The corresponding bus impedance matrix Z(1) is of dimension r x r
and is diagonal with the impedance values of the elements appearing on the diagonal. This process is
equivalent to the repeated use of rule 1.
2-6
Step 2:
Add a new element which brings a new node and modify Z(1) using rule 2. Continue until all the nodes
of the complete network are brought in.
Step 3: Add a new element connected between existing nodes i and j using rule 4. Continue until all the
elements are connected.
YV=I (2.20)
In power system applications, during most of the studies, the network configuration and parameters
remain the same implying that Y remains fixed. However the operating conditions change resulting in
changed bus current vector I. In such cases, while finding numerical solution for the bus voltage vector
V repeatedly for different bus current vectors I, the computations can be performed effectively resulting
in considerable savings in time if “triangular factorization” and “repeat solution” are adopted.
First the matrix Y in equation (2.20) is split into factor matrices L and U using the “triangular
factorization process” [1]. The equation (2.20) may be written as
YV=LUV=I (2.21)
~
By defining an intermediate voltage vector V as
~
UV=V (2.22)
(ii) Back substitution : This involves solving eqn.(2.22) for vector V through elementary
~
transformations on vector V using the elements of U.
2-7
Factorization Algorithm:
Let us define the L and U factor matrices for a sample Y matrix of dimension 3 x 3 as
(2.24)
After multiplication of L and U matrices, eqn. (2.24) becomes,
(2.25)
It is seen from (2.24) and (2.25) that the first row of U is readily obtained from the first row of Y,
whereas the first column of L can be obtained by dividing the first column of Y by U11 which is the
same as Y11. All the elements of L and U can be obtained from the Y matrix in Eqn. (2.25) by
performing two transformations. The first transformation on Y matrix in eqn. (2.25) is as follows.
Y(1)22 = Y22 – (Y21 Y12) / Y11 ; Y(1)23 = Y23 - (Y21 Y13) / Y11
Y(1)32 = Y32 – (Y31 Y12 ) / Y11 ; Y(1)33 = Y33 – (Y31 Y13) / Y11
and Y(1)21 = Y21/ Y11 ; Y(1)31 = Y31 / Y11
Now the Y(2) matrix in (2.27) contains all the elements of L and U. This can be termed as factor matrix F.
The above factorization process can be generalized for a Y matrix of dimension nxn as
follows.
After the above (n-1) transformations, the Y matrix is converted into the factor matrix F which contain
all the elements of L and U.
~
1 0 0 V1 I1
~
F21 1 0 V2 = I2 (2.30)
~
F31 F32 1 V3 I3
~
V1 = I1
~
V2 = I2(1) ; I2(1) = I2 – F21 I1 (2.31)
~
V3 = I3(2) ; I3(1) = I3 – F31 I1 ; I3(2) = I3 (1)– F32 I2(1)
The above steps can be generalized as :
~
Vi = Ii (i-1) ; i = 1,2,………..n
~ ~ ~
V3 = V3(1) ; V3(1) = V3 / F33
~ ~ ~ ~ ~ ~
V2 = V2 (2) ; V2 (1) = V2 – F23 V3 (1) ; V2 (2) = V2 (1) / F22 (2.34)
~ ~ ~ ~ ~ ~ ~ ~ ~
V1 = V1 (3) ; V1 (1) = V1 – F12 V2 (2) ; V1 (2) = V1 (1) – F13 V3 (1) ; V1 (3) = V1 (2) / F11
i = n, ….., 2, 1
j = n, ….., (i+1), i
No Yes
If (j = i)?
~ ~ ~ ~ ~
Vi = Vi – Fij Vj Vi = Vi / Fij
2.5 EXERCISES
2.5.1 Write a program in C language for formation of bus admittance matrix Y of a power network
using the “ Two – Rule Method”.
The program should have three sections: Input Section, Compute Section and Output Section.
I. Input Section:
Pre-requisite:
Before creating the input data file, draw a single-line diagram showing the buses, lines, transformers,
shunt elements, bus generations and demands. (Refer Fig in Annexure 2.1) Bus Id numbers are serially
given from 1 to NB where NB is the total number of buses in the system.
The data to be read from an input file should contain the general data, transmission line data,
transformer data and shunt element (capacitor / reactor) data in the following sequence:
i. General Data: Number of buses, number of transmission lines, number of transformers, number of
shunt elements (capacitor / reactor) and the base MVA of the network.
ii. Transmission Line Data: The following data to be read for all lines, (one line for each transmission
line):
2-11
iv. Shunt element (capacitor / reactor) Data:
The following data to be read for all shunt elements (one line for each element):
a. Identification number (serial number)of the shunt element
b. Identification number of the bus
c. Rated capacity in MVA (positive for capacitor and negative for inductor).
• ) 2.5.2 The line series impedance (R,X) is given in ohm per km length of line and the line
charging susceptance is given in milli Siemens per km length. Further the length of line in km
as well as rated voltage of the line in kV are also given. Modify the program developed in
2.5.1 to read the line impedance / susceptance data in per unit as in 2.5.1 or in ohms / mhos
as in 2.5.2.
2.5.3 Using a text editor create an input file in the sequence given in 2.5.1 for formation of Y matrix
for the 6 bus system given in Annexure 2.1, run the program developed in 2.5.1, compute Y
and print the output file. Check the results obtained using the available software.
2.5.4 Create necessary changes in the C program developed in 2.5.1 to modify the formed Y matrix for
the outage (removal) of a transmission line, a transformer and a shunt capacitor / reactor.
2.5.5 Run the program in 2.5.4 and print the modified Y matrix for the 6 bus system for the removal
of the following components, one at-a-time:
a. Line 4-6
b. Transformer 4-3
c. Shunt capacitor at Bus 4
Check the results, using the available software.
2-12
2.5.6 Create necessary changes in the C program in 2.5.1 to obtain bus impedance matrix Z either full
matrix or only certain specified column from the formed Y matrix either by factorizing Y and
going for one “ repeat solution” for each column of Z or by inverting Y.
2.5.7 Run the program developed in 2.5.6 and obtain Z for the six bus system in Annexure 2.1. Obtain
only the column of Z corresponding to bus 4. Check the results using the available software.
Repeat this exercise again but after dropping the two shunt capacitors of the 6 bus system. What
is the inference?
2.5.8 Create necessary changes in the C program in 2.5.1 to obtain network solution V given the bus
current source vector I, either using the factors of Y or the inverse of Y.
2.5.9 In the 6 bus system in Annexure 2.1 replace the generators at buses 1 and 2 by equivalent ideal
current sources 1.0 ?o p.u and the loads at buses 3,5 & 6 by equivalent ideal current sources
computed assuming a bus voltage of 1.0 ?o p.u. For this network run the program in 2.5.8 and
obtain the solution V.
• ) 2.5.10 Write a program in C language for forming the bus impedance matrix Z step by step, using
the “Building Algorithm”, run the program for the 6 bus example in Annexure 2.1 and
compare the results with that obtained in 2.5.7.as well as with that obtained using the
available software.
2.6 REFERENCE
[1] Arthur R.Bergen and Vijay Vittal, “Power Systems Analysis”, Pearson Education Asia, Delhi,
Second Edition, 2000.
2-13
ANNEXURE 2.1
6-BUS, 7-LINES / TRANSFORMER POWER SYSTEM
Single-Line Diagram
G
S1 3
L2 4 T2
1
L3 a:1
L1 L5
T1 L4
6 5 2
S2
a:1
G
2-14
Transmission Line Data:
Line ID. Send Bus Receive Resist Reactance Half Line Rating
No No. Bus No. P.U P.U. charging MVA
Suscept.
P.U
1 1 6 0.123 0.518 0.0 55
2 1 4 0.080 0.370 0.0 65
3 4 6 0.087 0.407 0.0 30
4 5 2 0.282 0.640 0.0 55
5 2 3 0.723 1.050 0.0 40
Transformer Data:
(*) Note: The sending end bus of a transformer should be the tap side.
2-15