In digital signal processing, a window is a function, typically defined (or nonzero) for a specific (short) interval and undefined (or zero) outside of that interval, often bell shaped, and used primarily to introduce adjustments to frequency filters and their magnitude response or to reduce spectral leakage during spectral analysis.
The following are topics on specific windows. The application of windows in digital signal processing is further discussed below. For an example of how windows are derived, see Hamming window.
Flat top window
Power of cosine window
Windowing in FIR filter design
Examples of windowed filters with finite impulse response and their corresponding impulse and magnitude responses exist in each of the window topics above.
The windowing function is typically a parabola designed to taper the ripples in the two ends of the filter's impulse response. It is thus sometimes known as a "tapering function". When the windowing function is placed over the impulse response a(k) as in the equation above, the impulse response becomes warped. It is said that applying the window function to an impulse response is as if "looking at the impulse response through a window".
FIR filters exhibit the Gibbs phenomenon – approximating the discontinuous magnitude response with the continuous Fourier series results in ripples around the point of discontinuity (the cutoff frequency). These ripples decrease in energy as the approximation is improved, but converge to a set height. A typical purpose of windowing is to reduce the Gibbs phenomenon ripples.
Another purpose of windowing may be to improve the filter's stop band attenuation. In essence, filtering is the process of extracting simple waves (individual frequencies) from a complex signal. This works well when all simple waves in the signal have similar amplitude, because the stop band attenuation of the standard filter could be small (say, -20 dB). This stop band attenuation may be insufficient to distinguish simple waves, the amplitudes of which differ by more than the stop band attenuation of the filter (e.g., by more than 20 dB).
Windowing in spectral analysis
"Spectral analysis" typically simply means measuring the magnitude of frequencies in a signal. It could be called "frequency domain analysis," "frequency content," or "magnitude content".
Spectral analysis is typically performed with the Fourier transform. The transform is, however, imprecise, specifically for frequencies that are not one of the components of the transform. The magnitude of such frequencies will spill over the components of the transform, which is called spectral leakage. Spectral leakage can be corrected to an extent, by windowing the signal before the transform is applied to the signal. An example of this is provided in the topic Coherent gain.
The following are topics on measures for windows.
Equivalent noise bandwidth
Highest sidelobe level
Worst case processing loss
Many of these are not intuitive and how measures should be used depends on how the window itself is used.