The rate each reading needs
Assumes: The frequency a sample rate invents
The frequency a sample rate invents measured the one boundary in this field with 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. An exact answer to a different question then measured what the reconstruction sum does with samples on each side of that boundary: it returns the waveform the samples were taken from below it, and the alias above it, each to the same accuracy.
Between them those two essays establish what the Nyquist rate guarantees, and it is a strong guarantee. Samples taken faster than twice the highest frequency present determine the waveform completely; nothing has been lost, and the reconstruction can recover any value at any instant. What they do not say is how much work that recovery is. A great deal of measurement does not reconstruct at all — an oscilloscope reports the largest sample as the peak, a frequency counter times the zero crossings, a power meter sums the squares — and each of those readings takes the samples at face value. This essay asks, for each common reading, how fast the samples must come for the reading to be right without any reconstruction, and the answer is a different power of the rate for each.
Everything there, the peak not on show
Take a unit sinusoid and sample it eight times a cycle, synchronously, at the sampling phase that puts its peak exactly between two samples.
Eight samples a cycle is four times the Nyquist rate, and the samples determine the waveform exactly. The largest of them is 0.9239, 7.61 per cent below the peak. At the worst phase the peak sits half a sample interval from the nearest sample, and a cosine half an interval from its maximum has fallen to of it, where is the number of samples a cycle. No other phase is worse, and the solve confirms the worst over 360 starting angles equals that closed form to a part in a million.
The slider shows how slowly the largest sample improves. At three samples a cycle it is half the peak; at four, 29.3 per cent low; at 22, about one per cent; at 70, a tenth of a per cent. The largest sample needs 22.2 samples a cycle to be within one per cent of the peak, and 70.2 to be within a tenth — eleven and thirty-five times the Nyquist rate. An oscilloscope that samples a ten-megahertz sine at a hundred megasamples a second and reports the largest sample as its amplitude reads up to five per cent low, and the waveform it displays is perfectly sampled.
Four readings, four powers of the rate
The largest sample is one reading. Others are made from the same samples, and each has its own error law, which is the substance of the essay.
Fitted over the top of the range, the largest sample’s error falls as the rate to the power −2.00: a cosine is flat at its maximum, so the shortfall half an interval away is quadratic in the interval. A parabola through the three largest samples, which takes the curvature into account, errs as the fourth power, −4.00, and reaches one per cent at eight samples a cycle — a peak-reading oscilloscope’s “interpolation” setting is buying exactly this. The time of a zero crossing, from a straight line through the two samples either side of it, errs as the cube, −3.00, and is right to a hundredth of a cycle at five samples a cycle. And the rms of a whole number of cycles is exact, to rounding, from three samples a cycle upwards.
Each power has a reason that belongs to the shape of the sine at the point being read. A maximum is where the waveform is flat to first order, so a sample near it reveals almost nothing about how far it is from the top. A zero crossing is where the waveform is straight to second order — a sine has an inflection there — so a straight line through two samples is nearly right. The rms of whole cycles is a sum of squares of equally spaced cosines, which is exactly half the number of samples by a trigonometric identity that holds for any three or more per cycle. The reading decides the rate, and the Nyquist rate is the rate at which no reading at all is impossible.
Time instead of rate
A synchronous sampler — one whose rate is an exact multiple of the signal’s — sees the same phases every cycle, and if those phases miss the peak, they miss it for ever. A sampler slightly off a multiple sees a slowly sliding set of phases, and that changes the arithmetic for any steady signal.
At 4.0236 samples a cycle — just off four — one cycle’s largest sample is up to 30.0 per cent low, as a synchronous four a cycle would be. But the sampling grid slips past the signal by 0.0236 of a sample interval each cycle, so after 42.4 cycles it has slipped a whole interval, and by then some sample has landed close to every phase of the waveform, including its peak. The worst of fifty seeded starts is under one per cent by 38 cycles and under a tenth of a per cent by 46, and after ten thousand cycles it is two parts in a hundred million.
So for a steady signal, rate and time trade freely. A slow sampler and a long record read the peak as well as a fast sampler does, provided the rate is not locked to the signal; an equivalent-time sampling oscilloscope builds a picture of a multi-gigahertz waveform from a few samples per repetition in exactly this way. What the trade cannot do is help a signal that happens once. A single pulse sampled at four points a cycle is read thirty per cent low with no record to lengthen, and the rate is then the only knob.
The rms needs more than two
The rms reading converges fastest, but it has its own boundary, and it sits exactly at the Nyquist rate.
At exactly two samples a cycle the two samples are and for ever, and their rms is against the true — anything from zero, when every sample lands on a zero crossing, to times the true value, depending only on where the sampling started. Above two the reading becomes exact for a whole number of cycles: at three a cycle at every phase, and at two and a half a cycle too, provided the record holds a whole number of repeats of the five-sample pattern. Over 10.4 cycles at two and a half it is within 1.9 per cent, and the error belongs to the part-cycle at the end of the record rather than to the rate.
That locates the rms reading’s real requirement, which the cycle a converter has to know measured from the other side: the record must hold a whole number of periods, or be long enough that the part-period does not matter. A true-rms instrument that samples above twice the highest harmonic and averages over many cycles is therefore right for reasons that have nothing to do with its rate beyond that, and the noise a true-rms meter reads low is the case where the averaging, not the sampling, is the limit.
A chord through an inflection
The zero-crossing reading deserves one more look, because its accuracy is surprising and its structure is not quite what the power law suggests.
The error is zero when the crossing falls on a sample, trivially, and zero again when it falls exactly between two: the samples are then symmetric about an inflection point, and a chord through two points symmetric about a sine’s zero passes through the zero exactly. Between those positions the error changes sign and reaches 1.0 × 10⁻² of a sample interval at eight samples a cycle, 2.5 × 10⁻³ at sixteen and 6.2 × 10⁻⁴ at thirty-two — a factor of four each doubling, so in sample intervals it falls as the square and in fractions of a cycle as the cube.
That is why frequency counters and phase meters can work from coarse samples. A crossing interpolated from eight samples a cycle is right to about a thousandth of a cycle, a phase error under half a degree, at a rate a peak reading would find seven per cent low. The same chord applied anywhere else on the waveform — to find when the signal passes half its amplitude, say, which a rise-time measurement does — has no inflection to help it, and its error falls only as the square.
One oscilloscope, four signals
Put the four laws on one instrument. An oscilloscope sampling at a hundred megasamples a second, with a bandwidth comfortably above the signals it is shown, reports a peak amplitude, a frequency and an rms for each of four sine waves: one, five, ten and twenty-five megahertz. That is a hundred, twenty, ten and four samples a cycle — every one of them comfortably above the Nyquist rate, and every one of them, by the sampling theorem, a complete record of its signal.
Its frequency readings, taken from interpolated zero crossings, are good to a few ten-thousandths of a cycle per crossing at ten samples a cycle and far better at twenty and a hundred; at four samples a cycle, the twenty-five-megahertz signal, the cube law allows about a hundredth of a cycle per crossing, and averaging many crossings over a record shrinks that further. Its rms readings, taken over whole cycles of the record, are exact at all four. Its peak readings, taken as the largest sample of a single acquisition of a signal locked to the clock, are 0.05 per cent low at one megahertz, 1.2 per cent at five, 4.9 per cent at ten and up to 29 per cent at twenty-five. The same instrument, the same acquisition, the same signal: three readings it gets right and one it gets wrong by a quarter, depending only on which property is asked for.
That is the practical content of this essay, and it explains a pattern familiar to anyone who uses such an instrument. Peak and peak-to-peak readings of fast signals scatter from acquisition to acquisition while the frequency and rms readings of the same signal are steady: the scatter is the sampling phase moving between acquisitions, and it disappears either at a higher sample rate or, for a repetitive signal whose frequency is not locked to the clock, when enough acquisitions are combined that the phases fill in. The instrument’s own rise time is the other limit on the same readings, and it is independent of this one: an oscilloscope’s analogue bandwidth flattens a fast edge before any sampling happens, and no rate repairs it.
The converter’s resolution is a third limit and it combines differently. Six decibels a bit measured the quantiser’s own floor; an eight-bit converter’s step is 0.78 per cent of a full-scale sine’s peak, about the sampling shortfall at twenty-two samples a cycle, and the shortfall at ten samples a cycle is six times larger. On a fast signal the sampling, not the resolution, decides how well the peak is known — and buying more bits buys nothing for it.
What this does and does not say about the Nyquist rate
None of this contradicts the sampling theorem; it reads it more precisely. The theorem promises that the samples contain the waveform. It promises nothing about readings that do not reconstruct it, and most practical readings do not, because reconstruction — the sum of sinc functions an exact answer to a different question measured converging slowly — is expensive. Each shortcut reading has a rate at which it becomes as good as reconstruction would have been, and the list above is the list of those rates for a sinusoid: three a cycle for the rms of whole cycles, five for a crossing to a hundredth of a cycle, eight for a parabolic peak to a per cent, twenty-two for a raw peak.
For a waveform with harmonics, each reading’s rate applies to the highest harmonic that matters to it. A square wave’s peak is set by its fundamental and every odd harmonic in phase, so reading its peak from samples needs the raw-peak rate for the highest harmonic retained; its rms, the rms rate for the same harmonic. What a meter multiplies by found a true-rms meter that reaches nine harmonics two per cent low on a square wave; that error is the harmonics’ bandwidth, not their sampling, and it would remain at any rate. A picosecond read as bits is the reminder that every number here assumes samples taken at exactly the instants intended; jitter adds an error that grows with the slope at the sample, which is largest at the zero crossings this essay found easiest to read.
How the readings were taken
Every reading is computed from explicit samples of a unit cosine at stated phases, with no reconstruction anywhere: the largest sample by comparison, the parabola by the three-point vertex formula, the crossing by linear interpolation between the samples straddling the first upward zero, the rms as the root of the mean square. Worst cases are maxima over 360 equally spaced sampling phases within one sample interval, and power laws are slopes fitted over the top three octaves of the rate. The long-record figure draws fifty starting phases from a seeded generator at each length and plots the worst. The raw-peak closed form, , is checked against the sampled worst case to a part in a million, and the rms is checked exact at every phase at three samples a cycle.
The signal is a pure, noiseless sinusoid of exactly known frequency. Noise on the samples makes the largest sample read high rather than low — the maximum of a noisy set is biased upward — and at some rate the two errors cancel, which no reading here was asked to exploit.
Still open: noise on the samples, a waveform with a sharp peak, and the rate a rise time needs
The largest sample of a noisy record. With noise on each sample, the largest sample is the maximum of a set of noisy values and is biased high by an amount that grows with the number of samples near the peak, while the sampling shortfall pulls it low. For a stated noise level there is a rate at which the two cancel and a rate beyond which the noise bias dominates, and a peak-reading instrument’s best rate is the first of them.
A peak that is not round. The square law belongs to a maximum with a continuous second derivative. A triangle wave’s peak is a corner, and the largest sample then falls short in proportion to the interval rather than its square — one power slower. A clipped sine is flat and falls short by nothing until the flat top is shorter than an interval. Which law a real waveform’s peak follows is a property of its shape at the peak, and the rate a peak reading needs follows from it.
The rate a rise time needs. A ten-to-ninety per cent rise time interpolated from samples has no inflection to help it at either threshold, so its error falls only as the square of the rate, and it is read from two thresholds whose errors may add. How many samples per rise time give a rise-time reading to a stated accuracy — a question every oscilloscope specification answers with a rule of thumb — is the crossing figure moved to the ten and ninety per cent levels.
Part 3 on sample rate
One argument about Sample rate, and one of 5 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.
AliasingConvergence orderModel rangeNyquist rateReconstructionSample rateTrue-rms
- The filter that samples aliasing, model range, nyquist rate, sample rate
- The clock that is too fast aliasing, model range, sample rate
- A resistor made of a clock aliasing, model range
- One bit, and where the noise went convergence order, sample rate
- The average a square root pulls low model range, true-rms
- The digits the arithmetic did not have convergence order, model range