Where a signal becomes a number

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.

Assumes: The floor a converter sets · The frequency a sample rate invents · The floor a resistor sets

The quantisation field so far has treated the error’s total power as fixed by the step size and nothing else, which it is. What has not been asked is where that power sits, and the answer turns out to be the most useful degree of freedom a converter has — enough that a one-bit quantiser can outperform a sixteen-bit one, at the same total error, by putting the error somewhere else.

One bit, oversampled — and where the quantisation noise wentcomputed 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.0204060oversampling ratioin-band signal to noise (dB)8163264128shaped: 8.99 dB an octaveplain: 3.01 dB an octavequantiserone bitinput-6.0 dBFSper doubling8.99 dBplain oversampling3.01 dBat OSR 12857.0 dBwhich is9.18 bitssolved, then checked — one bit, marched8.99 dB an octave against 3.01
Fig. 1 Two laws on one axis. The dashed line is plain oversampling: a fixed error power spread over a wider band, so the part inside the band falls by 3.01 dB per doubling. The measured curve is a first-order modulator with a one-bit quantiser, marched forward one sample at a time. The slider is the input amplitude.

The cheap half: oversampling

Start with the version that needs no loop. A quantiser’s error has total power q²/12 whatever the sample rate, and the sampling spreads it evenly from zero to half the rate. Its density is therefore (q²/12)/(fₛ/2), which falls as the rate rises.

If the signal of interest occupies only a band of width B at the bottom, the error inside that band is the density times B — so doubling the sample rate halves the in-band error power, which is 3.01 dB, which is half a bit.

That is a real and useful effect and it is also a poor exchange rate. Buying four bits by oversampling costs a factor of 256 in clock, and the analogue front end has to be that fast, and every stage after it has to consume samples that fast. It is the reason plain oversampling is used for one or two bits and not for six.

The site has an adjacent result worth putting beside it, because the arithmetic is the same and the conclusion is the opposite. The noise field measured what block-averaging does to a white sequence and found the spread falling as n0.510n^{-0.510} — the n\sqrt{n} law, which is the same 3 dB per doubling in a different currency. It also found that a 1/f sequence falls as n0.087n^{-0.087}, which is very nearly not at all. Both are statements about how a fixed quantity of noise behaves when it is redistributed, and the point of this essay is that a loop can redistribute it deliberately.

The loop, and what it is made of

The modulator is three parts and no arithmetic worth the name.

A difference between the input and the last output. An integrator, which is a running sum. A one-bit quantiser, which is a comparator: output +1 if the integrator is at or above zero, −1 otherwise. The output feeds back into the difference.

integrator += x[k] − y[k−1]
y[k] = integrator ≥ 0 ? +1 : −1

That is the whole of it, and it is marched forward one sample at a time in sigmaDelta exactly as written. There is no transfer function anywhere in the measurement, for the same reason the site’s step responses are computed twice — once from residues and once by walking the network forward — and only the second route can be wrong in a way the first would not reveal.

The intuition for why it works is short. The integrator accumulates the difference between what was asked for and what was delivered, and the comparator is driven by that accumulated difference. So an error made now is corrected later: the loop cannot reduce the error at any one sample, because the output is one of two values, but it can arrange for the errors to cancel over several samples. Cancelling over several samples is a high-pass operation on the error sequence, which is to say the error’s power has been pushed towards high frequencies and out of the band at the bottom.

Nine decibels an octave, measured

The measurement reads the in-band noise out of the transform of the error sequence — the modulator’s output minus its input, sample by sample — and excludes the bin the signal occupies.

oversampling ratio in-band signal to noise gained
8 21.1 dB
16 30.4 9.33
32 40.5 10.12
64 47.5 6.96
128 57.0 9.54

8.99 dB per doubling on average, against plain oversampling’s 3.01. The value is not put in anywhere: the modulator is three lines of arithmetic containing no filter, no coefficient and no frequency, and the nine decibels come out of the transform of what it produced.

The scatter in the last column is a decibel either way and is not measurement noise. It is the loop’s error failing to be the white noise the derivation below assumes, and the second rung of this argument measures exactly how badly: three quarters of a first-order loop’s in-band error sits in five lines, at harmonics of the input.

Where the nine comes from is worth one line, since the site’s habit is to check a closed form rather than to quote it. The loop’s error transfer function is 1 − z⁻¹, whose magnitude near direct current rises as the first power of frequency, so the error density rises as f and its power density as f². Integrating f² from zero to B gives B³, so halving the fractional bandwidth divides the in-band power by eight — which is 9.03 dB. The measurement’s mean of 8.99 lands on it and none of the four individual octaves does, which is the honest form of the result: the law is a law about an average of this loop’s behaviour and not about any one octave of it.

The gate holds three things about this rather than one: that the mean is between 8 and 10.5, that every doubling is worth more than a whole bit (which plain oversampling’s half is not), and that the result is more than 2.5 times plain oversampling’s 3.01 dB — so a change that quietly turned the shaping off would fail rather than drift.

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 7.50 dB for every doubling of the oversampling ratio — measured 6.06, 7.76, 7.37, 8.81 — 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 6.33.
Fig. 2 The same two laws at a fifth of the amplitude, −20.0 dBFS. The shaped loop gives 7.50 dB per doubling of the oversampling ratio rather than the 9.03 the first-order theory promises, and reaches 39.9 dB at a ratio of 128. The shortfall is the loop’s own idle behaviour at small inputs, and it is measured rather than assumed.

Reading the measurement honestly

Three properties of the measurement decide whether the table above is about a modulator or about the way it was measured, and each is worth a sentence.

The signal’s own bin is excluded from the noise. Obvious, and easy to get wrong in the other direction: excluding a neighbourhood of the signal bin would also remove whatever the loop put adjacent to it, which is exactly where a first-order modulator’s low-frequency error concentrates. One bin is removed, not a window, so nothing the loop did near the signal is quietly discarded.

The input frequency is coherent with the record. The same construction as the rest of the field: an odd number of cycles, coprime with the record length, so the signal lands in one bin without a window and the error’s own spectrum is not smeared by leakage into it. Without this the excluded bin takes some of the error with it and some of the signal leaks into the noise, and the two errors do not cancel.

The test tone is inside the band. Stated last because it was got wrong first, and the error was invisible from every direction but one. The tone was placed by the same helper the rest of this field uses for a coherent record, which chooses a cycle count near a third of the record — putting it at a third of the sample rate, which at a ratio of 64 is 853 kHz against a band of 20. The ratio being reported therefore had a numerator that was not in the band its denominator was summed over, and the number it gave was 88.6 dB where the same loop driven inside its own band gives 47.5. A large out-of-band input dithers a one-bit loop thoroughly; it is a real technique for measuring a loop’s shaping, and it is not a measurement of a converter. Every number in this essay is now taken with the tone a quarter of the way up the band.

The band edge is a bin count, not a frequency. The in-band noise is the sum over bins below B·n/fₛ, which is an integer, so as the oversampling ratio doubles the number of bins summed halves exactly. A version that computed the band edge as a frequency and rounded would change the number of bins by one from time to time, which at a ratio of 128 is a per cent of the total and would appear as scatter in the last column.

The last of these is the one that makes the exponent readable. Nine decibels an octave over four octaves is a factor of 3,700 in power, and a per cent of scatter per point is invisible against that; but the departures from nine — 9.33, 10.12, 6.96, 9.54 — are the interesting part of the table, and they are decibels rather than tenths of one. A measurement whose bookkeeping wobbled by a per cent could not distinguish the loop’s own low-ratio behaviour from arithmetic.

What one bit is worth

At an oversampling ratio of 128 the measured in-band ratio is 57.0 dB, which by the previous essays’ conversion is 9.18 effective bits from a comparator with two output states.

That sentence deserves the obvious objection, and the objection is the trade. The clock is 128 times the Nyquist rate of the band, so a 20 kHz band needs 5.12 MHz of sampling. What has been bought is not free performance but a different exchange: instead of building a sixteen-bit ladder of matched resistors — where the matching required is one part in 65,536, which is a fabrication problem — a single comparator is run fast and the accuracy is produced by timing and by averaging.

That is the exchange the whole architecture rests on, and it is a good one because clock rate has improved by orders of magnitude over the decades and component matching has not. It also has a consequence for this site’s own arguments: the one-bit quantiser has no linearity to get wrong. A two-level converter has exactly two points, and any two points lie on a straight line, so the differential and integral nonlinearity that dominate a multi-bit converter’s error budget are identically zero by construction.

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 20 kHz is 566.0 nV and does not move. They cross at 19.96 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.
Fig. 3 What the extra bits are being spent against. At sixteen bits the quantiser’s floor is still seven times the Johnson noise of a 1 kΩ source, so a modulator reaching nine bits from one comparator is a long way from the point where the resistor is the limit — which is the crossing this field’s first quantisation essay computes.
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.24 dB for every doubling of the oversampling ratio — measured 9.17, 8.76, 7.73, 7.32 — 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 7.43.
Fig. 4 Twice that: −14.0 dBFS, 8.24 dB per doubling, 46.5 dB at a ratio of 128. Six and a half decibels more signal has bought six and a half decibels more signal-to-noise and three quarters of a decibel per octave of extra slope, which is the loop becoming better behaved rather than the arithmetic changing.

What the error looks like, and why dither is already there

The modulator has a property that connects it back to the previous essay in a way worth stating.

A one-bit quantiser is the extreme case of the argument that essay makes: with two levels, an input of any size crosses one level, so by every measure in that essay the error should be locked to the signal and the noise treatment should fail completely. And at low input amplitudes it does — the loop produces idle tones, periodic output patterns whose spectrum has lines in it rather than a smooth floor, and they are audible and measurable and a genuine defect.

What rescues it at ordinary amplitudes is that the loop’s own output is a rapidly alternating sequence which acts as its own dither. The comparator’s decision at any sample depends on an integrator carrying the whole history of the difference, not on the present input alone, so the correlation between error and signal is broken by the loop rather than by an added noise source.

Real modulators add dither anyway, for the low-amplitude case, at the same cost the previous essay measured. The measurement in this essay uses an amplitude of 0.5 of full scale, and the slider walks down to 0.1 — where the rescue is visibly failing. At a tenth of full scale 97.8 per cent of the in-band error is in five lines and the measured slope is 7.50 decibels an octave rather than nine; at seven tenths the share is 54.6 per cent and the slope is 8.95. The law is a law about a white error, and how nearly white this loop’s is depends on how hard it is driven, which is why the figure’s own bound runs from seven to ten rather than from eight.

The comparison this loop invites, one field over

A reader who has been through the feedback field will recognise the shape of the modulator, and the recognition is worth following because it identifies exactly what is and is not familiar about it.

An integrator inside a loop with unity feedback is the same object as the compensated amplifier: a single dominant pole, gain falling at 20 dB per decade, and a loop gain that is large at low frequency and small at high. The consequence in both cases is that the error between what was asked for and what was delivered is suppressed in proportion to the loop gain — heavily at direct current, hardly at all near crossover.

What the modulator does with that is the part with no analogue counterpart. In an amplifier the “error” being suppressed is the difference between the input and the output, and the suppression is the whole purpose. Here the error being suppressed is the quantiser’s own rounding, injected inside the loop rather than arriving at its input, so the loop’s high gain at low frequency pushes it out to where the gain is low. Same mechanism, different injection point, and the injection point is what turns a servo into a noise shaper.

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.47 dB for every doubling of the oversampling ratio — measured 9.50, 6.43, 10.22, 7.74 — 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 8.35.
Fig. 5 −9.1 dBFS: 8.47 dB per doubling and 52.0 dB at 128. The slope is still short of the 9.03 the analysis predicts, and the gap is the honest content of the measurement — a one-bit loop’s quantisation error is not the white sequence the derivation assumes, and the shortfall is what that assumption is worth.

The comparison also predicts the failure mode. An amplifier’s loop becomes unstable when the phase has turned too far by the frequency at which the gain reaches one, and a modulator’s does the same — which is why the stability question below is a feedback question rather than a new one.

Where a first-order loop stops

Everything above is a first-order modulator: one integrator, one difference. Higher orders exist and the arithmetic extends in the obvious way — a loop of order LL shapes the error as fLf^{L}, and the in-band power falls as B2L+1B^{2L+1}, which is 6L+36L + 3 decibels per doubling of the ratio. Second order gives 15 dB an octave, third gives 21.

This essay does not measure them, and the reason is the site’s own standard rather than effort. Beyond first order a modulator can become unstable — the integrators can wind up without bound for inputs near full scale — and a figure drawn from a second-order loop would need a stability argument beside it. That work is done in the rung above this one, where the second-order slope measures 13.93 rather than 15, four integrators run away at seven tenths of full scale, and the best input to a second-order loop turns out to be 0.6 of the reference it is measured against. The feedback field has the machinery for the same question in the analogue and has used it on a loop with two disjoint stable regions; what the modulator adds is that its loop gain is a function of its own signal amplitude, so the edge is an amplitude and not a frequency.

So what is measured here is the case whose stability is unconditional, at the amplitudes where its error behaves, with the exponent read off five ratios and the closed form checked against it — and the result is that where the noise sits is a design variable, which is a thing the first six essays of this field had no reason to suspect.

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.95 dB for every doubling of the oversampling ratio — measured 9.28, 9.39, 8.83, 8.31 — 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.97.
Fig. 6 And seven tenths of full scale, the top of the slider: −3.1 dBFS, 8.95 dB per doubling, 61.8 dB at a ratio of 128. Across the five amplitudes drawn the slope runs 7.50, 8.24, 8.47, 8.99 and 8.95 dB per octave — rising steeply out of the small-signal cases, then flattening just short of the 9.03 the first-order analysis predicts and staying there. Plain oversampling gives 3.01 at every one of them, so a change that quietly turned the shaping off would fail this comparison rather than drift through it.

The decimator, which is the other half and is not here

A modulator’s output is a one-bit stream at 5.12 MHz. Nothing consumes that directly; what a system wants is a multi-bit word at 40 kHz, and getting from one to the other is a low-pass filter followed by a rate reduction.

The filter is doing two jobs at once and both are severe. It has to remove the shaped noise, which is not a small residue but the great majority of the error’s power sitting just above the band, and it has to be sharp enough that what remains after decimation does not fold back — which is the first essay in this field, applied to a digital signal instead of an analogue one.

That is where this field’s boundary sits. A decimating filter is an algorithm: a cascade of integrators and combs, or a chain of half-band stages, chosen for arithmetic cost rather than for component values. It has no netlist, nothing about it is solved, and every argument this collection makes about a filter — that its poles are computed from a definition, realised as a network and measured on the network that results — has no purchase on it.

So the modulator is measured here, in full, marched sample by sample; and the decimator is named and left. What follows it is a claim about arithmetic rather than about a circuit, and this site has said where that line is and stays on this side of it.

What the field has now measured about a converter

Seven essays in, the boundaries of a converter can be put in one place, and only one of them is the number on the part. Each row of the table below is measured somewhere in this field rather than asserted here: the rate by the frequency a sample rate invents, the skirt by what the filter in front costs, the crossing by the floor a converter sets, the overload by six decibels a bit, and the last row by when a floor stops being a floor.

boundary its variable what sets it
aliasing a rate the clock, and nothing else
anti-alias skirt a level the filter family and order
quantisation floor an amplitude the step size
the crossing with Johnson noise a bit count the source resistance and bandwidth
the overload at full scale an amplitude the top code, half a step short
the loss of the noise treatment an amplitude levels crossed, not bits owned
where the error sits a frequency whether there is a loop around the quantiser

The last row is this essay’s, and it is the only one of the seven that is not a limit at all. Every other line names a place where something stops being true. This one names a place where a designer gets to choose, and the choice is worth six bits.

Part 1 on noise shaping

One argument about Noise shaping, 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 9.

What this makes readable

Essays that name this one as a prerequisite.

The objects named here

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

Convergence orderEffective bitsNoise shapingOversamplingQuantisationSample rate