DSPRelated.com
Forums

six DFT window functions applied to a 64 point DFT

Started by Blocher's spokesman April 22, 2008
Hi,

I have created a new flash program that shows how windowing is used to 
reduce leakage in a DFT.

The program also discussed magnitude and power representation of the DFT 
coefficients.

The program allows you to run a 64 point DFT.  The DFT allows two frequency 
inputs with variable gain on the input levels of each frequency.  You can 
apply six window functions and vary the signals in real time and see how the 
windowing works on each function.

http://www.fourier-series.com/fourierseries2/DFT_tutorial.html


Brent 


On Apr 22, 7:38 pm, "Blocher's spokesman" <n...@nono.com> wrote:
> Hi, > > I have created a new flash program that shows how windowing is used to > reduce leakage in a DFT. > > The program also discussed magnitude and power representation of the DFT > coefficients. > > The program allows you to run a 64 point DFT. The DFT allows two frequency > inputs with variable gain on the input levels of each frequency. You can > apply six window functions and vary the signals in real time and see how the > windowing works on each function. > > http://www.fourier-series.com/fourierseries2/DFT_tutorial.html > > Brent
The window stuff looks good and pretty much works for the purposes you have stated. Please feel free to consider the following comments to be at the level of nit-picking: 1) Put labels on the pages so viewers can talk about them. Titles are a useful thing. I'll call the windows pages 1, 2, and 3 here but page numbers don't tell us that we're even looking at the same presentation. 2) On the flattop window expression, page 3, normalize by the sum of the absolute values of the coefficients to get to the same form as your Hann, Hamming and Blackman expressions. That form has a number of uses. The first term is the coherent gain of the window for example. 3) The flattop window seems to have a problem. The peak response (with a single tone) is only nearly flat when the tone frequency is set midway between bin centers and has ripple when the tone is bin centered. 4) On the 3rd page, the upper right corner display of magnitude vs frequency can be misleading. One of the reasons is that the resolution of the frequency slider is coarse. On page 2, for the similarly positioned display the cursor range only covers 0 to 16 instead of 0 to 32 and works OK. (It also makes values appear to approach zero quickly because it is linear, not logarithmic.) On the third page, the coarse frequency setting of the cursor makes it difficult to set a single tone to a bin center. Most bins you can't do it very accurately. With the rectangular window, all magnitudes should become very small except for the bin centered tone. It's hard to adjust to show this. With a bin centered tone (freq 15 is about the best to use with your display) for all of the windows except the triangular the bins away from the tone fall to zero much more quickly that the envelope of the response because the frequency samples frequencies are near zeros of the response. This gives the false appearance of much better window response than is actually achieved. It's hard to adjust to either bin center or halfway in between to visualize the range of the response. (The responses at halfway between bin frequencies are near the envelope of the response.) One way to get around this is to display only the 0 to 32 frequency range, zero extend your windowed data, plot the bin centered data in red as you do now, plot the intermediate bins in black to differentiate them. this would double the sampling density of the frequency axis but have the same spacing between samples as the current symmetric, redundant display. Nice job. Dale B. Dalrymple http://dbdimages.com
"dbd" <dbd@ieee.org> wrote in message 
news:93971c79-c287-4c15-be69-1aa7462b6af3@59g2000hsb.googlegroups.com...
> > 1) Put labels on the pages so viewers can talk about them. Titles are > a useful thing. I'll call the windows pages 1, 2, and 3 here but page > numbers don't tell us that we're even looking at the same > presentation. >
I'll get to that later
> 2) On the flattop window expression, page 3, normalize by the sum of > the absolute values of the coefficients to get to the same form as > your Hann, Hamming and Blackman expressions. That form has a number of > uses. The first term is the coherent gain of the window for example. > > 3) The flattop window seems to have a problem. The peak response (with > a single tone) is only nearly flat when the tone frequency is set > midway between bin centers and has ripple when the tone is bin > centered.
GREAT CATCH!. Thanks for your feedback here. I was kind of bugged by that little ripple, but since I had no frame of reference, I just let it go, because it looked like a plausable response. Well, this morning I went and relooked at everything, and it turned out I put in 2pi where it should have been 6pi. It looks better now (so, certainly in this case, it was NOT nit picking - thanks!)
> > 4) On the 3rd page, the upper right corner display of magnitude vs > frequency can be misleading. One of the reasons is that the resolution > of the frequency slider is coarse. On page 2, for the similarly > positioned display the cursor range only covers 0 to 16 instead of 0 > to 32 and works OK. (It also makes values appear to approach zero > quickly because it is linear, not logarithmic.) On the third page, the > coarse frequency setting of the cursor makes it difficult to set a > single tone to a bin center. Most bins you can't do it very > accurately. With the rectangular window, all magnitudes should become > very small except for the bin centered tone. It's hard to adjust to > show this. With a bin centered tone (freq 15 is about the best to use > with your display) for all of the windows except the triangular the > bins away from the tone fall to zero much more quickly that the > envelope of the response because the frequency samples frequencies are > near zeros of the response. This gives the false appearance of much > better window response than is actually achieved. It's hard to adjust > to either bin center or halfway in between to visualize the range of > the response. (The responses at halfway between bin frequencies are > near the envelope of the response.) One way to get around this is to > display only the 0 to 32 frequency range, zero extend your windowed > data, plot the bin centered data in red as you do now, plot the > intermediate bins in black to differentiate them. this would double > the sampling density of the frequency axis but have the same spacing > between samples as the current symmetric, redundant display. >
Not nulling out the tones on frequency has bugged me too. I even stretched out the sliders to get more resolution. I will further look at your suggestions on this and see if I can get better resolution, somehow.
> Nice job.
Thanks for your thoughtful comments
> > Dale B. Dalrymple > http://dbdimages.com
PS When I saw your post I was afraid you were going to get me on the log stuff. I spent a lot of time thinking about your comments on this.