|WikiProject Mathematics||(Rated C-class, Low-importance)|
|WikiProject Statistics||(Rated C-class, Low-importance)|
- 1 Incorrectness
- 2 Comparison Table
- 3 Scalloping loss
- 4 All about frequency analysis?
- 5 DFT-even vs. Matlab
- 6 The Comparison Graph
- 7 confusing wording
- 8 Bartlett/Triangle Window
- 9 Gauss window
- 10 Tighter format?
- 11 PNG and SVG plots
- 12 Request for revision
- 13 Questions
- 14 Definitions
- 15 Noise bandwidth
- 16 The Example Images for all the filters should be larger.
- 17 periodicity of window functions
- 18 Practical Recommendation When Using Hann Window
- 19 Fixed a couple formulas
- 20 Specific goals
- 21 Merge separate Hann function page
- 22 diagram
- 23 the Applications section
- 24 flat top function
- 25 Tukey function definition
- 26 Frequency response graphs should have the same scale
- 27 Added OLA-Hann window in Other Windows
- 28 Unnecessary complexity with the definition of N
- 29 conversion to "vector graphics"
- 30 Two-dimensional window, separability error
- 31 Frequency response
- 32 List of window functions
- 33 Missing argument for \frac
- 34 Absurd Gaussian window clipping
- 35 Missing factor in Dolph-Chebyshev window
- 36 Dolph-Chebyshev window: no context for comment about discontinuities at the window edges
- 37 Conflicting definitions of triangular window
- 38 Dolph–Chebyshev window: I have a curiousity motivated question
- 39 Further Reading
- 40 Planck-taper
- 41 FFT of the Window functions
Let's start with the very first sentence: The Fourier transform of the function: is zero, except at frequency .
For flip's sake, this is a completely inappropriate function to mention because is NOT lebesgue integrable on the real line. If you actually go and read the page on fourier analysis, you will discover that fourier transforms are only defined on L1 functions. I would delete the paragraph, but as everyone would probably then misunderstand my point completely, I thought I'd just write it here. Can't you do any better? —Preceding unsigned comment added by 18.104.22.168 (talk) 15:28, 7 August 2008 (UTC)
- Despite that technicality, it is extremely common for textbooks to refer to the Fourier transform of sinusoids. That's really all the justification required for Wikipedia to do the same. And if you read on past Fourier analysis, to Fourier_series#Fourier series on a general interval [ab], you will discover the reason.
- --Bob K (talk) 20:33, 7 August 2008 (UTC)
Well, it is true that cannot be integrated over t into a classic function; however, people had been using this sum for decades, especially in quantum mechanics, sometimes with confusing demonstrations. However, "Distribution theory" from French mathematician Laurent Schwartz clarified this point in the 50's: it postulates an extension of the set of usual functions to include mathematical strange things such as the "Dirac distribution", that could be considered zero everywhere but at f=0, and the measure of which (i.e. the area) is 1. This integration precisely produces this distribution.
Square integrable does not imply "that the function goes sufficiently rapidly toward zero." One can construct L2 functions (i.e. square integrable) that grow very large and are even continuous. I would suggest to remove that part of the sentence and stop after square integrable. — Preceding unsigned comment added by 22.214.171.124 (talk) 12:15, 18 December 2013 (UTC)
- Doesn't a window need to be absolutely integrable? Something like a sinc function or a that goes too slowly to zero, that is square integrable but not absolute integrable, does not make a usable window, does it?
- FWIW, I don't know the answer, and don't care. If there is a WP:TOO_ACADEMIC card, this is a good place to play it, because in my 4 decades of using window functions, it's not something I ever worried about. And I have no scars to show for it. The "more general definition" is not sufficiently justified. It should be deleted, until its practical value can be convincingly demonstrated.
- --Bob K (talk) 04:41, 21 December 2013 (UTC)
this article is in dire need of a big comparison table that summarizes the key metrics of the various window functions. the comparison table should be similar to table 1 in the seminal article by harris "on the use of windows", page 5. see article, which is linked in the references.
The paragraph about scalloping loss seems to refer to a figure that isn't there. Sdrpyh 06:23, 14 February 2007 (UTC)
- It's just as Bob K wrote it on 18 December 2005, this diff. The figure above is still the same "zoom view" figure in the previous subsection. I find it a bit confusing, too. Dicklyon 06:30, 14 February 2007 (UTC)
All about frequency analysis?
In this article, it sounds like windowing's only use is in frequency analysis, as for example I am using it for making a windowed-sync FIR filter, and in this case the use of a window function (i chose the Blackman one) is to avoid riple in the frequency response of the FIR filter kernel. --SuperBleda 15:27, 19 August 2005 (UTC)
I still don't know, what is a window function? --anon
Whoever redid this, it's much much better now. 126.96.36.199 13:59, 7 April 2006 (UTC)
- I can't claim all the credit, but I did a lot of it. So on behalf of the whole team... thanks! --Bob K 07:18, 10 April 2006 (UTC)
DFT-even vs. Matlab
I'm a bit puzzled as to why the window functions given were not put in "DFT-even" form ( /N rather than /(N-1)). The reason to use "DFT-even" windows is covered in one of the articles's references. See pg 52 of the following:
Frederic J. Harris, On the use of Windows for Harmonic Analysis with the Discrete Fourier Transform, Proceedings of the IEEE, Vol.66, No.1, January 1978, pp 51-83.
--SAMerritt 10 May 2006
- I had the same question when I first arrived at this article. What I subsequently discovered is that Matlab defines the windows the way it's done here, not the "DFT-even" way. That seemed like a good enough reason to leave it as is. But in spite of that, I was the one who added the classic F.J.Harris reference, for historical reasons, if nothing else. --Bob K 04:03, 10 May 2006 (UTC)
I agree some work needs to be done here. Looking at the Matlab documentation, Matlab can return either a "periodic" window or a "symmetric" window. Symmetric is the default; they say it is more appropriate for filter construction while the periodic form is more appropriate for spectral analysis. (There seems to be agreement on this; see "periodicity of window functions" below.) Numerical Recipes (3rd edition) doesn't discuss the distinction but (in chapter 13 on spectral applications) uses the periodic form where n goes from 0 to N-1 and the window has a zeroes at 0 and N. I'm not sure if Matlab's "periodic" or "symmetric" terminology is broadly accepted; ideally this page should describe them both and provide some guidance on how to choose between them. (I may try to take a stab at this later.)
- A simple and effective practice is to always use an odd value of N (as we have defined it). For an FIR filter, keep all N coefficients. For an FFT window, discard one of the endpoints (which gets a virtual replacement by periodicity). The advantage of the odd-length FIR is that its delay is (N-1)/2, which is an integer number of samples. In terms of the description at the Matlab documentation, I would use hann(L,'periodic') for my FFT window and hann(L+1,'symmetric') for my FIR, where L is even in both cases. The only difference is one more coefficient in the FIR than the window.
- --Bob K (talk) 11:56, 26 July 2011 (UTC)
The Comparison Graph
The comparison graph is great. The logarithmic frequency axis (in units of "DFT bins") is an excellent idea. It would also be helpful to label the axes. --Bob K 00:17, 10 September 2006 (UTC)
SUGGESTION: Please add a similar time-domain comparison of step-response, and maybe a table of statistics from that graph such as %-overshoot, group-delay, settling-time (to 1%, 0.5%, 0.1%). ALSO maybe add a step-response to each of the graphs in the "Window examples" section above. -- citizenDAK —The preceding unsigned comment was added by 188.8.131.52 (talk • contribs).
- What does that mean? What is the step response of a window function? Dicklyon 22:29, 3 July 2007 (UTC)
- Step response is (in summary) a way to see + compare important characteristics like the TRANSITION-DELAY or SETTLING-TIME and the RINGING or OVERSHOOT of a filter (a Window function *IS* a kind of FIR digital filter, commonly called a "moving average"). (Try a search-engine for "step response DSP window" for more info... One good example I just found is slide 10 of this Intro to Digital Filters PDF-file.) -- citizenDAK
- Yes, I know about filters and step responses; but in what sense is a window usefully viewed as a filter? It's not convolved with an input, so it's not being used as a moving-average filter. If it were, its step response would have no overshoot, since windows are non-negative. They would all look very similar, sort of like the windows themselves. Maybe you can compute one of what you have in mind and show us. Dicklyon 19:23, 9 July 2007 (UTC)
Can someone change this? In the third sentence of the following excerpt, it is unclear what "they" refers to (does it refer to window functions with low dynamic range, or window functions with poor resolution?): "This characteristic is sometimes described as low dynamic range. At the other extreme of dynamic range are the windows with the poorest resolution. And they are also poorest in terms of sensitivity." Lavaka 06:08, 8 January 2007 (UTC)
- Yes, very. I believe I have fixed it correctly, but I invite others to check me. Dicklyon 06:30, 8 January 2007 (UTC)
Can someone check the equation for the triangle window? I've normally seen it as 1-abs((n-.5N)/.5N), or equivalently 1-abs((2n-N)/N). This page shows 1-abs((2n-N+1)/N)
Kelauder 06:05, 2 April 2007 (UTC)Kevin
- It's easy enough to verify by inspection that at the defined end indices of 0 and N-1 the values of the Barlett are 0 and of the triangle are 1/N; that is, the formulas work as expected. Your formula would work if the range was defined from 0 to N for Bartlett, or 1 to N-1 for triangle. But it's not. Dicklyon 06:35, 2 April 2007 (UTC)
- I have made a correction to the equation for Triangle Window with non-zero endpoints. The new equation obeys the property that the next point outside the window on each side, following the same slope, would be zero, i.e., w(-1) = w(N) = 0. Note that Matlab's (184.108.40.2065) triang function for Odd N is equivalent to the equation I have placed on Wikipidia. For even N, it is my belief that Matlab's implementation is "incorrect", because the equation in their documentation does not exhibit the property w(-1) = w(N) = 0, and because it seems unnecessarily complicated to use a different equation for N even than for N odd. Perhaps The MathWorks has some other rationale for preferring their definition -- I will take that up with them separately.--Rtbehrens (talk) 20:15, 6 March 2012 (UTC)
In the provided plots, I was suprised to see that the Gauss window in the Fourier doimain does seem to have sidelobes. This should not be the case though as the FT of a Gauss function is again Gauss. —The preceding unsigned comment was added by 220.127.116.11 (talk) 08:33, 17 April 2007 (UTC).
- Read (or re-read) the part about spectral leakage. A Gauss function has infinite duration. A Gauss window does not.
- --Bob K 11:24, 17 April 2007 (UTC)
What do you think of my "tighter format" edit? I can do the same on the next section, but it might run into problems for narrow browser windows with its longer equations. Any other good suggestions for how to format this without wasting tons of white space? I also like the tight way because it's so much easier to look at several equations at once to compare them. Dicklyon 20:03, 3 June 2007 (UTC)
The tighter format is also what I chose (e.g. http://en.wikipedia.org/w/index.php?title=Window_function&direction=prev&oldid=31779771).
--Bob K 21:30, 3 June 2007 (UTC)
- OK, I'll do it. I see the "left" format was contributed by an anon. Dicklyon 23:20, 3 June 2007 (UTC)
PNG and SVG plots
mmm... how can you say that "The .png files have better resolution?, no bit-map picture can have higher resolution than a vector image! I have noticed that unfortunately I have lost the grid in the SVG generation and I couldn't fix it, but the grid is not necessary in this context. Alessio Damato 21:07, 26 October 2007 (UTC)
Request for revision
I think that this article is lacking in having a specification for how a window is applied (which would hopefully include an explicit equation). Also a non-technical intro about what windowing is used for, and why. Melcombe (talk) 08:53, 4 April 2008 (UTC)
- Two+ years later, I must plead for the same. I read the upper sections of the article over and over, but still have no idea WHY windows are used. The article just says they used in particular applications, and goes on to describe the (apparently deleterious?) effects that applying a window has. It never explains the impetus for using them in the first place. Meanwhile I will repair some of the flaccid verbiage in the parts I do understand. Strebe (talk) 19:25, 10 August 2010 (UTC)
Is there a terminology describing calculating two windows and using the best features of each?
I will be writing a "dual window FFT/IFFT" (basicly two seperate functions ran in sequence on the same data) that will calculate and use both "Low-resolution (high-dynamic-range) windows" and "High-resolution windows" (to use the terminology of this page) in order to provide (the FFT portion) a spectrum with high dynamic range and high resolution, and (the IFFT portion) a reproduction of the input wave with a low loss of residuals.
I've tried searching for any programs or papers describing (what would seem to be) this simple idea but there seems to be no information on this subject.
- I'm not sure I would put it here anyway. For instance the Welch method uses window functions, but it is described in a separate article.
- Also not sure why you need to "reproduce the input wave". Don't you already have it? And what does that have to do with this article?
- --Bob K (talk) 02:45, 3 June 2008 (UTC)
It is good to see that start has been made with provoding some proper definitions. But .... (and this may differ between fields of application) ... isn't there a need to start with a definition of the time-period over which a time-signal is defined, possibly called a data-window, and then define the window function as producing a new time-signal, possibly over a different data-window. Mathematically it might be convenient to define time-signals as zero outside a data-window but the exact definition of a data-window can radically affect the outcome of data-processing (eg application of discrete-time FFTs.). Melcombe (talk) 09:11, 11 August 2008 (UTC)
- I don't really understand what you're trying to say. But I always think of signals (including windows) as functions defined on the entire real line. --Drizzd (talk) 14:21, 12 August 2008 (UTC)
Besides that fact that the formula
applies to filtering applications (which is not the subject of the article), it also assumes real-valued, continuous-time I/O, which is not the main point of the article either. It is well-intentioned, but not sufficient. Let's either remove it or caveat its relevance and add the other necessary cases (especially complex-valued, discrete-time data). I.e., if it's worth doing, it's worth doing right.
But this particular subject, with the associated math, could distract from the main points that follow. It's a relatively unimportant (but interesting) detail. If done right, I think it deserves it's own article with a link from this one.
The Example Images for all the filters should be larger.
You can't read them at the current state without zooming-in (but this requires 2 clicks: one on the image, then one on "Full resolution"). I think this is important, as on aspect of the filtering is how much they filter the signal (-50dB, -100dB etc), so two images might look almost the same, but if you look at the scale, you will see that one filter actually suppresses side-lobes by -50dB the other by -80dB. I tried to increase the images to 400px (just in the sandbox), but then the thumb-text underneath goes away... perhaps someone with better knowledge on how formatting images could do the reformatting? Kusmi (talk) 08:07, 9 December 2008 (UTC)
- It actually takes me 3 clicks, because my screen is 1024 wide, and the figures are about 1040-1050. The Wikipedia instructions say to always upload the full resolution. And that, of course, is because the article can use "thumbnails" to compress it. Anyhow, this is how to do what you suggest (see below). It's not the standard Wikipedia way of handling large images.
- The general instructions for images are here:
- --Bob K (talk) 13:39, 9 December 2008 (UTC)
[[Image:Window_function_(blackman).png|frame|none|Blackman window; α = 0.16; B=1.73]]
periodicity of window functions
IMHO, in order to minimise artifacts when calculating the DTFT of a finite time series of length N (0<=n<=N-1), it is recommended that 1.) both the signal and the window function are periodic with N, 2.) the window function as well as its first and second derivatives take a value of zero at n=0. At least, that's what I was taught 20 years ago by H.-P. Harjes, a German Geophysicist, whose lessons roughly followed the book of M. Bath, Spectral Analysis in Geophysics, Elsevier, Amsterdam 1974. In the present version of the text, the window functions introduce a double zero for n=N-1 and n=N.
- If by n=N you mean n=0, yes some of them are zero at n=0 and n=N-1. And others are not. That is addressed in the 3rd bullet of section Window_function#Window_examples. I think you are agreeing with that bullet.
- --Bob K (talk) 23:23, 5 February 2009 (UTC)
I found a significiantly higher "background noise level" when comparing the results of a DTFT calculated with a double-zero window function to that obtained using a single-zero WF. I thus would recommend to change the denominator N-1 in the corresponding formulae to N instead of providing the somewhat non-binding comment on that point. Regards Georg Morscher schorsch (talk) 21:06, 5 February 2009 (UTC)
Practical Recommendation When Using Hann Window
When using Hann windows for signal processing, better to use the form 0.5*[1-cos(2pi*[n+1]/(N+1))]
This squeezes an extra two points of size into the window, for free(ish). The DFT-even form also adds two non-zero points, but only one effective point of added width (while preserving many other esoteric properties, like an average window amplitude independent of N). —Preceding unsigned comment added by Kristo Miettinen (talk • contribs) 19:58, 27 April 2009 (UTC)
- I agree that in practice that's the best thing to do. But the article also has a goal of introducing windows to newbies with minmal distracting details. In that spirit, there is a benefit to limiting the differences between formulas to just the ones that are unavoidable. For those who are going to go on and generate a window, we have the caveat about zero-valued coefficients and widening the window to prevent it. IMO, that's a good compromise.
- --Bob K (talk) 21:58, 27 April 2009 (UTC)
Fixed a couple formulas
I noticed that the formula for the Hamming window was not the standard one, but seemed instead to be a modification that is sometimes suggested under another name. I put the Hamming window formula into a standard form. I also decompiled the factor of out of the parameter for the Kaiser window formula, so this way the parameter will be more in line with the literature where a reasonable value is around 3. 08:36, 28 April 2009 (UTC) —Preceding unsigned comment added by Safulop (talk • contribs)
It seems that many of these windows were created to solve a specific problem. Can you describe this problem and the derivation in each section? —Preceding unsigned comment added by 18.104.22.168 (talk) 07:00, 30 November 2009 (UTC)
Merge separate Hann function page
Of all the types of windowing functions only two have their own page, the Hann function and the Kaiser window. Of the two the Hann function does not provide any further useful information than is available in this page, and what is there is mostly incorrect or unclear. In its current state I think it's not that useful to have the Hann function as a separate page, until it is expanded upon perhaps it should be removed? Nonnumquam (talk) 07:39, 30 November 2009 (UTC)
the Applications section
There are numerous problems with this section. It is redundant with information elsewhere (and previously) in the article. It is not in a logical position within the article. And some of it is just nonsense, for instance "the ideal frequency response of a window is a Dirac delta function, as that results in the frequency response of the FIR filter being identical to that of the IIR filter". Deletion is necessary. Rewrite is optional. I'm happy to do the deletion, but not the rewrite.
- I agree, so I took it out, and reorganized the following sections as subsections. There may be some recoverable bits in there if anyone wants to work on that. Dicklyon (talk) 23:15, 14 December 2009 (UTC)
flat top function
The "flat top" function that is mentioned here requires references.
Moreover it is not normalized.
Therefore, its present use to design a FIR will require a multiplication by a constant.
Because of its form, the way to normalize it is to choose ak coefficients so that their sum is one.
- It is already normalized (in the now referenced form) so that the integral over it is 1 (from the constant term, the cosine terms do not contribute). Or should it be normalized to peak value = 1 instead? I found a Max Planck Institute technocal report reference (Heinzel G, R?udiger A and Schilling R, 2002) for the flat top window and changed a4 to 0.028 accordingly. This only improved the frequency spectrum, so the previous value was probably in error. The source also gives a value for B for flat top, and other windows, I'll check if more of them can be harvested from it. The current practice to calculate B ourselves is somewhat suspect. Olli Niemitalo (talk) 08:25, 10 February 2013 (UTC)
Tukey function definition
I found it vexing that the Tukey function seemed to be the only function defined from -N/2 to N/2. Even the graph to the right of the function definition appears to plot it from 0 to N. I thought it would be more clear define it from 0 to N as it is in the other window functions and in the Matlab reference. Also, I realize now that there was nothing wrong with the original definition, just that it was defined on a different interval. Cheers. Ebmi (talk) 05:36, 28 September 2010 (UTC)
Frequency response graphs should have the same scale
Frequency response graphs (in orange) do not have the same scale: some are from -60dB to 0 ; others are from -100dB to 0 and even others are from -120dB to 0. It is thus very difficult to compare them quickly. I suggest all the graphs to be redrawn using the same scale. —Preceding unsigned comment added by 22.214.171.124 (talk) 14:17, 18 November 2010 (UTC)
- The problem is that the scale is not visible on small graphs, and it leads to the false impression that some windows are almost identical whereas it is not the case at all. I suggest: either to make the scale visible on small pictures ; either make them all with the same scale. By the way, an harmonization is needed, because some frequency response graphs are in svg format and others are in png. --126.96.36.199 (talk) 12:51, 14 December 2010 (UTC)
- I agree about the harmonization. A couple of editors started replacing png links with svg links, but they only did about four and lost interest. And the svg versions do not preserve the grid lines. The png links should still work, so one of us should restore them.
- Regarding the scale variations, my opinion is that it's good the way it is, since there is also a fixed-scale comparison graph. The "small pictures" are only intended to serve as icons. Drawing conclusions from icons is certainly risky, but that's to be expected.
- --Bob K (talk) 20:46, 15 December 2010 (UTC)
- I made new images that address the raised issues. The amplitude scale is now different only for the flat top window which is really funky anyhow compared to others. Olli Niemitalo (talk) 19:24, 9 February 2013 (UTC)
Added OLA-Hann window in Other Windows
This article seems extremely well written, so the addition I've made likely needs to be improved. Advice welcome. Full disclosure: I am the inventor of the OLA-Hann window technique, but only work in this area as a hobby.WaywardGeek (talk) 12:41, 24 December 2010 (UTC)
- If I understand correctly, you add a pair of 50% overlapped Hann windows, so you get a cosine-tapered window, flat in the middle, 50% longer than the Hann windows that it's based on (your article says 2X longer, which I don't get). Anyway, though it may be a novel and useful window, it's really not appropriate to report it in wikipedia until after you get it published in what we can cite as a WP:RS. Dicklyon (talk) 18:11, 24 December 2010 (UTC)
- Close, but not quite right. The first frame is tapered on the left, the second frame is tapered on the right, and when overlapped and added, the resulting frame is not tapered at all, yet has very little spectral noise. A sine wave at a frequency equal to one of the FFT bins is not in any way modified by this window function, resulting in the 1.0 B. No other window functions on this page have anywhere near as low spectral noise. Sine waves that change phase by exactly 180 degrees from beginning to the end of the window result in half the amplitude assigned to the adjacent bins, with zero spectral noise outside this range. Sine waves that end 90 degrees out of phase are close to the worst case, generating some spectral noise, but the levels are many DB lower than other windows.
- I have no intention of writing any papers for submission to any conference. If you believe only academics have valuable knowledge that belongs on Wikipedia, I guess there's nothing to be done. If only old and well established knowledge, rather than cutting edge technology, belongs in Wikipedia, then I can revisit this in a few years.WaywardGeek (talk) 18:32, 24 December 2010 (UTC)
- It is a double-length Hann window that is then split into a first and second half. The first half is then added to the second half, resulting in a single-length set of samples. I've added an informal introduction on the web page to give readers a better feeling for what's going on in this algorithm.
- I read the guidelines you linked to, and I agree my web page isn't an acceptable source. Worse, I was able to get expert feedback on the algorithm, and while the algorithm does perform very well, it's a subset of "weighted overlapp-add DFT" algorithms that have been carefully explored. In my case, comp.dsp was a better place to post my algorithm than Wikipedia.org.WaywardGeek (talk) 12:13, 25 December 2010 (UTC)
Unnecessary complexity with the definition of N
This line threw me for a loop:
- In practice, N is typically an odd number. An even-length FFT window is generated by using only the coefficients corresponding to 0 ≤ n ≤ N-2.[note 1]
Then, all of the functions are defined in terms of . It seems clear that if were simply defined as the even-length FFT window, the function definitions would be simplified as well.
(To be fair, the triangular window with non-zero endpoints does use the odd-length . Substituting in that case still seems like a net win.)
I imagine this might be a sort of "traditional" notation, but it sure seems to make things more confusing with no benefit that I can see. Is there a reason for it? Can we change it, or at least explain it a little better? --4368 (talk) 11:55, 26 October 2011 (UTC)
- Not just the triangle, but for many windows it's useful to have a "center" point. Or at least, common, if not so useful. Might as well leave it. Dicklyon (talk) 15:17, 26 October 2011 (UTC)
- Looking at all of the functions defined, seems much more common than . That, in addition to a desire for symmetry with the way power-of-two lengths are common for FFTs, is my rationale. Could you explain how having a "center point" is actually more common/useful? Perhaps there's something in the literature not mentioned in the article? Thanks. --4368 (talk) 12:31, 27 October 2011 (UTC)
Details of proposed changes
First, the bullet point on (quoted above) would be removed. I believe that the existing definition of as the "width, in samples", will still be correct as-is. Then, here are some functions simplified with the new definition of :
- Hann window:
- Hamming window:
- Tukey window:
- Gaussian windows:
There would also be some implicated changes on the Hann function and Kaiser window pages (and perhaps others). These changes would bring the function definitions closer in line with Wolfram MathWorld (for example, 'Hanning' Function). However, I'd like to get some kind of agreement before making any changes, since I (admittedly) am not any kind of expert on this topic, and there are a lot of involved changes. --4368 (talk) 14:47, 29 October 2011 (UTC)
On further inspection, I see it's more complicated than I thought. See for example this page. The N+1 gives a "symmetric" window (N can be odd or even, giving a center point or not). But this gives the same point at beginning and end, which is zero for some windows, non zero for others, and messes up some of the analysis shown. The Hamming window in particular shouldn't have the repeated value at the end, and the hann window, with the extra zero, has the wrong periodicity to agree with note 2 if you include the extra zero. I'm not sure what we should do here. Probably discuss the alternatives and the complication. In fact, I think sampling continuous windows to get these discrete windows is inherently not quite right. Dicklyon (talk) 15:33, 29 October 2011 (UTC)
There's an approach like our current one in The DSP Primer, called the "Data Window" form. It also has the "Lag Window" form which is symmetric about zero index. It allows this one to be both even-numbered and symmetric, and hence correct periodicity, by offsetting the sample halfway between what it does for the odd N, which seems to me a good approach.
In any case, the spectra that we show are for some unstated large N, or for the continuous window function, effectively. It's not clear to me why we want these discrete expressions at all, especially given the complications that bring up. Dicklyon (talk) 17:09, 29 October 2011 (UTC)
Thank you for jumping in while I was not paying attention. And thanks everyone for your restraint. Yes, there are subtlties involved here. A version of this discussion can also be found at DFT-even_vs._Matlab (above). I will try to pick up where it left off. There are actually two different issues:
- How to define N? Here it is the actual length of a symmetrical window. When N is odd, the window has a single maximum. When N is even, the window has a double maximum. Choosing N odd and discarding the last point gives a slightly asymmetrical window with a single maximum. Why one might want to do that is the 2nd question (below). Setting that question aside, we are back to considering the other definitions of N. Noting all the N-1 terms in the window formulas, it is tempting to simplify them by defining N as one less than the length of a symmetrical window. But that's just a bit awkward/unnatural, don't you think? Rather than that, I would leave N as is and define L=N-1, and substitute L into the formulas. But that kind of leaves N stranded with no real purpose. I did consider all those options back in July.
- Why asymmetry? The Fred Harris paper introduces that practice. I haven't refreshed my memory, but the way I think of his argument is that a windowed FFT behaves as if both the window and the data are periodic. That usually means the data contains a discontinuity, and the window's job is to remove the discontinuity. Since the first and last samples of a symmetrical window are equivalent, there is no discontinuity in the periodically extended window if we remove one of the end points. And since it is a relatively small number (or zero), removing it improves (reduces) the noise bandwidth, which is given by "B = N*sum(w.^2)/sum(w)^2" in the Matlab scripts associated with the figures. It's probably more of an academic issue than a practical one.
- In my own experience there is a more important reason in the design of an FFT channelizer/transmultiplexer, where the window function operates as an FIR filter in each output channel, and the FFT implementation forces it into an even number of coefficients. My unconstrained choice for symmetrical FIR filters is an odd length, because the filter delay, (N-1)/2, is always an integer number of samples. When N is even, (N-1)/2 is as far from an integer number as is possible. And (to make a long story short) that creates a noticeable phase difference between adjacent channels, which manifests as distortion when adjacent channels are recombined (synthesized) into a wider bandwidth. The problem is solved by an asymmetrical window, whose delay is much much closer to an integer. There is a theoretical amount of phase non-linearity associated with the asymmetrical FIR, but in my experience, it is imperceptable.
Just one last point, for the sake of completeness. I think the mentioned in our article is the same as the "Lag Window form" that Dick mentioned above. If so, I should probably mention that name in the article.
- Yes indeed... here is a quote from page 196 (section 10.5): "The data window form can be obtained by substituting [n-(N-1)/2] for n in Eq. 10.28." And our article says So and are respectively called data window form and lag window form. But I hesitate to use those labels, because they seem rather arbitrary, and in fact misleading, because in my vernacular leads , not lags it(!)
- --Bob K (talk) 17:21, 30 November 2011 (UTC)
By the way... in Matlab-ese, I believe:
- hann(512,'periodic') creates an asymmetric FFT Hann window of length 512.
- hann(513,'symmetric') produces the same sequence plus one more sample equal to the first sample. (which makes it symmetric)
They both have a single maximum.
- hann(512,'symmetric') produces a symmetric window (of length 512) with a double maximum.
- hann(511,'periodic') produces the same sequence, minus the 512th sample. (though I can't think of any reason to ever do that)
In my opinion, it is a lot easier to understand how to achieve those four cases (and what you are getting) using the description in our article than it is to understand the nuances of Matlab's hann() function.
conversion to "vector graphics"
Regarding the last 3 edits, please explain why it is more important to have figures in .svg form than it is to have grid lines. And please explain why .svg cannot support the grid lines. As I recall, the guidelines for converting to .svg state that is should not detract from the rendered result.
- Yes, we shouldn't lose the grid lines. I think it's great that the editor provided his matlab code; it should be straightforward now for him or someone else to add grid lines, and otherwise adjust the styling. Dicklyon (talk) 19:26, 30 November 2011 (UTC)
- Now there are SVG images with grid lines. I set N to such a high value (2^17) that aliasing in the spectrum was eliminated and only plotted a portion of the Fourier transform. Making the SVG's was a big mess with rendering and font issues and I sympathize with anyone who made an effort for it. Olli Niemitalo (talk) 15:14, 13 February 2013 (UTC)
Two-dimensional window, separability error
- I think you misread it. It's talking about a form w(r) that is not separable, in general. You are referring to the separable gaussian special case; if you wanted that case, you'd use the separable form. Dicklyon (talk) 03:21, 5 February 2013 (UTC)
- I rewrote the section to include that exception. Olli Niemitalo (talk) 15:03, 5 February 2013 (UTC)
Is it correct to talk of a "frequency response" of a window function? A window function is not the impulse response of a system. Should we say "Fourier transform" instead? Olli Niemitalo (talk) 11:47, 14 February 2013 (UTC)
- We could explicitly say that is the "frequency response" to input which is probably how most people think of it. But I don't know what the concensus of the technical references might be. "Frequency domain plot" is one example. It might be customary, but it's also vague. --Bob K (talk) 16:24, 15 February 2013 (UTC)
Search string (with quotes) Google Scholar hits Google Books hits "window function and its fourier transform" 23 6 "window function and its frequency response" 2 0 "window function and its frequency spectrum" 0 0 "window function and its frequency domain" 0 0
- I did a bit of survey on the frequency of usage of different terms. So far "Fourier transform" seems the most common. Feel free to add further alternatives above. My guess why "frequency response" is sometimes used is that people are used to deal with filters and intuitively borrow the terminology from there. Olli Niemitalo (talk) 17:29, 15 February 2013 (UTC)
- Fourier transform is a clear winner, by Wikipedia's criterion (popular usage). My personal reason for preferring "frequency response" is different than your guess, because it actually is the spectral response to input And the Fourier transform of a windowed waveform is the convolution of the transforms of the waveform and the window, just as in the time domain the output of an LTI system is the convolution of the input and the impulse response. --Bob K (talk) 13:46, 16 February 2013 (UTC)
List of window functions
I see that the Other Windows section has been marked for extension. More generally, it might be nice to include further examples of window functions. The question is which merit inclusion. As a starting point, I have compiled a list of the windows in the works of Harris and Nuttall. These miss more modern developments but should include all the classics.
|Window||Scholar ghits||Books ghits||Parameters||Peak sidelobe (dB)||Asymptotic decay (dB/octave)||Included|
Hanning, if α = 2
Hann window, if α = 2
|α = 1.0
α = 2.0
α = 3.0
α = 4.0
|Hamming||23,900||13,800||α = 0.54
α = 0.53836
α = 0.53856
De la Vallé-Poussin, if order = 4
De la Vallée-Poussin, if order = 4
Parzen, if order = 4
|order = 4||-53||-24||No|
|Tukey||1,150||391||α = 0.25
α = 0.5
α = 0.75
|α = 2.0
α = 3.0
α = 4.0
|α = 0.5
α = 1.0
α = 1.5
|Cauchy||14||7||α = 3.0
α = 4.0
α = 5.0
|α = 2.5
α = 3.0
α = 3.5
|α = 2.0
α = 2.5
α = 3.0
α = 3.5
Lf0 = 2
Lf0 = 3
Lf0 = 4
|α = 3.0
α = 3.5
α = 4.0
|Minimum 3-sample Blackman-Harris
|61 dB 3-sample Blackman-Harris
|Minimum 4-sample Blackman-Harris
|74 dB 4-sample Blackman-Harris
|α = 3.0||-69||-6||No|
|3-term with continuous third derivative||none||-47||-30|
|3-term with continuous first derivative||none||-64||-18|
|4-term with continuous fifth derivative||none||-61||-42|
|4-term with continuous third derivative||none||-83||-30|
|4-term with continuous first derivative
Nuttall, continuous first derivative
Looking at the table so far, I think that windows to potentially include are:
- Parzen window: it appears popular and is neatly linked to the rectangular and triangular windows as a B-spline.
- Bohman window: it is of some note and has good suppression for a parameterless window.
- Welch window: it seems notable although I've yet to figure out why exactly (perhaps something to do with Welch's method?).
As an aside, the Hann-Poisson seems the least popular of those currently included, however I'm very fond of the fact that it can have no peak sidelobe, which seems an interesting (and potentially useful) peculiarity. — BobQQ (talk) 09:52, 28 February 2013 (UTC)
- Hi. I am having trouble reproducing the seach results. For example, the link https://www.google.com/search?q=%22welch+window%22&btnG=Search+Books&tbm=bks&tbo=1 produces 429 links instead of the 127 shown in our table. Any suggestions? Thanks.--Bob K (talk) 15:59, 28 February 2013 (UTC)
- Upon further investigation, 429 is the total number of occurrences, with multiple occurrences per book. To obtain a book count, I had to hop to the last page of links (10 per page) and read just below the toolbar at top. (If obscured, click on the button labeled "Search Tools".) That produced a count of 144. Is that what you do? --Bob K (talk) 16:35, 28 February 2013 (UTC)
- Thanks, that helps. The link is https://www.google.com/search?q=%22welch+window%22+signal&btnG=Search+Books&tbm=bks&tbo=1
- The number on the first result page is 121, but there are only 7 result pages @ 10 per page. If you hop to the 7th results page, at the top it says "Page 7 of 64 results", which is a confusing way of saying that the number of book hits is only 64. --Bob K (talk) 00:50, 1 March 2013 (UTC)
- We should probably include Parzen and Welch, but use of Bohman seems pretty rare and random. I got a much smaller Scholar ghit number for it than was listed (I updated the value from 884 to 17). We could kind of include it as a brief mention in the power-of-cosine windows section, as it is a convolution of two cos^1 windows, resulting in doubling of all dB numbers in the Fourier transform, compared to cos^1. Welch window, being a polynomial window with only a single polynomial piece, is very easy to calculate. Maybe that is why it has gained some popularity. Olli Niemitalo (talk) 22:33, 28 February 2013 (UTC)
- (Nice table!) In general it's usually futile to try to keep multiple Wikipedia articles "in synch" with each other, but perhaps we should consider synching that change with Kaiser_window. --Bob K (talk) 16:24, 21 February 2013 (UTC)
- I think it will be useful to get some hit counts from Google Scholar and from Google Books, to see which names that we know of are the most common ones for a window, for example Kaiser window appears about three times as popular as Kaiser-Bessel window, so a name change is probably not warranted at the moment. These searches will also tell if a particular window has found wider use, in which case it makes sense to include it. I think we should call it a "list of window functions" rather than the current "window examples", because we have so many and appear to be aiming for thorough coverage. I also think we should not categorize the window functions to different ranges of B, but perhaps in three categories with names to the effect of: "parameter-less windows", "parameterized windows" and "combination windows". In the first category, the windows could be sorted in approximately increasing order of B. Overall, the windows can be sorted logically, like Kaiser after DPSS (which it approximates). It's a good thing to use in examples parameter values from literature, such as those listed in BobQQ's table, as then we can sometimes also get the B value from literature, along with other figures of merit (like that peak sidelobe) which we could then also present. Olli Niemitalo (talk) 21:26, 21 February 2013 (UTC)
- I agree that Kaiser appears the more commonly used term (short names are generally preferable). I'll just add Kaiser-Bessel as an alias. Google hits should be a useful metric for notability. I think if something has a high count it should be included, but not necessarily that something with a low count should be excluded as it may have a very niche use that is still interesting. Equally something could be widely used without being proportionately documented.
- I agree about including also windows that are important in some particularly narrow field. I guess I was aiming for excluding early windows that "died out" along the years (unless they are pedagogically useful), or were only discussed by their authors (famous or not). Olli Niemitalo (talk) 11:41, 22 February 2013 (UTC)
- I agree that Kaiser appears the more commonly used term (short names are generally preferable). I'll just add Kaiser-Bessel as an alias. Google hits should be a useful metric for notability. I think if something has a high count it should be included, but not necessarily that something with a low count should be excluded as it may have a very niche use that is still interesting. Equally something could be widely used without being proportionately documented.
- On organisation: I think it would be more useful to organise by property, since I would suspect most people would be interested in looking up a window function for a particular use. For example, I want something that can handle a large dynamic range, so I need good sidelobe suppression. I assume that was the original rationale. However, since some of the parametrised windows can be adjusted to change their properties, that wouldn't really work. All that information could be put in a comparison table, which would allow people to look up the windows they want. I think a good grouping would be on functional form. We could have simple windows (rectangular, triangular); those based on sums of cosines (Hann, Hamming, Blackman-Harris, Nuttal, etc.); more complicated functions, and then combination (hybrid?) windows? — BobQQ (talk) 11:17, 22 February 2013 (UTC)
- I expanded the table with exact citations and added columns for ghits, to be filled. Olli Niemitalo (talk) 10:18, 22 February 2013 (UTC)
- This produces an asymmetric form known as "DFT-even" or "periodic".
- Harris, Fredric J. (1978). "On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform". Proceedings of the IEEE 66 (1): 51-83. Unknown parameter
- Nuttall, Albert H. (1981). "Some Windows with Very Good Sidelobe Behavior". IEEE Transactions on Acoustics, Speech, and Signal Processing 29 (1): 84-91. Unknown parameter
Missing argument for \frac
Nageh's version of MathJax is giving me that error message for several of the formulas (both under "Triangular window" and the one under "Welch window"). "Always render PNG" doesn't have this problem (I still need to try the MathJax bundled with the MediaWiki software).
Absurd Gaussian window clipping
The Gaussian window and seemingly other infinite windows are shown and analysed as being clipped, like the Gaussian window being clipped really short. Why would anyone in their right mind ever choose to use such a crudely clipped window for anything mostly given the poor performance it would give? If you're going to clip the Gaussian function so short to make it a window you might as well just subtract by a constant so the first and last bins are 0.
- One can say the same thing about the Hamming window (which has a similar FT), and yet it is a classic.--Bob K (talk) 23:16, 3 June 2013 (UTC)
My point is it just makes the analyses pretty worthless if it shows the FT of the window that uses a completely arbitrary, crude and absurd rectangular windowing of the window. Maybe it would make more sense to represent the FT of those windows in their infinity, then what you choose to do to that window to make it finite is your choice.188.8.131.52 (talk) 20:41, 3 June 2013 (UTC)
- Maybe we shouldn't include Gaussian at all (doesn't matter to me). But I don't think it's helpful to include unrealizable functions. The article is large enough already without that.--Bob K (talk) 23:16, 3 June 2013 (UTC)
- Perhaps a sub/section for unbounded prototype functions is in order, even though and exactly because an unbounded window is a misnomer. Gaussian and Poisson/Exponential would fit, others? The reader must not be confused about whether these are windows or not. I don't think they are, without the prefix truncated. Olli Niemitalo (talk) 23:40, 3 June 2013 (UTC)
The truncation scheme described corresponds to Matlab's gausswin function, according to this ref. Maybe if we make that clear it will seem less absurd or arbitrary. Dicklyon (talk) 23:31, 3 June 2013 (UTC)
Missing factor in Dolph-Chebyshev window
Isn't there a missing in front of the Dolph-Chebyshev window in frequency domain?
- Good question. The W0(k) formula in our article is correct. The (-1)k factor converts it to W(k) when w(n) is defined as which is an asymmetrical N-point window. Those are fine in applications that require only the DFT of the window, because that is equivalent to using the window's N-periodic summation, and the asymmetry is hidden. That, I believe, is the application frederic harris has in mind in eq 45 of his classic paper. The definition produces symmetrical N-point windows, which are also fine for DFT applications as well as other things, such as FIR filter design.
- Our formula for w0(n) is also correct, except for a possible normalization factor (for unity peak amplitude). But our formula for w(n) only works when N is odd. A more general formulation that works for any integer is:
- which is the inverse DFT of rather than
- None of the other w(n) functions in the article are computed from W0(k), so this is only needed for the Dolph-Chebyshev case.
- --Bob K (talk) 14:28, 17 August 2013 (UTC)
Dolph-Chebyshev window: no context for comment about discontinuities at the window edges
User 184.108.40.206 recently added:
Due to the equiripple condition, the time-domain window may have Dirac delta discontinuities at the edges. The Taylor window approximates this response without the discontinuities, allowing the equiripples to drop off at the edges.
But harris' paper, p 71, states:
The continuous solution to the problem exhibits impulses at the boundaries which restricts continuous realizations to approximations (the Taylor approximation). The discrete or sampled window is not so restricted, and the solution can be implemented exactly.
- The discontinuities are still there in the discrete version, though you can't see them in WP's plot. http://www.mathworks.com/help/signal/ref/taylorwin.html
Conflicting definitions of triangular window
Our current definition of triangular window is:
which intersects the n-axis at n=-1 and n=N. The Matlab definition at http://www.mathworks.com/help/signal/ref/triang.html, for N even, intersects at n=½ and n=N+½, which is equivalent to n=-½ and n=N-½, in our axis system. The point is that the underlying w0(n) function is 1 sample narrower than our definition, according to Matlab.
A definition that would agree with Matlab is:
- Also, Harris, p 59, defines our w0(n) as intersecting the axis at n = ±N/2, which defines its width as N, in agreement with Matlab.
- --Bob K (talk) 20:05, 22 August 2013 (UTC)
Dolph–Chebyshev window: I have a curiousity motivated question
appears to be well-established in the literature. But I can't help focussing on the core element, and seeing 2N periodicity, instead of the expected N periodicity.
So apparently the outer shell: does the magic. Is that about right?
- The inner element creates a half-cycle, not a complete cycle, with the ends exceeding -1..+1 by some amount, which creates the mainlobe, as cos-1 changes from real to imaginary at that point.
- Note that some references use cos(N cos-1( while others use cosh(N cosh-1 for either bottom or top, but both are equivalent. Maybe we should use the same functions for top and bottom?
- — Preceding unsigned comment added by 220.127.116.11 (talk) 16:19, 24 August 2013 (UTC)
- Thanks. I tracked down an example of that: http://www.ijera.com/papers/vol%201%20issue%202/012109116J.pdf It has a nice symmetry to it. I guess harris prefers having 3 cos() functions in the numerator, instead of 1 cos() and 2 cosh(). I'm inclined to leave it alone, but you've made a good point.
- --Bob K (talk) 17:42, 26 August 2013 (UTC)
The paper "The Dolph–Chebyshev Window: A Simple Optimal Filter" by PETER LYNCH" is commonly cited as a reference for this window; should it be added to the (general) Further Reading section, or perhaps to the section on the window itself?
Also, I notice, in the Further Reading section, references to papers on the Ultraspherical window (of which, Dolph-Chebyshev is a special case), but we don't seem to have a section on that window. If we want to add one, Kabal's "Time Windows for Linear Prediction of Speech" includes matlab/octave code. Aquegg (talk) 04:34, 4 September 2013 (UTC) In fact, Bergen's code  seems better for octave. Aquegg (talk) 05:25, 4 September 2013 (UTC)
The formula for the Planck-taper window function is incorrect. This is easily seen by putting n=0 or n=N-1, when the function should be zero (The appropriate Z parameter should be infinity) The correct formulae for the function are given in  Gordone (talk) 15:21, 5 April 2014 (UTC)
- Or maybe it's correct (didn't check), and the difference is because it excludes the zero-valued endpoints. Olli Niemitalo (talk) 08:20, 7 April 2014 (UTC)
The mathematics as shown are incorrect, as Niemitalo stated above, as n approaches N-1, the filter quantity approaches 1/2, not 0! — Preceding unsigned comment added by 18.104.22.168 (talk) 23:07, 12 March 2015 (UTC)
FFT of the Window functions
I just posted this at Help desk and a bevy of comments appeared immediately saying that it was not appropriate place for this stuff. Somebody recommended that I should post here instead.
As a part of a larger project I have to deal with Fast Fourier Transform (FFT) which is a variation of Discrete Fourier Transform (DFT). After some trials and errors I settled on Librow FFT. The source code there is in C but most of my software is in Gfortran and I had to convert Librow's source to Gfortran. I tested Librow's code before conversion using Wikipedia's Window functions. The test consisted of invoking Forward and Inverse FFT. Everything worked. The GFortran software derived from the C source code likewise worked perfectly well in a sense that by invoking the Inverse transform I could always get the original functions. Specifically I used Blackman-Harris window, Flat top window, Triangular window & Sine window. Everything worked except one thing: I could never get anything even remotely similar to the Fourier transform functions the website demonstrates. So, I began looking critically at the "Fourier Transforms" displayed on that page.
First we know that DFT gives us a set of complex numbers. The illustrations given on the web page did not mention how these seemingly real numbers had been obtained. Are they real or imaginary parts? How come the abscissas contain negative domain? In a way of reminding:
DFT of a signal is defined (Stanford) as:
; where N - number of samples; 1/T - sampling rate
I don't see how one can get negative numbers of anything for the abscissas.
This situation is very unsettling for me because I don't understand what is going on, how those functions were obtained, why my real and imaginary parts of FFT differ from the illustrations given in the Wikipedia article. Am I on the right track or what? Now I have to question a lot of things. I am wondering if there is anybody out there who can explain to me the discrepancy? Thanks --AboutFace 22 (talk) 15:36, 16 June 2015 (UTC)
- it's odd anyone directed you here. An article's Talk page is only for discussing how to improve the article, not a general discussion of the topic nor for helping with people's problems in the domain. You would need to find a technical forum for FFTs. Good luck. Strebe (talk) 20:14, 16 June 2015 (UTC)
- Well, another blow :-) I think my post may be considered an attempt to improve the article, provided my comments make sense. But to determine it is the case the post should be read. I reviewed most of the previous posts and it seems many competent mathematicians dwell here. Thanks, - --AboutFace 22 (talk) 00:55, 17 June 2015 (UTC)
- Maybe you could try posting your question on an external forum such as this one. Or perhaps try emailing the author of the Librow article you cite. I'm neither a mathematician nor a coder, but it seems likely that your problem will be resolved outside Wikipedia. Best of luck! >MinorProphet (talk) 07:58, 18 June 2015 (UTC)