Watching signal amplitude is easy on software defined radios. But accurate DFT displays need to be cleaned up with windowing. Here’s why and how.

Once and for all, let’s understand the basics of FFT windowing. Basically, it’s how we mitigate the weaknesses of the Discrete Fourier Transform. Here goes.

There are two big problems when we use DFT to display radio signals. First, the math behind the DFT assumes a continuous periodic signal that goes on forever. The DFT is performed on a chunk of signal data (buffer), then another, then another, and so on. The odds of each buffer containing a continuous periodic signal is very low, nil for all practical purposes. So, as the buffers flow by, there are major discontinuities at the boundaries because real radio signals change from moment to moment. You fill find that these abrupt boundary effects cause the DFT to smear across the spectrum.

We call this first problem spectrum leakage. It always happens when you are watching signal amplitude using DFT. The solution is to pre-process the signal buffer with a window. Basically, windows reduce amplitude at the boundaries of the data block. Here is what three FFT windows look like:

A rectangular window is the same as “no window”; all others shape the data going to the DFT.

Next, let’s move on to the second problem, which is called scalloping. The DFT is designed to convert time series signals into frequency domain bins. A bin is a discrete amplitude at a certain frequency. So, if your DFT has a length of N, it creates this number of bins centered on multiples of Sampling Frequency ÷ N. When a signal is not exactly centered on a bin frequency, it smears across adjacent bins.

Fortunately, FFT windowing reduces the effects of leakage and scalloping in predictable ways, and provides correction factors for the windows functions to get proper signal amplitudes.

## Watching Signal Amplitudes – See the Effects of Windowing

You will find the only time there is no DFT leakage is when you send a pure tone with an integer number of periods across the buffer being processed. You also will find that the only time there is no scalloping is when the signal frequency is exactly centered on one DFT bin. Let’s take a look.

In the top picture I show the results of an experiment using GNURadio with three different windows: Rectangular, Blackman and Flat Top. My sampling rate is 16.0 kHz and the GNURadio block size is 4096 samples. My two tones are generated at 3.0 kHz and 3.02 kHz. FFT size is 1024.

No leakage or scalloping happens when I DFT the 3.0 kHz signal, shown in Blue, because the buffer contains an integer number of signal periods (768) and the tone falls exactly centered on bin 192. On the other hand, the Purple signal at 3.02 kHz does not meet these criteria. In the Rectangular column (no windowing) you can see a pure spectrum line in Blue (3.0 kHz) and really bad leakage and smearing in Purple (3.02 kHz).

In the other columns, you can see how the Blackman and Flat Top windows clean up the leakage and scalloping in predictable ways. Your SDR uses windowing to provide better performance for watching signal amplitude.

## Watching Radio Signals – Windows Cause Power Loss

One last thing. You should notice that while the original signal is set to produce an amplitude peak at 0 dB, the Blackman window reduces the amplitude peak to -7.5 dB and the Flat Top to -13.3 dB. Although this effect is called coherent power gain, it is actually a loss caused by the way each window decreases amplitude towards its edges.

Fortunately, this effect is mathematically stable and the SDR software will correct the measurements reliably.

You can conduct these experiments easily using GNURadio.