Skip to main content

N-R load flow corrections and algorithm

Short answer

Newton-Raphson linearises P and Q equations to find corrections for voltage angles at all non-slack buses and magnitudes at PQ buses. The Jacobian comprises J1=∂P/∂δ, J2=∂P/∂|V|, J3=∂Q/∂δ, J4=∂Q/∂|V|. Algorithm: form Ybus, flat start, compute power mismatches, build Jacobian, solve for Δδ and Δ|V|, update, repeat until mismatches are below tolerance, then compute slack power and line flows.

Starting from Bus injected real and reactive Power expressions as Pk = Σ(n=1 to N) |Vk Vn Ykn| cos(θkn + δn − δk) and Qk = −Σ(n=1 to N) |Vk Vn Ykn| sin(θkn + δn − δk), where all notations have usual meanings, obtain the general expression for computing bus voltage angle and magnitude corrections to be added to the initial guesses by N-R method. Also develop an algorithm (steps) to solve load flow using N-R method, clearly defining the elements of the Jacobian matrix.

The Newton–Raphson (N-R) method linearises the nonlinear power equations about the current estimate by a first-order Taylor series and solves for the corrections in bus voltage angles and magnitudes, repeating until the power mismatches vanish.

Power equations

With Ykn=∣Ykn∣∠θknY_{kn} = |Y_{kn}|\angle\theta_{kn} and Vk=∣Vk∣∠δkV_k = |V_k|\angle\delta_k:

Pk=∑n=1N∣Vk∣∣Vn∣∣Ykn∣cos⁡(θkn+δn−δk)Qk=−∑n=1N∣Vk∣∣Vn∣∣Ykn∣sin⁡(θkn+δn−δk)\begin{aligned} P_k &= \sum_{n=1}^{N}|V_k||V_n||Y_{kn}|\cos(\theta_{kn} + \delta_n - \delta_k) \\ Q_k &= -\sum_{n=1}^{N}|V_k||V_n||Y_{kn}|\sin(\theta_{kn} + \delta_n - \delta_k) \end{aligned}

So PkP_k and QkQ_k are functions of all δ\delta and ∣V∣|V|.

Unknowns and equations

Let bus 1 be the slack bus, buses 2…m+12 \ldots m+1 PV buses (mm of them), and the rest PQ buses.

  • Unknowns: δk\delta_k at all (N−1)(N-1) non-slack buses; ∣Vk∣|V_k| at the (N−1−m)(N-1-m) PQ buses.
  • Equations: PkP_k at the (N−1)(N-1) non-slack buses; QkQ_k at the (N−1−m)(N-1-m) PQ buses.
  • Total: 2N−2−m2N - 2 - m equations and unknowns.

Linearisation (Taylor series)

Let δk(0)\delta_k^{(0)}, ∣Vk∣(0)|V_k|^{(0)} be initial estimates, and Δδk\Delta\delta_k, Δ∣Vk∣\Delta|V_k| the corrections. Expanding PkP_k about the estimate and neglecting higher-order terms:

Pksp=Pk(0)+∑n=2N∂Pk∂δnΔδn+∑n∈PQ∂Pk∂∣Vn∣Δ∣Vn∣P_k^{sp} = P_k^{(0)} + \sum_{n=2}^{N}\frac{\partial P_k}{\partial \delta_n}\Delta\delta_n + \sum_{n \in PQ}\frac{\partial P_k}{\partial |V_n|}\Delta|V_n|

and similarly for QkQ_k. Writing the mismatches ΔPk=Pksp−Pk(0)\Delta P_k = P_k^{sp} - P_k^{(0)} and ΔQk=Qksp−Qk(0)\Delta Q_k = Q_k^{sp} - Q_k^{(0)}:

[ΔPΔQ]=[J1J2J3J4][ΔδΔ∣V∣],J1=∂P∂δ, J2=∂P∂∣V∣, J3=∂Q∂δ, J4=∂Q∂∣V∣\begin{bmatrix} \Delta P \\ \Delta Q \end{bmatrix} = \begin{bmatrix} J_1 & J_2 \\ J_3 & J_4 \end{bmatrix} \begin{bmatrix} \Delta\delta \\ \Delta|V| \end{bmatrix}, \quad J_1 = \frac{\partial P}{\partial \delta},\ J_2 = \frac{\partial P}{\partial |V|},\ J_3 = \frac{\partial Q}{\partial \delta},\ J_4 = \frac{\partial Q}{\partial |V|}

General expression for corrections

[ΔδΔ∣V∣](r)=[J(r)]−1[ΔPΔQ](r),δk(r+1)=δk(r)+Δδk(r)∣Vk∣(r+1)=∣Vk∣(r)+Δ∣Vk∣(r)\begin{bmatrix} \Delta\delta \\ \Delta|V| \end{bmatrix}^{(r)} = [J^{(r)}]^{-1} \begin{bmatrix} \Delta P \\ \Delta Q \end{bmatrix}^{(r)}, \qquad \begin{aligned} \delta_k^{(r+1)} &= \delta_k^{(r)} + \Delta\delta_k^{(r)} \\ |V_k|^{(r+1)} &= |V_k|^{(r)} + \Delta|V_k|^{(r)} \end{aligned}

In practice the linear system is solved by triangular factorisation (Gaussian elimination), not by explicit inversion.

Elements of the Jacobian

Differentiating the given expressions (write ϕkn=θkn+δn−δk\phi_{kn} = \theta_{kn} + \delta_n - \delta_k):

J1J_1 (∂P/∂δ\partial P/\partial\delta), order (N−1)×(N−1)(N-1)\times(N-1):

∂Pk∂δk=∑n≠k∣Vk∣∣Vn∣∣Ykn∣sin⁡ϕkn,∂Pk∂δn=−∣Vk∣∣Vn∣∣Ykn∣sin⁡ϕkn (n≠k)\frac{\partial P_k}{\partial \delta_k} = \sum_{n \ne k}|V_k||V_n||Y_{kn}|\sin\phi_{kn},\qquad \frac{\partial P_k}{\partial \delta_n} = -|V_k||V_n||Y_{kn}|\sin\phi_{kn}\ (n \ne k)

J2J_2 (∂P/∂∣V∣\partial P/\partial|V|), order (N−1)×(N−1−m)(N-1)\times(N-1-m):

∂Pk∂∣Vk∣=2∣Vk∣∣Ykk∣cos⁡θkk+∑n≠k∣Vn∣∣Ykn∣cos⁡ϕkn,∂Pk∂∣Vn∣=∣Vk∣∣Ykn∣cos⁡ϕkn\frac{\partial P_k}{\partial |V_k|} = 2|V_k||Y_{kk}|\cos\theta_{kk} + \sum_{n \ne k}|V_n||Y_{kn}|\cos\phi_{kn},\qquad \frac{\partial P_k}{\partial |V_n|} = |V_k||Y_{kn}|\cos\phi_{kn}

J3J_3 (∂Q/∂δ\partial Q/\partial\delta), order (N−1−m)×(N−1)(N-1-m)\times(N-1):

∂Qk∂δk=∑n≠k∣Vk∣∣Vn∣∣Ykn∣cos⁡ϕkn,∂Qk∂δn=−∣Vk∣∣Vn∣∣Ykn∣cos⁡ϕkn\frac{\partial Q_k}{\partial \delta_k} = \sum_{n \ne k}|V_k||V_n||Y_{kn}|\cos\phi_{kn},\qquad \frac{\partial Q_k}{\partial \delta_n} = -|V_k||V_n||Y_{kn}|\cos\phi_{kn}

J4J_4 (∂Q/∂∣V∣\partial Q/\partial|V|), order (N−1−m)×(N−1−m)(N-1-m)\times(N-1-m):

∂Qk∂∣Vk∣=−2∣Vk∣∣Ykk∣sin⁡θkk−∑n≠k∣Vn∣∣Ykn∣sin⁡ϕkn,∂Qk∂∣Vn∣=−∣Vk∣∣Ykn∣sin⁡ϕkn\frac{\partial Q_k}{\partial |V_k|} = -2|V_k||Y_{kk}|\sin\theta_{kk} - \sum_{n \ne k}|V_n||Y_{kn}|\sin\phi_{kn},\qquad \frac{\partial Q_k}{\partial |V_n|} = -|V_k||Y_{kn}|\sin\phi_{kn}

Off-diagonal elements are zero where Ykn=0Y_{kn} = 0, so the Jacobian is as sparse as YbusY_{bus}. It is not symmetric and must be recomputed every iteration.

N-R algorithm

  1. Read bus and line data; form YbusY_{bus} and express its elements in polar form.
  2. Flat start: δk(0)=0\delta_k^{(0)} = 0 at all non-slack buses; ∣Vk∣(0)=1.0|V_k|^{(0)} = 1.0 at PQ buses; ∣Vk∣=∣Vk∣sp|V_k| = |V_k|^{sp} at PV buses. Set r=0r = 0, tolerance ε\varepsilon.
  3. Compute Pk(r)P_k^{(r)} (non-slack buses) and Qk(r)Q_k^{(r)} (PQ buses) from the power equations.
  4. For PV buses, compute Qk(r)Q_k^{(r)} and check limits. If violated, fix QkQ_k at the limit and treat the bus as a PQ bus (its ∣Vk∣|V_k| becomes an unknown, adding one row/column).
  5. Compute mismatches ΔPk(r)=Pksp−Pk(r)\Delta P_k^{(r)} = P_k^{sp} - P_k^{(r)}, ΔQk(r)=Qksp−Qk(r)\Delta Q_k^{(r)} = Q_k^{sp} - Q_k^{(r)}.
  6. If max⁡(∣ΔP∣,∣ΔQ∣)<ε\max(|\Delta P|, |\Delta Q|) < \varepsilon, go to step 10.
  7. Evaluate the Jacobian elements J1J_1–J4J_4 with the present δ\delta and ∣V∣|V|.
  8. Solve [J][Δδ; Δ∣V∣]=[ΔP; ΔQ][J][\Delta\delta;\ \Delta|V|] = [\Delta P;\ \Delta Q] for the corrections.
  9. Update δk(r+1)=δk(r)+Δδk\delta_k^{(r+1)} = \delta_k^{(r)} + \Delta\delta_k, ∣Vk∣(r+1)=∣Vk∣(r)+Δ∣Vk∣|V_k|^{(r+1)} = |V_k|^{(r)} + \Delta|V_k|; set r=r+1r = r + 1 and go to step 3.
  10. Compute slack bus power, PV-bus reactive powers, line flows SikS_{ik} and losses; print results.
 Ybus -> flat start -> P,Q calc -> dP, dQ
                         ^             |
                         |      converged? --yes--> flows
                         |             | no
   update d,|V| <- solve J*dx <- form Jacobian

N-R converges quadratically, usually in 3–5 iterations regardless of system size.

✓ Answer checked by Claude Sonnet 5.5

All Power System Analysis II chapter 2 questions →