When a floor stops being a floor
Assumes: The floor a converter sets · The distortion a linear model cannot have
The previous essay measured a quantiser’s signal-to-noise ratio and found the standard formula correct to a tenth of a decibel. It also listed the hypothesis that formula rests on and deferred it: that the error is noise — spread across the band, unrelated to the signal that produced it.
That hypothesis is not a small print. It is the difference between a converter whose imperfection sounds like a hiss and one whose imperfection sounds like the music, and the amplitude at which it stops holding is measurable.
The error is not random and never was
A quantiser is a deterministic function. Given a sample it returns the nearest level, every time, with no randomness anywhere. Calling its error “noise” is a modelling decision, and like every modelling decision on this site it has a range.
The range is easy to state qualitatively. When a signal sweeps across many levels between one sample and the next, the error takes essentially arbitrary values in (−q/2, +q/2) and successive errors are unrelated to one another — so a statistical description is a good one. When the signal barely moves between samples, the error is a slowly varying function of the signal, repeating exactly as the signal repeats, and a statistical description is describing something that is not there.
What is harder is to say where the change happens, and the trap is that the total error hardly changes at all across it. The root mean square of the error stays close to q/√12 the whole way down. Only its arrangement changes: from spread to concentrated, at frequencies that are harmonics of the input.
Measuring the arrangement
The measurement is a direct one. Take the error sequence, transform it, and add up the power sitting at the harmonics of the input — the second through the twelfth. Divide by the total.
Two constructional details decide whether that measurement is about anything.
The bins have to be the input’s harmonics, not the record’s first few. A record of 8,192 samples
holding 129 cycles has its input at line 129 and its third harmonic at line 387. Asking for lines 2
to 12 measures a part of the spectrum where nothing lives, and returns a small, smooth, entirely
meaningless number that falls with amplitude — which is what a first version did, in the opposite
direction from the effect. binPower evaluates the transform at named bins for this reason.
The tone has to be low enough that twelve harmonics fit. coherentCycles picks about a third of
the record, which puts the twelfth harmonic four times past half the sample rate, where it folds back
onto somebody else’s bin. The character sweep picks five tones between a sixty-fourth and a
twenty-eighth of the record instead, and the gate checks that twelve harmonics of the largest of them
stay inside the band.
With both in place:
| levels the input crosses | share of the error in harmonics |
|---|---|
| 230 | 0.29% |
| 128 | 0.53% |
| 64 | 0.84% |
| 26 | 1.18% |
| 13 | 23.7% |
| 5.1 | 30.4% |
| 2.6 | 62.9% |
| 1.3 | 76.5% |
The transition is not gentle and it is not at a round number: somewhere between twenty-six levels and thirteen the error stops being mostly spread and becomes mostly not. Below five levels the majority of what a data sheet would call the noise floor is at harmonics of the signal.
The result the sweep is drawn in levels for
The x-axis is the number of levels the input crosses rather than an amplitude in volts, and that is not presentation.
Run the identical sweep on a twelve-bit converter and on a sixteen-bit one and the two agree to the floor of the arithmetic — zero, at all eight points. The character of the quantisation error is a function of how many levels the signal crosses and contains nothing whatever about how many levels the converter owns.
That has a consequence worth stating in the language a designer uses. A sixteen-bit converter given a signal 90 dB below full scale is in exactly the state an eight-bit converter is in with a signal 42 dB down. More bits do not buy a better-behaved error at low amplitudes; they buy the same behaviour at a lower absolute level. The distortion products of a quiet passage in a twenty-four-bit recording are as much distortion as they would be in an eight-bit one, sitting further down.
It also explains a measurement practice that otherwise looks superstitious. A converter tested only at full scale is tested in the one regime where the noise treatment is sound, and the number it returns — the one the previous essay measured to a tenth of a decibel — says nothing about how it behaves on the signals it will actually see.
Adding noise on purpose
The repair is counter-intuitive in a way that survives explanation: add a small random signal to the input before quantising, and what comes out is better.
Not quieter. The signal-to-noise ratio gets slightly worse, necessarily, because a deliberate noise has been added to a signal. What changes is the error’s arrangement: the added noise makes the quantiser cross a step at moments unrelated to the signal, which breaks the correlation the whole problem consists of.
Measured on the same sweep, with uniform dither of varying size:
| dither | worst harmonic share | cost in signal to noise |
|---|---|---|
| none | 76.5% | — |
| 0.25 step | 52.1% | 0.26 dB |
| 0.5 step | 25.8% | 0.97 dB |
| 1 step | 0.34% | 3.03 dB |
| 2 steps | 0.31% | 7.10 dB |
| 4 steps | 0.32% | 12.41 dB |
One whole step is the answer, and less than one is nearly useless. A dither smaller than a step cannot make the quantiser cross one, so at a quarter of a step the error is still locked to the signal more than half the time and the cost — a quarter of a decibel — has bought almost nothing. That is the worst place on the slider to be: a design that added “a little dither” would pay and not be paid.
More than one step is the other error, and it is the expensive one. Two steps leaves the harmonic share where one step left it, at about three tenths of a per cent, and costs 7.10 dB instead of 3.03. Four steps costs 12.41 dB for the same result. The knee is sharp and it is at exactly one step, which is what makes it a design rule rather than a judgement.
Why one step, and not some other number
The knee at one step is a measurement, and it is worth saying what mechanism puts it there, because the reason is short and it predicts the shape of the table rather than merely agreeing with it.
The error is locked to the signal whenever the quantiser’s decision — which level is nearest — is decided by the signal alone. A dither of amplitude d moves the decision only for samples lying within d/2 of a decision boundary; every other sample rounds exactly as it would have. So a dither of half a step randomises the decision for half the samples and leaves the other half where they were, and half a locked error is still a locked error: the harmonics fall by about a factor of three in power, which is what the table shows between none and half a step.
At a full step every sample lies within half a dither of a boundary, whatever the signal is doing, so every decision has been made unpredictable and the lock is gone entirely. Below that the effect is partial. Above it the lock stays broken at every whole step and comes partly back between them, which is the dither that is a decision’s measurement rather than this one’s. That is a threshold rather than a trend, and it is why the table’s middle rows are the interesting ones: 52.1% at a quarter step and 25.8% at a half are not “not quite enough dither”, they are a fraction of the samples still locked, and the fraction is roughly the fraction of a step the dither is short by.
The cost behaves quite differently and it is worth noting the asymmetry. The dither’s own power adds to the error’s in quadrature, so it grows as the square of the dither amplitude while the benefit saturates at one step. That is the whole design rule, and it comes out of the two curves rather than out of a convention: the benefit has a knee and the cost does not.
Two routes, and what the second one is for
The dithered measurement is taken against the clean signal, not against the dithered one, and the distinction decides whether the table above means anything.
The dither is part of what the converter did. A reader wants to know how far the output is from the signal that was presented, and the signal presented was the clean one. Measuring against the dithered input would report the error of a converter that had been fed something else — and it would make dither look free, since the added noise would sit on the reference rather than in the error.
That is the same discipline as the noise field’s insistence that its two routes share only the netlist, and the same as the power field computing its neutral current twice from routes that share only the solve. A comparison is worth what its two sides do not have in common.
The shape this argument has, three fields apart
This is the third time this collection has found a linear description holding up numerically while describing the wrong object, and the three are worth putting side by side because the mechanism is the same each time.
The power factor of a rectifier’s current. A phasor calculation gives a displacement factor of exactly 1.000000 while the true power factor is 0.780, because a phasor describes a sinusoid and the current is not one. The calculation is not wrong; its object is not present.
The distortion of a small-signal model. A linear model has no distortion by construction, so asking it how much distortion a stage produces is asking a question its form cannot answer. It returns a clean answer to a question it has not been asked.
The noise of a quantiser at low amplitude. q/√12 is still the right root mean square. What it is the root mean square of has stopped being noise.
In each case the failure is invisible from the number, which stays plausible; and in each case the detection is the same — measure a property the model implies but does not compute. A phasor calculation implies a sinusoidal current, so measure the harmonics. A linear model implies no second harmonic, so measure the second harmonic. A noise treatment implies a spread error, so measure how much of it is at harmonics of the input.
Where the error goes instead, drawn as a spectrum
The tables above are integrals, and an integral hides the shape it integrated. It is worth naming what the spectrum of a locked quantisation error actually looks like, because the shape is what identifies the mechanism on a bench.
At low amplitude the quantised output of a sinusoid is close to a staircase with very few treads, and a staircase is an odd function of a sinusoid — so its Fourier series contains odd harmonics predominantly: third, fifth, seventh, falling slowly. That is the same series a symmetric limiter produces, and this collection has drawn it once already in the semiconductor field, where a differential pair’s even harmonics come out at 10⁻¹⁶ of the fundamental — the arithmetic’s floor rather than a small residue — because the device’s symmetry forbids them.
The consequence for a measurement is specific. A quantiser’s low-level distortion sits at odd multiples of the input, and above the third or fifth those multiples are usually above half the sample rate, so they fold. A converter tested with a tone at two fifths of Nyquist produces a fifth harmonic that lands back in the band at a frequency bearing no simple relation to the input, which is the origin of the “birdies” or “idle tones” a low-level converter measurement is full of.
That is the same folding the first essay in this field measured, arriving from inside the converter rather than from its input, and it is why the two halves of this field are one field: the sampling identity and the quantisation error are separate mechanisms that meet in every low-level measurement anybody makes.
What is not claimed
Two limits on the result above, stated because the field is new.
Uniform dither is one choice among several. The measurement here uses one step peak-to-peak of uniformly distributed noise, which is the standard rectangular dither and is what the table describes. Triangular dither of two steps peak-to-peak has a different and in some respects better property — it removes the dependence of the error’s own power on the signal as well as its correlation — at a cost of another 1.76 dB. That is a real distinction and it is not measured here.
Nothing here is about what a listener hears. The claim is about where the error’s power sits in frequency, which is a fact about the signal. Whether a distortion product at a stated level is more objectionable than a noise floor at the same level is a question about perception, and this collection’s boundary with the acoustics site puts it firmly on the other side.
The boundary this puts on the previous essay’s number
It is worth closing by restating what has been taken away, because the previous essay’s result stands and this one narrows it rather than contradicting it.
6.02N + 1.76 dB is the ratio of a full-scale sinusoid to the root mean square of the error, and that remains true at every amplitude — the arithmetic of a root mean square does not care how the error is arranged. What this essay establishes is that the denominator stops being a noise floor, and every use of the formula that treats it as one inherits the boundary.
Three such uses are common and all three are wrong below about thirteen levels.
The crossing that motivates the first of them is the floor a converter sets, where a quantiser’s floor and a source resistor’s are compared directly and found to cross at 18.80 bits — an arithmetic that assumes both are noise, and which this essay bounds from the other side.
Adding contributions in quadrature. A quantisation floor and a thermal floor add as squares because they are independent. A distortion product and a thermal floor do not: the product is at a known frequency, so a measurement resolving that frequency sees it at its full height rather than diluted across the band.
Trading bandwidth for resolution. Halving the bandwidth halves a noise floor’s power because the noise is spread. A harmonic of the input is not spread, and halving the bandwidth either keeps it entirely or excludes it entirely, depending on where it landed.
Reading an effective bit count. The previous essay defines effective bits by inverting the formula. Below the transition, the number it returns is still arithmetically correct and no longer describes a converter that would be interchangeable with a lower resolution one — the two have the same total error and put it in completely different places.
All three are repairable in one move, which is the dither the middle of this essay measures. One whole step, 3.03 dB, and the floor is a floor again at every amplitude the converter can represent — which is the reason dither is not an audio refinement but a condition for the arithmetic in the rest of the field to mean what it says.
Two circuits elsewhere in this collection are the same argument with the sign reversed, and reading them beside this one says what the difference depends on. Two thresholds because there is a floor has noise under a single threshold and wants it gone: a slow crossing is decided 22.7 times rather than once, and the repair is hysteresis measured in standard deviations of the noise — 3.57 of them — rather than in volts. A quantiser is a row of thresholds and wants the noise there. The difference is entirely what happens downstream: a converter’s output is averaged, by a filter or by a later stage, and averaging a dithered error recovers information a locked one has destroyed, while a comparator’s output is a decision that nothing averages and every extra transition is a whole event.
And one bit, and where the noise went is the case where a converter deliberately makes its error worse in total in order to move it: putting the quantiser inside a loop with an integrator takes the in-band noise down 8.99 dB per doubling of the rate against oversampling’s 3.01, at the cost of a great deal more error out of band. Both essays are about distribution rather than magnitude, and both are only available because the total is fixed and known — which is what this essay measures and why it has to come first.
Part 3 on quantisation
One argument about Quantisation, and one of 4 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 8 sharing most with it of 11.
The objects named here
The third axis, after the field and the idea: the things themselves, and every essay that touches each one.
Correlation timeDitherEffective bitsQuantisationTotal harmonic distortion