---
title: "N-R Ybus, mismatches and Jacobian with Q limits"
subject: "Power System Analysis II"
chapter: 2
key: "semester_5/power_system_analysis_ii:nr-jacobian-line-charging-q-limits"
source: https://www.bctengineer.com/q/semester_5/power_system_analysis_ii/nr-jacobian-line-charging-q-limits
site: BCT Engineering
---

# N-R Ybus, mismatches and Jacobian with Q limits

Power System Analysis II · Chapter 2: Load Flow Analysis

- Asked in: 2082 Baishakh, 3+2+2+3 marks
- Video: [Electric Power Systems | Solved Problems | Newton-Raphson Load Flow Analysis](https://www.youtube.com/watch?v=XkrVoVtf2Zk) — Engineering Devotion
- Answer checked by Claude Sonnet 5.5 on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/power_system_analysis_ii/nr-jacobian-line-charging-q-limits
- Whole chapter: https://www.bctengineer.com/md/semester_5/power_system_analysis_ii/chapter-2

## Question

Figure shows a 3-bus system. The series impedance and shunt admittance of each line are 0.026 + j0.11 pu and j0.04 pu respectively. The bus specification and power input etc. at the buses is as under:

| Bus | PG | QG | PL | QL | Bus Voltage |
|---|---|---|---|---|---|
| 1 | Unspecified | Unspecified | 1.0 | 0.5 | 1.03+j0 (Slack bus) |
| 2 | 1.5 | Unspecified | 0 | 0 | V = 1.03 (PV bus) |
| 3 | 0 | 0 | 1.2 | 0.5 | Unspecified (PQ bus) |

[Figure: lines 1-2, 1-3 and 2-3; slack bus 1 with load 1 + j0.5; PV bus 2 with generation 1.5 + jQG2; PQ bus 3 with load 1.2 + j0.5]

For bus 2 the minimum and maximum reactive power limits are 0 and 0.8 pu. Form (i) Y bus (ii) find P2°, Q2°, P3° and Q3° (iii) find jacobian matrix (iv) form the general equations for calculating the change in variables by N-R method for first iteration.

## Short answer

Y‑bus: Yii = 4.0701 − j17.1798 pu, Yij = −2.0351 + j8.6099 pu. Flat‑start powers: P2° = 0.0629, Q2° = 0.2236, P3° = −0.1221, Q3° = −0.5566 pu. Jacobian (3×3): ∂P2/∂δ2 = 18.00, ∂P2/∂δ3 = −8.87, ∂P2/∂|V3| = −2.10; ∂P3/∂δ2 = −8.87, ∂P3/∂δ3 = 17.74, ∂P3/∂|V3| = 3.95; ∂Q3/∂δ2 = 2.10, ∂Q3/∂δ3 = −2.10, ∂Q3/∂|V3| from formula. NR update: [ΔP2; ΔP3; ΔQ3] = J [Δδ2; Δδ3; Δ|V3|].

## Answer

Bus 1 is the slack bus, bus 2 a PV bus ($P_2 = 1.5$ pu, $|V_2| = 1.03$ pu, $0 \le Q_{G2} \le 0.8$ pu) and bus 3 a PQ bus ($P_3 = -1.2$, $Q_3 = -0.5$ pu). The shunt admittance j0.04 pu is taken as the total line charging of each line, with $j0.02$ pu at each end. Flat start: $V_2^{(0)} = 1.03\angle 0^\circ$, $V_3^{(0)} = 1\angle 0^\circ$.

#### (i) Y-bus
$$
\begin{aligned}
y_{series} &= \frac{1}{0.026 + j0.110} = 2.0351 - j8.6099\ \text{pu} \\
Y_{ii} &= 2y_{series} + 2(j0.02) = 4.0701 - j17.1798 = 17.6553\angle -76.6716^\circ \\
Y_{ij} &= -y_{series} = -2.0351 + j8.6099 = 8.8471\angle 103.2986^\circ
\end{aligned}
$$

$$
Y_{bus} = \begin{bmatrix} 4.0701 - j17.1798 & -2.0351 + j8.6099 & -2.0351 + j8.6099 \\ -2.0351 + j8.6099 & 4.0701 - j17.1798 & -2.0351 + j8.6099 \\ -2.0351 + j8.6099 & -2.0351 + j8.6099 & 4.0701 - j17.1798 \end{bmatrix}\ \text{pu}
$$

#### (ii) Calculated powers at the flat start
With $Y_{ij} = |Y_{ij}|\angle\theta_{ij}$, $V_i = |V_i|\angle\delta_i$ and $\phi_{ij} = \theta_{ij} - \delta_i + \delta_j$:

$$
\begin{aligned}
P_i &= \sum_{j=1}^{n} |V_i||V_j||Y_{ij}|\cos\phi_{ij} \\
Q_i &= -\sum_{j=1}^{n} |V_i||V_j||Y_{ij}|\sin\phi_{ij}
\end{aligned}
$$

Jacobian elements (polar form, $j \ne i$):

$$
\begin{aligned}
\frac{\partial P_i}{\partial \delta_i} &= \sum_{j\ne i} |V_i||V_j||Y_{ij}|\sin\phi_{ij} \\
\frac{\partial P_i}{\partial \delta_j} &= -|V_i||V_j||Y_{ij}|\sin\phi_{ij} \\
\frac{\partial P_i}{\partial |V_i|} &= 2|V_i||Y_{ii}|\cos\theta_{ii} + \sum_{j\ne i} |V_j||Y_{ij}|\cos\phi_{ij} \\
\frac{\partial P_i}{\partial |V_j|} &= |V_i||Y_{ij}|\cos\phi_{ij} \\
\frac{\partial Q_i}{\partial \delta_i} &= \sum_{j\ne i} |V_i||V_j||Y_{ij}|\cos\phi_{ij} \\
\frac{\partial Q_i}{\partial \delta_j} &= -|V_i||V_j||Y_{ij}|\cos\phi_{ij} \\
\frac{\partial Q_i}{\partial |V_i|} &= -2|V_i||Y_{ii}|\sin\theta_{ii} - \sum_{j\ne i} |V_j||Y_{ij}|\sin\phi_{ij} \\
\frac{\partial Q_i}{\partial |V_j|} &= -|V_i||Y_{ij}|\sin\phi_{ij}
\end{aligned}
$$

Substituting $|V_1| = |V_2| = 1.03$, $|V_3| = 1.0$ and all angles zero (equivalently $P_i - jQ_i = V_i^{*}\sum_k Y_{ik}V_k$):

$$
\begin{aligned}
P_2^{0} &= 0.0629\ \text{pu}, \quad Q_2^{0} = 0.2236\ \text{pu} \\
P_3^{0} &= -0.1221\ \text{pu}, \quad Q_3^{0} = -0.5566\ \text{pu}
\end{aligned}
$$

**Q-limit check:** $Q_{G2} = Q_2^{0} + Q_{L2} = 0.2236$ pu, which lies between 0 and 0.8 pu. So bus 2 stays a PV bus and only $\Delta P_2$ is written for it.

#### (iii) Jacobian matrix
Unknowns: $\delta_2$, $\delta_3$, $|V_3|$. Equations: $\Delta P_2$, $\Delta P_3$, $\Delta Q_3$.

$$
\begin{aligned}
\frac{\partial P_2}{\partial \delta_2} &= (1.0300)(1.0300)(8.8471)\sin(103.30^\circ) + (1.0300)(1.0000)(8.8471)\sin(103.30^\circ) = 18.0024 \\
\frac{\partial P_2}{\partial \delta_3} &= -(1.0300)(1.0000)(8.8471)\sin(103.30^\circ) = -8.8682 \\
\frac{\partial P_2}{\partial |V_3|} &= (1.0300)(8.8471)\cos(103.30^\circ) = -2.0961 \\
\frac{\partial P_3}{\partial \delta_2} &= -(1.0000)(1.0300)(8.8471)\sin(103.30^\circ) = -8.8682 \\
\frac{\partial P_3}{\partial \delta_3} &= (1.0000)(1.0300)(8.8471)\sin(103.30^\circ) + (1.0000)(1.0300)(8.8471)\sin(103.30^\circ) = 17.7364 \\
\frac{\partial P_3}{\partial |V_3|} &= 2(1.0000)(17.6553)\cos(-76.67^\circ) + (1.0300)(8.8471)\cos(103.30^\circ) + (1.0300)(8.8471)\cos(103.30^\circ) = 3.9480 \\
\frac{\partial Q_3}{\partial \delta_2} &= -(1.0000)(1.0300)(8.8471)\cos(103.30^\circ) = 2.0961 \\
\frac{\partial Q_3}{\partial \delta_3} &= (1.0000)(1.0300)(8.8471)\cos(103.30^\circ) + (1.0000)(1.0300)(8.8471)\cos(103.30^\circ) = -4.1922 \\
\frac{\partial Q_3}{\partial |V_3|} &= -2(1.0000)(17.6553)\sin(-76.67^\circ) - (1.0300)(8.8471)\sin(103.30^\circ) - (1.0300)(8.8471)\sin(103.30^\circ) = 16.6232
\end{aligned}
$$

$$
J^{0} = \begin{bmatrix} 18.0024 & -8.8682 & -2.0961 \\ -8.8682 & 17.7364 & 3.9480 \\ 2.0961 & -4.1922 & 16.6232 \end{bmatrix}
$$

#### (iv) Equations for the first N-R iteration
Mismatches:

$$
\begin{aligned}
\Delta P_2 &= P_2^{sp} - P_2^{0} = 1.5 - 0.0629 = 1.4371 \\
\Delta P_3 &= P_3^{sp} - P_3^{0} = -1.2 - (-0.1221) = -1.0779 \\
\Delta Q_3 &= Q_3^{sp} - Q_3^{0} = -0.5 - (-0.5566) = 0.0566
\end{aligned}
$$

General equations:

$$
\begin{bmatrix} \Delta P_2 \\ \Delta P_3 \\ \Delta Q_3 \end{bmatrix} = \begin{bmatrix} \frac{\partial P_2}{\partial \delta_2} & \frac{\partial P_2}{\partial \delta_3} & \frac{\partial P_2}{\partial |V_3|} \\ \frac{\partial P_3}{\partial \delta_2} & \frac{\partial P_3}{\partial \delta_3} & \frac{\partial P_3}{\partial |V_3|} \\ \frac{\partial Q_3}{\partial \delta_2} & \frac{\partial Q_3}{\partial \delta_3} & \frac{\partial Q_3}{\partial |V_3|} \end{bmatrix} \begin{bmatrix} \Delta\delta_2 \\ \Delta\delta_3 \\ \Delta|V_3| \end{bmatrix}
$$

With numbers:

$$
\begin{bmatrix} 1.4371 \\ -1.0779 \\ 0.0566 \end{bmatrix} = \begin{bmatrix} 18.0024 & -8.8682 & -2.0961 \\ -8.8682 & 17.7364 & 3.9480 \\ 2.0961 & -4.1922 & 16.6232 \end{bmatrix} \begin{bmatrix} \Delta\delta_2 \\ \Delta\delta_3 \\ \Delta|V_3| \end{bmatrix}
$$

Solving, $\Delta\delta_2 = 0.0661$ rad, $\Delta\delta_3 = -0.0252$ rad, $\Delta|V_3| = -0.0113$ pu, so after the first iteration

$$
\begin{aligned}
\delta_2^{1} &= 0 + 0.0661 = 0.0661\ \text{rad} = 3.787^\circ \\
\delta_3^{1} &= 0 + (-0.0252) = -0.0252\ \text{rad} = -1.445^\circ \\
|V_3|^{1} &= 1 + (-0.0113) = 0.9887\ \text{pu}
\end{aligned}
$$

**Answer:** $P_2^0 = 0.0629$, $Q_2^0 = 0.2236$, $P_3^0 = -0.1221$, $Q_3^0 = -0.5566$ pu; bus 2 stays PV; $J^0$ as above; first-iteration result $V_2 = 1.0300\angle 3.787^\circ$ pu, $V_3 = 0.9887\angle -1.445^\circ$ pu.

## Check yourself

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

1. For this system, which mismatch equations are written in the N-R iteration?
   A. DeltaP1, DeltaP2, DeltaP3
   B. DeltaP2, DeltaP3, DeltaQ3
   C. DeltaQ2, DeltaQ3 only
   D. DeltaP2, DeltaQ2, DeltaP3, DeltaQ3
   Answer: B. Bus 2 is PV, so only P is written for it; bus 3 is PQ so both P and Q are written. Unknowns are delta2, delta3 and |V3|. (Key point: Unknowns and equations for N-R)

2. Q2 at the flat start is 0.2236 pu and the limits are 0 to 0.8 pu. What follows?
   A. Bus 2 stays PV
   B. Bus 2 becomes PQ with Q = 0
   C. Bus 2 becomes the slack bus
   D. Bus 2 becomes PQ with Q = 0.8
   Answer: A. The reactive output lies inside the limits, so the voltage magnitude remains held at 1.03 and bus 2 stays PV. (Key point: Q-limit check)

3. How is the power mismatch computed, e.g. for bus 3 real power?
   A. DeltaP3 = P3 specified + P3 calculated
   B. DeltaP3 = 0 at flat start
   C. DeltaP3 = P3 calculated - P3 specified
   D. DeltaP3 = P3 specified - P3 calculated = -1.2 - (-0.1221) = -1.0779
   Answer: D. Mismatch is specified minus calculated, with P3 specified = -PL3 = -1.2. (Key point: Mismatch definition)

4. Which element of the polar Jacobian uses the formula 2|Vi||Yii|cos(theta_ii) + sum |Vj||Yij|cos(phi_ij)?
   A. dPi/d|Vi|
   B. dQi/d|Vj|
   C. dQi/d delta_i
   D. dPi/d delta_i
   Answer: A. The derivative of Pi with respect to its own voltage magnitude includes the self term 2|Vi||Yii|cos(theta_ii) plus the mutual cosine terms. (Key point: Jacobian structure)

## Related in Power System Analysis II

- [G-S two iterations, lines 0.026+j0.11](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Ags-two-iterations-2075) — Power System Analysis II, chapter 2
- [Ybus of five-bus system](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Aybus-five-bus) — Power System Analysis II, chapter 1
- [Ybus for 3-bus lines with shunt susceptance](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Aybus-three-bus-shunt-2071) — Power System Analysis II, chapter 1
- [G-S first iteration with line charging](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Ags-first-iteration-line-charging) — Power System Analysis II, chapter 2
- [N-R first iteration, line reactance 0.1](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Anr-first-iteration-x0-1) — Power System Analysis II, chapter 2
- [Initial mismatch and Jacobian, 2-bus system](https://www.bctengineer.com/question.md?key=semester_5%2Fpower_system_analysis_ii%3Anr-two-bus-mismatch-jacobian) — Power System Analysis II, chapter 2

## Related in other subjects

- [Series R, X and shunt admittance from ABCD](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3Aline-constants-from-abcd) — Power System Analysis I, chapter 5
- [150 km line with mid-point shunt capacitor](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3A150km-mid-shunt-capacitor) — Power System Analysis I, chapter 6
- [Double-stub shunt tuner for admittance load](https://www.bctengineer.com/question.md?key=semester_7%2Frf_and_microwave_engineering%3Adouble-stub-admittance-load) — RF and Microwave Engineering, chapter 2
- [Derive input impedance of transmission line](https://www.bctengineer.com/question.md?key=semester_3%2Felectromagnetism%3Aderive-input-impedance-line) — Electromagnetism, chapter 5
