---
title: Inverse z-transforms and system functions
heading: From poles back to the impulse response
eyebrow: C9 · Lesson 37 · Inverse z-transforms and system functions
xp: 40
---

::: hook
A filter designed in the z-plane has to come back to the time domain sooner or later: as an impulse response to check, as a difference equation to code, or as an output to predict. Going back is mostly partial fractions, the same technique A10 used for Laplace, with one simplification: each simple pole p turns into a geometric sequence $p^n$. Every causal filter's impulse response is a sum of such terms, so its poles tell you, nearly at a glance, which modes it has, how fast each fades and which one lingers.
:::

::: play
- A filter with poles at $p_1$ and $p_2$, $H(z) = 1/((1 - p_1z^{-1})(1 - p_2z^{-1}))$, has impulse response $h[n] = A_1p_1^n + A_2p_2^n$.
- The stems are h[n] and the dashed curves the two modes. The readouts give $A_1$ and $A_2$ from partial fractions.
- Make one pole small: its mode vanishes in a few samples and the other dominates. Make a pole negative: its mode alternates in sign. Move them close together and watch $A_1$ and $A_2$ grow large with opposite signs.
:::
:::

```sim plot
view: graph
x: n = 0..25
y: h = -2..3
slider: p1 = -0.95..0.95 = 0.5 step 0.05
slider: p2 = -0.95..0.95 = 0.25 step 0.05
plot: p1/(p1 - p2 + 0.000001)*p1^n | dashed | samples: 800
plot: -p2/(p1 - p2 + 0.000001)*p2^n | dashed | samples: 800
plot: p1/(p1 - p2 + 0.000001)*p1^n - p2/(p1 - p2 + 0.000001)*p2^n | stems | label: h[n]
readout: A1 = p1/(p1 - p2 + 0.000001) | digits: 4
readout: A2 = -p2/(p1 - p2 + 0.000001) | digits: 4
```

::: predict
## $H(z) = 1/((1 - 0.5z^{-1})(1 - 0.25z^{-1}))$. What is h[0]?

- [ ] 0
- [x] 1
- [ ] 0.5
- [ ] 0.125

::: reveal
1. As $z \to \infty$ every $z^{-1}$ vanishes and H → 1, and for a causal system that limit is h[0] (the initial value theorem). Partial fractions agree: $A_1 + A_2 = 2 - 1 = 1$.
:::
:::

::: nameit
## Partial fractions

Write H(z) in powers of $z^{-1}$. If the denominator has distinct poles $p_k$ and the numerator is of lower degree,

$$H(z) = \sum_k \frac{A_k}{1 - p_kz^{-1}}, \qquad A_k = \Big[(1 - p_kz^{-1})H(z)\Big]_{z = p_k}$$

and for a causal system each term inverts to $A_kp_k^n u[n]$:

$$h[n] = \sum_k A_k\,p_k^n\,u[n]$$

For two poles and a numerator of 1: $A_1 = p_1/(p_1 - p_2)$, $A_2 = -p_2/(p_1 - p_2)$. A complex pair $re^{\pm j\theta}$ combines into a real decaying sinusoid $r^n\cos(\theta n + \phi)$.

## Power series

Dividing the numerator by the denominator as polynomials in $z^{-1}$ gives h[0], h[1], h[2], … one at a time, useful for the first few samples or for checking. For $(1 + bz^{-1})/(1 - az^{-1})$: 1, a + b, a(a + b), $a^2(a + b)$, ….

## Initial and final values

For a causal sequence, $x[0] = \lim_{z\to\infty} X(z)$. The step response of a stable filter settles at H(1).

## Poles and zeros together

A zero on top of a pole cancels it: the mode disappears from the output. Filters that rely on exact cancellation are fragile, because coefficient rounding moves the zero slightly and the mode comes back.
:::

::: example
## Find h[n] for $H(z) = 1/((1 - 0.5z^{-1})(1 - 0.25z^{-1}))$.

::: solution
1. **Partial-fraction coefficients.**
   $$\begin{aligned} A_1 &= 0.5/(0.5 - 0.25) \\ &= 2 \\ A_2 &= -0.25/0.25 \\ &= -1 \end{aligned}$$
2. **Impulse response.**
   $$h[n] = 2(0.5)^n - (0.25)^n$$
   which runs 1, 0.75, 0.4375, 0.234, …
3. **Which mode matters.** The 0.25 mode is gone after a few samples; the 0.5 mode sets how long the filter remembers.

**Answer:** $h[n] = 2(0.5)^n - (0.25)^n$ for n ≥ 0.
:::
:::

::: example
## Find the first three samples of h for $H(z) = (1 + 0.3z^{-1})/(1 - 0.5z^{-1})$.

::: solution
1. **Long division.**
   $$\begin{aligned} h[0] &= 1 \\ h[1] &= 0.5 + 0.3 \\ &= 0.8 \\ h[2] &= 0.5 \times 0.8 \\ &= 0.4 \end{aligned}$$
   Each later sample is half the one before.
2. **Closed form.** For n ≥ 0:
   $$h[n] = 1.6(0.5)^n - 0.6\,\delta[n]$$

**Answer:** h[0] = 1, h[1] = 0.8 and h[2] = 0.4.
:::
:::

::: example
## Find h[n] for $H(z) = 1/(1 - 0.25z^{-2})$.

::: solution
1. **Factor the denominator.**
   $$\begin{aligned} 1 - 0.25z^{-2} &= (1 - 0.5z^{-1}) \\ &\quad \times (1 + 0.5z^{-1}) \end{aligned}$$
2. **Partial fractions.**
   $$H = \frac{0.5}{1 - 0.5z^{-1}} + \frac{0.5}{1 + 0.5z^{-1}}$$
3. **Impulse response.**
   $$h[n] = 0.5(0.5^n + (-0.5)^n)$$
   For even n that's $0.5^n$, and for odd n it's 0: 1, 0, 0.25, 0, 0.0625, …
4. **Check.** That's what the recursion $y[n] = 0.25y[n - 2] + x[n]$ gives directly.

**Answer:** $h[n] = 0.5(0.5^n + (-0.5)^n)$, which is $0.5^n$ for even n and 0 for odd n.
:::
:::

::: check
kind: parts
given: p1 = 0.8 | 0.6 | 0.9; p2 = 0.2 | -0.4 | 0.3

## $H(z) = 1/((1 - \given{p1}z^{-1})(1 - (\given{p2})z^{-1}))$ is causal.

::: part
answer: p1/(p1 - p2)
tolerance: 0.5%

### What is $A_1$, the coefficient of the {p1} mode?

::: misses
- [1/(p1 - p2)] Evaluate $(1 - p_1z^{-1})H$ at $z = p_1$: $1/(1 - p_2/p_1) = p_1/(p_1 - p_2)$.
- [any] Not yet. $p_1/(p_1 - p_2)$.
:::
:::

::: part
answer: -p2/(p1 - p2)
tolerance: 0.5%

### What is $A_2$?

::: misses
- [any] $-p_2/(p_1 - p_2)$.
:::
:::
:::

::: check
given: p1 = 0.8 | 0.5; p2 = 0.4 | -0.3 | 0.1; n = 2 | 3 | 5
answer: (p1^(n + 1) - p2^(n + 1))/(p1 - p2)
tolerance: 0.5%

## For the same kind of filter with poles {p1} and {p2}, what is h[{n}]?

::: right
Right. $A_1p_1^n + A_2p_2^n = (p_1^{n+1} - p_2^{n+1})/(p_1 - p_2)$ = {answer}.
:::

::: misses
- [p1^n + p2^n] Weight each mode by its partial-fraction coefficient.
- [any] Not yet. $A_1p_1^n + A_2p_2^n$.
:::
:::

::: check
kind: parts
given: a = 0.5 | 0.8 | -0.6; b = 0.3 | 1 | -0.5

## $H(z) = (1 + \given{b}z^{-1})/(1 - \given{a}z^{-1})$ is causal.

::: part
answer: a + b
tolerance: 0.5%

### What is h[1]?

::: misses
- [a] The numerator's $z^{-1}$ term adds b.
- [any] Not yet. Divide: h[1] = a + b.
:::
:::

::: part
answer: a*(a + b)
tolerance: 0.5%

### What is h[2]?

::: misses
- [any] Each later sample is a times the one before.
:::
:::
:::

::: check
given: b0 = 1 | 2; b1 = 0.5 | -0.4; a = 0.5 | 0.75
answer: (b0 + b1)/(1 - a)
tolerance: 0.5%

## $H(z) = (\given{b0} + \given{b1}z^{-1})/(1 - \given{a}z^{-1})$. What does its step response settle to?

::: right
Right. H(1) = {answer}.
:::

::: misses
- [b0/(1 - a)] Include the $z^{-1}$ term: at z = 1 it's just $b_1$.
- [any] Not yet. Evaluate at z = 1.
:::
:::

::: check
given: b = 1 | 3; c = 0.5 | 2; d = 0.4 | 0.8
answer: b
tolerance: 0.5%

## A causal filter has $H(z) = (\given{b} + \given{c}z^{-1})/(1 - \given{d}z^{-1})$. What is h[0]?

::: right
Right. $\lim_{z\to\infty} H = b$.
:::

::: misses
- [(b + c)/(1 - d)] That's H(1), the step response's final value.
- [any] Not yet. Let z → ∞.
:::
:::

::: check
given: r = 0.7 | 0.9 | 0.98; m = 10 | 20
answer: r^m
tolerance: 0.5%

## A causal filter's slowest mode comes from a pole at radius {r}. How big is that mode after {m} samples, relative to its start?

::: right
Right. $r^m$ = {answer}.
:::

::: misses
- [1 - r*m] The decay is geometric: multiply by r each sample.
- [any] Not yet. $r^m$.
:::
:::

::: check
kind: choice

## $H(z) = (1 - 0.5z^{-1})/((1 - 0.5z^{-1})(1 - 0.9z^{-1}))$. Which modes appear in h[n]?

- [ ] $0.5^n$ and $0.9^n$
- [x] Only $0.9^n$
- [ ] Only $0.5^n$
- [ ] Neither

::: misses
- [1] The zero at 0.5 cancels the pole at 0.5, so that mode never appears.
- [3] The 0.5 pole is the cancelled one.
- [4] The pole at 0.9 remains: $h[n] = 0.9^n u[n]$.
:::
:::

::: check
kind: parts
given: a = 0.5 | 0.8 | 0.9; b = 0.2 | -0.4; n = 2 | 3

## $H(z) = 1/((1 - \given{a}z^{-1})(1 - \given{b}z^{-1}))$.

::: part
answer: a/(a - b)
tolerance: 0.5%

### What is the partial-fraction coefficient of the {a} term?

::: misses
- [any] $a/(a - b)$.
:::
:::

::: part
answer: a/(a - b)*a^n + b/(b - a)*b^n
tolerance: 0.5%

### What is h[{n}]?

::: misses
- [any] $Aa^n + Bb^n$.
:::
:::
:::

::: check
kind: parts
given: a = 0.5 | 0.8; c = 0.3 | -0.6 | 1

## $H(z) = (1 + \given{c}z^{-1})/(1 - \given{a}z^{-1})$.

::: part
answer: a + c
tolerance: 0.5%

### What is h[1]?

::: misses
- [any] Long division: $a + c$.
:::
:::

::: part
answer: a*(a + c)
tolerance: 0.5%

### And h[2]?

::: misses
- [any] Each later sample is a times the one before.
:::
:::
:::

::: explain
## Why does each pole of a causal filter contribute a geometric sequence to the impulse response?

::: model
A pole at p comes from a factor $1/(1 - pz^{-1})$, which is the transform of the first-order recursion $y[n] = p\,y[n-1] + x[n]$. An impulse into that recursion comes out as 1, p, p², …, a geometric sequence. Partial fractions split a higher-order filter into a sum of such first-order pieces running side by side, so its impulse response is a weighted sum of their geometric sequences, one per pole. The pole's size sets how fast its term fades, and its angle sets how fast it oscillates.
:::
:::

::: practice

::: check
given: p1 = 0.6 | 0.9; p2 = 0.3 | -0.3
answer: p1/(p1 - p2)
tolerance: 0.5%

## $A_1$ for poles {p1} and {p2} (numerator 1)?

::: misses
- [any] $p_1/(p_1 - p_2)$.
:::
:::

::: check
given: a = 0.4 | 0.9; b = 0.2 | 0.6
answer: a + b
tolerance: 0.5%

## h[1] of $(1 + \given{b}z^{-1})/(1 - \given{a}z^{-1})$?

::: misses
- [any] a + b.
:::
:::

::: check
given: b0 = 1 | 0.5; a = 0.2 | 0.6
answer: b0/(1 - a)
tolerance: 0.5%

## Final step-response value of $\given{b0}/(1 - \given{a}z^{-1})$?

::: misses
- [any] H(1).
:::
:::
:::
