The steps noise cannot even out
Assumes: The floor a converter sets
The noise that was already a dither found that a converter’s own front-end noise does a dither’s work. Gaussian noise of half a step or more makes the quantiser’s error, averaged over the noise, independent of where the input sits: the mean transfer becomes a straight line, the staircase disappears from every average, and the converter behaves as an ideal linear device with a little noise added. That result, like one step of dither per moment before it, was a result about a converter whose steps are all exactly one step wide.
No converter’s are. A converter’s thresholds are set by resistor strings, capacitor arrays or comparator offsets, each with its own tolerance, so the codes it produces are of slightly different widths — the departure of each from the average is its differential nonlinearity, and the running sum of those departures, the distance each threshold has wandered from where it should be, is its integral nonlinearity. That essay ended by naming the measurement it had not made: how much of a converter’s unequal steps a few steps of noise average away, and what is left. The answer separates the two nonlinearities cleanly, because noise reaches one of them and not the other.
The mean transfer, in closed form
A converter’s output is the number of thresholds its input lies above. With Gaussian noise of standard deviation added, each threshold is passed with probability , and the mean output is the sum of those probabilities:
That is exact for any thresholds, and it needs no sampling. The converter here has 256 codes; its 254 inner steps’ widths are seeded with a spread — 20 per cent of a step unless stated — and renormalised so that their mean is exactly one, which puts the thresholds where a real converter’s would be after its gain and offset are trimmed.
With equal steps, half a step of noise does what the earlier essay found: the staircase becomes a straight line through the input, and the mean error over these twenty codes is 1.6 thousandths of a step. With unequal steps the staircase becomes a smooth curve too, but not a straight one. It wanders, and the wander is almost the same size as the bare staircase’s error — 1.754 steps against 1.779. The noise has rounded off every step and done next to nothing about where the steps are.
The slider on the figure at the head of the page sets the noise to half a step, one or two. The equal-step curve is a straight line at all three; the unequal one keeps its wander at all three.
What noise averages: the step widths, over a few codes
The local part of the error is the slope of the mean transfer. An ideal converter’s slope is one; a staircase’s is zero between thresholds and infinite at them; noise smooths it, and the departure of the smoothed slope from one is the differential nonlinearity the noise leaves.
For equal steps the smoothed slope is the ripple of a Gaussian-blurred staircase, and that ripple dies faster than any power once the noise passes half a step — 0.010 at σ = 0.5, below a hundred-millionth at one. For unequal steps it does not die. It falls with a slope of about −0.5 on these axes: 0.098 steps at σ = 1, 0.062 at two, 0.040 at four, 0.020 at sixteen, which is about 0.44 times the step spread over .
That is the signature of averaging independent quantities. The smoothed slope at any input is a weighted average of the step widths near it, weighted by the Gaussian, and a Gaussian of steps averages about a number of widths in proportion to . Independent widths averaged over of them have a spread falling as . So noise does reduce the differential nonlinearity — by a factor of about two at one step, five at four, ten at sixteen — but at the pace of averaging, not at the pace of the ripple, and it never reaches zero.
What noise cannot reach: the running sum
The integral nonlinearity is a different object. Each threshold sits where the widths below it add up to, so the departure of threshold from where it should be is the sum of the first width errors: a random walk across the converter’s range, which wanders far from zero over tens of codes and comes back only because the widths were renormalised to end in the right place.
The walk’s excursions are tens of codes wide, and noise of a few steps smooths only on the scale of a few codes. Through one step of noise the integral nonlinearity is 0.550 steps rms, against 0.634 for the bare staircase — the small difference being the staircase’s own half-step ripple, which the noise removes. From there it barely moves: 0.534 through two steps, 0.511 through four. Only at sixteen steps of noise, when the Gaussian is wide enough to span the walk’s shorter excursions, does it fall appreciably, to 0.39, and by then the noise itself is sixteen steps — nearly four bits of a converter’s resolution spent on noise to remove a third of an error of half a step.
So the two nonlinearities are separated by scale. The differential is about individual steps, and noise of a few steps averages it as it would average any independent errors. The integral is about where many steps add up to, and noise averages only what it spans. A dither, which the earlier essays treated as the remedy for a quantiser’s error, is a remedy for the first and not the second. When a floor stops being a floor found quantisation error ceasing to behave as noise at small amplitudes; an integral nonlinearity never behaved as noise at any amplitude.
What averaging a reading buys
The practical consequence is for a converter used the way a measurement uses one: a static input, read many times, the readings averaged. With equal steps and a step of noise the average converges on the input as , which is the reason to add noise at all.
The equal-step converter’s averaged error falls without limit: 0.52 steps at four readings, 0.13 at sixty-four, 0.016 at 4,096 — resolution well below a step, bought with time. The unequal one falls for a few readings and stops. At four readings it is 0.76 steps, at sixty-four 0.565, and from there it does not move, because the error left is the mean transfer’s departure from a straight line, which no number of readings averages away. The variance is the converter’s noise plus a twelfth of a step in both cases — the steps’ unevenness hardly changes the scatter — so the crossover comes when the scatter over falls below the mean error, at about four readings.
A designer who expects averaging to buy resolution below a step is buying it only from the converter’s differential nonlinearity, and the integral nonlinearity sets a floor under the average that is half a step here. Six decibels a bit, and the half step blamed on it found a converter’s measured noise short of its ideal and the shortfall blamed on the half step; the floor here is the same kind of quantity, and it belongs to the thresholds, not to quantisation. The floor a converter sets found a converter’s useful resolution set by the circuit in front of it; the integral nonlinearity is a second limit set by the converter’s own thresholds, and averaging reaches neither.
Both residues follow the spread
The figures so far are one seeded converter. Over forty — eight seeds at each of five spreads — the two residues are both in proportion to the spread, and the constants are worth having.
The residual differential nonlinearity through one step of noise is 0.55 times the spread, so a converter whose steps differ by five per cent shows 2.8 hundredths of a step of it, and the noise has divided its step errors by about 1.8. The integral nonlinearity is 3.4 times the spread, and it is the larger by a factor of six at every spread. That ratio is a property of the random walk and of the converter’s length. A walk of 254 steps pinned at both ends wanders, rms over its range, by about — six and a half — times its step spread, and fitting a straight line through it, as a gain and offset trim does, removes its largest and slowest component and leaves about half, the 3.4 measured. A converter with more codes and the same spread has a larger integral nonlinearity in steps, by the square root of its length, and the same differential one.
What the floor is worth in bits
The averaging figure’s two curves can be read as resolution. An ideal 8-bit converter’s quantisation error, with no noise, is a step over — 0.289 steps rms — and that is the yardstick against which a converter’s bits are counted. With equal steps and a step of noise, averaging 4,096 readings brings the error to 0.016 steps, eighteen times smaller than the yardstick, which is about four bits more than the converter has: the familiar trade of oversampling and averaging for resolution, at a cost of a bit for every factor of four in readings.
With a 20 per cent step spread the floor is 0.55 steps, nearly twice the yardstick. Averaging does not merely fail to add bits; it cannot reach the eight the converter is labelled with, because the error it converges on is the integral nonlinearity, and that is larger than an ideal converter’s quantisation error. The converter’s resolution and its accuracy have come apart. Its codes are separated by one step, and a reading of a static input can be repeated to a sixtieth of a step by averaging; what that repeatable reading means, in terms of the input, is uncertain by half a step.
That distinction is the one a measurement has to keep straight. Averaging buys repeatability, which is a property of the noise, and the integral nonlinearity limits accuracy, which is a property of the thresholds. A spread of 20 per cent is not extreme: the largest of 254 independent step errors drawn with that spread sits near three spreads, about six tenths of a step, which is inside the half-step-to-one-step differential nonlinearity a modest converter’s datasheet promises. The integral nonlinearity it implies, about half a step rms and more at its worst, is what that datasheet’s other line is for.
Why this is the right split of a converter’s specification
Converter datasheets quote differential and integral nonlinearity separately, and the measurement here says why the separation is not bookkeeping. They respond differently to everything a system does around the converter. Noise and dither reduce the first and leave the second. Averaging reduces the first and leaves the second. A calibration against a known reference at a few points reduces the second — it straightens the long excursions — and leaves the first, which varies code by code faster than any few-point calibration can follow.
The dither that is a decision found that a dither’s amplitude is a choice that trades noise against the linearity of the mean, on a converter whose steps were equal. On a real converter the choice has a ceiling: past a step or two of dither the residual differential nonlinearity falls only as while the noise rises as , and the integral nonlinearity does not fall at all. The amount of dither worth adding is set by the converter’s own step spread rather than by the quantisation the earlier essays analysed.
Two routes to the mean
The closed form for the mean output is a sum of normal probabilities, and it is worth checking against what a converter actually reports. Its variance is checked in the averaging figure: computed from the exact distribution of output codes, it is 1.0833 steps² for equal steps through one step of noise — the noise’s one plus quantisation’s twelfth, exactly as the additive model predicts once the noise exceeds half a step. The same distribution, summed for its mean, is the closed form. And the equal-step mean error, 1.6 thousandths of a step at half a step of noise and below a hundred-millionth at one, is the earlier essays’ result reproduced by a different route: they measured it by drawing samples, and the sum of probabilities reaches it without drawing anything.
Why the widths were made to add up
Every converter here has its step widths renormalised so that they average exactly one step, and its integral nonlinearity is read from a straight line fitted through its interior. Both choices remove the errors a converter’s gain and offset trims would remove, and they are made so that what is left is the part no trim reaches. Without the renormalisation the thresholds’ random walk would end wherever it happened to, and the converter would show a gain error proportional to the walk’s end — a single number, which a two-point calibration corrects exactly and which says nothing about noise. With it, the walk is pinned at both ends, and the integral nonlinearity is the walk’s wandering between them.
That makes the measured integral nonlinearity a lower bound for a real converter’s. A converter that is not trimmed carries its gain error on top, and one whose step errors are correlated carries larger excursions than an independent walk. Neither changes the separation this essay draws, since both are long-range errors and both sit with the integral nonlinearity on the side noise cannot reach.
What the model leaves out
The step widths are independent. A real converter’s are not: a resistor string’s widths share the string’s gradient, which is a smooth integral nonlinearity on top of the random walk, and a binary-weighted array has its worst steps at the major carries — the transition from 0111 1111 to 1000 0000, where every bit changes at once. Both put structure into the step errors that the seeded spread here does not have, and a gradient is precisely the long excursion noise cannot reach.
The noise is white Gaussian and independent of the input. Front-end noise is filtered, so successive readings’ noise is correlated, and the averaging figure’s holds only for readings far enough apart in time to be independent; for flicker noise that may be a long time.
And the input is static or slowly varying. A fast input crosses many codes during one reading and averages the step widths itself, which is a dither of its own; a sine wave’s distortion from an integral nonlinearity is a question about harmonics, which this essay does not ask.
The numbers to keep
Through half a step of noise an equal-step converter’s mean transfer is straight to 1.6 thousandths of a step, and one whose steps have a 20 per cent spread keeps 1.75 steps of wander over twenty codes. Noise averages step widths over the codes it spans: the residual differential nonlinearity is about 0.44 times the spread over — 0.098 steps at σ = 1 for a 20 per cent spread. The integral nonlinearity barely moves: 0.55 steps rms at σ = 1, 0.39 at sixteen. So an averaged static reading improves for about four readings and stops at 0.55 steps, where an equal-step converter keeps falling as . Over forty converters the residues are 0.55 and 3.4 times the step spread.
Still open: a string’s gradient, the major carry, and noise that is not white
Step errors with a shape. A resistor string’s thresholds carry its gradient, a smooth bow under the random walk. The moments a layout has to match measured what a gradient and a bow do to a divider built from one array, and a converter’s threshold string is that divider repeated at every tap; the small leg of a large ratio found the random part of such a string’s ratios growing with the ratio. A gradient is a pure integral nonlinearity, invisible to noise, and a two-point calibration removes its linear part. How much of a real string’s nonlinearity a calibration at two, three or five points removes, against the random walk that no calibration of that kind reaches, decides how many calibration points a converter is worth.
The major carry. A binary-weighted converter’s worst differential nonlinearity is at the codes where many bits change together, and it repeats at every power of two. Noise of a few steps averages it as it averages any step, but the error is no longer independent from code to code, and whether a periodic step error is averaged as fast as a random one is a measurement on the same closed form.
Correlated noise as a dither. Filtered front-end noise changes slowly, so consecutive readings see nearly the same noise and average less than independent ones would. Whether a reading rate fast against the noise’s correlation time still averages the step widths as this essay’s white noise does, or sees each step’s own error for many readings in a row, is the question the noise’s spectrum answers.
Part 7 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 objects named here
The third axis, after the field and the idea: the things themselves, and every essay that touches each one.
AveragingDitherModel rangeNonlinearityQuantisation
- The average a square root pulls low averaging, model range
- The coefficient that is about one reading model range, nonlinearity
- The cycle a converter has to know averaging, model range
- The fifth a resistor adds model range, nonlinearity
- The loop that is worse at full scale model range, quantisation
- The noise a true-RMS meter reads low averaging, model range