Window Functions Reference

This page is a com­pan­ion ref­er­ence to the posts Win­dows of Oppor­tu­nity and Win­dows of Oppor­tu­nity – 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­ited to three exam­ple win­dow func­tions (also called apodiza­tion func­tions). This page is intended to serve solely as a ref­er­ence for com­par­i­son of a num­ber of other 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 visual 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 energy, instru­ment func­tion shape, main lobe height and frac­tion of total energy $E$ con­tained therein ($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 given. Since the win­dow func­tion usu­ally itself is just a seg­ment of an infi­nitely extended func­tion, it must be bounded. 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 actual shape of the win­dow and is given 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-normalized apodiza­tion func­tion $A(t / T)$ is then, accord­ing to Fourier trans­form rules, $T \cdot I(f \cdot T)$.

The fre­quency axis is divided into DFT bins which are sep­a­rated by $\Delta f = T^{-1}$. For the nor­mal­ized func­tions, $\Delta f = 1$. Alias­ing effects due to finite time-resolution sam­pling, which make the instru­ment func­tion depen­dent on the num­ber of time sam­ples within the win­dow, are not con­sid­ered.

Box / Rec­tan­gu­lar Win­dow

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 energy 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 dynamic range. Used for detect­ing strong sig­nals that are spec­trally close.
see also rec­tan­gu­lar win­dow [J. O. Smith III]

Hann Win­dow

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 energy -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 (wrongly) 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 dynamic range. The first side lobe is still some­what high, but their slope is steep. The power-of-cosine win­dow fam­ily is a gen­er­al­iza­tion of the Hann win­dow with arbi­trar­ily steep side lobe slope.
see also Hann win­dow [J. O. Smith III]
Power-of-Cosine win­dow fam­ily [J. O. Smith III]

Flat-top Win­dow

The flat-top win­dow.

$$\begin{gather}
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
\end{gather}$$

win­dow energy -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 dynamic range, but poor res­o­lu­tion, and is thus used to accu­rately 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

Ham­ming Win­dow

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 energy -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­rower 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­cantly smaller than that of the Hann win­dow. It has a medium dynamic range. The coef­fi­cients of the apodiza­tion func­tion may be slightly dif­fer­ent depend­ing on the author.
see also Ham­ming win­dow [J. O. Smith III]

Blackman-Harris Win­dow

The Blackman-Harris win­dows.

$$\begin{gather}
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
\end{gather}$$

win­dow energy -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 Blackman-Harris win­dows come mainly 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 Blackman-Harris win­dow [Wikipedia]
Blackman-Harris win­dow fam­ily [J. O. Smith III]

Gauss­ian Win­dow

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) \Biggl[ \mathrm{erf} \biggl( \frac{\frac{1}{2}-2 i f \pi \sigma^2}{\sqrt{2} \sigma} \biggr) + \mathrm{erf} \biggl( \frac{\frac{1}{2}+2 i f \pi \sigma^2}{\sqrt{2} \sigma} \biggr) \Biggr]$$

win­dow energy -4.51dB ($\sigma = 0.20$) / -3.56dB ($\sigma = 0.25$) / -2.82 ($\sigma = 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­cated (mul­ti­plied) with another win­dow instead of the box func­tion.
see also

DPSS / Slepian Win­dow

Some DPSS win­dows.

 

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

win­dow energy -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 energy in its main lobe for a given time-bandwidth prod­uct. The (real-valued) para­me­ter $\alpha$ cor­re­sponds to half this time-bandwidth 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 Slepian win­dow, is described by the first pro­late spher­oidal wave func­tion.
see also Slepian or DPSS win­dow [J. O. Smith III]
Kaiser win­dow [J. O. Smith III]
Kaiser win­dow [Wikipedia]

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

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

One Comment

  • Andreas wrote:

    Awe­some work! This is a really handy overview, espe­cially since it con­tains prop­er­ties that are not read­ily found else­where (like energy in main lobe). Thank you very much!

Post a Comment

Your email is never shared.