Where a signal becomes a number

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.

Assumes: The floor a converter sets · The distortion a linear model cannot have

When a floor stops being a floor ends with a prescription: add noise on purpose, one whole least significant bit, and no more. It is the right answer and it is stated the way a constant is stated. A quarter of a step and a half a step appear in it as evidence that less does not work, and nothing above one step appears at all, so the axis on which “one, and no more” is a choice has never been drawn.

Drawn, it does not have the shape the phrase implies. There is no minimum anywhere on it. There is a corner: a place where the benefit stops arriving and the price carries on, which is a different kind of object and is decided differently.

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.
Fig. 1 The whole axis. Above, two readings of the share of the quantisation error sitting in harmonics of the input against how much dither is added — the worst point of the amplitude sweep with its spread across five tones drawn as a bar, and that sweep’s mean beneath it. Below, on its own scale, what each amount costs in signal-to-noise ratio, with 10·log₁₀(1 + L²) drawn through it. The benefit stops at one whole step, comes back at every half step between the whole ones, and the price never stops.

What is being swept, and against what

A twelve-bit converter is driven by a coherent sinusoid whose amplitude is set in levels the input uses rather than in volts, from 230 levels down to 1.3, which is the arrangement when a floor stops being a floor argues for at length: the same sweep in volts is a different sweep at every bit count, and asked in levels it is the same question of every converter.

Uniform noise of LL steps peak to peak is added at the input before the quantiser, and the error is measured against the clean signal rather than against the dithered one. That is the part that decides whether the answer is honest. The dither is something the converter did to the signal, so hiding it in the reference reports the error of a converter fed something else, and dither then looks free.

Two numbers come out of each run. The harmonic share is the fraction of the error’s power sitting at exact multiples of the input’s bin, evaluated at those bins directly rather than at the first few lines of the record. The cost is the signal-to-noise ratio with the dither minus the ratio without it, at the same amplitude.

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.
Fig. 2 One point on that axis, drawn in full: the undithered sweep rising from 0.286 per cent of the error in harmonics at 230 levels to 76.5 at 1.3, and the same sweep with one whole step of dither flat under 0.34 per cent from end to end. This is the picture the prescription came from, and every figure below is a question about the number chosen for it.

Sweeping in levels also makes the answer portable, and the sweep checks it: run the identical measurement on a twelve-bit converter and a sixteen-bit one and the two agree at every point to a part in a billion. What decides the character of the error is how many levels the signal crosses, not how many the converter owns, which is why “one least significant bit” can be a prescription at all rather than a number that has to be restated per part. It is the same portability six decibels a bit, and the half step blamed on it relies on when it measures the ratio one step inside full scale at every bit count from eight to sixteen and gets agreement to 0.15 decibels.

The price is a closed form, and it is the calibration

The cost half of the trade needs no measurement at all, and establishing that is what makes the benefit half worth measuring.

Uniform noise of LL steps peak to peak has L2L^2 times the variance of a step’s worth, and the quantiser’s own error has a variance of one step squared over twelve. If the two are independent the variances add, so the ratio falls by 10log10(1+L2)10\log_{10}(1 + L^2) — 0.97 decibels at half a step, 3.01 at one, 6.99 at two, 12.30 at four. Nothing in that derivation is about the converter.

Measured across thirteen dither amplitudes from an eighth of a step to four, at the top of the amplitude sweep, the departure from that expression is at worst 0.118 decibels. So the lower panel of the figure above is a two-route agreement of the kind one step computed twice insists on: an addition of variances with no converter in it, against a transform of an error sequence produced by a real quantiser fed real noise, sharing only the number LL.

That agreement is what licenses the rest. The price is known in advance and only the benefit has to be found, which is why the axis is worth sweeping and why the sweep is one-dimensional rather than two.

The benefit, which has no closed form

The other half has no expression to check against, and the shape of it is the reason “one, and no more” is right without being obvious.

From an eighth of a step upwards the worst harmonic share falls: 64.5 per cent at an eighth, 52.1 at a quarter, 41.9 at three eighths, 25.8 at a half, 12.4 at five eighths, 4.70 at three quarters, 1.22 at seven eighths, 0.337 at one whole step. That is a fall of nearly two hundred to one across a range of dither amplitudes spanning a factor of eight, and it is steepest in the last quarter of it.

The mechanism is the one the rung below states and does not sweep: a dither smaller than a step cannot make the quantiser cross one, so it does not break the lock between the error and the signal. It only makes the locked error noisier.

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. At 0.5 of a least significant bit the dither is too small to do it: the share still reaches 25.8%, because a dither smaller than a step does not make the quantiser cross one. It costs 0.97 dB and buys nothing, which is the worst place on this slider to be.
Fig. 3 Half a step, which is the worst place on the axis to stop. The dithered sweep still reaches 25.8 per cent harmonic — the lock is not broken — and it has already spent 0.968 decibels of ratio doing it. Everything paid for at this point is paid for and not delivered.

Halving it again does not make the position better in the way a cheaper failure usually is. What is being bought on this axis is the character of the error rather than a few tenths of a decibel, and a purchase that delivers none of it is not improved by costing less.

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. At 0.25 of a least significant bit the dither is too small to do it: the share still reaches 52.1%, because a dither smaller than a step does not make the quantiser cross one. It costs 0.26 dB and buys nothing, which is the worst place on this slider to be.
Fig. 4 A quarter of a step, worse still in the sense that matters: 52.1 per cent harmonic for 0.259 decibels. The cheapness is not a consolation, because the quantity being bought is the character of the error rather than a few tenths of a decibel, and none of it has been bought.

Above one whole step nothing further arrives at the whole steps. Taking the sweep’s mean rather than its worst point — a maximum over eight amplitudes carries the scatter of whichever one happened to be worst — the share reads 0.283 per cent at one step, 0.297 at two, 0.297 at three and 0.301 at four: flat to six per cent across a factor of four in dither. Meanwhile the price goes on exactly as the closed form says, 7.098 decibels at two steps and 12.406 at four.

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 4 least significant bits of dither the share stays under 0.32% at every amplitude, for 12.41 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.
Fig. 5 Four steps of dither. The harmonic share is 0.32 per cent, which is not distinguishable from what one step gives, and the ratio has fallen 12.41 decibels rather than 3.03. Two bits of a twelve-bit converter, spent on nothing.

So the decision is a corner rather than an optimum, and it is worth being precise about the difference. An optimum is where a cost and a benefit cross and it moves when either is reweighted. A corner is where one of them stops changing, and it does not move at all: no weighting of decibels against distortion puts the answer anywhere but at one whole step, because past it the benefit is constant and any positive weight on the price argues for less. That is a much stronger kind of answer than a trade, and it is only visible once the axis is swept.

And the amount is a whole number of steps, not merely at least one

The flat band above one step is flat only where it is sampled at whole steps, and sweeping the places between them is what says so.

The sweep means at a step and a quarter, a step and a half and a step and three quarters are 0.475, 0.526 and 0.387 per cent, against 0.283 at one step and 0.297 at two. Between two and three, two and a half reads 0.345; between three and four, three and a half reads 0.311. Every half step is worse than both whole steps beside it, and the penalty falls as the dither grows: 1.86 times a whole step’s value at a step and a half, 1.16 at two and a half, 1.05 at three and a half.

The last of those is smaller than the whole steps’ own spread — 0.283 to 0.301 is a band six per cent wide and 0.311 sits three per cent above the top of it — so only its sign is being claimed. The first is not marginal by any reading.

And it fails in exactly the regime the dither is for. At one whole step the harmonic share has no amplitude dependence left at all: 0.274, 0.297, 0.258, 0.287, 0.266, 0.262, 0.337 and 0.282 per cent from 230 levels down to 1.3, every one of them inside every other one’s error bar. At a step and a half the same sweep reads 0.267, 0.340, 0.322, 0.297, 0.340, 0.544, 1.026 and 1.072 — flat across the top and climbing by a factor of four over the last three amplitudes, which are the amplitudes an undithered converter is worst at. A fractional dither does not degrade the answer uniformly. It leaves a residual lock that appears where the lock was the problem.

The prediction that goes with it is short and the measurement is what tests it: a rectangular dither of width LqLq removes the error’s dependence on the signal when its own transform has zeros at the quantiser’s harmonics, which happens when LL is a whole number and not otherwise, and the residue left at fractional LL shrinks as the dither widens. Flat at 1, 2, 3 and 4; 1.86, 1.16 and 1.05 at the half steps between them. That is the shape predicted, measured on a sweep that was built to answer a different question.

So the answer is a corner and a comb, and the design rule gains a word. Not “at least one least significant bit”. A whole number of least significant bits, and one of them.

The dither the circuit already has

There is a second route to one whole step, and it arrives from a field that was not thinking about dither at all.

The floor a converter sets puts the quantiser’s floor q/12q/\sqrt{12} beside the Johnson noise of the source in front of it and finds where they cross: for a 1 kΩ source in 100 kHz of bandwidth, at 18.80 bits. Below that crossing the converter is the limit and above it the resistor is. The bandwidth in that sentence is not decoration — a noise floor without one is not a number, which is the whole of the bandwidth noise sees — and it carries through into everything below.

Uniform dither of LL steps peak to peak has an rms value of Lq/12Lq/\sqrt{12}, so a source whose own noise has rms σ\sigma is supplying L=σ12/qL = \sigma\sqrt{12}/q steps of dither whether anybody asked for it or not. Setting that to one gives σ=q/12\sigma = q/\sqrt{12} — which is the crossing condition, identically. The bit count at which a source’s noise becomes the limit is the bit count at which the source is providing exactly one least significant bit of dither. Not approximately: the two statements are the same equation with the terms moved.

Evaluated for that 1 kΩ source in a 2 V span, the equivalent dither is 0.0090 steps at twelve bits, 0.0359 at fourteen, 0.1437 at sixteen, 0.5746 at eighteen and 1.0004 at 18.80 — the same 18.80 that essay reports, reached without asking about noise floors at all.

So the prescription has a physical reading that the sweep alone does not give. A converter whose resolution sits well below its source’s noise floor is already dithered and needs nothing added; one whose resolution has overtaken that floor is not, and the amount it is short by is exactly the amount the crossing says it is short by in bits. A twelve-bit converter on a 1 kΩ source has a hundredth of the dither it wants, which is why the question arises for it at all, and a twenty-bit one on the same source has 2.3 steps — past the corner, on the flat part of the axis, paying for it in the ratio it was bought for. The instruments field’s sentence about a resolution quoted without a source impedance being no resolution turns out to price the dither as well as the floor.

The error bar on both halves, and the one that is zero

Every point above is averaged over several coherent test tones, for the reason the noise field averages over seeds, and both sweeps return the smallest and largest value across those tones as well as the mean. Reading them changes what can be said about the numbers in the paragraph above.

The undithered number has no error bar and the dithered one's is 120 per cent of itselfcomputed by solving, not by drawing. The same two sweeps, with the spread across the coherent tones each point is averaged over drawn as a bar. The undithered sweep's bars are not small; they are absent — every tone returns the same share to 7.8e-12 of the value, because a cycle count coprime with the record visits the same set of signal phases in a different order and the transform at a multiple of the tone's own bin is blind to the order. The averaging that sweep does is therefore free and buys nothing. The dithered sweep's bars run to 120 per cent of the value they sit on, worst at 13.0 levels where 0.266 per cent is really 0.137 to 0.457 — and it is averaged over 5 tones where five were asked for.100µ1m10m100m1levels the input usesshare of the error in harmonics, with its spread across tones131030100300no dither, and no spread at all1 LSB, with its spreadtones averaged5, of 5 asked forundithered spread7.8e-12 of the valuedithered, worst120% of the valueat13.0 levelsdithered headline0.266%its own range0.137–0.457%solved, then checked — the error bar on both halveszero against 120% of the value
Fig. 6 The same two sweeps with the spread across tones drawn as a bar at each point. The undithered bars are not small; they are absent. The dithered ones run to 120 per cent of the value they sit on, worst at 13 levels where 0.266 per cent is really 0.137 to 0.457. Drag the dither amount.

The undithered sweep’s spread is exactly zero — 7.8 × 10⁻¹² of the value at worst — and there is a reason rather than a coincidence. A coherent cycle count coprime with the record length permutes the sample phases: the set of instants at which the signal is sampled is the same set for every such tone, visited in a different order. The error at each sample is a function of the phase alone, and the transform of that error evaluated at a multiple of the tone’s own bin re-indexes to exactly the same sum whichever order the phases arrive in. So the harmonic share cannot depend on which coherent tone is used, and the measurement says so to eleven decimal places. Coherent sampling is doing the work there, and it is the same property the frequency a sample rate invents leans on when it differences two sequences at the arithmetic’s floor: an integer number of cycles in the record is not a convenience for the transform, it is what makes the record a complete statement about one period.

The averaging that sweep performs therefore buys nothing at all. It is free, it is correct, and it is not doing what it was put there to do — which is worth knowing precisely because it looks like the same construction as the noise field’s seed averaging and is not.

The dithered sweep is the opposite, and the permutation argument is what says why: the dither is a different random sequence at every tone, so nothing is being re-indexed. Its spread runs to 120 per cent of the value at 13 levels — where 0.266 per cent is really 0.137 to 0.457 — and its worst point at half a step, one, two and four steps is 100, 120, 86 and 107 per cent of the value it sits on. That is an error bar as wide as the number it belongs to, and it is the reason every claim above is made on the sweep’s mean rather than on one of its points: a single dithered reading of this quantity carries no information at the precision the comb is argued at.

This is also where the count of tones stops being bookkeeping. The two sweeps ask for five and the undithered one may have any number, since every tone gives it the same answer; the dithered one is an average over however many it actually got, and it got three until the stride that spaces them was found to be adding an odd number to an odd start, so that every second candidate came out even, was rejected for sharing a factor with a power-of-two record, and was never replaced. The count was reported nowhere and no assertion asked for it. It was found by reading the spread — the one number on this page that is an error bar rather than a measurement — and asking how many draws were in it.

The comb above is the part that moved. At three draws the half steps sat above the whole ones and the honest statement was that the ranking could not be resolved. At five they separate: 0.526 against 0.283 and 0.297 either side of it, with the amplitude structure at a step and a half plain in the last three points of its own sweep. The finding was there the whole time and the error bar was too wide to see it, which is the error that is a distribution’s argument arriving as a consequence rather than as a caution — and the near miss is the distribution the bench cannot see’s, in a simulation rather than on a bench.

Where the closed form for the price stops being the price

The two-route agreement on the cost was quoted at the top of the amplitude sweep. It does not hold at the bottom, and the reason is inside the derivation rather than beside it.

Adding variances assumes the undithered error really is one step squared over twelve. That is precisely the assumption which fails at small amplitudes, where the error is a deterministic staircase locked to the signal and several times larger than a step over root twelve. The quantity the dither’s variance is being added to is not the quantity the derivation named.

The price of a dither is a closed form only where the dither is not needed. computed by solving, not by drawing. What a dither costs in signal-to-noise ratio, at four amounts, against the levels the input crosses — with the flat lines being 10·log₁₀(1 + L²), which is what an addition of variances gives when the undithered error really is q²/12. Above 26 levels the measurement is those lines to 0.34 dB. Below them it is not, by up to 2.19 dB, and in both directions: the undithered error at the bottom of this sweep is a distortion product several times larger than q over root twelve, so the quantity the dither is being added to is not the one the derivation assumed. The half of the trade that looked like arithmetic has an edge too, and it is at the amplitude where the other half stops being optional.
Fig. 7 What the dither costs against the levels the input crosses, at four amounts, with the closed form drawn as a flat line for each. Above 26 levels the measurement is those lines to 0.34 decibels. Below them it departs by up to 2.19 decibels — and in both directions, so it is not a correction with a sign but a derivation that has stopped applying.

Both directions is the part worth dwelling on. At 1.3 levels a whole step of dither costs 2.16 decibels rather than 3.01, because the error it is being added to was already large; at 2.6 levels it costs 3.78 rather than 3.01. A correction that went one way could be absorbed into a margin. One that goes both ways is a statement that the model has a range, which is what every model has an edge asks of every model and what nobody had asked of this one.

The practical consequence is small and specific. The price of dither is predictable to a tenth of a decibel exactly where the dither is not needed, and is unpredictable by up to two decibels exactly where it is. A budget that prices dither at 3.01 decibels and applies that price across the whole input range is right at the top of it and out by two decibels at the bottom, in whichever direction the amplitude happens to fall.

The same measurement, one field over

The quantity being swept here has a twin in a device with no levels in it at all.

At 0.02 of full scale 99.5 per cent of the error is distortion; at 0.9 it is 27.4. computed by solving, not by drawing. Two shares of the same in-band error, against the input amplitude. The upper curve is the five largest lines, whatever they are. The lower one is the power at EXACT multiples of the test tone's bin — at 2× and 3× the input, the only harmonics that fit below a band edge sitting at 3.94 times it. At 0.02 of full scale the two coincide to 0.2 points: the error is distortion and nothing else. At 0.9 the harmonic part is 27.4 per cent against 51.3 in five lines, so most of what the five-line measure counts is the shaped noise piling up at the band edge. The measure and the mechanism part company as the input grows.
Fig. 8 A one-bit noise-shaping loop’s in-band error, split the same way: the five largest lines above, and the power at exact multiples of the input’s bin below. At a fiftieth of full scale 99.5 per cent of its error is harmonic distortion; at nine tenths, 27.4. The direction is the same as a bare quantiser’s and the mechanism cannot be, because a one-bit quantiser has one level to cross and crosses it constantly.

A floor, or five tones measures that loop against its own shaping rather than against a flat spectrum and finds the concentration real but three times smaller than the flat comparison reported. The loop reaches the same place by a different road, and it has no dither knob: what makes its error spread out is a large input rather than added noise, so the trade this essay prices does not exist there in the same form. Whether a small deliberate dither inside such a loop buys the same character for the same three decibels is an open measurement, and it is the obvious next one.

What this does not say

It does not revise the prescription so much as sharpen it. One whole least significant bit remains the answer; what changes is that “one” was carrying the weight of “a whole number”, and the half steps between the whole ones are where that shows.

It does not settle the shape of the dither. Uniform noise of one step peak to peak is one choice; triangular dither of two steps peak to peak is a different one with a different price — 4.77 decibels by the same variance argument — and a property this measurement does not test at all, which is that the modulation of the error’s power by the signal disappears rather than merely its harmonic content. Nothing here distinguishes the two, and the sweep would need a different statistic to.

And it does not extend below five draws. Every dithered number above carries an error bar between about half and one and a fifth of itself, so the whole-step band is flat at that resolution and the three-and-a-half-step excess of five per cent is at the edge of it. Only the sign of that one is claimed; the step-and-a-half excess of eighty-six per cent is not near any edge.

The number worth carrying

One whole step, 0.283 per cent, 3.03 decibels — and a whole number of steps rather than at least one, because a step and a half is 1.86 times worse and is worse where it matters.

The habit that goes with it is about constants that are decisions. A number quoted everywhere without its axis has usually had the axis swept once by somebody and then thrown away, and the shape of that axis is what says whether the number is a corner, an optimum or a convention. Sweeping it here found a corner, then a comb inside the flat part of the corner, and then — in the error bar the sweep produces as a side effect — the reason the comb had been invisible. The error bar was the most useful thing on the page and it was the one quantity nobody had read.

Part 4 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:

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 tradeoffDitherEffective bitsMeasurement errorModel rangeQuantisationSeeded generatorTotal harmonic distortion