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.
1 · Window A
2 · Compare with (B)
3 · Two-tone demo
4 · Chart
Window A at a glance
Figures of merit
| Metric | A | B |
|---|
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.
| Window | Tone 1 reads | Tone 2 reads | Tone 1 leakage at tone 2 | Noise floor / bin | Tone 2 |
|---|
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:
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
- Metrics are evaluated numerically (direct DTFT + a zero-padded FFT), so short and odd-length windows are handled exactly. Roll-off is a fitted slope, accurate to about ±1 dB/octave.
- The demo uses ideal tones and seeded Gaussian noise, not a converter model. It shows the windowing effects only. For converter noise and jitter, see the ADC/DAC SNR tool.
- Q15 export rounds to the nearest LSB and saturates the peak at 32767. Results are engineering estimates.
References
- 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.
- 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.
- A. H. Nuttall, "Some windows with very good sidelobe behavior," IEEE Trans. ASSP 29(1), pp. 84–91, 1981.
- J. F. Kaiser, R. W. Schafer, "On the use of the I0-sinh window for spectrum analysis," IEEE Trans. ASSP 28(1), 1980.
- 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.
