The bandwidth a bin is not
Assumes: The bandwidth noise sees · The floor a resistor sets
The bandwidth noise sees built this field’s central quantity by integrating the squared magnitude of a solved network: the width of the brick wall that would pass the same noise power. The ratio that does not walk to one took it across thirty-two realised filters, and the filter an average is took it to the operation nobody calls a filter, finding a mean over a window to have a noise bandwidth of exactly one over twice the window.
Every one of those was a thing with components in it, or at least with a length in seconds. There is one more object in the chain and it has neither. Between the circuit and the number a reader writes down sits an instrument that transforms a record of samples, and the record was weighted before it was transformed. That weighting is a filter too — several thousand of them, one per bin — and it has a noise bandwidth, and the number an analyser divides by to reach volts per root hertz is that bandwidth and not the spacing between its bins.
A bin is a filter and it has a shape
A transform of N samples is not N measurements of N frequencies. It is N filters, and what each returns is the record seen through one of them.
The window’s transform is a when the weights are all one, which is the same function the staircase on the way out meets as a hold’s droop and the filter an average is meets as a mean — one shape, three places, and the third of them is here.
The shape of the filter is decided before the transform, by the weights. Multiply each sample by and the bin at frequency returns , which is the record convolved with the transform of and sampled at . So the bin’s response, as a function of how far a signal sits from the bin centre, is — the window’s own transform — and nothing about the arithmetic of the transform changes it.
For a noise input the quantity that matters about that response is the one this field always wants: the area under its square — the same integral the floor a resistor sets multiplies its 4kTR by. A white input of one-sided density leaves a mean square of in the bin, where is the response’s equivalent noise bandwidth, and to report the instrument must divide by . If the record is unwindowed, is one bin spacing and the division is invisible. If it is not, is larger, and the amount by which it is larger is a property of the weights alone.
That is the whole of the defect this essay is about, and it is a defect of units. An analyser reporting volts per root hertz has already committed to a bandwidth; the reading does not say which one it used, and a reader has no way to recover it from the number. A density taken off a Hann-windowed record and treated as though the record were unwindowed is high by a factor of three halves in power, which is 1.761 decibels, at every frequency, in a way no amount of averaging or longer recording will reduce.
Three halves, and where the exactness comes from
The windows in ordinary use are cosine sums,
taken over , and for that family the noise bandwidth has a closed form with no record length in it at all.
The bandwidth in bins is . Over a whole number of periods every cosine sums to nothing, so ; and every cross term in sums to nothing too while each averages a half, so . Divide:
For a Hann window, , so the numerator is and the answer is . Not 1.50 to three figures and not 1.5 for a long record — three halves, exactly, for every record length, because the cancelled before the arithmetic began.
| window | its coefficients | noise bandwidth, in bins | a density divided by one bin |
|---|---|---|---|
| none | 1 | 1.0000 | +0.000 dB |
| Hamming | 0.54, 0.46 | 1.3628 | +1.344 dB |
| Hann | 0.5, 0.5 | 1.5000 | +1.761 dB |
| Blackman | 0.42, 0.5, 0.08 | 1.7268 | +2.372 dB |
| Blackman–Harris | four terms | 2.0044 | +3.020 dB |
The four-term window is the one to notice for a practical reason: at 2.0044 bins it is passing twice the noise an unwindowed record would, so a density read through it and divided by one bin is a full three decibels high. Three decibels is the size of error people look for a mechanism for, and the mechanism here is a choice made in the instrument’s setup menu.
That the cancels is also what makes the convention matter, and the convention chosen here is the periodic one — the window ends one sample before repeating, so that runs to and the sums above are exact. The symmetric convention, which ends on a copy of the first sample, shifts every quantity in the table by a term of order . It is a small difference and it is not a small distinction: under the symmetric convention “exactly three halves” is not a true sentence, and the reason to state which one is in use is that one of the two makes the result a theorem and the other makes it an approximation with a record length in it.
The same number, out of the bins
A closed form and a sum over the same weights are two arrangements of one calculation, so agreement between them is arithmetic rather than evidence. The third route is a different domain.
Parseval’s relation for a transform says , and the centre bin is . Divide the first by the second and the bandwidth in bins appears again — as a sum over the bins of the window’s own transform, with the weights entering only through having been transformed.
Computed that way on a sixty-four-point record, every window agrees with its closed form to better than a part in . Two routes to a quantity is the discipline what a network answers sets for every number in this collection, and the reason a third one is worth having here is that the first two are not independent. The record is short on purpose: the answer does not depend on the length, a direct transform of a four-thousand-point window is a four-thousand-point double sum, and a route whose only job is to be different arithmetic does not need to be expensive arithmetic as well.
Hamming is quieter than Hann and costs less, which the usual sequence does not allow
Windows are normally introduced as a sequence, each one flatter-topped or lower-skirted than the last and each one dearer. The measurement refuses that at its second step.
Hamming’s first sidelobe is at −42.68 dB and Hann’s at −31.47 dB: eleven decibels quieter. Hamming’s noise bandwidth is 1.3628 bins and Hann’s is 1.5000: nine per cent cheaper. Hamming is better than Hann on both counts and there is nothing to trade. Two windows built from two coefficients each, differing by four hundredths in where they split their weight, and one of them dominates the other.
This is the requirement that failed on its first run. The check as first written said that the quieter a window’s sidelobes the more bandwidth it costs — an ordering, stated because it is what the received sequence of windows implies — and it was refused immediately with both numbers beside each other. What replaced it requires the non-monotonicity as the finding, which is what it is.
Where Hann collects its debt
The two windows are not ordered because a window has two skirts, a near one and a far one, and they are set by different things.
The near skirt is the first sidelobe, and it is a matter of how completely the window’s edges are tapered. The far skirt is a rate: the smoothness of the window at its ends decides how fast its transform falls, and a window whose value and whose slope reach zero at the ends falls faster than one whose value nearly does. Hann’s ends at zero; Hamming’s ends at 0.08 of its peak, a deliberate pedestal chosen to cancel the first sidelobe at the cost of leaving a discontinuity behind.
So the lobes behave differently with distance, and the difference is a factor of three in exponent:
| sidelobe | Hann | Hamming |
|---|---|---|
| 2nd bin | −31.5 dB | −44.0 dB |
| 3rd | −41.5 dB | −43.6 dB |
| 4th | −48.5 dB | −42.7 dB |
| 6th | −58.4 dB | −44.1 dB |
| 10th | −71.1 dB | −47.4 dB |
Hann’s lobes fall at about eighteen decibels an octave and Hamming’s at about six, so they cross at the fourth sidelobe and the margin grows from there: by the tenth, Hann is twenty-four decibels quieter. Which of the two is the better window is therefore a question about a distance, and the distance is set by what else is on the spectrum rather than by anything about the window.
A density being read ten bins from a strong carrier wants Hann. An amplitude being read two bins from a moderate one wants Hamming, and gets less noise bandwidth with it. Neither answer is a preference and neither is available from a ranking, which is why the two numbers are drawn together.
The measurement that makes this legible needed one care worth recording, because it is the same shape of error the rest of these essays keep meeting. A periodic window’s transform is exactly zero at every integer bin — that is what makes the bins independent, and what makes the powers in them add, which two solves that add is the general statement of — so a sweep that samples at integer bins reads three hundred decibels down, and a maximum taken over such a sweep is a maximum over whatever happened to fall between the samples. The first version of the caption reported an unwindowed record’s leakage ten bins out as −323.5 dB, which is the arithmetic’s floor rather than a leakage. Taking the peak within each unit interval gives −30.4 dB, which is the number a reader needs. The defect was absence again, and it was invisible because it looked like an excellent result.
The scallop, which is why a window is used at all
Nothing above is a reason to window a record. The reason is a different measurement entirely, and it makes the noise bandwidth an incidental cost rather than a purchase.
A tone does not land on a bin centre unless somebody arranged for it to. Halfway between two bins, an unwindowed record reports it 3.922 decibels low — the scallop loss, and it is the worst case because the response falls from its centre to its first null. Four decibels of amplitude error on a tone whose frequency was not chosen by the instrument is not a tolerable measurement, and it is entirely repaired by a window: Hann reads 1.424 dB low, Hamming 1.751, Blackman 1.099, Blackman–Harris 0.826.
| window | scallop loss at half a bin | noise bandwidth |
|---|---|---|
| none | −3.922 dB | 1.0000 bins |
| Hamming | −1.751 dB | 1.3628 |
| Hann | −1.424 dB | 1.5000 |
| Blackman | −1.099 dB | 1.7268 |
| Blackman–Harris | −0.826 dB | 2.0044 |
That column is ordered with the bandwidth, and ordered tightly: a flatter top costs area under the square, which is the same statement twice. So the honest account of a window is that it is bought for tones and paid for in noise, and the 1.761 decibels of this essay’s opening is the bill rather than the purchase.
Which sharpens what goes wrong when the bill is not read. A measurement that wants both things off one record — a tone’s amplitude and the density beside it — is asking one window to serve two purposes with opposite requirements, and the instrument reports both without saying which divisor it used for which. The two readings are then wrong in opposite directions by amounts that do not cancel, and neither number carries a mark.
The other divisor, which is not this one
A window’s weights produce two corrections, they are different numbers, and the factor between them is exactly the quantity this essay is about — which is the neatest way to see why the error is so easy to make.
A tone on a bin centre does not read at its own amplitude. Weighting the record multiplies a coherent sinusoid by the mean of the weights, , which for a cosine sum is : a half for Hann, 0.54 for Hamming, 0.42 for Blackman, 0.35875 for the four-term window. So an amplitude off a Hann-windowed transform is six decibels low and the correction is a factor of two in voltage.
A density is not corrected by that. It is corrected by , because the noise power in a bin is the sum of the squared weights times the sample variance — and while . The two divisors differ by precisely . So mistaking the amplitude normalisation for the density one is not a different error from the one at the top of this essay; it is the same error arriving through the setup menu rather than through the units, and it is the same 1.761 decibels for a Hann window.
| window | amplitude divided by | density divided by | between them |
|---|---|---|---|
| none | 0.000 dB | ||
| Hamming | 0.5400 | 0.3974 | 1.344 dB |
| Hann | 0.5000 | 0.3750 | 1.761 dB |
| Blackman | 0.4200 | 0.3046 | 2.372 dB |
| Blackman–Harris | 0.35875 | 0.2579 | 3.020 dB |
There is a third reading of the same number, and it is the one worth carrying because it inverts what a window looks like it does. Take the ratio of a tone in a bin to the noise in the same bin, before any correction at all. The tone scales as and the noise as , so the ratio scales as : windowing makes a tone stand less far out of the noise in its own bin, by — 1.761 decibels for Hann, 3.020 for the four-term window.
That is worth being blunt about, because a windowed spectrum looks cleaner and the reason is not this. The window did not lower the noise; it cost a decibel and three quarters of tone-to-noise per bin. What it bought is the skirt: a strong tone stops burying the bins beside it, so the visible floor near a carrier falls by tens of decibels while the floor far from one rises by two. The improvement is local and the cost is everywhere, which is exactly the shape of trade the two tables above price and exactly the shape a single “cleaner” impression conceals.
The filters this bandwidth is the same quantity as
Nothing in the window calculation is new apparatus. It is the integral this field has taken over solved networks since its first essay, taken over a weighting instead, and it lands in the same range of values.
A Hann window’s 1.5000 sits between a two-pole Butterworth’s 1.1107 and a one-pole’s 1.5708 — the families three families, one corner builds from their definitions; the four-term window’s 2.0044 is past both. Two means in cascade, which weight their samples as a triangle, come out at 1.0452 — nearer a brick wall than any window here and nearer than a third-order Butterworth. So the crude weighting a digital filter chain applies before it discards samples is a better noise-bandwidth bargain than any of the windows a spectrum analyser offers, and the reason is that it is not trying to do anything about scalloping.
What this does not settle
It assumes the density is flat across the window’s own bandwidth. The bandwidth is a single number standing in for an integral, and it stands in for it exactly when the density under it does not vary. Near a corner, or on a density that rises towards low frequency, the corner where averaging stops working is the measurement of what that assumption costs — and a bin near direct current on a flicker-noise density is the case where it costs the most, because the bin is widest in proportion there.
It says nothing about the analogue filter in front. A record of samples has been through one, and what that filter did to the density before the sampler saw it is not in any window’s arithmetic. The frequency a sample rate invents is the boundary, and what a sampler folds down arrives inside every bin of the transform at full amplitude.
It says nothing about how many records to average. A density read off one transform has a standard error of its own, and the usual practice is to average the squared magnitudes of several records — often overlapping ones, which are not independent, and whose effective count is a function of the window’s own overlap correlation. That is a real quantity, it is not the noise bandwidth, and it is not measured here.
And the leakage figures are a window’s, not a measurement’s. A real analyser’s bins also carry whatever its own arithmetic does — a fixed-point transform has a noise floor of its own, which the same filter, rounded twice measures in the neighbouring field, and a floor that arrives from the arithmetic is indistinguishable in a plot from one that arrived through a skirt.
Still open: the leakage a density cannot be separated from, and the record that is not one record
Where a skirt becomes a floor. The tables above give each window’s leakage lobe by lobe, and a density read beside a strong tone is the sum of the true density and the tone’s skirt at that distance. Those two are indistinguishable in one reading and separable in two: the skirt moves with the tone and the density does not. A measurement that swept the tone’s frequency across a fixed bin would say at what carrier-to-density ratio each window’s reading becomes the skirt rather than the noise, which turns the sidelobe tables here into a dynamic range.
The overlap that is not free. Averaging the squared magnitudes of several records reduces the scatter of a density as the square root of their number only if they are independent, and records that overlap are not. The correlation between two overlapping windowed records is a closed function of the window and the overlap fraction — and it is why fifty per cent overlap is the figure quoted for Hann and seventy-five for the four-term windows. Measuring the effective count on seeded noise would price the overlap in the same currency the rest of this field uses: how much recording buys how much confidence.
A window chosen for a known spectrum. Every window here is fixed before the record is seen. The coefficients are free parameters, and the near skirt, the far skirt and the noise bandwidth are three functionals of them that cannot all be minimised. A sweep over a two-term window’s single degree of freedom — the pedestal that separates Hann from Hamming — would draw the whole trade as one curve and say where on it the ordinary choices sit, rather than leaving them as two points somebody named.
What is checked
The noise bandwidth is computed three ways and they are required to agree. From the weights, as ; from the coefficients in closed form, which contains no record length; and out of the bins by Parseval, on a short record. The three agree to a part in for the first pair and for the third, and the third is the one that would notice a window defined under one convention and transformed under another.
The Hann window’s value is required to be three halves to a part in , rather than to a tolerance, because “exactly” is the claim.
The non-monotonicity is required in both directions. That Hamming’s first sidelobe is below Hann’s and its bandwidth is lower — which is the ordering failing — and that Hann overtakes it within eight sidelobes, which is the ordering failing the other way too. Either alone reads as a ranking, which is what the first version of the check required and what the measurement refused.
And the two slopes are measured over lobe peaks, not over a sweep. A periodic window’s transform is exactly zero at every integer bin, so a maximum over a grid that lands on them is a maximum over the arithmetic’s floor — which is what made the first caption report a leakage of −323 dB and read as an excellent window rather than as a missing measurement.
Part 5 on noise bandwidth
One argument about Noise bandwidth, and one of 6 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.
Brick wall filterEquivalent noise bandwidthFilter familiesIntegrationSpectral densitySpectral leakageVerificationWindow function
- The window the square-root law has equivalent noise bandwidth, spectral density, verification
- A floor, or five tones spectral density, verification
- Only the real part is warm spectral density, verification
- The amplifier inside the sample equivalent noise bandwidth, spectral density
- The cross terms that outnumber the sources spectral density, verification
- The resistor the noise comes from equivalent noise bandwidth, verification