Spectral Leakage

According to the Shannon Sampling Theorem, you can completely reconstruct a continuous-time signal from discrete, equally spaced samples if the highest frequency in the time signal is less than half the sampling frequency. Half the sampling frequency equals the Nyquist frequency. The Shannon Sampling Theorem bridges the gap between continuous-time signals and digital-time signals.

In practical, signal-sampling applications, digitizing a time signal results in a finite record of the signal, even when you carefully observe the Shannon Sampling Theorem and sampling conditions. Even when the data meets the Nyquist criterion, the finite sampling record might cause energy leakage, called spectral leakage. Therefore, even though you use proper signal acquisition techniques, the measurement might not result in a scaled, single-sided spectrum because of spectral leakage. In spectral leakage, the energy at one frequency appears to leak out into all other frequencies.

Spectral leakage results from an assumption in the FFT and DFT algorithms that the time record exactly repeats throughout all time. Thus, signals in a time record are periodic at intervals that correspond to the length of the time record. When you use the FFT or DFT to measure the frequency content of data, the transforms assume that the finite data set is one period of a periodic signal. Therefore, the finiteness of the sampling record results in a truncated waveform with different spectral characteristics from the original continuous-time signal, and the finiteness can introduce sharp transition changes into the measured data. The sharp transitions are discontinuities. The following figure illustrates discontinuities:

The discontinuities shown in the previous figure produce leakage of spectral information. Spectral leakage produces a discrete-time spectrum that appears as a smeared version of the original continuous-time spectrum.

Sampling an Integer Number of Cycles

Spectral leakage occurs only when the sample data set consists of a noninteger number of cycles. The following figure shows a sine wave sampled at an integer number of cycles and the Fourier transform of the sine wave.

In the previous figure, Graph 1 shows the sampled time-domain waveform. Graph 2 shows the periodic time waveform of the sine wave from Graph 1. In Graph 2, the waveform repeats to fulfill the assumption of periodicity for the Fourier transform. Graph 3 shows the spectral representation of the waveform.

Because the time record in Graph 2 is periodic with no discontinuities, its spectrum appears in Graph 3 as a single line showing the frequency of the sine wave. The waveform in Graph 2 does not have any discontinuities because the data set is from an integer number of cycles—in this case, one.

The following methods are the only methods that guarantee you always acquire an integer number of cycles:

Sampling a Noninteger Number of Cycles

Usually, an unknown signal you are measuring is a stationary signal. A stationary signal is present before, during, and after data acquisition. When measuring a stationary signal, you cannot guarantee that you are sampling an integer number of cycles. If the time record contains a noninteger number of cycles, spectral leakage occurs because the noninteger cycle frequency component of the signal does not correspond exactly to one of the spectrum frequency lines. Spectral leakage distorts the measurement in such a way that energy from a given frequency component appears to spread over adjacent frequency lines or bins, resulting in a smeared spectrum. You can use smoothing windows to minimize the effects of performing an FFT over a noninteger number of cycles.

Because of the assumption of periodicity of the waveform, artificial discontinuities between successive periods occur when you sample a noninteger number of cycles. The artificial discontinuities appear as very high frequencies in the spectrum of the signal—frequencies that are not present in the original signal. The high frequencies of the discontinuities can be much higher than the Nyquist frequency and alias somewhere between 0 and fs/2. Therefore, spectral leakage occurs. The spectrum you obtain by using the DFT or FFT is a smeared version of the spectrum and is not the actual spectrum of the original signal.

The following figure shows a sine wave sampled at a noninteger number of cycles and the Fourier transform of the sine wave.

In the previous figure, Graph 1 consists of 1.25 cycles of the sine wave. In Graph 2, the waveform repeats periodically to fulfill the assumption of periodicity for the Fourier transform. Graph 3 shows the spectral representation of the waveform. The energy is spread, or smeared, over a wide range of frequencies. The energy has leaked out of one of the FFT lines and smeared itself into all the other lines, causing spectral leakage.

Spectral leakage occurs because of the finite time record of the input signal. To overcome spectral leakage, you can take an infinite time record, from –infinity to +infinity. With an infinite time record, the FFT calculates one single line at the correct frequency. However, waiting for infinite time is not possible in practice. To overcome the limitations of a finite time record, windowing is used to reduce the spectral leakage.

In addition to causing amplitude accuracy errors, spectral leakage can obscure adjacent frequency peaks. The following figure shows the spectrum for two close frequency components when no smoothing window is used and when a Hanning window is used.

In the previous figure, the second peak stands out more prominently in the windowed signal than it does in the signal with no smoothing window applied.