PDA

View Full Version : Impulse response


Gert Baars
09-07-2005, 06:59 PM
Hello,

I'm trying understand designing a FIR filter from scratch
because I want to experiment with home-made windows.

With H(W) = 1 for -W0 < W < W0
= 0 else

After IFT(F[W]) the result f[t] is a sinc function.
This function is symmetrical to t=0

Turning this function into h(n) without a window

is the translation t = Ts(n-(L-1)/2)

( so h(n) = f[Ts(n-(L-1)/2] )

correct?

dbell
09-07-2005, 08:15 PM
Not a sinc function for disrete case.

Dirk

dbell
09-07-2005, 08:16 PM
discrete

Dirk

Clay S. Turner
09-07-2005, 09:47 PM
"Gert Baars" <[email protected]> wrote in message
news:[email protected].. .
> Hello,
>
> I'm trying understand designing a FIR filter from scratch
> because I want to experiment with home-made windows.
>
> With H(W) = 1 for -W0 < W < W0
> = 0 else
>
> After IFT(F[W]) the result f[t] is a sinc function.
> This function is symmetrical to t=0
>
> Turning this function into h(n) without a window
>
> is the translation t = Ts(n-(L-1)/2)
>
> ( so h(n) = f[Ts(n-(L-1)/2] )
>
> correct?

No,

A rectangular window yields a periodic sync function. I.e., functionally
like


sin(N*x)
---------
N*sin(x)

Gert Baars
09-08-2005, 12:59 AM
Clay S. Turner wrote:
> "Gert Baars" <[email protected]> wrote in message
> news:[email protected].. .
>
>>Hello,
>>
>>I'm trying understand designing a FIR filter from scratch
>>because I want to experiment with home-made windows.
>>
>>With H(W) = 1 for -W0 < W < W0
>> = 0 else
>>
>>After IFT(F[W]) the result f[t] is a sinc function.
>>This function is symmetrical to t=0
>>
>>Turning this function into h(n) without a window
>>
>>is the translation t = Ts(n-(L-1)/2)
>>
>>( so h(n) = f[Ts(n-(L-1)/2] )
>>
>>correct?
>
>
> No,
>
> A rectangular window yields a periodic sync function. I.e., functionally
> like
>
>
> sin(N*x)
> ---------
> N*sin(x)
>
>
>
>


The Math here still won't get me what I want.
The book I have doesn't even mention sinc functions.
What I get after the IFT is a sinc function.
This function also goes back in time and I assume
it has to be shifted to the right. The scopeFIR
program also shows a sinc function shifted to the right
and also the windows are symmetrical to n = (L-1)/2
so I assume t is shifted like t= Ts.(n-(L-1)/2)
with L = #taps of the FIR filter.

Fred Marshall
09-08-2005, 05:37 AM
"Gert Baars" <[email protected]> wrote in message
news:[email protected].. .
> Hello,
>
> I'm trying understand designing a FIR filter from scratch
> because I want to experiment with home-made windows.
>
> With H(W) = 1 for -W0 < W < W0
> = 0 else
>
> After IFT(F[W]) the result f[t] is a sinc function.
> This function is symmetrical to t=0
>
> Turning this function into h(n) without a window
>
> is the translation t = Ts(n-(L-1)/2)
>
> ( so h(n) = f[Ts(n-(L-1)/2] )
>
> correct?

Well, you really need a window if that's how you're going about it.
The transition region can't be of zero width as in going from 1 to zero
abruptly at W0.

If you convolve the frequency domain function with a narrow "gate" you'll
get a linear transition that corresponds to a wide sinc window in time.
Other shapes, other time windows.....

Fred

Gert Baars
09-08-2005, 02:34 PM
Nothing is wrong with the unwindowed sinc function if the #taps
are infinite and Ws >> Wc. Then the result is the exact H(W).




Fred Marshall wrote:
> "Gert Baars" <[email protected]> wrote in message
> news:[email protected].. .
>
>>Hello,
>>
>>I'm trying understand designing a FIR filter from scratch
>>because I want to experiment with home-made windows.
>>
>>With H(W) = 1 for -W0 < W < W0
>> = 0 else
>>
>>After IFT(F[W]) the result f[t] is a sinc function.
>>This function is symmetrical to t=0
>>
>>Turning this function into h(n) without a window
>>
>>is the translation t = Ts(n-(L-1)/2)
>>
>>( so h(n) = f[Ts(n-(L-1)/2] )
>>
>>correct?
>
>
> Well, you really need a window if that's how you're going about it.
> The transition region can't be of zero width as in going from 1 to zero
> abruptly at W0.
>
> If you convolve the frequency domain function with a narrow "gate" you'll
> get a linear transition that corresponds to a wide sinc window in time.
> Other shapes, other time windows.....
>
> Fred
>
>

Fred Marshall
09-08-2005, 09:40 PM
"Gert Baars" <[email protected]> wrote in message
news:[email protected].. .
> Nothing is wrong with the unwindowed sinc function if the #taps
> are infinite and Ws >> Wc. Then the result is the exact H(W).
>
>
>
>
> Fred Marshall wrote:
>> "Gert Baars" <[email protected]> wrote in message
>> news:[email protected].. .
>>
>>>Hello,
>>>
>>>I'm trying understand designing a FIR filter from scratch
>>>because I want to experiment with home-made windows.
>>>
>>>With H(W) = 1 for -W0 < W < W0
>>> = 0 else
>>>
>>>After IFT(F[W]) the result f[t] is a sinc function.
>>>This function is symmetrical to t=0
>>>
>>>Turning this function into h(n) without a window
>>>
>>>is the translation t = Ts(n-(L-1)/2)
>>>
>>>( so h(n) = f[Ts(n-(L-1)/2] )
>>>
>>>correct?
>>
>>
>> Well, you really need a window if that's how you're going about it.
>> The transition region can't be of zero width as in going from 1 to zero
>> abruptly at W0.
>>
>> If you convolve the frequency domain function with a narrow "gate" you'll
>> get a linear transition that corresponds to a wide sinc window in time.
>> Other shapes, other time windows.....
>>
>> Fred

Oh, OK - so you are assuming that H(w) is a continuous and periodic
function.
So, the IFT is effectively the computation of a Fourier Series ...
and, it has an infinite number of terms as usual so h(n) is an infinite
series.

If H(w) isn't a continuous function, but rather a discrete sequence, then
h(t) will be periodic as well - so not treated as infinite.

However.....
With L as the length of the filter, it is *not* infinite. With "n" the time
index, then a causal filter of length L would normally be defined such that
the beginning of the impulse response of the filter is at time zero (so I
suppose you mean n=0??) and the end of the impulse response is at time
(L-1)*T where T is the sampling interval.

This means the center of the filter is at (L-1)*T/2
If L is odd, this is an integer multiple of T.
If L is even, this is an (integer + 1/2)*T

Taking the center "L" samples out of an infinite sequence, *is* a
windowing - it's just that the window is rectangular with no otherwise
"interesting" shape.
If you rectangularly window a discrete sequence in time then the result is
still periodic in frequency. The truncation causes Gibb's phenomenon at the
sharp transitions in frequency. Normally these are viewed as undesirable
trillies - thus the use of more gradual windows as in the "Windowing Method"
of filter design.

I'm following this but I remain unclear as to your objective. It can't be
both infinite in time and not infinite in time.

Fred

Gert Baars
09-11-2005, 12:36 AM
Assuming L as infinite theoritally means a rectangular window with
infinite width. Here H(W) would become FT(IFT(H[W]) = H[W].



Fred Marshall wrote:
> "Gert Baars" <[email protected]> wrote in message
> news:[email protected].. .
>
>>Nothing is wrong with the unwindowed sinc function if the #taps
>>are infinite and Ws >> Wc. Then the result is the exact H(W).
>>
>>
>>
>>
>>Fred Marshall wrote:
>>
>>>"Gert Baars" <[email protected]> wrote in message
>>>news:[email protected].. .
>>>
>>>
>>>>Hello,
>>>>
>>>>I'm trying understand designing a FIR filter from scratch
>>>>because I want to experiment with home-made windows.
>>>>
>>>>With H(W) = 1 for -W0 < W < W0
>>>> = 0 else
>>>>
>>>>After IFT(F[W]) the result f[t] is a sinc function.
>>>>This function is symmetrical to t=0
>>>>
>>>>Turning this function into h(n) without a window
>>>>
>>>>is the translation t = Ts(n-(L-1)/2)
>>>>
>>>>( so h(n) = f[Ts(n-(L-1)/2] )
>>>>
>>>>correct?
>>>
>>>
>>>Well, you really need a window if that's how you're going about it.
>>>The transition region can't be of zero width as in going from 1 to zero
>>>abruptly at W0.
>>>
>>>If you convolve the frequency domain function with a narrow "gate" you'll
>>>get a linear transition that corresponds to a wide sinc window in time.
>>>Other shapes, other time windows.....
>>>
>>>Fred
>
>
> Oh, OK - so you are assuming that H(w) is a continuous and periodic
> function.
> So, the IFT is effectively the computation of a Fourier Series ...
> and, it has an infinite number of terms as usual so h(n) is an infinite
> series.
>
> If H(w) isn't a continuous function, but rather a discrete sequence, then
> h(t) will be periodic as well - so not treated as infinite.
>
> However.....
> With L as the length of the filter, it is *not* infinite. With "n" the time
> index, then a causal filter of length L would normally be defined such that
> the beginning of the impulse response of the filter is at time zero (so I
> suppose you mean n=0??) and the end of the impulse response is at time
> (L-1)*T where T is the sampling interval.
>
> This means the center of the filter is at (L-1)*T/2
> If L is odd, this is an integer multiple of T.
> If L is even, this is an (integer + 1/2)*T
>
> Taking the center "L" samples out of an infinite sequence, *is* a
> windowing - it's just that the window is rectangular with no otherwise
> "interesting" shape.
> If you rectangularly window a discrete sequence in time then the result is
> still periodic in frequency. The truncation causes Gibb's phenomenon at the
> sharp transitions in frequency. Normally these are viewed as undesirable
> trillies - thus the use of more gradual windows as in the "Windowing Method"
> of filter design.
>
> I'm following this but I remain unclear as to your objective. It can't be
> both infinite in time and not infinite in time.
>
> Fred
>
>

Fred Marshall
09-11-2005, 05:31 AM
"Gert Baars" <[email protected]> wrote in message
news:[email protected]. ..
> Assuming L as infinite theoritally means a rectangular window with
> infinite width. Here H(W) would become FT(IFT(H[W]) = H[W].

I'll wait to see how you implement the time shift for causality it that
case....

Fred

Jerry Avins
09-11-2005, 04:40 PM
Fred Marshall wrote:
> "Gert Baars" <[email protected]> wrote in message
> news:[email protected]. ..
>
>>Assuming L as infinite theoritally means a rectangular window with
>>infinite width. Here H(W) would become FT(IFT(H[W]) = H[W].
>
>
> I'll wait to see how you implement the time shift for causality it that
> case....

In the meantime, we might haggle about how many angels can sit on the
point of a pin.

A swami who lived in Mobile
Said, "Although pain isn't real,
When I sit on a pin
And it punctures my skin,
I dislike what I fancy I feel.

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

Fred Marshall
09-12-2005, 01:38 AM
"Jerry Avins" <[email protected]> wrote in message
news:[email protected]...
> Fred Marshall wrote:
>> "Gert Baars" <[email protected]> wrote in message
>> news:[email protected]. ..
>>
>>>Assuming L as infinite theoritally means a rectangular window with
>>>infinite width. Here H(W) would become FT(IFT(H[W]) = H[W].
>>
>>
>> I'll wait to see how you implement the time shift for causality it that
>> case....
>
> In the meantime, we might haggle about how many angels can sit on the
> point of a pin.
>
> A swami who lived in Mobile
> Said, "Although pain isn't real,
> When I sit on a pin
> And it punctures my skin,
> I dislike what I fancy I feel.
>
> Jerry

Jerry,

et tu? ???? I remain trying to be helpful and I have recieved responses that
seem to not appreciate this and no answers to my questions for
clarification. My email "voice" may be dissonant - if so I regret it.

Fred

Jerry Avins
09-12-2005, 03:20 AM
Fred Marshall wrote:
> "Jerry Avins" <[email protected]> wrote in message
> news:[email protected]...
>
>>Fred Marshall wrote:
>>
>>>"Gert Baars" <[email protected]> wrote in message
>>>news:[email protected]. ..
>>>
>>>
>>>>Assuming L as infinite theoritally means a rectangular window with
>>>>infinite width. Here H(W) would become FT(IFT(H[W]) = H[W].
>>>
>>>
>>>I'll wait to see how you implement the time shift for causality it that
>>>case....
>>
>>In the meantime, we might haggle about how many angels can sit on the
>>point of a pin.
>>
>>A swami who lived in Mobile
>>Said, "Although pain isn't real,
>> When I sit on a pin
>> And it punctures my skin,
>>I dislike what I fancy I feel.
>>
>>Jerry
>
>
> Jerry,
>
> et tu? ???? I remain trying to be helpful and I have recieved responses that
> seem to not appreciate this and no answers to my questions for
> clarification. My email "voice" may be dissonant - if so I regret it.

Fred,

Please forgive me if I missed a more than abstruse theoretical substance
in the thread so far. It's been a bad week. In addition to what you
know, some fellow wrote to me at home (legitimately; about the Phelan
article on my website) and I responded at some length. My opus was
returned with instructions about how to be enrolled on his whitelist so
that he might read it. I didn't bother.

The proper procedure for dealing with signals of infinite duration, and
the delay those procedures impose seemed dry to me at the moment. I
thought I was amplifying your reservation, not belittling it.

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

Fred Marshall
09-12-2005, 04:43 AM
"Jerry Avins" <[email protected]> wrote in message
news:[email protected]...

>..... I thought I was amplifying your reservation, not belittling it.
>
> Jerry

I re-read and see that now. Thanks Jerry. Best to all ...

Fred