I came across one blog who suggested to convert from accelerometer data to position data from frequency domain. Here are the steps that the original individual suggested:

  1. Remove the mean from the accel. data
  2. Take the Fourier transform (FFT) of the accel. data.
  3. Convert the transformed accel. data to displacement data by dividing each element by -omega^2, where omega is the frequency band.
  4. Now take the inverse FFT to get back to the time-domain and scale your result.

I am wondering if anyone have ever used this method before, and may I know your algorithm? I am not particularly sure on what does it means by Step 3 - frequency band?

p.s. I hope this question is relevant here.


1 Answer 1


The point is that acceleration is the second derivative of displacement. So to get the displacement, one should integrate acceleration twice. To do this, one way is to numerically integrate. A more interesting approach is to use the time-integration property of the Fourier transform: $$\mathcal{F}\left(\int_{-\infty}^t x(\tau)d\tau\right)=\frac{X(j\omega)}{j\omega}$$ Note that we require $X(0)=0$. So division by $-\omega^2$ means twice integration in time. Assuming the sampling frequency is fs and a is accel. data, you can use something similar to the following code:

 l = length(a); % assume l even 
 w = 2*pi*fs/l*(-l/2:l/2-1);
 A = fftshift(fft(a));
 D = A./-w.^2;
 d = ifft(ifftshift(D),'symmetric');

Your Answer

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

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