Technical Note · Signal Processing Fundamentals
FFT Fundamentals: Resolution, Windowing and Leakage
What the FFT assumes about your data, why a pure sine can smear across the whole spectrum, and how to pick the right window for sine, random and transient measurements.
Key takeaways
- The FFT analyzes a finite block of data and assumes that block repeats forever. When it doesn't fit neatly, energy spills into neighboring lines. That spill is leakage.
- Frequency resolution is set by time: Δf = 1/T. Finer resolution always means longer blocks and slower updates.
- A window tapers the block edges to reduce leakage. It trades frequency sharpness for cleaner spectra; no window is best for everything.
- Rule of thumb: Hanning for random vibration and general analysis, flat top for accurate sine amplitudes and calibration, rectangular (no taper) for transients that fit entirely inside the block.
- Windows change the measured level. Correct amplitudes with the window's coherent gain and PSDs with its noise bandwidth, or results can be off by 1.8 dB or more.
What the FFT actually does
A vibration controller samples each accelerometer thousands of times per second. To see the frequency content, it takes a block of N samples and applies a Fast Fourier Transform (FFT), which converts the block into a set of equally spaced frequency lines (also called bins). Every spectrum a controller displays, including PSDs, transfer functions, coherence and sine amplitudes, starts here.
Two numbers define the analysis: the sample rate fs and the block size N. Together they set everything else.
By convention, analyzers sample at 2.56 times the highest frequency of interest and display N/2.56 lines. The extra margin above the displayed band leaves room for the anti-alias filter to roll off, as discussed at the end of this note.
| Block size N | Lines displayed | Line spacing Δf | Block duration T | Typical use |
|---|---|---|---|---|
| 1024 | 400 | 5 Hz | 0.2 s | Fast control updates, broadband random |
| 2048 | 800 | 2.5 Hz | 0.4 s | General-purpose random control |
| 4096 | 1600 | 1.25 Hz | 0.8 s | Profiles with narrow features, lightly damped resonances |
| 8192 | 3200 | 0.625 Hz | 1.6 s | Detailed analysis, closely spaced modes |
Every doubling of resolution doubles the time needed for each spectrum and halves the number of averages in a given test time. In closed-loop control, that means slower correction; in analysis, more statistical scatter. Our notes on Statistical Degrees of Freedom and Overlap Processing cover how to recover some of that time.
Leakage: when the block doesn't fit
The FFT treats the block as one period of a signal that repeats endlessly. If the block happens to contain a whole number of cycles of a sine, the repeated copies join seamlessly. If it doesn't, each copy ends at a different point in the cycle than the next one begins, creating a jump at every block boundary.
A sharp step contains energy at every frequency, so the FFT reports the sine's energy spread across many lines. Figure 2 shows the result for two sines analyzed with 4 Hz lines: one exactly on a line, one halfway between two.
In real tests, signal frequencies almost never land exactly on a line. A sine sweep passes continuously between lines, random vibration contains every frequency, and a resonance sits wherever the structure puts it. So leakage is the normal case, and it causes two separate problems:
- Amplitude error. A tone between lines reads low, by up to 3.9 dB without a window. This is called the picket-fence or scalloping effect.
- Masking. Leaked energy from a strong component raises the floor around it and can hide weaker components nearby, such as a small resonance next to a large forcing frequency.
Windows: tapering the edges
The fix is to make the block's ends match by forcing them both to zero. A window is a weighting curve, multiplied sample by sample into the block, that is near zero at the edges and largest in the middle. With the edges at zero, the repeated copies always join smoothly, whatever frequencies are present.
Tapering has a price. Each window turns a pure tone into a characteristic shape in the spectrum: a main lobe centered on the tone and a series of side lobes around it. A narrow main lobe separates close frequencies well; low side lobes keep a strong tone from masking weaker ones far away. No window does both perfectly.
| Window | Highest side lobe | Main lobe width (−3 dB) | Worst-case amplitude error | Noise bandwidth (ENBW) | Coherent gain |
|---|---|---|---|---|---|
| Rectangular | −13.3 dB | 0.89 lines | −3.92 dB (−36%) | 1.00 lines | 1.00 |
| Hanning | −31.5 dB | 1.44 lines | −1.42 dB (−15%) | 1.50 lines | 0.50 |
| Hamming | −42.7 dB | 1.30 lines | −1.75 dB (−18%) | 1.36 lines | 0.54 |
| Flat top | −93.0 dB | 3.72 lines | −0.01 dB (−0.1%) | 3.77 lines | 0.22 |
Hamming's first side lobe is lower than Hanning's, but Hanning's side lobes fall away much faster (18 dB per octave versus 6), so far from a strong tone Hanning is far cleaner. That, plus its zero endpoints, is why Hanning is the default for random vibration and most general analysis.
Seeing a small signal next to a large one
Figure 6 shows why side lobes matter in practice: a 1 g tone with a second tone 50 dB smaller, 45 Hz away. This is the situation of a small structural response next to a dominant drive frequency, or a bearing tone next to shaft rotation.
Correcting levels: amplitude versus energy
Because a window reduces the data near the block edges, it also reduces the measured level, and the correction depends on what you are measuring:
- Discrete tones (sine amplitudes, orders): divide by the coherent gain, the window's average value. For Hanning that is a factor of 2.
- Broadband signals (random PSD, noise): divide by the equivalent noise bandwidth (ENBW), the width of an ideal rectangular filter passing the same noise power. A Hanning window with 1 Hz lines actually collects noise from 1.5 Hz.
| Measurement | Correct correction | Error if the other correction is used |
|---|---|---|
| Sine amplitude | Coherent gain (×2) | Reads 1.76 dB (18%) low |
| Random PSD (g²/Hz) | ENBW (÷ 1.5 Δf) | Reads 1.76 dB (50% in g²/Hz) high |
Controllers and analyzers apply these corrections automatically, but data exported to other tools, or spectra computed by hand in a spreadsheet or script, often get it wrong. It is a common source of "the controller and my analysis disagree by about 2 dB." The PSD and Grms note explains why PSDs are normalized per hertz in the first place.
Which window, when
| Measurement | Recommended window | Why |
|---|---|---|
| Random vibration control and PSD analysis | Hanning | Good leakage suppression with modest bandwidth; zero endpoints suit overlap processing. |
| Sine amplitude, calibration, accelerometer sensitivity checks | Flat top | Amplitude accurate to about 0.01 dB regardless of where the tone falls; resolution is less important. |
| Closely spaced tones or modes | Hanning (or finer resolution) | Narrower main lobe than flat top; more lines helps more than any window. |
| Impact (hammer) testing, shocks, transients shorter than the block | Rectangular, or force/exponential windows | The event starts and ends inside the block, so there is no edge discontinuity. A tapering window would weight the event incorrectly. |
| Periodic signals synchronized to the block (e.g. periodic random, order tracking with resampling) | Rectangular | Whole cycles fit exactly, so leakage does not occur and no resolution is lost. |
Aliasing: the error windows can't fix
Leakage comes from cutting the signal into blocks. Aliasing comes from sampling it too slowly. A sampled signal can only represent frequencies up to half the sample rate (the Nyquist frequency). Anything above that does not disappear; it folds back and masquerades as a lower frequency.
The only protection is to remove content above Nyquist before sampling, with an analog or oversampled digital anti-alias filter. The 2.56 ratio described earlier exists for this reason: it leaves the band between 2000 Hz and the 2560 Hz Nyquist frequency for the filter to roll off. In vibration testing, shaker armature resonances, fixture rattles and accelerometer mounting resonances commonly produce energy well above the test band, so anti-alias protection matters even when the profile stops at 2 kHz.
Common misconceptions
| Misconception | Reality |
|---|---|
| "Zero padding increases resolution." | Padding a block with zeros interpolates more points between the existing lines, which makes plots smoother. It does not separate two tones closer than 1/T; only a longer record does that. |
| "Rectangular means no window." | Cutting out a block is a rectangular window. Every FFT uses a window; the only choice is which one. |
| "A window eliminates leakage." | It reduces leakage far from the tone at the cost of a wider main lobe. Energy still spreads over a few lines near the tone. |
| "The flat top window is the most accurate, so use it everywhere." | It is the most accurate for tone amplitude. Its wide main lobe blurs closely spaced components, and its large noise bandwidth makes it a poor choice for PSDs. |
| "If the profile stops at 2 kHz, I don't need to worry about higher frequencies." | Content above Nyquist aliases into the test band unless it is filtered before sampling. |
Quick reference
| Quantity | Formula | Rule of thumb |
|---|---|---|
| Line spacing | Δf = fs/N = 1/T | 1 Hz resolution needs 1 second of data |
| Nyquist frequency | fs/2 | Highest frequency the samples can represent |
| Analysis band | fmax = fs/2.56 | Leaves room for the anti-alias filter |
| Lines displayed | N/2.56 | 1024 samples → 400 lines |
| Aliased frequency | |f − k·fs| for the nearest integer k | 3500 Hz at 5120 samples/s → 1620 Hz |
| Tone amplitude correction | ÷ coherent gain | Hanning ×2, flat top ×4.64 |
| PSD bandwidth | ENBW × Δf | Hanning 1.5Δf, flat top 3.77Δf |
How Panther helps
- Correct defaults: Panther applies the appropriate window and level correction for each application, Hanning with energy correction for random PSD control and amplitude-correct processing for sine, so displayed levels are right without manual adjustment.
- Resolution where it is needed: selectable line counts and sample rates up to 262,144 samples/s, with overlap processing to keep control responsive at fine resolution.
- Clean front end: 24-bit acquisition with more than 110 dB of dynamic range and built-in anti-alias filtering keeps out-of-band energy from aliasing into the test band.
- Analysis flexibility: Panther Analyzer lets you choose the window, resolution and averaging for post-test FFT and transfer-function work, including rectangular and force/exponential windows for impact testing.
References and further reading
- F. J. Harris, "On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform," Proceedings of the IEEE 66(1), 1978.
- G. Heinzel, A. Rüdiger and R. Schilling, Spectrum and Spectral Density Estimation by the Discrete Fourier Transform (DFT), Max Planck Institute for Gravitational Physics, 2002.
- J. S. Bendat and A. G. Piersol, Random Data: Analysis and Measurement Procedures, 4th ed., Wiley.
- R. B. Randall, Frequency Analysis, 3rd ed., Brüel & Kjær.
- Spectral Dynamics Technical Library: Power Spectral Density (PSD) and Grms; Dynamic Range Considerations in Vibration Testing; Overlap Processing.