I am aware of the common types of windows, (Hamming, Hanning, Kaiser, Tukey, etc etc). However while many books describe them - almost none tell me just how exactly they were derived.

What is so holy about the hamming window? What about the hanning? I understand that they all play on the ratio of mainlobe width VS sidelobe attenuation, but how exactly were they derived?

The motivation for my question, is because I am trying to figure out if one can design their own windows, that also play off main lobe width and sidelobe energy.

  • 3
    $\begingroup$ Of course you could try to create your own custom window function. However, you could also use an existing parameterized window like the Kaiser window, which can trade off between the two traits using a single numerical parameter. $\endgroup$
    – Jason R
    Commented May 21, 2013 at 14:04
  • $\begingroup$ Hello mr @JasonR, yes what you say is very true. I wonder if though there are other ways instead of Kaiser? Then my question becomes, how was Kaiser method conceived? :) Why was it "done that way"? Is there a different way? What is the general principle those people were working with, etc. $\endgroup$ Commented May 21, 2013 at 14:40
  • $\begingroup$ I don't recall if it covers history, but generally for the topic of windowing, I find Hamming's book Digital Filters is excellent as a learning text. amazon.com/Digital-Filters-Dover-Mechanical-Engineering/dp/… $\endgroup$
    – The Photon
    Commented May 22, 2013 at 1:32

3 Answers 3


This is only a partial answer, but there's a lecture online where Hamming talks about how he came up with his eponymous window. Starting at roughly 15:15 gives the full context.

With a reasonably entertaining story, he credits John Tukey with inventing the theory of windows (for spectrum analysis). However, he introduces the whole subject in the context of using Lanczos sigma factors to reduce Gibbs phenomenon. In addition, in The Art of Doing Science and Engineering (based on the same lectures), he describes how his window is a variation on the Hann window, which he claims was used by von Hann in economics (long before its application in signal processing). That suggests the history goes much further back, depending on how you want to define it.

The book where Tukey first named the Hamming window is The Measurement of Power Spectra from the Point of View of Communications Engineering. Given Hamming's assertion that Tukey invented the theory of windows, it would probably be a good place to start for a deeper understanding of how to design new ones. I think the book is just a reprint of Part I and Part II of his Bell System Technical Journal article, so it's available online.

  • 3
    $\begingroup$ "When you've got pride, you dont like coming in second. Thus [the theory of windowing was created]". Wow. What a bunch of characters. $\endgroup$ Commented May 22, 2013 at 0:39

Here is another partial answer, mostly about designing custom windows. I came up with this while doing something that (as I know now but didn't then) is called "windowing in the frequency domain." Then, after reading some original papers on windowing, I figured that it was probably the way that some windows were conceived in the first place, but I don't have any real background knowledge.

Start with a rectangular window and look at its Fourier transform, the sinc function:

sinc function

Now, scale and (frequency-)shift two of them so the sides lobes tend to cancel each other out when added together:

first step

(Result in green; sorry for the bad quality and useless legend.)

As you can see, side lobes are not only reduced in general, they also roll off much more quickly.

With "windowing in the frequency domain," the shifting and scaling is closely related to what actually happens in practice. But you are probably more interested in a time-domain representation, which is easy to obtain by applying appropriate formulas for the frequency shifts. It simplifies to $\cos(\pi t)$.

Repeat this process, and you get better and better roll-off, at the cost of a wider main lobe:

second step

This simplifies to $(\cos(\pi t))^2$ in the time domain, which is precisely a Hann window. In general, repeating this $n$ times yields $(\cos(\pi t))^n$. $n=4$ is a special case of a Blackman window, and all even $n$ belong to the Blackman-Harris family.

Among Blackman-Harris windows, these yield the fastest side lobe roll-off. (I started writing down a proof of this, but didn't even finish it because how to calculate roll-off and other parameters seems to be common knowledge among experts.)

If you want to optimize something else than roll-off, you can start with a window that has sufficient roll-off, then do something similar to the above, but scale and shift in a different way (usually using three terms instead of two). This will keep the roll-off exactly the same, but it allows you to reduce the first side lobes, for example.

Hope this helps. Have fun.

  • $\begingroup$ A great answer thank you Sebastian, this helps me understand a lot! :-) You mentioned some of those papers you read, if you know them, can you put up the names in your post please? I am sure I can also find them, but since you already know it would give me a head start. Again wow this is great - makes sense too. Why dont they teach like this in schools? $\endgroup$ Commented May 24, 2013 at 12:26
  • $\begingroup$ Thanks! I remember skimming over some papers by Blackman and Harris. Looking at "On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform" by Harris, it basically contains everything I wrote in section V.C. $\endgroup$ Commented May 24, 2013 at 20:08

Most well-known windows were designed in a more or less ad-hoc way, based on some notion of smoothness in the time-domain. As far as I know there are two windows that are optimal in some sense: The Chebyshev-window which minimizes the maximum sidelobe level (not energy!), and the prolate-spheroidal window, which maximizes the energy ratio between mainlobe and sidelobes. There is an interesting paper about window-design in the frequency domain. It discusses an algorithm which minimizes the sidelobe energy subject to constraints on the maximum sidelobe level, i.e. it is a mix between Chebyshev and prolate-spheroidal window. This is the paper: A new optimal window by J.W. Adams.

  • $\begingroup$ Even just skimming it I can tell this is already a fantastic paper, thank you for that. I suppose my 'ad-hocy' suspicion of how most windows were designed is true then. (Visual smoothness in the time domain). Question: Is there a kind of 'limit' as to the most ideal you can make a window, such that its mainlobe width is as small as possible, while its sidelobe levels are as attenuated as possible? $\endgroup$ Commented May 21, 2013 at 15:18
  • 3
    $\begingroup$ @TheGrapeBeyond: When you have two attributes that trade off with each other (i.e. making one better makes the other worse), then you can't optimize them both at the same time. As the designer, you have to pick an implementable point in the trade space. $\endgroup$
    – Jason R
    Commented May 21, 2013 at 15:34
  • 2
    $\begingroup$ No, there's a trade-off and you can choose the point of the trade-off curve that you want to be on. You basically cannot get everything at the same time. $\endgroup$
    – Matt L.
    Commented May 21, 2013 at 15:34
  • 1
    $\begingroup$ Do you know filter design? It's the same thing, you can have a higher stopband attenuation if you allow a wider transition band; if you need a narrow transition band then your stopband attenuation will be lower, given a fixed filter order. There's even a trade-off between maximum sidelobe level and sidelobe energy; minimizing one of them will give a relatively large value for the other one. $\endgroup$
    – Matt L.
    Commented May 21, 2013 at 15:58
  • 1
    $\begingroup$ If your signal is properly bandlimited, then the only way more sensors would help is if they captured a longer signal. A longer signal would allow the use of a window of greater length, which would allow a narrower main lobe. $\endgroup$
    – hotpaw2
    Commented May 21, 2013 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.