Skip to main content
Terms of Service
Topic: FFT Windowing
(Read 4160 times)
0 Members and 1 Guest are viewing this topic.
Joined: 14 April, 2002
05 June, 2003, 12:42:22 PM
I am in the process of trying to understand FFT analysis as it pertains to audio, and I have come across the concept of FFT windowing. Am I understanding it correctly that the main use of FFT windowing is to get better results in the frequency domain (ex. minimizing Gibbs Phenomenon) ?
It seems that one of the most common window functions used is the Hamming window. If I want to use the Hamming window do I just apply and upward slope from the first sample in my data chunk to the center sample and a downward slope from the center sample to the last sample? (This is what the graph in front of me shows) Or is there an explicit mathematical method I am not aware of?
Edit: Is the Hamming window good for complex signals too? (the example I read about had only one frequency involved)
: 05 June, 2003, 12:43:59 PM by RiskyP
Joined: 29 October, 2002
05 June, 2003, 01:15:58 PM
for info on the Hamming window.
Joined: 29 August, 2002
05 June, 2003, 03:01:46 PM
FFT windowing is required to minimize bin "bleed" or "leakage" that occurs in frequency components that are not related to the sampling rate and fall outside the nearest FFT frequency bin. This naturally occurs in all normal audio. An example of where windowing is not required is a test tone that would be used to measure distortion in a conversion process, where the test tone is related to the sampling rate and falls into one of the FFT's frequency bins.
Your windowing example would be "triangular" windowing (assuming a constant slope).
Try this link...
Joined: 14 April, 2002
05 June, 2003, 03:22:27 PM
Thanks for the link, but I must say, I don't really understand what a "frequency bin" is, or any other sort of "bin" in audio. What do you mean by "bin" and "leakage"?
I will read the link and try to get it from there.
Joined: 03 October, 2001
05 June, 2003, 04:13:12 PM
Let me express the windowing issue in different terms.
Windowing is needed i.e. in generating lowpass filters. In frequency domain a "lowpass filter kernel" is basically a bunch of scale factors. In frequency domain, such signal has values of 1 in the passband and 0 in the stopband. So it looks something like this:
Mathematically a perfect lowpass filter kernel can be obtained by the sinc function (sin x / x) but the problem is that in time-domain, the sinc function continues to positive and negative infinity, asymptotically approaching zero. But in real world, signals always must have finite size, and just plain cutting the signal edges away (=truncating) could distort the signal noticably.
This is where window functions step in. The purpose of the windowing functions is to make that truncation smoother. A windowing function usually looks like a downward-open parabel or a triangle (like the letter A). Basically the windowing function yields again a bunch of scale factors. The filter kernel (this could be i.e. 1024 points) are multiplied with the points generated by the window function, thus lowering the signal amplitude at the "edges" of the signal. This process hopefully makes the lowpass filter kernel more accurate. At least more accurate than just truncating the signal.
However, all of the windowing functions do add some distortion to the signal (remember, in ideal world we don't need windowing) and it depends on the situation which window function is the "best". Some common windowing functions are triangle, Hanning, Hamming and Blackman. The Hamming window you mentioned is a good all-round window function, but the others may be more suitable for a given situation.
This following chapter of a freely downloadable DSP book will explain the whole thing in detail, yet comprehensibly:
Added a phrase "in time domain".
Now you already have two applications of windowing
But FFT frequency analysis relies heavily on lowpass, highpass and bandpass filters.
: 05 June, 2003, 04:31:39 PM by niktheblak
Joined: 29 August, 2002
05 June, 2003, 04:19:10 PM
A frequency bin is simply an FFT output value which represents a specific frequency. If you perform, for instance, a 16-point FFT, you're computing 8 frequency components equally spaced between DC and Nyquist (Fs/2). You now have an 8-frequency spectrum analysis of the signal. Frequencies in the source data that fall outside the 8 frequency bins or slots bleed onto adjacent bins. In order to reduce the bleeding and improve resolution, windowing of the source data is used.
powered by ElkArte 1.0.6
SimplePortal 2.4 © 2008-2014