S717 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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?

Name it

Direct forms

For H(z)=∑k=0Mbkz−k1−∑k=1Nakz−k:

  • 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: H(z)=∏kHk(z), each Hk 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: H(z)=∑kHk(z) 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 1−2rcos⁡θz−1+r2z−2, rounding r2 to B bits moves the radius to q(r2), a small, local change.

Lattices

An FIR lattice (or an all-pole IIR lattice) is a chain of stages with reflection coefficients k1,…,kN. From A(z)=1+∑aiz−i, the step-down recursion takes kN=aN and

ai(N−1)=ai−kNaN−i1−kN2

repeated down to k1. The all-pole filter 1/A(z) is stable, and A(z) minimum phase, exactly when every |km|<1: a stability test that needs no root finding. Lattices are used in speech coding and adaptive filters.

Worked example

Find the lattice coefficients of A(z)=1+0.5z−1+0.2z−2, and say whether 1/A(z) is stable.

Show the solution
  1. Last coefficient. k2=a2=0.2.
  2. Step down. a1(1)=0.5−0.2×0.51−0.04=0.4167 so k1 = 0.4167.
  3. Stability. Both are less than 1 in magnitude, so 1/A(z) is stable.
  4. Check by rebuilding. a1=k1+k1k2=0.4167×1.2=0.5 as given.

Answer k1 = 0.4167 and k2 = 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
  1. 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.
  2. Effect of rounding. An error of 2−9 in one coefficient shifts the cluster by far more than that.
  3. Split into biquads. Each pole pair then depends on two modest coefficients only: A1(z)=1−2(0.95)cos⁡(0.2)z−1+0.9025z−2 and its partner.
  4. Rounding a biquad. Rounding 0.9025 to 8 bits gives r=0.99992×0.95≈0.9499 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 A(z)=1−0.9z−1+0.64z−2 and decide whether 1/A(z) is stable.

Show the solution
  1. Last coefficient. k2=a2=0.64.
  2. Step down. a1(1)=a1−k2a11−k22=a11+k2=−0.91.64=−0.549 so k1=−0.549.
  3. Stability. Both magnitudes are below 1, so the filter is stable.
  4. Check. Indeed its poles are a complex pair of radius 0.64=0.8.

Answer k1=−0.549 and k2=0.64, 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

A(z)=1+0.6z−1+0.2z−2. What's the lattice coefficient k1?

Check

A biquad's a2=r2 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

A(z)=1+az−1+bz−2 has complex roots.

Step 1

What is k2?

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°.

Explain why

Why are high-order IIR filters built as cascades of second-order sections?

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.