DSPRelated.com
Forums

formula for hanning filter

Started by Jashmathi October 15, 2003
Hi All
Can anyone plz tell me the correct formula for hanning filter to
remove gibbs ringing.

(0.5+0.5*cos(pi*m/n)) raised to the power of p.
is this the formula?

or 0.5+0.5*cos(2*pi*m/n)

what is the difference between using pi ans 2 * pi

thanks

Jashmathi wrote:
> Hi All > Can anyone plz tell me the correct formula for hanning filter to > remove gibbs ringing. > > (0.5+0.5*cos(pi*m/n)) raised to the power of p. > is this the formula? > > or 0.5+0.5*cos(2*pi*m/n) > > what is the difference between using pi ans 2 * pi > > thanks
"Hanning" is sloppy terminology. It is "Hann", named after von Hann. w[k+1] = 0.5 * ( 1 - cos( 2*pi*k/(n-1) ), k = 0, 1, .. n-1 Good luck, OUP
Perhaps it really should be called the "von Hann" window? Does it really
matter? We could call it the "cosine-squared" window, as I believe some
physicists like to do, and cut Herr von Hann out completely.

                "Can't we all just get along?" -  Rodney King

Note that the relationship between max(k) and n may be slightly different
depending on the window's use (windowing filter response, windowing data for
FFT of same size as window,  windowing data for FFT larger than window,
...). The cosine-squared window as used can be either symmetric or
non-symmetric.

Also note that MATLAB defines the window to not include any zero endpoints,
so MATLAB's definition of both the window and the length of the window may
not be what you expect.

Dirk

Dirk A. Bell
DSP Consultant

"One Usenet Poster" <me@my.computer.org> wrote in message
news:vota3h9gqpf8ef@corp.supernews.com...
> > > Jashmathi wrote: > > Hi All > > Can anyone plz tell me the correct formula for hanning filter to > > remove gibbs ringing. > > > > (0.5+0.5*cos(pi*m/n)) raised to the power of p. > > is this the formula? > > > > or 0.5+0.5*cos(2*pi*m/n) > > > > what is the difference between using pi ans 2 * pi > > > > thanks > > "Hanning" is sloppy terminology. It is "Hann", named after von Hann. > > w[k+1] = 0.5 * ( 1 - cos( 2*pi*k/(n-1) ), k = 0, 1, .. n-1 > > > Good luck, > OUP >
Dirk Bell wrote:

   ...

> > Also note that MATLAB defines the window to not include any zero endpoints, > so MATLAB's definition of both the window and the length of the window may > not be what you expect. > > Dirk >
Matlab has the right idea here. It's plain stupid to discard two perfectly valid data points just to keep the equations "neat". This applies to any window with zero-value endpoints, not just cosine&#4294967295;. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;

Dirk Bell wrote:

> Perhaps it really should be called the "von Hann" window? Does it really > matter? We could call it the "cosine-squared" window, as I believe some > physicists like to do, and cut Herr von Hann out completely.
I feel that math and science are advanced through the use of precise terminology. So yes, I do believe it matters. OUP
Right you are. Cosine-squared window it is.

Dirk

"One Usenet Poster" <me@my.computer.org> wrote in message
news:votr95llateu20@corp.supernews.com...
> > > Dirk Bell wrote: > > > Perhaps it really should be called the "von Hann" window? Does it really > > matter? We could call it the "cosine-squared" window, as I believe some > > physicists like to do, and cut Herr von Hann out completely. > > I feel that math and science are advanced through the use of precise > terminology. So yes, I do believe it matters. > > OUP >

Dirk Bell wrote:

> Right you are. Cosine-squared window it is. > > Dirk
Agreed. Now we have to convince the thousands of engineers and scientists who still use the inappropriate term "Hanning". Furthermore, cosine should be called by its true name: "complementi sinus". So the window function shall henceforth be called "complementi sinus squared". OUP
Probably should crank in some reference to any time offset too, and some
indication of whether you are using the symmetric or implied-symmetric
version. In Latin, of course.

As for convincing the engineers, half of them (in the US) will be in other
fields in two years at the current rate, so in the US, just change it in the
new text books, don't bother with the retraining.

Seriously, if Herr von Hann did not name the window himself, then who really
has the right to say what the name should be? Perhaps "Hann window" should
be replaced by "Hann's window", which would seem to be totally accurate...
unless Hann came up with more than one window, which might require that a
number or other method of unique specification be associated with it.

It seems the one major use of the phrase "Hann window" is in sentences
similar to "It isn't really the Hanning window, it's the Hann window,
because the guy's name was von Hann, not Hanning."  I've never been in a
conversation where saying this sentence contributed anything.

You know, we call deep fried, or baked, string potatoes "French fries", when
everyone knows they have nothing to do with the French, but somehow we still
get the message across clearly. How does that work?

Dirk

"One Usenet Poster" <me@my.computer.org> wrote in message
news:vou29v52v8du87@corp.supernews.com...
> > > Dirk Bell wrote: > > > Right you are. Cosine-squared window it is. > > > > Dirk > > Agreed. Now we have to convince the thousands of engineers and > scientists who still use the inappropriate term "Hanning". > > Furthermore, cosine should be called by its true name: "complementi > sinus". So the window function shall henceforth be called "complementi > sinus squared". > > OUP > >
One Usenet Poster wrote:

> > > Dirk Bell wrote: > >> Right you are. Cosine-squared window it is. >> >> Dirk > > > Agreed. Now we have to convince the thousands of engineers and > scientists who still use the inappropriate term "Hanning". > > Furthermore, cosine should be called by its true name: "complementi > sinus". So the window function shall henceforth be called "complementi > sinus squared". > > OUP > >
When Latinizing, shouldn't "squared" become "quadraticus"? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Dirk Bell wrote:

   ...


> You know, we call deep fried, or baked, string potatoes "French fries", when > everyone knows they have nothing to do with the French, but somehow we still > get the message across clearly. How does that work? >
... Everyone doesn't know. If they did, they wouldn't have changed the name to "freedom fries" a while back. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;