---
title: "G-S algorithm with generator Q limits"
subject: "Power System Analysis II"
chapter: 2
key: "semester_5/power_system_analysis_ii:gs-algorithm-q-limits"
source: https://www.bctengineer.com/q/semester_5/power_system_analysis_ii/gs-algorithm-q-limits
site: BCT Engineering
---

# G-S algorithm with generator Q limits

Power System Analysis II · Chapter 2: Load Flow Analysis

- Asked in: 2078 Kartik, 10 marks; 2072 Chaitra, 8 marks (asked 2 times)
- Video: [Gauss Seidal Method Solved Problem -1 |  GS Method | Power flow Analysis | Power System Analysis](https://www.youtube.com/watch?v=2NRI6gZd_7o) — Simple n Easy Learning
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/power_system_analysis_ii/gs-algorithm-q-limits
- Whole chapter: https://www.bctengineer.com/md/semester_5/power_system_analysis_ii/chapter-2

## Question

Taking a suitable power system network, develop the algorithm for Gauss-Siedel technique for load analysis considering all three types of buses and generator reactive power limitation into account.

## Short answer

In Gauss-Seidel load flow, PQ buses are updated using specified P and Q. For a PV bus, compute Q; if within limits, update the voltage angle and reset magnitude to the specified value. If Q violates limits, fix Q at the limit and treat the bus as PQ (no magnitude reset). Acceleration factor (≈1.4–1.6) is applied, iteration continues until max voltage change is within tolerance, then slack power and line flows are calculated.

## Answer

The **Gauss–Seidel (G-S)** method solves the load-flow equations by rewriting each bus equation to give $V_i$ in terms of the other voltages and updating the buses one by one, using the newest values immediately.

#### Example network
Consider a 3-bus system: bus 1 slack ($V_1 = |V_1|\angle 0$ given), bus 2 PV (generator, $P_2$, $|V_2|$ given, $Q_{2,min} \le Q_2 \le Q_{2,max}$), bus 3 PQ (load, $P_3$, $Q_3$ given).

```text
   G1                      G2
   |  slack       PV bus   |
  (1)----------------------(2)
     \                    /
      \                  /
       ---------(3)------
                 |
               Load (PQ bus)
```

#### Basic G-S equations
From $I_i = \sum_k Y_{ik}V_k$ and $P_i - jQ_i = V_i^*I_i$:

$$
V_i^{(r+1)} = \frac{1}{Y_{ii}}\left[\frac{P_i - jQ_i}{V_i^{*(r)}} - \sum_{k=1}^{i-1}Y_{ik}V_k^{(r+1)} - \sum_{k=i+1}^{n}Y_{ik}V_k^{(r)}\right]
$$

$$
Q_i = -\operatorname{Im}\left\{V_i^*\sum_{k=1}^{n}Y_{ik}V_k\right\}
$$

#### Algorithm
1. **Read data** and form $Y_{bus}$. Net injections $P_i = P_{Gi} - P_{Di}$, $Q_i = Q_{Gi} - Q_{Di}$.
2. **Initial values (flat start):** slack $V_1$ as given; PV buses $|V_i| = |V_i|^{sp}$, $\delta_i = 0$; PQ buses $V_i = 1.0\angle 0^\circ$. Choose tolerance $\varepsilon$ and acceleration factor $\alpha$ (about 1.4–1.6). Set iteration count $r = 0$.
3. **For each bus $i = 2, \ldots, n$** (slack bus skipped):
   - **If PQ bus:** compute $V_i^{(r+1)}$ from the G-S equation with specified $P_i$, $Q_i$.
   - **If PV bus:**
     1. Compute $Q_i^{(r+1)} = -\operatorname{Im}\{V_i^{*(r)}\sum_k Y_{ik}V_k\}$ using the latest voltages.
     2. **Check Q limits:**
        - If $Q_{i,min} \le Q_i^{(r+1)} \le Q_{i,max}$: compute $V_i$ from the G-S equation with this $Q_i$, keep its angle $\delta_i$, and reset its magnitude to $|V_i|^{sp}$: $V_i = |V_i|^{sp}\angle\delta_i$.
        - If $Q_i > Q_{i,max}$: set $Q_i = Q_{i,max}$; if $Q_i < Q_{i,min}$: set $Q_i = Q_{i,min}$. Treat the bus as a **PQ bus** for this iteration: compute $V_i$ from the G-S equation and do **not** reset its magnitude.
   - **Acceleration** (PQ buses): $V_{i,acc}^{(r+1)} = V_i^{(r)} + \alpha\left(V_i^{(r+1)} - V_i^{(r)}\right)$.
   - Use the new $V_i$ immediately for the following buses.
4. **Convergence check:** $\Delta V_{max} = \max_i |V_i^{(r+1)} - V_i^{(r)}|$. If $\Delta V_{max} > \varepsilon$, set $r = r + 1$ and repeat step 3. (A bus that was switched to PQ may return to PV if its voltage later allows Q to come back within limits.)
5. **After convergence:**
   - Slack bus power: $P_1 - jQ_1 = V_1^*\sum_k Y_{1k}V_k$.
   - Q at PV buses.
   - Line flows: $S_{ik} = V_i\left[(V_i - V_k)y_{ik} + V_i\frac{y'_{ik}}{2}\right]^*$.
   - Losses: $S_{L,ik} = S_{ik} + S_{ki}$; total loss $= \sum S_{L}$.
6. Print results.

#### Flow chart (summary)
```text
 Form Ybus -> flat start -> r = 0
        |
        v
  for i = 2..n:
    PQ? -> new Vi (G-S), accelerate
    PV? -> find Qi -> within limits?
           yes: new Vi, reset |Vi|
           no : Qi = limit, treat as PQ
        |
        v
  max|dV| < eps ? --no--> r = r+1, repeat
        | yes
        v
  slack power, line flows, losses
```

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. In G-S, the new V_i uses:
   A. Only old values
   B. Newest values of earlier buses immediately
   C. Values from the slack only
   D. Jacobian inverse
   Answer: B. Updated voltages are used immediately for later buses. (Key point: G-S update)

2. If Q at a PV bus is within limits, after computing V_i:
   A. Keep both magnitude and angle
   B. Keep angle and reset magnitude to specified |V|
   C. Reset angle to zero
   D. Treat as PQ
   Answer: B. The magnitude is reset to the specified value, the angle is kept. (Key point: PV bus within limits)

3. If Q exceeds Q_max, then:
   A. Set Q = Qmax, treat as PQ, don't reset magnitude
   B. Stop
   C. Make it slack
   D. Set P = 0
   Answer: A. The bus acts as PQ at the limit. (Key point: PV bus out of limits)

4. Q at PV bus is computed from:
   A. Q = -Im{V* sum Y V}
   B. Q = Re{V* I}
   C. Q = |V|^2
   D. Q = P tan
   Answer: A. Q_i = -Im{V_i* sum Y_ik V_k}. (Key point: PV bus Q)

## Related in Power System Analysis II

- [Reactive power injection and generation limits](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Areactive-power-injection-limits) — Power System Analysis II, chapter 1
- [Generator reactive power at constant terminal voltage](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Agenerator-reactive-power-infinite-bus) — Power System Analysis II, chapter 1
- [3-bus load flow with Q limits (cut off)](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Aload-flow-reference-load-generator-bus) — Power System Analysis II, chapter 2
- [N-R load flow corrections and algorithm](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Anr-load-flow-derivation) — Power System Analysis II, chapter 2, asked 2×
- [Node equations and Ybus, three-source network](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Aybus-node-equations-three-sources) — Power System Analysis II, chapter 1, asked 2×
- [Ybus for network with three sources](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Aybus-three-sources-2080) — Power System Analysis II, chapter 1

## Related in other subjects

- [Generator and load complex power conventions](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3Agenerator-load-complex-power-convention) — Power System Analysis I, chapter 3
- [Charging reactive power of line at no load](https://www.bctengineer.com/question.md?key=semester_8%2Fhigh_voltage_engineering%3Acharging-reactive-power-no-load) — High Voltage Engineering, chapter 3, asked 2×
- [Per unit circuit of three-generator system, 30 MVA base](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3Apu-circuit-30mva-g1-g2-g3) — Power System Analysis I, chapter 3
- [Typical power system network and components](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3Atypical-power-system-network-components) — Power System Analysis I, chapter 1
