Concept

Quantisation — where it appears

Replacing a continuous value with the nearest of a finite set of levels, whose error is a floor of six decibels a bit plus 1.76. That floor stops being a floor when the signal is small or slow, whereupon the error becomes correlated with the signal and is heard as distortion.

Named by 10 essays across one field — each of them below, with the objects they name alongside it.

Where a converter stops measuring the signal and starts measuring the resistor. computed by solving, not by drawing. The quantisation floor is q/√12 and halves with every bit; the Johnson floor of a 1 kΩ source in 100 kHz is 1.266 µV and does not move. They cross at 18.80 bits. Below that the converter is the limit; above it the resistor is, and a further bit buys a more precise measurement of thermal noise. A resolution quoted without a source impedance and a bandwidth is not a resolution — which is the same sentence the instruments field makes about a probe.

The floor a converter sets

A converter's resolution is quoted as a number of bits, which is a property of the converter. What it can actually resolve is a property of the circuit in front of it, and the two cross: measured against the Johnson noise of a 1 kΩ source in 100 kHz of bandwidth, the quantiser is the limit up to 18.80 bits and the resistor is the limit above it. Past that crossing every further bit buys a more precise measurement of thermal noise.

digital · Quantisation
6.02 bits + 1.76 dB, measured — and the overload that is blamed on it. computed by solving, not by drawing. A coherent sinusoid is quantised and the ratio is read off the error sequence, never from the formula. One step inside full scale the two agree to 0.15 dB at every bit count from 8 to 16. Driven to exactly full scale the same converter measures 0.83 dB worse at 8 bits when driven to exactly full scale, and the reason is in the count beside it: 327 of 8192 samples hit the top code. A mid-tread converter's largest code is one step below full scale, so a sinusoid that reaches full scale is already overloading — half a step of overload, at the peak, where the error correlates with the signal. The loss halves with every bit for the same reason the clipped count does — 0.83, 0.47, 0.21, 0.06, -0.13 dB — and by sixteen bits it is inside the measurement's own scatter. The formula was never the approximation.

Six decibels a bit, and the half step blamed on it

Every converter data sheet quotes 6.02N + 1.76 dB and every bench measurement comes up short of it, which is usually explained by calling the formula an approximation. Measured one step inside full scale it agrees to 0.15 dB at every bit count from eight to sixteen. Driven to exactly full scale the same converter loses 0.83 dB at eight bits — because 327 of 8192 samples hit the top code, and a mid-tread converter's largest code is one step below full scale.

digital · Quantisation
The amplitude at which a converter's floor becomes distortion. computed by solving, not by drawing. The quantisation error is transformed and the power in harmonics of the input is measured directly, at the bins those harmonics occupy. Undithered, the share rises from 0.29% at 230 levels to 76.5% at 1.3: the error has stopped being spread and has become a deterministic staircase locked to the signal. The sweep is drawn against the levels the input uses rather than against volts because it is then the same sweep for every converter — a twelve-bit part and a sixteen-bit part agree here to 0.0e+0, so what decides the character of the error is how many levels the signal crosses and not how many the converter owns. With 1 least significant bit of dither the share stays under 0.34% at every amplitude, for 3.03 dB of signal to noise. Adding noise to a converter's input improves what comes out of it, which is true and sounds like it should not be — and the amount is one whole step, not "some": a quarter of a step leaves 52.7% and a half leaves 25.6%, because a dither smaller than a step cannot make the quantiser cross one.

When a floor stops being a floor

Quantisation error is treated as noise and behaves like noise while the input crosses many levels. As the amplitude falls it stops: measured at the bins its harmonics occupy, the share of the error's power sitting in harmonics of the input rises from 0.29% at 230 levels to 76% at 1.3. The floor has not moved. It has become a distortion product locked to the signal, and the fix is to add noise on purpose — one whole least significant bit, and no more.

digital · Quantisation
One bit, oversampled — and where the quantisation noise went. computed by solving, not by drawing. A first-order modulator is marched forward one sample at a time with a one-bit quantiser inside the loop, and the noise inside the band is read out of the transform of the error. It falls by 8.99 dB for every doubling of the oversampling ratio — measured 9.33, 10.12, 6.96, 9.54 — against 3.01 dB for plain oversampling, which is drawn beside it from the same starting point. The loop does not make less noise; it moves the noise out of the band, and at a ratio of 128 one bit is worth 9.18.

One bit, and where the noise went

Sampling faster spreads a fixed quantity of quantisation noise over a wider band, so the part inside the band of interest falls by 3.01 dB for every doubling — half a bit. Putting the quantiser inside a loop with an integrator does something different in kind: measured on a modulator marched forward one sample at a time, with its test tone inside the band the ratio is quoted over, the in-band noise falls by 8.99 dB per doubling. At an oversampling ratio of 128, one bit is worth 9.18 — and the octaves scatter by a decibel each, which is the loop telling the truth about what its error is made of.

digital · Noise shaping
A second integrator is 5.8 more decibels an octave, and a third 5.4 more. computed by solving, not by drawing. Modulators of order 1, 2, 3 marched one sample at a time with a one-bit quantiser, their in-band noise read from the transform of the error with the test tone a quarter of the way up the band. The measured slopes are 8.17, 13.93, 19.33 decibels per doubling of the oversampling ratio, against the 9, 15, 21 the white-noise argument predicts and the 3.01 plain oversampling gives. Each order is short of its own prediction by about a decibel, in the same direction, which is the error in the band not being white. The straight lines are each ladder's prediction drawn through its own first point, so what is compared is a slope against a slope.

The loop that is worse at full scale

A second integrator in a one-bit loop takes the shaping law from nine decibels an octave to fourteen, and a third to nineteen. What it charges is not in decibels at all: past six tenths of full scale the ratio starts falling, and a fourth integrator's states run away at seven tenths. The best input to a second-order modulator is 0.6 of the reference it is measured against — an amplitude boundary of exactly the kind this collection is built for, on the one object in the field that has no continuous output to draw.

digital · Noise shaping
What a cascaded modulator is worth, against how well its two paths match. computed by solving, not by drawing. Two first-order loops marched sample by sample at an oversampling ratio of 64, with the first stage's quantisation error taken as the difference between what its comparator said and what was presented to it — nothing here reads a state a real converter could not. Perfectly matched, the cascade gives 72.5 decibels against the first stage's own 47.5: second-order shaping out of two first-order loops, neither of which can be unstable. The gain with which the first error reaches the second stage is then given an error, and the flat left-hand half of the curve is the arrangement working. It costs three decibels at 5.29 per cent, which is a capacitor ratio — achievable, and not free, and not something the digital side can measure or correct.

Two loops, and the mismatch between them

The rung below marched single loops of second, third and fourth order and found the amplitude at which each stops working, falling with the order — which is why nobody builds a fourth-order single loop. The standard answer is two first-order loops with the first one's error fed to the second and differentiated back out, giving second-order shaping out of parts that cannot be unstable. The cancellation is between an analogue path and a digital one, and it is worth 25 decibels until the two differ by five per cent.

digital · Noise shaping
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.

digital · Digital realisation
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.

digital · Digital realisation
Against its own shaping the error is 17.4× tonal, not 51×. computed by solving, not by drawing. The share of an order-1 loop's in-band error sitting in its five largest lines, from 0.02 to 0.9 of full scale, with both nulls drawn. The lower level is 1.953 per cent — five lines of a FLAT error over 256 — and it is what this measurement has always been quoted against. The upper level is 5.74 per cent, which is what five lines of the loop's OWN shaping hold with no tone anywhere in them. Measured against the first the error is 51 times tonal at 0.02 of full scale and 26 at 0.9; against the second, 17.4 and 8.9. The direction survives the correction and the size does not.

A floor, or five tones

The field's sharpest statement about a one-bit loop is that three quarters of its in-band error sits in five lines, against the 1.953 per cent a white error would put in any five — a factor of thirty-eight. The comparison is to a white error, and a shaping loop exists to make its error anything but white. Measured against the loop's own transfer function, which the loop reproduces line by line to a part in five hundred when it is dithered, the same error is 17.4 times tonal at a fiftieth of full scale and 8.9 times at nine tenths. And 99.5 per cent of it at the quiet end is two harmonics of the input.

digital · Noise shaping
A whole number of steps: 1, 2, 3 and 4 agree to 7% and a step and a half is 1.9× worse. computed by solving, not by drawing. The upper panel is the share of the quantisation error sitting in harmonics of the input against the amount of dither added — the upper curve the largest share anywhere on the amplitude sweep, with the spread across the five tones each point averages drawn as a bar, and the lower curve that sweep's mean. Undithered the worst is 76.5 per cent. It falls steeply up to one whole step (4.70 per cent at three quarters, 0.34 at one) and then stops improving — but only AT whole steps. The sweep means at 1, 2, 3, 4 steps are 0.283, 0.297, 0.297, 0.301 per cent, flat to 7 per cent; at 1.5, 2.5, 3.5 they are 0.526, 0.345, 0.311, each above both whole steps beside it. The lower panel is what each costs in signal-to-noise ratio, with 10·log₁₀(1 + L²) drawn through it — the measurement is that curve to 0.118 dB everywhere, so the price is known in advance and only the benefit has to be measured. The choice is a corner and a comb: nothing here is minimised, something stops improving, and between the places where it has stopped it is worse again.

The dither that is a decision

One whole least significant bit is quoted everywhere as the dither, which makes a decision look like a constant. Swept, the axis is a corner and a comb. An eighth of a step leaves 64.5 per cent of the error locked to the signal and one whole step leaves 0.34; above that the sweep mean is 0.283, 0.297, 0.297 and 0.301 per cent at one, two, three and four steps and 0.526 at a step and a half, which fails at exactly the small amplitudes dither exists for. The price is 10·log₁₀(1 + L²) to 0.118 of a decibel, and four steps cost 12.41 for nothing.

digital · Quantisation

Named alongside it

The objects these essays reach for when they reach for this one.

Effective bitsOversamplingDesign tradeoffDynamic rangeNoise shapingTotal harmonic distortionBiquad cascadeDitherIdle tonesModel rangeNoise floorNumerical error

All concepts