Field

Where a signal becomes a number

A converter is an element in the netlist like any other: it has an anti-alias filter made of the same components as every filter here, a reference a resistor's Johnson noise sits on, and an aperture. What it also has is three boundaries of kinds the rest of the site does not carry — one with no gradient at all, one that stops being a floor and becomes distortion, and one whose variable is a duration.
A 9.0 kHz input sampled at 10 kHz arrives as 1.0 kHz. computed by solving, not by drawing. The dots are the samples. The input at 9.00 kHz is above half the 10 kHz rate, and every dot also lies on the 1.00 kHz curve drawn beside it — the two sample sequences differ by 9.3e-15, which is the arithmetic and not a small effect. Nothing is attenuated and nothing is distorted: the samples are the samples of a different signal, at full amplitude, and there is no measurement of them that could say which one was there.

The frequency a sample rate invents

Every other boundary on this site is a model getting gradually worse. This one has no gradient at all: below half the sample rate a set of samples has one sinusoid through it, above half the sample rate it has another, and the two sets of numbers are identical to three parts in ten thousand billion. Nothing is attenuated, nothing is distorted, and there is no measurement of the samples that could say which signal was there.

What the reconstruction returns, either side of 5.0 kHz. computed by solving, not by drawing. The Whittaker–Shannon sum is evaluated on the samples and compared with two things: the signal that was sampled, and the frequency the samples report. Below 5.00 kHz these are the same curve and the error is 4.88e-3 — the truncation of the sum at sixty-four samples either side, and nothing else. Above it they part: at 9.00 kHz the reconstruction is 1.59e-3 from the alias and 2.000 from the input. The small number is the interesting one. A reconstruction cannot be improved into the right answer, because it is already an exact answer to a different question.

An exact answer to a different question

The reconstruction that turns samples back into a signal is normally introduced as the thing that recovers what was there. Measured on both sides of half the sample rate it does something more interesting than failing: above the boundary it returns the alias to 1.6 parts in a thousand, which is the same accuracy it returns the input with below the boundary, and it is wrong about the input by twice the amplitude. Its error is not a degradation. It is exactness about something else.

The sample rate each anti-alias filter demands for 80 dB. computed by solving, not by drawing. A 20 kHz passband, and each filter must be 80 dB down by the frequency that folds back into it. The required rate follows, and it is a property of the filter rather than of the converter: Bessel 3.53× Nyquist, Butterworth 2.08×, Chebyshev 1.53×. The elliptic design at a selectivity of 0.8 is refused: its equiripple stopband has a floor at -74.1 dB, which is above the requirement at every frequency, so no sample rate satisfies it. At a selectivity of 0.5 the same order needs 1.34×. The floor is the selectivity's, not the order's.

What the filter in front costs

The filter that keeps a converter honest is normally chosen for its skirt. Measured against one requirement — eighty decibels down by the frequency that folds back into a 20 kHz band — the choice is not a decibel or two of skirt but a factor in the clock: Bessel demands 3.53 times Nyquist, Butterworth 2.08, Chebyshev 1.53. And one design is refused outright, because an elliptic stopband is a floor rather than a slope and no sample rate reaches past a floor.

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 100 kHz is 1.266 µV and does not move. They cross at 18.80 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.

The floor a converter sets

A converter's resolution is quoted as a number of bits, which is a property of the converter. What it can actually resolve is a property of the circuit in front of it, and the two cross: measured against the Johnson noise of a 1 kΩ source in 100 kHz of bandwidth, the quantiser is the limit up to 18.80 bits and the resistor is the limit above it. Past that crossing every further bit buys a more precise measurement of thermal noise.

6.02 bits + 1.76 dB, measured — and the overload that is blamed on it. computed by solving, not by drawing. A coherent sinusoid is quantised and the ratio is read off the error sequence, never from the formula. One step inside full scale the two agree to 0.15 dB at every bit count from 8 to 16. Driven to exactly full scale the same converter measures 0.83 dB worse at 8 bits when driven to exactly full scale, and the reason is in the count beside it: 327 of 8192 samples hit the top code. A mid-tread converter's largest code is one step below full scale, so a sinusoid that reaches full scale is already overloading — half a step of overload, at the peak, where the error correlates with the signal. The loss halves with every bit for the same reason the clipped count does — 0.83, 0.47, 0.21, 0.06, -0.13 dB — and by sixteen bits it is inside the measurement's own scatter. The formula was never the approximation.

Six decibels a bit, and the half step blamed on it

Every converter data sheet quotes 6.02N + 1.76 dB and every bench measurement comes up short of it, which is usually explained by calling the formula an approximation. Measured one step inside full scale it agrees to 0.15 dB at every bit count from eight to sixteen. Driven to exactly full scale the same converter loses 0.83 dB at eight bits — because 327 of 8192 samples hit the top code, and a mid-tread converter's largest code is one step below full scale.

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.

When a floor stops being a floor

Quantisation error is treated as noise and behaves like noise while the input crosses many levels. As the amplitude falls it stops: measured at the bins its harmonics occupy, the share of the error's power sitting in harmonics of the input rises from 0.29% at 230 levels to 76% at 1.3. The floor has not moved. It has become a distortion product locked to the signal, and the fix is to add noise on purpose — one whole least significant bit, and no more.

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.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.

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.

The droop a zero-order hold imposes at 48 kHz. computed by solving, not by drawing. Holding each sample for a clock period convolves the output with a rectangle, so the spectrum is multiplied by a sinc: -0.143 dB down at a tenth of the sample rate, -0.912 at a quarter and -3.922 at half — which is exactly 20 log(2/π) and contains no design decision at all. The dots are the amplitude of the fundamental read out of the transform of the staircase itself, agreeing with the closed form to 0.008%. There is also half a sample of delay, 10.417 µs here, which is the reason a held reconstruction is not a droopy copy of the signal but a droopy copy that has moved.

The staircase on the way out

A converter does not emit impulses. It holds each sample for a whole clock period, which is a convolution with a rectangle and therefore a multiplication by a sinc — 0.14 dB down at a tenth of the sample rate, 0.91 at a quarter, and 3.92 at half, which is exactly 20 log(2/π). Nobody chose that droop and it is nearly eight times the half-decibel ripple of a Chebyshev passband. Measured on the transform of the staircase itself, it agrees with the closed form to 0.008%.

A 4 kHz Butterworth, mapped to 48 kHz two ways. computed by solving, not by drawing. The upper panel is the digital response on the unit circle; the lower one is where each analogue frequency lands. The bilinear transform compresses the axis as it approaches half the sample rate — -3.11% at a tenth of the rate and -15.2% at a quarter — so a design mapped straight through is -3.432 dB at its own corner instead of -3.010. Pre-warping puts that one frequency back exactly and no other: above it the pre-warped curve is the further of the two from the analogue prototype. It is a choice of where to be right, not a correction.

The corner that moved

The bilinear transform has to fit an infinite frequency axis onto a circle, so something must be compressed, and what is compressed is everything near half the sample rate. A 4 kHz Butterworth mapped to a 48 kHz clock is 3.432 dB down at its own corner instead of 3.010, and at a quarter of the sample rate the axis is 15.2% out. Pre-warping puts one frequency back exactly and no other — it is a choice of where to be right, not a correction.

A 8th-order Butterworth at 12 bits, as a cascade and as one polynomial. computed by solving, not by drawing. The open circles are the poles as designed, on the z-plane with the unit circle drawn. Filled marks are where they go once the coefficients are stored in 12 bits. A cascade of biquads keeps two coefficients per pole pair, so a rounding error moves that pair and nothing else: 8.43e-3, largest radius 0.97478. A direct form keeps one denominator whose coefficients are symmetric functions of every pole, so one rounding error moves all of them: 6.21e-1, largest radius 1.54393 — outside the unit circle, which is not an inaccurate filter but an unstable one. The two are the same filter until they are written down.

The same filter, rounded twice

The filters field measured two realisations of one analogue response and found the passband error growing as the 0.99 power of a component tolerance in a cascade and the 2.00 power in a ladder. The digital version of that argument comes out harder. At eighth order and sixteen bits, a cascade of biquads moves its poles by 6.6 × 10⁻⁴ and stays at a radius of 0.9748; the same filter written as one polynomial moves its poles to a radius of 1.4536, which is not an inaccurate filter but an unstable one.

What 10 ps of aperture jitter is worth, in bits. computed by solving, not by drawing. Samples are taken at instants displaced by a seeded Gaussian of 10 ps and the error is measured against the same sinusoid sampled exactly. The line is −20 log(2π f × jitter), which the measurement matches to 0.12 dB across three decades. The penalty is exactly twenty decibels a decade of input frequency, because the error is the signal's slope times the timing error and nothing else — so a converter holds 16 bits only up to 199 kHz and 12 bits up to 3.18 MHz. An aperture figure quoted without an input frequency states no resolution at all.

A picosecond, read as bits

Every other boundary in this collection has a frequency, an amplitude or a size on its axis. This one has a duration. A converter that samples at t + δ instead of t gets a value wrong by the slope times δ, so the damage is proportional to input frequency and to nothing else about the part: ten picoseconds holds sixteen bits up to 199 kHz and twelve bits up to 3.18 MHz, falling at exactly twenty decibels a decade. An aperture figure quoted without an input frequency states no resolution at all.

A second integrator is 5.8 more decibels an octave, and a third 5.4 more. computed by solving, not by drawing. Modulators of order 1, 2, 3 marched one sample at a time with a one-bit quantiser, their in-band noise read from the transform of the error with the test tone a quarter of the way up the band. The measured slopes are 8.17, 13.93, 19.33 decibels per doubling of the oversampling ratio, against the 9, 15, 21 the white-noise argument predicts and the 3.01 plain oversampling gives. Each order is short of its own prediction by about a decibel, in the same direction, which is the error in the band not being white. The straight lines are each ladder's prediction drawn through its own first point, so what is compared is a slope against a slope.

The loop that is worse at full scale

A second integrator in a one-bit loop takes the shaping law from nine decibels an octave to fourteen, and a third to nineteen. What it charges is not in decibels at all: past six tenths of full scale the ratio starts falling, and a fourth integrator's states run away at seven tenths. The best input to a second-order modulator is 0.6 of the reference it is measured against — an amplitude boundary of exactly the kind this collection is built for, on the one object in the field that has no continuous output to draw.

What a cascaded modulator is worth, against how well its two paths match. computed by solving, not by drawing. Two first-order loops marched sample by sample at an oversampling ratio of 64, with the first stage's quantisation error taken as the difference between what its comparator said and what was presented to it — nothing here reads a state a real converter could not. Perfectly matched, the cascade gives 72.5 decibels against the first stage's own 47.5: second-order shaping out of two first-order loops, neither of which can be unstable. The gain with which the first error reaches the second stage is then given an error, and the flat left-hand half of the curve is the arrangement working. It costs three decibels at 5.29 per cent, which is a capacitor ratio — achievable, and not free, and not something the digital side can measure or correct.

Two loops, and the mismatch between them

The rung below marched single loops of second, third and fourth order and found the amplitude at which each stops working, falling with the order — which is why nobody builds a fourth-order single loop. The standard answer is two first-order loops with the first one's error fed to the second and differentiated back out, giving second-order shaping out of parts that cannot be unstable. The cancellation is between an analogue path and a digital one, and it is worth 25 decibels until the two differ by five per cent.

Same 2 ps of jitter: a floor at -121 dB, or a line at -91. computed by solving, not by drawing. A 3.337 MHz sinusoid sampled at 10 MHz with two clocks of identical root-mean-square jitter. One clock's timing error is independent gaussians and the other's is a sinusoid at 130 kHz. The total error power is the same — -87.43 and -87.55 decibels below the signal, against the closed form's -87.55 — and the pictures are not. The random clock spreads it over 2048 bins, -120.5 dB each; the modulated one puts it into two lines at 3.337 ± 0.130 MHz, -91.5 dB down. A specification in picoseconds does not choose between them.

A floor, or a line

Two clocks with identical two-picosecond jitter sample the same sinusoid, and the total error power is the same to a tenth of a decibel — the closed form the rung below computed, right for both. One of them puts that error across two thousand bins at −120 dB each; the other puts it into two lines at −91.5. The gap is the processing gain, it grows with the record length because a density falls and a line does not, and nothing in a specification quoted in picoseconds root-mean-square distinguishes the two cases.

Fed nothing, an eighth-order cascade sits 88 least significant bits from zero. computed by solving, not by drawing. Where each section of a 12-bit rounded cascade settles with zero input and a seeded state. Nothing decays to zero: a constant state survives whenever rounding returns it to itself, which needs only |y·(1 + a₁ + a₂)| ≤ q/2, and that denominator is small precisely because the corner is far below the sample rate. Each section's own band is 30, 31, 32, 33 least significant bits and the settled offsets are -27, -50, -70, -88 — accumulating, because a section's dead-band output is the next section's input and the next section passes direct current. In volts the offset halves with every bit added; in least significant bits it does not move at all.

Zero in, and not zero out

The rung below rounds a filter's coefficients and marches it in double precision, and its own list of what it did not do names the other half: the products are rounded too. Put that in and a twelve-bit eighth-order cascade fed nothing at all settles two per cent of full scale away from zero and stays there — and the offset does not shrink with the word length, it grows as the square of how far the corner sits below the sample rate, reaching eighteen per cent at a hundred and twenty-eight times.

Twenty-four orderings, and 11 of them are choices. computed by solving, not by drawing. Every ordering of the four sections of an eighth-order 0.5 dB Chebyshev, at 16 bits, drawn against the two things an ordering decides. The horizontal axis is the round-off floor the arrangement adds — 24.2 least significant bits at best and 99.8 at worst. The vertical axis is the largest value any section's output reaches, which is what decides whether a word overflows: 0.088 of full scale at best and 0.699 at worst, a range of 18.0 decibels. 13 of the twenty-four are beaten on both counts by another ordering and are simply mistakes; the 11 on the lower-left frontier are the actual choices, and no one of them is best.

Which section goes first

A cascade of four biquads can be assembled in twenty-four orders, all of which realise exactly the same transfer function. They do not cost the same: the round-off floor runs from 24 to 100 least significant bits and the largest value any section reaches runs over eighteen decibels — and the two go opposite ways, so eleven of the twenty-four are genuine choices and thirteen are beaten on both counts by another arrangement.

The direct form works at 28 bits and fails again at 29. computed by solving, not by drawing. The largest pole radius of an order-8 Butterworth at a 1 kHz corner and a 48 kHz clock, at every coefficient word length from 6 to 40 bits, for both realisations. Above the unit circle the filter is not inaccurate but unstable. The direct form is outside at 23 of the 35 word lengths drawn; the cascade at none of them, its worst radius being 1.000000. The failures are not an interval: 28 bits works and 29 bits does not, so the smallest word length that works is 1 below the largest that does not and a search for the crossing has no crossing to find. The direct form's curve is clipped at 1.24: a radius of 4.5 and a radius of 1.01 are the same verdict.

The word length that is not a threshold

The essay below this one measured an eighth-order direct form at five word lengths, found its poles outside the unit circle at every one, and left behind a phrase — the coefficient resolution required. Sixty word lengths later there is no such resolution. That filter is stable at 28 bits, unstable at 29 and stable again at 30, and the smallest word length a search would return is not one anybody can use. What survives is a law with a slope: 4.53 bits of coefficient for every pole added, rising to 47 bits at twelfth order, and none at all for a cascade.

Against its own shaping the error is 17.4× tonal, not 51×. computed by solving, not by drawing. The share of an order-1 loop's in-band error sitting in its five largest lines, from 0.02 to 0.9 of full scale, with both nulls drawn. The lower level is 1.953 per cent — five lines of a FLAT error over 256 — and it is what this measurement has always been quoted against. The upper level is 5.74 per cent, which is what five lines of the loop's OWN shaping hold with no tone anywhere in them. Measured against the first the error is 51 times tonal at 0.02 of full scale and 26 at 0.9; against the second, 17.4 and 8.9. The direction survives the correction and the size does not.

A floor, or five tones

The field's sharpest statement about a one-bit loop is that three quarters of its in-band error sits in five lines, against the 1.953 per cent a white error would put in any five — a factor of thirty-eight. The comparison is to a white error, and a shaping loop exists to make its error anything but white. Measured against the loop's own transfer function, which the loop reproduces line by line to a part in five hundred when it is dithered, the same error is 17.4 times tonal at a fiftieth of full scale and 8.9 times at nine tenths. And 99.5 per cent of it at the quiet end is two harmonics of the input.

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.

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.

The images a zero-order hold leaves, at 0.222 of the sample rate. computed by solving, not by drawing. A 10.67 kHz tone held at 48 kHz, with every line read out of a transform of the staircase itself. The sampled spectrum repeats at every multiple of the clock and the hold multiplies all of it by one sinc, so each image survives scaled by the sinc at its own frequency: the fundamental at -0.72 dB, the largest image (1fs−f, 37.3 kHz) at -11.60 dB, which is 10.88 dB of rejection. The sinc's nulls are exactly at the multiples of the clock and the two first-order images straddle the first of them without touching it — so the hold's rejection is 25.6 dB for a tone at 0.05 fs and 1.74 dB for one at 0.45, falling to nothing at half the clock. Measured and closed form agree to 0.026%.

The nulls are where nothing is

A zero-order hold multiplies the whole repeated spectrum by one sinc, so it attenuates every image at the image's own frequency and its nulls land exactly on the multiples of the clock. Nothing is ever at a null: the two first-order images straddle it, and the closer the signal comes to half the clock the closer they come to each other. The hold gives 25.6 dB of image rejection to a tone at a twentieth of the clock, 1.74 dB at 0.45 of it, and nothing at all at half — which is the frequency the band most needs it at.

What flatness costs, in the two places it can be bought. computed by solving, not by drawing. The hold's sinc across a band ending at 0.40 of the sample rate, and the same sinc with a one-zero one-pole shelf fitted to its reciprocal over that band. The droop to be removed is 2.420 dB. Corrected digitally the band comes flat exactly and the flat level sits 2.420 dB below what the uncorrected converter gave at direct current, because nothing may exceed full scale — the price is the disease. Corrected in analogue the band comes flat to 0.2308 dB and the shelf is still rising where the images are, so the worst image at 0.60 fs comes up by 3.799 dB, which is 1.57 times the droop it removed — and that boost is between 3.4 and 4.7 dB at every band on the slider, while the droop it cures runs from 0.58 to 3.75. Neither correction changes the signal-to-noise ratio, because the droop never cost any.

Flatness, and the two currencies it is bought in

The hold's droop takes the signal and everything arriving with it down together, so it costs no signal-to-noise ratio at all — a fact that is never stated and settles what correcting it can possibly be worth. Corrected digitally the price is headroom and is exactly the disease: 2.42 dB of flatness for 2.42 dB of output level. Corrected by an analogue shelf the price is image rejection and is nearly a constant: between 3.4 and 4.7 decibels whatever the band, so it is eight times the droop at a fifth of the clock and nine tenths of it at forty-nine hundredths.

What an oversampling ratio buys, and at two different rates. computed by solving, not by drawing. A 20 kHz band on a 48 kHz base clock, interpolated by ratios from 1 to 64. The hold's droop at the band edge falls with the SQUARE of the ratio — the fitted exponent over six doublings is -2.0113 — from 2.640 dB at the Nyquist rate to 0.0097 at sixteen times it. The nearest image moves out with the FIRST power, exponent 1.0222, from 1.40 times the band edge to 37.4. So one decision buys two things at rates differing by a factor of two in the exponent, and the third quantity — the poles a reconstruction filter needs for sixty decibels — collapses from 20.5 to 3.21 by a ratio of four alone.

One knob, and the two exponents it turns

Oversampling is quoted as buying one thing and buys two that improve at different rates. The hold's droop at the band edge falls with the SQUARE of the ratio — fitted exponent −2.011 over six doublings, from 2.640 dB at the Nyquist rate to 0.0097 at sixteen times it — while the nearest image moves out with the first power, exponent 1.022. The third quantity, the poles a reconstruction filter needs for sixty decibels, collapses from 20.5 to 3.21 by a ratio of four alone, because it is a logarithm of the second.

All essays