# Talk:Window function

WikiProject Mathematics (Rated C-class, Low-importance)
This article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of Mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Mathematics rating:
 C Class
 Low Importance
Field: Applied mathematics
WikiProject Statistics (Rated C-class, Low-importance)

This article is within the scope of the WikiProject Statistics, a collaborative effort to improve the coverage of statistics on Wikipedia. If you would like to participate, please visit the project page or join the discussion.

C  This article has been rated as C-Class on the quality scale.
Low  This article has been rated as Low-importance on the importance scale.

## Incorrectness

Let's start with the very first sentence: The Fourier transform of the function: $\cos(\omega t)\,$ is zero, except at frequency $\pm \omega\,$.

For flip's sake, this is a completely inappropriate function to mention because $\cos(\omega t)\,$ 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 212.44.43.13 (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 $\exp(2i\pi f t)\,$ 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.

Almipa (talk) 19:42, 16 April 2010 (UTC)

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 141.52.58.13 (talk) 12:15, 18 December 2013 (UTC)

Doesn't a window need to be absolutely integrable? Something like a sinc function or a $1 / (1 + abs(t))$ 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)
True, we usually use windows of finite support in DSP, but windows such as Gaussian and exponential are sometimes encountered, too. I wish I could see what the cited book says. Dicklyon (talk) 05:58, 21 December 2013 (UTC)

## Comparison Table

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.

## Scalloping loss

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)

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. 81.105.21.22 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

For a more recent discussion on this topic, see Talk:Window_function#I.27m_back.21, below.
--Bob K (talk) 17:44, 30 November 2011 (UTC)

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.)

--Rob Calhoun 18 Jul 2011 — Preceding unsigned comment added by Rcalhoun (talkcontribs) 20:25, 18 July 2011 (UTC)

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 70.91.225.169 (talkcontribs).

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)

## confusing wording

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)

## Bartlett/Triangle Window

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 (7.9.1.705) 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)

## Gauss window

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 129.27.140.171 (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)

## Tighter format?

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)

## Questions

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.

In the event that there is such a thing a description of it is missing from this page. —Preceding unsigned comment added by 24.85.104.61 (talk) 23:27, 2 June 2008 (UTC)

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)

## Definitions

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)

A specific example of the "problem" might help.
--Bob K (talk) 12:37, 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)

## Noise bandwidth

Besides that fact that the formula

$B_n = \frac{1}{g} \int_0^{\infty} |H(f)|^2 df$ where $g = |H(f)|^2_{max}$

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.

--Bob K (talk) 12:27, 15 September 2008 (UTC)

## 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:
Wikipedia:Extended_image_syntax#New_syntax_for_images
--Bob K (talk) 13:39, 9 December 2008 (UTC)
[[Image:Window_function_(blackman).png|frame|none|Blackman window; α = 0.16; B=1.73]]

Added pre tags around the image, it was so large after updating it that it was distracting. Olli Niemitalo (talk) 19:47, 9 February 2013 (UTC)

## 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 (talkcontribs) 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 $\pi$ 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 (talkcontribs)

## Specific goals

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 71.167.61.179 (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)

Closes as unsupported. Dicklyon (talk) 20:56, 20 February 2011 (UTC)

## diagram

show a graph of a sine wave before and after windowing, to make the function clear —Preceding unsigned comment added by 71.167.63.79 (talk) 20:56, 12 December 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.

--Bob K (talk) 22:37, 14 December 2009 (UTC)

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.

Regards,

Almipa (talk) 11:27, 12 April 2010 (UTC)

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)

This seems taken care of. Olli Niemitalo (talk) 20:46, 10 February 2013 (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 213.244.14.206 (talk) 14:17, 18 November 2010 (UTC)

The comparisons are done at Comparison of windows
--Bob K (talk) 02:24, 19 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. --213.244.14.206 (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)
I don't believe that, but we do have wikipedia policy and guidelines to follow, like WP:RS and WP:OR. So is it just a double-length Hann window then? Dicklyon (talk) 23:20, 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)
Oh, I see, it's not exactly a window in the sense of the others. I'm glad you found a good place for it. Thanks. Dicklyon (talk) 16:50, 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 $N-1\,$. It seems clear that if $N\,$ 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 $N\,$. Substituting $N+1\,$ 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, $N-1\,$ seems much more common than $N\,$. 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 $N$ (quoted above) would be removed. I believe that the existing definition of $N$ as the "width, in samples", will still be correct as-is. Then, here are some functions simplified with the new definition of $N$:

• Hann window: $w(n) = 0.5\; \left(1 - \cos \left ( \frac{2 \pi n}{N} \right) \right)$
• Hamming window: $w(n) = 0.54 - 0.46\; \cos \left ( \frac{2\pi n}{N} \right)$
• Tukey window: $w(n) = \left\{ \begin{matrix} \frac{1}{2} \left[1+\cos \left(\pi \left( \frac{2 n}{\alpha N}-1 \right) \right) \right] & \mbox{when}\, 0 \leqslant n \leqslant \frac{\alpha N}{2} \\ [0.5em] 1 & \mbox{when}\, \frac{\alpha N}{2}\leqslant n \leqslant N (1 - \frac{\alpha}{2}) \\ [0.5em] \frac{1}{2} \left[1+\cos \left(\pi \left( \frac{2 n}{\alpha N}- \frac{2}{\alpha} + 1 \right) \right) \right] & \mbox{when}\, N (1 - \frac{\alpha}{2}) \leqslant n \leqslant N \\ \end{matrix} \right.$
• Gaussian windows: $w(n)=e^{-\frac{1}{2} \left ( \frac{n-N/2}{\sigma N/2} \right)^{2}}$

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)

### It's complicated

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)

### I'm back!

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:

1. 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.
2. 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.
3. 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 $w_0(n)\,$ 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 $\scriptstyle w(n) = w_0\left(n-\tfrac{N-1}{2}\right).\,$  So $\scriptstyle w(n)$ and $\scriptstyle w_0(n)$ 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 $\scriptstyle w_0(n)$ leads $\scriptstyle w(n)$, not lags it(!)
--Bob K (talk) 17:21, 30 November 2011 (UTC)

--Bob K (talk) 16:42, 30 November 2011 (UTC)

### FWIW

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.

And:

• 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.

--Bob K (talk) 18:36, 30 November 2011 (UTC)

## 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.

--Bob K (talk) 18:52, 30 November 2011 (UTC)

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

The article suggests that functions of the form $\scriptstyle W(m,n)=w(r)$ are unseparable, whereas $\scriptstyle exp(-r^2)=exp(-(m^2+n^2))=exp(-m^2)exp(-n^2)$ clearly is separable. 58.96.115.119 (talk) 02:03, 5 February 2013 (UTC)

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)

## Frequency response

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)

Good point. $w(t)$  is a dc-response, not an impulse response. --Bob K (talk) 16:40, 14 February 2013 (UTC)
We could explicitly say that  $\mathcal{F}\{w(t)\}$  is the "frequency response" to input   $1\ \stackrel{\mathcal{F}}{\Longleftrightarrow}\ \delta(f),$  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)
"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 $\delta(f).$  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)
I'll start converting things to "Fourier transform". What you have said also makes sense. Olli Niemitalo (talk) 16:15, 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[1] and Nuttall[2]. These miss more modern developments but should include all the classics.

Window functions and parameter choices in literature. Search string for ghit count was "xxx window" signal.
Window Scholar ghits Books ghits Parameters Peak sidelobe (dB) Asymptotic decay (dB/octave) Included
Rectangle[1]
Dirichlet[1]
Rectangular
Unit
994
91
19,700
ambiguous
328
54
15,100
ambiguous
none -13[1] -6[1] Yes
Triangle[1]
Fejer[1]
Bartlett[1]
Triangular
276
23
1,330
2,220
118
35
1,580
1,980
none -27[1] -12[1] Yes
cosα(x) Hanning[1]
Hanning[2], if α = 2
Power-of-cosine
Hann window, if α = 2
ambiguous
20,200
3
3,440
ambiguous
9,080
1
1,660
α = 1.0[1]
α = 2.0[1]
α = 3.0[1]
α = 4.0[1]
-23[1]
-31[2]
-39[1]
-47[1]
-12[1]
-18[1][2]
-24[1]
-30[1]
Yes
Hamming[1][2] 23,900 13,800 α = 0.54[1]
α = 0.53836[2]
α = 0.53856[1]
-42[1]
-43.19[2]
-43[1]
-6[1]
-6[2]
-6[1]
Yes
Riesz[1]
Welch
Parabolic
25
456
ambiguous
10
127
ambiguous
none -21[1] -12[1] No
Riemann[1]
Lanczos
8
150
6
76
none -26[1] -12[1] Yes
B-spline window
De la Vallé-Poussin[1], if order = 4
De la Vallée-Poussin, if order = 4
Parzen[1], if order = 4
58
6
4
ambiguous
3
4
2
ambiguous
order = 4 -53[1] -24[1] No
Tukey 1,150 391 α = 0.25[1]
α = 0.5[1]
α = 0.75[1]
-14[1]
-15[1]
-19[1]
-18[1]
-18[1]
-18[1]
Yes
Bohman[1] 17 8 none -46[1] -24[1] No
Poisson
Exponential
Two-sided exponential
26
ambiguous
3
9
ambiguous
2
α = 2.0[1]
α = 3.0[1]
α = 4.0[1]
-19[1]
-24[1]
-31[1]
-6[1]
-6[1]
-6[1]
Yes
Hanning-Poisson[1]
Hann-Poisson
16
1
6
2
α = 0.5[1]
α = 1.0[1]
α = 1.5[1]
-35[1]
-39[1]
none[1]
-18[1]
-18[1]
-18[1]
Yes
Cauchy[1] 14 7 α = 3.0[1]
α = 4.0[1]
α = 5.0[1]
-31[1]
-35[1]
-30[1]
-6[1]
-6[1]
-6[1]
No
Gaussian[1]
Weierstrass
10,100
2
3,640
2
α = 2.5[1]
α = 3.0[1]
α = 3.5[1]
-42[1]
-55[1]
-69[1]
-6[1]
-6[1]
-6[1]
Yes
Kaiser-Bessel[1]
Kaiser
1,280
4,110
751
4,520
α = 2.0[1]
α = 2.5[1]
α = 3.0[1]
α = 3.5[1]
Lf0 = 2[2]
Lf0 = 3[2]
Lf0 = 4[2]
-46[1]
-57[1]
-69[1]
-82[1]
-39.79[2]
-65.45[2]
-91.22[2]
-6[1]
-6[1]
-6[1]
-6[1]
-6[2]
-6[2]
-6[2]
Yes
Barcilon-Temes[1]
Babic Temes
3
3
3
2
α = 3.0[1]
α = 3.5[1]
α = 4.0[1]
-53[1]
-58[1]
-68[1]
-6[1]
-6[1]
-6[1]
No
Exact Blackman[1][2] 34 10 none -68[2] -6[1][2] Yes
Blackman[1][2] 3,260 2,340 none -58[1][2] -18[1][2] Yes
Minimum 3-sample Blackman-Harris[1]
"Minimum" 3-term[2]
2
10
0
6
none -71[2] -6[1][2]
61 dB 3-sample Blackman-Harris[1]
3-term[2]
1
3
0
1
none -62[2] -6[1][2]
Minimum 4-sample Blackman-Harris[1]
"Minimum" 4-term[2]
19
34
7
10
none -92[1] -6[1][2]
74 dB 4-sample Blackman-Harris[1]
4-term[2]
4
6
0
1
none -74[1] -6[1][2]
4-sample Kaiser-Bessel[1]
4-term
2
2
2
0
α = 3.0[1] -69[1] -6[1] No
3-term with continuous third derivative[2] none -47[2] -30[2]
3-term with continuous first derivative[2] none -64[2] -18[2]
4-term with continuous fifth derivative[2] none -61[2] -42[2]
4-term with continuous third derivative[2] none -83[2] -30[2]
4-term with continuous first derivative[2]
Nuttall, continuous first derivative
none -93[2] -18[2] Yes
Minimum 3-term[2] none -71[2] -6[2]
Minimum 4-term[2]
Blackman-Nuttall
ambiguous
23
ambiguous
0
none -98[2] -6[2] Yes

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)
Have a look at the search string in table caption again, it should include the quotation marks and the word signal. I just used the number from the first result page. Olli Niemitalo (talk) 22:33, 28 February 2013 (UTC)
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)
Now that's annoying! Well, it's lucky that we are not doing rocket science here. Olli Niemitalo (talk) 01:09, 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)
That all seems sensible. I think the high ghits was probably from a regular Google rather than Google Scholar... — BobQQ (talk) 17:45, 1 March 2013 (UTC)

Both papers refer to the Kaiser window as Kaiser-Bessel, so I think I may change that in the article. — BobQQ (talk) 14:40, 21 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)
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)
That sounds like a good organization, and it doesn't prevent from sorting by B within each category, if that is deemed useful. Olli Niemitalo (talk) 11:41, 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)

### Notes

1. ^ This produces an asymmetric form known as "DFT-even" or "periodic".

### References

1. Harris, Fredric J. (January 1978). "On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform". Proceedings of the IEEE 66 (1): 51-83.
2. Nuttall, Albert H. (February 1981). "Some Windows with Very Good Sidelobe Behavior". IEEE Transactions on Acoustics, Speech, and Signal Processing 29 (1): 84-91.

## 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).

Does the LaTeX code need to be fixed, or is the problem in MathJax? I don't know enough LaTeX to see anything wrong by myself. --SoledadKabocha (talk) 00:08, 6 March 2013 (UTC)

I think that should be fixed now(?) — BobQQ (talk) 14:32, 6 March 2013 (UTC)

## 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.92.135.65.207 (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 $(-1)^k$ missing in front of the Dolph-Chebyshev window in frequency domain?

\begin{align} W_0(k) = (-1)^k \frac{\cos\{N \cos^{-1}[\beta \cos(\frac{\pi k}{N})]\}}{\cosh[N \cosh^{-1}(\beta)]} \end{align}
— Preceding unsigned comment added by 141.24.211.22 (talk) 13:34, 16 August 2013 (UTC)

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 $\scriptstyle w(n) = w_0\left(n-\frac{N}{2}\right),$ 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 $\scriptstyle w(n) = w_0\left(n-\frac{N-1}{2}\right)$ 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:
\begin{align} w(n) = w_0\left(n-\frac{N-1}{2}\right) &= \frac{1}{N} \sum_{k=0}^{N-1} W_0(k) \cdot e^{i 2 \pi k (n-\frac{N-1}{2}) / N}\\ &=\frac{1}{N} \sum_{k=0}^{N-1} (-e^{\frac{i\pi}{N}})^k\cdot W_0(k) \cdot e^{i 2 \pi k n / N}, \end{align}
which is the inverse DFT of  $(-e^{\frac{i\pi}{N}})^k\cdot W_0(k),$  rather than  $(-1)^k\cdot W_0(k).$
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

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.

Our article only presents the discrete window solution.
--Bob K (talk) 01:33, 21 August 2013 (UTC)

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:

$w(n)=1 - \left|\frac{n-\frac{N-1}{2}}{\frac{N+1}{2}}\right|$

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:

$w(n)=1 - \left|\frac{n-\frac{N-1}{2}}{\frac{N}{2}}\right|$

--Bob K (talk) 19:34, 22 August 2013 (UTC)

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

The formula:

\begin{align} W_0(k) &= \frac{\cos\{N \cos^{-1}[\beta \cos(\frac{\pi k}{N})]\}}{\cosh[N \cosh^{-1}(\beta)]}\\ \beta &= \cosh[\frac{1}{N} \cosh^{-1}(10^\alpha)] \end{align}

appears to be well-established in the literature.  But I can't help focussing on the core $\cos(\tfrac{\pi k}{N})$ element, and seeing 2N periodicity, instead of the expected N periodicity.

So apparently the outer shell:   $\cos\{N \cos^{-1}[\beta \ xxx]\}$   does the magic.  Is that about right?

--Bob K (talk) 01:11, 24 August 2013 (UTC)

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 71.167.59.208 (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)