Fourier Transform – How to Get FFT Spectrum of Acceleration Measurement

accelerationexperimental-physicsexperimental-techniquefourier transformnewtonian-mechanics

I use an Accelerometer to measure acceleration (normalized via the gravitational acceleration $g\simeq9.81\,m/s^2$, so if one axis is orthogonal to the ground it returns the value 1). I already achieved a live plot, where the three different axes are plotted against the time. Next, I'd like to create a FFT spectrum of the measurement to detect harmonic vibrations/resonances in the measured acceleration data. I.e. if I lay the Accelerometer on a membrane and use a Sine of $25\,$Hz to let it vibrate, I want to be able to detect a peak in this frequency. I attached an example image of an App that does exactly what I want to achieve (with the sensor of the mobile phone; for this image, I simply shook my hand periodically):
enter preformatted text here

In my understanding, there are still to things to take care of with my raw-data:

  1. The specifics of the FFT
  2. The noise, typically around $0\,$Hz, has to be eliminated
  3. The influence of the gravitational acceleration has to be filtered out

Now, this isn't really my expertise and I can't find any good ways of creating the spectrum online. For this reason, I thought of asking this question here; and I know that this is kind of a specific and only technical question, but I have no one else to turn to.
So, TL;DR: How to you create a FFT spectrum from raw acceleration measurements?


Lastly, I thought, I should at least share my current thought-process, so you know I already invested my time as well:

  1. Since I have the data points as numpy.arrays I thought of simply using numpy.fft.fft to create the spectrum; again, I am not sure if this is already enough
  2. This should be mainly be eliminated through a calibration process. Either an 'idle' measurement without additional movement which is then used to subtract from the actual measurement, or a live calibration due to either a critical value in the acceleration or in the time
  3. Again, a calibration would come to mind, but this time only the 'idle' measurement makes sense for me.

(I'm sorry, if I used wrong technical terms)

Best Answer

  1. There is nothing magic about accelerometers that changes the way a Fourier transform works. If you’re murky on FFTs, I suggest you create some “fake data” that is the sum of one or more pure sine waves, feed it through your analyzer to see what its power spectrum looks like, and run the power spectrum through an inverse FFT (which is secretly the same as an FFT) to get your signal back.

  2. Most measurement systems are subject to low-frequency pink noise whose intensity goes like $1/f$.

  3. The Fourier transform will put the constant gravitational acceleration into your zero-frequency bin.