Spectral Leakage Tutorial (under construction)

Estimating the Fourier transform of a signal by examining a finite range (i.e. window) of that signal will result in a phenomenon known as spectral leakage. This tutorial will guide the reader through that phenomenon, why it can be a problem, quantification of the leakage, and finally methods for working around it. This tutorial assumes the reader has a basic background in signals and systems is familiar with convolution and the Fourier transform.

What is Spectral Leakage?

Imagine we have signal x(t) which is a sinusoidal signal of single frequency f Hz. We know that the Fourier transform of this signal would be an impulse at that frequency f.

TODO - create diagram

Now let's imagine that we limit ourselves to only look at a finite range of that signal x(t). This is achieved by multiplying the signal by some window function w(t). That would look like the following.

TODO - create windowed function plot

What would be the Fourier transform of this new windowed signal? Well we know that multiplication in the time domain results in convolution in the frequency domain. So let's start by taking the Fourier transform of x(t) and w(t) separately. Note that the Fourier transform of the rect function w(t) is a sinc function.

TODO - plot the fourier transform of both x(t) and w(t)

Now that we have both Fourier transforms separately, let's convolve them with one another. Recall that convolution is essentially a sliding integral of two functions.

TODO - create GIF convolution

Finally, let's compare the Fourier transform of the original signal to the new windowed signal.

TODO - create GIF convolution

What do we see here? Well the windowed signal kind of resembles the non-windowed signal in the sense that we can see a main peak corresponding the frequency f. But we also see that it has kind of been smeared into other frequencies. Or in otherwords, looking at a fininte window of data has resulted in the oroginally frequency leaking into neighboring frequencies.

That's it - that's what spectral leakage is.

Why is Spectral Leakage a Problem? (scenario #1)

So how can spectral leakage cause us problems? Let's walk through an example.

Imagine we have a continuous time signal x(t) that possesses two frequency components of amplitude 1 at two discrete frequencies of 1Hz and 2Hz. $$x(t) = cos(2\pi\cdot1t) + cos(2\pi\cdot2t)$$.

The Fourier transform of x(t) should yield the following.

TODO - show plot with two impulses

However, imagine if we windowed this function to a 1 second duration.

To Be Continued...