The rounding a section keeps
Assumes: The corner that moved · One bit, and where the noise went
Zero in, and not zero out found the uncomfortable property of a fixed-point recursion clocked well above its corner: it does not settle to zero when its input does. An eighth-order Butterworth cascade at a twelve-bit word length, with its corner at a kilohertz and its clock at 48 kHz, sits 88 least significant bits from zero forever — the cascade being the bilinear-transformed Butterworth of the corner that moved, pre-warped at its corner — 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. Oversampling, which improves almost every other quantity in a sampled system, makes this one worse, because each section’s dead band is the quantiser’s step divided by twice the recursion’s own direct-current denominator, , and that denominator vanishes as the poles crowd towards .
The next two essays measured what can be bought by arranging the same arithmetic differently — the order of the sections in which section goes first, the word length in the word length that is not a threshold. Neither touched the rounding itself. Each section still took its accumulator, rounded it, and threw away what it had rounded off.
A section does not have to throw it away. The error a quantiser makes is known exactly at the moment it is made — it is the difference between the accumulator and the stored word — and it costs one register to keep. Adding the last two errors back into the next accumulator, with weights −2 and +1, is the cheapest change to a biquad that exists, and it removes the dead band outright, lowers the round-off floor by a factor that grows with the oversampling, and makes the noise model that the plain cascade broke true again.
Keeping the error instead of discarding it
A biquad in the form these essays use computes an accumulator from its inputs and its last two outputs, rounds the accumulator to the word length, and stores the rounded value as its output. Write the rounding error as , the stored value less the accumulator. The plain section then obeys
so its error reaches the output through — the section’s own recursion — and then through every section after it. That first factor is the one the same filter, rounded twice found decisive: an all-pole section with its poles near the unit circle has an impulse response whose energy is hundreds of times the impulse it was given.
Now let the section keep its last two errors and add to the accumulator before rounding. The same algebra gives
The signal path has not changed at all. Only the error’s path has, and it can be given any second-order numerator the designer likes. The choice made here is and , which makes the numerator : a double zero at , which is zero frequency. For a low-pass section clocked far above its corner that is exactly where is largest, so the zero sits on top of the pole pair’s gain and cancels most of it. The weights are a doubling and a unit, a shift and an add in any fixed-point machine, which is why the arrangement is worth having rather than merely possible.
The rounding errors still exist and are still the same size, a uniform step of a least significant bit. What has changed is where they go, and the move is the same one one bit, and where the noise went described for a modulator: a quantiser inside a loop whose error is fed back can have its noise pushed out of the band that matters. There the loop was the whole converter and the band was the signal’s. Here the loop is two registers inside one section and the band is near zero frequency, where a low-pass recursion’s gain is large.
Why no constant state survives
The dead band’s disappearance is not statistical, and it follows from the same identity in one line. A dead-band state is a constant output held by a constant rounding error with no input. Substituting into the section’s update with zero input,
and with the two error terms cancel, leaving . The direct-current denominator is small — it is 0.0167 for the first section at 48 times — but it is not zero for any stable section, so the only constant state is . The rounding still has to land somewhere, and it does, but no non-zero constant can hold itself up the way the plain section’s offset does.
The hero figure measures it. Each section was seeded eight least significant bits from zero and marched for nine thousand samples with nothing in. Plainly rounded the sections settled at 27, 50, 70 and 88 bits — each section’s dead band plus the offset the section before it passed on, as the earlier essay found. With the errors fed back, the largest excursion of any section’s output over the last two thousand samples is one least significant bit, and it is not a settled offset: the trace is zero almost everywhere, with isolated single-step departures that the next sample removes.
The identity says nothing about oscillating limit cycles, only about constant ones, and the residual one-bit steps are what is left of the oscillating kind. They do not grow with anything in this essay’s range. A full proof that no larger oscillation can sustain itself would need the section’s own state-space argument, and nothing here supplies it; the measurement is that none appeared from any of the seeds tried at any clock rate.
What oversampling no longer sells
The offset’s growth with the clock rate was the uncomfortable part of the earlier finding, and it is the part that error feedback removes most completely.
Plainly rounded, the cascade has no dead band worth the name at 8 times its corner — each section’s band is under one step and the filter settles to zero — and from there the offset climbs: 17 least significant bits at 24 times, 88 at 48, 411 at 96 and 754 at 128, with a fitted exponent of 2.27 against the square law the dead-band bound gives. At 128 times its corner a twelve-bit filter sits at eighteen per cent of full scale with nothing in it.
With the errors fed back the same cascade sits at one least significant bit at every one of the nine clock rates. The quantity that grew as the square of the oversampling is not reduced; it is removed, because the mechanism that sized it — a constant state that rounding returns to itself — no longer exists. An eighth-order low-pass clocked 128 times above its corner is a perfectly usable fixed-point filter once each section keeps its two errors, and without them it is not.
The floor, and the two models of it
The dead band is the zero-input symptom. With a signal present the same rounding is the round-off floor, and the noise transfer function predicts that too: inject a white sequence of variance at each section, pass it through that section’s noise transfer function and every section after it, and add the energies.
For the plain cascade at sixteen bits the prediction runs from 0.66 least significant bits at 8 times to 26.6 at 128 times — the same growth as the dead band, for the same reason, since both are the gain of near . With the error fed back the prediction falls with the oversampling, from 0.47 to 0.30. The double zero’s attenuation near zero frequency grows as the poles crowd closer to , so the faster the clock, the more of the recursion’s gain the zero cancels; the floor approaches the level of the last section’s own quantiser, which nothing after it filters.
The ratio between the two predictions is the improvement: 1.40 at 8 times, where the poles are not near enough to for the zero to matter much, and 89 at 128 times — 6.5 bits of floor, recovered by two additions and a shift per section. That is a better exchange than any word length the earlier essays could offer: the same 6.5 bits bought by widening the arithmetic would cost a seven-bit-wider multiplier and accumulator in every section.
A noise model that holds again
The more surprising result is in the measured dots rather than in the lines. The same filter, rounded twice’s companion measurement in zero in, and not zero out found that the white-noise model of rounding — each quantiser producing an independent uniform error of variance — fails below about fourteen bits for this filter, and in the direction that makes a filter worse than its budget.
At 48 times its corner, the plain cascade’s measured floor is 1.05 times the model’s at sixteen bits and 10.6 times at eight. The reason is the dead band again: a recursion whose band is many steps wide holds its state near a constant, and a quantiser fed a nearly constant input makes nearly the same error every sample, which is the opposite of independent. The error correlates with itself, sits at low frequency where is largest, and is amplified far more than a white sequence of the same variance would be.
With the error fed back, the measured floor is the model’s to within 2.3 per cent at every word length from six bits to twenty. The section can no longer hold a constant, so its quantiser never sees the same input twice in a row for long, and the errors it makes are scattered. That is the effect one step of dither per moment bought for a converter’s quantiser by adding noise ahead of it, obtained here without adding any: the decorrelating signal is the quantiser’s own previous error, which was going to be thrown away. The model’s own word-length boundary — the thing when a floor stops being a floor found in a converter’s quantiser, a step large against the signal’s own movement — has been moved below six bits for this filter by a change that never touched the word length. A designer can now budget the round-off with the arithmetic in the first two essays and expect the measurement to agree.
Where the error goes instead
A noise transfer function with a double zero at zero frequency cannot reduce the error everywhere: is 4 at half the clock, so each section’s error is sixteen times larger in power there than a white error would be. The question is what the rest of the filter does with it.
Near zero frequency the difference is enormous. The plain density at 10 Hz is 42.1 dB above a single quantiser’s, which is the recursions’ gain at low frequency stacked eight deep; the fed-back density there is −73.3 dB, 115 dB lower, because each section’s double zero cancels its own pole pair and leaves the remaining low-frequency gain of the sections after it working on an error that has already been shaped away.
The two cross at 8.02 kHz, eight times the corner, and above it the fed-back error is the larger. Near half the clock it is 12 dB above the plain one — exactly the factor of sixteen that gives the last section’s own error, which nothing after it filters. But the level there is 1.1 dB relative to one quantiser, 41 dB below where the plain error sat near zero frequency, and it is in the stopband of a low-pass whose purpose is to remove that band. A design that cares about its stopband floor — an anti-imaging filter ahead of a converter, say — would want the feedback weights chosen differently, and the next section says how.
The weights are a choice
The weights put the zero at zero frequency because that is where a low-pass section clocked far above its corner has its gain. They are not the only choice, and the general one is instructive. Choosing and makes the numerator equal to itself, so the error reaches the output through exactly one: the section’s own recursion is cancelled completely and its error is white at its output. That costs two genuine multiplies rather than a shift, and it needs the coefficients in the error path rounded too — so it inherits, in a smaller form, the coefficient problem the word length that is not a threshold measured.
A zero placed at the section’s own resonance rather than at zero frequency suits a band-pass, and complex weights are not needed: any real second-order numerator places a conjugate pair of zeros on the circle at an angle of the designer’s choosing. The choice puts both zeros at angle zero, where the multiplies vanish. For this cascade the poles sit at angles of 0.026 to 0.128 radians — the corner itself is 0.131 — so every pole pair is within an eighth of a radian of the zeros, close enough that a zero at cancels most of what a zero at the pole’s own angle would, and far enough that the cancellation is not complete, which is why the floor at 8× improves by only 1.40.
What the two extra registers cost, and what they do not fix
Each section gains two error registers and two additions, one of them shifted. The registers must hold the error at full accumulator width — the error is the part of the accumulator below the stored word, so it needs as many bits as the accumulator has beyond the word length. Nothing else in the section changes: the signal coefficients, the scaling of which section goes first, the ordering, and the overflow headroom are exactly what they were, because the signal’s transfer function is untouched.
Three things it does not fix. Coefficient quantisation is unaffected, since the coefficients are in the signal path; the direct form of the same filter, rounded twice is still unstable at sixteen bits with or without error feedback. Overflow is unaffected, and an overflow limit cycle — the large oscillation a two’s-complement wraparound can sustain — is a different mechanism from the dead band and needs saturation arithmetic, not error feedback. And the input’s own quantisation is not a section’s error at all; a converter’s step arrives already in the signal, as the floor a converter sets measured, and the filter passes it as signal.
The arithmetic, in one place
An eighth-order Butterworth cascade with its corner at 1 kHz: plainly rounded at 12 bits and clocked at 48 kHz, it settles 88 least significant bits from zero with no input, an offset that grows with the clock rate as an exponent of 2.27. With each section adding back its last two rounding errors with weights −2 and +1, the error reaches the output through , a constant state needs , and the output never strays more than one bit at any rate from 8× to 128×. At 16 bits the round-off floor goes from 26.6 to 0.30 least significant bits at 128×, 89 times or 6.5 bits, measured within 1% of the shaped prediction; and the white-noise model holds to 2.3% from six bits to twenty, where plain rounding broke it by 10.6 times at eight.
Still open: the stopband floor, the oscillating cycles, and the error register’s own width
A stopband that matters. The shaped error is 12 dB above the plain one near half the clock. For a filter whose stopband specification is close to its round-off floor, the weights that minimise the worst density over the stopband — rather than the total — are a minimax problem over two real numbers per section, and whether they beat the (−2, +1) choice by much is a number nobody has computed here.
Oscillating limit cycles. The identity removes constant states and says nothing about periodic ones. Searching every reachable state of one twelve-bit section for a periodic orbit, with and without the fed-back error, would turn the observed absence of anything larger than one bit into either a proof or a counterexample.
The error register rounded. The two registers here hold the error exactly. If they are themselves truncated to a few bits — the obvious economy — the fed-back error is no longer the error made, and the cancellation in the dead-band identity is no longer exact. How many bits the error register needs before the one-bit idle behaviour and the 6.5-bit floor survive is the implementation question this essay leaves to the next.
Part 6 on digital realisation
One argument about Digital realisation, and one of 6 essays on it so far, each part numbered by how much of the idea it assumes. What sits either side of it:
What links here
Essays that reach for this one mid-argument — the half of a link its own author cannot write down.
The objects named here
The third axis, after the field and the idea: the things themselves, and every essay that touches each one.
Biquad cascadeLimit cycleNoise floorNoise-shapingNumerical errorOversamplingQuantisationRealisation
- A floor, or five tones noise-shaping, oversampling, quantisation
- The levels the loop cannot shape noise-shaping, oversampling, quantisation
- The loop that is worse at full scale noise-shaping, oversampling, quantisation
- Two loops, and the mismatch between them noise-shaping, oversampling, quantisation
- Every derivative, and the one that is zero numerical error, realisation
- The band that closes with the order biquad cascade, realisation