This unit considers the consequences of analysing sections or 'windows' of a continuous signal, and how the use of smoothing functions reduces the spectral artifacts introduced.
When you have worked through this unit you should:
· be able to state why and when spectral leakage occurs
· understand how a smooth window reduces the amount of spectral leakage
· be able to describe and apply a Hamming window in your own work
Where the frequency components of signals we analyse with the DFT are exact harmonics of the DFT analysis, the resulting spectrum shows clean spectral lines. Since mostly the signals we want to analyse will not contain just these harmonics, we find that the energy at one input frequency is spread to a number of nearby harmonics in the DFT. This is called spectral leakage.
A similar problem arises for signals which are changing with time, where we usually want to analyse a 'snapshot' of the signal, short enough in which we could consider the generating system to be 'stationary'. To do this we must take a sample or a window of the signal over some defined interval. If we simply cut out a section of the signal, however, we introduce artifacts into the waveform - namely the sudden onset and offset - which will be manifested as distortions in our spectral analysis. What is happening is that our spectrum results from the convolution of the signal spectrum with the spectrum of a rectangular window. The spectrum of a rectangular window has the familiar sin(x)/x shape or sinc function, and so each signal component is broadened by this shape.
We can reduce these distortions by ensuring that the section has no sudden onset or offset, which we can do by multiplying our section with a smoothing function which reduces the size of the signal at the edges. We need a shape which has a spectrum with a narrow central lobe and small sidelobes. A window based on a raised-cosine shape called the Hamming window is a common compromise:
Where N is the number of samples in the section. See Hamming().
Lynne & Fuerst Introductory Digital Signal Processing, Section 8.2.2
Example Program 6.1
6.1 Adapt Example 6.1 to plot the waveforms and FFT spectra of sine waves at Fs/4 (exact) and Fs/6 (non-exact) harmonic frequencies with rectangular and Hamming windows. Use a short FFT of about 128 samples. Interpret the results.