Window function
. Most popular window functions are similar bell-shaped curves. In signal processing and statistics, a window function (also known as an apodization function or tapering function ) is a mathematical function that is zero-valued outside of some chosen interval. Typically, window functions are symmetric around the middle of the interval, approach a maximum in the middle, and taper away from the middle. Mathematically, when another function or waveform/data-sequence is "multiplied" by a window function, the product is also zero-valued outside the interval: all that is left is the part where they overlap, the "view through the window". Equivalently, and in actual practice, the segment of data within the window is first isolated, and then only that data is multiplied by the window function values. Thus, tapering, not segmentation, is the main purpose of window functions. The reasons for examining segments of a longer function include detection of transient events and time-averaging of frequency spectra. The duration of the segments is determined in each application by requirements like time and frequency resolution. But that method also changes the frequency content of the signal by an effect called spectral leakage. Window functions allow us to distribute the leakage spectrally in different ways, according to the needs of the particular application.…
. Most popular window functions are similar bell-shaped curves. In signal processing and statistics, a window function (also known as an apodization function or tapering function ) is a mathematical function that is zero-valued outside of some chosen interval. Typically, window functions are symmetric around the middle of the interval, approach a maximum in the middle, and taper away from the middle. Mathematically, when another function or waveform/data-sequence is "multiplied" by a window function, the product is also zero-valued outside the interval: all that is left is the part where they overlap, the "view through the window". Equivalently, and in actual practice, the segment of data within the window is first isolated, and then only that data is multiplied by the window function values. Thus, tapering, not segmentation, is the main purpose of window functions. The reasons for examining segments of a longer function include detection of transient events and time-averaging of frequency spectra. The duration of the segments is determined in each application by requirements like time and frequency resolution. But that method also changes the frequency content of the signal by an effect called spectral leakage. Window functions allow us to distribute the leakage spectrally in different ways, according to the needs of the particular application. There are many choices detailed in this article, but many of the differences are so subtle as to be insignificant in practice. In typical applications, the window functions used are non-negative, smooth, "bell-shaped" curves. Rectangle, triangle, and other functions can also be used. A more general definition of window functions does not require them to be identically zero outside an interval, as long as the product of the window multiplied by its argument is square integrable, and, more specifically, that the function goes sufficiently rapidly toward zero. Two-dimensional windows are commonly used in image processing to reduce unwanted high-frequencies in the image Fourier transform. They can be constructed from one-dimensional windows in either of two forms. The separable form, W(m,n)=w(m)w(n) is trivial to compute. The radial form, W(m,n)=w(r) , which involves the radius r=\sqrt{(m-M/2)^2+(n-N/2)^2} , is isotropic, independent on the orientation of the coordinate axes. Only the Gaussian function is both separable and isotropic. The separable forms of all other window functions have corners that depend on the choice of the coordinate axes. The isotropy/anisotropy of a two-dimensional window function is shared by its two-dimensional Fourier transform. The difference between the separable and radial forms is akin to the result of diffraction from rectangular vs. circular apertures, which can be visualized in terms of the product of two sinc functions vs. an Airy function, respectively. w_0(x) is a zero-phase function (symmetrical about x=0 ), continuous for x \in [-N/2, N/2], where N is a positive integer (even or odd). The sequence \{w[n] = w_0(n-N/2),\quad 0\le n \le N\} is symmetric, of length N+1. \{w[n],\quad 0\le n \le N-1\} is DFT-symmetric, of length N. The parameter B displayed on each spectral plot is the function's noise equivalent bandwidth metric, in units of DFT bins. See and Normalized frequency for understanding the use of "bins" for the x-axis in these plots. The sparse sampling of a discrete-time Fourier transform (DTFT) such as the DFTs in Fig 2 only reveals the leakage into the DFT bins from a sinusoid whose frequency is also an integer DFT bin. The unseen sidelobes reveal the leakage to expect from sinusoids at other frequencies. Therefore, when choosing a window function, it is usually important to sample the DTFT more densely (as we do throughout this section) and choose a window that suppresses the sidelobes to an acceptable level. w[n] = 1. Other windows are designed to moderate these sudden changes, to reduce scalloping loss and improve dynamic range (described in ). The rectangular window is the 1st-order B-spline window as well as the 0th-power power-of-sine window. The rectangular window provides the minimum mean square error estimate of the Discrete-time Fourier transform, at the cost of other issues discussed. B-spline windows can be obtained as k-fold convolutions of the rectangular window. They include the rectangular window itself (k = 1), the (k = 2) and the (k = 4). Alternative definitions sample the appropriate normalized B-spline basis functions instead of convolving discrete-time windows. A kth-order B-spline basis function is a piece-wise polynomial function of degree k − 1 that is obtained by k-fold self-convolution of the rectangular function. w[n] = 1 - \left|\frac{n - \frac{N}{2}}{\frac{L}{2}}\right|,\quad 0\le n \le N, where L can be N, N + 1, or N + 2. The first one is also known as Bartlett window or Fejér window. All three definitions converge at large N. The triangular window is the 2nd-order B-spline window. The L = N form can be seen as the convolution of two -width rectangular windows. The Fourier transform of the result is the squared values of the transform of the half-width rectangular window. w[n] = \ w_0\left(n-\tfrac{N}{2}\right),\ 0 \le n \le N w[n]=1 - \left(\frac{n-\frac{N}{2}}{\frac{N}{2}}\right)^2,\quad 0\le n \le N. Alternatively, it can be written as two factors, as in a beta distribution: w[n]= \left(1 + \frac{n-\frac{N}{2}}{\frac{N}{2}}\right) \left(1 - \frac{n-\frac{N}{2}}{\frac{N}{2}}\right),\quad 0\le n \le N. The defining quadratic polynomial reaches a value of zero at the samples just outside the span of the window. The Welch window is fairly close to the sine window, and just as the power-of-sine windows are a useful parameterized family, the power-of-Welch window family is similarly useful. Powers of the Welch or parabolic window are also symmetric beta distributions, and are purely algebraic functions (if the powers are rational), as opposed to most windows that are transcendental functions. If different exponents are used on the two factors in the Welch polynomial, the result is a general beta distribution, which is useful for making asymmetric window functions. w[n] = a_0 - (1-a_0) \cdot \cos\left( \tfrac{2 \pi n}{N} \right),\quad 0\le n \le N, or alternatively as their zero-phase versions: \begin{align} w_0(n)\ &= w\left[ n+\tfrac{N}{2}\right]\\ &= a_0 + (1-a_0)\cdot \cos \left ( \tfrac{2\pi n}{N} \right),\quad -\tfrac{N}{2} \le n \le \tfrac{N}{2}. \end{align} ==== Hann window==== Setting a_0 = 0.5; \quad a_1 = -0.5 produces a Hann window: w[n] = \sum^{L-1}_{l=0}a_l\cos\left(\frac{2\pi ln}{N}\right) = 0.5 - 0.5\cos\left(\frac{2\pi n}{N}\right) named after Julius von Hann, and sometimes referred to as Hanning, which derived from the verb "to Hann". It is also known as the raised cosine, because of its similarity to a raised-cosine distribution. This function is a member of both the cosine-sum and power-of-sine families. Unlike the Hamming window, the end points of the Hann window just touch zero. The resulting side-lobes roll off at about 18 dB per octave. Approximation of the coefficients to two decimal places substantially lowers the level of sidelobes, to a nearly equiripple condition. In the equiripple sense, the optimal values for the coefficients are a 0 = 0.53836 and a 1 = 0.46164. w[n] = a_0 - a_1 \cos \left ( \frac{2 \pi n}{N} \right) + a_2 \cos \left ( \frac{4 \pi n}{N} \right), a_0=\frac{1-\alpha}{2};\quad a_1=\frac{1}{2};\quad a_2=\frac{\alpha}{2}. By common convention, the unqualified term Blackman window refers to Blackman's "not very serious proposal" of (a 0 = 0.42, a 1 = 0.5, a 2 = 0.08), which closely approximates the exact Blackman, with a 0 = 7938/18608 ≈ 0.42659, a 1 = 9240/18608 ≈ 0.49656, and a 2 = 1430/18608 ≈ 0.076849. These exact values place zeros at the third and fourth sidelobes, but result in a discontinuity at the edges and a 6 dB/oct fall-off. The truncated coefficients do not null the sidelobes as well, but have an improved 18 dB/oct fall-off. w[n]=a_0 - a_1 \cos \left ( \frac{2 \pi n}{N} \right)+ a_2 \cos \left ( \frac{4 \pi n}{N} \right)- a_3 \cos \left ( \frac{6 \pi n}{N} \right) a_0=0.355768;\quad a_1=0.487396;\quad a_2=0.144232;\quad a_3=0.012604. w[n]=a_0 - a_1 \cos \left ( \frac{2 \pi n}{N} \right)+ a_2 \cos \left ( \frac{4 \pi n}{N} \right)- a_3 \cos \left ( \frac{6 \pi n}{N} \right) a_0=0.3635819; \quad a_1=0.4891775; \quad a_2=0.1365995; \quad a_3=0.0106411. w[n]=a_0 - a_1 \cos \left ( \frac{2 \pi n}{N} \right)+ a_2 \cos \left ( \frac{4 \pi n}{N} \right) a_0=0.4243801;\quad a_1=0.4973406;\quad a_2=0.0782793. w[n] = a_0 &{}- a_1 \cos \left ( \frac{2 \pi n}{N} \right)+ a_2 \cos \left ( \frac{4 \pi n}{N} \right)\\ &{}- a_3 \cos \left ( \frac{6 \pi n}{N} \right)+a_4 \cos \left ( \frac{8 \pi n}{N} \right). \end{align} The Matlab variant has these coefficients: a_0=0.21557895;\quad a_1=0.41663158;\quad a_2=0.277263158;\quad a_3=0.083578947;\quad a_4=0.006947368. Other variations are available, such as sidelobes that roll off at the cost of higher values near the main lobe. Class I, Order 1 (K = 1): a_0=1;\quad a_1=1 Functionally equivalent to the Hann window and power of sine ( ). Class I, Order 2 (K = 2): a_0=1;\quad a_1=\tfrac{4}{3};\quad a_2=\tfrac{1}{3} Functionally equivalent to the power of sine ( ). Class I is defined by minimizing the high-order sidelobe amplitude. Coefficients for orders up to K=4 are tabulated. Class II minimizes the main-lobe width for a given maximum side-lobe. Class III is a compromise for which order K = 2 resembles the . w[n] = \sin\left(\frac{\pi n}{N}\right) = \cos\left(\frac{\pi n}{N} - \frac{\pi}{2}\right),\quad 0\le n \le N. The corresponding w_0(n)\, function is a cosine without the /2 phase offset. So the sine window is sometimes also called cosine window. As it represents half a cycle of a sinusoidal function, it is also known variably as half-sine window or half-cosine window. The autocorrelation of a sine window produces a function known as the Bohman window. w[n] = \sin^\alpha\left(\frac{\pi n}{N}\right) = \cos^\alpha\left(\frac{\pi n}{N} - \frac{\pi}{2}\right),\quad 0\le n \le N. The rectangular window ( ), the sine window ( ), and the Hann window ( ) are members of this family. For even-integer values of these functions can also be expressed in cosine-sum form: w[n]=a_0 - a_1 \cos \left ( \frac{2 \pi n}{N} \right)+ a_2 \cos \left ( \frac{4 \pi n}{N} \right)- a_3 \cos \left ( \frac{6 \pi n}{N} \right)+ a_4 \cos \left ( \frac{8 \pi n}{N} \right)- ... \begin{array}{l|llll} \hline \alpha & a_0 & a_1 & a_2 & a_3 & a_4 \\ \hline 0 & 1 \\ 2 & 0.5 & 0.5 \\ 4 & 0.375 & 0.5 & 0.125 \\ 6 & 0.3125 & 0.46875 & 0.1875 & 0.03125 \\ 8 & 0.2734375 & 0.4375 & 0.21875 & 0.0625 & 7.8125\times10^{-3} \\ \hline \end{array} w[n]=\exp\left(-\frac{1}{2} \left ( \frac{n-N/2}{\sigma N/2} \right)^{2}\right),\quad 0\le n \le N. \sigma \le \;0.5\, The standard deviation of the Gaussian function is σ · N/2 sampling periods. w[n] = G(n) - \frac{G(-\tfrac{1}{2})[G(n + L) + G(n - L)]}{G(-\tfrac{1}{2} + L) + G(-\tfrac{1}{2} - L)} where G is a Gaussian function: G(x) = \exp\left(- \left(\cfrac{x - \frac{N}{2}}{2 L \sigma_t}\right)^2\right) The standard deviation of the approximate window is asymptotically equal (i.e. large values of ) to for . w[n,p]=\exp\left(-\left ( \frac{n-N/2}{\sigma N/2} \right)^{p}\right) for any even p . At p=2 , this is a Gaussian window and as p approaches \infty , this approximates to a rectangular window. The Fourier transform of this window does not exist in a closed form for a general p . However, it demonstrates the other benefits of being smooth, adjustable bandwidth. Like the , this window naturally offers a "flat top" to control the amplitude attenuation of a time-series (on which we don't have a control with Gaussian window). In essence, it offers a good (controllable) compromise, in terms of spectral leakage, frequency resolution and amplitude attenuation, between the Gaussian window and the rectangular window. See also for a study on time-frequency representation of this window (or function). w[n] = \frac{1}{2} \left[1-\cos \left(\frac{2\pi n}{\alpha N} \right) \right],\quad & 0 \le n At it becomes rectangular, and at it becomes a Hann window. w[0] = 0, \\ w[n] = \left(1 + \exp\left(\frac{\varepsilon N}{n} - \frac{\varepsilon N}{\varepsilon N - n}\right)\right)^{-1},\quad & 1 \le n The amount of tapering is controlled by the parameter ε, with smaller values giving sharper transitions. w[n]=\frac{I_0\left(\pi\alpha \sqrt{1-\left(\frac{2 n}{N}-1\right)^2}\right)}{I_0(\pi\alpha)},\quad 0\le n \le N w_0(n) = \frac{I_0\left(\pi\alpha \sqrt{1-\left(\frac{2 n}{N}\right)^2}\right)}{I_0(\pi\alpha)},\quad -N/2 \le n \le N/2 where I_0 is the 0 -order modified Bessel function of the first kind. Variable parameter \alpha determines the tradeoff between main lobe width and side lobe levels of the spectral leakage pattern. The main lobe width, in between the nulls, is given by 2\sqrt{1 + \alpha^2}, in units of DFT bins, and a typical value of \alpha is 3. W_0(k) = \frac{T_{N} \big(\beta \cos\left(\frac{\pi k}{N+1}\right)\big)}{T_{N} (\beta)} \beta = \cosh\!\big(\tfrac{1}{N} \cosh^{-1}(10^\alpha)\big) is the unique positive real solution to T_N(\beta) = 10^\alpha , where the parameter α sets the Chebyshev norm of the sidelobes to −20α decibels. The window function can be calculated from W 0 (k) by an inverse discrete Fourier transform (DFT): w_0(n) = \frac{1}{N+1} \sum_{k=0}^N W_0(k) \cdot e^{i 2 \pi k n / (N+1)},\ -N/2 \le n \le N/2. The lagged version of the window can be obtained by: w[n] = w_0\left(n-\frac{N}{2}\right),\quad 0 \le n \le N, which for even values of N must be computed as follows: \begin{align} w_0\left(n-\frac{N}{2}\right) = \frac{1}{N+1} \sum_{k=0}^{N} W_0(k) \cdot e^{\frac{i 2 \pi k (n-N/2)}{N+1}} = \frac{1}{N+1} \sum_{k=0}^{N} \left[ \left(-e^{\frac{i\pi}{N+1}}\right)^k \cdot W_0(k)\right] e^{\frac{i 2 \pi k n}{N+1}}, \end{align} which is an inverse DFT of \left(-e^{\frac{i\pi}{N+1}}\right)^k\cdot W_0(k). Variations: Due to the equiripple condition, the time-domain window has discontinuities at the edges. An approximation that avoids them, by allowing the equiripples to drop off at the edges, is a Taylor window. An alternative to the inverse DFT definition is also available.w[n = \frac{1}{N+1} \left[ C^\mu_N(x_0)+\sum_{k=1}^{\frac{N}{2}} C^\mu_N \left(x_0 \cos\frac{k\pi}{N+1}\right)\cos\frac{2n\pi k}{N+1} \right] where C^{\mu}_{N} is the Ultraspherical polynomial of degree N, and x_0 and \mu control the side-lobe patterns. Certain specific values of \mu yield other well-known windows: \mu=0 and \mu=1 give the Dolph–Chebyshev and Saramäki windows respectively. See here for illustration of Ultraspherical windows with varied parametrization. w[n]=e^{-\left|n-\frac{N}{2}\right|\frac{1}{\tau}}, where τ is the time constant of the function. The exponential function decays as e ≃ 2.71828 or approximately 8.69 dB per time constant. This means that for a targeted decay of D dB over half of the window length, the time constant τ is given by \tau = \frac{N}{2}\frac{8.69}{D}. w[n]=a_0 - a_1 \left |\frac{n}{N}-\frac{1}{2} \right| - a_2 \cos \left (\frac{2 \pi n}{N}\right ) a_0=0.62;\quad a_1=0.48;\quad a_2=0.38\, w[n]=\frac{1}{2}\left(1-\cos\left(\frac{2 \pi n}{N}\right)\right)e^\frac{-\alpha\left|N - 2n\right|}{N}\, where α is a parameter that controls the slope of the exponential. w_0[n] = a_{0} + \sum_{k=1}^{K} a_{2k}\left(\frac{n}{\sigma}\right)^{2k}, \quad -\frac{N}{2} \le n \le \frac{N}{2}, where \sigma is the standard deviation of the \{n\} sequence. Additionally, starting with a set of expansion coefficients a_{2k} that mimics a certain known window function, the GAP window can be optimized by minimization procedures to get a new set of coefficients that improve one or more spectral properties, such as the main lobe width, side lobe attenuation, and side lobe falloff rate. Therefore, a GAP window function can be developed with designed spectral properties depending on the specific application. w[n] = \operatorname{sinc}\left(\frac{2n}{N} - 1\right) used in Lanczos resampling for the Lanczos window, \operatorname{sinc}(x) is defined as \sin(\pi x)/\pi x also known as a sinc window, because: w_0(n) = \operatorname{sinc}\left(\frac{2n}{N}\right)\, is the main lobe of a normalized sinc function The w_0(x) form, according to the convention above, is symmetric around x = 0 . However, there are window functions that are asymmetric, such as the gamma distribution used in FIR implementations of gammatone filters, or the beta distribution for a bounded-support approximation to the gamma distribution. These asymmetries are used to reduce the delay when using large window sizes, or to emphasize the initial transient of a decaying pulse. Any bounded function with compact support, including asymmetric ones, can be readily used as a window function. Additionally, there are ways to transform symmetric windows into asymmetric windows by transforming the time coordinate, such as with the below formula x \leftarrow N\left( \frac{x}{N}+\frac{1}{2} \right)^\alpha-\frac{N}{2}\,, where the window weights more highly the earliest samples when \alpha > 1 , and conversely weights more highly the latest samples when \alpha . == Page citations== ==References== ==External links== LabView Help, Characteristics of Smoothing Filters, http://zone.ni.com/reference/en-XX/help/371361B-01/lvanlsconcepts/char_smoothing_windows/ Creation and properties of Cosine-sum Window functions, http://electronicsart.weebly.com/fftwindows.html Online Interactive FFT, Windows, Resolution, and Leakage Simulation | RITEC | Library & Tools
References
No reference rows published for this article.
Cite this article
MLA
"Window function." encyclopegia.org, 2026, https://encyclopegia.org/wiki/window-function. Accessed 23 November 2026.
Chicago
"Window function." encyclopegia.org. Accessed November 23, 2026. https://encyclopegia.org/wiki/window-function.
APA
encyclopegia.org. (2026). Window function. Retrieved November 23, 2026, from https://encyclopegia.org/wiki/window-function
Accessed November 23, 2026 · CC BY-SA 4.0 · citation page · JSON