---
title: All-pass and minimum-phase systems
heading: Systems that change only phase, the factorization of any rational system into minimum-phase and all-pass parts, minimum group and energy delay, and invertibility
eyebrow: S7 · Lesson 13 · All-pass and minimum-phase systems
xp: 50
---

::: hook
The magnitude of a frequency response doesn't pin down the system. Reflect a zero from inside the unit circle to its mirror point outside and the magnitude changes only by a constant, while the phase and the impulse response change completely. Every rational system is a minimum-phase system, with all its poles and zeros inside the circle, cascaded with an all-pass system that has unit magnitude everywhere and only adds delay. This factorization explains which systems can be inverted, which impulse responses deliver their energy soonest, and how equalizers correct phase without touching magnitude.
:::

::: play
- The unwrapped phase of a first-order all-pass $\frac{z^{-1} - a}{1 - az^{-1}}$, in units of π, against frequency (dashed: a pure one-sample delay, $-\omega$).
- Its magnitude is exactly 1 at every frequency, yet its phase falls by π from ω = 0 to π, unevenly: with a > 0 most of the lag happens at low frequencies.
- The readout gives its group delay at ω = 0, $\frac{1 + a}{1 - a}$ samples; at ω = π it's $\frac{1 - a}{1 + a}$.
:::
:::

```sim plot
view: graph
x: w = 0..3.1416
y: p = -1..0
slider: a = -0.95..0.95 = 0.6
plot: (-w - 2*atan(a*sin(w)/(1 - a*cos(w))))/pi | samples: 800 | label: all-pass phase ÷ π
plot: -w/pi | dashed | color: ch3 | label: one-sample delay
readout: group delay at DC, samples = (1 + a)/(1 - a)
readout: group delay at Nyquist, samples = (1 - a)/(1 + a)
```

::: predict
## A channel has the impulse response [1, −2]. Can a causal, stable filter undo it exactly?

- [ ] Yes: invert H(z) = 1 − 2z⁻¹
- [x] No: its zero at z = 2 becomes a pole outside the unit circle in the inverse
- [ ] Yes, because it's FIR
- [ ] Only at DC

::: reveal
No. $1/(1 - 2z^{-1})$ has a pole at 2; causal, it's unstable, and stable, it's anticausal. Only minimum-phase systems have causal, stable inverses. What can be done is to equalize the magnitude with the minimum-phase inverse and accept, or separately correct, an all-pass phase error.
:::
:::

::: nameit
## All-pass systems

A first-order all-pass section with pole a (|a| < 1) and zero at $1/a^*$:

$$H_{ap}(z) = \frac{z^{-1} - a^*}{1 - az^{-1}}, \qquad |H_{ap}(e^{j\omega})| = 1$$

For a stable all-pass system the group delay is always positive; for a real pole a it's $\frac{1 - a^2}{1 - 2a\cos\omega + a^2}$, and for a complex pole $re^{j\theta}$ it peaks at $\frac{1 + r}{1 - r}$ samples at ω = θ. Its continuous phase is never positive, and a section adds π of lag across 0 to π.

## Minimum phase

A system with all poles **and zeros** inside the unit circle is **minimum phase**. Every rational system factors as

$$H(z) = H_\text{min}(z)\,H_{ap}(z)$$

by reflecting each outside zero $c$ to $1/c^*$ (which scales the magnitude by |c|) and putting the difference into the all-pass factor. Among all causal stable systems with the same magnitude response, the minimum-phase one has

- the **smallest group delay** at every frequency (the all-pass factor only adds delay);
- the **minimum energy delay**: $\sum_{m=0}^{n}|h_\text{min}[m]|^2 \ge \sum_{m=0}^{n}|h[m]|^2$ for every n, so it delivers its energy soonest;
- a **causal, stable inverse** $1/H_\text{min}$.

Magnitude equalization therefore uses $1/H_\text{min}$, and phase equalization adds all-pass sections.
:::

::: example
## $H(z) = 1 - 2z^{-1}$. Find its minimum-phase counterpart and compare how fast each delivers its energy.

::: solution
1. **Reflect the zero.** The zero at 2 reflects to 0.5, with the magnitude scaled by 2:
   $$\begin{aligned} H_\text{min}(z) &= 2(1 - 0.5z^{-1}) \\ &= 2 - z^{-1} \end{aligned}$$
   This has exactly the same |H|.
2. **The all-pass factor.**
   $$H = H_\text{min}\cdot\frac{1 - 2z^{-1}}{2 - z^{-1}}$$
   The second factor is an all-pass.
3. **Energy.** The energies are both 5, but $h_\text{min}$ = [2, −1] puts 4/5 into its first sample while h = [1, −2] puts only 1/5 there.

**Answer:** $H_\text{min}(z) = 2 - z^{-1}$; both have energy 5, but the minimum-phase version delivers 4/5 of it in the first sample against 1/5.
:::
:::

::: example
## A first-order all-pass has a = 0.8. What group delay does it add at DC and at ω = π, and what phase at π/2?

::: solution
1. **Delay at DC.**
   $$\begin{aligned} \tau(0) &= \frac{1 - 0.64}{(1 - 0.8)^2} \\ &= 9\ \text{samples} \end{aligned}$$
2. **Delay at π.**
   $$\begin{aligned} \tau(\pi) &= \frac{0.36}{1.8^2} \\ &= 0.11\ \text{sample} \end{aligned}$$
3. **Phase at π/2.**
   $$\begin{aligned} \phi &= -\pi/2 - 2\arctan(0.8) \\ &= -167.3° \end{aligned}$$
4. **Use.** Such sections, in cascade, can flatten a filter's group delay where it's too short, at the cost of extra overall delay.

**Answer:** it adds 9 samples of delay at DC and 0.11 sample at π, and its phase at π/2 is −167.3°.
:::
:::

::: example
## A second-order all-pass with poles at $0.8e^{\pm j\theta}$ is used to equalize a filter's delay at 48 kHz. How much delay does it add at ω = θ?

::: solution
1. **Peak delay.** The peak group delay of a complex all-pass pole pair, at ω = θ, is about
   $$\begin{aligned} \tau &\approx \frac{1 + r}{1 - r} \\ &= \frac{1.8}{0.2} \\ &= 9\ \text{samples} \end{aligned}$$
   exactly so when θ is far from 0 and π.
2. **In time.**
   $$\begin{aligned} t &= \frac{9}{48\,000\ \text{Hz}} \\ &= 0.19\ \text{ms} \end{aligned}$$
3. **Use.** Cascading such sections, each centered where the filter's delay sags, flattens the total group delay while leaving the magnitude untouched.

**Answer:** about 9 samples, or 0.19 ms, at ω = θ.
:::
:::

::: check
given: a = 0.3 | 0.7 | -0.5 | 0.9; w = 0.4 | 1.5 | 2.8
answer: (1 - a^2)/(1 - 2*a*cos(w) + a^2)
tolerance: 0.5%

## A first-order all-pass with real pole a = {a}. What's its group delay at ω = {w}?

::: right
Right. $\frac{1 - a^2}{1 - 2a\cos\omega + a^2}$ = {answer} samples.
:::

::: misses
- [(a*cos(w) - a^2)/(1 - 2*a*cos(w) + a^2)] That's the pole alone; the all-pass zero at 1/a adds as much again plus a sample.
- [any] Not yet. Pole and reflected zero together give $(1 - a^2)/|1 - ae^{-j\omega}|^2$.
:::
:::

::: check
given: r = 0.5 | 0.8 | 0.95
answer: (1 + r)/(1 - r)
tolerance: 0.5%

## An all-pass section's pole is at $re^{j\theta}$ with r = {r}. What group delay does it give at ω = θ?

::: right
Right. $(1 + r)/(1 - r)$ = {answer} samples.
:::

::: misses
- [r/(1 - r)] Add the contribution of the reflected zero at $1/r$.
- [any] Not yet. $(1 - r^2)/(1 - r)^2$.
:::
:::

::: check
given: c = 1.5 | 2 | 4
answer: c^2/(c^2 + 1)
tolerance: 0.5%

## $H(z) = 1 - \given{c}z^{-1}$ has the minimum-phase counterpart $\given{c} - z^{-1}$. What fraction of the minimum-phase version's energy is in its first sample?

::: right
Right. $c^2/(c^2 + 1)$ = {answer}.
:::

::: misses
- [1/(c^2 + 1)] That's the non-minimum-phase version's first-sample fraction.
- [any] Not yet. Energy in the first sample over the total.
:::
:::

::: check
given: c = 1.25 | 2 | 3; w = 0.5 | 2
answer: sqrt(1 - 2*c*cos(w) + c^2)
tolerance: 0.5%

## What's |H| at ω = {w} for $1 - \given{c}z^{-1}$, and equally for its minimum-phase version $\given{c} - z^{-1}$?

::: right
Right. Both give $\sqrt{1 - 2c\cos\omega + c^2}$ = {answer}.
:::

::: misses
- [sqrt(1 - 2*cos(w)/c + 1/c^2)] That's the reflected zero without the scale factor c.
- [any] Not yet. $|1 - ce^{-j\omega}|$.
:::
:::

::: check
given: a = 0.4 | 0.75 | -0.6; n = 2 | 5
answer: a^n
tolerance: 0.5%

## What's the n = {n} sample of the causal inverse of $1 - \given{a}z^{-1}$?

::: right
Right. $1/(1 - az^{-1}) \leftrightarrow a^nu[n]$, so {answer}; it's stable because |a| < 1, as minimum phase guarantees.
:::

::: misses
- [-a^n] The inverse has no minus sign: $1/(1 - az^{-1})$.
- [any] Not yet. Invert and expand.
:::
:::

::: check
given: a = 0.3 | 0.6 | 0.85
answer: -90 - 2*atan(a)*180/pi
unit: °
tolerance: 0.2

## A first-order all-pass with real a = {a}. What's its phase at ω = π/2?

::: right
Right. $-\pi/2 - 2\arctan a$ = {answer}°.
:::

::: misses
- [-90] That's a pure one-sample delay's phase; the all-pass adds more lag.
- [any] Not yet. $-\omega - 2\arctan\frac{a\sin\omega}{1 - a\cos\omega}$ at ω = π/2.
:::
:::

::: check
kind: parts
given: a = -0.6 | 0.5 | 0.9; w = 0.5 | 1.5 | 2.5

## A first-order all-pass has real pole a = {a}; consider ω = {w} rad.

::: part
answer: (1 - a^2)/(1 - 2*a*cos(w) + a^2)
tolerance: 0.5%

### What group delay does it give?

::: misses
- [any] $\frac{1 - a^2}{1 - 2a\cos\omega + a^2}$.
:::
:::

::: part
answer: (-w - 2*asin(a*sin(w)/sqrt(1 - 2*a*cos(w) + a^2)))*180/pi
unit: °
tolerance: 0.5%

### What is its phase there (continuous)?

::: misses
- [any] $-\omega - 2\arctan\frac{a\sin\omega}{1 - a\cos\omega}$.
:::
:::
:::

::: check
kind: derivation
vars: c = 1.1..5, w = 0..3.14

## $H(z) = 1 - cz^{-1}$ with c > 1, and its minimum-phase counterpart $c - z^{-1}$.

::: step
answer: sqrt(1 - 2*c*cos(w) + c^2)

### What is |H| at frequency w (the same for both)?
:::

::: step
answer: 1/(1 + c^2)

### What fraction of H's energy arrives in its first sample?
:::

::: step
answer: c^2/(1 + c^2)

### And of the minimum-phase version's?
:::

::: right
Right. Same magnitude, but the minimum-phase version delivers most of its energy at once.
:::
:::

::: explain
## Why does the minimum-phase version of a system deliver its energy fastest?

::: model
Any system with a given magnitude response can be written as the minimum-phase system with that magnitude followed by an all-pass system. The all-pass part keeps the energy in every frequency band the same, so it can't change the total energy, but its group delay is positive at every frequency, so all it can do is hold energy back and release it later. Starting from the minimum-phase response and passing it through any all-pass filter therefore leaves the total unchanged while shifting energy toward later samples. No causal, stable system with the same magnitude can put more of its energy into the first n samples than the minimum-phase one, for every n.
:::
:::

::: practice

::: check
given: a = 0.5 | -0.8; w = 0.3 | 2.2
answer: (1 - a^2)/(1 - 2*a*cos(w) + a^2)
tolerance: 0.5%

## All-pass group delay: a {a}, ω {w}?

::: misses
- [any] $(1 - a^2)/(1 - 2a\cos\omega + a^2)$.
:::
:::

::: check
given: r = 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 0.95
answer: (1 + r)/(1 - r)
tolerance: 0.5%

## Peak all-pass delay for pole radius {r}?

::: misses
- [any] $(1 + r)/(1 - r)$.
:::
:::

::: check
given: c = 1.2 | 1.6 | 2 | 2.5 | 3.5 | 5
answer: c^2/(c^2 + 1)
tolerance: 0.5%

## First-sample energy fraction of $\given{c} - z^{-1}$?

::: misses
- [any] $c^2/(c^2 + 1)$.
:::
:::
:::
