Programming for Y bus matrix of power system network.
Experiment No.: – 01
Aim of the Experiment: –
Programming for Y bus matrix of power system network.
Apparatus Required: –
MATLAB installed in computer system.
Diagram: –
Fig. 1.1: 14 bus system.
Theory: –
In order to obtain the node-voltage equations, consider the simple power system shown in Figure 1.1 where impedances are expressed in per unit on a common MVA base and the system datas are given in table no. 1.1 . Since the nodal solution is based upon Kirchhoff’s current law, impedances are converted to admittance, i.e.,
The circuit has been redrawn in Figure 9.2 in terms of admittances and transformation to current sources. Node 0 (which is normally ground) is taken as reference. Applying KCL to the independent nodes 1 through 4 results in
In the above network, since there is no connection between bus 1 and 4, Y14 = Y41 = 0; similarly Y24 = Y42 = 0.
Extending the above relation to an n bus system, the node-voltage equation in matrix form is
or Ibus= Ybus Vbus (9.1)
where Ibus is the vector of the injected bus currents (i.e., external current sources). The current is positive when flowing towards the bus, and it is negative if flowing away from the bus. Vbus is the vector of bus voltages measured from the reference node (i.e., node voltages). Ybus is known as the bus admittance matrix. The diagonal element of each node is the sum of admittances connected to it. It is known as the self-admittance or driving point admittance, ie.,
The off-diagonal element is equal to the negative of the admittance between the nodes. It is known as the mutual admittance or transfer admittance, i.e.,
Yij = Yji = -yij
When the bus currents are known, (9.1) can be solved for the n bus voltages.
Vbus = Ybus-1 Ibus
The inverse of the bus admittance matrix is known as the bus impedance matrix Zbus. The admittance matrix obtained with one of the buses as reference is nonsingular. Otherwise the nodal matrix is singular.
Inspection of the bus admittance matrix reveals that the matrix is symmetric along the leading diagonal, and we need to store the upper triangular nodal admittance matrix only. In a typical power system network, each bus is connected to only a few nearby buses. Consequently, many off-diagonal elements are zero. Such a matrix is called sparse, and efficient numerical techniques can be applied to compute its inverse. By means of an appropriately ordered triangular decomposition, the inverse of a sparse matrix can be expressed as a product of sparse matrix factors, thereby giving an advantage in computational speed, storage and reduction of round-off errors. Based on above equations, the bus admittance matrix for the network in Figure 9.2 obtained by inspection is
Algorithms for Ybus in MATLAB.
A function called Y = ybus(zdata) is written for the formation of the bus admittance matrix.
zdata is the line data input and contains four columns.
The first two columns are the line bus numbers and the remaining columns contain the line resistance and reactance in per unit.
In the program, the line impedances are first converted to admittances.
Y is then initialized to zero.
In the first loop, the line data is searched, and the off-diagonal elements are entered. Finally, in a nested loop, line data is searched to find the elements connected to a bus, and the diagonal elements are thus formed.
MATLAB Program
Creating the Y bus matrix for a power system network involves performing load flow analysis and solving a set of equations based on the network topology and component parameters. The Y bus matrix represents the admittance (or impedance) values of the network elements and is used for power flow calculations and fault analysis. Here’s a high-level overview of the steps involved in programming the Y bus matrix calculation:
Define the network topology: Create a data structure to represent the network topology, including buses, branches, generators, loads, and other components. Each bus should have information such as voltage magnitude, voltage angle, and type (slack, PV, or PQ).
Read network data: Read the parameters of the network components from input files or databases. This includes the admittance (or impedance) values of transmission lines, transformers, generators, and loads.
Build the Y bus matrix: Initialize an empty Y bus matrix of appropriate size based on the number of buses in the network. The Y bus matrix is typically a square matrix where each element represents the admittance between two buses.
Populate the Y bus matrix: Traverse through the network topology and calculate the admittance values for each branch. Consider both series and shunt components of the branch to calculate the corresponding admittance values. Update the appropriate elements of the Y bus matrix based on the calculated admittances.
Handle special cases: Depending on the network configuration, you may need to handle special cases like transformer connections, tapped transformers, and shunt capacitor or reactor banks. Adjust the calculations and update the Y bus matrix accordingly.
Incorporate generator and load models: If your power system network includes generators and loads, you may need to include their models in the Y bus matrix calculations. Depending on the complexity of the models, additional equations and calculations might be required.
Perform load flow analysis: Once the Y bus matrix is constructed, you can use it to perform load flow analysis to determine the steady-state operating conditions of the power system. This involves solving a set of power flow equations iteratively until convergence is achieved.
Output the Y bus matrix: Finally, you can output or store the calculated Y bus matrix for further analysis or use in other power system studies.