Series

Digital realisation — the series

5 essays on one idea, from the one that introduces it to the one that assumes the rest.
  1. A 4 kHz Butterworth, mapped to 48 kHz two ways. computed by solving, not by drawing. The upper panel is the digital response on the unit circle; the lower one is where each analogue frequency lands. The bilinear transform compresses the axis as it approaches half the sample rate — -3.11% at a tenth of the rate and -15.2% at a quarter — so a design mapped straight through is -3.432 dB at its own corner instead of -3.010. Pre-warping puts that one frequency back exactly and no other: above it the pre-warped curve is the further of the two from the analogue prototype. It is a choice of where to be right, not a correction.

    The corner that moved

    The bilinear transform has to fit an infinite frequency axis onto a circle, so something must be compressed, and what is compressed is everything near half the sample rate. A 4 kHz Butterworth mapped to a 48 kHz clock is 3.432 dB down at its own corner instead of 3.010, and at a quarter of the sample rate the axis is 15.2% out. Pre-warping puts one frequency back exactly and no other — it is a choice of where to be right, not a correction.

    part 1 · digital
  2. A 8th-order Butterworth at 12 bits, as a cascade and as one polynomial. computed by solving, not by drawing. The open circles are the poles as designed, on the z-plane with the unit circle drawn. Filled marks are where they go once the coefficients are stored in 12 bits. A cascade of biquads keeps two coefficients per pole pair, so a rounding error moves that pair and nothing else: 8.43e-3, largest radius 0.97478. A direct form keeps one denominator whose coefficients are symmetric functions of every pole, so one rounding error moves all of them: 6.21e-1, largest radius 1.54393 — outside the unit circle, which is not an inaccurate filter but an unstable one. The two are the same filter until they are written down.

    The same filter, rounded twice

    The filters field measured two realisations of one analogue response and found the passband error growing as the 0.99 power of a component tolerance in a cascade and the 2.00 power in a ladder. The digital version of that argument comes out harder. At eighth order and sixteen bits, a cascade of biquads moves its poles by 6.6 × 10⁻⁴ and stays at a radius of 0.9748; the same filter written as one polynomial moves its poles to a radius of 1.4536, which is not an inaccurate filter but an unstable one.

    part 2 · digital
  3. Fed nothing, an eighth-order cascade sits 88 least significant bits from zero. computed by solving, not by drawing. Where each section of a 12-bit rounded cascade settles with zero input and a seeded state. Nothing decays to zero: a constant state survives whenever rounding returns it to itself, which needs only |y·(1 + a₁ + a₂)| ≤ q/2, and that denominator is small precisely because the corner is far below the sample rate. Each section's own band is 30, 31, 32, 33 least significant bits and the settled offsets are -27, -50, -70, -88 — accumulating, because a section's dead-band output is the next section's input and the next section passes direct current. In volts the offset halves with every bit added; in least significant bits it does not move at all.

    Zero in, and not zero out

    The rung below rounds a filter's coefficients and marches it in double precision, and its own list of what it did not do names the other half: the products are rounded too. Put that in and a twelve-bit eighth-order cascade fed nothing at all settles two per cent of full scale away from zero and stays there — and the offset does not shrink with the word length, it grows as the square of how far the corner sits below the sample rate, reaching eighteen per cent at a hundred and twenty-eight times.

    part 3 · digital
  4. Twenty-four orderings, and 11 of them are choices. computed by solving, not by drawing. Every ordering of the four sections of an eighth-order 0.5 dB Chebyshev, at 16 bits, drawn against the two things an ordering decides. The horizontal axis is the round-off floor the arrangement adds — 24.2 least significant bits at best and 99.8 at worst. The vertical axis is the largest value any section's output reaches, which is what decides whether a word overflows: 0.088 of full scale at best and 0.699 at worst, a range of 18.0 decibels. 13 of the twenty-four are beaten on both counts by another ordering and are simply mistakes; the 11 on the lower-left frontier are the actual choices, and no one of them is best.

    Which section goes first

    A cascade of four biquads can be assembled in twenty-four orders, all of which realise exactly the same transfer function. They do not cost the same: the round-off floor runs from 24 to 100 least significant bits and the largest value any section reaches runs over eighteen decibels — and the two go opposite ways, so eleven of the twenty-four are genuine choices and thirteen are beaten on both counts by another arrangement.

    part 4 · digital
  5. The direct form works at 28 bits and fails again at 29. computed by solving, not by drawing. The largest pole radius of an order-8 Butterworth at a 1 kHz corner and a 48 kHz clock, at every coefficient word length from 6 to 40 bits, for both realisations. Above the unit circle the filter is not inaccurate but unstable. The direct form is outside at 23 of the 35 word lengths drawn; the cascade at none of them, its worst radius being 1.000000. The failures are not an interval: 28 bits works and 29 bits does not, so the smallest word length that works is 1 below the largest that does not and a search for the crossing has no crossing to find. The direct form's curve is clipped at 1.24: a radius of 4.5 and a radius of 1.01 are the same verdict.

    The word length that is not a threshold

    The essay below this one measured an eighth-order direct form at five word lengths, found its poles outside the unit circle at every one, and left behind a phrase — the coefficient resolution required. Sixty word lengths later there is no such resolution. That filter is stable at 28 bits, unstable at 29 and stable again at 30, and the smallest word length a search would return is not one anybody can use. What survives is a law with a slope: 4.53 bits of coefficient for every pole added, rising to 47 bits at twelfth order, and none at all for a cascade.

    part 5 · digital

All series