Lab02 Generalized Bus Admittance
Lab02 Generalized Bus Admittance
: 04
Experiment Name: Determination of Generalized bus admittance matrix using MATLAB
Objectives:
To find out the Ybus matrix in MATLAB
To analyze the process to determine the admittance
To understand the necessity of admittance matrix
Theory:
The Y Matrix is a tool in that domain. It provides a method of systematically reducing a complex
system to a matrix than can be solved by a computer program. The equations used to construct the Y
matrix come from the application of Kirchhoff’s current law and Kirchhoff’s voltage law to a circuit
with steady-state sinusoidal operation. These laws give us that the sum of currents entering a node in
the circuit is zero, and the sum of voltages around a closed loop starting and ending at a node is also
zero. These principles are applied to all the nodes in a power flow system and thereby determine the
elements of the admittance matrix, which represents the admittance relationships between nodes, which
then determine the voltages, currents and power flows in the system.
The matrix can be found using the following condition:
if i ≠ j Y ( ij ) ≠−Y (ij)
n
Y ( ii )=∑ Y (ik)
k=1
The Ybus matrix is very impotant for analysis of load flow study because without this matrix the load
folw study can’t be completed.The general format for Ybus matrix is given below:
[] [ ][ ]
I1 Y 11 Y 12 Y 13 Y 14 V1
I2 Y 21 Y 22 Y 23 Y 24 V2
=
I3 Y 31 Y 32 Y 33 Y 34 V3
I4 Y 41 Y 42 Y 43 Y 44 V4
So without determining the Ybus matrix many other analyses in power system can’t be done. So
determining the matrix is very necessary in order to do many important work.
Command Used:
Command Description
clc clears the command window and homes the cursor
clear all removes items from MATLAB workspace and resets
MuPAD engine
cd('G:\pranto\SixSemLab\Power Specifies the full path to change the current folder from
System I') any location to the Excel Works directory for
MATLAB, assuming that MATLAB is installed on your
C: drive
z =xlsread('Ybus') Reads Microsoft spreadsheet file named 'Ybus'into
Numeric Matrix, z
d=sum(y,2) creates a matrix (here matrix, d) and compute the
value
Algorithm for construction of Ybus matrix:
1. Initialize all the elements of the bus admittance matrix to zero
2. Read a line data
3. Update the admittance matrix using required equation
4. Repeat steps (2) and (3) till all the line data are finished
5. Read a transformer data
6. Again Update the admittance matrix using required equation
7. Repeat steps (5) and (6) till all the transformer data are finished
8. Read a shunt reactor data
9. Again Update the admittance matrix using required equation
10. Repeat steps 8 and 9 till all the shunt element data are exhausted
11. Print the bus admittance matrix and stop
Flowchart for Ybus matrix:
Given System 1:
MATLAB Code:
clc % clear the command window and homes the cursor
clear all % remove items from MATLAB workspace and reset MuPAD
engine
cd('G:\pranto\Six Sem Lab\Power System I'); % changes the directory
A=xlsread('Ybus'); % Reads value from excel file
n=length(A);
for j=1:n
Z(A(j,1),A(j,2))=A(j,3)+A(j,4)*i; % Generates the impedence
matrix
Z(A(j,2),A(j,1))=A(j,3)+A(j,4)*i; % makes the matrix symmetric
end
Z;
m=length(Z);
for j=1:m
for k=1:m
if Z(j,k)==0;
Z(j,k)=inf; % makes all the value inf where finds zero
end
end
end
Z
Y=ones(m)./Z % find the admittance
Output:
Z=
Y=
Given System 2:
Output:
Z=
Inf + 0.0000i 0.0500 + 0.2500i 0.0400 + 0.2000i
0.0500 + 0.2500i Inf + 0.0000i 0.0300 + 0.1500i
0.0400 + 0.2000i 0.0300 + 0.1500i Inf + 0.0000i
Y=
1.7308 - 8.6538i -0.7692 + 3.8462i -0.9615 + 4.8077i
-0.7692 + 3.8462i 2.0513 -10.2564i -1.2821 + 6.4103i
-0.9615 + 4.8077i -1.2821 + 6.4103i 2.2436 -11.2179i
Conclusion:
This experiment introduces with MATLAB Platform and understands its application in Power system
and many other Engineering platforms. The experiment helped us to know about computation Platform
and its application. This feature offers a versatile opportunity of applications in power systems.