FFT Spectrum Analyzer Back
Vibration and Signal Processing

FFT Spectrum Analyzer

Input a composite waveform and visualize its FFT spectrum in real time. Experiment with window functions, sampling rate and signal components to feel aliasing, spectral leakage and other DSP pitfalls firsthand.

Signal Components

Analysis Settings

Sampling frequency fs
Window Function

Presets

Two-tone Wave Nyquist Boundary Beating (same frequency) High Noise

DFT Definition

$X[k] = \sum_{n=0}^{N-1} x[n]\,e^{-j2\pi kn/N}$
$\Delta f = f_s / N,\quad f_\text{Nyq} = f_s / 2$
Results
1.0
Frequency Resolution Δf (Hz)
512
Nyquist Freq. (Hz)
50
Peak Frequency (Hz)
Estimated SNR (dB)

Time-domain waveform (first 256 samples)

Sig

Power Spectrum (FFT output)

Spec
Theory & Key Formulas

$$X[k] = \sum_{n=0}^{N-1} x[n] e^{-j2\pi kn/N}$$

離散フーリエ変換(DFT):時間信号 $x[n]$ を周波数成分 $X[k]$ に分解。FFTはこれを $O(N\log N)$ で計算。

$$f_k = \frac{k \cdot f_s}{N}$$

周波数分解能:サンプリング周波数 $f_s$(Hz)をデータ点数 $N$ で割った最小検出周波数間隔。

$$f_{Nyquist} = \frac{f_s}{2}$$

ナイキスト周波数(Hz):これより高い成分はエイリアシングを起こすため、$f_s/2$ 以上の周波数は測定不可。

💬 Ask the Professor

🙋
FFT seems to be used everywhere in vibration analysis, but I do not really understand what it does. What does it mean to convert time-series data into frequency?
🎓
In simple terms, it decomposes a complex vibration into the frequencies it contains and how strong each component is. For example, if you apply an FFT to engine vibration data, a peak near 50 Hz might correspond to combustion frequency, while a peak near 200 Hz might indicate gear mesh frequency.
🙋
The result changes a lot between a rectangular window and a Hann window. What is happening?
🎓
The FFT treats the finite record as if it repeats forever. A rectangular window cuts the data off abruptly, so discontinuities at the ends smear energy into nearby frequencies; this is spectral leakage. A Hann window tapers the ends smoothly toward zero, reducing that discontinuity. Window choice is a tradeoff between peak sharpness and leakage suppression.
🙋
What happens if the sampling frequency is 1024 Hz and I input a 600 Hz signal?
🎓
That is aliasing. The Nyquist frequency is fs/2 = 512 Hz, so a 600 Hz component appears as 1024 - 600 = 424 Hz. This is troublesome because it creates a peak at a frequency that is not actually present. In real measurements, an anti-aliasing low-pass filter is normally placed before the ADC to remove components above fs/2.
🙋
How is FFT used in CAE?
🎓
Experimental modal analysis is a typical structural example. You strike a structure with a hammer, measure acceleration, and use FFTs of the input and response to estimate transfer functions, natural frequencies, damping ratios, and mode shapes. Those results are then correlated with FEM eigenvalue results. FFT is also essential in noise and vibration (NVH) analysis.

Frequently Asked Questions

The Hanning window is versatile for reducing spectral leakage and offers a good balance between frequency resolution and amplitude accuracy. The rectangular window has high resolution but is prone to leakage, making it suitable for periodic signals with integer multiples of the frequency. Switch between them and compare according to your purpose.
Aliasing is a phenomenon where high-frequency components appear as low-frequency components when the sampling frequency is less than twice the highest frequency of the signal. In the tool, you can prevent it by setting the frequency of the input waveform to half the sampling frequency (Nyquist frequency) or lower.
Spectral leakage occurs because the waveform becomes discontinuous when a finite-length signal is extracted, causing frequency components that do not actually exist to appear. In the tool, select the rectangular window and input a sine wave whose frequency is not an integer multiple of the sampling period; you can observe the peak spreading.
The vertical axis represents the absolute value of the complex spectrum for each frequency bin. Due to the influence of the window function, the amplitude is attenuated, so the tool displays the raw value without correction. To compare with the actual amplitude, you need to divide by the coherent gain of the window function.

What is Fft Analyzer?

FFTFFT Spectrum Analyzer is a fundamental topic in engineering and applied physics. This interactive simulator lets you explore the key behaviors and relationships by directly manipulating parameters and observing real-time results.

By combining numerical computation with visual feedback, the simulator bridges the gap between abstract theory and physical intuition — making it an effective learning tool for students and a rapid-verification tool for practicing engineers.

Physical Model & Key Equations

The simulator is based on the governing equations behind FFT Spectrum Analyzer. Understanding these equations is key to interpreting the results correctly.

Each parameter in the equations corresponds to a slider in the control panel. Moving a slider changes the equation's solution in real time, helping you build a direct connection between mathematical expressions and physical behavior.

Real-World Applications

Engineering Design: The concepts behind FFT Spectrum Analyzer are applied across mechanical, structural, electrical, and fluid engineering disciplines. This tool provides a quick way to estimate design parameters and sensitivity before committing to full CAE analysis.

Education & Research: Widely used in engineering curricula to connect theory with numerical computation. Also serves as a first-pass validation tool in research settings.

CAE Workflow Integration: Before running finite element (FEM) or computational fluid dynamics (CFD) simulations, engineers use simplified models like this to establish physical scale, identify dominant parameters, and define realistic boundary conditions.

Common Misconceptions and Points of Caution

Model assumptions: The mathematical model used here relies on simplifying assumptions such as linearity, homogeneity, and isotropy. Always verify that your real system satisfies these assumptions before applying results directly to design decisions.

Units and scale: Many calculation errors arise from unit conversion mistakes or order-of-magnitude errors. Pay close attention to the units shown next to each parameter input.

Validating results: Always sanity-check simulator output against physical intuition or hand calculations. If a result seems unexpected, review your input parameters or verify with an independent method.

How to Use

  1. Enter primary signal frequency in f1ValNum (Hz) and amplitude in a1ValNum (0–1 scale). Example: 50 Hz at 0.8 amplitude for a 50 Hz power line signal.
  2. Add a secondary component via f2ValNum and a2ValNum to simulate interference or harmonics. Set f2 to 150 Hz and a2 to 0.3 for a third harmonic distortion scenario.
  3. Adjust sampling frequency using the Fs parameter (must exceed 2× highest signal frequency per Nyquist theorem). For 150 Hz maximum, set Fs ≥ 300 Hz.
  4. Select window function (Hann, Hamming, Blackman) to reduce spectral leakage when signal frequencies don't align with FFT bin centers.
  5. Run FFT and inspect the magnitude spectrum to identify peak frequencies, harmonics, and aliasing artifacts below Nyquist limit.

Worked Example

Vibration monitoring on a 1500 rpm motor: set f1 to 25 Hz (1500÷60) with a1=0.7, f2 to 75 Hz (third harmonic) with a2=0.4. Use Fs=500 Hz sampling rate. Hann window suppresses leakage side-lobes by ~30 dB. FFT reveals primary peak at 25 Hz (magnitude 0.7) and harmonic peak at 75 Hz (magnitude 0.4), confirming bearing wear signature. Deliberately under-sample at Fs=40 Hz to demonstrate aliasing: the 75 Hz component folds back to 35 Hz, corrupting the spectrum.

Practical Notes

  1. Always set Fs at least 2.5× your highest frequency of interest; use 3–4× for safety margin to avoid aliasing in noisy industrial environments (accelerometers, microphones).
  2. Hann window preferred for general-purpose analysis; Blackman reduces leakage further at the cost of wider main lobe, useful for closely-spaced frequency detection in audio/vibration signals.
  3. If f1 and f2 differ by <1 Hz and you cannot resolve them, increase total signal length (more FFT samples) or lower window side-lobe energy with Blackman.
  4. Phase information is lost in magnitude spectra; use Real/Imaginary view or coherence tools if you need to track phase relationships between f1 and f2.