0% found this document useful (0 votes)
41 views

Y-bus matrix using MATLAB

The document outlines the process for calculating the elements of the admittance-bus matrix (Y-bus) for a given bus network in a power system analysis lab. It includes theoretical calculations, an algorithm for implementation, and MATLAB code to compute the Y-bus matrix. The results confirm that the calculated admittance matrix aligns with theoretical expectations.

Uploaded by

navyakukreja9
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Y-bus matrix using MATLAB

The document outlines the process for calculating the elements of the admittance-bus matrix (Y-bus) for a given bus network in a power system analysis lab. It includes theoretical calculations, an algorithm for implementation, and MATLAB code to compute the Y-bus matrix. The results confirm that the calculated admittance matrix aligns with theoretical expectations.

Uploaded by

navyakukreja9
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Power Systems Analysis Lab

BEEE306P
Digital Assignment - 2
Simulation of Y-bus matrix
Navya Kukreja
22BEE0093

Aim
To calculate the elements yij of the admittance-bus matrix from the given bus
network.

Theory
The nodal admittance matrix is given by the equation (for a three-bus system):
     
I1 Y11 Y12 Y13 V1
I2  = Y21 Y22 Y23  · V2 
I3 Y31 Y32 Y33 V3

then, the nodal admittance matrix is


 
Y11 Y12 Y13
Y21 Y22 Y23 
Y31 Y32 Y33

The diagonal elements are dependent on the given bus system and calculated
accordingly

1
Theoretical calculations
Given the system,  
1 2 0.15 0.6 0.02 1
1 3 0.10 0.4 0.02 1
 
1 4 0.15 0.6 0.025 1
 
2 3 0.05 0.2 0.01 1
3 4 0.05 0.2 0.01 1

We have,
y12 = Z112 = 1
0.15+j0.6 = 0.39 − j1.56
y13 = Z113 = 1
0.10+j0.4 = 0.58 − j2.32
y14 = Z114 = 1
0.15+j0.6 = 0.39 − j1.56
y23 = Z123 = 1
0.05+j0.2 = 1.76 − j4.7

and diagonal elements are given by,

y11 = y12 + y13 + y14 + j 0.02 0.02 0.025


2 + j 2 + j 2 = 1.36 − j5.43
y22 = y21 + y23 + j 0.01 0.02
2 + j 2 = 1.56 − j6.25
y33 = y12 + y13 + y14 + j 0.02 0.02 0.025
2 + j 2 + j 2 = 1.36 − j5.43
y44 = y12 + y13 + y14 + j 0.02 0.02 0.025
2 + j 2 + j 2 = 1.36 − j5.43

Algorithm
1. User enters the line data matrix, which contains the start and end buses of
each transmission line, resistance (R), reactance (X), half-line charging suscep-
tance (Bc ), and transformation ratio (a).

2. The number of buses and transmission lines is determined. Using this in-
formation, an nbus × nbus zero matrix is initialized as Ybus , which will be populated

2
with admittance values representing the network’s electrical properties.

3. The off-diagonal elements of Ybus are updated by iterating through the trans-
mission lines. For each line, the mutual admittance between the connected buses
is calculated and added using the formula Ybus (nl , nr ) = −y/a. Symmetry is en-
sured by setting Ybus (nr , nl ) = Ybus (nl , nr ).

4. The diagonal elements of Ybus are updated by summing the contributions


from all connected lines for each bus. These include terms from the sending end,
y/a2 + Bc , and the receiving end, y + Bc . The total is added to the diagonal entry
Ybus (n, n).

5. Once all elements are calculated, the fully populated bus admittance matrix
Ybus is displayed. This matrix is essential for power system analysis and represents
the admittance relationships between buses in the network.

3
MATLAB code

clc
clear all

linedata = [1 2 0.15 0.6 0.02 1


1 3 0.10 0.4 0.02 1
1 4 0.15 0.6 0.025 1
2 3 0.05 0.2 0.01 1
3 4 0.05 0.2 0.01 1];

% Ybus formation
j = sqrt ( -1) ;
i = sqrt ( -1) ;
nl = linedata (: ,1) ;
nr = linedata (: ,2) ;
R = linedata (: ,3) ;
X = linedata (: ,4) ;
Bc = j * linedata (: ,5) ;
a = linedata (: ,6) ;
nbr = length ( linedata (: ,1) ) ;
nbus = max ( max ( nl ) , max ( nr ) ) ;
Z = R + j*X;
y = ones ( nbr , 1) ./ Z ;

for n = 1:1: nbr


if a ( n ) <= 0
a(n) = 1
else end
Ybus = zeros ( nbus , nbus ) ;
for k = 1:1: nbus
Ybus ( nl ( k ) , nr ( k ) ) = Ybus ( nl ( k ) , nr ( k ) ) - y ( k ) / a ( k ) ;
Ybus ( nr ( k ) , nl ( k ) ) = Ybus ( nl ( k ) , nr ( k ) ) ;
end
end
for n =1: nbr
for k = 1: nbr
if nl ( k ) == n
Ybus (n , n ) = Ybus (n , n ) + y ( k ) /( a ( k ) ^2) + Bc ( k ) ;
elseif nr ( k ) == n
Ybus (n , n ) = Ybus (n , n ) + y ( k ) + Bc ( k ) ;
else
end
end

4
end
disp (" The Ybus matrix is : ") ;
disp ( Ybus ) ;

Results
Output from given input parameters are,
”The Ybus matrix is:
Columns 1 through 3

1.3725 − 5.4252i −0.3922 + 1.5686i −0.5882 + 2.3529i


−0.3922 + 1.5686i 1.5686 − 6.2445i −1.1765 + 4.7059i
−0.5882 + 2.3529i −1.1765 + 4.7059i 2.9412 − 11.7247i
−0.3922 + 1.5686i 0.0000 + 0.0000i 0.0000 + 0.0000i
Column 4

−0.3922 + 1.5686i
0.0000 + 0.0000i
0.0000 + 0.0000i
1.5686 − 6.2395i

Summary
We have successfully calculated the admittance matrix for the given bus system
and output is consistent with theoretical calculations.

You might also like