Tools · Signal analysis
FFT spectrum analyser
Drop in a time signal from your data logger and get a properly windowed, averaged spectrum. Everything runs in your browser; your data is never uploaded.
| # | Frequency (Hz) | CPM | Amplitude | × 1st peak |
|---|
How to use it
- File format: plain text or CSV, one sample per row. Columns can be separated by commas, semicolons, tabs or spaces, and header lines are skipped automatically. If one column is time in seconds, select it as the time column and the sample rate is worked out for you.
- Block size sets the resolution: Δf = sample rate ÷ block size. A longer record allows more averages, which smooths out random noise.
- Averaging: blocks overlap by 50% and are RMS-averaged (power averaging), which is how most data collectors do it.
- Window: Hann for general use; flat top when you need accurate amplitudes of discrete peaks; rectangular only for transients that fit inside the block.
What's under the hood
Xk = Σ xn·wn·e−2πikn/N Ak = 2|Xk| / Σwn (peak, amplitude-corrected)
The amplitude is corrected for the window's coherent gain, so a sine that lands exactly on a bin reads its true amplitude. Between bins, Hann can under-read by up to about 15%, flat top by under 0.1%. That's why flat top is the choice for amplitude accuracy. The overall RMS is calculated from the time signal itself (mean removed), so you can compare it with your instrument's overall reading.
Related: the FFT setup planner works out sample rate, lines and acquisition time before you measure, and the explainer What the FFT actually shows shows what a spectrum is in 3D.
Method & sources
What it calculates
- Welch's method: the record is split into blocks with 50% overlap, each block is mean-removed, windowed and transformed with a radix-2 FFT, and the power spectra are averaged (RMS averaging).
- Windows: Hann; five-term flat top (MATLAB flattopwin coefficients); rectangular.
- Amplitude correction by the window's coherent gain (Σw), single-sided spectrum, so a sine on a bin reads its true peak. RMS = peak/√2 per line.
- Peak frequencies refined by parabolic interpolation on log magnitude between neighbouring bins.
- Overall RMS, peak and crest factor are computed from the time signal itself. With a time column, the sample rate is 1/median(Δt).
Assumptions & limits
- Amplitude scaling is correct for discrete tones. For broadband (random) signals use a PSD with energy (ENBW) correction instead.
- Hann can under-read a tone between bins by up to about 15% (scalloping loss); flat top is within about 0.1%.
- No anti-alias filtering: the data must already be sampled correctly.
Verified: A test file with 3.0 and 1.0 peak sines at 100 and 250 Hz (5 kHz sampling) reads 2.121 and 0.7073 RMS with flat top, and overall RMS 2.236 (exact: 2.236).
Sources
- Welch, P. D. (1967). The use of fast Fourier transform for the estimation of power spectra: a method based on time averaging over short, modified periodograms. IEEE Transactions on Audio and Electroacoustics 15(2), 70-73 ↗
- Harris, F. J. (1978). On the use of windows for harmonic analysis with the discrete Fourier transform. Proceedings of the IEEE 66(1), 51-83 ↗
- Gade, S. and Herlufsen, H. (1987). Use of weighting functions in DFT/FFT analysis, parts I and II. Brüel & Kjær Technical Review 3 and 4 ↗
- MathWorks. flattopwin: flat top weighted window (documentation) ↗
- Randall, R. B. (2011). Vibration-based condition monitoring: industrial, aerospace and automotive applications. Wiley