Kyros Engineering Engineering Tools
Home › Tools › FFT Window Explorer
// DSP tools Proto v0.114 windowsHarris / Heinzel metricsC export

FFT Window Explorer

Pick a window and see every number that matters for spectrum analysis: noise bandwidth, scalloping loss, sidelobes and overlap. Compare it against a second window on a two-tone signal, then export the coefficients for firmware.

Runs entirely in your browser. Nothing is uploaded.

1 · Window A

pts

2 · Compare with (B)

3 · Two-tone demo

Hz
bins
dBFS
bins
dBFS
dBFS

4 · Chart

Window A at a glance

ENBW
—
Scalloping loss
—
Highest sidelobe
—
Coherent gain
—

Figures of merit

MetricAB

Computed from the actual coefficients at your N. Roll-off is the asymptotic sidelobe slope, measured between 64 and 256 bins on a 4096-point copy.

Window spectrum

Zero-padded transform, normalized to 0 dB at the center. The x-axis is the offset from the tone in bins.

Time-domain shape

Two-tone leakage demo

Tone 1 + tone 2 + white noise, windowed and FFT'd. Single-sided and coherent-gain corrected, so a tone exactly on a bin reads its true level. The dashed line is window A's expected mean noise floor per bin.

WindowTone 1 readsTone 2 readsTone 1 leakage at tone 2Noise floor / binTone 2

Export window A


        

// How it works

What a window costs and what it buys

An FFT assumes the record repeats forever. A tone that doesn't fit a whole number of cycles leaves a step at the record edges, and that step spreads energy across the whole spectrum. That spreading is leakage. A window tapers the edges to suppress it. In exchange, the main lobe gets wider, more noise gets into each bin, and the amplitude reading changes. These are the figures of merit:

coherent gain CG = Σw / N amplitude scale of a tone noise bandwidth ENBW = N·Σw² / (Σw)² [bins] noise collected per bin (× fs/N → Hz) scalloping loss SL = −20·log10 |W(½ bin)| / W(0) worst amplitude error between bins worst-case loss WCPL = SL + 10·log10(ENBW) tone-in-noise detection loss overlap correlation c(r) = Σ w[n]·w[n + (1−r)N] / Σw² Welch segment correlation amplitude correction ×1/CG energy correction ×√(N / Σw²)

Read them together. A window with low sidelobes (Blackman-Harris, Nuttall, Kaiser with a large β) lets you see a −90 dB spur next to a full-scale tone. It does this by collecting more noise per bin (higher ENBW), and two close tones blur together sooner. Flat-top windows read a tone's amplitude to within about 0.01 dB wherever it falls between bins. That makes them the choice for calibration. The cost is a main lobe about four bins wide. Hann is a good default. Rectangular is only right when the signal is periodic in the record or is a transient that fits inside it.

Periodic vs symmetric

For spectrum analysis, use the periodic (DFT-even) form. Its cosine argument uses N, so a Hann window's ENBW is exactly 1.5 bins at any length. The symmetric form uses N − 1. It is meant for FIR filter design, and for short records it changes the numbers: a symmetric 8-point Hann has an ENBW of 1.71 bins.

The two-tone demo

Put tone 1 off-bin (a fraction of .5 is the worst case) and tone 2 a few bins away and 60–90 dB lower. With a rectangular window, tone 2 disappears under tone 1's leakage skirt. The table reports that skirt level at tone 2's frequency directly. It also reports the expected noise floor per bin, 10·log10(4σ²·ENBW/N). This shows the other side of the trade: more ENBW raises the floor, and a longer record lowers it by 3 dB per doubling. Watch the far skirt as well as the near one. Blackman-Harris and Nuttall have the lowest sidelobes near the tone, but those sidelobes fall off at only 6 dB/octave. A hundred bins away they can sit above a Hann window's and above a −110 dBFS noise floor. If spurs far from the carrier matter, look at the roll-off row, not only the peak sidelobe.

Limits

References

  1. F. J. Harris, "On the use of windows for harmonic analysis with the discrete Fourier transform," Proc. IEEE 66(1), pp. 51–83, 1978. Table I is the source of the metric definitions and the test values. Some printed cells do not reproduce from the window formulas: exact Blackman (−51 dB printed, −68.2 dB actual), the Hamming scallop, the Blackman 3/6-dB widths, and the Gaussian rows. The tests document each one.
  2. G. Heinzel, A. Rüdiger, R. Schilling, "Spectrum and spectral density estimation by the Discrete Fourier transform (DFT), including a comprehensive list of window functions and some new flat-top windows," Max-Planck-Institut für Gravitationsphysik, 2002. Source of the HFT90D/HFT95, Nuttall and Blackman-Harris coefficients and of the PSLL, NENBW, W3dB and flatness values the tests assert to four decimals.
  3. A. H. Nuttall, "Some windows with very good sidelobe behavior," IEEE Trans. ASSP 29(1), pp. 84–91, 1981.
  4. J. F. Kaiser, R. W. Schafer, "On the use of the I0-sinh window for spectrum analysis," IEEE Trans. ASSP 28(1), 1980.
  5. Arm CMSIS-DSP window functions (github.com/ARM-software/CMSIS-DSP, Apache-2.0), which reproduce Heinzel's tables. They were used to cross-check the coefficients.

Measuring something that has to be right?

Kyros builds data-acquisition and test systems: converters, clocks, DSP and the analysis that turns a spectrum into a pass/fail number.

Talk about your project →