cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to understand/use MotionGT library

AKE1
Associate

Hello,

I'm trying to calibrate the gyroscope of LSM6DSO MEMS but I don't really understand what describe the quality parameter in the MGT_state_t structure. I didn't find any information about it in the datasheet. Could you explain it to me ?

I succeeded few times to calibrate the gyroscope but sometimes even with the quality close to 0 (1e-8) the bias are not good at all. Is there a procedure to follow to achieve the gyroscope temperature calibration ?

AKE1_0-1740048512741.png

 

And when the bias are better, there is always an offset. How can I resolve it ?

AKE1_1-1740048710872.png

3 REPLIES 3
Andrea VITALI
ST Employee

Can you confirm you are using both MotionGC (gyroscope calibration) and MotionGT (gyroscope temperature effect calibration)?

Keep in mind that those libraries are opportunistic meaning that when they get a chance, they will use the data from the sensor to calibrate and compensate.

For MotionGC this means that the library is looking for steady periods, where the gyro bias can be reliably computed by averaging gyro output samples. If there are no steady periods, then this will never happen. Note that gyro misconfiguration may block MotionGC because high level of noise may be interpreted as motion. Vibrations may have a similar effect. In your application, there must be periods where gyro is steady and there are no vibrations so that MotionGC can do its work.

Similarly for MotionGT: the library is looking to learn the gyro bias at different temperatures, and will try to model the hysteresis (if there is any). If the temperatures at which the bias is learned are clumped together because the device is in a temperature-controlled environment, then MotionGT can do nothing when temperature goes out of the learned range. For example, if you 'calibrate' at room temperature of 20-25 Celsius (70-80F), then you go outside in a colder/hotter environment 5 Celsius or 35 Celsius (40F or 100F), the library will not be able to compensate anything.

Gyro bias is subject to changes at every power toggle, and because of many other factors such as mechanical stress on the board, or temperature gradients. If any of these factors are present, the bias compensation may not be as effective as it is expected to be.

Yes I'am using MotionGC wih MotionGT.

Ok if I understood correctly, I have to calibrate the gyro at my application temperature range to be able to compensate the gyro bias. Is that true ?

Is the quality factor a good indicator of the reliability of the calibration ?

I will try to play with MotionGC threshold to improve the bias precision.

 

Correct, you need to ensure calibration is happening at least at the extreme temperatures of your application.

Quality factor is an indicator of calibration status with limitations to be expected: the GC library does not know if gyro bias has changed when motion is happening, it will only detect that during steady periods; the GT library does not know the temperature range to be covered.