13
$\begingroup$

Suppose we're designing a low-pass FIR filter, and I want to use one of these three windows: Bartlett, Hann or Hamming. From Oppenheim & Schafer's Discrete-Time Signal Processing, 2nd Ed, p. 471:}

enter image description here

All three of them provide the same transition band width: $$\Delta\omega=\frac{8\pi}{N}$$ where $N$ is the order of the filter and is assumed large enough.

However, the overshoot (let's call it $\delta$) is different for each window, an the following inequality holds:

$$\delta_{Hamming}<\delta_{Hann}<\delta_{Bartlett}$$

So if we use a Hamming window, we get the smallest overshoot and a transition band with width $\Delta\omega$. If we use one of the other two windows, the width of the transition band is the same, but the overshoot increases.

This leads me to think that there is no case in which one would use a Hann or a Bartlett window, as the Hamming one is better than them: it improves one aspect ($\delta$), stays the same in another ($\Delta\omega$).

The question is: why would someone choose a Hann or a Bartlett window if a Hamming one can always be used?

$\endgroup$
2
  • $\begingroup$ Could you provide some clarification - do you have references for those equations? What do you mean by "overshoot" in this context? $\endgroup$ Commented Apr 28, 2017 at 12:54
  • $\begingroup$ @MartinThompson I just added the reference. By overshoot I mean the peak of the frequency response due to the discontinuity of the ideal low-pass filter that one tries to approximate to. $\endgroup$
    – Tendero
    Commented Apr 28, 2017 at 13:03

2 Answers 2

15
$\begingroup$

In reviewing fred harris' Figures of Merit for various windows (Table 1 in this link) the Hamming is compared to the Hanning (Hann) at various values of $\alpha$ and from that it is clear that the Hann would provide greater stopband rejection (The classic Hann is with $\alpha =2$ and from the table the side-lobe fall-off is -18 dB per octave). I provided the link as you can see many more considerations involved when choosing a window for various applications.

The result of this is apparent when comparing the kernels for a 51 sample Hann and Hamming window using Matlab/Octave. Note the higher first sidelobe level with Hann but significantly greater rejection overall:

Kernels

So bottom line, what I think was missing from the OP's table of reference but an important consideration is the rate of side-lobe roll-off. This is of particular concern with multisampling applications since there can be many alias bands that fold-in, so a rapid roll-off helps minimize noise growth. Also in the interest of minimizing overall noise in the presence of AWGN (only) a faster roll-off at the expense of a higher first lobe could be preferred.

Additional Notes of Related Interest:

Personally, I would not use either window for filter design. If any window, I would use the Kaiser or DPSS windows, or instead of windowing design the FIR filter with the least squares algorithm (firls in Matlab, Octave and Python's scipy.signal). See FIR Filter Design: Window vs Parks McClellan and Least Squares for the related discussion.

I convolved a 26 sample Hann with a 26 Hamming to come up with an alternate 51 sample "Hann-Hamming" with the following result (note the label is incorrect in the graphic, this should be "Hann-Hamming" not "Hann-Hanning"):

comparative plot Hann-Hamming, Hann, Hamming

UPDATE: This Hann-Hamming does not (generally) out-perform a Kaiser window of similar main-lobe width:

Hann-Hamming vs Kaiser

I then tried what I call a "SuperKaiser" where I convolved two shorter length Kaiser windows to come up with an alternate 51 tap window with the following result. This was done by convolving Kaiser(26,5.5) with Kaiser(26,5.5) such that SuperKaiser(51,5.5)= conv(kaiser(26,5.5),kaiser(26,5.5)). At first glance it appears to generally outperform the kaiser(51,12), matching the main lobe width and providing superior stopband rejection over most of the stopband. An integration of total stopband noise under the assumption of AWGN is of interest to see if this new window is superior under that condition (does the relative area under the first two sidelobes where SuperKaiser is inferior completely offset all the remaining stopband improvement?). If I have time I will add that assessment. Interesting! As @A Concerned Citizen astutely pointed out, as we keep convolving we should approach a Gaussian window.

SuperKaiser

$\endgroup$
10
  • $\begingroup$ Hi Dan, thanks for your answer. That table has something that looks weird to me. I believed that the Hann window was defined univocally. In that paper, it appears that it has a variable parameter $\alpha$. Where does it come from? If we vary $\alpha$, is the window still a Hann function strictly speaking? $\endgroup$
    – Tendero
    Commented Apr 28, 2017 at 13:29
  • $\begingroup$ @Tendero fred harris explains in detail on page 181 in the link section C for the $Cos^{\alpha}(X)$ windows, and there he says the Hann window specifically is with $\alpha =2$. I made that clearer in the answer, thanks! $\endgroup$ Commented Apr 28, 2017 at 13:38
  • $\begingroup$ That intriguing comparison made me repeat it, but I couldn't get the same results. Then I took a closer look and it looks like you didn't closely match Kaiser's parameter. Using the As design, I got very close with As=108.5 for N=32 and N[hann]=17, N[ham]=16, but the sidelobes of the convolved window are unequal and they wobble above Kaiser's. I've seen people "mingling" two windows, or more, but either as arithmetic or geometric mean, never convolved. Still, the results are impressive. $\endgroup$ Commented Apr 29, 2017 at 5:55
  • $\begingroup$ @aconcernedcitizen Yes something was not right about that and indeed was me using too quickly 30 and 31 to create an "equivalent" 51 tap window: What I was doing was comparing a 60 sample window to a 51 tap Kaiser- Not fair! I updated the post by convolving 26 and 26 which results in 51 samples which would then be a fair comparison, and of course Kaiser appears to win for overall performance (although I did not go through an integrate total stopband noise). Convolving seems a natural choice as it results in multiplying the frequency responses, equivalent to cascading two windows. $\endgroup$ Commented Apr 29, 2017 at 13:08
  • $\begingroup$ @aconcernedcitizen This prompted me to try convolving two Kaisers with a very interesting result. If the overall noise performance under AWGN conditions is better, then of further interest would be to convolve four Kaiser's etc perhaps ultimately illuminating a new window that is bult up from the convolution of a 2 sample base-function? What we do see as expected from the convolution is a faster stopband roll-off at the expense of higher close-in side-lobes. This is not unlike the $\alpha$ first mentioned for the expanded Hann functions, so likely nothing new- but still interesting to me. $\endgroup$ Commented Apr 29, 2017 at 13:23
2
$\begingroup$

If there is an attacker with knowledge of the window and trying to focus noise spectrum so as to minimize your S/N, then a minimax solution, such as a Hamming window, might be the optimal counter.

Most noise tends not to be so purposefully malicious, rendering a minimax solution less optimal, at least statistically speaking.

$\endgroup$
0

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.