The same quantizer error, shared among more slices of frequency. Watch the noise in the band fall while the total stays put.
More slices, same noise
Each bar is a slice of frequency as wide as the signal's band.
Sampling at exactly twice the band: all of the error's power, Δ²/12, sits in the band.
Describe this picture
A bar chart with no control. Each bar is a slice of frequency as wide as the signal’s band, and its height is the share of the error’s power in that slice. The picture steps through . The first bar is in the accent colour, labelled “the band we keep”; the rest are muted, labelled “removed by the digital low-pass”. The readouts are the oversampling ratio, which counts the slices, and the noise in the band and the total noise, in decibels relative to . At the start the caption says: “Sampling at exactly twice the band: all of the error’s power, Δ²/12, sits in the band.” The noise in the band reads −3.01, −6.02, −9.03 and −12.04 dB as the slices double, and the total noise stays at 0.00 dB.
Sharing the same error among more slices
Quantization & noise (11.1) fixed the quantizer’s error power at per sample, where is the step. That number depends on the step and on nothing else, so sampling faster does not change it. There are two ways to a cleaner signal from the same bits. This page takes both: sample faster and filter, then push the error up in frequency with feedback.
Here is the idea behind that picture. For a busy signal the error behaves like hiss, and its power is spread evenly over all frequencies from 0 to . I state this here; 24.4 proves it. Your signal occupies only the band from 0 to . Cut the range 0 to into slices, each wide. The number of slices is the oversampling ratio,
At there is one slice: you sample at , the slowest rate that still holds the band (The sampling theorem, 10.2).
The picture at the top of the page starts there. The noise is in decibels relative to , the power ratio from How big is a signal (1.3). Sampling at exactly twice the band, all of the error’s power, , sits in the band.
At , twice as fast, the same power is shared by two slices. The filter keeps one: −3.01 dB. At the same power is shared by four slices, and a digital low-pass that keeps only the first one keeps a quarter of it. That is the ideal low-pass of Frequency response and Bode plots (8.4), done in software. A quarter of the power is
Each doubling of the rate, one octave, halves the power that is kept: dB, because . At , eight times faster, there are eight slices, and the filter keeps one: −9.03 dB. At the band holds dB. At 6.02 dB per bit that is two extra bits of quality.
Look at the total noise. It never leaves 0.00 dB. Sampling faster only spreads the error thinner. Without the low-pass nothing is gained; the filter, keeping the first slice, does all the work.
Averaging four readings of a noisy scale halves the noise’s RMS. That is the same arithmetic: four readings, a quarter of the power.
The maths behind it · averaging independent readings
Averaging independent readings divides the mean square of their noise by . Oversampling with a low-pass is that average, done by a filter.
What a first difference does to slow and fast wiggles
Now the second move. Draw the loop as in Difference equations (6.1): quantize, keep the quantizer’s error in a delay box, and subtract it from the next input. The quantizer adds its own error to whatever enters it, so with the stored error taken off the input,
This is error feedback. The error reaching the output is , which is the first difference of from Operations on amplitude (2.2).
How does a first difference treat slow and fast wiggles? I measure it with test sines, as in Properties of LTI systems (5.4): a sine goes in, a sine of the same frequency comes out, scaled. The scale is what I want. The next picture runs four test sines, from slow to almost the fastest wiggle, (Sinusoids, 3.2). Watch the first difference shrink the slow one and grow the fast one.
A first difference, measured with test sines
Size out ÷ size in, for four test frequencies.
A slow test sine, Ω = π/20: its first difference is only 0.157 of its size.
Describe this picture
Two panels with no control: size out ÷ size in, for four test frequencies. The top panel shows stems of the test sine and of its first difference over samples to 39. The lower panel puts one labelled dot per test at its test frequency , from 0 to rad/sample. The readout is size out ÷ size in, the ratio of RMS values over whole periods, to 3 decimals. The picture plays by itself through , , and , reading 0.157, 1.000, 1.414 and 1.994, with a caption at each; the last reads “Ω = 19π/20, almost the fastest wiggle there is: 1.994 times the input. Slow error nearly cancels; fast error comes out doubled.”
The slow test sine, , has a first difference only 0.157 of its size. At , one cycle every 6 samples, the first difference is exactly as big as the input, 1.000. At , one cycle every 4 samples, it is 1.414 times the input. At , almost the fastest wiggle there is, it is 1.994 times the input.
The dots rise from almost 0 to almost 2. At the ratio is 1.000, the crossover: slower wiggles shrink, faster ones grow. A first difference nearly cancels slow wiggles and doubles the fastest ones. Subtracting yesterday’s temperature from today’s does the same: the slow seasonal drift nearly vanishes, and the day-to-day jumps stay.
The dots lie on a smooth curve from 0 to 2. Its formula comes with the DTFT, in Frequency response of discrete-time systems (12.4). Power goes as size squared (1.3), so shaping multiplies the error’s power at by the square of the dot’s value: 0.025 at and 3.98 at . Feed the error back twice and the error is differenced twice. That is second order shaping, and it squares the sizes again: 0.025, 1.000, 2.000 and 3.975 at the four tests.
The maths behind it · eigenvectors of a matrix
For signals that run on in both directions, the first difference is a matrix with 1 on the diagonal and just below it. A test sine comes out as the same sine, scaled. A vector that a matrix only scales is an eigenvector; 5.4 met this idea for LTI systems.
Push the error up, then filter it away
Put the two moves together at . Shaping multiplies each slice’s power by the curve squared. The band’s slice nearly empties, and the slices at the top fill up. I can then low-pass, keep the first slice, and throw the rest away. Watch the band’s bar empty as the top bars grow.
Push the error up, then filter it away
OSR 16: sixteen slices. Bars are each slice's share of the unshaped error power.
Sixteen times oversampled, no shaping: every slice holds 1/16 of the error's power. The band's slice: −12.04 dB.
Describe this picture
The same bar chart, for : sixteen slices, each bar its share of the unshaped error power. A readout names the shaping, “none”, then “first order”, then “second order”, and the bars morph from one to the next; with no shaping every bar is 0.0625. The noise in the band reads −30.96 dB for first order and −47.33 dB for second, and the total noise +3.01 dB and +7.78 dB. The last caption reads “Feed it back twice: −47.33 dB in the band, +7.78 dB in total. Push the error up in frequency, then filter it away.”
With no shaping every bar is , a sixteenth. First-order bars run from 0.0008 and 0.0056 in the lowest slices to 0.2492 in the top one. Second-order bars run from 0.00002 and 0.0006 to 0.9936. Feed the error back once, and its power moves toward the top slices. The band’s slice drops to −30.96 dB, though the total rose by 3.01 dB. Feed it back twice, and the band holds −47.33 dB while the total is +7.78 dB.
Notice that the noise in the band falls while the total noise rises. Adding the sixteen bars gives 2 for first order and 6 for second, so the total power is multiplied by 2 and by 6, which is dB and dB. Shaping moves the error and also adds to it. It still wins, because the part it adds sits in slices that the low-pass removes.
That is sweeping dust into the corner you will vacuum. Left out of this page: stability for orders above 2, cascaded loops, and the design of the decimation filter, which waits for Chapter 22.
One bit at a time
Take a first-order loop whose quantizer has only one bit, so its output is or , and give it a constant input of 0.5. The bits run and repeat. Their running average is 0.5. With an input of 0.25 the bits are and their average over 16 bits is 0.25.
The average over many bits is the digital low-pass. A 1-bit loop followed by that average is a sigma-delta converter. Such loops can settle into short repeating patterns, called idle tones, which Dither (11.2) breaks up.
Worked example
Every number below was computed with and the 6.02 dB per bit rule.
- Oversampling alone. In-band noise relative to for is , , , , , dB. That is 3.01 dB per octave. is worth 2.0 bits, and is worth 3.0 bits.
- First-order shaping. At the band holds dB, or 5.1 bits. At it holds dB, or 8.1 bits. Between those two the gain is 9.03 dB per octave.
- Second-order shaping. At the band holds dB, or 7.9 bits. At it holds dB, or 12.9 bits. The gain is 15.05 dB per octave.
- Totals. Shaped error power is multiplied by 2, 6 and 20 for orders 1, 2 and 3: , and dB.
- Test sines. Size out ÷ size in through one first difference, at : 0.157, 1.000, 1.414, 1.994. Through two: 0.025, 1.000, 2.000, 3.975.
- A one-bit stream. Input 0.5 gives repeating, average 0.5. Input 0.25 gives an average of 0.25 over 16 bits.
Where you’ll meet this
The curve you measured with test sines gets its formula in the DTFT, in 12.4. Cutting the sample rate after the low-pass, called decimation, is the subject of Chapter 22. Audio converters use these loops, and Chapter 29 comes back to them.
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| Oversampling ratio | number of slices | |
| Oversampling alone | in-band noise | dB per octave, only with the digital low-pass |
| Error feedback | first difference of the error | |
| First difference | size for slow, for the fastest wiggles | formula in 12.4 |
| First-order shaping | dB per octave in the band | total error |
| Second-order shaping | dB per octave in the band | total error |
| Sigma-delta | 1-bit loop plus digital low-pass | share of s carries the value |