COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

formula for hanning filter

• Email
• Follow

```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
```
 0

See related articles to this posting

```
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

```
 0

```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
>

```
 0

```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�.

Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������

```
 0

```
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

```
 0

```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
>

```
 0

```
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

```
 0

```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
>
>

```
 0

```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.
�����������������������������������������������������������������������

```
 0

```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.
�����������������������������������������������������������������������

```
 0

```Jerry,

I don't think that was the point. Some people just didn't want to use the
'F' word (French). Only place I know the name was actually changed was the
Congressional Cafeteria/Dining Room. Symbolism and ignorance don't have to
coexist.

Personally, I never had any "Freedom Fries", was never offered any, never
saw any sold or advertized.  I only saw the "French" ones, that have nothing
to do with France.

Dirk

"Jerry Avins" <jya@ieee.org> wrote in message
news:bmn9lr\$cpq\$3@bob.news.rcn.net...
> 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.
> �����������������������������������������������������������������������
>

```
 0

```Dirk Bell wrote:
> Jerry,
>
> I don't think that was the point. Some people just didn't want to use the
> 'F' word (French). Only place I know the name was actually changed was the
> Congressional Cafeteria/Dining Room.

I heard on NPR the other day that they have reverted to calling them
"french fries" again.

>
> Personally, I never had any "Freedom Fries", was never offered any, never
> saw any sold or advertized.  I only saw the "French" ones, that have nothing
> to do with France.

The French would probably be delighted if people would quit calling
French cut, deep fried potatoes "french fries."  They see them as an
abomination.  I imagine they were high-fiving one another when Congress
announced the renaming scheme.

--
Jim Thomas            Principal Applications Engineer  Bittware, Inc
jthomas@bittware.com  http://www.bittware.com          (703) 779-7770
Things could be a lot better around here, but worse is more likely - Calvin

```
 0

```Jim,

I think the people who had it the most difficult were the high school kids.

They had to convert to "Freedom kissing". Just doesn't sound as good.

Dirk

"Jim Thomas" <jthomas@bittware.com> wrote in message
news:vovs85c9c85n6c@corp.supernews.com...
> Dirk Bell wrote:
> > Jerry,
> >
> > I don't think that was the point. Some people just didn't want to use
the
> > 'F' word (French). Only place I know the name was actually changed was
the
> > Congressional Cafeteria/Dining Room.
>
> I heard on NPR the other day that they have reverted to calling them
> "french fries" again.
>
> >
> > Personally, I never had any "Freedom Fries", was never offered any,
never
> > saw any sold or advertized.  I only saw the "French" ones, that have
nothing
> > to do with France.
>
> The French would probably be delighted if people would quit calling
> French cut, deep fried potatoes "french fries."  They see them as an
> abomination.  I imagine they were high-fiving one another when Congress
> announced the renaming scheme.
>
> --
> Jim Thomas            Principal Applications Engineer  Bittware, Inc
> jthomas@bittware.com  http://www.bittware.com          (703) 779-7770
> Things could be a lot better around here, but worse is more likely -
Calvin
>

```
 0

```On 15 Oct 2003 15:49:52 -0700, jashmathi@yahoo.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

Hi,

w = 0.5 -0.5*cos(2*pi*m/n)

Notice the minus sign.

[-Rick-]

```
 0

```ricklyon@REMOVE.onemain.com (Rick Lyons) wrote in message news:<3f9154e7.86059796@news.west.earthlink.net>...
> On 15 Oct 2003 15:49:52 -0700, jashmathi@yahoo.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
>
> Hi,
>
>   w = 0.5 -0.5*cos(2*pi*m/n)
>
> Notice the minus sign.
>
> [-Rick-]

The whole thing hinges on your indices.  What is "m" in your line up
of sequence values?
The difference between using pi and 2*pi has a similar answer.

Take this:
(0.5+0.5*cos(pi*m/n)) raised to the power of p

Is there a value where m=n?  You didn't say.
Is there a value where m=2*n?  You didn't say.
Better to describe your situation fully:

(0.5+0.5*cos(pi*m/n)) raised to the power of p
x(m)=(0.5+0.5*cos(pi*m/n))
for n a positive, real integer
[1] for 0<=m<=n    perhaps????
[2] for 1<=m<=n    perhaps????
Then we can say something about pi or 2*pi.
Does the function represent half the function of interest or the whole
thing?

If [1] above applies, then using pi will only take the functon from
1.0 to 0 and, depending on what this represents could be half of a
symmetrical function.
Using 2*pi in the same, it will go from 1.0 to zero to 1.0 - which
might be perfectly appropriate for a frequency domain function that
needs to be 1.0 at f=0 and f=fs.  (and where you would drop the last
sample in most FFT programs because it's simply a repetition of the
first sample).

Rick's proposed function using 2*pi is apropriate for the time domain
if time starts at m=0 and ends at m=n.  It defines an appropriate
window over n or n+1 samples with a peak in the center around time
equivalent to n/2.

"Formulas (i.e. expressions or equations) are best if they represent
something that you know about.  You don't get to "know" anything from
a formula unless it's grounded in reality."
E=m*c^2 doesn't do much unless you know what the symbols mean, their
dimensions, maybe even physical context, etc.
Now, I know that in school many of us were rather pushed into doing it
exercises in applied algebra.  The danger is that when the formula
doesn't apply we're stuck.  So then we get motivated to ponder the
formula: "why is it this way?"  "how might it change if the situation
changes like this?", etc.  When we get better at it then we can
develop our own formulas.

know - 'cause we don't know your context of computation or notation
even though we might *think* we do because it seems to be implied.
It's implied because we often think of things aligned in a certain way
- like Rick's expression.

Fred
```
 0

```"Dirk Bell" <dirkman@erols.com> wrote in message news:<bmn4l3\$hl\$1@bob.news.rcn.net>...

> 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.

The story I've heard is that Hamming who wrote several signal processing
texts, came up with a window and the "kind of similarity" between the
names led to people starting to use "Hanning window" instead of anything
more "appropriate", be it in Latin or Akkadian.

> 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.

Not that I ever had that conversation, but it could matter for someone
trying to trace the historical roots of DSP. Knowing that the name to
search for in the libraries is "von Hann" and not "Hanning" could actually
make some difference.

> 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?

Yep, right. There's something sold around here that is known as "Italian
salad". To the best of my knowledge there's mayonese, peas, onions, carrot,
cucumbers and some sort of sausage in there, but no trace of italians[*].
It makes you wonder, doesn't it... ;)

Rune

[*] There is a Norwegian "kids joke" which roughly goes as:
- Hey, waiter! There's no shrimps in my shrimp salad!
- Of course not! You don't expect to find Italians in your Italian
```
 0

```In article <f56893ae.0310181107.1ce7ac09@posting.google.com>,
allnor@tele.ntnu.no (Rune Allnor) wrote:

>Subject: Re: formula for hanning (sic) filter
>From: allnor@tele.ntnu.no (Rune Allnor)
>Date: 18 Oct 2003 12:07:36 -0700
>Newsgroups: comp.dsp
>
>"Dirk Bell" <dirkman@erols.com> wrote in message
>news:<bmn4l3\$hl\$1@bob.news.rcn.net>...
>
>> 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.
>
>The story I've heard is that Hamming who wrote several signal processing
>texts, came up with a window and the "kind of similarity" between the
>names led to people starting to use "Hanning window" instead of anything
>more "appropriate", be it in Latin or Akkadian.

Johm W Tukey is the guilty party. See Blackman and Tukey where there is
a spectral window due to Hamming. It makes the first side lobe small at
a price of not making the further out ones fall off as fast. von Hann
had used 1/4, 1/2, 1/4 smoothing weights in meteorology for smoothing.
Tukey called the action of applying von Hann's weights hanning.

Tukey did many other things including suggesting the contraction of
bit for binary digit and suggesting that "software" might prove to
be more valueable than the hardware that was used to execute 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.
>
>Not that I ever had that conversation, but it could matter for someone
>trying to trace the historical roots of DSP. Knowing that the name to
>search for in the libraries is "von Hann" and not "Hanning" could actually
>make some difference.
>
>> 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?
>
>Yep, right. There's something sold around here that is known as "Italian
>salad". To the best of my knowledge there's mayonese, peas, onions, carrot,
>cucumbers and some sort of sausage in there, but no trace of italians[*].
>It makes you wonder, doesn't it... ;)
>
>Rune
>
>[*] There is a Norwegian "kids joke" which roughly goes as:
>    - Hey, waiter! There's no shrimps in my shrimp salad!
>    - Of course not! You don't expect to find Italians in your Italian

```
 0

```Rune Allnor wrote:

...
>
>
> Yep, right. There's something sold around here that is known as "Italian
> salad". To the best of my knowledge there's mayonese, peas, onions, carrot,
> cucumbers and some sort of sausage in there, but no trace of italians[*].
> It makes you wonder, doesn't it... ;)
>
...

It makes one wonder where all that baby powder and baby oil come from.

Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������

```
 0

```"Rune Allnor" <allnor@tele.ntnu.no> wrote in message
> "Dirk Bell" <dirkman@erols.com> wrote in message
news:<bmn4l3\$hl\$1@bob.news.rcn.net>...
>
> > 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.
>
> The story I've heard is that Hamming who wrote several signal processing
> texts, came up with a window and the "kind of similarity" between the
> names led to people starting to use "Hanning window" instead of anything
> more "appropriate", be it in Latin or Akkadian.

So maybe there is no right or wrong?

Dirk

>
> > 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.
>
> Not that I ever had that conversation, but it could matter for someone
> trying to trace the historical roots of DSP. Knowing that the name to
> search for in the libraries is "von Hann" and not "Hanning" could actually
> make some difference.
>
> > 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?
>
> Yep, right. There's something sold around here that is known as "Italian
> salad". To the best of my knowledge there's mayonese, peas, onions,
carrot,
> cucumbers and some sort of sausage in there, but no trace of italians[*].
> It makes you wonder, doesn't it... ;)
>
> Rune
>
> [*] There is a Norwegian "kids joke" which roughly goes as:
>     - Hey, waiter! There's no shrimps in my shrimp salad!
>     - Of course not! You don't expect to find Italians in your Italian

```
 0

```"Dirk Bell" <dirkman@erols.com> wrote in message news:<bmsjgh\$ojg\$1@bob.news.rcn.net>...
> "Rune Allnor" <allnor@tele.ntnu.no> wrote in message
> > "Dirk Bell" <dirkman@erols.com> wrote in message
>  news:<bmn4l3\$hl\$1@bob.news.rcn.net>...
> >
> > > 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.
> >
> > The story I've heard is that Hamming who wrote several signal processing
> > texts, came up with a window and the "kind of similarity" between the
> > names led to people starting to use "Hanning window" instead of anything
> > more "appropriate", be it in Latin or Akkadian.
>
> So maybe there is no right or wrong?
>
> Dirk

That's what I'm thinking. As you point out, in most cases it's a matter
of getting along in everyday life where it suffices that people understand
what kind of window functions we are talking about, without "going autistic"
about the phrasing of scentences. On the other hand, there may be some
cases where a somewhat higher level of precision is in place.

Rune
```
 0

```Rune,

The question I often hear when mentioning the Hamming window or "Hanning"
window in a discussion is "Wait.. is that the one with the 0.5 or the 0.54?"
For a large number of people, the names are not immediately clearing things
up, just narrowing the window down to 1 of 2 windows, the real differences
of which they cannot tell you.

In a field where detail is so important, there are a lot of people not
to give virtually instant design answers is having both good and bad
results. Engineers that have little DSP experience who can work the software
to get output are often confidently assuming the results are what they want,
without really understanding what they want, and feeling like they are
competent in DSP. I think the importance of calling the window being
discussed "Hanning" or "von Hann" is lost in the noise of important details
to consider.

Dirk

"Rune Allnor" <allnor@tele.ntnu.no> wrote in message
> "Dirk Bell" <dirkman@erols.com> wrote in message
news:<bmsjgh\$ojg\$1@bob.news.rcn.net>...

<snipped>

> >
> > So maybe there is no right or wrong?
> >
> > Dirk
>
> That's what I'm thinking. As you point out, in most cases it's a matter
> of getting along in everyday life where it suffices that people understand
> what kind of window functions we are talking about, without "going
autistic"
> about the phrasing of scentences. On the other hand, there may be some
> cases where a somewhat higher level of precision is in place.
>
> Rune

```
 0

```In article <bmuj33\$oan\$1@bob.news.rcn.net>, "Dirk Bell" <dirkman@erols.com> wrote:
>Rune,
>
>The question I often hear when mentioning the Hamming window or "Hanning"
>window in a discussion is "Wait.. is that the one with the 0.5 or the 0.54?"
>For a large number of people, the names are not immediately clearing things
>up, just narrowing the window down to 1 of 2 windows, the real differences
>of which they cannot tell you.

The von Hann and Hamming windows are both special cases of the Raised Cosine
Window.  These get used in several different areas including beamforming.  von
Hann has a particularly simple hardware representation while the Hamming gives
nearly complete calcellation or the first sidelobe.  With a small change in
the value, complete cancellation is possible.
```
 0

```On 18 Oct 2003 11:26:11 -0700, fmarshall@acm.org (Fred Marshall)
wrote:

>ricklyon@REMOVE.onemain.com (Rick Lyons) wrote in message news:<3f9154e7.86059796@news.west.earthlink.net>...
>> On 15 Oct 2003 15:49:52 -0700, jashmathi@yahoo.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
>>
>> Hi,
>>
>>   w = 0.5 -0.5*cos(2*pi*m/n)
>>
>> Notice the minus sign.
>>
>> [-Rick-]
>
>The whole thing hinges on your indices.  What is "m" in your line up
>of sequence values?
>The difference between using pi and 2*pi has a similar answer.
>
>Take this:
>(0.5+0.5*cos(pi*m/n)) raised to the power of p
>
>Is there a value where m=n?  You didn't say.
>Is there a value where m=2*n?  You didn't say.
>Better to describe your situation fully:
>
>(0.5+0.5*cos(pi*m/n)) raised to the power of p
>x(m)=(0.5+0.5*cos(pi*m/n))
>for n a positive, real integer
>[1] for 0<=m<=n    perhaps????
>[2] for 1<=m<=n    perhaps????
>Then we can say something about pi or 2*pi.
>Does the function represent half the function of interest or the whole
>thing?
>
>If [1] above applies, then using pi will only take the functon from
>1.0 to 0 and, depending on what this represents could be half of a
>symmetrical function.
>Using 2*pi in the same, it will go from 1.0 to zero to 1.0 - which
>might be perfectly appropriate for a frequency domain function that
>needs to be 1.0 at f=0 and f=fs.  (and where you would drop the last
>sample in most FFT programs because it's simply a repetition of the
>first sample).
>
>Rick's proposed function using 2*pi is apropriate for the time domain
>if time starts at m=0 and ends at m=n.  It defines an appropriate
>window over n or n+1 samples with a peak in the center around time
>equivalent to n/2.
>
>"Formulas (i.e. expressions or equations) are best if they represent
>something that you know about.  You don't get to "know" anything from
>a formula unless it's grounded in reality."
>E=m*c^2 doesn't do much unless you know what the symbols mean, their
>dimensions, maybe even physical context, etc.
>Now, I know that in school many of us were rather pushed into doing it
>exercises in applied algebra.  The danger is that when the formula
>doesn't apply we're stuck.  So then we get motivated to ponder the
>formula: "why is it this way?"  "how might it change if the situation
>changes like this?", etc.  When we get better at it then we can
>develop our own formulas.
>
>know - 'cause we don't know your context of computation or notation
>even though we might *think* we do because it seems to be implied.
>It's implied because we often think of things aligned in a certain way
>- like Rick's expression.
>
>Fred

Hi Fred,

I agree with you.  jashmathi could learn all he
needs to know about the Hanning ***window*** by plotting
his equations' values with some software.

[-Rick-]

```
 0

```Rick Lyons wrote:

...

>
> Hi Fred,
>
>    I agree with you.  jashmathi could learn all he
> needs to know about the Hanning ***window*** by plotting
> his equations' values with some software.
>
> [-Rick-]

Or even roughly by hand.

Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������

```
 0

```ricklyon@REMOVE.onemain.com (Rick Lyons) wrote in message news:<3f97c478.163951843@news.west.earthlink.net>...
> Hi Fred,
>
>    I agree with you.  jashmathi could learn all he
> needs to know about the Hanning ***window*** by plotting
> his equations' values with some software.

Hi Rick.

Just barely relevant to this thread, but a couple of days ago I got a
copy of your book. I think it's the only book I've seen that actually
mentions the different names on the hanning window...

Anyway, I think the book is brilliant. From time to time I teach a class
in underwater acoustics where we get students from other departments.
As the course is intended for people who know quite a bit of signal
processing in advance, we have had some problems with people from other
departments finding the DSP a bit difficult. I think your book would fit
in perfectly as support for those who are not fluent in DSP.

I have also worked in some "multidiciplinary" departments, and I think a
book on this level could be very useful in such teams. It's always useful
to get a quick but accurate introduction to other fields than the one
you work in yourself.

Again, it's a brilliant book. I only wish other people in other diciplines
would write like you did.

Rune
```
 0

```"Jerry Avins" <jya@ieee.org> wrote in message
news:bn8sbt\$gsr\$3@bob.news.rcn.net...
> Rick Lyons wrote:
>
>    ...
>
> >
> > Hi Fred,
> >
> >    I agree with you.  jashmathi could learn all he
> > needs to know about the Hanning ***window*** by plotting
> > his equations' values with some software.
> >
> > [-Rick-]
>
> Or even roughly by hand.

Jeryy,

Absolutely!  Good point. Once I posted a description of doing DSP transform
pairs as hand-drawn "cartoons".  A method I continue to use that helps
greatly!  In some cases it allows things to be "discovered" that aren't
otherwise obvious.  Here's an example:

Zero-filling in time is one way that's used to increase the sample rate of a
sequence.
Interpolation (by lowpass filtering) is used to fill in the zero-valued
samples to complete the process.
If the zero-filling is 7:1 then the sample rate is increased by 8 and the
interpolating (lowpass) filter needs to be relatively sharp and thus, if
FIR, long.

But since FFT / multiply / IFFT is often more computationally efficient,
another way to look at it:
FFT the original sequence with no zero-filling at all.
Repeat the FFT sequence 8 times.
Multiply with a lowpass filter (1/8th band filter) to remove all the interim
spectral components introduced by repeating.
If you look at "cartoons" of all of these functions, this rather clearly
shows why zero padding in frequency (instead of repeating and filtering) is
a possible approach.

Note that "sort of a polyphase" implementation doesn't apply in the
frequency domain implementation.  It doesn't help to do this:
[1] Repeat the spectral samples twice and use a halfband filter on 2N
samples. N goes to 2N
[2] Repeat the new spectral samples twice and use a halfband filter on 4N
samples. 2N goes to 4N
[3] Repeat the new spectral twice and use a halfband filter on 8N samples.
4N goes to 8N.
It might seem you're operating on the minimum number of samples each time at
some savings.
However, compare with this:
[A]Repeat the spectrum 8 times and use a 1/8th band filter.
The number of multiplies in [A] is the same as the number of multiplies in
[3] alone.
Unless there are some numerical advantages, the only difference is the
filter values used.
So, [1] and [2] appear to be wasted effort. (comment?)

Just to be complete:
Zero-filling does this (starting with N an even number):
[1] Split the original spectral samples by moving the top (N/2)-1 of the
samples to the top of an array that is 8X larger.  All interim samples are
zero. If the (N/2)-1th sample isn't zero, the sampling violated the Nyquist
criterion in the time domain.

As we have discussed, this can be a really simple approach.  See Rick's
paper on dspguru.
If the requirements are more demanding it can be tricky which we discussed
here briefly a few months ago - because one must be concerned with temporal
aliasing as well.  I'm still planning a tutorial paper on the subject.  I'll
be glad when the election is over on Nov 4th!

Fred

```
 0

```On 23 Oct 2003 10:03:03 -0700, allnor@tele.ntnu.no (Rune Allnor)
wrote:

>ricklyon@REMOVE.onemain.com (Rick Lyons) wrote in message news:<3f97c478.163951843@news.west.earthlink.net>...
>> Hi Fred,
>>
>>    I agree with you.  jashmathi could learn all he
>> needs to know about the Hanning ***window*** by plotting
>> his equations' values with some software.
>
>Hi Rick.
>
>Just barely relevant to this thread, but a couple of days ago I got a
>copy of your book. I think it's the only book I've seen that actually
>mentions the different names on the hanning window...
>
>Anyway, I think the book is brilliant. From time to time I teach a class
>in underwater acoustics where we get students from other departments.
>As the course is intended for people who know quite a bit of signal
>processing in advance, we have had some problems with people from other
>departments finding the DSP a bit difficult. I think your book would fit
>in perfectly as support for those who are not fluent in DSP.
>
>I have also worked in some "multidiciplinary" departments, and I think a
>book on this level could be very useful in such teams. It's always useful
>to get a quick but accurate introduction to other fields than the one
>you work in yourself.
>
>Again, it's a brilliant book. I only wish other people in other diciplines
>would write like you did.
>
>Rune

Good Lord!!   Rune, you are *too* kind.
Thanks for the compliment.

Coming from a "signal processing wizard" like you,

The next time I'm in Trondheim, I owe you a beer.
(If we have enough beer, maybe we could try swimming
across the Nidelva.)

Thanks again Rune,
[-Rick-]
Learn about Trondheim Norway by surfing to:
http://www.trondheim.com/engelsk/

```
 0

```Rick Lyons wrote:
...

> Good Lord!!   Rune, you are *too* kind.
...

> The next time I'm in Trondheim, I owe you a beer.
> (If we have enough beer, maybe we could try swimming
> across the Nidelva.)

...

Or here, take a dip in the Niagara River upstream of the falls.

Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������

```
 0

```On Fri, 24 Oct 2003 11:33:35 -0400, Jerry Avins <jya@ieee.org> wrote:

>Rick Lyons wrote:
>   ...
>
>> Good Lord!!   Rune, you are *too* kind.
>   ...
>
>> The next time I'm in Trondheim, I owe you a beer.
>> (If we have enough beer, maybe we could try swimming
>> across the Nidelva.)
>
>   ...
>
>Or here, take a dip in the Niagara River upstream of the falls.
>
>Jerry

Jer eeeeery!!,

There isn't enough beer in all of New York that would
make me willing to jump into the Niagara above the falls.

(Although, the last last guy to try going over the falls
actually survived!!)

[-Rick-]

```
 0

```> On Fri, 24 Oct 2003 11:33:35 -0400, Jerry Avins <jya@ieee.org> wrote:
>
>> Or here, take a dip in the Niagara River upstream of the falls.
>
In article 3f9b20c5.19916875@news.west.earthlink.net, Rick Lyons at
ricklyon@REMOVE.onemain.com wrote on 10/25/2003 21:23:

> Jer eeeeery!!,
>
> There isn't enough beer in all of New York that would
> make me willing to jump into the Niagara above the falls.
>
> (Although, the last last guy to try going over the falls
> actually survived!!)

yeah, but wait until the harsh and vindictive Canadian justice system grinds
him up.  (the scourge of canadianism.)

r b-j

```
 0