Many problems in signal processing, communications, and control require knowing the frequency content of a signal. The Discrete Fourier Transform (DFT) answers this question exactly, but its direct computation costs
The Fast Fourier Transform is a family of algorithms that compute the DFT in
The core insight is that the DFT matrix has a recursive block structure: half of its entries are shared between the even-indexed and odd-indexed sub-problems, so most of the work can be reused rather than recomputed.
The Discrete Fourier Transform of a length-$N$ sequence
The inverse DFT recovers the original sequence:
We define the twiddle factor
Split the sum into even-indexed and odd-indexed terms:
Because
This pair of equations is the butterfly operation: two outputs from two inputs and one twiddle-factor multiplication.
The recursive decomposition reorders input by bit-reversing the sample indices. For in-place computation the input array is pre-permuted so that butterfly stages proceed sequentially from the smallest sub-problems to the full
| Case | Time | Space | Notes |
|---|---|---|---|
| All |
|
Why
Twiddle factors are pre-computed and stored in a lookup table of size
Input:
Step 1 — Bit-reversal permutation
| Index (binary) | Reversed | Value |
|---|---|---|
| 0 (00) | 0 (00) | 1 |
| 1 (01) | 2 (10) | 3 |
| 2 (10) | 1 (01) | 2 |
| 3 (11) | 3 (11) | 4 |
Reordered:
Step 2 — Stage 1 (size-2 butterflies), twiddle
- Butterfly$(1, 3)$: outputs
$(1+3, ; 1-3) = (4, ; -2)$ - Butterfly$(2, 4)$: outputs
$(2+4, ; 2-4) = (6, ; -2)$
Result:
Step 3 — Stage 2 (size-4 butterfly), twiddles
$X[0] = 4 + 1 \cdot 6 = 10$ $X[1] = -2 + (-j)(-2) = -2 + 2j$ $X[2] = 4 - 1 \cdot 6 = -2$ $X[3] = -2 - (-j)(-2) = -2 - 2j$
Output:
Verification:
- Power-of-2 constraint. Non-power-of-2 inputs require zero-padding, which introduces interpolation artifacts in the frequency domain.
-
Fixed-point overflow. Each butterfly stage can double the magnitude. For Q15/Q31 types, scale the input by
$1/N$ before the transform or apply per-stage scaling. - Spectral leakage. A finite-length DFT implicitly applies a rectangular window. Use a window function before the transform to reduce sidelobes.
-
Aliasing. The Nyquist-Shannon theorem requires
$f_s \geq 2 f_{\max}$ . Violating this folds high frequencies onto low frequencies irreversibly. -
Frequency resolution is
$\Delta f = f_s / N$ . Increasing$N$ improves resolution at the cost of more memory and computation.
| Variant | Key Difference |
|---|---|
| Mixed-radix FFT | Supports arbitrary composite |
| Split-radix FFT | Reduces multiplications by ~33 % compared to standard radix-2 |
| Real-valued FFT | Exploits conjugate symmetry of real inputs to halve work and memory |
| Bluestein's algorithm | Handles arbitrary |
| Inverse FFT | Same structure; negate twiddle exponents and scale by |
- Spectral analysis — Identifying frequency components, harmonics, and noise floors in sensor data.
- Convolution and filtering — Multiplication in the frequency domain is equivalent to time-domain convolution; enables efficient FIR filtering.
- Power Spectral Density — Used internally by Welch's method for spectral estimation.
- Communication systems — OFDM modulation/demodulation is built directly on the FFT/IFFT pair.
- Vibration and fault diagnosis — Examining spectral peaks to detect mechanical anomalies.
- Data compression — Foundation for transforms (DCT, MDCT) used in JPEG, MP3, etc.
graph LR
FFT --> PSD["Power Spectral Density"]
FFT --> DCT["Discrete Cosine Transform"]
WIN["Window Functions"] --> FFT
FFT -.-> DK["Durand-Kerner (polynomial eval)"]
| Algorithm | Relationship |
|---|---|
| Power Spectral Density | Calls FFT internally on each windowed segment |
| Discrete Cosine Transform | Computed via FFT with input rearrangement and twiddle-factor post-processing |
| Window Functions | Applied before FFT to reduce spectral leakage |
- Cooley, J.W. and Tukey, J.W., "An algorithm for the machine calculation of complex Fourier series", Mathematics of Computation, 19(90), 1965.
- Oppenheim, A.V. and Schafer, R.W., Discrete-Time Signal Processing, 3rd ed., Pearson, 2009 — Chapters 8–9.
- Smith, S.W., The Scientist and Engineer's Guide to Digital Signal Processing, California Technical Publishing, 1997 — Chapters 8, 12.