Exp 1
Exp 1
Aim:
To write a MATLAB program to form bus admittance matrix Y
1) For the sample 4 bus system whose line data is given as :
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.
Theoretical calculations for the 4 bus system:
MATLAB code:
clear all
clc
Linedata
from=linedata(:,1);
to=linedata(:,2);
R=linedata(:,3);
X=linedata(:,4);
B=linedata(:,5);
nline=length(linedata(:,1));
nbus=max(max(from),max(to));
Z=R + 1j*X;
y=ones(nline,1)./Z;
ybus=zeros(nbus,nbus);
for n=1:nbus
for k=1:nline
if from(k)==n || to(k)==n
ybus(n,n)=ybus(n,n)+y(k)+(1j*B(k));
end
end
end
for k=1:nline
ybus(from(k),to(k))=ybus(from(k),to(k))-y(k);
ybus(to(k),from(k))=ybus(from(k),to(k));
end
ybus
Output:
1)
2) IEEE 14 bus system
Results:
Therefore, the Y bus matrix is formed with the help of MATLAB and is successfully verified for 4 bus
and 14 bus system.