3. Signal Windowing

Introduction

The fourier transform assumes that the (sampled) signal is infinite. So the amplitude of the last sample should end just one sample before the (amplitude of the) first sample. The the number of captured sines is should be an integer number. In other words if the captured signal is repeatedly placed after each other, the signal should be continuous. A captured signal with an integer number of samples is coherent.

discontinuous sampled signal
windowing sampled signal

It is not always possible to capture an integer number of sines (that is also a power of 2). For the fourier transform it means the signal is discontinous (the end and start of the signal does not fit smoothly). In the spectrum it will result in spectral leakage. See plot below: Press the button "Show spectrum" and switch between coherent and incoherent.

Loading...(javascript must be enabled)


Click on a point

Windowing for incoherent signals

Fourier analysis of an incoherent captured signal will not result in usable parameter calculations (SINAD, SNR etc.) and harmonics can stay unnoticed in the spectrum. To reduce the effects of the discontinuity, we could reduced the amplitude of the captured signal at the start and end of the signal. That is exactly what signal windowing is doing. In above plot show the signal and select a window. In the frequency spectrum it will result in extra bins arround the frequency bin of interest. The formula of the signal window is placed below the plot. This signal is multiplied with the captured signal.

windowed signal
Amplitude error

In the plot above select coherent, rectangle window and show the spectrum in voltage peak. The amplitude matched exactly 1Vpeak. Now select incoherent, and notice the amplitude error. The energy of the carrier is spread in the other bins. This can be better seen when dBc (dBs relative to the carrier) is selected. Switch back to Vpeak and select coherent signal, hanning window. The amplitude of the carrier is 0.5V. The other energy is placed in the 2 bins at each side of the carrier. The total amplitude is 1Vpeak (0.5V + 2*0.25V). Then select incoherent signal. There is still an amplitude error, but this will be less than with the rectangle window.

Parameter calculation

As we could see in previous example, a signal window will reduce spectral leakage and places the energy of the signal in extra bins arround the signal. Parameter calculation will make more sense and harmonics can be recognized in the spectrum again. The Rife Vincent 4 window will place almost all energy of the signal in interest in the extra bins arround the signal. However there is an issue regarding this. To make this clear, please follow the next experiment.

Windowing frequency resolution issue

Show spectrum (press Show signal button), select dBc, 0.5V DC, coherent signal and select Hamming window. The energy of the signal is placed in 3 bins, bin 5 and 1 extra bin on each side of bin 5. The energy of the DC is placed in the first and second bin. The bins between the signal and the DC bin are noise bins (bin 2 and 3).

Select the Rife Vincent 4 window. The energy of the signal is placed in 9 bins (remove the DC to count the number of bins), one in the center (bin position 5) and 4 bins at every side of bin 5. The same applies to the DC component. Since the bins between the signal and DC bin are only 3, bins 1 to 4 contain a DC part and a signal part.

The same can happen with harmonic bins and the noise bins. If a harmonic bin is lower or equal than the noise bins arround this harmonic, the harmonic will "get" (leak) energy of the noise bins. So with windowing enabled and harmonics equal or lower than the noise, the THD can significantly get worse.

Choosing a window

An important difference between the windows are the width of the main lobe and the characteristics of the side lobes. The main lobe consist of the center frequency and one or more bins on each side of the center frequency. This can be seen in the plot above when selecting a coherent signal (no DC). Changing the window will change the number of bins arround the center frequency. The side lobes are the bins not belonging to the main lobe. The width of the main lobe determines the frequency resolution (or how good we can distinguish the signals from each other). The wider the main lobe the worse the frequency resolution, but the better the amplitude accuracy. If the amplitude accuracy is an important issue, the Flat Top or Blackman-Harris window can be a good choice. However the frequency resolution is poor, due to their wide main lobe.

The Hamming and Hanning window do have the similar shape. See also the equation of both windows. The amplitude accuracy is poor, but the frequency resolution is better than the Flat Top and Blackman-Harris window. The main difference between the Hanning and Hamming window is the Roll-off rate of the Side Lobes.

The rife vincent 4 window has a (very) low side lobe level, but has a wide main lobe. For dynamic testing of A/D and D/A converters with a single tone, this can be a good choice. Please be aware that due to the wide main lobe, the harmonics will also have wide main lobes. So adjacent noise bins will leak into the harmonic bins. This will usually result in a (relative) poor THD.

Window characteristics

The table below lists some characteristics of various windows. The maximum side lobe level is the largest side lobe level in decibels relative to the main lobe. The side lobe roll-off rate is the decay rate in decibels per decade of frequency of the peaks of the side lobes.

Window -3 dB main lobe width (bins) -6 dB main lobe width (bins) Max side lobe level (dB) Side lobe roll-off rate (dB/decade)
Rectangular (none) 0.88 1.21 -13 20
Hanning 1.44 2.00 -32 60
Hamming 1.30 1.81 -43 20
Blackman-Harris 1.62 2.27 -71 20
Flat Top 2.94 3.56 -44 20

<< Previous (2. Dynamic parameter calculations)  Next >> (4. Dynamic calculations on the ATX7006)