The lengths that keep the sidelobes apart
Assumes: The bandwidth noise sees · What the filter in front costs
The mean that makes a stopband found that a cascade of means of one mains period holds, at a depth , exactly what a single mean holds at , and drew the conclusion that follows: once is shallower than a single mean’s first sidelobe, 13.26 decibels, the null at fifty hertz stops being a null and becomes a stopband. Forty decibels therefore needs four means, since three times 13.26 is 39.78 and falls short by two tenths of a decibel. Four means of twenty milliseconds hold forty decibels everywhere above 36.9 hertz, and the reading waits eighty milliseconds for them.
That essay ended on a question the identity could not answer, because the identity is about equal means. A cascade’s response is the product of its stages’ responses, and a product is largest where its factors are largest together. Equal means put every factor’s largest sidelobe at the same frequency. Means of slightly different lengths put them in different places, and put each one’s nulls under the others’ peaks. Whether three means of chosen lengths can hold forty decibels everywhere above a frequency — the thing three equal means miss by 0.22 decibels — has a definite answer, and the answer turns out to be far more generous than a fifth of a decibel.
Three means, and where their sidelobes sit
A running mean of length has the response , with nulls at every multiple of and a first sidelobe 13.26 decibels down at about . Three of them in cascade, of lengths , and , have the response
which is exact for means taken on a continuous signal and close to exact for means taken on samples, the difference being the small one between a sinc and the Dirichlet kernel a sum of whole samples has.
The three equal means behave as the earlier essay said. Their response falls from the passband through a third-order null at fifty hertz, rises to a sidelobe at 71.5 hertz where each of the three contributes its own −13.26, and peaks at −39.78 decibels — so it crosses the forty-decibel line again just above 73 hertz, and the cascade is a null rather than a stopband. Change only the third mean, to fourteen milliseconds, and its first null moves to 71.4 hertz, almost exactly under the other two’s sidelobe. The peak that decided everything is gone. What is left is a set of smaller peaks either side of it, the highest −46.78 decibels at 61.5 hertz, and forty decibels hold everywhere above 43.6 hertz. Three means, one of them shortened by six milliseconds, do what three equal ones cannot.
The third curve is the best that three means with one of them a mains period can do, found by a search over the other two lengths described below. At 20, 15.6 and 24.15 milliseconds the worst level past the main lobe is −50.02 decibels, and the stopband starts at 38.6 hertz. That is ten decibels better than the equal cascade and within three of four equal means, whose worst sidelobe is −53.05.
The samples matter here for the same reason they mattered before: the response is a claim about running sums, and a running sum is something a converter computes, not something it is told. A mean of 15.6 milliseconds at ten kilohertz is 156 samples, a whole number, and the running means of 200, 156 and 242 samples, fed a sine and read by correlation, agree with the product of sincs at the rounded lengths to within a per cent at levels fifty decibels down.
Equal is the worst choice
The striking thing about the second curve is how little it took. Holding two means at twenty milliseconds and sweeping the third shows that the equal cascade is not merely one choice among many: it is the worst.
At twenty milliseconds the curve has a peak, and a sharp one. Every other length in the sweep does better, and every length outside a band two milliseconds wide holds forty decibels. A shorter third mean is best at 14.25 milliseconds, where it reaches −47.35 decibels, and a longer one at 27.25, where it reaches −46.22. Beyond about thirteen milliseconds on the short side the third mean’s own sidelobes, now at frequencies where the other two have not yet fallen far, start to set the worst level; beyond about twenty-nine on the long side its main lobe narrows the cascade’s, and its first sidelobe lands under the passband of the other two.
The reason equal lengths are worst is the multiplication itself. A product of three factors each no larger than is no larger than , and reaches it only where all three reach together. Three equal means are exactly the case in which the three maxima are at the same frequency; any other choice of lengths separates them, and at each sidelobe frequency at least one factor is then well below its own peak. A third mean nudged by two milliseconds moves its sidelobe about eight hertz off the pair’s, and at that distance the third factor has fallen far enough below its own peak that the product clears −40; a single millisecond, four hertz, is not quite enough.
This is the same mechanism as the stagger-tuning of a set of resonators, read upside down. A designer who wants a flat passband from three tuned circuits does not tune them all to the centre, because their peaks would stack; the peaks are spread so that each fills the others’ dips. Here what stacks is not the passband but the stopband’s leaks, and spreading the lengths fills each mean’s leaks with another mean’s nulls.
The deepest stopband a few means reach
If a single changed length is worth seven decibels, the obvious next question is how far the lengths can be pushed. The search is a minimax: hold one mean at twenty milliseconds, so that fifty hertz is still nulled exactly, and choose the others to make the worst level past the main lobe as low as it can be. A grid in half-milliseconds finds the region, and two finer passes, to a tenth and then a twentieth of a millisecond, settle it.
Two chosen means reach −31.86 decibels, five better than two equal ones and still nine short of forty, so a pair cannot make a forty-decibel stopband however its lengths are picked. Three chosen means reach −50.02 decibels. Four reach −68.18, fifteen better than four equal ones — but the search, left free, spends that depth on longer means, and the cascade then settles in 105.7 milliseconds rather than eighty. A depth bought with length is not the comparison this essay is after; the question was what three means can do, and the answer is fifty decibels in the same sixty milliseconds three equal means take.
The optimum has a shape worth seeing. At 20, 15.6 and 24.15 milliseconds the cascade’s three highest peaks past the main lobe sit at 44.8, 56.5 and 72.7 hertz, at −50.02, −50.10 and −50.09 decibels: equal to a tenth of a decibel. The nulls between them are at 41.4 hertz, the 24.15 ms mean’s first; at fifty, the mains mean’s; and at 64.1, the 15.6 ms mean’s. The minimax has done what minimax approximations do — the Chebyshev filter is the familiar instance — and levelled the worst errors against each other, so that lowering any one peak by moving a length raises another. Three free lengths, of which one is fixed, give two degrees of freedom and three peaks held level, which is the count a balanced optimum of this kind has.
What the chosen lengths cost in noise and time
A stopband is worth its price only if the price is known, and the earlier essay priced the equal cascade in two currencies: a mains period of settling for each mean, and a noise bandwidth that grows faster than a single long mean’s.
The chosen three cost almost nothing against three equal means. Their lengths add to 59.8 milliseconds, against sixty, because one is a little longer and one a little shorter, and their noise bandwidth is 13.55 hertz, against 13.75 — slightly less, not more. Against four equal means they pass thirteen per cent more noise bandwidth, which is six per cent more noise in volts, and they settle twenty milliseconds sooner. The response at ten hertz, which says how much of a slowly varying signal the reading keeps, is −1.78 decibels against −2.32 for the four, so the passband is better as well.
The fourteen-millisecond set is the exception, and the reason is the one the shortening suggests: a short mean has a wide main lobe, and a wide main lobe passes more noise. It settles in 54 milliseconds, the fastest of the four, and passes 15.05 hertz, the most. It is a fair choice when latency matters more than noise; the balanced set is the better one when both matter, and for the noise it is the best of the three-mean cascades shown.
The filter an average is found a single mean’s noise bandwidth exactly one over twice its length, and the bandwidth noise sees the general rule that a response’s noise bandwidth is the area under its squared magnitude. Both are at work here. The area under the squared product is set almost entirely by the main lobe, and the main lobe’s width by the lengths’ combined spread, which is why the balanced set, whose lengths average close to twenty milliseconds, sits close to the equal one. The sidelobes, where all the rearranging happened, hold too little area to move the noise at all.
The price is paid at the mains
The equal cascade bought something the chosen lengths give up, and it is the thing the whole sequence started from. Three means of one mains period each null fifty hertz to third order. The chosen set has only one mean of one mains period, and its null at fifty hertz is first-order: as deep as any null, but as narrow as a single mean’s.
Above its stopband’s depth the chosen set holds everything, and below it only what its null holds. At sixty decibels it keeps ±2.44 per cent of fifty hertz; at eighty, ±0.24; at a hundred, ±0.02 — a band the size of a real supply’s wander only to about seventy decibels. Three equal means, with their third-order null, hold ±4.67 per cent at eighty and ±2.16 at a hundred, and four equal means ±10.29 at eighty. The fourteen-millisecond set sits between, since two of its three means are mains periods and its null is second-order.
So the two kinds of cascade are good at different things, and the figure says which. For rejection anywhere above forty hertz to forty or fifty decibels — the rejection that matters against a sixty-hertz grid, a variable-speed drive or the harmonics of a rectifier — three chosen means do in sixty milliseconds what equal means need eighty for. For rejection of the mains itself to eighty decibels or more, where the supply’s own wander is the thing to cover, the equal means’ high-order null is worth more than any stopband, and the order of the null, not the number of them is the argument that explains why.
Why the null and the stopband compete for the same lengths
The competition is not an accident of this search, and it can be stated in terms of what each length does. A mean of length contributes a null at and its multiples, and a sidelobe between each pair of nulls. To null fifty hertz to order the cascade needs means whose lengths are whole multiples of twenty milliseconds. To keep the sidelobes from stacking it needs lengths that are not equal, and a set of multiples of twenty milliseconds that are unequal is a set in which some means are forty or sixty milliseconds long, which is settling time spent on length.
Within a fixed settling budget, then, each mean has to be spent either on the order of the mains null or on separating the sidelobes. The fourteen millisecond set spends two on the null and one on the separation; the balanced set spends one and two. What actually fills a null argued that a null deeper than the components’ errors is a fiction for an analogue notch, and a digital mean has no components, so its null is exact — but a mains supply that has wandered off fifty hertz sees the null’s width, not its depth, and width is what the order buys.
How exactly the lengths have to be built
The lengths in these cascades are whole numbers of samples only by choice of clock. A converter sampling at ten kilohertz realises 20, 15.6 and 24.15 milliseconds as 200, 156 and 241.5 samples, and the last cannot be built. Rounded to 242 samples the worst sidelobe rises from −50.02 to −49.81 decibels; rounded to 241, to −49.97. A minimax optimum is a corner rather than a basin — the three level peaks are level only at one point, and moving a length lifts whichever peak it was holding down — so the last fraction of a decibel is sharp, and twenty microseconds of length is worth two tenths of a decibel.
What is not sharp is the forty-decibel stopband. The sweep of the third length shows it: the best shorter mean, 14.25 milliseconds, reaches −47.35 decibels, and a mean a quarter-millisecond either side of it gives up between half a decibel and a decibel, while everything from 13 to 18.75 milliseconds still clears forty. A designer who wants the stopband needs the lengths to a millisecond; one who wants the last three decibels of the balanced set needs them to a sample.
A converter whose clock is a few hundred parts per million off nominal moves all the lengths together, and a common scale factor on every length only stretches the frequency axis: every peak keeps its level and moves by the same few parts per million. The separation of the sidelobes depends on the lengths’ ratios, and a clock error leaves the ratios alone. What moves with the clock is the one null at the mains, and that is the same exposure a single mean of one period has always had.
What the earlier rule actually measured
The mean that makes a stopband stated its rule as a division: the depth over 13.26 decibels, rounded up, is the count of means. Read now, the rule is a statement about equal means, and specifically about the worst arrangement of them. Its 13.26 decibels is the depth one mean contributes at the one frequency where every mean contributes its worst. Means of different lengths each contribute more than 13.26 decibels at the cascade’s worst frequency, because no two of them are at their worst there, and the effective depth per mean rises from 13.26 to about 16.7 for three chosen means and seventeen for four.
The ratio that does not walk to one found a similar thing in the noise bandwidths of the realised filter families: the obvious design is rarely the stationary one, and the family that looks simplest is often the one whose figure of merit is worst. A cascade of equal means is the simplest averaging filter there is, and on stopband depth per mean it is the worst of its kind.
The window this makes
Every cascade of means is also a window: the weighting its impulse response applies to the samples it averages, which the bandwidth a bin is not met from the transform side. Two equal means weight their samples as a triangle, three as a piecewise parabola with its joins at a third and two thirds of the span. Three unequal means weight them as a piecewise parabola with more joins, one at every sum and difference of the lengths, and the extra joins are where the sidelobes were rearranged: a window’s sidelobes are the spectrum of its corners, and spreading the corners spreads the sidelobes.
The window the square-root law has found the cost of a window’s taper measured in noise, and the same accounting holds. A window’s noise bandwidth, at unit gain for a constant, is the integral of its squared weights, which is smallest when the weights are most even. The balanced set’s weighting is very slightly more even than the equal one’s over almost the same span, which is the whole of its 13.55 hertz against 13.75; the fourteen-millisecond set’s is shorter and therefore taller, and passes 15.05.
What the search leaves out
The search fixes one mean at exactly twenty milliseconds and so assumes a fifty-hertz supply. A design for both grids would fix two means, one of twenty and one of 16.7 milliseconds, and choose the third; that is a different search with one free length, and the sweep of the third length is its shape when the two fixed means are equal.
The optimum is a minimax over everything past the main lobe, which weights a sidelobe at 45 hertz the same as one at 145. An instrument whose interference is concentrated — a drive at a known frequency, a switching converter’s fundamental — would be better served by a weighted search, and might trade the flat stopband for a deep null where the interference sits.
The means are ideal and their responses multiply exactly, which is true of digital means and of nothing else. An analogue integration with a leak, which the integrator that leaks the zero away measured, fills its nulls, and a filled null cannot cancel another mean’s sidelobe; the separation this essay depends on is a separation of exact zeros under finite peaks.
The numbers to keep
Three means of twenty milliseconds miss a forty-decibel stopband by 0.22 decibels because their sidelobes coincide at 71.5 hertz. Equal lengths are the worst choice: with two means at twenty milliseconds, any third outside 19 to 21 holds forty decibels, and fourteen milliseconds holds 46.8. Lengths of 20, 15.6 and 24.15 milliseconds hold 50.0 decibels above 38.6 hertz, with their three worst sidelobes level to a tenth of a decibel, in 59.8 milliseconds and 13.55 hertz of noise bandwidth — three decibels short of four equal means, twenty milliseconds sooner. Two chosen means reach only 31.9 decibels, so three is the fewest that make forty. The price is the null’s order at the mains: ±0.24 per cent of fifty hertz at eighty decibels against ±4.67 for three equal means.
Still open: a design for both grids, the weighted stopband, and the supply that moves the lengths
Two supplies, one cascade. Holding one mean at twenty milliseconds and one at 16.7 nulls both grids exactly, and leaves one length to separate the sidelobes. Whether that third length can still hold forty decibels everywhere above both main lobes — and what it costs at the two mains frequencies, each now nulled only to first order — is a one-parameter search on the same response.
A stopband shaped to the interference. A minimax treats every frequency past the main lobe alike. An instrument beside a known interferer would weight its frequency, and the question is how many decibels of flat stopband a weighted choice gives up to put a deep null where the interference is, and whether three means can do both.
A period that tracks the supply. A cascade whose mains mean follows a measured period holds its one null wherever the supply goes. With the other two lengths chosen for the stopband rather than for the null, tracking only the one mean may be enough: whether a tracking mean and two fixed chosen ones outperform three tracking equal means against a supply that wanders by a stated amount is the comparison that would decide which an instrument should build.
Part 9 on noise bandwidth
One argument about Noise bandwidth, and one of 8 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.
AveragingDesign tradeoffEquivalent noise bandwidthSettling timeStopband attenuationTransmission zero
- The selectivity that is not free design tradeoff, settling time, stopband attenuation, transmission zero
- The amplifier inside the sample design tradeoff, equivalent noise bandwidth, settling time
- The notch that gives back the delay design tradeoff, stopband attenuation, transmission zero
- The residue that has only one sign design tradeoff, stopband attenuation, transmission zero
- The sign the null leaves behind design tradeoff, stopband attenuation, transmission zero
- The zero that spends no delay design tradeoff, stopband attenuation, transmission zero