DSPRelated.com
Forums

FFT with discontinuities...

Started by Luna Moon September 8, 2007
I am working on the numerical recovery of functions of functions with
discontinuities.

Here is an example:

http://img179.imageshack.us/img179/2424/ggggz2.jpg

I am taking Fourier transform of the function 1/(-5*i*v)*(1-
exp(5*i*v))

And I am using FFT to do it numerically. (of course in this simple
case, things can be done in closed form using the Heaviside function,
however, I just want to use the numerical method tested with this
simple case to later more complicated situations...)

My question is, is there a way to reduce the "ringing effect" at the
discontinuity?

Thanks!

Luna Moon wrote:

> I am working on the numerical recovery of functions of functions with > discontinuities.
(snip)
> I am taking Fourier transform of the function 1/(-5*i*v)*(1- > exp(5*i*v))
> And I am using FFT to do it numerically. (of course in this simple > case, things can be done in closed form using the Heaviside function, > however, I just want to use the numerical method tested with this > simple case to later more complicated situations...)
> My question is, is there a way to reduce the "ringing effect" at the > discontinuity?
If I understand your question right, using more points in the FFT will reduce the ringing. I am not sure that I understand, though. Ringing is a real problem in real systems, but may also be an artifact of some approximations. -- glen
"Luna Moon" <lunamoonmoon@gmail.com> wrote in message 
news:1189283278.655859.313040@r29g2000hsg.googlegroups.com...
>I am working on the numerical recovery of functions of functions with > discontinuities. > > Here is an example: > > http://img179.imageshack.us/img179/2424/ggggz2.jpg > > I am taking Fourier transform of the function 1/(-5*i*v)*(1- > exp(5*i*v)) > > And I am using FFT to do it numerically. (of course in this simple > case, things can be done in closed form using the Heaviside > function, > however, I just want to use the numerical method tested with this > simple case to later more complicated situations...) > > My question is, is there a way to reduce the "ringing effect" at the > discontinuity?
http://en.wikipedia.org/wiki/Gibbs_phenomenon
Luna Moon wrote:
> I am working on the numerical recovery of functions of functions with > discontinuities. > > Here is an example: > > http://img179.imageshack.us/img179/2424/ggggz2.jpg > > I am taking Fourier transform of the function 1/(-5*i*v)*(1- > exp(5*i*v)) > > And I am using FFT to do it numerically. (of course in this simple > case, things can be done in closed form using the Heaviside function, > however, I just want to use the numerical method tested with this > simple case to later more complicated situations...) > > My question is, is there a way to reduce the "ringing effect" at the > discontinuity? > > Thanks! >
Yes, there's a correction factor you can use to correct the 'Gibbs Phenomenon': see: http://mathworld.wolfram.com/GibbsPhenomenon.html http://mathworld.wolfram.com/LanczosSigmaFactor.html
Hello,

Fourier theory doesn't like discontinuities... it's optimal in a
least-squares sense, since it minimizes the integral over the error
squared. But that says little about the -peak- amplitude of the error
itself. 

Or, taking an alternative view, the FT result is correct, under the
bandwidth limitation through the limited number of points, as said before
("one could use more points").

You might have a look at "windowing", in FFT context. 
Usually it is applied to get rid of the discontinuity when the cycle in
the FFT is closed, but you could use it more creatively to enforce some
"smoothness" on the signal in the time domain.
Windowing is a science of its own - or maybe it's more like cooking :) 
A part of the signal gets lost in any case.

Cheers

Markus

On Sep 8, 3:27 pm, Luna Moon <lunamoonm...@gmail.com> wrote:
> I am working on the numerical recovery of functions of functions with > discontinuities. > > Here is an example: > > http://img179.imageshack.us/img179/2424/ggggz2.jpg > > I am taking Fourier transform of the function 1/(-5*i*v)*(1- > exp(5*i*v)) > > And I am using FFT to do it numerically. (of course in this simple > case, things can be done in closed form using the Heaviside function, > however, I just want to use the numerical method tested with this > simple case to later more complicated situations...) > > My question is, is there a way to reduce the "ringing effect" at the > discontinuity? > > Thanks!
A while ago there was a lot of work that considered "recovering" a signal with missing chunks (in the time domain). If it is known that the signal is "smooth" in some sense, such as it has low bandwidth, then one can use alternating projection. See http://www-stat.stanford.edu/~donoho/Reports/Oldies/UPSR.pdf So it very much depends on your signal model. Julius
glen herrmannsfeldt wrote:
> Luna Moon wrote: > >> I am working on the numerical recovery of functions of functions with >> discontinuities. > (snip) > >> I am taking Fourier transform of the function 1/(-5*i*v)*(1- >> exp(5*i*v)) > >> And I am using FFT to do it numerically. (of course in this simple >> case, things can be done in closed form using the Heaviside function, >> however, I just want to use the numerical method tested with this >> simple case to later more complicated situations...) > >> My question is, is there a way to reduce the "ringing effect" at the >> discontinuity? > > If I understand your question right, using more points in the FFT > will reduce the ringing. > > I am not sure that I understand, though. Ringing is a real > problem in real systems, but may also be an artifact of some > approximations.
More points will reduce the distance from the discontinuity at which the ringing becomes evident, but not its amplitude. We have here a prime example of Gibbs' Phenomenon. At a finite sample rate, aliasing will be a problem too, and more points will reduce that. jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;
On Sep 8, 6:07 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> Luna Moon wrote: > > I am working on the numerical recovery of functions of functions with > > discontinuities. > > (snip) > > > I am taking Fourier transform of the function 1/(-5*i*v)*(1- > > exp(5*i*v)) > > And I am using FFT to do it numerically. (of course in this simple > > case, things can be done in closed form using the Heaviside function, > > however, I just want to use the numerical method tested with this > > simple case to later more complicated situations...) > > My question is, is there a way to reduce the "ringing effect" at the > > discontinuity? > > If I understand your question right, using more points in the FFT > will reduce the ringing. > > I am not sure that I understand, though. Ringing is a real > problem in real systems, but may also be an artifact of some > approximations. > > -- glen
Yes, that was the result (the picture shown) when I put more points, much as approaching the speed limit of Matlab... But the artifacts are still there. Suppose I know the location and the precise magnitude of the jump there, is there a way to remove the Gibbs artifacts...?
On Sep 8, 6:07 pm, Steven Pigeon <steven.pig...@videotron.ca> wrote:
> Luna Moon wrote: > > I am working on the numerical recovery of functions of functions with > > discontinuities. > > > Here is an example: > > >http://img179.imageshack.us/img179/2424/ggggz2.jpg > > > I am taking Fourier transform of the function 1/(-5*i*v)*(1- > > exp(5*i*v)) > > > And I am using FFT to do it numerically. (of course in this simple > > case, things can be done in closed form using the Heaviside function, > > however, I just want to use the numerical method tested with this > > simple case to later more complicated situations...) > > > My question is, is there a way to reduce the "ringing effect" at the > > discontinuity? > > > Thanks! > > Yes, there's a correction factor you can use to > correct the 'Gibbs Phenomenon': > > see: > > http://mathworld.wolfram.com/GibbsPhenomenon.htmlhttp://mathworld.wolfram.com/LanczosSigmaFactor.html
Thanks I will have to take a look and see if it is within the FFT framework so it is fast...
On Sep 8, 6:02 pm, "operator jay" <n...@none.none> wrote:
> "Luna Moon" <lunamoonm...@gmail.com> wrote in message > > news:1189283278.655859.313040@r29g2000hsg.googlegroups.com... > > > > >I am working on the numerical recovery of functions of functions with > > discontinuities. > > > Here is an example: > > >http://img179.imageshack.us/img179/2424/ggggz2.jpg > > > I am taking Fourier transform of the function 1/(-5*i*v)*(1- > > exp(5*i*v)) > > > And I am using FFT to do it numerically. (of course in this simple > > case, things can be done in closed form using the Heaviside > > function, > > however, I just want to use the numerical method tested with this > > simple case to later more complicated situations...) > > > My question is, is there a way to reduce the "ringing effect" at the > > discontinuity? > > http://en.wikipedia.org/wiki/Gibbs_phenomenon
Of course I know it's Gibbs... Suppose I know the location and the precise magnitude of the jump there, is there a way to remove the Gibbs artifacts...? Any remedies within the FFT framework? I couldn't increase the number of sample points, because the sampling itself is costly...