%YBUS formation by Singular transformation
%----------------------------------------------------------------
%element no | connected | y(self) | Mutually | y(mutual) |
% | From| To | | Coupled to | |
%----------------------------------------------------------------
ydata=[1 1 2 1/(0.05+j*0.15) 0 0
2 1 3 1/(0.1+j*0.3) 0 0
3 2 3 1/(0.15+j*0.45) 0 0
4 2 4 1/(0.10+j*0.30) 0 0
5 3 4 1/(0.05+j*0.15) 0 0];
elements=max(ydata(:,1))
yprimitive=zeros(elements,elements)
for i=1:elements,
yprimitive(i,i)=ydata(i,4)
if (ydata(i,5) ~= 0)
j=ydata(i,5)
ymutual=ydata(i,6)
yprimitive(i,j) = ymutual
end
end
buses=max(max(ydata(2,:)),max(ydata(3,:)))
A=zeros(elements,buses)
for i=1:elements
if ydata(i,2) ~= 0
A(i,ydata(i,3)) = -1
end
end
YBUS=A'*yprimitive*A
No comments:
Post a Comment