Where a signal becomes a number

The noise that was already a dither

A triangular dither of two uniform steps fixes the quantisation error's mean and power exactly, whatever the input. Circuit noise ahead of the converter is a dither too, and a Gaussian one fixes no moment exactly: the mean's dependence on the input becomes a sine of amplitude exp(−2π²σ²)/π, so its swing falls from 0.29 step at σ = 0.2 step to 0.108 at 0.3, 0.0046 at 0.5 and 4.0 × 10⁻⁵ at 0.7 — by six to nine times for each tenth of a step near half a step. The mean is steady to a hundredth of a step from σ = 0.456, the power to a hundredth of the quantisation's twelfth from 0.649. Gaussian noise of half a step costs a third more error power than the triangle and still leaves the power swinging by 0.016 step², but if the noise is already there, adding a dither on top costs 1.76 dB to fix a mean already steady to a part in two hundred.

Assumes: The floor a converter sets

One step of dither per moment found the rule a dither obeys: a dither built from nn uniform steps makes the first nn moments of the quantisation error independent of the input, and each step costs a twelfth of a step squared of error power. Two steps — the triangular dither — fix the mean and the power, and that is the usual recommendation. The essay ended on the dither nobody adds. A converter’s input already carries noise from the circuit in front of it, and that noise is a dither whether anyone intended it or not; but it is Gaussian, not a sum of uniforms, and the rule says nothing about it.

When a floor stops being a floor showed what is at stake. Without dither, an input that crosses few codes has an error locked to it, a distortion rather than a noise, and the floor is no longer a floor. The question here is how much front-end noise makes that impossible, and whether, once it is there, an added dither buys anything.

The mean, under Gaussian noise

The converter is a sixteen-bit mid-tread quantiser and the input is held fixed at a stated position between two codes, in units of one step. Gaussian noise of σ steps rms is added ahead of it, and the error’s mean given the input is computed three ways: summed exactly over the output levels the noise can reach, each with the probability the normal distribution gives it; integrated over the noise through the converter’s own rounding; and drawn from a seeded generator.

The quantisation error's mean, given where the input sits between codes, with Gaussian noise of 0.3 step rms ahead of the convertercomputed by solving, not by drawing: the mean of the error given the input, summed over the codes the noise can reach, held to the Fourier series with Φ(k) = exp(−2π²σ²k²) to 10⁻⁶, to an integration through the converter's own quantiser and to seeded draws. With no noise (dashed) the mean is the sawtooth, swinging a whole step. With 0.3 step rms (solid) it swings 0.1077 steps, against the series' leading term 2·exp(−2π²σ²)/π = 0.1077: the sawtooth has become nearly a sine, and a small one.-0.50000.50000.2000.4000.6000.8001where the input sits between two codes (steps)mean error given the input (steps)solved, then checked — integrated, summed and drawn0.108 steps of swing at σ = 0.3
Fig. 1 The quantisation error’s mean given where the input sits between two codes. With no noise (dashed) it is the sawtooth, swinging a whole step. With Gaussian noise of 0.3 step rms ahead of the converter (solid) it swings 0.1077 steps — the series’ leading term, 2e−2π2σ2/π2e^{-2\pi^2\sigma^2}/\pi, is 0.1077 — and is nearly a sine. The slider is the noise: 0.2, 0.3 or 0.5 step, swinging 0.2895, 0.1077 and 0.0046.

Without noise the error’s mean is the sawtooth itself: the error is exactly the distance to the nearest code, and it swings a whole step as the input moves between codes. With 0.3 step of noise the sawtooth is gone and in its place is something very nearly a sine, swinging 0.1077 steps. At 0.2 step it swings 0.2895; at 0.5, 0.0046.

The shape and the size both come from a closed form, and it is the reason the noise acts so abruptly. The error of a rounding quantiser is a periodic function of its input, and its Fourier series has harmonics at every multiple of the step. Averaging over a dither multiplies the kk-th harmonic by the dither’s characteristic function at kk, and for a Gaussian that is exp⁡(−2π2σ2k2)\exp(-2\pi^2\sigma^2k^2):

E[e∣x]=∑k≥1(−1)kπk e−2π2σ2k2sin⁡(2πkx).E[e \mid x] = \sum_{k \ge 1} \frac{(-1)^k}{\pi k}\, e^{-2\pi^2\sigma^2 k^2} \sin(2\pi k x).

At σ = 0.3 the second harmonic is already smaller than the first by a factor of about four hundred — half of e−3⋅2π2σ2e^{-3 \cdot 2\pi^2 \sigma^2} — so what is left is a sine of amplitude e−2π2σ2/πe^{-2\pi^2\sigma^2}/\pi, and its swing, twice that, is the 0.1077 the figure measures. The sum over codes agrees with the series to a millionth of a step at every input, the integration through the quantiser to two ten-thousandths, and the seeded draws to their own scatter.

How the dependence falls

How far the quantisation error's mean and power move with the input, against the Gaussian noise ahead of the converter. computed by solving, not by drawing. The mean's swing (solid): 0.1, 5.7e-1; 0.15, 4.2e-1; 0.2, 2.9e-1; 0.25, 1.9e-1; 0.3, 1.1e-1; 0.35, 5.7e-2; 0.4, 2.7e-2; 0.5, 4.6e-3; 0.6, 5.2e-4; 0.7, 4.0e-5; 0.8, 2.1e-6 steps. The power's swing (dashed): 2.5e-1, 2.5e-1, 2.4e-1, 2.0e-1, 1.6e-1, 1.1e-1, 6.3e-2, 1.6e-2, 2.5e-3, 2.6e-4, 1.7e-5 steps². From a quarter of a step the mean follows 2·exp(−2π²σ²)/π (dots), a factor of six to nine for each tenth of a step between 0.4 and 0.6. The mean moves by under a hundredth of a step from σ = 0.456, and the power by under a hundredth of the quantisation's own twelfth from σ = 0.649.
Fig. 2 How far the error’s mean (solid, steps) and power (dashed, steps²) move with the input, against the Gaussian noise’s σ in steps. The mean: 0.29 at σ = 0.2, 0.11 at 0.3, 0.027 at 0.4, 0.0046 at 0.5, 5.2 × 10⁻⁴ at 0.6, 4.0 × 10⁻⁵ at 0.7. The power: 0.24, 0.16, 0.063, 0.016, 0.0025 and 2.6 × 10⁻⁴. From a quarter of a step the mean follows 2e−2π2σ2/π2e^{-2\pi^2\sigma^2}/\pi (dots). It is steady to a hundredth of a step from σ = 0.456, and the power to a hundredth of a twelfth from 0.649.

The fall is Gaussian in σ, which is much faster than any power law. Below about a fifth of a step the noise does little: the mean’s swing is still 0.29 steps at σ = 0.2, a third of the sawtooth’s. From a quarter of a step on, the swing follows the leading term to three per cent, and it falls six to nine times for each tenth of a step between 0.4 and 0.6: 0.027 at 0.4, 0.0046 at 0.5, 0.00052 at 0.6, 0.000040 at 0.7.

The power’s dependence on the input falls the same way, a little later: 0.063 steps squared at 0.4, 0.016 at 0.5, 0.0025 at 0.6. Taking a hundredth as the line — a hundredth of a step for the mean, a hundredth of the quantisation’s own twelfth of a step squared for the power — the mean is steady from σ = 0.456 and the power from σ = 0.649. Front-end noise of two-thirds of a step does, to that standard, what a triangular dither does exactly.

Against the triangular dither

The comparison that matters is with the dither that would otherwise be added: two uniform steps, a triangular density with a standard deviation of 1/61/\sqrt 6 = 0.408 step, which fixes the mean and the power exactly.

The error's power given the input under Gaussian front-end noise of 0.25, 0.35 and 0.5 step, against a triangular dither of two steps. computed by solving, not by drawing. Triangular dither (dashed) holds the power at a quarter of a step² wherever the input sits. Gaussian noise holds it at the twelfth plus σ² on average — 0.1458 at 0.25, 0.2058 at 0.35, 0.3333 at 0.5 — and swings about that by 2.0e-1, 1.1e-1, 1.6e-2 steps². Triangular dither carries σ = 0.408 step and fixes the power exactly; Gaussian noise of half a step costs a third more power and still leaves it moving by 1.6e-2 steps².
Fig. 3 The error’s power given the input under Gaussian noise of 0.25, 0.35 and 0.5 step, against a triangular dither of two steps (dashed), which holds it at a quarter of a step² everywhere. The Gaussian noise holds it on average at the twelfth plus σ2\sigma^2 — 0.1458, 0.2058 and 0.3333 — and swings about that by 0.20, 0.11 and 0.016 steps².

Averaged over the input, the error’s power under Gaussian noise is exactly the twelfth plus σ2\sigma^2 — 0.1458 steps squared at a quarter of a step of noise, 0.2058 at 0.35, 0.3333 at a half — as it must be for a noise independent of the input. About that average it swings: 0.20 steps squared at a quarter of a step, 0.11 at 0.35, 0.016 at a half. The triangle holds a quarter of a step squared with no swing at all.

So as a dither chosen on purpose, the Gaussian is a poor one. Matching the triangle’s standard deviation, 0.408 step, leaves the mean swinging by about three hundredths of a step and the power by about six hundredths of a step squared; reaching the triangle’s steadiness to within a hundredth takes about two-thirds of a step, which is more error power than the triangle’s quarter. The triangle is efficient because its characteristic function has exact zeros at every integer: each harmonic of the error is not attenuated but removed. A Gaussian’s characteristic function is never zero; it only becomes small.

When the noise is already there

The comparison above assumes the designer is choosing. Most of the time the choice has been made: the front end has the noise it has, and the question is only whether to add a dither to it.

The noise a converter's error carries, against the front-end noise, with and without a triangular dither added on top. computed by solving, not by drawing; the power is the twelfth plus each source's σ². Front-end noise alone (solid): 0, 0.00 dB; 0.1, 0.49 dB; 0.2, 1.70 dB; 0.3, 3.18 dB; 0.4, 4.65 dB; 0.5, 6.02 dB; 0.6, 7.26 dB. With a triangular dither added (dashed): 4.77, 4.94, 5.42, 6.11, 6.92, 7.78, 8.65 dB. The mean's swing with noise alone: 1.0e+0, 5.7e-1, 2.9e-1, 1.1e-1, 2.7e-2, 4.6e-3, 5.2e-4 steps; with the dither added, read from seeded draws: 7.1e-3, 6.1e-3, 8.9e-3, 1.1e-2, 5.8e-3, 5.7e-3, 6.8e-3, which is the draws' own scatter. Above half a step of front-end noise the dither buys a moment that the noise has already fixed to a part in two hundred, and costs 1.76 dB for it.
Fig. 4 The error’s power above the bare twelfth of a step², against the front-end noise: the noise alone (solid), 0.49 dB at σ = 0.1, 1.70 at 0.2, 3.18 at 0.3, 4.65 at 0.4, 6.02 at 0.5 and 7.26 at 0.6; with a triangular dither added on top (dashed), 4.77 at no noise rising to 8.65. With the noise alone the mean swings 0.57 steps at 0.1 and 0.0046 at 0.5; with the dither added, under the seeded draws’ own scatter at every level.

With no front-end noise a triangular dither costs 4.77 decibels of error power over the bare quantiser, the price the earlier essay set. With front-end noise of half a step already present, the error power is 6.02 decibels above the bare twelfth from the noise alone, and adding the triangle on top raises it to 7.78 — 1.76 decibels more, to fix a mean the noise has already steadied to 0.0046 of a step, a part in two hundred. At six-tenths of a step the noise alone has the mean steady to five parts in ten thousand and the dither costs 1.39 decibels more for nothing measurable.

Below a quarter of a step the answer reverses. At a tenth of a step the noise alone leaves the mean swinging by 0.57 steps — barely better than no noise at all — and the dither’s 4.94 decibels against the noise’s 0.49 buys the whole of the steadiness the earlier essays were about. The crossover is near σ = 0.4, where the noise alone leaves the mean swinging by about three hundredths of a step and the dither costs 2.27 decibels to remove that.

What a bench can see of it

The budget figure’s dithered curve is read from seeded draws, thirty thousand per input, and its swing is between six and eleven thousandths of a step at every noise level — not because the triangle leaves that much, but because thirty thousand draws of an error spread over a step resolve a mean only to about half a step divided by the square root of thirty thousand. The same limit binds a bench. A measurement that averages N samples at a fixed input cannot see a residual mean smaller than roughly the error’s spread over N\sqrt N, and the window the square-root law has found that law itself holding only over a window of averaging lengths.

So the residuals the exact sums give at six-tenths of a step and beyond — five parts in ten thousand of a step, then four in a hundred thousand — are below what most measurements of a converter can resolve. That is the practical meaning of “effectively fixed”: not that the dependence is zero, but that a measurement of the length anyone makes cannot find it. The threshold of a hundredth used above is about where an average of a few thousand samples stops being able to tell.

What a step of noise is, in a real front end

A step of a sixteen-bit converter spanning two volts is 30.5 microvolts. Half a step of rms noise is fifteen microvolts, which the floor a resistor sets puts at the Johnson noise of about fourteen kilohms in a megahertz of bandwidth, and the floor a converter sets made the same comparison between a converter’s floor and its source’s, finding them equal at 18.8 bits for a kilohm in a hundred kilohertz. A sixteen-bit converter behind an ordinary amplifier at full bandwidth usually has half a step of noise or more at its input already; an eighteen- or twenty-bit converter behind the same amplifier has several steps. For both, the figures here say that an added dither buys nothing measurable and costs noise.

The case where the noise is too small is a converter of few bits behind a quiet source — twelve bits spanning ten volts has steps of 2.4 millivolts, and no ordinary circuit puts a millivolt of noise in front of it. There the input is effectively undithered, the error is a sawtooth locked to the signal, and the dither that is a decision is the right reading: one whole step, or two, added on purpose.

Why the triangle is exact and the Gaussian is not

The Fourier series makes the difference between the two dithers a property of one function each. A uniform dither one step wide has a characteristic function sinc⁡(u)=sin⁡(πu)/(πu)\operatorname{sinc}(u) = \sin(\pi u)/(\pi u), which is exactly zero at every non-zero integer; at the harmonics of the error, u=ku = k, it removes every one, and the mean’s dependence on the input is gone. The triangle is two uniforms added, with characteristic function sinc⁡2(u)\operatorname{sinc}^2(u), which is zero at the integers and has zero slope there, and the power’s dependence on the input turns out to involve the characteristic function’s derivative at the same points. That is the whole reason one uniform fixes the mean and two fix the power, written in the frequency domain.

A Gaussian’s characteristic function, e−2π2σ2u2e^{-2\pi^2\sigma^2u^2}, has no zeros anywhere. It does not remove a harmonic; it shrinks it, and by an amount that depends on σ squared in an exponent. That is why the Gaussian’s steadiness is never exact and why it improves so fast: half a step of σ multiplies the first harmonic by e−4.93e^{-4.93}, seven-tenths of a step by e−9.67e^{-9.67}. Every dither has a characteristic function, and this reading says what any of them will do — a rectangular dither of the wrong width, a sine-wave dither, the sum of several sources — before any converter is simulated.

What a signal sees

A conditional mean that depends on where the input sits between codes is, for a slowly moving signal, a distortion: as the signal sweeps across codes the mean error repeats once per step, a periodic function of the signal itself. When a floor stops being a floor measured that distortion’s share of the error rising to three-quarters at low amplitude. Gaussian noise does not remove it in steps; it turns the sawtooth, whose harmonics fall only as 1/k1/k, into nearly a pure sine of the signal’s position within a step, and then shrinks the sine. A small residual distortion therefore survives modest noise, but in a simpler form — one periodic component rather than a whole series — and at half a step of noise its size is a two-hundredth of a step, below the noise itself by a factor of a hundred.

A converter, worked

An audio converter of sixteen bits behind a microphone preamplifier sees, at full gain, a few steps of the preamplifier’s own noise. At two steps of σ the first harmonic is multiplied by e−79e^{-79}, which is no dependence at all, and adding a triangular dither would raise the noise by about a sixth of a decibel for nothing. The converter’s designer was right not to add one, and the reason is not that dither is unnecessary for audio but that the preamplifier has already supplied it.

A twelve-bit measurement system spanning ten volts, behind a buffered precision reference, has 2.4-millivolt steps and perhaps fifty microvolts of noise in front: σ is two-hundredths of a step, and the error is the sawtooth. That system needs a dither of a step or two added on purpose, and if its signals are slow, the subtracted dither one step of dither per moment priced at nothing.

Between them sits the case the figures are for: a converter whose front-end noise is between a fifth and two-thirds of a step. There the figures give the residual mean and power swing directly, and the decision is the one the budget figure draws — add the triangle and pay the decibels, or accept a residual of a few hundredths of a step that the noise leaves behind.

A moment at a time

The rule of the earlier essay was a count — one step per moment fixed. Gaussian noise does not fix moments one at a time; it attenuates every harmonic of every moment’s dependence at once, the kk-th by exp⁡(−2π2σ2k2)\exp(-2\pi^2\sigma^2k^2), and the higher moments’ dependences carry higher harmonics more strongly, which is why the power follows the mean by about a fifth of a step in σ. A Gaussian is an approximately-all-moments dither, never an exact any-moment one, and its quality improves with σ faster than any power. Six decibels a bit treated the quantisation error as noise of a twelfth of a step squared; with half a step of Gaussian noise in front, that treatment is right to a part in two hundred for the mean, which is the condition the earlier formula silently needed.

How the moments were computed

The quantiser rounds to the nearest of 65,536 levels spanning plus and minus one, and every input sits far inside the range so that clipping never enters. For Gaussian noise of σ steps the conditional moment of the error is the sum over codes of the error’s power at each code times the probability the normal distribution gives that code, with the normal integral computed from a complementary error function accurate to a part in ten million; codes within nine standard deviations are summed. The same mean is integrated by the midpoint rule on twenty thousand points through the converter’s own rounding, drawn forty thousand times from a seeded generator, and compared with the Fourier series summed to forty harmonics. A swing is the range over forty-one equally spaced input positions within one step. The triangular comparisons reuse the earlier essay’s integration of the Irwin–Hall density, and the dither added on top of Gaussian noise is drawn, because the sum of a Gaussian and a triangle is neither.

Still open: noise that is not white, unequal steps, and a dither that subtracts

Noise that is not white. A conditional moment is a statement about one sample. Front-end noise is filtered, so successive samples’ noise is correlated, and a slowly varying input sees an error whose mean is steady across many samples only if the noise decorrelates in that time. Whether flicker noise, which is large but slow, dithers a converter as well as its rms suggests is the same calculation with the noise’s spectrum in it.

Unequal steps. A real converter’s steps differ in width, and its error has a component no dither of any shape removes: the departure of each code’s width from the average. Gaussian noise of a few steps averages that over neighbouring codes, and the residual differential nonlinearity after such averaging, against the noise’s σ, is the measurement the earlier essay named and this one did not make.

A dither that is subtracted. A dither known to the system can be subtracted after the converter, and the earlier essay found one subtracted step fixing the error’s whole distribution for no cost in power. Front-end noise cannot be subtracted, but a small known dither added to it can, and whether a subtracted step on top of a quarter of a step of noise does better than either alone is a question with the noise and the dither in the same sum.

Part 6 on quantisation

One argument about Quantisation, and one of 7 essays on it so far, each part numbered by how much of the idea it assumes. What sits either side of it:

The quantisation error's power as a function of where the input sits, for four dithers. computed by solving, not by drawing; the error's mean square given the input, integrated over each dither's density through the converter's own quantiser, and checked against seeded draws to 6 × 10⁻³. Undithered it is the square of a sawtooth, x² up to half a step and (1 − x)² beyond. One uniform step makes it x(1 − x): zero at a code, a quarter of a step² between codes — the error's power is carried by the signal. Two steps (triangular) hold it at ¼ everywhere, and one step subtracted after the converter at 1/12 everywhere. Averaged over the input the prices are 3.01, 4.77 and 0.00 dB against the undithered 1/12. One step of dither per moment Part 5 — A whole step of uniform dither makes a quantiser's error average to zero wherever the input sits, and leaves its power at x(1 − x) steps²: zero at a code and a quarter between codes, so the noise rises and falls with the signal. Two steps — a triangular dither — hold the power at a quarter everywhere and leave the third moment swinging by 0.096 steps³; three steps fix that too. Each added step fixes one more moment of the error and costs a twelfth of a step² of power: 3.01 dB for one, 4.77 for two. Subtracted after the converter, one step fixes the error's whole distribution for 0.00 dB. Through 0.5 steps of noise an equal-step converter's mean error is 1.6e-3 steps rms; one whose steps differ by 20% keeps 1.754. computed by solving, not by drawing: the mean output of an 8-bit converter less its input, over twenty codes, as the expected number of thresholds below the input with Gaussian noise of σ = 0.5 steps added. Equal steps (solid): 1.62e-3 steps rms. Inner steps whose widths are seeded with a 20% spread and renormalised to a mean of one (dashed): 1.754 steps rms, and the same converter with no noise (faint), the bare staircase, 1.779. Noise turns the staircase into a smooth curve; with equal steps the curve is the straight line, and with unequal steps it is a straight line plus the wander the step widths add up to. The steps noise cannot even out Part 7 — Half a step of front-end noise makes an equal-step converter's mean transfer a straight line to 1.6 thousandths of a step. A real converter's steps differ in width, and the same noise leaves it 1.75 steps wrong, rms, over twenty codes — almost exactly the 1.78 its bare staircase had. Noise averages the step widths, but only over the few codes it spans: the residual differential nonlinearity falls as one over √σ, 0.098 steps through one step of noise and 0.020 through sixteen, where equal steps fall to nothing. Their running sum, the integral nonlinearity, is a random walk across the whole range, and noise barely touches it: 0.55 steps rms through one step of noise, 0.39 through sixteen. So averaging a static reading through one step of noise pays for about four readings and then stops at 0.55 steps, where equal steps go on falling as 1/√N to 0.016 at 4,096. Both residues are in proportion to the step spread — 0.55 and 3.4 times it, over forty seeded converters.

The objects named here

The third axis, after the field and the idea: the things themselves, and every essay that touches each one.

Closed formDesign tradeoffDitherNoise floorQuantisationSeeded generator