Where this page ends up: a ratio in split into one geometric sequence per pole. Watch the two sequences add, sample by sample, to the signal.
One sequence per pole
X(z) = 1/(1 − 0.25z⁻¹ − 0.125z⁻²), right-sided. Its poles are 0.5 and −0.25.
Two poles, 0.5 and −0.25. The cover-up gives each one a weight.
Describe this picture
A plane with the two poles of , right-sided, marked by crosses at 0.5 and −0.25, with the unit circle labelled “unit circle”, and beside it a plot of stems against sample . The clip plays by itself. It starts with the caption “Two poles, 0.5 and −0.25. The cover-up gives each one a weight.” The stems of pole 0.5 appear with dot heads, labelled “(2/3)·0.5ⁿ”, and the caption “Pole 0.5 gives (2/3)·0.5ⁿ: it starts at 0.667 and halves every sample.” Then the stems of pole −0.25 appear with square heads, labelled “(1/3)·(−0.25)ⁿ”, and the caption “Pole −0.25 gives (1/3)·(−0.25)ⁿ: it starts at 0.333, shrinks to a quarter and flips sign every sample.” Two readouts, the weight of pole 0.5 and the weight of pole −0.25, read “not yet”, then 0.667, then 0.333. Last, diamonds rise to the sums, labelled “x[n], their sum”, and the caption ends “Added, they give x[n] = 1, 0.25, 0.1875, 0.0781, …, the same numbers the recursion y[n] = 0.25y[n−1] + 0.125y[n−2] + x[n] gives for an impulse.”
After the clip a dotted vertical cursor over the stems, named “Sample n”, reads the two terms and their sum at any ; the hint reads “Drag along the samples, or use the arrow keys, to read the two terms and their sum at any n.” At the caption reads “n = 1: 0.333 − 0.083 = 0.250.”; at it gives .
Six rules, each one line from the sum
The z-transform (16.1) turned a sequence into a function , with a region of convergence, the ROC. This page does two jobs. It lists the rules that let me work on instead of on the samples, and then it goes back from to the samples.
Every rule is proved from the sum. I use the pairs of 16.1: for , and its left-sided partner.
Linearity. The sum is linear, so . The ROC contains at least the overlap of the two ROCs. It can be larger, if a pole cancels.
Delay. Put in the sum:
A delay by samples multiplies by . The ROC stays the same, except possibly at and at infinity. In particular, one delay box is .
Multiplying by . Write . Then
Wherever had a pole , has a pole at . The plane is stretched by the factor and turned by the angle of . Take and . Then , whose transform is . The pole moved from 0.5 to : with the plane turns half a turn.
Multiplying by . Differentiate the sum term by term: . Multiply by and the power goes back to :
Try it on , with . The derivative is , so
The ratio has the pole 0.5 twice. Running this ratio as a recursion with an impulse in gives the samples 0, 0.5, 0.5, 0.375, 0.25, 0.15625, and at to 5 is the same list.
Convolution. For the sequences and , the convolution sum from Discrete convolution (5.2) is . Put it into the z-sum and swap the order of the two sums. The delay rule turns the inner sum into , and what is left is
This is the rule of Properties of the DTFT (12.3), now at every in the ROC, not only on the unit circle. The ROC contains at least the overlap of the two. I will check it on numbers below.
The first sample. Suppose is causal, which means for . Then . Let grow without limit. Every term but the first carries a with and shrinks to 0, so
This is the initial value theorem. Take , which appears again below. At it is 1.263, at it is 1.025 and at it is 1.00025. It is heading for .
Every delay box is z⁻¹
In Difference equations (6.1) the equation was drawn as wires, delay boxes and gains. The delay rule says what each box does to the transforms: it multiplies by .
Read the diagram as algebra. The adder collects the input, the delayed and doubled input, and the delayed and halved output:
Collect the terms to get . With an impulse in, , so
The rest of the page goes the other way, from a ratio like this back to its samples.
One sequence per pole
Take
right-sided, with ROC . Multiply out the two brackets and you get the bottom on the left, so the factoring is right. The poles are 0.5 and .
The idea is the one from Properties and the inverse Laplace transform (9.2), done in . Split into one term per pole, with a weight for the pole :
To find , multiply both sides by and set , so that . The second term is multiplied by zero and vanishes. On the left what remains is . Likewise, setting , so that , gives .
Each term is a pair from 16.1, with its weight, so . Make a guess. The second pole is negative. What will its sequence do from one sample to the next? Then look again at the picture at the top of this page, which plays this split.
Pole 0.5 gives : it starts at 0.667 and halves every sample. Pole gives : it starts at 0.333, shrinks to a quarter and flips sign every sample, as you guessed. Added, they give , 0.25, 0.1875, 0.0781, …, the same numbers the recursion gives for an impulse. When the clip has finished, drag along the samples to read the two terms and their sum at any : at it is .
Check the answer another way. The two brackets are the transforms of and , and a product of transforms is a convolution. Convolve those two sequences and the first samples are again 1, 0.25, 0.1875, 0.078125, the same as the sum of the two terms. That is the convolution rule on real numbers.
SciPy does the splitting. residuez(b, a) takes the coefficients of the top and bottom in powers of and returns the weights r, the poles p, and a direct term k. The direct term is non-empty when the top is as long as the bottom or longer. For this , residuez([1], [1, -0.25, -0.125]) returns the weights 0.3333 at and 0.6667 at 0.5, and no direct term.
Three variations. A mirror pair of poles has mirror weights, as in 9.2, and the two terms add to a damped cosine. A repeated pole gives an term, the multiplying-by- row. For above, residuez returns the pole 0.5 twice, with the weights and 1 for the terms in and . And for another ROC the fractions are the same, but a pole outside the ROC gives a left-sided term , as in 16.1.
Divide, and the samples come out one by one
There is a method with no poles in it. Take from the diagram, where the input is an impulse. Divide the top by the bottom as with numbers, but with powers of , highest power first, which means first.
It works like dividing 1 by 7 on paper: each step gives one digit of 0.142857… Here each step gives one sample. Before you watch, make a guess. goes into once. What is left over?
Then watch each remainder: after the first step it is half the one before.
Divide, and the samples come out one by one
Y(z) = (1 + 2z⁻¹)/(1 − 0.5z⁻¹): 6.1's y[n] = x[n] + 2x[n−1] + 0.5y[n−1], with an impulse in.
Divide 1 + 2z⁻¹ by 1 − 0.5z⁻¹, starting from the highest power, z⁰.
Describe this picture
The division , which is 6.1’s with an impulse in, plays by itself. The division panel shows the divisor and the quotient growing term by term; a plot of square-headed stems against sample receives one stem per finished step. Two readouts, the steps done and the remainder, start at 0 and , with the caption “Divide 1 + 2z⁻¹ by 1 − 0.5z⁻¹, starting from the highest power, z⁰.” At step 1: “1 − 0.5z⁻¹ goes into 1 once: x[0] = 1. What is left is 2.5z⁻¹.” At step 2: “It goes into 2.5z⁻¹ 2.5z⁻¹ times: x[1] = 2.5, and 1.25z⁻² is left.” At step 3, with the remainder : “x[2] = 1.25. Each remainder is half the last one: the 0.5 in the loop.” Step 4 gives and leaves . The last caption is “x = 1, 2.5, 1.25, 0.625, 0.3125, …: 6.1’s impulse response, one sample per step of the division.”, and the readouts then read 5 and .
After the clip a slider named “Division steps” runs from 0 to 8, with the hint “Use the slider or the arrow keys to run the division for 0 to 8 steps.” At 6 steps the caption is “Step 6: x[5] = 0.15625, and 0.078125z⁻⁶ is left.”
What is left after the first step is . The quotient is 1, 2.5, 1.25, 0.625, 0.3125, …: 6.1’s impulse response, one sample per step of the division. Why does this give the same numbers as running the equation? After the first step, each remainder is times the sample just found, pushed one place later. That is what the delay box holds: the previous output, halved. Each step of the division is one pass of the loop.
For a recursion the division never ends. It gives the power series of a right-sided signal, one more sample for each extra step, and I stop when I have enough. For a left-sided signal I would divide in powers of instead.
The same by partial fractions has a direct term, because the top is as long as the bottom. residuez([1, 2], [1, -0.5]) returns the weight 5 at the pole 0.5 and the direct term . So , which gives 1, 2.5, 1.25, 0.625, … again: at , , and for it is . The initial value theorem agrees: as . A third method is to read the table by eye, when the ratio is simple enough.
Worked example
- Partial fractions. . The cover-up gives at and at , so for . The first seven samples are 1, 0.25, 0.1875, 0.07813, 0.04297, 0.02051 and 0.0105. Running the recursion and convolving with give the same list.
- Long division. gives the quotient 1, 2.5, 1.25, 0.625, 0.3125, 0.15625 and the remainders , , , , , . With
residuez, gives the same samples. - Initial value. at , 100 and is 1.263, 1.025 and 1.00025, tending to . For the first example’s the values are 1.027, 1.0025 and 1.000025.
- Multiplying by . . Its impulse response is 0, 0.5, 0.5, 0.375, 0.25, 0.15625, which is .
- Multiplying by . . The pole moved from 0.5 to .
Where you’ll meet this
Digital filters are described by ratios of polynomials in . Partial fractions split such a ratio into one first-order piece per pole, and each piece is one geometric sequence. A filter built from first-order sections in parallel is exactly that sum.
Long division is the checking tool: a few steps give the first samples of the impulse response without running any code, and they must agree with lfilter. The next pages use the same ratios to read behaviour from where the poles sit. See Transfer functions, poles and zeros (16.3), Stability and causality (16.4), where the left-sided terms matter, and The unilateral z-transform (16.5), where starting values enter through the delay rule.
The maths behind it · eigenvalues and eigenvectors
Splitting into partial fractions is a change of basis. The recursion’s state, written in the right coordinates, moves along independent directions, one per pole, each multiplied by its pole at every step. The poles are the eigenvalues of the recursion’s state matrix and the directions are its eigenvectors, which finishes the picture begun in 6.1.
The maths behind it · generating functions
The convolution rule is why sums of independent whole-number random variables are easy with generating functions (16.1). The distribution of the sum is the convolution of the two distributions, so its generating function is the product of theirs.
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| Linearity | ROC at least the overlap | |
| Delay | a delay box is | |
| Multiply by | poles move from to | |
| Multiply by | gives | |
| Convolution | ROC at least the overlap | |
| Initial value | causal | |
| Partial fractions | (+ direct terms) | |
| Each term | , or if is outside the ROC | 16.1’s pairs |
| Long division | divide in powers of | one sample per step; right-sided |
| SciPy | r, p, k = residuez(b, a) | k = direct terms |