The loop that is worse at full scale
Assumes: The floor a converter sets · The frequency a sample rate invents · One bit, and where the noise went
The rung below this one put a one-bit quantiser inside a loop with an integrator and measured what came out: the error that would have been spread flat across the whole sample rate is pushed up out of the band of interest instead, and the part left inside the band falls by about nine decibels for every doubling of the oversampling ratio. Three times what plain oversampling gives, from one integrator.
The obvious question is what a second integrator does, and the obvious answer — fifteen decibels an octave instead of nine — is right. This essay measures it, finds it about a decibel short at every order for a reason worth the finding, and then measures what the second integrator charges.
The price is the interesting half, because it is not a frequency and not a number of bits. It is an amplitude. A first-order loop works at any input inside full scale. A second-order loop is at its best at six tenths of full scale and worse above it, a fourth-order loop’s integrators run away at seven tenths, and neither boundary is anywhere in the expression that says fifteen decibels an octave.
The law, and why it has the order in it
An integrator in a loop with the quantiser makes the loop’s error at the output the quantiser’s error multiplied by . That factor is small near direct current — it is zero at zero frequency — and it is large near half the sample rate, which is the whole mechanism: the error is not reduced, it is moved.
Two integrators multiply it by , and of them by . Near the bottom of the band the magnitude of that factor is , so the error power inside a band scales as and the ratio improves by
which is 9.03 for one integrator, 15.05 for two and 21.07 for three. Plain oversampling — the same quantiser with no loop at all — gives 3.01, and the difference between three and nine is the reason the field exists.
Measured on the marched loops, with each order’s noise read out of a transform of its own error: 8.17, 13.93 and 19.33. Every one of the three is short of its prediction, and short by about the same amount.
Where the missing decibel is
A shortfall of the same size at every order is not three discrepancies; it is one, and it is in the step of the derivation that nothing in the loop enforces.
The step is this: the quantiser’s error is treated as white noise, uncorrelated with the input and spread evenly across every line up to half the sample rate. Nothing in a comparator makes that true. The error is a deterministic function of the input and of the loop’s own history, and whether it looks like noise is a measurement rather than an assumption.
So measure it. The error’s spectrum below the band edge has 256 lines in it at an oversampling ratio of 64, and if the error were white, any five of them would hold five parts in 256 — 1.95 per cent — of the in-band error. For a first-order loop driven by a tone inside its own band, the five largest lines hold 74.6 per cent, and they sit at two, three and four times the input frequency.
That is not a floor. It is distortion, and it is the same phenomenon this field measured two rungs earlier under a different name — a quantiser whose error becomes harmonics of its input when the input does not exercise enough levels. A one-bit quantiser exercises exactly two, so it is the extreme case of that argument, and the loop is the only thing standing between it and complete failure.
Each added integrator breaks the tones up further, and that is the second thing an order buys. The five largest lines hold 74.6 per cent of the error at one integrator, 48.1 at two and 27.0 at three — and even at three the error is fourteen times further from white than white would be. The white-noise argument is not wrong so much as approached asymptotically, which is exactly why the measured slopes approach their predictions from below.
A measurement that was of the wrong signal
Getting the previous section’s numbers required repairing something, and the repair is worth stating because the defect is invisible from every direction except the one it was found from.
This site’s modulator took an fSignal argument, ignored it, and placed its test tone with the same
helper every other figure in the field uses for a coherent record — which chooses a cycle count near a
third of the record length. That puts the tone at a third of the sample rate. At an oversampling ratio
of 64 with a 20 kHz band, the sample rate is 2.56 MHz and the tone was at 853 kHz: forty times
above the band the ratio was being quoted over.
So the quantity reported as “the in-band signal to noise” had a numerator that was not in the band.
The correction is not small and it is not a constant. The same first-order loop, same amplitude, same oversampling ratio, measures 88.6 dB with the tone above the band and 47.5 dB with it inside — a factor of a hundred and thirteen in error power. A large out-of-band input dithers a one-bit loop thoroughly, which is a real technique for measuring a noise transfer function without the signal in the way, and it is not a measurement of a converter.
Both pictures are of the same modulator. Only one of them is of a converter, and the machinery here now
places the tone inside the band, refuses a request for one outside it, and keeps the old placement
available under a name — tone: "wide" — so that the defect can be reproduced rather than described.
What the second integrator costs
Now the half of the trade that does not appear in .
A modulator is not a linear system with a noise source in it, whatever the derivation treats it as. It is a marched nonlinear loop whose integrators accumulate the difference between what was asked for and what one bit could deliver. While the input is small that difference alternates in sign and the states stay bounded. While it is large the quantiser spends long runs saturated at one level, the integrators charge in one direction, and what they accumulate has to come back out later.
For one integrator it always comes back. Swept from a twentieth of full scale to 0.99 of it, the state of a first-order loop never exceeds four tenths of full scale and the ratio rises monotonically the whole way: there is no amplitude edge inside full scale at all.
For two it does not. The ratio peaks at 0.6 of full scale and is three decibels below its own best by 0.9, with the integrator swing rising from 0.3 to 1.7 times full scale over the same span. For four integrators the states pass ten times full scale — the stated limit, since an integrator asked to swing ten times its own reference is a circuit nobody has — at 0.7, and past that the march reports a refusal rather than a ratio.
The three statements are different and it matters that they are:
- the best amplitude, where the ratio is largest;
- the useful edge, where the ratio has fallen three decibels below that best — which is a degradation and returns a number;
- the runaway, where the states leave the range a real integrator has — which is not a degradation and returns nothing at all.
For a second-order loop those are 0.6, 0.9 and nowhere inside full scale. For a fourth-order loop they are 0.5, 0.6 and 0.7. The gap between the second and the third is where a real modulator lives, and it is the reason converter data sheets specify a maximum input several decibels below the reference voltage — a number that looks like conservatism and is a stability margin.
Why this is an amplitude boundary and not a stability margin
A reader from the feedback field will want to call this an instability and reach for a phase margin. The reach is worth following because of where it fails.
The loop is a feedback loop: an integrator, unity feedback, a comparator in the forward path. If the comparator were a linear gain the loop would be trivially stable at any input, because the whole thing would be a linear system and a linear system’s stability has nothing to do with the size of its input. The comparator is not a linear gain. Its effective gain is the ratio of what it puts out to what it is given, and since it puts out ±1 whatever it is given, that gain falls as the input to it grows.
So the loop’s gain is a function of its own signal amplitude, and a second-order loop that is stable at small signals has less loop gain at large ones. That is the mechanism, and it is why the edge is an amplitude rather than a frequency: nothing about the poles moved. What moved is where on the comparator’s own curve the loop is sitting.
It also explains the shape of the ratio curve, which falls before anything dramatic happens. Long runs at one level are exactly the condition under which the error stops being spread, so the tonal share rises with the amplitude at the same time as the loop gain falls, and the ratio gives out for two reasons that arrive together.
What this costs in front of the converter
Everything above is about the loop. The reason a designer takes a higher order at all is that the alternative is a higher oversampling ratio, and that is paid for somewhere else.
At a fixed target, a second integrator is worth about six decibels an octave, which is two octaves of oversampling ratio — a factor of four in clock rate, in settling time per sample, in the switched capacitor’s own noise, and in power. Against that, a second integrator is one amplifier and a stability constraint on the input range.
The exchange is what makes the amplitude edge a design quantity rather than a curiosity, and it also sets the practical ceiling on the order. Third and fourth-order single-loop modulators are built and they are built with their coefficients scaled down, which is visible in these measurements: the loop coefficient in every integrator here is a stated argument, and lowering it moves the states down and the tonal share up. There is no setting at which either is free.
Where this ladder goes next
Three questions are opened here and the machinery exists for all three.
A multi-stage arrangement — two low-order loops with the second one digitising the first one’s own error — gets the slope of a high order without the amplitude edge of one, because no single loop is ever asked for more than it can hold. It is the standard answer to everything this essay measures, and the honest version of the claim needs the analogue mismatch between the two paths, which is what decides whether the cancellation is real.
Two loops, and the mismatch between them makes that measurement, and its answer is a range rather than a verdict: the cancellation is between an analogue path and a digital one, it is worth 25 decibels, and it is worth 25 decibels until the two differ by five per cent. That is the shape this essay’s amplitude edge has been replaced by — not removed, exchanged. A single fourth-order loop has states that run away at seven tenths of full scale; two second-order loops have no such amplitude anywhere, and instead have a matching requirement in components, which is a quantity a manufacturing process rather than a signal decides.
A multi-bit quantiser in the same loop moves the tonal share directly: the argument that a quantiser’s error is white is about how many levels the signal visits, and four bits visit sixteen. It is when a floor stops being a floor that measures how strongly that argument binds — the share of a quantiser’s error power sitting in harmonics of the input rises from 0.29 per cent at 230 levels to 76 per cent at 1.3, with the total unmoved throughout — so a one-bit loop sits at the far end of that curve by construction and every added level walks back along it. It should improve the shortfall this essay measures at every order, and it costs the linearity of the levels themselves, which no amount of shaping repairs.
A multi-bit quantiser in the same loop moves the tonal share directly: the argument that a quantiser’s error is white is about how many levels the signal visits, and four bits visit sixteen. It should improve the shortfall this essay measures at every order, and it costs the linearity of the levels themselves, which no amount of shaping repairs.
And the analogue integrator is the one that would make this a circuit rather than a march. Every integrator here is exact. A real one has finite gain, an offset and a settling time, and the switched-capacitor essays on this site already measure what each of those does to a stage. The amplifier inside the sample has the settling result: the number of times a sampled amplifier’s white noise folds into the band is exactly the number of time constants the settling needs, so asking for two more bits of settling costs fifteen per cent more noise before anything else has changed. The offset that knows the signal has the offset one, and it is not the offset a data sheet would call it: the charge a switch leaves behind depends on the input through two terms at once, so 5.67 mV of apparent offset moves by 1.86 mV across a volt of signal — a gain error of 0.186 per cent and only 3.4 µV of anything else. A gain error inside a shaping loop is a change in the loop’s own coefficients, which is the quantity the order-dependent slope measured here is a function of.
Which is the general point about the three items on this list. Every one of them replaces an idealised element by a real one, and in every case what arrives is not noise added to this essay’s result but a different value of one of this essay’s parameters — a matching tolerance, a level count, a loop coefficient. The amplitude edge measured here is a property of the recursion, and the recursion is what a real integrator changes.
What the loop is measured against
A shaped loop that gives up its advantage near full scale is measured against three results that do not. One bit, and where the noise went is the shaping law itself, nine decibels an octave against plain oversampling’s three. Six decibels a bit, and the half step blamed on it is the multi-bit quantiser this is an alternative to, with its own full-scale defect and a quite different cause. Two loops, and the mismatch between them is the cascade that buys order and pays in matching. What the filter in front costs is the analogue price of the oversampling all of it depends on, and When a floor stops being a floor is the same failure in a converter without a loop at all.
What is checked
Each of the three ladders is asserted to be stable at every oversampling ratio drawn, and to buy its own decibels a doubling to within a couple of decibels — so the assertion carries the order in it rather than a number that would pass for any loop. The first-order case that law is anchored on is one bit, and where the noise went, where the measured 8.99 decibels a doubling sits against plain oversampling’s 3.01 and the octaves scatter by a decibel each — which is the loop telling the truth about what its error is made of, and the reason a slope here is quoted with its scatter rather than fitted and rounded. Every measured slope is asserted to be short of its prediction and short by about the same amount at every order, which is the claim that the shortfall is one phenomenon rather than three.
The tonal share is asserted against what white would give — five lines of 256 — rather than against a constant, so the check moves with the record and the oversampling ratio. It is asserted to fall with every added integrator and to still be an order of magnitude from white at three.
The amplitude sweep asserts that the best input is inside full scale rather than at it, that a single integrator has no runaway anywhere in the sweep, and that four integrators have one at or below seven tenths — the two ends that make the edge a property of the order. The out-of-band measurement is asserted to differ from the in-band one by more than twenty decibels, which is the repaired defect kept as a live check rather than a note.
The record length is chosen so that at least 256 lines lie below the band edge, because the first version of the third-order ladder reported 101.6 dB at an oversampling ratio of 256 and 110.5 dB when the record was made four times longer. That octave was measuring the record.
What is not modelled: the analogue integrators, which are exact here; the comparator’s own offset and hysteresis, which decide the idle-tone pattern at small inputs; the decimation filter, which is where a real converter’s in-band result is actually read; and the multi-stage arrangement, which is the standard way of getting these slopes and is not a single loop at all.
Part 2 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 objects named here
The third axis, after the field and the idea: the things themselves, and every essay that touches each one.
Design tradeoffEffective bitsIdle tonesModel rangeNoise shapingOversamplingQuantisationStability
- The dither that is a decision design tradeoff, effective bits, model range, quantisation
- Zero in, and not zero out effective bits, oversampling, quantisation
- A band rather than an edge design tradeoff, model range
- A boundary is a model and a tolerance design tradeoff, model range
- How wide a null is design tradeoff, model range
- Interleaving is a choice, not an improvement design tradeoff, model range