Window Functions Reference

This page is a com­pan­ion ref­er­ence to the posts Win­dows of Oppor­tu­ni­ty and Win­dows of Oppor­tu­ni­ty – ENBW. Since putting all of the con­tent into that post also would have made it way too long (instead of just reg­u­lar too long), the dis­cus­sion in it was lim­it­ed to three exam­ple win­dow func­tions (also called apodiza­tion func­tions). This page is intend­ed to serve sole­ly as a ref­er­ence for com­par­i­son of a num­ber of oth­er often-seen win­dow func­tions. For the mean­ing of the var­i­ous terms, see the orig­i­nal blog post.


I have com­pressed most of the infor­ma­tion here into a handy 3-page PDF ref­er­ence. Down­load the Win­dow Func­tions Cheat Sheet.


The visu­al overviews con­tain some of the more impor­tant prop­er­ties of each win­dow func­tion, such as win­dow shape and total ener­gy, instru­ment func­tion shape, main lobe height and frac­tion of total ener­gy $E$ con­tained there­in ($E_0 / E$), sup­pres­sion of high­est side lobe, and max­i­mum scal­lop­ing.

Where pos­si­ble, the apodiza­tion func­tion is giv­en. Since the win­dow func­tion usu­al­ly itself is just a seg­ment of an infi­nite­ly extend­ed func­tion, it must be bound­ed. This can be writ­ten as

$$w(t) = \begin{cases} A(t) & -\frac{1}{2} \le t \lt \frac{1}{2} \\ 0 & \vphantom{\frac{T}{2}}\mathrm{else} \end{cases}$$

where $A(t)$ describes the actu­al shape of the win­dow and is giv­en below.

The apodiza­tion func­tions are nor­mal­ized such that the win­dow width $T=1$. The instru­ment func­tion cor­re­spond­ing to the un-nor­mal­ized apodiza­tion func­tion $A(t / T)$ is then, accord­ing to Fouri­er trans­form rules, $T \cdot I(f \cdot T)$.

The fre­quen­cy axis is divid­ed into DFT bins which are sep­a­rat­ed by $\Delta f = T^{-1}$. For the nor­mal­ized func­tions, $\Delta f = 1$. Alias­ing effects due to finite time-res­o­lu­tion sam­pling, which make the instru­ment func­tion depen­dent on the num­ber of time sam­ples with­in the win­dow, are not con­sid­ered.

Box / Rectangular Window

The box / rec­tan­gu­lar win­dow.

$$A_\mathrm{rect}(t) = 1$$

$$I_\mathrm{rect}(f) = \mathrm{sinc} \bigl(\pi f \bigr)$$

win­dow ener­gy 0dB
main lobe height 0dB
equiv­a­lent noise BW 1$\Delta f$ (0dB)
main lobe FWHM 0.884$\Delta f$
first zero 1$\Delta f$
max­i­mum scal­lop­ing 3.92dB
high­est side lobe$^1$ -13.3dB at 1.43$\Delta f$
side lobe slope 20dB/decade
notes This is the win­dow when no win­dow is used, i.e. when the seg­ment is sim­ply cut out of the time sig­nal. It has the best res­o­lu­tion (nar­row­est main lobe), but high­est spec­tral leak­age and scal­lop­ing, and low­est dynam­ic range. Used for detect­ing strong sig­nals that are spec­tral­ly close.
see also rec­tan­gu­lar win­dow [J. O. Smith III]

Hann Window

The Hann win­dow.

$$A_\mathrm{Hann}(t) = \cos^2 \bigl(\pi t \bigr)$$

$$I_\mathrm{Hann}(f) = \frac{1}{2} \frac{\mathrm{sinc} \bigl(\pi f \bigr)}{1-f^2}$$

win­dow ener­gy -4.26dB
main lobe height -6.02dB
equiv­a­lent noise BW 1.50$\Delta f$ (1.76dB)
main lobe FWHM 1.44$\Delta f$
first zero 2$\Delta f$
max­i­mum scal­lop­ing 1.42dB
high­est side lobe -31.5dB at 2.36$\Delta f$
side lobe slope 60dB/decade
notes Also called the raised cosine or (wrong­ly) Han­ning win­dow, the Hann win­dow is quite uni­ver­sal due to its bal­ance between good res­o­lu­tion and dynam­ic range. The first side lobe is still some­what high, but their slope is steep. The pow­er-of-cosine win­dow fam­i­ly is a gen­er­al­iza­tion of the Hann win­dow with arbi­trar­i­ly steep side lobe slope.
see also Hann win­dow [J. O. Smith III]
Pow­er-of-Cosine win­dow fam­i­ly [J. O. Smith III]

Flat-top Window

The flat-top win­dow.

A_\mathrm{flat}(t) = \sum_{n=0}^4 a_{n} \cos \bigl(2 n \pi t \bigr)\\
\text{with} \vphantom{\frac{1}{2}} \quad a_0 = 0.21557895 \quad a_1 = 0.41663158 \quad a_2 = 0.277263158\\
\quad a_3 = 0.083578947 \quad a_4 = 0.006947368

win­dow ener­gy -7.56dB
main lobe height -13.3dB
equiv­a­lent noise BW 3.75$\Delta f$ (5.74dB)
main lobe FWHM 3.72$\Delta f$
first zero 5$\Delta f$
max­i­mum scal­lop­ing 0.00978dB
high­est side lobe -93.6dB at 7.47$\Delta f$
side lobe slope 20dB/decade$^2$
notes The flat-top win­dow has very lit­tle scal­lop­ing and high dynam­ic range, but poor res­o­lu­tion, and is thus used to accu­rate­ly deter­mine the height of sin­gle spec­tral peaks or sig­nals with some sep­a­ra­tion between peaks. Good for high sam­pling rates where $\Delta f$ can be very small.
see also

Hamming Window

The Ham­ming win­dow.

$$A_\mathrm{Hamming}(t) = \frac{27}{50} + \frac{23}{50} \cos \bigl(2\pi t\bigr)$$

$$I_\mathrm{Hamming}(f) = \Bigl( \frac{27}{50} - \frac{4}{50}f^2 \Bigr)\frac{\mathrm{sinc} \bigl(\pi f \bigr)}{1-f^2}$$

win­dow ener­gy -4.01dB
main lobe height -5.35dB
equiv­a­lent noise BW 1.36$\Delta f$ (1.34dB)
main lobe FWHM 1.30$\Delta f$
first zero 2$\Delta f$
max­i­mum scal­lop­ing 1.75dB
high­est side lobe -42.7dB at 4.50$\Delta f$
side lobe slope 20dB/decade
notes With a main lobe still nar­row­er than the Hann win­dow, the Ham­ming win­dow was designed to min­i­mize the height of the first side­lobe. The side lobe slope is sig­nif­i­cant­ly small­er than that of the Hann win­dow. It has a medi­um dynam­ic range. The coef­fi­cients of the apodiza­tion func­tion may be slight­ly dif­fer­ent depend­ing on the author.
see also Ham­ming win­dow [J. O. Smith III]

Blackman-Harris Window

The Black­man-Har­ris win­dows.

A_\mathrm{BH}(t) = \sum_{n=0}^3 a_{n} \cos \bigl(2 n \pi t \bigr)\\
\text{3-term:} \vphantom{\frac{1}{2}} \; a_0 = 0.21557895 \quad a_1 = 0.4973406 \quad a_2 = 0.0782793 \quad a_3 = 0\\
\text{4-term:} \quad a_0 = 0.35875 \; a_1 = 0.48829 \quad a_2 = 0.14128 \quad a_3 = 0.01168

win­dow ener­gy -5.13dB (3-term) / -5.88dB (4-term)
main lobe height -7.44dB / -8.90dB
equiv­a­lent noise BW 1.70$\Delta f$ (2.31dB) / 2.00$\Delta f$ (3.02dB)
main lobe FWHM 1.62$\Delta f$ / 1.90$\Delta f$
first zero 3$\Delta f$ / 4$\Delta f$
max­i­mum scal­lop­ing 1.14dB / 0.826dB
high­est side lobe -71.5dB at 3.64$\Delta f$ / -92.0dB at 4.52$\Delta f$
side lobe slope 20dB/decade / 20dB/decade$^2$
notes The Black­man-Har­ris win­dows come main­ly in two fla­vors: a three-term and a four-term sum of cosines. Their coef­fi­cients are designed to min­i­mize side lobe lev­els.
see also Black­man-Har­ris win­dow [Wikipedia]
Black­man-Har­ris win­dow fam­i­ly [J. O. Smith III]

Gaussian Window

Some Gauss­ian win­dows.

$$A_\mathrm{Gauss}(t) =\exp \biggl(-\frac{t^2}{2 \sigma^2}\biggr)$$

$$I_\mathrm{Gauss}(f) = \sqrt{\frac{\pi}{2}}\sigma \exp \bigl(-2 \pi^2 \sigma^2 f^2 \bigr) \Big­gl[ \mathrm{erf} \big­gl( \frac{\frac{1}{2}-2 i f \pi \sigma^2}{\sqrt{2} \sig­ma} \big­gr) + \mathrm{erf} \big­gl( \frac{\frac{1}{2}+2 i f \pi \sigma^2}{\sqrt{2} \sig­ma} \big­gr) \Big­gr]$$

win­dow ener­gy -4.51dB ($\sig­ma = 0.20$) / -3.56dB ($\sig­ma = 0.25$) / -2.82 ($\sig­ma = 0.30$)
main lobe height -8.90dB / -4.46dB / -3.35dB
equiv­a­lent noise BW 2.75$\Delta f$ (4.39dB) / 1.23$\Delta f$ (0.90dB) / 1.13$\Delta f$ (0.53dB)
main lobe FWHM 1.89$\Delta f$ / 1.18$\Delta f$ / 1.08$\Delta f$
first zero 3.20$\Delta f$ / 1.67$\Delta f$ / 1.38$\Delta f$
max­i­mum scal­lop­ing 1.58dB / 2.13dB / 2.54dB
high­est side lobe -43.3dB at 3.65$\Delta f$ / -31.9dB at 2.62$\Delta f$ / -25.0dB at 1.70$\Delta f$
side lobe slope 20dB/decade
notes Bet­ter results may be obtained when the Gauss­ian win­dow is trun­cat­ed (mul­ti­plied) with anoth­er win­dow instead of the box func­tion.
see also

DPSS / Slepian Window

Some DPSS win­dows.


no closed-form apodiza­tion func­tion avail­able

win­dow ener­gy -2.61dB ($\alpha = 1$) / -4.36dB ($\alpha = 2$) / -5.30 ($\alpha = 3$)
main lobe height -3.09dB / -6.02dB / -7.78dB
equiv­a­lent noise BW 1.12$\Delta f$ (0.48dB) / 1.47$\Delta f$ (1.66dB) / 1.77$\Delta f$ (2.48dB)
main lobe FWHM 1.07$\Delta f$ / 1.40$\Delta f$ / 1.68$\Delta f$
first zero 1.35$\Delta f$ / 2.17$\Delta f$ / 3.11$\Delta f$
max­i­mum scal­lop­ing 2.59dB / 1.51dB / 1.05dB
high­est side lobe -22.9dB at 1.69$\Delta f$ / -44.8dB at 2.39$\Delta f$ / -69.7dB at 3.26$\Delta f$
side lobe slope 20dB/decade
notes The dis­crete pro­late spher­oidal sequence win­dow is opti­mized to have max­i­mum ener­gy in its main lobe for a giv­en time-band­width prod­uct. The (real-val­ued) para­me­ter $\alpha$ cor­re­sponds to half this time-band­width prod­uct and also gives the largest DFT bin num­ber that is still inside the main lobe. The win­dow can be obtained with the MATLAB DPSS func­tion. The Kaiser win­dow is an approx­i­ma­tion to the DPSS win­dow using Bessel func­tions. The con­tin­u­ous equiv­a­lent, the Slepi­an win­dow, is described by the first pro­late spher­oidal wave func­tion.
see also Slepi­an or DPSS win­dow [J. O. Smith III]
Kaiser win­dow [J. O. Smith III]
Kaiser win­dow [Wikipedia]

1 Side lobe lev­el is rel­a­tive to main lobe height.

2 Side lobe decrease with this slope starts at about 20$\Delta f$.


  • Andreas wrote:

    Awe­some work! This is a real­ly handy overview, espe­cial­ly since it con­tains prop­er­ties that are not read­i­ly found else­where (like ener­gy in main lobe). Thank you very much!

  • There are many flat-top win­dows. This is the one that “annhi­lates” the deriv­a­tives at zero, but oth­ers are designed to min­i­mize error, for instance.

Post a Comment

Your email is never shared.