---
title: "N-R load flow corrections and algorithm"
subject: "Power System Analysis II"
chapter: 2
key: "semester_5/power_system_analysis_ii:nr-load-flow-derivation"
source: https://www.bctengineer.com/q/semester_5/power_system_analysis_ii/nr-load-flow-derivation
site: BCT Engineering
---

# N-R load flow corrections and algorithm

Power System Analysis II · Chapter 2: Load Flow Analysis

- Asked in: 2078 Bhadra, 16 marks; 2069 Chaitra, 10 marks (asked 2 times)
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/power_system_analysis_ii/nr-load-flow-derivation
- Whole chapter: https://www.bctengineer.com/md/semester_5/power_system_analysis_ii/chapter-2

## Question

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.

## 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.

## Answer

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 $Y_{kn} = |Y_{kn}|\angle\theta_{kn}$ and $V_k = |V_k|\angle\delta_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 $P_k$ and $Q_k$ are functions of all $\delta$ and $|V|$.

#### Unknowns and equations
Let bus 1 be the slack bus, buses $2 \ldots m+1$ PV buses ($m$ of them), and the rest PQ buses.
- Unknowns: $\delta_k$ at all $(N-1)$ non-slack buses; $|V_k|$ at the $(N-1-m)$ PQ buses.
- Equations: $P_k$ at the $(N-1)$ non-slack buses; $Q_k$ at the $(N-1-m)$ PQ buses.
- Total: $2N - 2 - m$ equations and unknowns.

#### Linearisation (Taylor series)
Let $\delta_k^{(0)}$, $|V_k|^{(0)}$ be initial estimates, and $\Delta\delta_k$, $\Delta|V_k|$ the corrections. Expanding $P_k$ about the estimate and neglecting higher-order terms:

$$
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 $Q_k$. Writing the mismatches $\Delta P_k = P_k^{sp} - P_k^{(0)}$ and $\Delta Q_k = Q_k^{sp} - Q_k^{(0)}$:

$$
\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
$$
\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 $\phi_{kn} = \theta_{kn} + \delta_n - \delta_k$):

**$J_1$ ($\partial P/\partial\delta$), order $(N-1)\times(N-1)$:**

$$
\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)
$$

**$J_2$ ($\partial P/\partial|V|$), order $(N-1)\times(N-1-m)$:**

$$
\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}
$$

**$J_3$ ($\partial Q/\partial\delta$), order $(N-1-m)\times(N-1)$:**

$$
\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}
$$

**$J_4$ ($\partial Q/\partial|V|$), order $(N-1-m)\times(N-1-m)$:**

$$
\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 $Y_{kn} = 0$, so the Jacobian is as sparse as $Y_{bus}$. It is not symmetric and must be recomputed every iteration.

#### N-R algorithm
1. Read bus and line data; form $Y_{bus}$ and express its elements in polar form.
2. Flat start: $\delta_k^{(0)} = 0$ at all non-slack buses; $|V_k|^{(0)} = 1.0$ at PQ buses; $|V_k| = |V_k|^{sp}$ at PV buses. Set $r = 0$, tolerance $\varepsilon$.
3. Compute $P_k^{(r)}$ (non-slack buses) and $Q_k^{(r)}$ (PQ buses) from the power equations.
4. For PV buses, compute $Q_k^{(r)}$ and check limits. If violated, fix $Q_k$ at the limit and treat the bus as a PQ bus (its $|V_k|$ becomes an unknown, adding one row/column).
5. Compute mismatches $\Delta P_k^{(r)} = P_k^{sp} - P_k^{(r)}$, $\Delta Q_k^{(r)} = Q_k^{sp} - Q_k^{(r)}$.
6. If $\max(|\Delta P|, |\Delta Q|) < \varepsilon$, go to step 10.
7. Evaluate the Jacobian elements $J_1$–$J_4$ with the present $\delta$ and $|V|$.
8. Solve $[J][\Delta\delta;\ \Delta|V|] = [\Delta P;\ \Delta Q]$ for the corrections.
9. Update $\delta_k^{(r+1)} = \delta_k^{(r)} + \Delta\delta_k$, $|V_k|^{(r+1)} = |V_k|^{(r)} + \Delta|V_k|$; set $r = r + 1$ and go to step 3.
10. Compute slack bus power, PV-bus reactive powers, line flows $S_{ik}$ and losses; print results.

```text
 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.

## Check yourself

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

1. For an N-bus system with m PV buses, how many P and Q equations are used in the N-R method?
   A. N P-equations and N Q-equations
   B. (N-1) P-equations and (N-1-m) Q-equations
   C. (N-1-m) P-equations and (N-1) Q-equations
   D. (N-1) P-equations and m Q-equations
   Answer: B. P is written at every non-slack bus (N-1) and Q only at PQ buses (N-1-m), since PV buses have |V| specified. (Key point: Unknowns and equations count)

2. How does the N-R method obtain the relation between mismatches and corrections?
   A. By expanding P and Q in a first-order Taylor series and neglecting higher-order terms
   B. By substituting the latest voltages into the Ybus equation one bus at a time
   C. By assuming P depends only on angles and Q only on magnitudes
   D. By forming the inverse of Ybus once and reusing it
   Answer: A. The N-R method linearises the power equations about the current estimate with a first-order Taylor series, giving [dP;dQ] = [J][d delta; d|V|]. (Key point: Linearisation by Taylor series)

3. In the Jacobian [J1 J2; J3 J4], what does J2 represent?
   A. dP/d delta
   B. dQ/d delta
   C. dP/d|V|
   D. dQ/d|V|
   Answer: C. J1 = dP/d delta, J2 = dP/d|V|, J3 = dQ/d delta and J4 = dQ/d|V|. (Key point: Jacobian structure)

4. Which statement about the N-R Jacobian and the update is correct?
   A. It is symmetric and is formed once and reused every iteration
   B. It is as sparse as Ybus, not symmetric, and recomputed every iteration
   C. It is dense and constant, so only forward/back substitution is needed
   D. It is only needed to start; later iterations use Ybus directly
   Answer: B. Off-diagonals are zero where Ykn = 0, the matrix is not symmetric and depends on present delta and |V|, so it is rebuilt each iteration; new values are old plus corrections. (Key point: Properties of the Jacobian and update)

## Related in Power System Analysis II

- [Effects of real and reactive power mismatch](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Apf-qv-mismatch-effects) — Power System Analysis II, chapter 1, asked 4×
- [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
- [Bus classification in load flow](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Abus-types-specified-quantities) — Power System Analysis II, chapter 2, asked 2×
- [Need for load flow and slack bus](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Aload-flow-need-slack-bus) — Power System Analysis II, chapter 2
- [G-S voltage and power flow, 2-bus](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Ags-two-bus-power-flow-new) — Power System Analysis II, chapter 2
- [G-S load flow with given Ybus, losses](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Ags-ybus-j12-two-iterations) — Power System Analysis II, chapter 2

## Related in other subjects

- [Charging reactive power in sine form](https://www.bctengineer.com/question.md?key=semester_8%2Fhigh_voltage_engineering%3Acharging-reactive-power-sine) — High Voltage Engineering, chapter 3
- [Reactive power flow between machines via j10 Ω](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3Atwo-machines-reactive-j10) — Power System Analysis I, chapter 3
- [Direction of active and reactive power flow](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3Adirection-active-reactive-flow) — Power System Analysis I, chapter 6
- [Energy/power signals; periodicity of cos + sin](https://www.bctengineer.com/question.md?key=semester_7%2Fdigital_signal_analysis_and_processing%3Aenergy-power-periodic-2) — Digital Signal Analysis and Processing, chapter 1
