0
$\begingroup$

Anyone can explain me about how measure side lobe roll-off rate of kaiser window from Spectrum in matlab where side lobe roll-off rate is the asymptotic decay rate, in decibels per octave of frequency.

How adjust Frequency axis if length of FFT = "500" by padding "473" zeros with length of window= "27" to frequency in Hz.

$\endgroup$
2
$\begingroup$

It would be helpful to study the following 2 references:

[1] F. J. Harris, “On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform,” Proc. IEEE, vol. 66, no. 1, Jan. 1978, pp. 51-83. It is also available at: http://web.mit.edu/xiphmont/Public/windows.pdf

[2] L. R. Rabiner, B. Gold, Theory and Application of Digital Signal Processing, Englewood Cliffs, NJ, Prentice-Hall, 1975. (Section 3.11 on pps. 93-94 refer to the Kaiser window, and Figs. 3.15 (p. 96) and 3.16 (p. 97) show a time and frequency domain 257 point Kaiser window, respectively).

Reference [1] above is the classic windows paper by Harris. It is a good learning experience to compute the examples of windows from that paper and try to duplicate his graphs.

First order of business – is it a Kaiser window as shown in ref. [2], or a Kaiser-Bessel window, as shown in ref. [1]? No problem – both authors use Bessel functions when calculating the window, so either term is probably correct, depending on who you talk to.

But wait a minute – the window calculation in [1] (eq. 46a, p. 73) is different than in [2] (eq. 3.54 on p. 94)! One of them goes from -(N-1)/2 to (N-1)/2 and the other goes from 0 to <= |N/2|. If the former is to be calculated correctly, N has to be an odd number, and for the latter, N has to be an even number. And yet, for both, adding in the zero point means that BOTH windows will have an odd number of total points! And as if that weren't bad enough, the equations differ in other ways – [1] uses pi*alpha, while [2] uses beta. And a denominator in [2] uses an N-1, whereas [1] uses N. So which one is correct?

The answer lies in: what is the window being used for? In [2], it is being used for a FIR filter. As clearly noted in [1, p. 52, two paragraphs beginning with: “Since the DFT essentially considers sequences to be periodic, ...], windows for FIR filters have a different symmetry from those used in a DFT, and the latter have to be shifted by N/2 points. The author of [1] identifies this as “a major source of window misapplication.”

So you'd better be sure that the window you're calculating is the right one (e.g.: eq. 46a in [1], appropriately right-shifted, and with the proper symmetry).

Another thing you have to be careful about is whether your window point calculations are for an odd or even N. Whenever you see a -(N-1)/2 to (N-1)/2 range, it's probably odd (try to plug an even N into the indexes, and the end points are fractions). If you see an N/2 somewhere, it's most likely for an even N.

As I recall, when calculating eq. 46a in [1], I programmed it using -(N-1)/2 to (N-1)/2 and then right shifted the result. I wasn't quite sure I had the symmetry right, but after experimenting with a few different ways of calculating things, I concluded that I was using enough points such that I got only minor differences in the end results when trying different calculations.

Windows can be confusing at times. Perhaps the best thing to do is to read [1] again and again and again – there are all kinds of things that you may not understand at first, and it takes time to become comfortable with some difficult concepts. And it helps to know about papers written by other authors that correct some of the minor errors in [1].

As for zero-padding, if you do so (presumably by appending zeros to your time domain window), it will provide you with an interpolation of your frequency domain points. I usually do that because it allows me to see the sidelobe structure more clearly. Padding by 2 or 4 or 8, etc. is typical.

As for plotting – that's another area where you can make a lot of mistakes. First, compute magnitude squared of your FFT results. Then, normalize the data such that all your amplitudes are in dB relative to W(0). Something like 10log10[W(n)/W(0)] (depending on how you're scaling things). Your highest plot point should be W(0) at zero dB, and all the rest negative. This is the way windows are almost always depicted in the frequency domain.

As for the frequency axis, well, you can plot versus log(f) – it would make it easier to see the asymptotic decay of the sidelobes.

Of course, you could always cheat (not recommended) by using the approximation for the frequency response shown in eq. 46b on p. 73 in [1]. Or just look at the table for Kaiser-Bessel on p. 55, which shows a -6 dB roll-off rate for the various Kaiser windows.

P.S. - I have no idea who downvoted this question – seems to me to be the type of thing that a lot of practitioners would want to know.

$\endgroup$
2
  • $\begingroup$ Its seems sound can help to express some steps in MATLAB code $\endgroup$ – Jatinder Singh Brar May 10 '14 at 12:51
  • $\begingroup$ @user3436815 - I program with C or C++, and I don't use MATLAB. But no matter how it's done, I think the steps will be much the same: 1) generate window points (use the proper equation), 2) zero-pad to selected size (call it M), 3) take M point FFT, 4) compute mag squared of results (call them W(m) ), 5) normalize results: divide all W(m) by the largest (ie: W(0)), 6) take 10*logarithm of results (to get M values of dB), 7) plot results as dB vs log(f). Your first point shout be at dB = 0 and f = 0, and everything else should be negative. $\endgroup$ – Kevin McGee May 10 '14 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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