Glossary definition of 'Window function'

A weighting function applied to sample data before a FFT transform is applied in order to reduce the effects of discontinuities at the ends of the sample data.

When performing an FFT, a finite-length buffer of sample values is used. Since this buffer is looped round in the FFT calculations (effectively repeating infinitely), any discontinuity where the end of the buffer wraps to the beginning produces a spread of frequencies (caused by the step function) on the resulting FFT frequency spectrum. This usually seriously limits the usefulness of the FFT so a Window function is applied to the buffer prior to calculating the FFT. A Window function is typically a bell-shaped envelope which is applied to the sample data to fade the level to zero at each end of the buffer. This removes any discontinuity at that point and lowers the 'skirts' on the FFT components, to a greater or lesser degree depending on the quality of the Window function.

FFT window function

Although good dynamic range is retained by this method, energy from individual frequencies is spread between a few adjacent bins, compromising frequency resolution. Where test stimuli can be controlled, the optimum FFT resolution is derived by ensuring that the test waveform repeats precisely over the period of the buffer, thus eliminating edge discontinuities and allowing a rectangular window (i.e. no window at all) to be used. This technique is used in the dScope's synchronous multi-tone testing feature.

see also: