Admittance Matrix (Y-Bus)

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 11

Admittance Matrix (Y-Bus)

Formation of Bus Admittance Matrix


We can write the equations in matrix form as
Example

Lets say

Z11 = Z22 = j0.25, Z12 = j0.2, Z13 = j0.25, Z23 = Z34 = j0.4 and Z24 = j0.5

Y11 = Y22 = - j4, Y12 = - j5, Y13 = - j4, Y23 = Y34 = - j2.5 and Y24 = - j2
Inclusion of Line Charging Capacitors
% MATLAB code to find the Y-BUS matrix of the system without considering
transformer taps
clc;
clear all;
n=input ('enter number of buses='); % 14 or 39 bus
for k=1:n
for l=1:n
if(k~=l)
if(k<l)
fprintf('enter the value of resistance from bus %d to bus %d = ',k,l)
R(k,l)=input('');
fprintf('enter the value of reactance from bus %d to bus %d = ',k,l)
X(k,l)=input('');
fprintf('enter the value of line charging from bus %d to %d = ',k,l)
B(k,l)=input('');
elseif(k>l)
R(k,l)=R(l,k);
X(k,l)=X(l,k);
B(k,l)=B(l,k);
end
if(R(k,l)~=0||X(k,l)~=0)
y(k,l)=1/(R(k,l)+ 1i*X(k,l));
else
y(k,l)=0;
end
elseif(k==l)
y(k,l)=0;
end
end
end
% Off diagonal elements
for k=1:n
for l=1:n
if(k~=l)
Y(k,l)=-1*(y(k,l));
end
end
end
%Diagonal elements
for k=1:n
for l=1:n
for q=1:n
if(k==l)
Y(k,l)=y(k,q)+ 1i*(B(k,q)/2);
end
end
end
end
fprintf('Y bus of the given data is')
Y

You might also like