Where a signal becomes a number

The shape a second pass assumes

A rise read through noise improves without limit if the samples are filtered at the rise divided by root three and the filter's own rise is removed in quadrature — but that needs the rise before it is measured. Read the samples twice, a chord first to estimate it, and on a Gaussian edge the first pass costs nothing: the best filter's error is flat to first order, and the chord's 2.57 per cent scatter moves it by 0.024 per cent, so a two-pass reading at 40 dB reads to 0.80 per cent at 40 samples a rise and 0.37 at 160. On a first-order edge it stops at 2.3 per cent, because quadrature is exact only when both shapes are Gaussian: a filter of 0.577 of the rise lengthens a first-order edge's tail by more than the rule allows, and the corrected rise reads 2.35 per cent long. The best quadrature filter for that edge is narrower — 0.26 of the rise at 40 a rise, 1.33 per cent — and it narrows with the rate towards the width where the rule's bias changes sign. A reading that inverts the first-order rise relation instead is back on the square-root law: 0.30 per cent at 400 a rise, against a Gaussian edge's 0.24.

Assumes: The frequency a sample rate invents · The staircase on the way out

The rate a noisy edge stops paying for found that a rise time read by straight chords between samples stops improving once noise arrives: each threshold crossing is set by two noisy samples whatever the rate, so a Gaussian edge with noise one per cent of its step reads to 2.57 per cent and no better. It also found the way past the floor. Filter the samples with a Gaussian before reading, at a width whose rise is the edge’s divided by 3\sqrt3, and remove the filter’s own rise afterwards in quadrature. The filter averages more samples as the rate rises, and the reading falls as one over the square root of the rate without limit: 0.742 per cent at forty samples a rise, 0.235 at four hundred.

That procedure has a circularity in it, which the essay named and left. The best filter is the edge’s rise over 3\sqrt3, and the edge’s rise is what is being measured. An instrument cannot set the filter from the answer. The obvious procedure is to read twice: a chord reading first, which needs no filter and gives the rise to 2.57 per cent, then a filtered reading at the width the first suggests. The question was whether the first reading’s error spoils the second.

It does not, on the edge the procedure was designed for. But the procedure has a second assumption, less visible than the first, and on an edge of a different shape it is the second assumption that fails. Quadrature subtraction of rise times is exact only when both the edge and the filter are Gaussian. A first-order edge — the exponential rise of a single pole, the commonest edge there is — is not, and a two-pass reading of one stops at 2.3 per cent, scarcely better than the chord it started from.

Read twice — a chord to estimate the rise, then a filter of that rise over √3 — a Gaussian edge at 40 dB reads to 0.803% at 40 a rise and 0.374% at 160; a first-order edge stops at 2.3%, the quadrature rule's 2.36% bias. computed by solving, not by drawing, and seeded. A two-pass reading of a rise through noise 1% of the step: the samples read by chord, the filter set to that reading's rise over √3, the samples filtered and read again, and the filter's rise removed in quadrature. Gaussian edge: closed form with the filter set from the true rise (solid) and 200 seeded edges at each of six rates (dots); first-order edge: closed form (dashed) and seeded (dots). 5 a rise: Gaussian 3.07% (closed form 2.1%), first-order 5.52% (closed form 3.65%); 10 a rise: Gaussian 1.72% (closed form 1.48%), first-order 3.54% (closed form 3.07%); 20 a rise: Gaussian 1.06% (closed form 1.05%), first-order 2.95% (closed form 2.74%); 40 a rise: Gaussian 0.803% (closed form 0.742%), first-order 2.52% (closed form 2.55%); 80 a rise: Gaussian 0.543% (closed form 0.524%), first-order 2.35% (closed form 2.46%); 160 a rise: Gaussian 0.374% (closed form 0.371%), first-order 2.3% (closed form 2.41%). From 20 a rise the seeded Gaussian readings sit on the closed form; below that the chord's own sampling error, which the closed form leaves out, adds to them. The first pass's 2.6% error in the rise costs the Gaussian reading nothing that shows. On the first-order edge the quadrature correction is wrong by 2.36% at that filter, so the reading falls with the rate only until it reaches that bias, and then stops, at about the chord's own floor of 2.57%.
Fig. 1 The rms error of a two-pass rise reading at 40 dB — chord, then a filter of that reading’s rise over 3\sqrt3, then quadrature — against samples per rise. Gaussian edge: closed form (solid) and 200 seeded edges at six rates (dots), 0.803% at 40 a rise and 0.374% at 160. First-order edge: closed form (dashed) and seeded (dots), 2.52% at 40 and 2.30% at 160, flattening at the quadrature rule’s 2.36% bias (horizontal).

Two passes over one set of samples

The edges are the earlier essays’: a Gaussian edge and a first-order edge, 1−e−tln⁡91 - e^{-t\ln 9}, each with a 10–90 per cent rise of exactly one unit. Each is sampled at nn samples a rise with a random phase, and every sample carries white noise of one per cent of the step, 40 dB.

The first pass is the chord reading: the first pair of samples straddling each threshold, joined by a straight line. The second pass takes that reading’s rise, t^\hat t, converts it to the standard deviation a Gaussian edge of that rise would have, t^/2.563\hat t/2.563, and sets the filter’s standard deviation to that over 3\sqrt3. The samples are convolved with the filter, read by chord again, and the filter’s rise is subtracted in quadrature: tm2−tf2\sqrt{t_m^2 - t_f^2}. Both passes use the same samples, so their noise is correlated, which a closed form would have to ignore and a seeded trial includes.

The closed forms are exact for both shapes. A Gaussian edge through a Gaussian filter is a Gaussian edge of the summed variance. A first-order edge through a Gaussian filter is an exponentially modified Gaussian, whose value is Φ(t/s)−e−t/τ+s2/2τ2 Φ(t/s−s/τ)\Phi(t/s) - e^{-t/\tau + s^2/2\tau^2}\,\Phi(t/s - s/\tau), with τ=1/ln⁡9\tau = 1/\ln 9 and ss the filter’s standard deviation; it was checked against a numerical convolution of the edge with the filter and agrees to two parts in a thousand. From these the filtered rise, the slope at each threshold that converts noise into timing, and the correction’s own gain all follow.

The first pass is free

On the Gaussian edge, the hero figure’s seeded two-pass readings lie on the closed form for a filter set from the true rise: 1.06 per cent at 20 samples a rise against 1.05, 0.803 at 40 against 0.742, 0.374 at 160 against 0.371. Below 20 a rise the seeded readings are worse than the closed form — 3.07 per cent against 2.10 at five a rise — because the chord’s own sampling error, which falls as the square of the rate, is still present there and the closed form leaves it out.

The reason the first pass costs so little is the shape of the optimum it is trying to hit.

Why the first pass costs nothing: at 40 a rise and 40 dB the best filter's error is flat to first order, so the chord's 2.57% scatter in the rise moves it by 0.024%, and even a filter 30% wide of the best costs 2.8%. computed by solving, not by drawing: the filtered, quadrature-corrected reading's rms error on a Gaussian edge at 40 samples a rise and noise 1% of the step, as a ratio to its value at the best filter (rise over √3), against the filter's width as a ratio to the best. The curve is 14.9% above its minimum at half the best width, 4.3% at 0.7, 2.8% at 1.3 and 23.7% at twice. The first pass sets the width from a chord reading whose own rms error is 2.57%, the band drawn about the minimum, where the curve has risen by 0.024%. The two-pass reading's seeded error, 0.803% against the best filter's 0.742%, also includes the first pass's noise being correlated with the second's, since both read the same samples; at this rate it does not show.
Fig. 2 The filtered, corrected reading’s error on a Gaussian edge at 40 samples a rise and 40 dB, relative to its value at the best filter, against the filter’s width relative to the best. 14.9% worse at half the width, 4.3% at 0.7, 2.8% at 1.3, 23.7% at twice. The band is the first pass’s scatter in the rise, ±2.57%, across which the error rises by 0.024%. The dot is the seeded two-pass reading.

The best filter is a minimum, and a minimum is flat to first order. The error rises by 4.3 per cent with a filter 30 per cent too narrow and 2.8 per cent with one 30 per cent too wide; the first pass gets the width right to 2.57 per cent, across which the error rises by 0.024 per cent. Whatever error the first pass makes in the rise, it costs the second pass an amount proportional to its square.

The seeded two-pass reading at forty a rise is 0.803 per cent against the best filter’s 0.742, a difference of eight per cent that is mostly the sampling of the chord at this rate, as the hero figure’s lower rates show, rather than the first pass’s choice of width. The correlation between the two passes’ noise does not show at this precision. So the circularity in the earlier essay’s procedure is no obstacle: a rough estimate of the answer is enough to choose the filter that measures it well.

The second assumption

The procedure has a second assumption, and it is in the correction rather than in the choice of filter. Subtracting the filter’s rise in quadrature is the rule the instrument’s own rise time used for a measuring instrument’s front end, and it is exact only when the edge and the instrument are both Gaussian. For any other shape the rise times do not add in quadrature, and the correction leaves a bias that depends on the filter’s width.

The quadrature rule assumes the shape: removing a filter's rise in quadrature is exact for a Gaussian edge at every width, and for a first-order edge it reads 2.35% long at the width the Gaussian rule chooses. computed by solving, not by drawing: the error of the rise recovered by subtracting the filter's own rise in quadrature from the filtered edge's, with no noise, against the filter's rise, for three edges of unit rise: Gaussian (zero at every width), first-order (the exponentially modified Gaussian in closed form, checked by numerical convolution at one width) and raised cosine (convolved numerically). First-order: −0.253% at a tenth, 0.616% at 0.3, 2.35% at 0.577 and 4.3% at one. Raised cosine: −0.91%, −2.29% and −3.4%. Rise times add in quadrature only when both shapes are Gaussian; a first-order edge has a long tail that a filter lengthens by more than the rule allows for, so the corrected rise is long, and a raised cosine, which has no tail at all, is lengthened by less and reads short. At the width the two-pass reading chooses, the first-order error is nearly the chord's whole noise floor.
Fig. 3 With no noise, the error of the rise recovered by subtracting the filter’s rise in quadrature, against the filter’s rise, for three edges of unit rise. Gaussian: zero at every width. First-order: −0.25% at a tenth, 0.62% at 0.3, 2.35% at 0.577, 4.3% at one. Raised cosine: −0.91%, −2.29% and −3.4% at 0.3, 0.577 and one.

For the first-order edge the bias is small for a narrow filter and grows roughly as the square of the filter’s width beyond a sign change near 0.19 of the rise: 0.62 per cent at 0.3, 2.35 per cent at the 0.577 the Gaussian rule chooses, 4.3 per cent at a filter as slow as the edge. The cause is the edge’s tail. A first-order edge approaches its final value exponentially, and a filter spreads that slow approach further, moving the 90 per cent crossing later by more than a Gaussian edge’s would move. The quadrature rule, which assumes the Gaussian’s symmetric spreading, removes too little, and the corrected rise is long.

A raised-cosine edge, which has no tail at all, errs the other way, reading 2.29 per cent short at 0.577. So the bias is not a quirk of one shape: its size and its sign are properties of the edge, and a procedure that does not know the edge’s shape does not know which way it is wrong.

At the width the two-pass reading chooses, the first-order bias, 2.35 per cent, is almost the whole of the chord’s noise floor, 2.57. The filter has averaged away the noise and the correction has put back an error of the same size. That is the hero figure’s flat line: on a first-order edge the two-pass reading falls with the rate only until its noise reaches the bias, and stops at 2.30 per cent at 160 samples a rise.

A narrower filter for an unknown shape

If the shape is first-order and the correction is quadrature anyway, the filter can be chosen to balance the bias against the noise rather than to minimise the noise alone.

On a first-order edge at 40 a rise and 40 dB the quadrature reading's best filter is 0.26 of the rise, not 0.577, and it reads to 1.33% — 2.55% at the Gaussian rule's width, against a Gaussian edge's 0.742%computed by solving, not by drawing: the first-order edge at 40 samples a rise and noise 1% of the step, filtered and corrected in quadrature: the bias of the correction (its magnitude, dashed), the noise of the corrected reading (dotted) and the two together (solid), against the filter's rise. The bias changes sign near 0.19 and grows roughly as the square of the filter beyond it; the noise falls as the filter widens. Their sum is least at 0.260 of the rise, 1.33%, with 0.397% of bias in it. At the 0.577 the Gaussian rule chooses it is 2.55%. A Gaussian edge at the same rate and noise reads to 0.742% at its own best filter.the filter's rise, over the edge'serror of the corrected reading0.10.310.1%1%10%the two together1.33% at 0.26the rule's bias2.36% at 0.577the noisesolved, then checked — bias against noisea narrower filter for an unknown shape
Fig. 4 The first-order edge at 40 samples a rise and 40 dB, filtered and corrected in quadrature: the correction’s bias (dashed), the corrected reading’s noise (dotted) and the two together (solid), against the filter’s rise. Least at 0.26 of the rise, 1.33%, with 0.40% of bias in it; 2.55% at the Gaussian rule’s 0.577. A Gaussian edge reads to 0.742% at its own best. The slider sets 10, 40 and 160 samples a rise.

The bias grows with the filter and the noise falls with it, and their sum is least at a filter of 0.26 of the rise, where the reading is 1.33 per cent: better than the Gaussian rule’s 2.55 at this rate, and still nearly twice the 0.742 a Gaussian edge reads to. At ten samples a rise the best width is 0.33 and the reading 2.46 per cent; at 160 it is 0.22 and 0.70 per cent, against 2.41 at the Gaussian width.

The best width narrows as the rate rises, and the reason is the bias’s sign change. As the noise falls with the rate, the bias has to fall with it to stay out of the way, and the only place the quadrature rule’s bias is small is near the width where it crosses zero, about 0.19 of the rise for this edge. So the filter is pulled towards that width, averaging fewer samples than it would on a Gaussian edge. And that width belongs to the first-order shape: for a raised cosine the bias does not cross zero at all in this range. A reader who knew where to set the filter would already know the shape.

A correction that knows the shape

The alternative is to replace the quadrature rule. For a first-order edge the filtered rise is an exact, known function of the true rise and the filter’s width, from the exponentially modified Gaussian, and it can be inverted: measure the filtered rise, solve for the true rise that would have produced it. That correction has no bias, and its gain — how much it amplifies the filtered reading’s noise — is the reciprocal of the measured rise’s derivative with respect to the true one.

Knowing the shape buys the square-root law back: at 400 a rise a first-order edge reads to 2.38% with the Gaussian rule's filter, 0.448% with the quadrature rule's best, and 0.303% when its own rise relation is inverted, against a Gaussian edge's 0.235%. computed by solving, not by drawing: rms error of the rise reading at 40 dB against samples per rise. First-order edge: filter at the Gaussian rule's 0.577 and quadrature (dashed, flat at the bias), quadrature with the best filter for that rate (dotted), and the shape-aware reading, which inverts the first-order edge's exact measured-rise relation instead of subtracting in quadrature, at its own best filter (solid); a Gaussian edge at its best (faint). 4 a rise: 3.9%, 3.66%, 3.03%; Gaussian 2.35%; 13 a rise: 2.93%, 2.22%, 1.71%; Gaussian 1.32%; 40 a rise: 2.55%, 1.33%, 0.959%; Gaussian 0.742%; 126 a rise: 2.42%, 0.778%, 0.54%; Gaussian 0.417%; 400 a rise: 2.38%, 0.448%, 0.303%; Gaussian 0.235%. Slopes: quadrature at its best 0.456, shape-aware 0.500. With the quadrature rule the best filter narrows as the rate rises — 0.41 of the rise at 4 a rise, 0.26 at 40, 0.21 at 400 — towards the width where the rule's bias changes sign, because only there can its bias stay below a shrinking noise; that spends part of the averaging, and the width it converges on is itself a property of the first-order shape. With the shape known the filter can stay wide and the reading falls as 1/√n, like a Gaussian edge's.
Fig. 5 The rms error of the rise reading at 40 dB against samples per rise, first-order edge: the Gaussian rule’s filter with quadrature (dashed, flat at its bias), quadrature with the best filter for each rate (dotted), and the first-order rise relation inverted, at its own best filter (solid); a Gaussian edge at its best (faint). At 400 a rise: 2.38%, 0.448% and 0.303%, against the Gaussian edge’s 0.235%. Slopes 0.456 and 0.500.

With the shape known, the first-order reading falls as one over the square root of the rate, slope 0.500, like the Gaussian edge’s: 0.959 per cent at forty samples a rise, 0.303 at four hundred. Quadrature at its best filter falls more slowly, with slope 0.456, because its filter narrows with the rate, and it is 0.448 per cent at four hundred. The Gaussian rule’s filter does not fall at all past its bias.

So the order of what the rate buys is clear. A faster sampler buys nothing for a chord reading past five samples a rise; it buys the square-root law for a filtered reading whose correction matches the edge’s shape; and for a correction that does not match, it buys less, by an amount the shape decides.

Where the shape comes from

A real instrument meets edges of many shapes. A logic gate’s output through a transmission line is close to first-order with some ringing; a well-damped amplifier’s step is close to Gaussian; a slew-limited edge is a ramp; a filtered pulse in a receiver is whatever its filter made it. The shape is also not hidden: the same samples that give the rise give the edge’s curve, and a two-pass reading could become a three-pass one, with the second pass fitting the edge’s shape — first-order, Gaussian, or a family between them — before the third chooses the filter and the correction.

The figures here give that procedure its stakes. On a first-order edge at forty samples a rise, the Gaussian correction reads to 2.55 per cent, the best quadrature filter to 1.33, and the shape-aware correction to 0.96. Knowing the shape is worth a factor of 2.7 over the default and 1.4 over the best a shape-blind correction can do, and the factor grows with the rate.

The same rule in an instrument’s front end

The quadrature rule’s limits are not specific to software filters. The instrument’s own rise time used it to remove an oscilloscope’s front end from a measured edge, and a front end is usually closer to Gaussian than to anything else, so the rule is good there. But the edge being measured is whatever it is, and a first-order edge measured through a Gaussian front end of 0.577 of its rise reads 2.35 per cent long after correction, exactly as here. The samples a rise time needs found the same dependence on shape in the sampling itself: the chord’s error falls as the square of the rate for every shape, with a coefficient the shape sets. Rise time is a number that sounds shape-free and is not.

A reading’s rate depends on what is read

The essays this one follows have each found that a sample rate cannot be chosen apart from the question. The rate each reading needs found that eight samples a cycle hold a sinusoid and still misread its peak; the peak that is a corner found that the largest sample’s shortfall falls as the square of the interval for a sine and as the first power for a triangle’s corner, so the law belongs to the shape. An exact answer to a different question found a reconstruction returning the right answer to the wrong question above half the sample rate.

The two-pass reading adds a version of the same finding in which the rate and the shape interact through a correction rather than through the sampling. On a Gaussian edge every extra sample is worth its square root, because the correction is exact and the filter can stay at its best width. On a first-order edge the same extra sample is worth less, because the correction is not exact and the filter has to narrow to keep its bias under the shrinking noise. A rate chosen for one shape is therefore not the right rate for another, even after filtering, and the difference is not in the samples but in the arithmetic applied to them afterwards.

The averaging itself is the part that does not depend on the shape. The window the square-root law has found that averaging divides noise power by the number of readings only while they are independent, and the samples here are, since their noise is white. What the shape changes is how many of them the filter is allowed to average before its correction’s error outgrows the noise it removed.

How the numbers were obtained

The closed forms are the filtered edge’s crossings, found by bisection on the exact curve — the cumulative Gaussian for the Gaussian edge, the exponentially modified Gaussian for the first-order one — with the noise carried into each crossing by the filtered noise’s standard deviation over the filtered edge’s slope there, and into the corrected rise by the correction’s gain. The best filters are golden-sectioned on the logarithm of the width. The seeded edges are 200 at each of six rates for each shape, with a random sampling phase and Gaussian noise on every sample, read exactly as described, both passes on the same samples. The raised cosine through the filter is a numerical convolution, since it has no closed form. The earlier essay’s noise formula for the Gaussian edge is reproduced by the general one to a part in a million.

What the two passes leave out

The noise is white and Gaussian; a real front end’s noise is band-limited and its filtering interacts with the software filter’s. The filtered noise at the two thresholds is treated as independent, which is accurate when the filter is narrower than the rise and generous when it is not. The edges have no overshoot; the earlier essay’s question about an overshooting front end, where the 90 per cent level is crossed on an overshoot, is not taken up here. The shape-aware correction assumes the shape exactly; a fitted shape would carry the fit’s own error into the correction, and how much is the cost of the third pass.

What to carry

A two-pass rise reading — a chord to estimate the rise, then a filter of that rise over 3\sqrt3 and a quadrature correction — loses nothing to its first pass, because the best filter’s error is flat: the chord’s 2.57 per cent scatter in the rise costs 0.024 per cent. On a Gaussian edge at 40 dB it reads to 0.80 per cent at forty samples a rise and 0.37 at 160. On a first-order edge the quadrature correction is 2.35 per cent wrong at that filter, and the reading stops near 2.3 per cent. The best quadrature filter for that edge is narrower, 0.26 of the rise at forty a rise for 1.33 per cent, and narrows with the rate. A correction that inverts the first-order rise relation restores the square-root law, 0.30 per cent at four hundred a rise.

Still open: the overshooting edge, a fitted shape, and the noise the front end shapes

The overshooting front end. A front end with a sharp roll-off puts an overshoot on every edge, and the 90 per cent level is then crossed on the way up and perhaps again on the way down. A filter in software spreads the overshoot as well as the rise. Whether a two-pass reading should filter before or after locating the first crossing, and what the quadrature rule does to a shape with a peak in it, is the earlier essay’s third question, now with a shape-dependence in the correction to account for.

A fitted shape. A third pass that fits the edge to a family — a first-order edge convolved with a Gaussian, with the ratio of the two a free parameter — would choose the correction from the samples. The fit’s own error then becomes the correction’s error, and whether a three-pass reading beats the best shape-blind filter at forty samples a rise, and from what rate, is a seeded measurement with one more parameter.

Noise the front end has already shaped. The samples here carry white noise. Behind a real analogue front end the noise is filtered by the same front end that shapes the edge, and is correlated from one sample to the next. The software filter’s averaging then buys less than the square-root law, by an amount set by the front end’s bandwidth against the sample rate.

Part 7 on sample rate

One argument about Sample rate, 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.

Design tradeoffModel rangeReconstructionRise timeSample rateSeeded generator