I have an acceleration signal sample and I need to get velocity and movement spectrum (amplitudes and phases) from it. I try to solve this problem in two ways:

  1. First method
  • Get FFT of acceleration signal.
  • To get velocity amplitudes I divide each acceleration amplitude by $2\pi f$ and subtract $\pi/2$ from each acceleration phase.
  • To get the amplitudes of the movement spectrum I divide each acceleration amplitude by $4\pi^2f^2$ and subtract $\pi$ from each acceleration phase.
  1. Second method
  • Using trapezoidal integration, I normalize the acceleration signal.
  • I then take an integral of it to get the velocity.
  • After this I take the FFT of the velocity.
  • I then normalize the velocity and take the integral to get the movement.
  • Finally I take the FFT of the movement.

The results obtained with these two methods are slightly different (spectrums amplitudes values). Which method is preferable to use?


1 Answer 1


That's because you are applying the integration formula for continuous Fourier transform in one case, and in the other you are using the discretized signal. Actually, it is interesting to do this, as it will give you an idea of how accurate your estimates are.

To get the same results you have to get the formulas for discrete Fourier transform.

Let $T_s$ be the sampling period, and $v_i$ the average speed in the interval $i T_s < t < (i+1)T_s$. Then $v_i = (x_{i+1} - x_i) / T_s$, assuming you have the correct initial position you can get $x_{i+1}$ from $x_i$ using the trapezoid integration rule.

From the properties of the Fourier transform, the spectrum of the time shifted position $x_{i+1}$ is $e^{-2j \pi f T_s} X(f)$, if $f = k / (N T_s)$, $N$ being the number of samples for the FFT. And one can derive the spectrum of the speed as

$$V_k = \frac{e^{-2j\pi k / N} - 1}{T_s} X_k$$

And a similar formula will relate the acceleration and speed.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.