Hann function
The Hann function is named after the Austrian meteorologist Julius von Hann. It is a window function used to perform Hann smoothing or hanning. The function, with length L and amplitude 1/L, is given by: : w_0(x) \triangleq \left\{ \begin{array}{ccl} \tfrac{1}{L}\left(\tfrac{1}{2} + \tfrac{1}{2} \cos \left(\frac{2\pi x}{L} \right) \right) = \tfrac{1}{L}\cos^2 \left(\frac{\pi x}{L}\right),\quad &\left|x\right| \leq L/2\\ 0,\quad &\left|x\right| > L/2 \end{array}\right\}. For digital signal processing, the function is sampled symmetrically (with spacing L/N and amplitude 1 ): : \left . \begin{align} w[n] = L\cdot w_0\left(\tfrac{L}{N} (n-N/2)\right) &= \tfrac{1}{2} \left[1 - \cos \left ( \tfrac{2 \pi n}{N} \right) \right]\\ &= \sin^2 \left ( \tfrac{\pi n}{N} \right) \end{align} \right \},\quad 0 \leq n \leq N, which is a sequence of N+1 samples, and N can be even or odd. It is also known as the raised cosine window, Hann filter, von Hann window, Hanning window, etc.
The Hann function is named after the Austrian meteorologist Julius von Hann. It is a window function used to perform Hann smoothing or hanning. The function, with length L and amplitude 1/L, is given by: w_0(x) \triangleq \left\{ \begin{array}{ccl} \tfrac{1}{L}\left(\tfrac{1}{2} + \tfrac{1}{2} \cos \left(\frac{2\pi x}{L} \right) \right) = \tfrac{1}{L}\cos^2 \left(\frac{\pi x}{L}\right),\quad &\left|x\right| \leq L/2\\ 0,\quad &\left|x\right| > L/2 \end{array}\right\}. For digital signal processing, the function is sampled symmetrically (with spacing L/N and amplitude 1 ): \left . \begin{align} w[n] = L\cdot w_0\left(\tfrac{L}{N} (n-N/2)\right) &= \tfrac{1}{2} \left[1 - \cos \left ( \tfrac{2 \pi n}{N} \right) \right]\\ &= \sin^2 \left ( \tfrac{\pi n}{N} \right) \end{align} \right \},\quad 0 \leq n \leq N, which is a sequence of N+1 samples, and N can be even or odd. It is also known as the raised cosine window, Hann filter, von Hann window, Hanning window, etc. W_0(f) = \frac{1}{2}\frac{\operatorname{sinc}(Lf)}{(1 - L^2f^2)} = \frac{\sin(\pi Lf)}{2\pi L f(1 - L^2f^2)} {{math proof|title=Derivation|proof= Using Euler's formula to expand the cosine term in w_0(x), we can write: w_0(x)= \tfrac{1}{L} \left(\tfrac{1}{2}\operatorname{rect}(x/L) +\tfrac{1}{4} e^{i 2\pi x/L} \operatorname{rect}(x/L) + \tfrac{1}{4}e^{-i 2\pi x/L} \operatorname{rect}(x/L)\right), which is a linear combination of modulated rectangular windows: \tfrac{1}{L} \operatorname{rect}(x/L)\quad \stackrel{\text{Fourier transform}}{\longleftrightarrow}\quad \operatorname{sinc}(Lf) \triangleq \frac{\sin(\pi L f)}{\pi L f}. Transforming each term: \begin{align} W_0(f) &= \tfrac{1}{2}\operatorname{sinc}(Lf) + \tfrac{1}{4} \operatorname{sinc}(L(f-1/L)) + \tfrac{1}{4} \operatorname{sinc}(L(f+1/L))\\ &= \tfrac{1}{2}\frac{\sin(\pi Lf)}{\pi Lf} + \tfrac{1}{4} \frac{\sin(\pi (Lf-1))}{\pi (Lf-1)} + \tfrac{1}{4} \frac{\sin(\pi (Lf+1))}{\pi (Lf+1)}\\ &= \frac{1}{2\pi}\left( \frac{\sin(\pi Lf)}{Lf} -\tfrac{1}{2} \frac{\sin(\pi Lf)}{Lf-1} -\tfrac{1}{2} \frac{\sin(\pi Lf)}{Lf+1}\right)\\ &= \frac{\sin(\pi Lf)}{2\pi}\left(\frac{1}{Lf} +\tfrac{1}{2} \frac{1}{1-Lf} -\tfrac{1}{2} \frac{1}{1+Lf}\right)\\ &= \frac{\sin(\pi Lf)}{2\pi}\cdot \frac{1}{Lf (1-Lf) (1+Lf)} = \frac{1}{2}\frac{\operatorname{sinc}(Lf)}{(1 - L^2f^2)}. \end{align} }} \mathcal{F}\{w[n]\} &\triangleq \sum_{n=0}^{N} w[n]\cdot e^{-i 2 \pi f n}\\ &= e^{-i \pi f N}\left[\tfrac{1}{2} \frac{\sin(\pi(N+1)f)}{\sin(\pi f)} + \tfrac{1}{4} \frac{\sin(\pi(N+1)(f-\tfrac{1}{N}))}{\sin(\pi (f-\tfrac{1}{N}))} + \tfrac{1}{4} \frac{\sin(\pi(N+1)(f+\tfrac{1}{N}))}{\sin(\pi (f+\tfrac{1}{N}))}\right]. \end{align} The truncated sequence \{w[n],\ 0 \le n \le N-1\} is a DFT-even (aka periodic) Hann window. Since the truncated sample has value zero, it is clear from the Fourier series definition that the DTFTs are equivalent. However, the approach followed above results in a significantly different-looking, but equivalent, 3-term expression: \mathcal{F}\{w[n]\} = e^{-i \pi f (N-1)}\left[\tfrac{1}{2} \frac{\sin(\pi N f)}{\sin(\pi f)} + \tfrac{1}{4} e^{-i\pi/N} \frac{\sin(\pi N (f-\tfrac{1}{N}))}{\sin(\pi (f-\tfrac{1}{N}))} + \tfrac{1}{4} e^{i\pi/N} \frac{\sin(\pi N (f+\tfrac{1}{N}))}{\sin(\pi (f+\tfrac{1}{N}))}\right]. An N-length DFT of the window function samples the DTFT at frequencies f = k/N, for integer values of k. From the expression immediately above, it is easy to see that only 3 of the N DFT coefficients are non-zero. And from the other expression, it is apparent that all are real-valued. These properties are appealing for real-time applications that require both windowed and non-windowed (rectangularly windowed) transforms, because the windowed transforms can be efficiently derived from the non-windowed transforms by convolution.
References
- Nuttall 1981 , p 84 (3) Wikipedia revision 1328890910, retrieved 2026-11-19 · retrieved 2026-11-18 · rev 1328890910
Cite this reference
MLA "Nuttall 1981 , p 84 (3) Wikipedia revision 1328890910, retrieved 2026-11-19." 2026-11-18. https://en.wikipedia.org/w/index.php?oldid=1328890910. Accessed 24 November 2026.
Chicago "Nuttall 1981 , p 84 (3) Wikipedia revision 1328890910, retrieved 2026-11-19." 2026-11-18. https://en.wikipedia.org/w/index.php?oldid=1328890910.
APA encyclopegia.org. (2026). Nuttall 1981 , p 84 (3) Wikipedia revision 1328890910, retrieved 2026-11-19. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1328890910
- Nuttall 1981 , p 86 (17) Wikipedia revision 1328890910, retrieved 2026-11-19 · retrieved 2026-11-18 · rev 1328890910
Cite this reference
MLA "Nuttall 1981 , p 86 (17) Wikipedia revision 1328890910, retrieved 2026-11-19." 2026-11-18. https://en.wikipedia.org/w/index.php?oldid=1328890910. Accessed 24 November 2026.
Chicago "Nuttall 1981 , p 86 (17) Wikipedia revision 1328890910, retrieved 2026-11-19." 2026-11-18. https://en.wikipedia.org/w/index.php?oldid=1328890910.
APA encyclopegia.org. (2026). Nuttall 1981 , p 86 (17) Wikipedia revision 1328890910, retrieved 2026-11-19. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1328890910
- Nuttall 1981 , p 85 Wikipedia revision 1328890910, retrieved 2026-11-19 · retrieved 2026-11-18 · rev 1328890910
Cite this reference
MLA "Nuttall 1981 , p 85 Wikipedia revision 1328890910, retrieved 2026-11-19." 2026-11-18. https://en.wikipedia.org/w/index.php?oldid=1328890910. Accessed 24 November 2026.
Chicago "Nuttall 1981 , p 85 Wikipedia revision 1328890910, retrieved 2026-11-19." 2026-11-18. https://en.wikipedia.org/w/index.php?oldid=1328890910.
APA encyclopegia.org. (2026). Nuttall 1981 , p 85 Wikipedia revision 1328890910, retrieved 2026-11-19. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1328890910
- Harris 1978 , p 62 Wikipedia revision 1328890910, retrieved 2026-11-19 · retrieved 2026-11-18 · rev 1328890910
Cite this reference
MLA "Harris 1978 , p 62 Wikipedia revision 1328890910, retrieved 2026-11-19." 2026-11-18. https://en.wikipedia.org/w/index.php?oldid=1328890910. Accessed 24 November 2026.
Chicago "Harris 1978 , p 62 Wikipedia revision 1328890910, retrieved 2026-11-19." 2026-11-18. https://en.wikipedia.org/w/index.php?oldid=1328890910.
APA encyclopegia.org. (2026). Harris 1978 , p 62 Wikipedia revision 1328890910, retrieved 2026-11-19. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1328890910
- The measurement of power spectra from the point of view of communications engineering — Part I · retrieved 2026-11-18 · rev 1328890910
Cite this reference
MLA "The measurement of power spectra from the point of view of communications engineering — Part I." a b Blackman, R. 2026-11-18. https://en.wikipedia.org/wiki/R._B._Blackman. Accessed 24 November 2026.
Chicago "The measurement of power spectra from the point of view of communications engineering — Part I." a b Blackman, R. 2026-11-18. https://en.wikipedia.org/wiki/R._B._Blackman.
APA a b Blackman, R. (2026). The measurement of power spectra from the point of view of communications engineering — Part I. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/R._B._Blackman
- Blackman, R. B. (Ralph Beebe) ; Tukey, John W. (John Wilder) (1959). The measurement of power spectra from the point of view of communications engineering . New York : Dover Publications. pp. 98 . LCCN 59-10185 . {{ cite book }} : CS1 maint: publisher location ( link ) Wikipedia revision 1328890910, retrieved 2026-11-19 · retrieved 2026-11-18 · rev 1328890910
Cite this reference
MLA "Blackman, R. B. (Ralph Beebe) ; Tukey, John W. (John Wilder) (1959). The measurement of power spectra from the point of view of communications engineering . New York : Dover Publications. pp. 98 . LCCN 59-10185 . {{ cite book }} : CS1 maint: publisher location ( link ) Wikipedia revision 1328890910, retrieved 2026-11-19." Blackman, R. 2026-11-18. https://en.wikipedia.org/wiki/Ralph_Beebe_Blackman. Accessed 24 November 2026.
Chicago "Blackman, R. B. (Ralph Beebe) ; Tukey, John W. (John Wilder) (1959). The measurement of power spectra from the point of view of communications engineering . New York : Dover Publications. pp. 98 . LCCN 59-10185 . {{ cite book }} : CS1 maint: publisher location ( link ) Wikipedia revision 1328890910, retrieved 2026-11-19." Blackman, R. 2026-11-18. https://en.wikipedia.org/wiki/Ralph_Beebe_Blackman.
APA Blackman, R. (2026). Blackman, R. B. (Ralph Beebe) ; Tukey, John W. (John Wilder) (1959). The measurement of power spectra from the point of view of communications engineering . New York : Dover Publications. pp. 98 . LCCN 59-10185 . {{ cite book }} : CS1 maint: publisher location ( link ) Wikipedia revision 1328890910, retrieved 2026-11-19. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/Ralph_Beebe_Blackman
- Wideband communication intercept and direction finding device using hyperchannelization · retrieved 2026-11-18 · rev 1328890910
Cite this reference
MLA "Wideband communication intercept and direction finding device using hyperchannelization." US patent 6898235 , Carlin, Joe; Collins, Terry & Hays, Peter et al. 2026-11-18. https://worldwide.espacenet.com/textdoc?DB=EPODOC&IDX=US6898235. Accessed 24 November 2026.
Chicago "Wideband communication intercept and direction finding device using hyperchannelization." US patent 6898235 , Carlin, Joe; Collins, Terry & Hays, Peter et al. 2026-11-18. https://worldwide.espacenet.com/textdoc?DB=EPODOC&IDX=US6898235.
APA US patent 6898235 , Carlin, Joe; Collins, Terry & Hays, Peter et al. (2026). Wideband communication intercept and direction finding device using hyperchannelization. Retrieved November 24, 2026, from https://worldwide.espacenet.com/textdoc?DB=EPODOC&IDX=US6898235
- Essenwanger, O. M. (Oskar M.) (1986). Elements of statistical analysis . Elsevier. ISBN 0444424261 . OCLC 152410575 . Wikipedia revision 1328890910, retrieved 2026-11-19 · retrieved 2026-11-18 · rev 1328890910
Cite this reference
MLA "Essenwanger, O. M. (Oskar M.) (1986). Elements of statistical analysis . Elsevier. ISBN 0444424261 . OCLC 152410575 . Wikipedia revision 1328890910, retrieved 2026-11-19." Essenwanger, O. 2026-11-18. https://en.wikipedia.org/wiki/ISBN_(identifier). Accessed 24 November 2026.
Chicago "Essenwanger, O. M. (Oskar M.) (1986). Elements of statistical analysis . Elsevier. ISBN 0444424261 . OCLC 152410575 . Wikipedia revision 1328890910, retrieved 2026-11-19." Essenwanger, O. 2026-11-18. https://en.wikipedia.org/wiki/ISBN_(identifier).
APA Essenwanger, O. (2026). Essenwanger, O. M. (Oskar M.) (1986). Elements of statistical analysis . Elsevier. ISBN 0444424261 . OCLC 152410575 . Wikipedia revision 1328890910, retrieved 2026-11-19. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/ISBN_(identifier)
- von Hann, Julius (1903). Handbook of Climatology . Macmillan. p. 199 . The figures under b are determined by taking into account the parallels 5° away on either side. Thus, for example, for latitude 60° we have ½[60 + (65 + 55)÷2]. Wikipedia revision 1328890910, retrieved 2026-11-19 · retrieved 2026-11-18 · rev 1328890910
Cite this reference
MLA "von Hann, Julius (1903). Handbook of Climatology . Macmillan. p. 199 . The figures under b are determined by taking into account the parallels 5° away on either side. Thus, for example, for latitude 60° we have ½[60 + (65 + 55)÷2]. Wikipedia revision 1328890910, retrieved 2026-11-19." von Hann, Julius (1903). 2026-11-18. https://archive.org/details/handbookclimato01wardgoog. Accessed 24 November 2026.
Chicago "von Hann, Julius (1903). Handbook of Climatology . Macmillan. p. 199 . The figures under b are determined by taking into account the parallels 5° away on either side. Thus, for example, for latitude 60° we have ½[60 + (65 + 55)÷2]. Wikipedia revision 1328890910, retrieved 2026-11-19." von Hann, Julius (1903). 2026-11-18. https://archive.org/details/handbookclimato01wardgoog.
APA von Hann, Julius (1903). (2026). von Hann, Julius (1903). Handbook of Climatology . Macmillan. p. 199 . The figures under b are determined by taking into account the parallels 5° away on either side. Thus, for example, for latitude 60° we have ½[60 + (65 + 55)÷2]. Wikipedia revision 1328890910, retrieved 2026-11-19. Retrieved November 24, 2026, from https://archive.org/details/handbookclimato01wardgoog
- On the use of Windows for Harmonic Analysis with the Discrete Fourier Transform · retrieved 2026-11-18 · rev 1328890910
Cite this reference
MLA "On the use of Windows for Harmonic Analysis with the Discrete Fourier Transform." Harris, Fredric J. 2026-11-18. http://web.mit.edu/xiphmont/Public/windows.pdf. Accessed 24 November 2026.
Chicago "On the use of Windows for Harmonic Analysis with the Discrete Fourier Transform." Harris, Fredric J. 2026-11-18. http://web.mit.edu/xiphmont/Public/windows.pdf.
APA Harris, Fredric J. (2026). On the use of Windows for Harmonic Analysis with the Discrete Fourier Transform. Retrieved November 24, 2026, from http://web.mit.edu/xiphmont/Public/windows.pdf
- Some aspects of Julius von Hann's contribution to modern climatology · retrieved 2019-06-30 · rev 1328890910
Cite this reference
MLA "Some aspects of Julius von Hann's contribution to modern climatology." a b c Kahlig, Peter (1993), "Some aspects of Julius von Hann's contribution to modern climatology" , in McBean, G. 2019-06-30. https://www.researchgate.net/publication/260824978. Accessed 24 November 2026.
Chicago "Some aspects of Julius von Hann's contribution to modern climatology." a b c Kahlig, Peter (1993), "Some aspects of Julius von Hann's contribution to modern climatology" , in McBean, G. 2019-06-30. https://www.researchgate.net/publication/260824978.
APA a b c Kahlig, Peter (1993), "Some aspects of Julius von Hann's contribution to modern climatology" , in McBean, G. (2019). Some aspects of Julius von Hann's contribution to modern climatology. Retrieved November 24, 2026, from https://www.researchgate.net/publication/260824978
- Smith, Julius O. (Julius Orion) (2011). Spectral audio signal processing . Stanford University. Center for Computer Research in Music and Acoustics., Stanford University. Department of Music. [Stanford, Calif.?]: W3K. ISBN 9780974560731 . OCLC 776892709 . Wikipedia revision 1328890910, retrieved 2026-11-19 · retrieved 2026-11-18 · rev 1328890910
Cite this reference
MLA "Smith, Julius O. (Julius Orion) (2011). Spectral audio signal processing . Stanford University. Center for Computer Research in Music and Acoustics., Stanford University. Department of Music. [Stanford, Calif.?]: W3K. ISBN 9780974560731 . OCLC 776892709 . Wikipedia revision 1328890910, retrieved 2026-11-19." Smith, Julius O. 2026-11-18. https://ccrma.stanford.edu/~jos/sasp/Hann_Hanning_Raised_Cosine.html. Accessed 24 November 2026.
Chicago "Smith, Julius O. (Julius Orion) (2011). Spectral audio signal processing . Stanford University. Center for Computer Research in Music and Acoustics., Stanford University. Department of Music. [Stanford, Calif.?]: W3K. ISBN 9780974560731 . OCLC 776892709 . Wikipedia revision 1328890910, retrieved 2026-11-19." Smith, Julius O. 2026-11-18. https://ccrma.stanford.edu/~jos/sasp/Hann_Hanning_Raised_Cosine.html.
APA Smith, Julius O. (2026). Smith, Julius O. (Julius Orion) (2011). Spectral audio signal processing . Stanford University. Center for Computer Research in Music and Acoustics., Stanford University. Department of Music. [Stanford, Calif.?]: W3K. ISBN 9780974560731 . OCLC 776892709 . Wikipedia revision 1328890910, retrieved 2026-11-19. Retrieved November 24, 2026, from https://ccrma.stanford.edu/~jos/sasp/Hann_Hanning_Raised_Cosine.html
Cite this article
MLA
"Hann function." encyclopegia.org, 2025, https://encyclopegia.org/wiki/hann-function. Accessed 24 November 2026.
Chicago
"Hann function." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/hann-function.
APA
encyclopegia.org. (2025). Hann function. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/hann-function
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON