DSPRelated.com
Forums

Frequency domain notch filter

Started by skaggio January 23, 2008
I understood the observations from Fred and Ron. 
Thanks to Richard for the suggestions, I will study... 

Let's come to Jerry.

>The narrower >you make a notch, the more you screw up th impulse response. If you >filter as you propose, you will cause severe ringing at frequencies in >the neighborhood of the notches.
Ok, what about if instead of simply removing the 50 Hz bin I substitute it trying an interpolation based on the neighborhood bins? Ska
> >I understood the observations from Fred and Ron. >Thanks to Richard for the suggestions, I will study... > >Let's come to Jerry. > >>The narrower >>you make a notch, the more you screw up th impulse response. If you >>filter as you propose, you will cause severe ringing at frequencies in >>the neighborhood of the notches. > >Ok, what about if instead of simply removing the 50 Hz bin I substitute
it
>trying an interpolation based on the neighborhood bins? > >Ska >
To be sure I really understood what you meant. When you write "If you filter as you propose, you will cause severe ringing at frequencies in the neighborhood of the notches" you are speakin' about Gibbs phenomenon, aren't you? Ska
>To be sure I really understood what you meant. When you write "If you >filter as you propose, you will cause severe ringing at frequencies in
the
>neighborhood of the notches" you are speakin' about Gibbs phenomenon, >aren't you? >Ska >
Mmm no, I think it is not Gibbs.....
On Jan 25, 8:58 am, "skaggio" <andrea.scaggia...@gmail.com> wrote:
> >To be sure I really understood what you meant. When you write "If you > >filter as you propose, you will cause severe ringing at frequencies in > the > >neighborhood of the notches" you are speakin' about Gibbs phenomenon, > >aren't you? > >Ska > > Mmm no, I think it is not Gibbs.....
When you do something in the frequency domain you also have to take into account the causality of it in the time domain. You are essentially performing a brickwall filter, which leads to the ringing due to time domain aliasing - the infinite sinc() get wrapped around into your ifft block/time series. Gibbs phenomenon is often misquoted. It refers to an artifact that occurs when dealing with the fourier series/transform of a signal with a discontinuity. It says that even if you take an infinite number of terms in the series - it won't converge at the discontinuity. So just because ringing occurs does not imply the Gibbs phenomenon. Cheers, Dave
skaggio wrote:
> I understood the observations from Fred and Ron. > Thanks to Richard for the suggestions, I will study... > > Let's come to Jerry. > >> The narrower >> you make a notch, the more you screw up the impulse response. If you >> filter as you propose, you will cause severe ringing at frequencies in >> the neighborhood of the notches. > > Ok, what about if instead of simply removing the 50 Hz bin I substitute it > trying an interpolation based on the neighborhood bins?
You might make it work with enough experience and experimentation. In the general case of there not being complete periods of each component in the FFT's window, there will be information in a bin involving frequencies possibly remote from the bin-center frequency. Removing that information will (subtly, perhaps) distort the reconstructed signal. There's no way around it: sharp transitions in a filter *always* cause ringing when the filter is excited by frequencies near the transition. By using proper procedures, you can indeed filter with an FFT, but simply removing the bins you think you don't want is a Bad Idea. However you implement your filter, either you will have to give away frequencies you would rather keep, or you will have to accept artifacts that the filter generates. You will have both imperfections in practice. Balancing them to achieve reasonable performance is the designer's art. 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;
skaggio wrote:

   ...

> To be sure I really understood what you meant. When you write "If you > filter as you propose, you will cause severe ringing at frequencies in the > neighborhood of the notches" you are speakin' about Gibbs phenomenon, > aren't you?
Yes. 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;
skaggio wrote:
>> To be sure I really understood what you meant. When you write "If you >> filter as you propose, you will cause severe ringing at frequencies in > the >> neighborhood of the notches" you are speakin' about Gibbs phenomenon, >> aren't you? >> Ska >> > Mmm no, I think it is not Gibbs.....
Well, not exactly, but it's a closely related manifestation of the same underlying relation between the time and frequency domains. 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;
>When you do something in the frequency domain you also have to take >into account the causality of it in the time domain. You are >essentially performing a brickwall filter, which leads to the ringing >due to time domain aliasing - the infinite sinc() get wrapped around >into your ifft block/time series.
Dave, is it possible to say I got lost? I'm missing understanding about sinc. sinc? Why sinc? Where's the rect I don't see in this filtering?
Hi Skaggio,
Here is a link for a simple recursive filter that does what you want.  

http://www.dspguide.com/ch19/3.htm

If you want to construct a more powerful frequency domain filter, you need
to read the design procedures in these two chapters.  
 
http://www.dspguide.com/ch16.htm
http://www.dspguide.com/ch17.htm

Regards,
Steve
>skaggio wrote: >> I understood the observations from Fred and Ron. >> Thanks to Richard for the suggestions, I will study... >> >> Let's come to Jerry. >> >>> The narrower >>> you make a notch, the more you screw up the impulse response. If you >>> filter as you propose, you will cause severe ringing at frequencies in
>>> the neighborhood of the notches. >> >> Ok, what about if instead of simply removing the 50 Hz bin I substitute
it
>> trying an interpolation based on the neighborhood bins? > >You might make it work with enough experience and experimentation. In >the general case of there not being complete periods of each component >in the FFT's window, there will be information in a bin involving >frequencies possibly remote from the bin-center frequency. Removing that
>information will (subtly, perhaps) distort the reconstructed signal. > >There's no way around it: sharp transitions in a filter *always* cause >ringing when the filter is excited by frequencies near the transition. >By using proper procedures, you can indeed filter with an FFT, but >simply removing the bins you think you don't want is a Bad Idea. > >However you implement your filter, either you will have to give away >frequencies you would rather keep, or you will have to accept artifacts >that the filter generates. You will have both imperfections in practice.
>Balancing them to achieve reasonable performance is the designer's art. > >Jerry >-- >Engineering is the art of making what you want from things you can get. >&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; >
Ok. Thanks a lot for everyone posted a message to this thread. Have a nice weekend (here in Italy it's 5p.m., Friday, i'm going to mountain with my young baby...), Ska