Series

Digital realisation — the series

6 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

    Rounding a filter's coefficients and marching it in double precision leaves out 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
  6. Fed nothing, a 12-bit eighth-order cascade sits 88 least significant bits from zero; with its rounding error fed back, never more than 1. computed by solving, not by drawing. The same cascade with its corner at 1 kHz and its clock 48 times higher, each section's state seeded at eight least significant bits and every product rounded to 12 bits, marched with no input. Plainly rounded, the sections settle at 27, 50, 70, 88 least significant bits — a constant state survives whenever rounding returns it to itself, and each section's offset is the next one's input. With each section's last two rounding errors added back with weights −2 and +1, the error reaches the output through (1 − z⁻¹)²/A(z), a constant state y needs (1 + a₁ + a₂)·y = 0, and the only one is zero: the largest excursion over the last two thousand samples is 1, 1, 1, 1 least significant bit, single isolated steps rather than a settled offset.

    The rounding a section keeps

    A fixed-point biquad that remembers its last two rounding errors and adds them back with weights −2 and +1 before it rounds again sends its error to the output through (1 − z⁻¹)²/A(z) instead of 1/A(z). For a low-pass clocked far above its corner that double zero lands exactly on the recursion's largest gain. Fed nothing, an eighth-order 12-bit cascade at 48 times its corner sat 88 least significant bits from zero; with the error kept, a constant state needs (1 + a₁ + a₂)·y = 0, its only solution is zero, and the output never strays more than one bit at any clock rate from 8× to 128×. The round-off floor at 128× falls 89 times, 6.5 bits, for two additions and a shift per section — and the white-noise model, which the plain cascade broke by a factor of ten at eight bits, holds to 2.3% from six bits to twenty.

    part 6 · digital

All series