The floor, which bounds from below

The filter an average is

A mean taken over a window is a filter, and the area under its squared response is exactly one over twice the window — 25 hertz of noise bandwidth for twenty milliseconds, passing half its power at 22.15. Built to the same noise, a one-pole averager passes half its power at 15.92 hertz and takes 2.33 times as long to settle to one per cent, and two means in cascade pass half at 23.92 and take 1.25 times as long. Between its nulls a mean rejects the mains no better than the one-pole does, and one per cent off a null it rejects it by forty decibels however many cycles the window holds.

Assumes: The bandwidth noise sees · The floor a resistor sets · The floor a circuit has

The bandwidth noise sees defined the quantity every noise voltage in this field is built on: the width of the brick wall that passes the same noise power as a response does, measured by integrating the squared magnitude of a solved network. The ratio that does not walk to one took it across thirty-two realised filters and found it a property of a design rather than of an order.

Every one of those was something anybody would call a filter. The operation applied to more readings than any filter ever built is not usually called one. A voltmeter averages; an integrating converter integrates for a fixed time; a sampled signal is summed over N points and divided by N; a lock-in amplifier’s output is smoothed by a resistor and a capacitor. The rule quoted for all of them is that averaging NN independent readings divides the noise by N\sqrt N, and the usual arithmetic for how long to average in order to resolve a signal takes the time as one over twice a bandwidth, without saying where the two comes from.

It comes from the fact that an average is a filter, with a response, a half-power point and a noise bandwidth of its own. Drawn as one, three questions that are normally answered in three different places become one question: how much noise a reading keeps, how long the reading takes to arrive, and what it does to the mains.

A mean is a convolution with a rectangle

A running mean over a window of length T replaces each instant by the average of the last T seconds. That is a convolution with a rectangle of height 1/T and width T, and the Fourier transform of such a rectangle is

H(f)=sinπfTπfT.H(f) = \frac{\sin \pi f T}{\pi f T}.

Its square is the power that gets through, and the area under the square is the noise bandwidth. For this response the area is exact and short. By Parseval’s theorem the integral of H2|H|^2 over every frequency equals the integral of the rectangle’s square over time, which is 1/T, and half of it lies at positive frequencies. So a mean over T has a one-sided noise bandwidth of 1/(2T), with nothing approximate in it anywhere.

A mean over 20 ms is a filter, with a noise bandwidth of exactly 25 Hz. Integrated by eight-point quadrature on every lobe, with the tail past the last lobe in closed form. A mean over 20 ms has the response sin(πfT)/(πfT), and the area under its square is 25.000000 Hz against the 25 Hz of 1/(2T) — the brick wall drawn shaded. A mean over the window passes half its power at 22.147 Hz, so the noise bandwidth is 1.12880 times that frequency. Its first null is at 50 Hz, where a whole cycle fits the window and averages to nothing.
Fig. 1 A mean over 20 ms drawn as a filter. The area under its squared response is 25.000000 Hz, integrated lobe by lobe, against 1/(2T) = 25 Hz exactly, and it passes half its power at 22.147 Hz — so its noise bandwidth is 1.1288 times its half-power point. The first null sits at 50 Hz, where one whole cycle fits the window and averages to nothing.

The square-root law is the same statement written for samples. N readings taken at a rate fsf_s span T=N/fsT = N/f_s. White samples of variance σ2\sigma^2 have a one-sided density of 2σ2/fs2\sigma^2/f_s, and multiplied by a noise bandwidth of 1/(2T)1/(2T) the variance left is σ2/N\sigma^2/N. Dividing the noise by N\sqrt N and passing it through a filter of noise bandwidth fs/2Nf_s/2N are one piece of arithmetic, and the second form carries something the first does not: a shape.

The shape has a half-power point, at 0.44295/T, which for a 20 ms window is 22.15 Hz. A noise voltage computed from that frequency instead of from the noise bandwidth is 5.88 per cent low. That is less than the 20.2 per cent a single pole costs, because a rectangle’s response is flatter up to its corner than a pole’s, and it is not nothing, because past the corner it leaves a long train of lobes behind it.

The same response turns up on the output of every converter. The staircase on the way out measures a hold that keeps each sample for a whole clock period, which is a convolution with the same rectangle and therefore the same sin(x)/x, read there as a droop of 3.92 dB at half the sample rate. There the rectangle is shaping a signal and what matters about it is its passband. Here it is shaping noise, and what matters is its area.

Three averagers built to one noise

Comparing averagers by their length compares them at different noise, so everything below fixes the noise bandwidth and lets everything else move. Three averagers are worth having side by side.

A mean over a window, as above. A one-pole averager — a resistor and a capacitor, or the recursion y ← y + a(x − y) that nearly every piece of firmware smoothing is — whose response is 1/(1 + j2πfτ) and whose noise bandwidth is 1/(4τ). And two means in cascade, which weight their samples as a triangle and are the simplest thing a digital filter chain does before it discards samples.

A mean and a one-pole averager passing the same noise, with half-power points 1.392× apart. Integrated by eight-point quadrature on every lobe, with the tail past the last lobe in closed form. A mean over 20 ms has the response sin(πfT)/(πfT), and the area under its square is 25.000000 Hz against the 25 Hz of 1/(2T) — the brick wall drawn shaded. A mean over the window passes half its power at 22.147 Hz, so the noise bandwidth is 1.12880 times that frequency; A one-pole averager passes half its power at 15.915 Hz, so the noise bandwidth is 1.57080 times that frequency. Every curve drawn encloses the same area; they differ in where they spend it.
Fig. 2 A 20 ms mean beside a one-pole averager of τ = 10 ms, the time constant that gives the same 25 Hz of noise bandwidth. The two curves enclose the same area. The mean passes half its power at 22.147 Hz and the one-pole at 15.915 Hz, 1.392 times lower, because the one-pole spends more of the same area in a skirt that the mean cuts off at its first null.

A one-pole averager of time constant τ keeps exactly the noise that a mean over 2τ keeps. That is worth writing down plainly, because neither of the numbers usually quoted suggests it. Described by its time constant, the one-pole looks twice as quick as a mean of the same noise; described by its corner it looks 1.39 times slower. It is neither. Its noise bandwidth is π/2 times its half-power point, the same 1.5708 the bandwidth noise sees measured on a solved resistor and capacitor, since this is that network.

The resistor-and-capacitor form also contains a result the noise field reached by another road. A resistor’s own noise density is 4kTR. Averaged by a capacitor through that same resistor, the noise bandwidth is 1/(4RC). The product is kT/C, with the resistance gone, which is the total that has no resistor in it arrived at as the noise bandwidth of an averager multiplied by a density.

Three averagers passing the same noise, and three different half-power points. Integrated by eight-point quadrature on every lobe, with the tail past the last lobe in closed form. A mean over 20 ms has the response sin(πfT)/(πfT), and the area under its square is 25.000000 Hz against the 25 Hz of 1/(2T) — the brick wall drawn shaded. A mean over the window passes half its power at 22.147 Hz, so the noise bandwidth is 1.12880 times that frequency; A one-pole averager passes half its power at 15.915 Hz, so the noise bandwidth is 1.57080 times that frequency; Two means in cascade pass half their power at 23.919 Hz, so the noise bandwidth is 1.04521 times that frequency. Every curve drawn encloses the same area; they differ in where they spend it.
Fig. 3 All three at the same noise. Two means of 13.33 ms in cascade pass half their power at 23.919 Hz, so their noise bandwidth is 1.0452 times that frequency — nearer a brick wall than the mean’s 1.1288 and the one-pole’s 1.5708, and between a third-order Butterworth’s 1.0472 and a fourth-order’s 1.0262.

The triangle is the surprise of the three. It is two of the crudest filters there are, one after the other, and its ratio of 1.0452 sits between the third- and fourth-order Butterworth entries of the ratio that does not walk to one — closer to a brick wall than a two-pole Butterworth’s 1.1107, from a weighting of samples that needs no multiplier. To hold the noise bandwidth at 25 Hz its two means are 13.33 ms each, so the whole triangle spans 26.67 ms: a third longer than the single mean, for identical noise.

Nine tenths inside the first null, and a tail that falls as one over f

Equal areas can be spent differently, and the difference that matters for anything sampled is how far up the spectrum the area reaches.

Where an average's noise lies: 90.28% inside the first null, and a tail that falls only as 1/f. The share of each averager's noise power that lies above the frequency on the axis, all three built at 25 Hz of noise bandwidth and integrated lobe by lobe. A mean over 20 ms carries 90.282% of its noise inside its first null at 50 Hz, and 1.01% still lies above ten nulls; the remainder beyond k nulls is 1/(π²k). A one-pole averager of the same noise bandwidth has 2.03% above the same frequency and, far out, exactly 2.000 times the mean's share, because its asymptote is twice the mean's envelope in power. Two means in cascade, whose response falls as the fourth power, leave 11.9 ppm.
Fig. 4 The share of each averager’s noise still to come above each frequency, all three at 25 Hz of noise bandwidth. The mean carries 90.28 per cent of its noise inside its first null at 50 Hz, and 1.01 per cent still lies above ten nulls. The one-pole has 2.03 per cent above the same 500 Hz and, far out, exactly twice the mean’s share; two means in cascade leave 11.9 parts per million.

The mean’s main lobe carries 90.28 per cent of its noise power, and the rest arrives slowly. What lies beyond kk nulls is 1/(π2k)1/(\pi^2 k) of the total — 1.01 per cent beyond ten, a tenth of a per cent beyond a hundred — because the lobes shrink only as 1/f1/f in amplitude, so their power falls as 1/f21/f^2 and what is left above a frequency falls as 1/f.

The one-pole’s tail falls at the same rate and is exactly twice as heavy, and the reason is short. Its asymptote is 1/(2πfτ), which at τ = T/2 is 1/(πfT), the mean’s own envelope. The envelope bounds every lobe from above, and a lobe’s power averages half of its peak.

The triangle’s response is the mean’s squared, so its lobes fall as 1/f21/f^2 and its tail as 1/f31/f^3. At 500 Hz it has 11.9 parts per million of its noise still to come, where the mean has ten thousand.

Two consequences follow. The practical one is that a sampled mean behaves as this analogue picture only for noise that was band-limited before it was sampled: roughly a tenth of a mean’s noise power sits in lobes that a sampler folds back in rather than removes. The measuring one is that this response cannot be integrated on the grid every other noise bandwidth in this field uses. A logarithmic grid four decades wide has steps wider than a lobe well before its top, and there it lands on nulls and peaks at random. The integral here is taken lobe by lobe, eight quadrature nodes on each, and the tail past the four-hundredth lobe is added in closed form — one part in four thousand of the answer, which a sweep simply stopped there would have dropped without any sign that it had.

What the half-power point says about arriving

A reading that is averaged has to wait for the average to catch up after anything changes, and none of the three half-power frequencies says how long.

Three averagers passing the same noise, and the one-pole taking 2.33× as long to settle. The part of a unit step each averager has still to deliver, on a logarithmic scale, all three built at 25 Hz of noise bandwidth. The mean over 20 ms is a straight ramp and has nothing left at 20 ms; it is within 0.01 of the step at 19.8 ms. Two means in cascade are within it at 24.78 ms, 1.2516 times as long. The one-pole averager, whose time constant is 10 ms, is within it at 46.05 ms, 2.3258 times as long — a ratio of ln(1/ε)/(2(1 − ε)), so it grows without limit as the tolerance tightens while the other two do not. Each time is found by bisection on the step response and agrees with its closed form.
Fig. 5 The part of a unit step each averager has still to deliver, on a logarithmic scale, at 25 Hz of noise bandwidth each. The mean is within one per cent at 19.8 ms and has nothing left at 20. Two means in cascade are within one per cent at 24.78 ms, 1.2516 times as long; the one-pole, time constant 10 ms, at 46.05 ms, 2.3258 times as long.

The mean is a ramp. It finishes in exactly one window, because a rectangle has finite length and forgets everything older than T completely, and it is within ε of the step at (1 − ε)T. The triangle is two ramps smoothed into an S, and it finishes in its full 26.67 ms. The one-pole never finishes. It is within ε at τ ln(1/ε), so against a mean of the same noise it takes ln(1/ε)/(2(1 − ε)) times as long: 1.28 at ten per cent, 2.33 at one, 3.46 at a tenth of a per cent and 6.91 at a part per million. The triangle’s ratio climbs from 1.15 to a limit of exactly four thirds and stays there.

So the ordering the half-power points gave — the one-pole’s corner lowest, the triangle’s nearest a brick wall — says nothing about arriving. Asked for a part per million, the one-pole averager of a 25 Hz noise bandwidth needs 138 ms and the mean needs 20. A designer who chose the one-pole because a 10 ms time constant sounded short has chosen a reading nearly seven times slower for no noise advantage whatever.

It is the complaint the corner that says nothing about an edge makes about an AC-coupled input and the instrument’s own rise time makes about a front end: a frequency is a statement about steady sinusoids, and a step is not one. Here the three averagers share every noise property a spectrum can report, and they differ by a factor of seven in the one property a person waiting for the reading actually sees.

A null, which is not a slope

The third thing an average is asked to do is reject interference, and the interference an instrument meets first is the mains.

A 20 ms mean rejects 50 Hz completely and 60 Hz by 16.1 dB. The response of a mean over 20 ms against frequency, beside a one-pole averager built at the same 25 Hz of noise bandwidth and the envelope 1/(πfT) the mean's lobes are bounded by. The mean has a null wherever a whole number of cycles fits the window. At 50 Hz it is a null, at 49.5 Hz −39.91 dB, at 50.5 Hz −40.09 dB and at 60 Hz −16.14 dB. The one-pole averager passes −10.36 dB at 50 Hz and −11.82 dB at 60, and the mean's envelope at 50 Hz is −9.94 dB: away from its nulls a mean rejects what a one-pole averager of the same noise does.
Fig. 6 A 20 ms mean against frequency, beside a one-pole averager of the same noise and the envelope 1/(πfT) that bounds the mean’s lobes. At 50 Hz the mean has a null; at 49.5 Hz it passes −39.91 dB and at 50.5 Hz −40.09 dB; at 60 Hz, 1.2 cycles, −16.14 dB. The one-pole passes −10.36 dB at 50 Hz and −11.82 dB at 60, and the mean’s envelope at 50 Hz is −9.94 dB.

Wherever a whole number of cycles fits the window a mean returns exactly nothing, so a 20 ms mean has a null at 50 Hz and at every harmonic of it. That is why an integrating converter integrates for a whole number of mains cycles. The capacitor that remembers is about the capacitor such a converter integrates on; the fixed integration time is this rectangle.

The rest of the figure is less flattering than the null. Between its nulls the mean is no better than the one-pole averager that keeps the same noise: its envelope at 50 Hz is −9.94 dB against the one-pole’s −10.36 dB, and the two converge as the frequency rises, because τ = T/2 makes the one-pole’s asymptote identical to the mean’s envelope. Everything a mean rejects beyond what a one-pole of the same noise rejects is in its nulls. A mean built for 50 Hz and plugged into a 60 Hz supply passes −16.14 dB of it, six decibels better than the one-pole and nothing like a null.

And the null is narrow in a particular way. One per cent away from 50 Hz the mean passes −39.9 dB, and that number is set by the one per cent rather than by the window.

A 100 ms mean rejects 50 Hz and 60 Hz completely, and each only to 40 dB one per cent away. The response of a mean over 100 ms against frequency, beside a one-pole averager built at the same 5 Hz of noise bandwidth and the envelope 1/(πfT) the mean's lobes are bounded by. The mean has a null wherever a whole number of cycles fits the window. At 50 Hz it is a null, at 49.5 Hz −39.95 dB, at 50.5 Hz −40.12 dB and at 60 Hz a null. The one-pole averager passes −23.94 dB at 50 Hz and −25.52 dB at 60, and the mean's envelope at 50 Hz is −23.92 dB: away from its nulls a mean rejects what a one-pole averager of the same noise does.
Fig. 7 A 100 ms mean, five cycles of 50 Hz and six of 60, so both supplies fall on nulls, at a noise bandwidth of 5 Hz. One per cent from 50 Hz the mean still passes −39.95 and −40.12 dB — the same forty decibels as the 20 ms window. The one-pole of equal noise passes −23.94 dB at 50 Hz, and the mean’s envelope there is −23.92 dB.

A window of five cycles of 50 Hz is also six cycles of 60, which is why a 100 ms integration time rejects both supplies. It narrows the noise bandwidth fivefold and lowers the envelope by 14 dB. It does nothing for a supply one per cent off frequency, which still arrives at −40 dB, because near the null at k cycles the response is sin(πkδ)/(πk(1 ± δ)) and the k cancels: the rejection is δ/(1 ± δ) until the window is long enough for the envelope 1/(πk) to fall to δ, which for one per cent is about 32 cycles. Short of that, a longer window buys noise bandwidth and nothing against a wandering mains. A supply half a per cent off its nominal frequency turns an advertised infinite rejection into 46 dB.

The same noise bandwidth read off samples

Every number so far came from integrating a response. The noise bandwidth has a second meaning that uses no response at all — the variance left when a white sequence is averaged — and it is worth measuring that way as well, so that the quadrature is not the only route to the quantity everything else was built on.

The same noise bandwidth read off seeded averages: all three within 1.6 standard errors. White samples of unit variance at 30 kHz, passed through each of three averagers built at 25 Hz of noise bandwidth, 1000 readings on each of 6 seeds, and the variance of the readings. A density of 2/fs through a noise bandwidth B leaves 2B/fs = 1.6667 × 10⁻³. A mean over the window, over 600 samples, reads 1.6642 × 10⁻³ against an exact discrete 1.6667 × 10⁻³, a ratio of 0.9985, with single seeds between 0.928 and 1.081. Two means in cascade, over 799 samples, reads 1.6407 × 10⁻³ against an exact discrete 1.6667 × 10⁻³, a ratio of 0.9844, with single seeds between 0.925 and 1.017. A one-pole averager, over 2400 samples, reads 1.6175 × 10⁻³ against an exact discrete 1.6667 × 10⁻³, a ratio of 0.9705, with single seeds between 0.925 and 1.010. The coloured bar is one standard error of the pooled variance, 1.83 per cent, and the faint bar the range across seeds.
Fig. 8 White samples at 30 kHz passed through each of the three averagers at 25 Hz of noise bandwidth, 1,000 readings on each of six seeds. Pooled, the variances are 0.9985, 0.9844 and 0.9705 times their exact discrete values, all within 1.6 standard errors of 1.83 per cent, with single seeds scattered from 0.925 to 1.081.

Unit-variance samples at 30 kHz have a density of 2/fs2/f_s, so any averager of noise bandwidth B should leave a variance of 2B/fs2B/f_s, which at 25 Hz is 1.6667 × 10⁻³. Each averager is compared with its own exact discrete variance, because the sampled averagers are not quite the continuous ones: 1/N1/N for a mean of 600 samples; the sum of the squared weights, (2M2+1)/(3M3)(2M^2 + 1)/(3M^3), for two means of 400 in cascade, three parts per million above the continuous value; and a/(2a)a/(2 - a) for the recursion, one part per million below it. At this sample rate the discrete averagers and their continuous originals agree far more closely than any number of readings could resolve, so the variance is a direct measurement of the noise bandwidth.

Pooled over six seeds, the mean reads 0.9985 of its exact variance, two means in cascade 0.9844 and the one-pole 0.9705. The standard error of a variance estimated from six thousand readings is 1.83 per cent, so the one-pole is the furthest out, at 1.6 of them, and all three agree with the noise bandwidth the quadrature gave. Single seeds scatter from 0.925 to 1.081, which is the width a thousand readings has: a variance taken from one run of that length carries a standard error of 4.5 per cent, whichever averager produced it.

That scatter is the square-root law turned on itself. A variance is an average of squares, and it improves as 2/n\sqrt{2/n} in the number of readings nn exactly as each reading improved as N\sqrt N in the number of samples. To know a noise bandwidth to one per cent from samples takes twenty thousand readings, each 20 ms long — nearly seven minutes of recording — against a fraction of a second of quadrature. The route by samples is the one that shares no arithmetic with the other, and it is the expensive one: it is there to be different rather than to be precise.

How the numbers were obtained

The noise bandwidths are integrals of squared responses, taken by eight-point Gauss–Legendre quadrature on each lobe of the rectangle and the triangle, so that no panel straddles a null, and on geometric panels for the one-pole, with each tail beyond the last panel added from its asymptote. Each half-power frequency is found by bisection on the response, and each settling time by bisection on the step response, and every one of them is held against a closed form — 1/(2T), 0.44295/T, π/2, (1 − ε)T and τ ln(1/ε) — which serve as the comparison rather than as the numbers quoted. The variances come from seeded white sequences, a different arithmetic that shares nothing with the quadrature except the definition of each averager.

What it does not say

It does not say a mean is the best averager. It is best at one thing — it arrives in a finite time with the least noise any window of that length can have — and it pays for that in lobes. The triangle trades a third more length for a tail nearly a thousand times lighter at ten nulls, and a design whose noise extends far above the reading’s bandwidth, or whose sampler folds it back, may want that trade.

It does not treat noise that is not white. A mean’s response is flat all the way down to direct current, so it passes whatever a density does at the lowest frequencies it reaches, and the corner where averaging stops working is what that costs when the density is flicker noise with no floor: a longer window narrows the bandwidth and the density under it rises to meet it. The noise bandwidth is a useful number for exactly as long as the density is flat across it.

And it takes the averagers as ideal. A real integrating converter’s aperture is not quite a rectangle, and a real one-pole’s capacitor has its own absorption. What a meter multiplies by is about an instrument whose averaging sits behind a rectifier, where what is averaged is already nonlinear, and none of that is modelled here.

Still open: the windows a spectrum is read through, and the noise a sampler folds in

A window that is not a rectangle. A spectrum analyser that reads a noise density off a transform divides by a bandwidth, and the right bandwidth is the noise bandwidth of whatever window weighted the record: one bin for a rectangle, exactly 1.5 bins for a Hann window, and more for windows with lower sidelobes. A density read through a Hann window and divided by one bin is 1.76 dB high in power. The same lobe-by-lobe quadrature would measure each window’s value and its tail, and the tail decides how much of a strong tone leaks into the density beside it.

The noise a sampled mean folds. A tenth of a mean’s noise lies above its first null, and a mean of samples reaches that part only through the sampler. When the density runs past half the sample rate, the folded noise lands inside the reading’s bandwidth, and the noise bandwidth of the whole chain is set by the analogue filter in front rather than by the mean. Measured on a seeded density that extends past half the sample rate, it would say how much filtering a sampled average needs before the N\sqrt N law quoted for it is true.

A null chosen on purpose. The mains figures show a null forty decibels deep one per cent off frequency, whatever the window. A mean whose length follows the measured mains period, or two means of slightly different lengths in cascade, widens that null at a known cost in noise bandwidth, and pricing the two against each other would turn the forty decibels into a design parameter.

Part 4 on noise bandwidth

One argument about Noise bandwidth, and one of 3 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.

AveragingBrick wall filterEquivalent noise bandwidthIntegrationMonte carloSeeded generatorSettling timeSpectral density