Skip to main content

G-S algorithm with generator Q limits

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.

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.

The Gauss–Seidel (G-S) method solves the load-flow equations by rewriting each bus equation to give ViV_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 (V1=∣V1∣∠0V_1 = |V_1|\angle 0 given), bus 2 PV (generator, P2P_2, ∣V2∣|V_2| given, Q2,min≤Q2≤Q2,maxQ_{2,min} \le Q_2 \le Q_{2,max}), bus 3 PQ (load, P3P_3, Q3Q_3 given).

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

Basic G-S equations

From Ii=∑kYikVkI_i = \sum_k Y_{ik}V_k and Pi−jQi=Vi∗IiP_i - jQ_i = V_i^*I_i:

Vi(r+1)=1Yii[Pi−jQiVi∗(r)−∑k=1i−1YikVk(r+1)−∑k=i+1nYikVk(r)]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] Qi=−Im⁡{Vi∗∑k=1nYikVk}Q_i = -\operatorname{Im}\left\{V_i^*\sum_{k=1}^{n}Y_{ik}V_k\right\}

Algorithm

  1. Read data and form YbusY_{bus}. Net injections Pi=PGi−PDiP_i = P_{Gi} - P_{Di}, Qi=QGi−QDiQ_i = Q_{Gi} - Q_{Di}.
  2. Initial values (flat start): slack V1V_1 as given; PV buses ∣Vi∣=∣Vi∣sp|V_i| = |V_i|^{sp}, δi=0\delta_i = 0; PQ buses Vi=1.0∠0∘V_i = 1.0\angle 0^\circ. Choose tolerance ε\varepsilon and acceleration factor α\alpha (about 1.4–1.6). Set iteration count r=0r = 0.
  3. For each bus i=2,…,ni = 2, \ldots, n (slack bus skipped):
    • If PQ bus: compute Vi(r+1)V_i^{(r+1)} from the G-S equation with specified PiP_i, QiQ_i.
    • If PV bus:
      1. Compute Qi(r+1)=−Im⁡{Vi∗(r)∑kYikVk}Q_i^{(r+1)} = -\operatorname{Im}\{V_i^{*(r)}\sum_k Y_{ik}V_k\} using the latest voltages.
      2. Check Q limits:
        • If Qi,min≤Qi(r+1)≤Qi,maxQ_{i,min} \le Q_i^{(r+1)} \le Q_{i,max}: compute ViV_i from the G-S equation with this QiQ_i, keep its angle δi\delta_i, and reset its magnitude to ∣Vi∣sp|V_i|^{sp}: Vi=∣Vi∣sp∠δiV_i = |V_i|^{sp}\angle\delta_i.
        • If Qi>Qi,maxQ_i > Q_{i,max}: set Qi=Qi,maxQ_i = Q_{i,max}; if Qi<Qi,minQ_i < Q_{i,min}: set Qi=Qi,minQ_i = Q_{i,min}. Treat the bus as a PQ bus for this iteration: compute ViV_i from the G-S equation and do not reset its magnitude.
    • Acceleration (PQ buses): Vi,acc(r+1)=Vi(r)+α(Vi(r+1)−Vi(r))V_{i,acc}^{(r+1)} = V_i^{(r)} + \alpha\left(V_i^{(r+1)} - V_i^{(r)}\right).
    • Use the new ViV_i immediately for the following buses.
  4. Convergence check: ΔVmax=max⁡i∣Vi(r+1)−Vi(r)∣\Delta V_{max} = \max_i |V_i^{(r+1)} - V_i^{(r)}|. If ΔVmax>ε\Delta V_{max} > \varepsilon, set r=r+1r = 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: P1−jQ1=V1∗∑kY1kVkP_1 - jQ_1 = V_1^*\sum_k Y_{1k}V_k.
    • Q at PV buses.
    • Line flows: Sik=Vi[(Vi−Vk)yik+Viyik′2]∗S_{ik} = V_i\left[(V_i - V_k)y_{ik} + V_i\frac{y'_{ik}}{2}\right]^*.
    • Losses: SL,ik=Sik+SkiS_{L,ik} = S_{ik} + S_{ki}; total loss =∑SL= \sum S_{L}.
  6. Print results.

Flow chart (summary)

 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

✓ Answer checked by Claude Sonnet 5.5

All Power System Analysis II chapter 2 questions →