S7 · Lesson 17 · Filter structures
Direct forms, transposed forms, cascades of second-order sections, parallel forms and lattices, with their costs and their sensitivity to coefficient rounding
A system function says what a filter does; a structure says how it's computed, and in finite-precision arithmetic the two are not independent. The same eighth-order transfer function can be built as one long difference equation or as four little second-order sections in a chain, and with 16-bit coefficients the first might be unstable while the second works perfectly. This lesson lays out the standard structures, counts their multipliers and delays, and shows why practical IIR filters are almost always cascades of biquads, and why lattices appear wherever stability must be checked or guaranteed.
- The poles of a fourth-order narrowband filter (two pole pairs at radius 0.95, angles 0.2 and 0.25 rad) built in direct form, with its four denominator coefficients rounded to B fractional bits.
- With plenty of bits the poles sit where they were designed. Reduce B and the clustered poles scatter, and some can cross the unit circle.
- The same poles in two second-order sections would each move only slightly, because each section's coefficients depend on just one pole pair.
Predict
A sixth-order IIR filter with six zeros is built in direct form I and in direct form II. How many delay elements does each need?
Direct form I keeps separate delay lines for the input (6) and the output (6): 12. Direct form II, which puts the poles first and shares one delay line, needs only max(N, M) = 6, the minimum possible (it's canonic). Both use the same 13 multipliers. Direct form II's internal signals can be much larger than its input or output, which matters in fixed point.
Name it
Direct forms
For :
- Direct form I: zeros, then poles; M + N delays, M + N + 1 multipliers.
- Direct form II: poles, then zeros, sharing delays; max(M, N) delays (canonic).
- Transposed forms: reverse every branch and swap input and output; the transfer function is unchanged, but the order of additions, and so the rounding noise, differs. Transposed direct form II is common in floating point.
Cascade and parallel forms
- Cascade: , each a second-order section (biquad) with one pole pair and one zero pair; ⌈N/2⌉ sections. Poles move only with their own section's coefficients, so the cascade is far less sensitive to rounding than one high-order direct form, especially for clustered poles.
- Parallel: from partial fractions; zeros are set by how the sections add, so they're more sensitive.
Coefficient sensitivity
A high-order polynomial's roots are extremely sensitive to its coefficients when they're close together, and narrowband filters have clustered poles. In a biquad , rounding to B bits moves the radius to , a small, local change.
Lattices
An FIR lattice (or an all-pole IIR lattice) is a chain of stages with reflection coefficients . From , the step-down recursion takes and
repeated down to . The all-pole filter 1/A(z) is stable, and A(z) minimum phase, exactly when every : a stability test that needs no root finding. Lattices are used in speech coding and adaptive filters.
Worked example
Find the lattice coefficients of , and say whether 1/A(z) is stable.
Show the solution
- Last coefficient. .
- Step down. so = 0.4167.
- Stability. Both are less than 1 in magnitude, so 1/A(z) is stable.
- Check by rebuilding. as given.
Answer = 0.4167 and = 0.2, both less than 1 in magnitude, so 1/A(z) is stable.
Worked example
The sim's fourth-order filter, in direct form, has denominator coefficients −3.70306, 5.23305, −3.34201 and 0.814506. Why does it fail at modest word lengths when two biquads don't?
Show the solution
- Where the poles sit. Its four poles lie within 0.05 rad of each other near radius 0.95, and the polynomial's coefficients are large numbers whose small differences place the poles.
- Effect of rounding. An error of in one coefficient shifts the cluster by far more than that.
- Split into biquads. Each pole pair then depends on two modest coefficients only: and its partner.
- Rounding a biquad. Rounding 0.9025 to 8 bits gives which is harmless.
Answer in direct form a tiny error in one coefficient moves the whole tight cluster of poles a long way; in biquads each pole pair rests on two modest coefficients, and 8-bit rounding leaves the radius at 0.9499.
Worked example
Find the lattice coefficients of and decide whether 1/A(z) is stable.
Show the solution
- Last coefficient. .
- Step down. so .
- Stability. Both magnitudes are below 1, so the filter is stable.
- Check. Indeed its poles are a complex pair of radius .
Answer and , so 1/A(z) is stable.
Check
A direct-form IIR filter has M = 4 zeros and N = 4 poles. How many multipliers does it need?
Check
How many delays does direct form II need for M = 4 zeros and N = 4 poles?
Check
An order-7 IIR filter is built as a cascade of biquads. How many sections does it need?
Check
. What's the lattice coefficient ?
Check
A biquad's with r = 0.95 is rounded to 5 fractional bits. What pole radius results?
Check
Coefficients are rounded to 12 fractional bits. What's the largest possible rounding error?
Check
An order-8 IIR filter is built as a cascade of direct-form II biquads.
(a)
How many biquads does it need?
(b)
How many multipliers (five per biquad)?
(c)
How many delays?
Check
has complex roots.
Step 1
What is ?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is ?
Step 3
What is the radius of the poles of 1/A(z)?
Explain why
Why are high-order IIR filters built as cascades of second-order sections?
A high-order denominator written as one polynomial has coefficients that each depend on all the poles together, and when the poles are clustered, as in any narrowband filter, the roots of the polynomial shift dramatically for tiny changes in its coefficients. Rounding those coefficients to a finite word length can then move poles far from where they were designed, distorting the response or pushing a pole outside the unit circle. In a cascade of biquads, each section's two coefficients set only its own pole pair, so a rounding error moves only that pair and only by a little. The overall response stays close to the design, and stability can be checked section by section.
Practice
Keep practicing
10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.