Sie sind auf Seite 1von 1

% Y BUS COMPUTATION

clear all
clc
n=input('Enter the number 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 charging 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('resultant Y Bus Matrix');
R

Das könnte Ihnen auch gefallen