Reply by Ron N. January 28, 20082008-01-28
On Jan 28, 2:51 pm, "Fred Marshall" <fmarshallx@remove_the_x.acm.org>
wrote:
> >>Now, if you zero pad to make the sequences longer then these > > relationships > >>no longer hold and the sincs are narrower / the samples are closer > > together. > > >>Fred > > I re-read what I wrote here and decided to make it clearer. > > If you zero pad to make the sequences longer then these relationships still > hold and the sincs remain the same as before zero padding. It's a little > more complicated than that but not much! > > At the same time, there is a *new* sinc that matches the new length with the > zeros added. It's related to the "apparent resolution" that it seems you > have with the longer zero-padded sequence - the apparent resolution results > from interpolation of the original samples. It doesn't really add any > information - but maybe a much nicer picture if you're looking at filter > frequency response (as one example). > > Fred
The way I like to think about this is that there is a Sinc associated with the original rectangular window on samples taken. This Sinc doesn't get any narrower in absolute dimensions with any zero stuffing or other interpolation unless you widen the original rectangular window by taking more actual data samples. The apparent increase in resolution without adding more actual data is just zooming in more accurately on the shape of this original Sinc function (or the sum of a bunch or them), which is already known (or can be interpolated using narrower Sinc's). IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Reply by Fred Marshall January 28, 20082008-01-28
>>Now, if you zero pad to make the sequences longer then these > relationships >>no longer hold and the sincs are narrower / the samples are closer > together. >> >>Fred
I re-read what I wrote here and decided to make it clearer. If you zero pad to make the sequences longer then these relationships still hold and the sincs remain the same as before zero padding. It's a little more complicated than that but not much! At the same time, there is a *new* sinc that matches the new length with the zeros added. It's related to the "apparent resolution" that it seems you have with the longer zero-padded sequence - the apparent resolution results from interpolation of the original samples. It doesn't really add any information - but maybe a much nicer picture if you're looking at filter frequency response (as one example). Fred
Reply by skaggio January 28, 20082008-01-28
> >"skaggio" <andrea.scaggiante@gmail.com> wrote in message >news:_5Wdneu3-oQomgfanZ2dnUVZ_qelnZ2d@giganews.com... >> >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? > >The temporal extent NT is a rectangular window if you don't otherwise >window. Where N is the number of samples and T is the sample interval. > >The frequency extent fs is a rectangular window if you don't otherwise >window. Where fs=1/T and the frequency resolution is fs/N or 1/NT. > >The Fourier Transform (and Inverse) of a rectangular window is a sinc.
The
>wider the window the narrower the sinc and the narrower the window the
wider
>the sinc. >For a temporal rectangular window of length NT, the distance between the
>zeros of the sinc in frequency is 1/NT - the same as the frequency sample
>interval. >For a frequency rectangular window of length fs, the distance between the
>zeros of the sinc in time is T - the same as the time sample interval. > >Now, if you zero pad to make the sequences longer then these
relationships
>no longer hold and the sincs are narrower / the samples are closer
together.
> >Fred > >Fred >
Ok. Now I'have got a really better picture about the issue. Thanks a lot to everyone partecipated to his thread. Kind regards, Ska
Reply by Fred Marshall January 26, 20082008-01-26
"skaggio" <andrea.scaggiante@gmail.com> wrote in message 
news:_5Wdneu3-oQomgfanZ2dnUVZ_qelnZ2d@giganews.com...
> >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?
The temporal extent NT is a rectangular window if you don't otherwise window. Where N is the number of samples and T is the sample interval. The frequency extent fs is a rectangular window if you don't otherwise window. Where fs=1/T and the frequency resolution is fs/N or 1/NT. The Fourier Transform (and Inverse) of a rectangular window is a sinc. The wider the window the narrower the sinc and the narrower the window the wider the sinc. For a temporal rectangular window of length NT, the distance between the zeros of the sinc in frequency is 1/NT - the same as the frequency sample interval. For a frequency rectangular window of length fs, the distance between the zeros of the sinc in time is T - the same as the time sample interval. Now, if you zero pad to make the sequences longer then these relationships no longer hold and the sincs are narrower / the samples are closer together. Fred Fred
Reply by skaggio January 25, 20082008-01-25
>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 >
Ok. I will print and read them. I hope ch16 and/or ch17 will help me to understand why removing a bin corresponds to a sync convoution in time domain. I associate sync convolution in time to low pass filter or to rect in frequency... It is clear I must to look over base theory again... See you next monday! Kind regards, Ska
Reply by skaggio January 25, 20082008-01-25
>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
Reply by SteveSmith January 25, 20082008-01-25
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
Reply by skaggio January 25, 20082008-01-25
>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?
Reply by Jerry Avins January 25, 20082008-01-25
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;
Reply by Jerry Avins January 25, 20082008-01-25
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;