Software Oriented

Load Flow Analysis using Gauss-Seidel Iterative Method

Aim

To perform Load Flow Analysis of a given power system using the Gauss-Seidel Iterative Method.

Apparatus & Software

Sl. No.Apparatus / SoftwareTechnical SpecificationQuantities
1MATLABR2023 or compatible1

Theory

Load flow analysis is an essential tool in power system engineering. It helps determine the steady-state operating conditions of an electrical network. This analysis gives the voltage magnitude and phase angle at each bus, along with the real and reactive power flows through transmission lines. Among the various methods, the Gauss-Seidel iterative method is popular because it is simple and easy to implement, especially for small to medium-sized power systems.
The Gauss-Seidel methodgauss-seidel methodAn iterative numerical method for solving nonlinear algebraic equations, such as power flow. It updates one variable at a time using the latest available values, making it simple but slow to converge. starts by assuming initial voltage values for all non-slack buses. It then updates the bus voltages using the network equations until the solution stabilizes within a set tolerance. The method treats the system as a series of linear equations based on bus admittances. This allows for separate updates for PQ and PV buses while keeping the slack busslack busA reference bus in load flow studies where the voltage magnitude and phase angle are specified, and it absorbs or supplies the necessary active and reactive power to balance the system. voltage fixed. Its iterative approach refines both bus voltages and line flows at each step. This process ultimately provides a consistent and accurate representation of the system's steady-state operation.
Y-Bus Matrix Relation
The Y-Bus matrix relation is given by:
[I1I2In]=[Y11Y12Y1nY21Y22Y2nYn1Yn2Ynn][V1V2Vn]\begin{bmatrix} I_1 \\ I_2 \\ \vdots \\ I_n \end{bmatrix} = \begin{bmatrix} Y_{11} & Y_{12} & \cdots & Y_{1n} \\ Y_{21} & Y_{22} & \cdots & Y_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ Y_{n1} & Y_{n2} & \cdots & Y_{nn} \end{bmatrix} \begin{bmatrix} V_1 \\ V_2 \\ \vdots \\ V_n \end{bmatrix}
Bus Current Equations
The bus current equations are given by:
Ii=k=1nYikVkI_i = \sum_{k=1}^{n} Y_{ik} V_k
Ii=YiiVi+k=1kinYikVkI_i = Y_{ii} V_i + \sum_{\substack{k=1 \\ k \neq i}}^{n} Y_{ik} V_k
Vi=1Yii[Iik=1kinYikVk]V_i = \frac{1}{Y_{ii}} \left[ I_i - \sum_{\substack{k=1 \\ k \neq i}}^{n} Y_{ik} V_k \right]

Pre-Lab / Circuit Diagram (Not Applicable)

This section is not required for this experiment.

Procedure

Step 1: Identify Bus Types
Determine the type of each bus in the system: Slack, PV, or PQ.
Step 2: Form Y-Bus and Initialize Voltages
  • Form the Y-Bus matrix for the system.
  • Slack bus: voltage magnitude and angle fixed.
  • PV and PQ buses: start with 1.0 + j0.0 p.u.
Step 3: Iterative Update of Bus Voltages
For each iteration, perform the following:
  • PQ buspq busA load bus where the active (P) and reactive (Q) power are known, and the voltage magnitude and phase angle are computed during load flow analysis.: Update voltage using Gauss-Seidel formula.
  • PV buspv busA generator bus where the active power (P) and voltage magnitude (V) are specified, and the reactive power (Q) and voltage phase angle are computed.: Compute reactive power from current voltages, then update voltage angle while keeping voltage magnitude |Vk| fixed.
  • Slack bus: No update; voltage remains fixed.
PQ bus voltage update:
PV bus reactive power computation:
Step 4: Convergence Check
Compute voltage difference for all buses except Slack:
Compute maximum error:
Step 5: Iteration Control
If e(k) ≤ (tolerance), stop and print results. Otherwise, increment k = k + 1 and return to Step 3.
Step 6: Compute Power Flows
After convergence, compute real and reactive power flow in each line using the voltage values obtained and the equations given in the Formulas Used section.

Simulation / Execution

MATLAB Code — Problem 1 (4-Bus System)
MATLAB Code for Problem 1 (Part 1)

MATLAB Code for Problem 1 (Part 1)

MATLAB Code for Problem 1 (Part 2)

MATLAB Code for Problem 1 (Part 2)

MATLAB Code — Problem 2 (4-Bus System with Bus-Pair Admittances)
MATLAB Code for Problem 2 (Part 1)

MATLAB Code for Problem 2 (Part 1)

MATLAB Code for Problem 2 (Part 2)

MATLAB Code for Problem 2 (Part 2)

MATLAB Code — Problem 3 (Three-Bus System with Line Flows)
MATLAB Code for Problem 3 (Part 1)

MATLAB Code for Problem 3 (Part 1)

MATLAB Code for Problem 3 (Part 2)

MATLAB Code for Problem 3 (Part 2)

MATLAB Code for Problem 3 (Part 3)

MATLAB Code for Problem 3 (Part 3)

Observations

Problem 1 — Output after First Iteration
Output after first iteration (Problem 1)

Output after first iteration (Problem 1)

Problem 2 — Final Converged Results
Final Converged Results (Problem 2)

Final Converged Results (Problem 2)

Problem 3 — Final Converged Results (Bus Voltages, Line Flows, and Losses)
Final Converged Results (Problem 3)

Final Converged Results — Bus Voltages, Line Flows, and Losses (Problem 3)

Calculations

Formulas Used
Vk=VkδkV_k = |V_k| \angle \delta_k
Si=Vik=1nYikVkS_i^* = V_i^* \sum_{k=1}^{n} Y_{ik} V_k
PijQi=Viδik=1nYikθVkδkP_i - jQ_i = |V_i| \angle{-\delta_i} \sum_{k=1}^{n} |Y_{ik}| \angle \theta^* |V_k| \angle \delta_k
PijQi=k=1nViVkYik(δk+θkδi)P_i - jQ_i = \sum_{k=1}^{n} |V_i||V_k||Y_{ik}| \angle (\delta_k + \theta_k - \delta_i)
Pi=k=1nViVkYikcos(θk+δkδi)P_i = \sum_{k=1}^{n} |V_i||V_k||Y_{ik}| \cos(\theta_k + \delta_k - \delta_i)
Qi=k=1nViVkYiksin(θk+δkδi)-Q_i = \sum_{k=1}^{n} |V_i||V_k||Y_{ik}| \sin(\theta_k + \delta_k - \delta_i)
Vk=1Ykk[PkjQkVki=1iknYkiVi]V_k = \frac{1}{Y_{kk}} \left[ \frac{P_k - jQ_k}{V_k^*} - \sum_{\substack{i=1 \\ i \neq k}}^{n} Y_{ki} V_i \right]
where Pk, Qk are the active and reactive power at bus k; Ykk is the self-admittance of bus k; Yki is the mutual admittance between bus k and bus i; and Vk is the voltage at bus k.
Solved Problems
Problem 1
Question: Consider a 4-bus power system with the following line impedances: Z12 = j0.1 pu, Z23 = j0.2 pu, Z34 = j0.25 pu, Z14 = j0.3 pu. The bus data is specified as:
  • Bus 1 (Slack Bus): V1 = 1.06∠0°
  • Bus 2 (Generator Bus): P2 = 0.4 pu, Q2 = 0.2 pu, |V2| = 1.04
  • Bus 3 (PQ Bus): P3 = −0.3 pu, Q3 = −0.2 pu
  • Bus 4 (PQ Bus): P4 = −0.5 pu, Q4 = −0.4 pu
Apply the Gauss-Seidel iterative method and determine the bus voltages V2, V3, V4 after the first iteration.
Solution: A MATLAB code was implemented considering the given line impedances and bus data, updating the bus voltages step by step using the Gauss-Seidel algorithm. Refer to Figure 1 for the complete MATLAB code and Figure 2 for the output.
Problem 2
Question: The bus-pair admittances and bus data are provided below:
Bus-PairAdmittance (p.u.)
1 – 22.0 – j8.0
1 – 31.0 – j4.0
2 – 30.666 – j2.664
2 – 41.0 – j4.0
3 – 42.0 – j8.0
Bus No.P (p.u.)Q (p.u.)V (p.u.)Remarks
11.06∠0°Slack bus
2+0.50+0.201.0 + j0.0PQ bus
3+0.40+0.301.0 + j0.0PQ bus
4+0.30+0.101.0 + j0.0PQ bus
Solution: A MATLAB code was implemented considering the given bus-pair admittances and bus data, updating the bus voltages iteratively using the Gauss-Seidel algorithm. Refer to Figure 3 for the complete MATLAB code and Figure 4 for the final converged results.
Problem 3
Question: A simple three-bus power system has generators at buses 1 and 3. The voltage magnitude at bus 1 is 1.05 pu. The voltage magnitude at bus 3 is fixed at 1.04 pu with a real power generation of 200 MW. A load of 400 MW and 250 Mvar is connected at bus 2. Line impedances are given in per unit on a 100 MVA base, and line charging susceptances are neglected. Determine the power flow solution using the Gauss-Seidel method, including line flows and line losses.
Single-line diagram for Problem 3

Single-line diagram for Problem 3

Solution: A MATLAB code was implemented considering the given line impedances and bus data, updating the bus voltages step by step using the Gauss-Seidel algorithm. After convergence, line flows and losses were computed. Refer to Figure 6 and Figure 7 for the complete MATLAB code and Figure 8 for the final converged results including bus voltages, line flows, and losses.

Results & Analysis

The Gauss-Seidel iterative method was successfully applied to all three problems. The results are summarized below.
ProblemNetworkBusesIterationsKey Result
Problem 14-Bus System41 (first iteration only)V2 = 1.0400∠1.43°, V3 = 1.0000∠−1.08°, V4 = 0.9758∠−4.61°
Problem 24-Bus System48 (tol = 0.001)V1 = 1.0600∠0.00°, V2 = 1.1118∠3.65°, V3 = 1.1334∠4.48°, V4 = 1.1381∠5.17°
Problem 33-Bus System33 (tol = 0.001)V1 = 1.05000∠0.000°, V2 = 0.97168∠−2.297°, V3 = 1.04000∠0.164°; Total loss: P = 18.33 MW, Q = 36.78 Mvar
The results demonstrate that the Gauss-Seidel method converges reliably for small to medium-sized networks. The number of iterations required depends on the network size, initial guess, and tolerance setting. For Problem 3, the line flow analysis confirmed that bus 1 (slack) supplies the deficit real and reactive power, and the total system losses were computed accurately from the converged bus voltages.

Conclusion

In this lab, we successfully conducted Load Flow Analysis on various power systems using the Gauss-Seidel Iterative Method. We began by studying the theoretical background, including Y-Bus matrix formation, current expressions, and the iterative process for different types of buses. We used MATLAB to solve multiple problems, which allowed us to observe how bus voltages converge and to calculate real and reactive power flows in the system. This experience improved our understanding of how bus voltages change over time and how system data influences the overall solution.
We also applied the method to different example systems, including 4-bus and 3-bus networks, and verified our results with MATLAB outputs. We noticed that initial guesses, bus types, and convergence criteria play a crucial role in achieving accurate solutions. The practical exercises reinforced the theories we learned, and the graphical representation of results made interpreting the power flow solutions easier. Overall, the lab offered a well-rounded experience in both the analytical and computational sides of power system load flow studies.

Post-Lab / Viva Voce

  1. Q: What is load flow analysis and why is it important in power system engineering?

    A: Load flow analysis (also called power flow analysis) is the steady-state study of an electrical power network. It determines the voltage magnitude and phase angle at each bus, as well as the real and reactive power flows through every transmission line, for a given set of generation and load conditions. It is important because it provides the operating conditions of the network, which are needed for system planning, expansion, and security assessment. Without load flow results, it is impossible to determine whether line loadings, bus voltages, and transformer tap settings are within acceptable limits.
  2. Q: What are the three types of buses in a load flow problem and what quantities are specified for each?

    A: The three bus types are: (1) Slack Bus (Reference Bus) — voltage magnitude |V| and angle δ are specified (usually |V| = 1.0 pu, δ = 0°); real and reactive power are unknowns that balance the system. (2) PV Bus (Generator Bus) — real power P and voltage magnitude |V| are specified; reactive power Q and voltage angle δ are unknowns. (3) PQ Bus (Load Bus) — real power P and reactive power Q are specified; voltage magnitude |V| and angle δ are unknowns.
  3. Q: Explain the Gauss-Seidel iterative update formula for a PQ bus.

    A: For a PQ bus k, the voltage is updated at each iteration using:
  4. Q: How is a PV bus handled differently from a PQ bus in the Gauss-Seidel method?

    A: For a PV bus, the voltage magnitude |Vk| is fixed and must not change. The Gauss-Seidel update is first applied to obtain a temporary complex voltage Vk_temp (as if it were a PQ bus, using the scheduled real power P and computing reactive power Q from the current iteration). The updated voltage is then rescaled to enforce the fixed magnitude: Vk_new = |Vk_specified| × (Vk_temp / |Vk_temp|). This preserves the voltage angle update from the iterative formula while maintaining the specified voltage magnitude.
  5. Q: What is the convergence criterion used in the Gauss-Seidel method and what factors affect convergence?

    A: Convergence is checked by computing the maximum absolute voltage difference between successive iterations across all non-slack buses: e(k) = max(|Vi(k) − Vi(k−1)|) for i = 2, 3, …, n. The iteration stops when e(k) ≤ tolerance. Factors that affect convergence include: the choice of tolerance (tighter tolerance requires more iterations), the quality of the initial guess (flat start at 1.0∠0° is standard), the size and connectivity of the network (larger or more heavily loaded systems may converge more slowly), and the presence of PV buses (which require the magnitude-correction step). The Gauss-Seidel method may fail to converge for heavily loaded or ill-conditioned systems.
  6. Q: How are line flows and line losses computed after the load flow solution has converged?

    A: Once the bus voltages have converged, the complex power flow from bus i to bus j through a line of admittance y = 1/Z is computed as:

References & Resources (Not Applicable)

This section is not required for this experiment.