What is Window function?
A weighting function applied to a finite interval of a signal or of coefficients in DFT analysis and FIR filter design. Simply cutting out the interval (a rectangular window) leaves its two ends discontinuous and causes spectral leakage or ripple, which a window that brings both ends smoothly toward 0 suppresses. The typical Hann (Hanning) window has a highest side lobe of about −31 dB, lower than the rectangular window's −13 dB, but a main lobe about twice as wide. Hamming, Blackman, flat-top and other windows are chosen depending on whether low side lobes or a narrow main lobe matters more.
Japanese name: 窓関数
Window function appears in 1 practice question across 1 topic, including Digital Signal Processing Basics.
Field: Digital Signal Processing Basics
Reading and correcting amplitudes
Applying a window reduces the signal amplitude on average, so amplitudes are corrected by dividing by the window's mean value (0.5 for the Hann window). A frequency halfway between bins is also read too small (scalloping loss), by about 3.9 dB with the rectangular window and about 1.4 dB with the Hann window. When amplitudes must be measured accurately, a flat-top window, whose main lobe has a flat top, is used.
FAQ
When is a window function needed?
A window is normally applied whenever there is no guarantee that the measured signal fits a whole number of periods into the observation interval. When the period matches the interval exactly, or for a transient signal that dies out within the interval, leakage is not a problem even with the rectangular window (no window).
What is the difference between the Hann and Hamming windows?
Both are cosine-shaped windows, but the Hann window goes exactly to 0 at both ends and its distant side lobes decay quickly. The Hamming window leaves about 0.08 at both ends instead of 0, which lowers its highest side lobe to about −43 dB, but its distant side lobes decay more slowly.