I'm looking at comparing FFT's of a batch of signals. Right now I'm choosing how to window the input data. I noticed that none of the _common_ windows have flat top except for the "rectangular window". Is there a reason other than the simplicity of calculating the window function? I was thinking about piecewise continuous with continuous first derivative.
Why no flat topped windows?
Started by ●October 28, 2007
Reply by ●October 28, 20072007-10-28
On 28 Okt, 14:37, Richard Owlett <rowl...@atlascomm.net> wrote:> I'm looking at comparing FFT's of a batch of signals. > Right now I'm choosing how to window the input data. > I noticed that none of the _common_ windows have flat top except for the > "rectangular window". > > Is there a reason other than the simplicity of calculating the window > function? I was thinking about piecewise continuous with continuous > first derivative.There is the Tukey window, which I think has a "flat" top. FIR filter design by window functions is all but obsolete after methods like Parks-McClellan were developed. So the detailed analysis of window functions is not all that interesting these days... Rune
Reply by ●October 28, 20072007-10-28
Rune Allnor wrote:> On 28 Okt, 14:37, Richard Owlett <rowl...@atlascomm.net> wrote: > >>I'm looking at comparing FFT's of a batch of signals. >>Right now I'm choosing how to window the input data. >>I noticed that none of the _common_ windows have flat top except for the >>"rectangular window". >> >>Is there a reason other than the simplicity of calculating the window >>function? I was thinking about piecewise continuous with continuous >>first derivative. > > > There is the Tukey window, which I think has a "flat" top. > > FIR filter design by window functions is all but obsolete > after methods like Parks-McClellan were developed. So the > detailed analysis of window functions is not all that > interesting these days... > > Rune >OK? or perhaps ???? ;) I understood windowing data prior to doing an fft was required to reduce spectral leakage. What did I say that brought filters to mind?
Reply by ●October 28, 20072007-10-28
On Oct 28, 9:37 am, Richard Owlett <rowl...@atlascomm.net> wrote:> I'm looking at comparing FFT's of a batch of signals. > Right now I'm choosing how to window the input data. > I noticed that none of the _common_ windows have flat top except for the > "rectangular window". > > Is there a reason other than the simplicity of calculating the window > function? I was thinking about piecewise continuous with continuous > first derivative.a window i suggested (in an AES article in 1995) for use in audio splicing (i like to think of a window as the concatination of two splicing functions, a fade up followed by a fade down) is: w(t) = (1/2)*( 1 + (9/8)*cos(pi*t) - (1/8)*cos(3*pi*t) ) for -1 <= t <= +1 ( w(t) = 0 for |t| > 1 ) it's a sorta extension to the Hann window,: w(t) = (1/2)*( 1 + cos(pi*t) ) for -1 <= t <= +1 ( w(t) = 0 for |t| > 1 ) the Hann window is continuous everywhere in the 0th and 1st derivative with a discontinuity in the 2nd derivative at the two points where the operative part of the window is appended to silence (at t=-1 and t= +1). this "flattened Hann" (what i call it until somebody points to a prior reference) is continuous everywhere through the 2nd derivative and has discontinuity at the 3rd and higher derivatives at +1 and -1. r b-j
Reply by ●October 28, 20072007-10-28
Richard Owlett wrote:> I'm looking at comparing FFT's of a batch of signals. > Right now I'm choosing how to window the input data. > I noticed that none of the _common_ windows have flat top except for the > "rectangular window". > > Is there a reason other than the simplicity of calculating the window > function? I was thinking about piecewise continuous with continuous > first derivative.A continuous and *finite* first derivative? Think what that implies. Points of sharp curvature -- i.e., large second derivative -- aren't helpful. A window is almost always computed off line. Simplicity isn't a major consideration. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●October 28, 20072007-10-28
On Oct 28, 6:37 am, Richard Owlett <rowl...@atlascomm.net> wrote:> I'm looking at comparing FFT's of a batch of signals. > Right now I'm choosing how to window the input data. > I noticed that none of the _common_ windows have flat top except for the > "rectangular window".I've also seen trapezoidal windows mentioned. The flatter the top in proportion to the total, the steeper the sides need to be for a side of similar shape. Steeper sides usually correspond to more high frequency content in the transform, which is often what one doesn't want from a window function. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Reply by ●October 28, 20072007-10-28
Richard Owlett wrote:> I'm looking at comparing FFT's of a batch of signals. > Right now I'm choosing how to window the input data. > I noticed that none of the _common_ windows have flat top except for the > "rectangular window". > > Is there a reason other than the simplicity of calculating the window > function?I played around with this idea years ago and my experimentation showed that all the the flat top windows I could find or think of suffered from worse spectral leakage effects that all of the traditional windows. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- Complex problems have simple easy to understand wrong answers.
Reply by ●October 28, 20072007-10-28
Erik de Castro Lopo wrote:> Richard Owlett wrote: > >> I'm looking at comparing FFT's of a batch of signals. >> Right now I'm choosing how to window the input data. >> I noticed that none of the _common_ windows have flat top except for the >> "rectangular window". >> >> Is there a reason other than the simplicity of calculating the window >> function? > > I played around with this idea years ago and my experimentation showed > that all the the flat top windows I could find or think of suffered > from worse spectral leakage effects that all of the traditional windows.That shouldn't be too surprising. Windows suppress ringing in filters, while they reduce spillover in FTs. The two actions are related, so one can reason about both from either vantage point. In filters, steeper sides make for more ringing. In windows, steeper sides make for less suppression of ringing. The more the top stays flat, the steeper the sides need to be. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●October 28, 20072007-10-28
On Oct 28, 12:34 pm, robert bristow-johnson <r...@audioimagination.com> wrote:> On Oct 28, 9:37 am, Richard Owlett <rowl...@atlascomm.net> wrote: > > > I'm looking at comparing FFT's of a batch of signals. > > Right now I'm choosing how to window the input data. > > I noticed that none of the _common_ windows have flat top except for the > > "rectangular window". > > > Is there a reason other than the simplicity of calculating the window > > function? I was thinking about piecewise continuous with continuous > > first derivative. > > a window i suggested (in an AES article in 1995) for use in audio > splicing (i like to think of a window as the concatination of two > splicing functions, a fade up followed by a fade down) is: > > w(t) = (1/2)*( 1 + (9/8)*cos(pi*t) - (1/8)*cos(3*pi*t) ) > > for -1 <= t <= +1 ( w(t) = 0 for |t| > 1 ) > > it's a sorta extension to the Hann window,: > > w(t) = (1/2)*( 1 + cos(pi*t) ) > > for -1 <= t <= +1 ( w(t) = 0 for |t| > 1 ) > > the Hann window is continuous everywhere in the 0th and 1st derivative > with a discontinuity in the 2nd derivative at the two points where the > operative part of the window is appended to silence (at t=-1 and t= > +1). > > this "flattened Hann" (what i call it until somebody points to a prior > reference) is continuous everywhere through the 2nd derivative and has > discontinuity at the 3rd and higher derivatives at +1 and -1. > > r b-jFor a quick comparison of Hann and flattened Hann: Hann Transform Size: 256 Bins Coherent Gain: 0.5 Eff. Noise BW: 1.5 Bins Scalloping/Wcae: -1.4236 dB -3 dB BW: 1.45 Bins Mainlobe Width: 4 Bins -6 dB BW: 2.02 Bins Max. Sidelobe: -31.47 dB -60 dB BW: 13.3 Bins Max. SSL BW: 3.75 Bins SL Falloff: -18.06 dB/Octave Bin 1 SL Intcpt:-9.92 dB flattenedHann Transform Size: 256 Bins Coherent Gain: 0.5 Eff. Noise BW: 1.6406 Bins Scalloping/Wcae: -1.1789 dB -3 dB BW: 1.58 Bins Mainlobe Width: 4 Bins -6 dB BW: 2.19 Bins Max. Sidelobe: -21.81 dB -60 dB BW: 9.66 Bins Max. SSL BW: 3.56 Bins SL Falloff: -30.1 dB/Octave Bin 1 SL Intcpt: 9.43 dB The flattened version rolls off at -30 dB/oct versus -18 dB/oct. for Hann, but in the region from 2 to 4 bin widths from the bin center, response of the flattened version can be almost 20 dB higher than the Hann response; the typical/near far window tradeoff. Dale B. Dalrymple http://dbdimages.com http://stores.lulu.com/dbd
Reply by ●October 28, 20072007-10-28
"Ron N." <rhnlogic@yahoo.com> wrote in message news:1193607019.493926.234540@z24g2000prh.googlegroups.com...> On Oct 28, 6:37 am, Richard Owlett <rowl...@atlascomm.net> wrote: >> I'm looking at comparing FFT's of a batch of signals. >> Right now I'm choosing how to window the input data. >> I noticed that none of the _common_ windows have flat top except for the >> "rectangular window". > > I've also seen trapezoidal windows mentioned. The flatter > the top in proportion to the total, the steeper the sides > need to be for a side of similar shape. Steeper sides > usually correspond to more high frequency content in the > transform, which is often what one doesn't want from a window > function. >heh ..... that would be the convolution of two gate functions. When they are the same length then you get a triangular result. When one is narrower than the other, you get a flat top. When one is much narrower than the other you get quite a wide flat top. Now let's look in frequency: Multiply the ffts of those gate functions - which are sinc functions. - If the gates are the same length and you have a triangular function then the fft is a sin^2(x)/x^2. The decay is then proportional to 1/f^3 as I recall ... instead of 1/f for the sinc. The decay is related to the order of the zero at the edge in time. - If the gates are very different in length then you have a long flat top and linearly tapered ends - half a triangle. In this case the fft of the narrow one is wide and the fft of the wide one is narrow. Those are multiplied together so you will have the narrow sinx/x shape but while with more rapidly decaying tails than the sinc and about the same first sidelobes as the narrow sinc. Another variation is to use a cosine taper at the edges. The widest version is a raised cosine with DFT of [1/4 1/2 1/4]. Narrowing the cosine taper at the ends and adding a flat top gets the flat-topped versions. Maybe not as good in frequency as the trapezoidal one. You might ask a couple of questions: 1) Why window at all? 2) Why care about a flat top if you do? Fred






