Jump back to chapter selection.


Table of Contents

10.1 From DTFT to DFT
10.2 DFT Properties
10.3 Circular and Linear Convolution
10.4 Spectral Leakage and Windowing
10.5 Fast Fourier Transform
10.6 Short-Time Fourier Analysis


10 Discrete Fourier Transform and FFT

The DTFT is the natural Fourier representation for infinite-length discrete-time signals, but it is still a continuous function of frequency. Computers need finite lists of numbers. The discrete Fourier transform (DFT) turns a finite sequence into a finite list of frequency samples, and the fast Fourier transform (FFT) computes that list efficiently.

This chapter is therefore the bridge from transform theory to numerical signal processing.


10.1 From DTFT to DFT

For a length-N sequence x[n], defined for 0nN1, the DFT is

X[k]=n=0N1x[n]ej2πkn/N,k=0,1,,N1.

The inverse DFT is

x[n]=1Nk=0N1X[k]ej2πkn/N,n=0,1,,N1.

The DFT basis functions are sampled complex exponentials. The frequency represented by bin k is

ωk=2πkN.

Because discrete-time frequency is periodic with period 2π, bins near N correspond to negative frequencies:

ωNr=2π2πrN2πrN.

The DFT can be understood in two equivalent ways:

If x[n] is finite duration and zero outside 0n<N, its DTFT is

X(ejω)=n=0N1x[n]ejωn.

The DFT samples this at equally spaced frequencies:

X[k]=X(ejω)|ω=2πk/N.

This distinction matters. The DFT itself always assumes periodicity in both domains:

x[n+N]=x[n],X[k+N]=X[k].

When using the DFT to analyse a finite segment of a longer signal, we are implicitly windowing the signal and periodically extending that windowed segment.


10.2 DFT Properties

The DFT has properties analogous to the DTFT, but all indexing is modulo N.

If

x[n]X[k],y[n]Y[k],

then:

Property Time domain DFT domain
Linearity ax[n]+by[n] aX[k]+bY[k]
Circular time shift x[(nn0)N] ej2πkn0/NX[k]
Frequency shift ej2πk0n/Nx[n] X[(kk0)N]
Time reversal x[(n)N] X[(k)N]
Circular convolution x[n]Ny[n] X[k]Y[k]
Multiplication x[n]y[n] 1NX[k]NY[k]

For real-valued x[n], the DFT has conjugate symmetry:

X[Nk]=X[k].

The bins k=0 and, for even N, k=N/2 are purely real. This symmetry is used heavily in real-valued FFT implementations.

Parseval's relation for the DFT is

n=0N1|x[n]|2=1Nk=0N1|X[k]|2.

Energy is preserved up to the normalization convention.


10.3 Circular and Linear Convolution

The DFT converts circular convolution into multiplication:

y[n]=x[n]Nh[n]Y[k]=X[k]H[k].

The N-point circular convolution is

y[n]=m=0N1x[m]h[(nm)N].

Circular convolution wraps around modulo N. Linear convolution does not.

If x[n] has length Lx and h[n] has length Lh, their linear convolution has length

Ly=Lx+Lh1.

To compute linear convolution using the DFT, choose

NLx+Lh1,

zero-pad both sequences to length N, multiply their DFTs, and take the inverse DFT. With enough zero-padding, the circular wraparound happens only in zeros and therefore matches linear convolution.

For long signals, filtering with one giant FFT is inefficient or impossible due to memory. Practical block methods include:

Both methods implement ordinary LTI filtering while using FFTs internally.


10.4 Spectral Leakage and Windowing

When a finite segment is analysed with a DFT, the signal is multiplied by a window w[n]:

xw[n]=x[n]w[n].

Multiplication in time corresponds to convolution in frequency. Thus the measured spectrum is the true spectrum blurred by the window spectrum:

Xw(ejω)=12πX(ejω)W(ejω).

For a rectangular window, the window transform has narrow main lobe but large side lobes. If a sinusoid does not land exactly on a DFT bin, its energy spreads into many bins. This is spectral leakage.

Other windows trade main-lobe width against side-lobe level:

Zero-padding does not improve the true frequency resolution. It samples the same windowed DTFT more densely, which can make peaks easier to locate visually or numerically. The actual ability to separate two close frequencies is set mainly by the observation length and window shape.


10.5 Fast Fourier Transform

Direct computation of the DFT requires N2 complex multiplications. The FFT exploits symmetry and periodicity of the twiddle factors

WN=ej2π/N

to reduce the complexity to order

O(Nlog2N)

for radix-2 lengths.

For N even, split the DFT into even and odd time samples:

X[k]=n=0N1x[n]WNkn.

Write n=2r and n=2r+1:

X[k]=r=0N/21x[2r]WN/2kr+WNkr=0N/21x[2r+1]WN/2kr.

Define

E[k]=r=0N/21x[2r]WN/2kr,O[k]=r=0N/21x[2r+1]WN/2kr.

Then

X[k]=E[k]+WNkO[k],

and

X[k+N/2]=E[k]WNkO[k],

for k=0,,N/21. This is the decimation-in-time FFT butterfly.

Repeating this decomposition recursively gives the FFT. Decimation-in-frequency uses the complementary idea: split the output frequencies first rather than the input time indices. Both lead to the same complexity class.

Important implementation details are:


10.6 Short-Time Fourier Analysis

The DFT assumes the analysed segment is the object of interest. For signals whose spectrum changes with time, one uses a sliding window:

X[m,k]=n=x[n]w[nmR]ej2πkn/N,

where m indexes the frame and R is the hop size. This is the short-time Fourier transform (STFT).

The STFT gives a time-frequency representation. The window length controls the tradeoff:

There is no way around this tradeoff for Fourier windows. It is the signal-processing version of a time-bandwidth limitation. Speech, radar, music, vibration analysis, and spectroscopy all use variants of this idea.

For reconstruction, neighbouring windows must overlap in a way that allows the windowed segments to add back to the original signal. This is the basis of overlap-add reconstruction and many modern time-frequency processing algorithms.