Where a signal becomes a number

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.

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

The staircase on the way out followed one multiplication across the band and stopped at half the sample rate. A converter holds each sample for a whole clock period, which is a convolution with a rectangle and therefore a multiplication by a sinc, and the sinc is 0.14 dB down at a tenth of the sample rate, 0.91 at a quarter and 3.92 at half. That essay called the droop a filter nobody chose, and it is.

Half the sample rate is where the interesting part of that filter starts.

The sampled signal’s spectrum does not stop at half the clock. It repeats, at every multiple of the clock, for ever — that is what sampling is, and it is the whole content of the frequency a sample rate invents. The hold multiplies all of it by one sinc. So every replica survives, scaled by the value of the sinc at its own frequency rather than at the signal’s, and what is left after the hold is a signal with a small droop on it and an infinite series of copies above it.

Those copies are the reason a reconstruction filter exists. They have never been drawn here, and the shape of the sinc has a property that decides how much work that filter has to do.

The images a zero-order hold leaves, at 0.222 of the sample ratecomputed 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%.-40-20000.50011.5022.503frequency, as a multiple of the sample rateamplitude (dB, full scale)the banda null of the sinc, where no image is10.88 dB downsignal10.667 kHzas a fraction0.2222 fsit comes out at-0.717 dBworst image1fs−fat37.33 kHzand-11.599 dBrejection10.881 dBtwo routes agree0.0261%solved, then checked — the replicas the rectangle kept10.88 dB at 0.222 fs, nothing at 0.5
Fig. 1 A tone at two ninths of the clock, held, with every line read out of a transform of the staircase itself. The envelope is the sinc; the shaded band is everything below half the sample rate; the stems above it are what the hold did not remove. The slider moves the tone up the band, and where the largest image goes as it does so is the essay.

Where the images are, and what decides their height

A tone at frequency ff, sampled at fsf_s, has its spectrum repeated at mfs±fmf_s \pm f for every integer mm. Held, each of those lines is multiplied by sinc(πfline/fs)|\mathrm{sinc}(\pi f_{\text{line}}/f_s)|, evaluated at the line’s own frequency.

That sentence contains the whole mechanism and it is worth being slow about one word in it. The hold does not attenuate the images because they are images. It has no way of knowing which line is the signal. It is a filter with one response, applied to a spectrum that happens to contain copies, and the attenuation each copy receives is whatever the response is at the place the copy landed.

At a tone of 2fs/92f_s/9 — 10.67 kHz on a 48 kHz clock — the lines come out like this:

line frequency measured the sinc there
the signal 10.67 kHz 0.9207 0.9207
fsff_s - f 37.33 kHz 0.2631 0.2631
fs+ff_s + f 58.67 kHz 0.1674 0.1674
2fsf2f_s - f 85.33 kHz 0.1151 0.1151
2fs+f2f_s + f 106.7 kHz 0.0921 0.0921

The measured column is read out of a discrete transform of the staircase, built at 256 points per clock period so that the steps are represented rather than assumed. The right-hand column is the closed form evaluated at the same frequency. They agree to 0.026 per cent over five lines, and the two routes share nothing but the arithmetic of the sine function — one transforms a waveform and the other evaluates an expression.

The representation matters more here than it did for the droop, and for a reason that only shows up above the band. A staircase is piecewise constant and has harmonics for ever, so sampling it at a finite number of points per clock folds everything above half that rate back down on top of the lines being measured. At 64 points a clock the third image reads 0.42 per cent high; at 256 it is 0.026 per cent; at 1024 it is 0.0016. The number of points is part of the measurement rather than a detail of it.

The images a zero-order hold leaves, at 0.111 of the sample rate. computed by solving, not by drawing. A 5.33 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.18 dB, the largest image (1fs−f, 42.7 kHz) at -18.24 dB, which is 18.06 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.024%.
Fig. 2 The same measurement with the tone at one ninth of the clock. The signal is now only 0.18 dB down and the largest image is 18.06 dB below it — the hold is behaving like a useful first-order filter, which is where its reputation comes from.

Every null is in a place nothing occupies

The sinc sin(πx)/(πx)\sin(\pi x)/(\pi x) is zero at every non-zero integer xx, so the hold’s response has a null at fsf_s, at 2fs2f_s, at 3fs3f_s and so on for ever. That is a real property and it is drawn in every figure here.

It is also completely useless, and the reason is a fact about where the images are rather than about the sinc.

The images sit at mfs±fmf_s \pm f. There is never one at mfsmf_s, because ff is never zero — a signal at direct current is not a signal. The two first-order images straddle the first null symmetrically, at fsff_s - f and fs+ff_s + f, and the distance from the null to each of them is exactly ff. So the null is a hole in the response that nothing ever falls into, and the sinc’s zeros, which look like the most useful feature of the curve, do no work whatever.

What decides the rejection is the distance from the null, and it shrinks as the signal frequency rises. A tone at a twentieth of the clock puts its nearest image nineteen twentieths of the way to the null and receives a lot of attenuation. A tone at 0.45 of the clock puts its nearest image at 0.55 — a twentieth of the way past the null on the other side — and receives almost none.

The rejection the hold gives, written as a ratio of two values of one sinc, is

sinc(πr)sinc(π(1r)),r=f/fs\frac{\mathrm{sinc}(\pi r)}{\mathrm{sinc}(\pi(1-r))}, \qquad r = f/f_s

and it can be read off directly: 25.6 dB at r=0.05r = 0.05, 10.9 dB at r=0.222r = 0.222, 5.38 dB at r=0.35r = 0.35, 1.74 dB at r=0.45r = 0.45, and 0 dB at r=0.5r = 0.5.

The images a zero-order hold leaves, at 0.444 of the sample rate. computed by solving, not by drawing. A 21.33 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 -3.03 dB, the largest image (1fs−f, 26.7 kHz) at -4.97 dB, which is 1.94 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.030%.
Fig. 3 Four ninths of the clock — 21.33 kHz at 48 kHz, about as high as anyone puts a signal. The image at fsff_s - f is now at five ninths, and the two lines come out at −3.03 dB and −4.97 dB, which is 1.94 dB apart. For a top-of-band tone the hold is not a reconstruction filter at all.

Nothing at half the clock, and the reason it is exactly nothing

At r=1/2r = 1/2 the signal is at fs/2f_s/2 and its first image is at fsfs/2f_s - f_s/2, which is the same place. The two lines coincide.

They coincide in frequency, they have the same sinc applied to them because it is the same frequency, and the rejection is therefore exactly zero decibels — not small, not a tenth of a decibel, exactly zero, and exactly zero at any sample rate and any clock. That is the sharpest statement about a zero-order hold there is and it is the one least often made: at the top of the band the hold provides no image rejection whatever.

It is worth putting beside the droop, because the two facts have the same origin and opposite reputations. The droop is 3.92 dB at half the clock, which is famous, quoted on every converter data sheet, and worth about a decibel of passband flatness in practice. The image rejection is zero at half the clock, which is rarely mentioned, and decides how many poles the analogue filter after the converter needs. One sinc, evaluated at two places, and the number everybody carries is the less important of the two.

It is also the number that decides whether a converter can be run near its own Nyquist rate at all. Six decibels a bit measures what a converter’s resolution is worth inside a band; none of that is worth anything if the band’s top octave arrives with an unfiltered image sitting on it at the same amplitude. The rejection computed here is what says how much of the theoretical band is usable, and it says: not the top of it.

The images a zero-order hold leaves, at 0.333 of the sample rate. computed by solving, not by drawing. A 16.00 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 -1.65 dB, the largest image (1fs−f, 32.0 kHz) at -7.67 dB, which is 6.02 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.028%.
Fig. 4 A third of the clock. The rejection is 6.0206 dB — a factor of two exactly, since the image lands at two thirds of the clock and the two sines are equal there while the arguments are not. Read the four stops together — 18.06, 10.88, 6.02 and 1.94 dB — and the hold’s contribution collapses as the tone rises.

The trade that looks available and is not

The obvious response to a 3.92 dB droop is to make the rectangle narrower. A converter that holds each sample for half a clock period instead of a whole one has a sinc whose argument is halved, so its droop is a quarter of the size, and there is no obvious reason not to.

There are two, and one of them is the subject of this essay.

The visible one is level. A rectangle of width αT\alpha T has area α\alpha times the full one, so everything that comes out is 20logα20\log\alpha decibels smaller: 6.02 dB at half width, 12.04 at a quarter. That is dynamic range given away, since the converter’s own noise floor does not shrink with it, and it is the reason the trade is usually dismissed in one line.

The invisible one is the image rejection, and it is much the worse of the two. Narrowing the rectangle moves the sinc’s first null from fsf_s up to fs/αf_s/\alpha and takes the whole falling part of the response with it. At a band edge of a quarter of the clock, a full-width hold droops 0.912 dB and rejects its nearest image by 9.542; a half-width hold droops 0.224 dB and rejects it by 1.887; a quarter-width hold droops 0.056 dB and rejects it by 0.452. The droop improves by a factor of sixteen and the rejection collapses by a factor of five, and the analogue filter has to find the difference.

So the trade is real, it is available, and it is a bad one at every width. It also runs the other way and cannot: a rectangle wider than a clock period would give more rejection and less droop, and cannot be built, because consecutive samples would have to be emitted at once. The hold’s response is fixed by its being exactly one clock period long, and both of its numbers follow from that single constraint rather than from any decision.

What the analogue filter is therefore being asked to do

The reconstruction filter after a converter has to pass the band and remove the images, and the two requirements are set by different frequencies whose ratio is the only thing that matters.

For a band that stops at rfsrf_s the nearest image starts at (1r)fs(1-r)f_s, so the filter has a transition from rr to 1r1-r. At r=0.45r = 0.45 that is a ratio of 1.22 — a fifth of an octave — and no reasonable number of poles gets sixty decibels across it. At r=0.25r = 0.25 it is a ratio of three, and about six poles will do. At r=0.1r = 0.1 it is a ratio of nine and two poles are enough.

The hold contributes to that budget, and the size of its contribution is the rejection computed above: 1.74 dB at r=0.45r = 0.45, 25.6 dB at r=0.05r = 0.05. So it helps most exactly where it is least needed and least where it is most needed, which is the opposite of what a designer would choose and is not a choice at all — it is what a rectangle does.

This is the same shape of trade what the filter in front costs measures on the input side, with the direction reversed. There the anti-alias filter has to be steep because the fold-back frequency is close to the band edge; here the reconstruction filter has to be steep because the first image is. Both are the same ratio (1r)/r(1-r)/r, and both are the reason the frequency a sample rate invents is a boundary with a cost rather than a definition. The band that closes with the order is the same question asked of the filter itself: how many poles a stated transition ratio needs, and what the ones past the first few actually buy.

A 3.0 kHz input sampled at 10 kHz arrives as itself. computed by solving, not by drawing. The dots are the samples. The input at 3.00 kHz is below half the 10 kHz rate, so the only sinusoid through these dots below half the rate is the one that was sampled. That is the whole of what the sampling theorem promises, and it stops promising it at 5.00 kHz.
Fig. 5 The other side of the same arithmetic. A frequency above half the sample rate and one below it produce the same samples, which is what makes an image an image: the lines above fs/2f_s/2 are not spurious products of the hold but exactly the spectrum the samples always described, revealed because the hold’s rectangle let them through.

Where the images are not an artefact

That the images are an artefact of the hold. They are an artefact of sampling and they are in the samples before anything is held. A converter that emitted impulses would have every image at full amplitude and no droop at all — which is the arrangement an exact answer to a different question measures the ideal interpolation against; the hold trades a droop in the band for a first-order roll-off above it, and that trade is the whole of what it does; the section above prices what happens when the rectangle is made narrower than the clock. What is measured here is how much of the roll-off lands where the images are.

That 256 points per clock is the right representation for every question. It is the right one for three orders of image and the tolerances checked here. A measurement reaching to the tenth image would need more, and one reaching to the hundredth would be better served by the closed form — the point of measuring at all is that the two routes disagree where the representation is wrong, which is a property the closed form cannot have on its own.

That the rejection formula holds for a signal that is not a single tone. Every line here belongs to one sinusoid. A band of signal has a band of images, each part of it attenuated at its own frequency, and the worst case is the band edge — which is the number quoted above and is why the quoted number is a bound rather than an average.

That a null is useless in every architecture. It is useless for the images of a signal. It is extremely useful when something is deliberately placed at a multiple of the clock, which is what a comb filter in a decimator does, and what the filter an average is does with mains frequency. The claim here is narrow: the images of a held signal never land on one.

Every line, twice: the staircase transformed and the sinc evaluated

Every line is computed twice. A transform of the staircase, and the closed-form sinc evaluated at that line’s own frequency. Checked to agree to two parts in a thousand over six lines, and coming out at 0.026 per cent.

The straddle is checked as a pair. The two first-order images are required to sit on opposite sides of the first null, each at a distance of at least r/2r/2 of the clock from it, so that the statement “nothing is at a null” is a measurement about two lines rather than an observation about a picture.

The rejection is checked at both ends of the band — above 25 dB at r=0.05r = 0.05 and below 0.05 dB at r=0.499r = 0.499 — because the argument is that it collapses, and one measurement in the middle cannot say so.

And the fundamental is checked to be the sinc at the signal’s own frequency, which is the link back to the essay before it and the thing that would break first if the transform were being read at the wrong bin.

One multiplication, two reputations

The zero-order hold is a single operation with two consequences, and the habit here of drawing a model together with its edge applies to it unusually neatly: the droop is the edge of the reconstruction, and the image rejection is the model.

What makes the pair worth having together is that they are the same function evaluated in two places, so they cannot be traded. A hold with less droop would be a rectangle narrower than a clock period, and a narrower rectangle has its first null further up and gives less image rejection, not more. A hold with more image rejection would be a wider rectangle, which cannot be built — the samples would overlap. The sinc’s shape is fixed by the fact that the hold is exactly one clock period long, and everything about both numbers follows from that single constraint.

Which is why the interesting question is not how to improve the hold but what to put after it, and how much of the band to give away so that the thing after it can be built. That is a ratio, (1r)/r(1-r)/r, and it is the only quantity in this essay a designer controls.

Still open: the droop corrected, the images that arrive with it, and the ratio bought back

Where the droop should be corrected, and what the correction does to the images. The droop is 3.92 dB at half the clock and nobody accepts it. It can be removed in the digital filter before the converter or in the analogue filter after it, and those are not the same operation applied in two places — the first multiplies the whole sampled spectrum, images included, and the second multiplies whatever the converter emitted, also images included, but by a shelf that cannot know where the band stopped. Measuring both against the rejection computed here would say which correction costs image rejection and how much.

The band edge as a free parameter. Every number above is a function of rr alone. A converter run at twice the rate the signal needs has r=0.25r = 0.25 and a transition ratio of three; at four times, r=0.125r = 0.125 and a ratio of seven. The droop improves at the same time, and the two improvements are not the same function of the ratio — one of them is a second power and the other is a first. Separating them would say which of the two oversampling is usually being bought for.

And whether the first image is always the largest. Every measurement here finds it at fsff_s - f. The sinc falls monotonically in magnitude only between its nulls, and the lobe maxima fall as 1/πx1/\pi x, so a tone low enough in the band should put fsff_s - f and fs+ff_s + f on opposite sides of a lobe whose peak lies between them. Whether any tone makes the second image larger than the first is a question about lobe geometry that the measurement here could answer directly.

Part 2 on reconstruction

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

Anti imaging filterImage rejectionReconstructionSample rateVerificationZero-order hold