[go: up one dir, main page]

0% found this document useful (0 votes)
1 views3 pages

ZB & Yb

The document contains a MATLAB program that calculates the bus impedance matrix based on user inputs for branch and link impedances. It initializes impedance values, constructs a matrix, and updates it based on user-defined connections. The final output is the bus impedance matrix after all modifications.

Uploaded by

laportemehmet
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)
1 views3 pages

ZB & Yb

The document contains a MATLAB program that calculates the bus impedance matrix based on user inputs for branch and link impedances. It initializes impedance values, constructs a matrix, and updates it based on user-defined connections. The final output is the bus impedance matrix after all modifications.

Uploaded by

laportemehmet
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/ 3

PROGRAM:

clc;

z1=0.2j;

y1=1/z1;

z2=0.3j;

y2=1/z2;

z3=0.2j;

y3=1/z3;

z4=0.2j;

y4=1/z4;

a=[-1 0 0;

1 -1 0;

0 1 -1;

1 0 -1];

y=[y1 0 0 0;

0 y2 0 0;

0 0 y3 0;

0 0 0 y4];

yb= transpose(a)*y*a

OUTPUT:

PROGRAM:
clear all;

clc;

branch=input('enter the number of branches: ');

link=input('enter the number of link: ');

zb=zeros(branch,branch);

[branch,branch] = size(zb) ;

for i=1:1:branch

z=input('enter the impedance value: ');

zb(i,i)=zb(i,i)+z;

zb(i,i+1)=zb(i,i);

zb(i+1,i)=zb(i,i);

zb(i,i+2)=zb(i,i);

zb(i+2,i)=zb(i,i);

zb(i+1,i+1)=zb(i+1,i+1)+zb(i,i);

end

zb=zb(1:branch, 1:branch);

for l=1:1:link

i=input('enter the starting node of the link: ');

j=input('enter the ending node of the link: ');

z=input('enter the impedance value: ');

a=(zb(i:j,i)-zb(i:j,j));

zb=zb-(1/(zb(i,i)+zb(j,j)-(2*zb(i,j))+z))*a*transpose(a);

end

bus_impedance_matrix=zb

OUTPUT:

You might also like