0% found this document useful (0 votes)
69 views2 pages

Formation of Z

This program takes in the number of buses in a power system and impedance data between buses to form the bus impedance matrix (Z-bus). It loops through each impedance value, calculates the from and to bus numbers, and updates the Z-bus matrix based on the impedance value and bus numbers. In the end it displays the final formed Z-bus matrix.

Uploaded by

Heather Carter
Copyright
© Attribution Non-Commercial (BY-NC)
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)
69 views2 pages

Formation of Z

This program takes in the number of buses in a power system and impedance data between buses to form the bus impedance matrix (Z-bus). It loops through each impedance value, calculates the from and to bus numbers, and updates the Z-bus matrix based on the impedance value and bus numbers. In the end it displays the final formed Z-bus matrix.

Uploaded by

Heather Carter
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 2

Formation of Z-Bus

Program:
clear; clc; nbus=input('Enter the no of Buses:'); zdata=input('Enter the zdata in the form "From bus | To bus | Impedance value":\n'); [elements colums]=size(zdata); Zbus=[]; currentbusno=0; for c=1:elements From=zdata(c,1); To=zdata(c,2); zpri=zdata(c,3); newbus=max(From,To); ref=min(From,To); [rows cols]=size(Zbus); if newbus>currentbusno && ref==0 Zbus=[Zbus zeros(rows,1);zeros(1,cols) zpri]; currentbusno=newbus; continue end if newbus>currentbusno && ref~=0 Zbus=[Zbus Zbus(:,ref);Zbus(ref,:) zpri+Zbus(ref,ref)]; currentbusno=newbus; continue end if newbus<=currentbusno && ref==0 Zbus=Zbus-1/(Zbus(newbus,newbus)+ zpri)*Zbus(:,newbus)*Zbus(newbus,:); currentbusno=newbus; continue end if newbus<=currentbusno && ref~=0 Zbus=Zbus-1/(zpri+Zbus(From,From)+Zbus(To,To)2*Zbus(From,To))*((Zbus(:,From)-Zbus(:,To))*((Zbus(From,:)-Zbus(To,:)))); currentbusno=newbus; continue end end Zbus

Output:
Enter the no of Buses:3 Enter the zdata in the form "From bus | To bus | Impedance value": [1 0 0.25;1 2 0.1;2 0 0.25;2 3 0.1;3 1 0.1]

Zbus = 0.1397 0.1103 0.1250 0.1103 0.1397 0.1250 0.1250 0.1250 0.1750

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy