Content deleted Content added
No edit summary |
→References: +link |
||
(37 intermediate revisions by 16 users not shown) | |||
Line 1:
{{Short description|Mathematical function used in signal processing}}
[[File:Window function and its Fourier transform – Hann (n = 0...N).svg|thumb|480px|right|Hann function (left), and its frequency response (right)]]
The '''Hann function'''
:<math>
w_0(x) \triangleq \left\{
\begin{array}{ccl}
\tfrac{1}{
0,\quad &\left|x\right| > L/2
\end{array}\right\}.
</math> {{efn-la |[[#Nuttall|Nuttall 1981]], p 84 (3)}}
For [[digital signal processing]], the function
:<math>
\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}
Line 21:
</math>
which is a sequence of <math>N+1</math> samples, and <math>N</math> can be even or odd. (see {{slink|List of window functions|Hann and Hamming windows|nopage=y}}) It is also known as the '''raised cosine window''', '''Hann filter''', '''von Hann window''', etc.<ref name=Kahlig/><ref name=Smith/>
== Fourier transform ==
[[File:
The [[Fourier transform]] of <math>w_0(x)</math> is given by:
:<math>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> {{efn-la
|[[#Nuttall|Nuttall 1981]], p 86 (17)
}}
{{math proof|title=Derivation|proof=
Using [[Euler's formula]] to expand the cosine term in <math>w_0(x),</math> we can write''':'''
:<math>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),</math>
which is a linear combination of modulated [[Rectangular_function|rectangular windows]]''':'''
:<math>\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}.</math>
Transforming each term''':'''
:<math>\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}</math>
}}
== Discrete transforms ==
The [[Discrete-time Fourier transform]] (DTFT) of the <math>N+1</math> length, time-shifted sequence is defined by a Fourier series, which also has a 3-term equivalent that is derived similarly to the Fourier transform derivation''':'''
:<math>
Line 49 ⟶ 65:
</math>
:<math>\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].</math>
An ''N''-length DFT of the window function samples the DTFT at frequencies <math>f = k/N,</math> for integer values of <math>k.</math> 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 [[Discrete Fourier transform#Convolution theorem duality|convolution]].<ref
|[[#Nuttall|Nuttall 1981]], p 85
}}{{efn-la
|[[#Harris|Harris 1978]], p 62
}}
== Name ==
The function is named in
==See also==
Line 63 ⟶ 83:
* [[Apodization]]
* [[Raised cosine distribution]]
* [[Raised-cosine filter]]
== Page citations ==
{{notelist-la|1}}
==References==
{{reflist|refs=
<ref name=Essenwanger>
{{Cite book|title=Elements of statistical analysis|last=Essenwanger, O. M. (Oskar M.)|date=1986|publisher=Elsevier|isbn=0444424261|oclc=152410575}}
</ref>
<ref name=Harris>
{{cite journal|ref=Harris|last=Harris|first=Fredric J.|date=Jan 1978|title=On the use of Windows for Harmonic Analysis with the Discrete Fourier Transform|url=http://web.mit.edu/xiphmont/Public/windows.pdf|journal=Proceedings of the IEEE|volume=66|issue=1|pages=51–83|citeseerx=10.1.1.649.9880|doi=10.1109/PROC.1978.10837|quote=The correct name of this window is 'Hann.' The term 'Hanning' is used in this report to reflect conventional usage. The derived term 'Hann'd' is also widely used.}}
</ref>
<ref name=Blackman>
{{Cite journal|last=Blackman|first=R. B.|author-link=R. B. Blackman|last2=Tukey|first2=J. W.|date=1958|title=The measurement of power spectra from the point of view of communications engineering — Part I|journal=The Bell System Technical Journal|volume=37|issue=1|pages=273|doi=10.1002/j.1538-7305.1958.tb03874.x|issn=0005-8580}}
</ref>
<ref name=Blackman2>
{{Cite book|url=https://archive.org/details/TheMeasurementOfPowerSpectra|title=The measurement of power spectra from the point of view of communications engineering|last=Blackman|first=R. B. (Ralph Beebe)|author-link=Ralph Beebe Blackman|last2=Tukey|first2=John W. (John Wilder)|date=1959|publisher=New York : Dover Publications|pages=[https://archive.org/details/TheMeasurementOfPowerSpectra/page/n58 98]|lccn=59-10185}}
</ref>
<ref name=Kahlig>
{{Citation|last=Kahlig|first=Peter|chapter=Some aspects of Julius von Hann's contribution to modern climatology|date=1993|chapter-url=https://www.researchgate.net/publication/260824978|volume=75|pages=1–7|editor-last=McBean|editor-first=G.A.|publisher=American Geophysical Union|language=en|doi=10.1029/gm075p0001|isbn=9780875904665|quote=Hann appears to be the inventor of a certain data smoothing procedure, now called "hanning" ... or "Hann smoothing" ... Essentially, it is a three-term moving average (running mean) with unequal weights (1/4, 1/2, 1/4).|access-date=2019-07-01|editor2-last=Hantel|editor2-first=M.|title=Interactions Between Global Climate Subsystems: The Legacy of Hann|series=Geophysical Monograph Series}}
</ref>
<ref name=Smith>
{{Cite book|url=https://ccrma.stanford.edu/~jos/sasp/Hann_Hanning_Raised_Cosine.html|title=Spectral audio signal processing|last=Smith, Julius O. (Julius Orion)|date=2011|publisher=W3K|others=Stanford University. Center for Computer Research in Music and Acoustics., Stanford University. Department of Music.|isbn=9780974560731|location=[Stanford, Calif.?]|oclc=776892709}}
</ref>
<ref name=Carlin>
{{cite patent
|ref=refCarlin
|title=Wideband communication intercept and direction finding device using hyperchannelization
|invent1=Carlin,Joe
|invent2=Collins,Terry
|invent3=Hays,Peter
|invent4=Hemmerdinger,Barry E. Kellogg,Robert L. Kettig,Robert L. Lemmon,Bradley K. Murdock,Thomas E. Tamaru,Robert S. Ware,Stuart M.
|pubdate=1999-12-10
|fdate=1999-12-10
|gdate=2005-05-24
|country=US
|status=patent
|number=6898235
}}, <!--template creates link to worldwide.espacenet.com-->
also available at https://patentimages.storage.googleapis.com/4d/39/2a/cec2ae6f33c1e7/US6898235.pdf
</ref>
<ref name=Hann>
{{Cite book |last=von Hann |first=Julius |url=https://archive.org/details/handbookclimato01wardgoog |page=[https://archive.org/details/handbookclimato01wardgoog/page/n219 199] |title=Handbook of Climatology |date=1903 |publisher=Macmillan |language=en |quote=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].}}
</ref>
}}
{{refbegin}}
#<li value="9">{{cite journal
|ref=Nuttall
| doi =10.1109/TASSP.1981.1163506
| last =Nuttall
| first =Albert H.
| title =Some Windows with Very Good Sidelobe Behavior
| journal =IEEE Transactions on Acoustics, Speech, and Signal Processing
| volume =29
| issue =1
| pages =84–91
| date =Feb 1981
| url =https://zenodo.org/record/1280930
}}
{{refend}}
== External links ==
|