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?
Impulse response
Started by ●September 7, 2005
Reply by ●September 7, 20052005-09-07
Reply by ●September 7, 20052005-09-07
Reply by ●September 7, 20052005-09-07
"Gert Baars" <g.baars13@chello.nl> wrote in message news:1f0b0$431f2ac0$3ec23590$6206@news.chello.nl...> 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)
Reply by ●September 7, 20052005-09-07
Clay S. Turner wrote:> "Gert Baars" <g.baars13@chello.nl> wrote in message > news:1f0b0$431f2ac0$3ec23590$6206@news.chello.nl... > >>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.
Reply by ●September 8, 20052005-09-08
"Gert Baars" <g.baars13@chello.nl> wrote in message news:1f0b0$431f2ac0$3ec23590$6206@news.chello.nl...> 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
Reply by ●September 8, 20052005-09-08
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" <g.baars13@chello.nl> wrote in message > news:1f0b0$431f2ac0$3ec23590$6206@news.chello.nl... > >>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 > >
Reply by ●September 8, 20052005-09-08
"Gert Baars" <g.baars13@chello.nl> wrote in message news:d544$43203e05$3ec23590$13590@news.chello.nl...> 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" <g.baars13@chello.nl> wrote in message >> news:1f0b0$431f2ac0$3ec23590$6206@news.chello.nl... >> >>>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..... >> >> FredOh, 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
Reply by ●September 10, 20052005-09-10
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" <g.baars13@chello.nl> wrote in message > news:d544$43203e05$3ec23590$13590@news.chello.nl... > >>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" <g.baars13@chello.nl> wrote in message >>>news:1f0b0$431f2ac0$3ec23590$6206@news.chello.nl... >>> >>> >>>>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 > >
Reply by ●September 11, 20052005-09-11
"Gert Baars" <g.baars13@chello.nl> wrote in message news:4c549$43236e2b$3ec23590$13885@news.chello.nl...> 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