Re: Frequency domain integration and differentiation



Phil Hobbs wrote:
Robert Hickey wrote:
I'm learning about fourier analysis and am experimenting with integration and differentiation in the frequency domain.

For test cases in the time domain, I generate 3 single frequency data sets: acceleration, velocity and displacement.


Next, I do an FFT of the time domain velocity data,
then integrate in the frequency domain,
then inverse FFT back to time domain and
compare with the test case displacement data.


Next, I do an FFT of the time domain velocity data,
then differentiate in the frequency domain,
then inverse FFT back to time domain and
compare with the test case acceleration data.

Both test cases work, but with a lag (lead?) in time. Since my test data is periodic, I can do a circular shift to get an exact result.
However, the time lag/lead is frequency dependent.

How do I handle an arbitrary signal?

For a 512 sample FFT, do I generate 256 time signals, apply a separate circular shift for each frequency, then add all 256 time signals together?

Or have I missed something?

Thanks, RIH5342

There are a few issues here. First of all, you need to zero-pad your data to avoid wraparound problems. All FFT based operations assume that the data are periodic, and things like convolution happen in a circular rather than a linear fashion. That is, for FFT purposes, sample 0 is right next to sample N-1.

Second, you're wanting to integrate in the time domain, which is the same as multiplying by +-1/(j omega) in the frequency domain, depending on your sign convention.

Cheers,

Phil Hobbs

One other issue that occurs to me is that integrating using an FFT isn't actually that well defined. It's much easier and more efficient to use a simple recursive filter in the time domain, i.e. I_n = I_(n-1)+ f_n. If you're really trying to get the correct continuous-time integral, you have to be a bit more careful mathematically.

Cheers,

Phil Hobbs
.



Relevant Pages

  • Re: What is "Realtime Convolution and Modulation Synthesis"?
    ... say) in the time domain. ... samples, perform an FFT, do the multiplication and then an inverse FFT ... for speeding up a convolution algorithm, ... frequency domain where convolution turns into mere ...
    (rec.audio.pro)
  • Re: FFT with matlab
    ... This new function is a very well known FFT!! ... a so called "real TF" of u0 on a frequency domain between ... matlab (engineer or unity). ... lets return in the time domain. ...
    (comp.soft-sys.matlab)
  • Re: Frequency domain integration and differentiation
    ... For test cases in the time domain, I generate 3 single frequency data sets: acceleration, velocity and displacement. ... Next, I do an FFT of the time domain velocity data, ...
    (sci.math.num-analysis)
  • Re: Fourier Transform unique?
    ... seem to have a strong sinusoidal group delay and the same FFT. ... Say you have a point in the frequency domain with a ... in the time domain this corresponds to shifting a cosine wave ... the time domain (with its 2 pi ambiguity). ...
    (comp.dsp)
  • Re: Fourier Transform unique?
    ... seem to have a strong sinusoidal group delay and the same FFT. ... Say you have a point in the frequency domain with a ... in the time domain this corresponds to shifting a cosine wave ... the time domain (with its 2 pi ambiguity). ...
    (comp.dsp)