DSPRelated.com
Forums

Fourier transform of a non-integrable function ...

Started by Luna Moon September 9, 2007
Fourier transform of a non-integrable function ...

Dear all,

I am working on Fourier Transform of a non-integrable function. And I
am working on the numerical implementation of the FT, using FFT.

Let's call this function F(v). One example is F(v)=-1/(5*i*v)*(1-
exp(5*i*v))

The function has a 1/v term in its asymptotic expansion, which
corresponds to a jump or Heaviside function in its transform.

Using FFT, I can see the jump, with some overshooting after the jump
and undershooting before the jump, along with some ripples.

I want to reduce these artifacts as much as possible, because I am
going to integrate this transform against other functions later. Hence
obtaining a smooth function without much numerical artifacts is vital.
How do I do that?

I have thought about removing the 1/v component from F(v), and then
later add it back.

If I could remove 1/v from F(v), then the remaining portion of the
function will be of asymptotic order of 1/v^2, and then it is
integrable and so its FT will be smooth. And then I manually add the
jump/Heaviside function back into its FT.

This scheme sounded good to me. However, I realized that I cannot
define a new function G(v)=F(v)-1/v, because 1/v is not defined for
v=0. FFT doesn't work on G(0).

I have also thought about "denting" 1/v a little bit at v=0, but
without success.

I have also pondered that: using FFT, effectively I have truncated the
Fourier integral. Hence the non-integrability is not an issue any
more. Instead of trying to remove the 1/v component, I should try make
correction about the truncation error. But still, I wasn't able to
remove the overshooting, undershooting, and rippling around the jump
location...

Any thoughts?

Thanks a lot!

Luna Moon <lunamoonmoon@gmail.com> writes:

> Fourier transform of a non-integrable function ... > > Dear all, > > I am working on Fourier Transform of a non-integrable function. And I > am working on the numerical implementation of the FT, using FFT. > > Let's call this function F(v). One example is F(v)=-1/(5*i*v)*(1- > exp(5*i*v)) > > The function has a 1/v term in its asymptotic expansion, which > corresponds to a jump or Heaviside function in its transform. > > Using FFT, I can see the jump, with some overshooting after the jump > and undershooting before the jump, along with some ripples. > > I want to reduce these artifacts as much as possible, because I am > going to integrate this transform against other functions later. Hence > obtaining a smooth function without much numerical artifacts is vital. > How do I do that? > > I have thought about removing the 1/v component from F(v), and then > later add it back. > > If I could remove 1/v from F(v), then the remaining portion of the > function will be of asymptotic order of 1/v^2, and then it is > integrable and so its FT will be smooth. And then I manually add the > jump/Heaviside function back into its FT. > > This scheme sounded good to me. However, I realized that I cannot > define a new function G(v)=F(v)-1/v, because 1/v is not defined for > v=0. FFT doesn't work on G(0). > > I have also thought about "denting" 1/v a little bit at v=0, but > without success. > > I have also pondered that: using FFT, effectively I have truncated the > Fourier integral. Hence the non-integrability is not an issue any > more. Instead of trying to remove the 1/v component, I should try make > correction about the truncation error. But still, I wasn't able to > remove the overshooting, undershooting, and rippling around the jump > location... > > Any thoughts?
You could try subtracting a function that is asymptotic to 1/v but is OK near 0. A suitable one might be v/(1 + v^2), which has Fourier transform i pi signum(s) exp(-|s|). -- Robert Israel israel@math.MyUniversitysInitials.ca Department of Mathematics http://www.math.ubc.ca/~israel University of British Columbia Vancouver, BC, Canada
On Sep 9, 2:43 am, Robert Israel
<isr...@math.MyUniversitysInitials.ca> wrote:
> Luna Moon <lunamoonm...@gmail.com> writes: > > Fourier transform of a non-integrable function ... > > > Dear all, > > > I am working on Fourier Transform of a non-integrable function. And I > > am working on the numerical implementation of the FT, using FFT. > > > Let's call this function F(v). One example is F(v)=-1/(5*i*v)*(1- > > exp(5*i*v)) > > > The function has a 1/v term in its asymptotic expansion, which > > corresponds to a jump or Heaviside function in its transform. > > > Using FFT, I can see the jump, with some overshooting after the jump > > and undershooting before the jump, along with some ripples. > > > I want to reduce these artifacts as much as possible, because I am > > going to integrate this transform against other functions later. Hence > > obtaining a smooth function without much numerical artifacts is vital. > > How do I do that? > > > I have thought about removing the 1/v component from F(v), and then > > later add it back. > > > If I could remove 1/v from F(v), then the remaining portion of the > > function will be of asymptotic order of 1/v^2, and then it is > > integrable and so its FT will be smooth. And then I manually add the > > jump/Heaviside function back into its FT. > > > This scheme sounded good to me. However, I realized that I cannot > > define a new function G(v)=F(v)-1/v, because 1/v is not defined for > > v=0. FFT doesn't work on G(0). > > > I have also thought about "denting" 1/v a little bit at v=0, but > > without success. > > > I have also pondered that: using FFT, effectively I have truncated the > > Fourier integral. Hence the non-integrability is not an issue any > > more. Instead of trying to remove the 1/v component, I should try make > > correction about the truncation error. But still, I wasn't able to > > remove the overshooting, undershooting, and rippling around the jump > > location... > > > Any thoughts? > > You could try subtracting a function that is asymptotic to 1/v but > is OK near 0. A suitable one might be v/(1 + v^2), which has Fourier > transform i pi signum(s) exp(-|s|). > -- > Robert Israel isr...@math.MyUniversitysInitials.ca > Department of Mathematics http://www.math.ubc.ca/~israel > University of British Columbia Vancouver, BC, Canada
That's a good idea... I was also thinking along this line... I think it will work and I am going to give it a try... Thanks a lot Robert! Another thought I have is to create a Gibbs phenomenon myself, and then let them subtract and cancel...
On Sep 9, 11:00 am, Luna Moon <lunamoonm...@gmail.com> wrote:
> That's a good idea... I was also thinking along this line... I think > it will work and I am going to give it a try... Thanks a lot Robert! > > Another thought I have is to create a Gibbs phenomenon myself, and > then let them subtract and cancel...
Why do you insist on using the Fast Fourier transform (or in other words, the Discrete Fourier Transform)? You have a continous-time function, so why not use a continuous-time Fourier transform instead? Julius
julius wrote:
> On Sep 9, 11:00 am, Luna Moon <lunamoonm...@gmail.com> wrote: >> That's a good idea... I was also thinking along this line... I think >> it will work and I am going to give it a try... Thanks a lot Robert! >> >> Another thought I have is to create a Gibbs phenomenon myself, and >> then let them subtract and cancel... > > Why do you insist on using the Fast Fourier transform (or in other > words, the Discrete Fourier Transform)? You have a continous-time > function, so why not use a continuous-time Fourier transform > instead?
Is there a numerical way to do 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 9, 12:14 pm, julius <juli...@gmail.com> wrote:
> On Sep 9, 11:00 am, Luna Moon <lunamoonm...@gmail.com> wrote: > > > That's a good idea... I was also thinking along this line... I think > > it will work and I am going to give it a try... Thanks a lot Robert! > > > Another thought I have is to create a Gibbs phenomenon myself, and > > then let them subtract and cancel... > > Why do you insist on using the Fast Fourier transform (or in other > words, the Discrete Fourier Transform)? You have a continous-time > function, so why not use a continuous-time Fourier transform > instead? > > Julius
Julius, the example I gave was a simple one. In my real application, the formulae was extremely complicated, it is several pages... it's possible to do continuous time FT in closed-form?
On Sep 9, 12:30 pm, Luna Moon <lunamoonm...@gmail.com> wrote:
> > Julius, the example I gave was a simple one. In my real application, > the formulae was extremely complicated, it is several pages... it's > possible to do continuous time FT in closed-form?
OK, I wasn't clear exactly what you wanted to do. If there is any discontinuity, explicitly or not, then you will run into Gibbs phenomena. Further, the DFT is really for periodic functions. So the boundaries have to also be smooth. For example, take a finite vector and compute the FFT. If the boundaries are not smooth, you can also get some "ringing". This is where techniques such as windowing come into play, but there is not general solution as to what window -- at what length, and what parameter -- to use. That you have to try yourself. But typically the tradeoff is between accuracy, resolution, and articfacts. Julius
On 2007-09-09 14:47:56 -0300, julius <juliusk@gmail.com> said:

> On Sep 9, 12:30 pm, Luna Moon <lunamoonm...@gmail.com> wrote: >> >> Julius, the example I gave was a simple one. In my real application, >> the formulae was extremely complicated, it is several pages... it's >> possible to do continuous time FT in closed-form? > > OK, I wasn't clear exactly what you wanted to do.
There is always symbolic manipulation. It may be complicted by being large which could then be easy for a symbolic manipulation program. Or it may be complicated in a way which makes it hard for a program as well. A program might be able to deal with large expansions in that case. Maple is in the multiple cross posting. It is a plausibel program to have a go with on symbolic manipulation.
>
Please see this image:

http://img205.imageshack.us/img205/7763/pppqh8.jpg

Interestingly for my case, the undershooting always appear before the
jump location.

And since I know precisely the jump location, and jump magnitude,

I can easily remove the undershooting and ringing artifacts...

There is no overshooting after the jump.

I guess that's because the function is right continuous.

If this statement is correct and general, then I probably have found
something useful... which can simplify my work a lot(because that
means I don't need to do the trick of removing 1/v, or v/(1+v^2), then
adding them back manually at later stage):

The statement is:

If the function is right continuous,

then the Gibbs effect only appears to the left of the jump or
discontinuity.

Any more thoughts?


Luna Moon <lunamoonmoon@gmail.com> writes:

> Please see this image: > > http://img205.imageshack.us/img205/7763/pppqh8.jpg > > Interestingly for my case, the undershooting always appear before the > jump location. > > And since I know precisely the jump location, and jump magnitude, > > I can easily remove the undershooting and ringing artifacts... > > There is no overshooting after the jump. > > I guess that's because the function is right continuous. > > If this statement is correct and general, then I probably have found > something useful... which can simplify my work a lot(because that > means I don't need to do the trick of removing 1/v, or v/(1+v^2), then > adding them back manually at later stage): > > The statement is: > > If the function is right continuous, > > then the Gibbs effect only appears to the left of the jump or > discontinuity.
Not true at all. A piecewise smooth function with a jump discontinuity will have the Gibbs phenomenon on both sides of the jump. The value of the function at the jump itself, whether it is equal to the limit from the left or the limit from the right, has no effect at all on the Fourier series. -- Robert Israel israel@math.MyUniversitysInitials.ca Department of Mathematics http://www.math.ubc.ca/~israel University of British Columbia Vancouver, BC, Canada