---
title: "Problem set 4: power flow"
heading: "Problem set 4: setting up power flow, Gauss–Seidel, Newton–Raphson, the fast decoupled and DC approximations, regulating transformers and contingency analysis"
eyebrow: S10 · Problem set 4
type: problems
---

::: hook
These problems cover lessons 17 to 22: bus types and unknowns, exact two-bus solutions, branch flows and losses, Gauss–Seidel and Newton–Raphson steps and convergence, the DC power flow with its distribution factors, regulating transformers and phase shifters, and predicting flows after outages.
:::

::: pool
pick: 12

::: check
kind: parts
given: n = 39 | 118 | 1354; f = 0.1 | 0.25; let m = round(n*f)

## A case with {n} buses: one slack, {m} PV and the rest PQ.

::: part
answer: 2*(n - 1) - m
tolerance: 0

### Unknowns?

::: misses
- [any] $2(n - 1) - n_{PV}$.
:::
:::

::: part
answer: n - 1 - m
tolerance: 0

### PQ buses?

::: misses
- [any] Everything but the slack and the PV buses.
:::
:::
:::

::: check
kind: parts
given: X = 0.1 | 0.2; P = 0.6 | 1.4; Q = 0.2 | 0.5

## A slack at 1∠0° feeds {P} + j{Q} pu through a lossless X = {X}.

::: part
answer: sqrt(((1 - 2*Q*X) + sqrt((1 - 2*Q*X)^2 - 4*X^2*(P^2 + Q^2)))/2)
tolerance: 0.5%

### Load bus voltage?

::: misses
- [any] Upper root of the quadratic.
:::
:::

::: part
answer: -asin(P*X/sqrt(((1 - 2*Q*X) + sqrt((1 - 2*Q*X)^2 - 4*X^2*(P^2 + Q^2)))/2))*180/pi
unit: °
tolerance: 0.5%

### Its angle?

::: misses
- [any] $\sin\delta = -PX/|V|$.
:::
:::

::: part
answer: Q + X*(P^2 + Q^2)/(((1 - 2*Q*X) + sqrt((1 - 2*Q*X)^2 - 4*X^2*(P^2 + Q^2)))/2)
tolerance: 0.5%

### Slack's vars?

::: misses
- [any] Load Q plus $X|I|^2$.
:::
:::
:::

::: check
kind: parts
given: V = 1.01 | 1.04; W = 0.97 | 1; d = 4 | 10; g = 0.5 | 2; b = 5 | 12; R = 0.01 | 0.03; P = 0.8 | 1.6; Q = 0.2 | 0.6; U = 0.96 | 1.01

## A branch {g} − j\given{b} pu joins {V}∠0° to {W}∠−{d}°; a branch of R = {R} delivers {P} + j{Q} at {U} pu.

::: part
answer: V^2*g - V*W*(g*cos(d*pi/180) - b*sin(d*pi/180))
tolerance: 0.5%

### Real power leaving the first branch's sending end?

::: misses
- [any] Branch-flow formula.
:::
:::

::: part
answer: R*(P^2 + Q^2)/U^2
tolerance: 0.5%

### The second branch's loss?

::: misses
- [any] $R(P^2 + Q^2)/V^2$.
:::
:::
:::

::: check
kind: parts
given: X = 0.12 | 0.25; P = 0.5 | 1.1; Q = 0.15 | 0.45

## Gauss–Seidel and Newton on the two-bus case: X = {X}, load {P} + j{Q}, flat start.

::: part
answer: sqrt((1 - X*Q)^2 + (X*P)^2)
tolerance: 0.5%

### Magnitude of the first Gauss–Seidel iterate?

::: misses
- [any] $|(1 - XQ) - jXP|$.
:::
:::

::: part
answer: -P*X*180/pi
unit: °
tolerance: 0.5%

### Angle after Newton's first step?

::: misses
- [any] $-PX$ rad.
:::
:::

::: part
answer: 1 - Q*X
tolerance: 0.5%

### Voltage after Newton's first step?

::: misses
- [any] $1 - QX$.
:::
:::
:::

::: check
kind: parts
given: P = 0.4 | 1.2; X = 0.1 | 0.3; V = 1.02 | 1.05; m = 0.05 | 0.2

## A PV bus at {V} pu injects {P} pu into a slack at 1∠0° through X = {X}; its generator is limited to {m} pu of vars.

::: part
answer: asin(P*X/V)*180/pi
unit: °
tolerance: 0.5%

### Angle?

::: misses
- [any] $\sin^{-1}(PX/V)$.
:::
:::

::: part
answer: (V^2 - V*cos(asin(P*X/V)))/X
tolerance: 0.5%

### Vars needed to hold {V} pu?

::: misses
- [any] $(V^2 - V\cos\delta)/X$.
:::
:::

::: part
answer: ((V^2 - V*cos(asin(P*X/V)))/X + m - abs((V^2 - V*cos(asin(P*X/V)))/X - m))/2
tolerance: 0.5%

### Vars it actually supplies?

::: misses
- [any] The smaller of need and limit.
:::
:::
:::

::: check
kind: parts
given: e = 0.03 | 0.1; r = 0.4 | 0.8; t = 1e-5 | 1e-7; C = 1 | 4; f = 0.05 | 0.2

## Linear convergence at rate {r} from {e}; quadratic convergence with C = {C} from {f}.

::: part
answer: ceil(ln(t/e)/ln(r) - 0.0001)
tolerance: 0

### Linear: iterations to reach {t}?

::: misses
- [any] $\lceil\ln(t/e)/\ln r\rceil$.
:::
:::

::: part
answer: C*(C*f^2)^2
tolerance: 0.5%

### Quadratic: error after two steps?

::: misses
- [any] Square twice.
:::
:::
:::

::: check
kind: parts
given: V = 0.92 | 0.97; d = 4 | 9; X = 0.1 | 0.25; P = 0.4 | 0.9; Q = 0.1 | 0.3

## A two-bus guess: load bus at {V}∠−{d}° behind X = {X}, load {P} + j{Q}.

::: part
answer: -P - V*sin(-d*pi/180)/X
tolerance: 0.5%

### ΔP?

::: misses
- [any] $-P - V\sin\delta/X$.
:::
:::

::: part
answer: -Q - (V^2 - V*cos(d*pi/180))/X
tolerance: 0.5%

### ΔQ?

::: misses
- [any] $-Q - (V^2 - V\cos\delta)/X$.
:::
:::
:::

::: check
kind: parts
given: a = 0.03 | 0.12; x = 0.08 | 0.25; P = 0.5 | 1.3

## DC power flow on a 100 MVA base.

::: part
answer: a/x*100
unit: MW
tolerance: 0.5%

### Flow on a line of x = {x} with {a} rad across it?

::: misses
- [any] $\Delta\theta/x$.
:::
:::

::: part
answer: -P*x*180/pi
unit: °
tolerance: 0.5%

### Angle of a bus drawing {P} pu radially through x = {x}?

::: misses
- [any] $-Px$.
:::
:::
:::

::: check
kind: parts
given: a = 0.1 | 0.15; b = 0.2 | 0.3; c = 0.15 | 0.4; T = 50 | 200

## A triangle: $x_{12}$ = {a}, $x_{23}$ = {b}, $x_{13}$ = {c} pu; a transfer of {T} MW from bus 1 to bus 3.

::: part
answer: (a + b)/(a + b + c)
tolerance: 0.5%

### PTDF of line 1–3?

::: misses
- [any] Inverse-reactance share.
:::
:::

::: part
answer: T*c/(a + b + c)
unit: MW
tolerance: 0.5%

### MW on line 2–3?

::: misses
- [any] The rest goes 1–2–3.
:::
:::
:::

::: check
kind: parts
given: a = 0.05 | 0.1; b = 0.1 | 0.25; c = 0.2 | 0.4; t = 8 | 20

## A bus with lines of x = {a}, {b} and {c} pu; an angle difference of {t}°.

::: part
answer: 1/a + 1/b + 1/c
tolerance: 0.5%

### Its B-matrix diagonal?

::: misses
- [any] Sum of $1/x$.
:::
:::

::: part
answer: 100*(t*pi/180/sin(t*pi/180) - 1)
unit: %
tolerance: 1%

### DC model's overstatement at {t}°?

::: misses
- [any] θ/sin θ − 1.
:::
:::
:::

::: check
kind: parts
given: N = 500 | 4000; k = 10 | 14

## A Newton Jacobian of size {N} with about {k} nonzeros per row.

::: part
answer: 2/3*N^3
tolerance: 0.5%

### Dense LU operation count?

::: misses
- [any] $\frac{2}{3}N^3$.
:::
:::

::: part
answer: 100*k/N
unit: %
tolerance: 0.5%

### Fraction of entries that are nonzero?

::: misses
- [any] k/N.
:::
:::
:::

::: check
kind: parts
given: x = 0.08 | 0.15; y = 0.12 | 0.3; F = 0.6 | 1.5

## Two parallel lines, x = {x} and {y} pu, carry {F} pu between two buses.

::: part
answer: F*y/(x + y)
tolerance: 0.5%

### Flow on the {x} pu line?

::: misses
- [any] $Fx_2/(x_1 + x_2)$.
:::
:::

::: part
answer: F*x/(x + y)
tolerance: 0.5%

### Increase on the {y} pu line if the {x} pu line trips?

::: misses
- [any] It picks up the tripped line's flow.
:::
:::
:::

::: check
kind: parts
given: P = 1.2 | 1.6 | 2; x = 0.1 | 0.15; y = 0.2 | 0.3; R = 0.7 | 0.85

## A transfer of {P} pu splits between path A (x = {x} pu, rated {R} pu) and path B (x = {y} pu). A phase shifter can be installed on path A (100 MVA base, DC model).

::: part
answer: 100*P*y/(x + y)
unit: MW
tolerance: 0.5%

### Path A's flow without the shifter?

::: misses
- [any] The transfer splits inversely with reactance.
:::
:::

::: part
answer: (R*(x + y) - P*y)*180/pi
unit: °
tolerance: 0.5%

### Shift that brings path A to exactly its rating?

::: misses
- [any] Path A carries $(Px_B + \varphi)/(x_A + x_B)$; set it to the rating.
:::
:::

::: part
answer: 100*(P - R)
unit: MW
tolerance: 0.5%

### Path B's flow with that shift?

::: misses
- [any] The total is unchanged.
:::
:::
:::

::: check
kind: parts
given: f = 0.4 | 0.7; g = 0.6 | 0.9 | 1.2; p = 0.15 | 0.3; k = 0.5 | 0.7; L = 0.8 | 1

## Line ℓ carries {f} pu and line k {g} pu. For a transfer between line k's ends, line k carries {k} of it and line ℓ carries {p}. Line ℓ is rated {L} pu (100 MVA base).

::: part
answer: p/(1 - k)
tolerance: 0.5%

### Line ℓ's outage distribution factor for line k?

::: misses
- [any] $\text{PTDF}_\ell/(1 - \text{PTDF}_k)$.
:::
:::

::: part
answer: 100*(f + p/(1 - k)*g)
unit: MW
tolerance: 0.5%

### Line ℓ's flow after line k trips?

::: misses
- [any] $f_\ell + d_{\ell k}f_k$.
:::
:::

::: part
answer: 100*(f + p/(1 - k)*g)/L
unit: %
tolerance: 0.5%

### That flow as a percentage of line ℓ's rating?

::: misses
- [any] Divide by the rating in MW.
:::
:::
:::

::: check
kind: parts
given: d = 2.5 | 4 | 5; x = 0.06 | 0.1; Q = 0.3 | 0.6

## Two identical parallel transformers, each j{x} pu, serve a load drawing {Q} pu of reactive power at 1 pu (100 MVA base). One transformer's tap gives {d}% more voltage than the other's.

::: part
answer: d/100/(2*x)
tolerance: 1%

### Circulating current, in per unit?

::: misses
- [any] The tap difference over the loop reactance $2x$.
:::
:::

::: part
answer: 100*(Q/2 + d/100/(2*x))
unit: Mvar
tolerance: 2%

### Reactive power supplied by the higher-tapped transformer?

::: misses
- [any] Half the load's vars plus the circulating vars.
:::
:::

::: part
answer: 100*(Q/2 - d/100/(2*x))
unit: Mvar
tolerance: 2%

### Reactive power supplied by the other one (negative means it absorbs)?

::: misses
- [any] Half the load's vars minus the circulating vars.
:::
:::
:::
:::
