0% found this document useful (0 votes)
34 views1 page

Experiment No: - 8 Formation of Z Bus Matrix by Inspection Method

The document describes a MATLAB program that forms the bus admittance matrix (Ybus) for a power system network from branch data using the inspection method. The program takes in branch data with line and receiver numbers, resistance, and reactance values, calculates the branch admittances, and forms the off-diagonal and diagonal elements of Ybus by inspecting the branch connections at each bus. The output of the program is the 3x3 Ybus matrix for the sample 3-bus network.

Uploaded by

Brian Berry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views1 page

Experiment No: - 8 Formation of Z Bus Matrix by Inspection Method

The document describes a MATLAB program that forms the bus admittance matrix (Ybus) for a power system network from branch data using the inspection method. The program takes in branch data with line and receiver numbers, resistance, and reactance values, calculates the branch admittances, and forms the off-diagonal and diagonal elements of Ybus by inspecting the branch connections at each bus. The output of the program is the 3x3 Ybus matrix for the sample 3-bus network.

Uploaded by

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

EXPERIMENT NO: - 8

FORMATION OF Z BUS MATRIX BY INSPECTION METHOD

PROGRAM

MAIN.M

zdata = [ 0 1 0 1.0
0 2 0 0.8
1 2 0 0.4
1 3 0 0.2
2 3 0 0.2];
y = ybus(zdata);

PROGRAM

ybus.m

function[Ybus] = ybus(zdata)
nl=zdata(:,1); nr=zdata(:,2); R=zdata(:,3); X=zdata(:,4);
nbr=length(zdata(:,1)); nbus = max(max(nl), max(nr));
Z = R + j*X; %branch impedance
y= ones(nbr,1)./Z; %branch admittance
Ybus=zeros(nbus,nbus); % initialize Ybus to zero

for k = 1:nbr; % formation of the off diagonal elements


if nl(k) > 0 & nr(k) > 0
Ybus(nl(k),nr(k)) = Ybus(nl(k),nr(k)) - y(k);
Ybus(nr(k),nl(k)) = Ybus(nl(k),nr(k));
end
end

for n = 1:nbus % formation of the diagonal elements


for k = 1:nbr
if nl(k) == n | nr(k) == n
Ybus(n,n) = Ybus(n,n) + y(k);
else, end
end
end

Result

y=

0.0000 - 8.5000i 0.0000 + 2.5000i 0.0000 + 5.0000i


0.0000 + 2.5000i 0.0000 - 8.7500i 0.0000 + 5.0000i
0.0000 + 5.0000i 0.0000 + 5.0000i 0.0000 -10.0000i

You might also like