Thursday, 19 December 2019

Formation of Y Bus Matrix


FORMATION OF Y BUS MATRIX

PROGRAM:

clc;
n=input('Enter the no. of buses:')
for i=1:n
for j=1:n
if(i==j)
y(i,j)=0;
a(i,j)=0;
else
i
j
z(i,j)=input('Enter the self impedance:');
if(z(i,j)==0)
y(i,j)=z(i,j);
else
y(i,j)=1/z(i,j);
end
a(i,j)=input('Enter the line changing admittance:');
end
end
end
for i=1:n
for j=1:n
if(i==j)
r(i,j)=0;
for k=1:n
                r(i,j)=y(i,k)+a(i,k)+r(i,j);
end
else
r(i,j)=-y(i,j);
end
end
end
disp('The resultant Y-bus is:');
r

No comments:

Post a Comment

google-site-verification: google18ae80885fc3d876.html