---
title: Kron reduction, sparsity and building the impedance matrix
heading: Eliminating buses that have no injection, triangular factors that solve the network for any set of currents, fill-in and the ordering that avoids it, and building or modifying the bus impedance matrix one branch at a time
eyebrow: S10 · Lesson 11 · Kron reduction, sparsity and building the impedance matrix
xp: 50
---

::: hook
A regional grid model has 50,000 buses. Its admittance matrix has 2.5 billion entries, of which fewer than 200,000 are nonzero, because each bus connects to only a handful of others. Its inverse, the impedance matrix whose diagonal gives every bus's fault level, is completely full. Nobody stores that. So how does a fault program find $Z_{kk}$ for the bus it needs, and how does a planner see what a new generator does to the fault levels without starting over?
:::

::: play
- The three-bus network of lesson 10: a generator behind j0.2 at bus 1, lines j0.1 (1–2), j0.2 (1–3) and j0.25 (2–3). Its $Z_{33}$ is j0.327, so a fault at bus 3 draws 3.06 pu.
- Now a second generator, with reactance z, is connected at bus 2. The plot shows the new $Z_{33}$ and the fault current at bus 3 against z, from one update formula applied to the old $Z_\text{bus}$, with no new inversion.
- A stiff generator (small z) raises the fault current at bus 3 a lot; a weak one barely changes it. The readouts give the updated $Z_{22}$ and $Z_{23}$ too.
:::

```sim plot
view: graph
x: z = 0.05..2 pu
y: Z = 0..4.5 pu
plot: 0.32727 - 0.23636^2/(0.28182 + z) | samples: 400 | label: new Z₃₃
plot: 1/(0.32727 - 0.23636^2/(0.28182 + z)) | samples: 400 | color: ch3 | label: fault current at bus 3
plot: 3.0556 + 0*z | dashed | color: ch4 | label: before the generator
slider: zg = 0.05..2 = 0.4 pu
marker: z = zg
readout: new Z₂₂, pu = 0.28182 - 0.28182^2/(0.28182 + zg) | digits: 4
readout: new Z₂₃, pu = 0.23636 - 0.28182*0.23636/(0.28182 + zg) | digits: 4
readout: fault current at bus 3, pu = 1/(0.32727 - 0.23636^2/(0.28182 + zg)) | digits: 4
```

::: predict
## In a radial network, one hub bus connects to 20 others that don't connect to each other. Gaussian elimination removes the hub first. How many new nonzero entries (new connections) appear among the other 20?

- [ ] None
- [ ] 20
- [x] 190
- [ ] 400

::: reveal
Eliminating a bus connects all of its neighbors to each other, so the 20 become a complete network with 20 × 19/2 = 190 new branches. Eliminating the 20 outer buses first creates no new entries at all. The order of elimination decides whether a sparse matrix stays sparse.
:::
:::

::: nameit
## Kron reduction

A bus with no current injection can be removed from the nodal equations $I = YV$. Solving its row for its voltage and substituting leaves a smaller matrix with

$$Y'_{ij} = Y_{ij} - \frac{Y_{ik}Y_{kj}}{Y_{kk}}$$

for the eliminated bus k. Physically it's the star–mesh transformation: the branches that met at bus k are replaced by an equivalent mesh among its neighbors. Reducing a whole external system this way, keeping only the boundary buses, gives a **Ward equivalent**, which a utility uses to represent its neighbors in its own studies.

## Triangular factors

Gaussian elimination of every bus in turn factors the matrix as $Y = LDU$ (for a symmetric Y, $U = L^T$). Once factored, any set of injections is solved by a forward and a back substitution, at a fraction of the cost of the factorization. A single column of $Z_\text{bus}$ is the solution for a unit current injected at one bus, so a fault program gets exactly the columns it needs this way. Factorization is also what's inside every Newton power-flow iteration (lesson 19).

## Sparsity and ordering

$Y_\text{bus}$ has N diagonal entries plus two off-diagonal entries per branch. Elimination creates **fill-in**: a new nonzero for every pair of neighbors of the eliminated bus that weren't already connected. Tinney's ordering rules keep it small. The simplest, still the workhorse, eliminates at each step the bus with the fewest remaining connections. With good ordering, the factors of a power network have only a few times as many nonzeros as Y itself.

## Building and modifying $Z_\text{bus}$

$Z_\text{bus}$ can be built one branch at a time without inverting anything. Adding a branch of impedance $z_b$:

1. from a new bus p to the reference: a new diagonal entry $Z_{pp} = z_b$;
2. from a new bus p to existing bus k: a new row and column copying bus k's, with $Z_{pp} = Z_{kk} + z_b$;
3. from existing bus k to the reference: $Z' = Z - \dfrac{Z_{\cdot k}Z_{k\cdot}}{Z_{kk} + z_b}$;
4. between existing buses j and k: $Z' = Z - \dfrac{(Z_{\cdot j} - Z_{\cdot k})(Z_{j\cdot} - Z_{k\cdot})}{Z_{jj} + Z_{kk} - 2Z_{jk} + z_b}$.

Rules 3 and 4 are rank-one updates, the same kind of correction the contingency lesson uses to remove a line: adding $-z_b$ in parallel takes a branch out.
:::

::: example
## Kron-reduce the three-bus network to buses 1 and 3.

::: solution
1. **The matrix.** In susceptances,
   $$Y_\text{bus} = -j\begin{pmatrix} 20 & -10 & -5 \\ -10 & 14 & -4 \\ -5 & -4 & 9 \end{pmatrix}$$
2. **Eliminate bus 2.** With $B_{22}$ = 14:
   $$\begin{aligned} B'_{11} &= 20 - \frac{(-10)(-10)}{14} \\ &= 12.857 \\ B'_{13} &= -5 - \frac{(-10)(-4)}{14} \\ &= -7.857 \\ B'_{33} &= 9 - \frac{(-4)(-4)}{14} \\ &= 7.857 \end{aligned}$$
3. **Read the reduced network.** It's a branch of susceptance 7.857 (reactance 0.1273) from bus 1 to bus 3, and 12.857 − 7.857 = 5 (the generator's j0.2) from bus 1 to the reference.
4. **Compare with series–parallel.** That's the series–parallel answer: the path 1–2–3, 0.35 pu, in parallel with the direct 0.2 pu is
   $$0.35 \parallel 0.2 = 0.1273\ \text{pu}$$
5. **Invert.** Inverting the 2 × 2 gives $Z_{33}$ = 0.327 again.

**Answer:** a j0.1273 branch from bus 1 to bus 3 and the generator's j0.2 from bus 1 to the reference, with $Z_{33}$ = 0.327 as before.
:::
:::

::: example
## Build $Z_\text{bus}$ for the three-bus network branch by branch, then add a generator with z = j0.4 at bus 2.

::: solution
1. **Generator to bus 1 (rule 1).** The matrix starts as [0.2]. All entries are imaginary; the j is left off.
2. **Line 1–2 to new bus 2 (rule 2).** Bus 2's row copies bus 1's, with
   $$\begin{aligned} Z_{22} &= 0.2 + 0.1 \\ &= 0.3 \end{aligned}$$
3. **Line 1–3 to new bus 3 (rule 2).**
   $$\begin{aligned} Z_{33} &= 0.2 + 0.2 \\ &= 0.4 \end{aligned}$$
   with $Z_{13} = Z_{23}$ = 0.2.
4. **Line 2–3 closes a loop (rule 4).** The difference of columns 2 and 3 is (0, 0.1, −0.2), and the denominator is
   $$\begin{aligned} &0.3 + 0.4 - 2(0.2) + 0.25 \\ &= 0.55 \end{aligned}$$
5. **Update the entries.**
   $$\begin{aligned} Z_{22} &= 0.3 - 0.01/0.55 \\ &= 0.2818 \\ Z_{33} &= 0.4 - 0.04/0.55 \\ &= 0.3273 \\ Z_{23} &= 0.2 + 0.02/0.55 \\ &= 0.2364 \end{aligned}$$
   matching the inverse of $Y_\text{bus}$ in lesson 10.
6. **Add the generator at bus 2 (rule 3).** It's a branch from bus 2 to the reference:
   $$\begin{aligned} Z'_{33} &= 0.3273 - \frac{0.2364^2}{0.2818 + 0.4} \\ &= 0.2453 \end{aligned}$$
7. **Fault current at bus 3.** It rises from 3.06 to 4.08 pu, which is the kind of check a planner runs to see whether existing breakers can still interrupt their faults.

**Answer:** the branch-by-branch build reaches $Z_{22}$ = 0.2818, $Z_{33}$ = 0.3273 and $Z_{23}$ = 0.2364, as in lesson 10; the new generator lowers $Z_{33}$ to 0.2453 and raises bus 3's fault current from 3.06 to 4.08 pu.
:::
:::

::: example
## A hub bus with no load connects to three buses through j0.1, j0.2 and j0.4 pu, which aren't otherwise connected. Eliminate the hub.

::: solution
1. **Star to mesh.** Kron reduction of a star gives a mesh with
   $$z_{ij} = z_i + z_j + z_iz_j/z_k$$
2. **The three branches.**
   $$\begin{aligned} x_{12} &= 0.1 + 0.2 + 0.02/0.4 \\ &= 0.35 \\ x_{13} &= 0.1 + 0.4 + 0.04/0.2 \\ &= 0.70 \\ x_{23} &= 0.2 + 0.4 + 0.08/0.1 \\ &= 1.40\ \text{pu} \end{aligned}$$
3. **In general.** Three branches become three, but eliminating a bus with k neighbors creates up to k(k − 1)/2 branches: the fill-in that ordering tries to minimize.

**Answer:** branches of j0.35 between buses 1 and 2, j0.70 between 1 and 3, and j1.40 between 2 and 3.
:::
:::

::: check
given: b = 4 | 6 | 10; c = 3 | 5; e = 2 | 4; d = 8 | 14
answer: -e - b*c/d
tolerance: 0.5%

## A susceptance matrix has $B_{1k}$ = −{b}, $B_{3k}$ = −{c}, $B_{13}$ = −{e} and $B_{kk}$ = {d}. Eliminating bus k, what does $B_{13}$ become?

::: right
Right. $B'_{13} = B_{13} - B_{1k}B_{k3}/B_{kk}$ = {answer}: eliminating bus k strengthens the connection between buses 1 and 3.
:::

::: misses
- [-e + b*c/d] Subtract the product over $B_{kk}$; with two negative off-diagonals the product is positive.
- [any] Not yet. $B'_{ij} = B_{ij} - B_{ik}B_{kj}/B_{kk}$.
:::
:::

::: check
given: x = 0.05 | 0.1 | 0.2; y = 0.08 | 0.15 | 0.3
answer: x + y
tolerance: 0.5%

## A bus with no load or generation sits between two lines of j{x} and j{y} pu and nothing else. Eliminating it by Kron reduction leaves one branch. What's its reactance, in per unit?

::: right
Right. The reduced off-diagonal is $-1/(x_1 + x_2)$ in susceptance, a single branch of {answer} pu: the two lines in series.
:::

::: misses
- [x*y/(x + y)] That's the two in parallel. They're in series through the eliminated bus.
- [any] Not yet. Eliminate the middle bus and read the branch from the new off-diagonal.
:::
:::

::: check
given: k = 0.15 | 0.25 | 0.4; z = 0.1 | 0.3 | 0.5
answer: k + z
tolerance: 0.5%

## A new bus p is connected to existing bus k ($Z_{kk}$ = j{k} pu) through a branch of j{z} pu. What's the new $Z_{pp}$, in per unit?

::: right
Right. Rule 2: $Z_{pp} = Z_{kk} + z_b$ = {answer}.
:::

::: misses
- [k*z/(k + z)] That's for a branch from bus k to the reference. Here the branch goes to a new bus.
- [any] Not yet. The new bus is bus k plus the new branch in series.
:::
:::

::: check
given: k = 0.15 | 0.25 | 0.4; z = 0.2 | 0.5 | 1
answer: k - k^2/(k + z)
tolerance: 0.5%

## A generator of j{z} pu is connected at bus k, where $Z_{kk}$ was j{k} pu. What's the new $Z_{kk}$, in per unit?

::: right
Right. Rule 3: $Z_{kk} - Z_{kk}^2/(Z_{kk} + z_b)$ = {answer}, which is $Z_{kk}$ in parallel with $z_b$.
:::

::: misses
- [k + z] Adding a branch to the reference puts it in parallel, lowering $Z_{kk}$.
- [any] Not yet. Use rule 3.
:::
:::

::: check
given: j = 0.25 | 0.3; k = 0.35 | 0.45; m = 0.15 | 0.2; z = 0.2 | 0.4
answer: j - (j - m)^2/(j + k - 2*m + z)
tolerance: 0.5%

## A line of j{z} pu is added between existing buses j and k, where $Z_{jj}$ = j{j}, $Z_{kk}$ = j{k} and $Z_{jk}$ = j{m}. What's the new $Z_{jj}$, in per unit?

::: right
Right. Rule 4: $Z_{jj} - (Z_{jj} - Z_{jk})^2/(Z_{jj} + Z_{kk} - 2Z_{jk} + z_b)$ = {answer}.
:::

::: misses
- [j - (j - m)^2/(j + k + z)] The denominator includes $-2Z_{jk}$.
- [any] Not yet. Use rule 4 with the column difference $Z_{jj} - Z_{jk}$.
:::
:::

::: check
given: n = 6 | 10 | 25 | 40
answer: n*(n - 1)/2
tolerance: 0

## A hub bus connects to {n} buses that aren't connected to each other. Eliminating the hub first, how many fill-in entries appear (counting each new branch once)?

::: right
Right. Every pair of its neighbors becomes connected: {answer} new branches. Eliminating the outer buses first creates none.
:::

::: misses
- [n*(n - 1)] Count each new branch once; the matrix has two entries for each.
- [n] Every pair of neighbors gets connected, not one per neighbor.
- [any] Not yet. Count the pairs among the hub's neighbors.
:::
:::

::: check
given: N = 1000 | 5000 | 20000; m = 1.4 | 1.6
answer: 100*(N + 2*m*N)/N^2
unit: %
tolerance: 0.5%

## A network has {N} buses and {m} times as many branches. What percentage of its $Y_\text{bus}$ entries are nonzero?

::: right
Right. N diagonal entries plus two per branch, out of N²: {answer}%.
:::

::: misses
- [100*(N + m*N)/N^2] Each branch puts two off-diagonal entries in the matrix.
- [any] Not yet. Count the diagonal and two entries per branch.
:::
:::

::: check
kind: parts
given: a = 0.05 | 0.1 | 0.2; b = 0.1 | 0.3; c = 0.2 | 0.5

## A load-free hub connects to three otherwise unconnected buses through j{a}, j{b} and j{c} pu. Eliminate it.

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

### What reactance joins the first two buses?

::: misses
- [a + b] Series reactances would add, but the third spoke also carries current.
- [any] $z_1 + z_2 + z_1z_2/z_3$.
:::
:::

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

### And the second and third?

::: misses
- [any] $z_2 + z_3 + z_2z_3/z_1$.
:::
:::
:::

::: check
kind: derivation
vars: a = 0.01..1, b = 0.01..1, c = 0.01..1

## A star of reactances a, b and c is converted to a mesh.

::: step
answer: a + b + a*b/c

### What joins the ends of a and b?
:::

::: step
answer: a + c + a*c/b

### Of a and c?
:::

::: step
answer: b + c + b*c/a

### Of b and c?
:::

::: right
Right. Kron reduction of a star is exactly the star–mesh transformation.
:::
:::

::: explain
## Why do power-system programs factor $Y_\text{bus}$ instead of inverting it, even when they need entries of $Z_\text{bus}$?

::: model
$Y_\text{bus}$ is extremely sparse, because each bus connects to only a few neighbors, while its inverse $Z_\text{bus}$ is full: every bus's voltage responds to a current injected anywhere. Storing and computing a full 50,000-bus inverse would take billions of entries and an enormous amount of arithmetic. Factoring Y into triangular parts, with the buses eliminated in an order that keeps fill-in small, produces factors only a little denser than Y itself. Any column of $Z_\text{bus}$ is then a forward and back substitution away, so a program computes exactly the impedances it needs. The same factors solve power-flow corrections and contingency cases, and branch changes can be handled by low-rank updates instead of starting again.
:::
:::

::: practice

::: check
given: x = 0.02..0.5; y = 0.02..0.5
answer: x + y
tolerance: 0.5%

## Eliminate the middle bus of j{x} and j{y} in series. The equivalent reactance?

::: misses
- [any] Series reactances add.
:::
:::

::: check
given: k = 0.05..0.6; z = 0.05..2
answer: k - k^2/(k + z)
tolerance: 0.5%

## $Z_{kk}$ = j{k}; add j{z} from bus k to the reference. New $Z_{kk}$?

::: misses
- [any] Rule 3: $Z_{kk}$ in parallel with $z_b$.
:::
:::

::: check
given: j = 0.2..0.4; k = 0.3..0.5; m = 0.05..0.15; z = 0.1..0.6
answer: j - (j - m)^2/(j + k - 2*m + z)
tolerance: 0.5%

## Rule 4: $Z_{jj}$ = {j}, $Z_{kk}$ = {k}, $Z_{jk}$ = {m}, new line {z}. New $Z_{jj}$?

::: misses
- [any] $Z_{jj} - (Z_{jj} - Z_{jk})^2/(Z_{jj} + Z_{kk} - 2Z_{jk} + z_b)$.
:::
:::

::: check
given: n = 3..60 int
answer: n*(n - 1)/2
tolerance: 0

## Fill-in from eliminating a hub with {n} unconnected neighbors?

::: misses
- [any] One new branch per pair of neighbors.
:::
:::
:::
