Content deleted Content added
→top: Fixed typo Tags: canned edit summary Mobile edit Mobile app edit Android app edit |
m →Ultraspherical window: HTTP to HTTPS for SourceForge |
||
(26 intermediate revisions by 15 users not shown) | |||
Line 10:
== Applications ==
Window functions are used in spectral [[frequency spectrum#spectral analysis|analysis]]/modification/[[Overlap–add method#resynthesis|resynthesis]],<ref name=OLA/> the design of [[finite impulse response]] filters, merging multiscale and multidimensional datasets,<ref>{{Cite journal |last1=Ajala |first1=R. |last2=Persaud |first2=P. |title=Ground-Motion Evaluation of Hybrid Seismic Velocity Models |journal=The Seismic Record|date=2022 |volume=2 |issue=3 |pages=186–196 |doi=10.1785/0320220022 |s2cid=251504921 |doi-access=free |bibcode=2022SeisR...2..186A }}</ref><ref>{{Cite journal |last1=Ajala |first1=R. |last2=Persaud |first2=P. |title=Effect of Merging Multiscale Models on Seismic Wavefield Predictions Near the Southern San Andreas Fault |url=https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2021JB021915 |journal=Journal of Geophysical Research: Solid Earth |date=2021 |language=en |volume=126 |issue=10 |doi=10.1029/2021JB021915 |bibcode=2021JGRB..12621915A |s2cid=239654900 |issn=2169-9313|url-access=subscription }}</ref> as well as [[beamforming]] and [[Antenna (radio)|antenna]] design.
[[File:Spectral_leakage_caused_by_%22windowing%22.svg|thumb|400px|Figure 2: Windowing a sinusoid causes spectral leakage. The same amount of leakage occurs whether there are an integer (blue) or non-integer (red) number of cycles within the window (rows 1 and 2). When the sinusoid is sampled and windowed, its [[discrete-time Fourier transform]] (DTFT) also exhibits the same leakage pattern (rows 3 and 4). But when the DTFT is only sparsely sampled, at a certain interval, it is possible (depending on your point of view) to: (1) avoid the leakage, or (2) create the illusion of no leakage. For the case of the blue DTFT, those samples are the outputs of the [[discrete Fourier transform]] (DFT). The red DTFT has the same interval of zero-crossings, but the DFT samples fall in-between them, and the leakage is revealed.]]
Line 55:
|Some authors limit their attention to this important subset and to even values of N.<ref name=Harris/><ref name=Heinzel2002/> But the window coefficient formulas are still the ones presented here.}}
*The parameter '''B''' displayed on each spectral plot is the function's [[
**See {{Slink|spectral leakage|Discrete-time signals|Some window metrics}} and [[
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.{{efn-la
Line 72:
Other windows are designed to moderate these sudden changes, to reduce scalloping loss and improve dynamic range (described in {{slink||Spectral analysis}}).
The rectangular window is the
The rectangular window provides the minimum mean square error estimate of the [[Discrete-time Fourier transform]], at the cost of other issues discussed.
Line 80:
=== ''B''-spline windows ===
''B''-spline windows can be obtained as ''k''-fold convolutions of the rectangular window. They include the rectangular window itself (''k'' = 1), the {{slink|#Triangular window}} (''k'' = 2) and the {{slink|#Parzen window}} (''k'' = 4).<ref name=Toraichi89/> Alternative definitions sample the appropriate normalized [[B-spline|''B''-spline]] [[basis function]]s instead of convolving discrete-time windows. A ''k''
{{clear}}
Line 86:
[[File:Window function and its Fourier transform – Triangular (n = 0...N).svg|thumb|480px|right|Triangular window (with ''L'' = ''N'' + 1)]]
Triangular windows are given by
:<math>w[n] = 1 - \left|\frac{n - \frac{N}{2}}{\frac{L}{2}}\right|,\quad 0\le n \le N,</math>
where ''L'' can be ''N'',<ref name=Bartlett/> ''N'' + 1,<ref name=Harris/><ref name=Tukey/><ref name=MWtriang/> or ''N'' + 2.<ref name=Welch1967/> The first one is also known as '''[[M. S. Bartlett|Bartlett]] window''' or '''[[Lipót Fejér|Fejér]] window'''. All three definitions converge at large ''N''.
The triangular window is the
{{clear}}
Line 100 ⟶ 99:
{{Distinguish|Kernel density estimation}}
Defining {{math|''L'' ≜ ''N'' + 1}}, the Parzen window, also known as the '''de la Vallée Poussin window''',<ref name=Harris/> is the
:<math>
Line 117 ⟶ 116:
=== Other polynomial windows ===
==== Welch window ====
Line 122:
:<math>w[n]=1 - \left(\frac{n-\frac{N}{2}}{\frac{N}{2}}\right)^2,\quad 0\le n \le N.</math><ref name=Welch1967/>
Alternatively, it can be written as two factors, as in a [[beta distribution]]:
:<math>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.</math>
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|sine window]], and just as the [[#Power-of-sine/cosine windows|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 [[Pearson type II distribution]]s and symmetric [[beta distribution]]s, 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|asymmetric window functions]].
{{clear}}
===
Windows in the form of a cosine function offset by a constant, such as the popular Hamming and Hann windows, are sometimes called raised-cosine windows. The Hann window is particularly like the [[raised cosine distribution]], which goes smoothly to zero at its ends.
The raised-cosine windows have the form:
:<math>w[n] = a_0 - (1-a_0) \cdot \cos\left( \tfrac{2 \pi n}{N} \right),\quad 0\le n \le N,</math>
or alternatively as their zero-phase versions:
:<math>
\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}
</math>
==== Hann window====
{{Main|Hann function}}
[[File:Window function and its Fourier transform – Hann (n = 0...N).svg|thumb|480px|right|Hann window]]
Setting <math>a_0 = 0.5</math> produces a '''Hann window''':
:<math>w[n] = 0.5\; \left[1 - \cos \left ( \frac{2 \pi n}{N} \right) \right] = \sin^2 \left ( \frac{\pi n}{N} \right),</math><ref name=MWhann/>
named after [[Julius von Hann]], and sometimes referred to as ''Hanning'', which derived from the verb "to Hann".{{Citation needed|date=June 2025}} 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 windows|cosine-sum]] and [[#Power-of-sine/cosine_windows|power-of-sine]] families. Unlike the [[#Hann and Hamming windows|Hamming window]], the end points of the Hann window just touch zero. The resulting [[Spectral leakage|side-lobes]] roll off at about 18 dB per octave.<ref name=JOShann/>
==== Hamming window ====
[[File:Window function and frequency response - Hamming (alpha = 0.53836, n = 0...N).svg|thumb|480px|right|Hamming window, ''a''<sub>0</sub> = 0.53836 and ''a''<sub>1</sub> = 0.46164. The original Hamming window would have ''a''<sub>0</sub> = 0.54 and ''a''<sub>1</sub> = 0.46.]]
Setting <math>a_0</math> to approximately 0.54, or more precisely 25/46, produces the '''Hamming window''', proposed by [[Richard W. Hamming]]. This choice places a zero crossing at frequency 5{{pi}}/(''N'' − 1), which cancels the first sidelobe of the Hann window, giving it a height of about one-fifth that of the Hann window.<ref name=Harris/><ref name=Enochson/><ref name=JOSHamming/>
The Hamming window is often called the '''Hamming blip''' when used for [[pulse shaping]].<ref name=sunar/><ref name=sunar2/><ref name=SRD/>
Approximation of the coefficients to two decimal places substantially lowers the level of sidelobes,<ref name=Harris/> to a nearly equiripple condition.<ref name=JOSHamming/> In the equiripple sense, the optimal values for the coefficients are ''a''<sub>0</sub> = 0.53836 and ''a''<sub>1</sub> = 0.46164.<ref name=JOSHamming/><ref name=Nuttall/>
=== Cosine-sum windows ===
This family, which generalizes the [[#Raised-cosine windows|raised-cosine windows]], is also known as
{{Equation box 1
Line 172 ⟶ 176:
In most cases, including the examples below, all coefficients ''a''<sub>''k''</sub> ≥ 0. These windows have only 2''K'' + 1 non-zero ''N''-point DFT coefficients.
==== Blackman window ====
[[File:Window function and its Fourier transform – Blackman (n = 0...N).svg|thumb|480px|right|Blackman window; {{math|1=''α'' = 0.16}}]]
Blackman windows are defined as
:<math>w[n] = a_0 - a_1 \cos \left ( \frac{2 \pi n}{N} \right) + a_2 \cos \left ( \frac{4 \pi n}{N} \right),</math>
:<math>a_0=\frac{1-\alpha}{2};\quad a_1=\frac{1}{2};\quad a_2=\frac{\alpha}{2}.</math>
Line 236 ⟶ 209:
[[File:Window function and frequency response - Blackman-Harris.svg|thumb|480px|right|Blackman–Harris window]]
A generalization of the Hamming family, produced by adding more shifted
:<math>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)</math>
Line 267 ⟶ 240:
Rife–Vincent windows<ref name=Rife/> are customarily scaled for unity average value, instead of unity peak value. The coefficient values below, applied to {{EquationNote|Eq.1}}, reflect that custom.
Class I, Order 1 (''K'' = 1): <math>a_0=1;\quad a_1=1</math> Functionally equivalent to the [[#Hann and Hamming windows|Hann window]] and power of sine ({{math|1=''α'' = 2}}).
Class I, Order 2 (''K'' = 2): <math>a_0=1;\quad a_1=\tfrac{4}{3};\quad a_2=\tfrac{1}{3}</math> Functionally equivalent to the power of sine ({{math|1=''α'' = 4}}).
Class I is defined by minimizing the high-order sidelobe amplitude. Coefficients for orders up to K=4 are tabulated.<ref name=Andria/>
Line 277 ⟶ 250:
Class III is a compromise for which order ''K'' = 2 resembles the {{slink|#Blackman window}}.<ref name=Andria/><ref name=Schoukens/>
{{clear}}
=== Sine window ===
[[File:Window function and frequency response - Cosine.svg|thumb|480px|right|Sine window]]
:<math>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.</math>
The corresponding <math>w_0(n)\,</math> function is a cosine without the {{pi}}/2 phase offset. So the ''sine window''<ref name=Bosi/> is sometimes also called ''cosine window''.<ref name=Harris/> As it represents half a cycle of a sinusoidal function, it is also known variably as ''half-sine window''<ref name=Kido/> or ''half-cosine window''.<ref name=Landisman/>
The [[autocorrelation]] of a sine window produces a function known as the Bohman window.<ref name=MWbohman/>
==== Power-of-sine/cosine windows ====
[[File:Power-of-sine windows.png|thumb|440px|Power-of-sine window functions (left) and their spectra in dB (right), for powers 0, 0.25, 0.5, 1, 2, 4]]
These window functions have the form:<ref name=PowCos/>
:<math>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.</math>
The [[#Rectangular window|rectangular window]] ({{math|1=''α'' = 0}}), the [[#Sine window|sine window]] ({{math|1=''α'' = 1}}), and the [[#Hann and Hamming windows|Hann window]] ({{math|1=''α'' = 2}}) are members of this family.
For even-integer values of {{mvar|α}} these functions can also be expressed in cosine-sum form:
: <math>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)- ...</math>
: <math>\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}</math>
{{clear}}
Line 363 ⟶ 370:
==== DPSS or Slepian window ====
The DPSS (discrete prolate spheroidal sequence) or [[Slepian function]], taper, or window [[Spectral concentration problem|maximizes the energy concentration in the main lobe]],<ref name=Slepian/> and is used in [[multitaper]] spectral analysis, which averages out noise in the spectrum and reduces information loss at the edges of the window.
The main lobe ends at a frequency bin given by the parameter ''α''.<ref name=KaiserDPSS/>
Line 456 ⟶ 463:
where <math>C^{\mu}_{N}</math> is the [[Ultraspherical polynomial]] of degree N, and <math>x_0</math> and <math>\mu</math> control the side-lobe patterns.<ref name=Deczky/>
Certain specific values of <math>\mu</math> yield other well-known windows: <math>\mu=0</math> and <math>\mu=1</math> give the Dolph–Chebyshev and [[Tapio Saramäki|Saramäki]] windows respectively.<ref name=Kabal/> See [
{{clear}}
Line 528 ⟶ 535:
=== Asymmetric window functions ===
The <math>w_0(x)</math> form, according to the convention above, is symmetric around <math>x = 0</math>. However, there are window functions that are asymmetric, such as the [[
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
Line 624 ⟶ 631:
{{cite patent
|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
Line 634 ⟶ 641:
|status=patent
|number=6898235
}}
<ref name=Rorabaugh>
{{cite book
Line 696 ⟶ 701:
<ref name=Kido>
{{cite journal |last1=Kido |first1=Ken'iti |last2=Suzuki |first2=Hideo |last3=Ono |first3=Takahiko |last4=Fukushima |first4=Manabu |date=1998 |title=Deformation of impulse response estimates by time window in cross spectral technique |journal=Journal of the Acoustical Society of Japan
|doi-access=free
}}</ref>
Line 813 ⟶ 818:
<ref name=Starosielec2014>
{{cite journal |last1=Starosielec |first1=S. |last2=Hägele |first2=D. |title=Discrete-time windows with minimal RMS bandwidth for given RMS temporal width |journal=Signal Processing |volume=102 |pages=240–246 |date=2014 |doi=10.1016/j.sigpro.2014.03.033
|bibcode=2014SigPr.102..240S }}</ref>
<ref name=Chakraborty>
Line 868 ⟶ 873:
<ref name=Streit>
{{cite journal |last=Streit |first=Roy |title=A two-parameter family of weights for nonrecursive digital filters and antennas |journal= IEEE Transactions
|url=https://zenodo.org/record/1280988 }}</ref>
Line 986 ⟶ 991:
<ref name=Berry>
{{cite journal |last1=Berry |first1=C.P.L. |last2=Gair |first2=J.R. |title=Observing the Galaxy's massive black hole with gravitational wave bursts |journal=[[Monthly Notices of the Royal Astronomical Society]] |date=12 December 2012 |volume=429 |issue=1 |arxiv=1210.2778 |pages=589–612 |doi=10.1093/mnras/sts360|doi-access=free |bibcode=2013MNRAS.429..589B
|s2cid=118944979 }}</ref>
|