# How to make frequency histogram from raw measurements?

I have a quadcopter with some motors. I'd like to run the motors at different speeds and analyze the different frequencies of the chassis vibration.

A gyroscope+accelerometer in the center, measures rotational and linear movement about x,y,z axes at a certain frequency. How can I convert these numbers to a histogram chart which tells me the amplitude of the vibration at different frequencies?

Please note, I'm not asking for software, I'd like to understand what this process is called and how it is done.

• To me it looks like Fast Fourier Transform is what you are looking for. Maybe you are tricked by the 3D aspect of your data. You can do everything as vectors, then you will have complex vectors decomposition. To compute the energy you just take the 2-norm of the vector, in other words ($|\textrm{fft}(x)|^2 + |\textrm{fft}(y)|^2 + |\textrm{fft}(z)|^2|$) will give you the energy of the vibration at each frequency.
– Bob
Commented Apr 14 at 15:21
• @Bob This is complete enough to be the answer, may as well paste it there so we can close this out (even two sentence answers are great, sometimes even better). Commented Apr 14 at 15:47
• Thanks Bob. I remember FFT from my algorithm textbook, back then I didn't understand what it was for. Commented Apr 14 at 18:49

$$\vec{U}(\omega) = \sum_{i} \vec u_k \exp\left(-j k i T \omega \right)$$
Then you can get the energy of the vibration modes in each frequency as $$|\vec U(\omega)|^2 = (U_x(\omega)^2+U_y(\omega)^2+U_x(\omega)^2)$$.
If you have a scalar fft implementation you can apply it to each of your components separtely, so that the energy for all the frequencies could be expressed as $$\textrm{fft}(x)^2 + \textrm{fft}(y)^2 + \textrm{fft}(z)^2$$.