0% found this document useful (0 votes)
92 views5 pages

Experiment 5 - Z Bus Building Algorithm

Uploaded by

Arvind Sriram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views5 pages

Experiment 5 - Z Bus Building Algorithm

Uploaded by

Arvind Sriram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

EXP 5: FORMATION OF BUS IMPEDANCE MATRIX

USING Z BUS BUILDING ALGORITHM


AIM:

To develop a MATLAB program for formation of Z bus using Z Bus building


algorithm.

APPARATUS:

S.no Software Version

1. MATLAB R2022a

FORMULAE:

TYPE 1 MODIFICATION (NEW BUS TO REFERENCE BUS):


The above figure shows a passive (linear) n-bus network in which branch with
impedance Zb is added between bus k and the reference bus, Now,

𝐙𝐛𝐮𝐬(𝐧𝐞𝐰) = [𝐙𝐛 ]

TYPE 2 MODIFICATION (NEW BUS ‘k’ TO OLD BUS ‘j’):

Zb is added from new bus k to the old bus j as shown in the figure. It follows from
this figure that:

𝐙𝟏𝐣
𝐙𝐛𝐮𝐬(𝐨𝐥𝐝) 𝐙𝟐𝐣
𝐙𝐛𝐮𝐬(𝐧𝐞𝐰) =

[𝐙𝐢𝟏 𝐙𝟐𝐢 … 𝐙𝐣𝐣 + 𝐙𝐛 ]
TYPE 3 MODIFICATION (OLD BUS ‘j’ TO REFERENCE BUS):

Zb connects an old bus j to the reference bus as shown in Fig 26. Thus

𝐙𝟏𝐣
𝟏
𝐙𝐛𝐮𝐬(𝐧𝐞𝐰) = 𝐙𝐛𝐮𝐬(𝐨𝐥𝐝) − [ ⋮ ] [𝐙𝐣𝟏 … 𝐙𝐣𝐧 ]
𝐙𝐣𝐣 + 𝐙𝐛 𝐙
𝐧𝐣

TYPE 4 MODIFICATION (OLD BUS TO OLD BUS):

Zb connects two old buses as in figure. Thus,


𝐙𝐛𝐮𝐬(𝐧𝐞𝐰) = 𝐙𝐛𝐮𝐬(𝐨𝐥𝐝)
𝐙𝟏𝐢 − 𝐙𝟏𝐣
𝟏
− [ ⋮ ] [𝐙𝐢𝟏 − 𝐙𝐣𝟏 … 𝐙𝐧𝐢 − 𝐙𝐣𝐧 ]
𝐙𝐛 + 𝐙𝐢𝐢 + 𝐙𝐣𝐣 − 𝟐𝐙𝐢𝐣 𝐙 − 𝐙
𝐧𝐢 𝐧𝐣

MATLAB CODE:
clear;clc;
format short g;
%FromBUS ToBUS Impedance
line=[ 1 0 0.33
1 2 0.18
3 1 0.14
2 0 0.25
2 3 0.22];

FromBus=line(:,1);
ToBus=line(:,2);
z=line(:,3);
nbuses=max(max(FromBus),max(ToBus));
nlines=length(FromBus);
added=-1*ones(nbuses+1,1); % To know whether each bus has been
traversed at least once
added(nbuses+1)=0;
zbus=zeros(nbuses,nbuses);
order=0; %To input the modified values onto the z bus matrix
(order increases till nxn)

%ZBUS Formation loop

for k=1:nlines
FB_TB=[FromBus(k),ToBus(k)];
common=intersect(added,FB_TB); %common is to decide the
type of modification to be done

if length(common)==1
order=order+1;
new_bus=FB_TB(FB_TB~=common);
added(new_bus)=new_bus;
if common==0 %TYPE 1 MODIFICATION - BUS TO REFERENCE
zbus(order,order)=z(k);
else %TYPE 2 MODIFICATION - NEW BUS TO OLD BUS
j=common;
zbus(:,order)=zbus(:,j);
zbus(order,:)=zbus(j,:);
zbus(order,order)=zbus(order,order)+z(k);
end
end
if length(common)==2
if any(common==0) %returns logical 1 (TRUE) if any of
the elements of the vector is a nonzero number or is logical 1

%TYPE 3 MODIFICATION - OLD BUS TO REFERENCE


j=common(common~=0); %old bus
zbus=zbus-(zbus(:,j)*zbus(j,:))/((zbus(j,j)+z(k)));

else
%TYPE 4 MODIFICATION - OLD BUS TO OLD BUS
i=FromBus(k);
j=ToBus(k);
zbus=zbus-((zbus(:,i)-zbus(:,j))*(zbus(i,:)-
zbus(j,:)))/...
(zbus(i,i)+zbus(j,j)-2*zbus(i,j)+z(k));
end
end
end

zbus=1i*zbus;
display(zbus);

OUTPUT:
zbus =
0 + 0.17443i 0 + 0.11786i 0 + 0.15243i
0 + 0.11786i 0 + 0.16071i 0 + 0.13452i
0 + 0.15243i 0 + 0.13452i 0 + 0.23102i

RESULT:

Thus, the formation of impedance matrix using Z Bus Building Algorithm was
carried out using MATLAB and results were verified.

You might also like