Skip to main content
MT.6
Associate II
August 25, 2021
Solved

Hi, How do you convert IIS3DWB accelerometer data to vibration values? Is there an algorithm that has to be part of the c code?

  • August 25, 2021
  • 3 replies
  • 1631 views

..

This topic has been closed for replies.
Best answer by Eleon BORLINI

Hi @MT.6​ ,

are you referring to a specific C code or algorithm?

As stated by @TDK​  in this other thread, acceleration and vibration are the same physical magnitude: vibration is a subset of the more generic "acceleration", and refers to an "oscillating" acceleration within the frequency range of mechanical vibration, typically between few hertz to 10kHz (above it's more the acoustical field).

If you want to detect the frequency and the magnitude of your system's acceleration / vibration, the most informative way is to perform an FFT analysis.

For an example on how to implement the FFT transformation and set the relevant parameters, you can refer to the X-CUBE-MEMS-XT1 function pack (even if it is quite old), especially to the FFT_demo, which develops integrated Fast Fourier Transform (FFT) algorithm for vibration analysis. The user manual UM2142 explains more details from p.17.

For a more theoretical overview, the design guide Capacitive MEMS accelerometer for condition monitoring can be a good reference paper.  

For more details on the calculation deriving from this white paper, specifically involving the MotionSP library, you can refer to THIS post.

If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster. 

-Eleon

3 replies

MT.6
MT.6Author
Associate II
August 26, 2021

Is this the right place to post this question?

Eleon BORLINI
Eleon BORLINIBest answer
ST Employee
August 27, 2021

Hi @MT.6​ ,

are you referring to a specific C code or algorithm?

As stated by @TDK​  in this other thread, acceleration and vibration are the same physical magnitude: vibration is a subset of the more generic "acceleration", and refers to an "oscillating" acceleration within the frequency range of mechanical vibration, typically between few hertz to 10kHz (above it's more the acoustical field).

If you want to detect the frequency and the magnitude of your system's acceleration / vibration, the most informative way is to perform an FFT analysis.

For an example on how to implement the FFT transformation and set the relevant parameters, you can refer to the X-CUBE-MEMS-XT1 function pack (even if it is quite old), especially to the FFT_demo, which develops integrated Fast Fourier Transform (FFT) algorithm for vibration analysis. The user manual UM2142 explains more details from p.17.

For a more theoretical overview, the design guide Capacitive MEMS accelerometer for condition monitoring can be a good reference paper.  

For more details on the calculation deriving from this white paper, specifically involving the MotionSP library, you can refer to THIS post.

If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster. 

-Eleon

MT.6
MT.6Author
Associate II
August 27, 2021

Thank you, Eleon!