cancel
Showing results for 
Search instead for 
Did you mean: 

How to tune acc, gyro and magnetometer in LSM9DS1 to achieve high performance in orientation estimation with MotionFX?

ŁAntc.1
Associate

I use MotionFX library and LSM9DS1 IC for quaternion estimation. I followed documentations, and I read signal values and call propagate and update functions with 10ms intervale. For now, I'm using 6X estimation algorithm, because in Unicleo GUI performance example with kettle look good. But in my own application and custom hardware Euler angles increase very slowly, there is latency about 2-3seconds before value saturate on real angle value(tested on 90° angle). There are also wrong values of yaw angle - movement of 90° is seen as 60-70°. I tried to change MotionFX library knobs and IC filters and bandwiths options, but without success. How to set this values to achieve maximum performance in orientation estimation? I'd like to minimize drifts and latency. My application is device moved by hand, which I want to track in real time with best possible accuracy.

I wonder about gyro bias. I have read in documentation that setting start_automatic_gbias_calculation to 1 will start gbias calulating, and after proces there will be set to 0; Calling that functions:

void calculate_gbias(void)

{

ipKnobs->start_automatic_gbias_calculation = 1;

MotionFX_setKnobs(ipKnobs);

do

{

MotionFX_getKnobs(ipKnobs);

}

while(ipKnobs->start_automatic_gbias_calculation != 0);

HAL_Delay(100);

}

cause that program is in the infinite loop, and stops. I have set:

ipKnobs->LMode = 1;

Is this connected with this issue?

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @�?ukasz Antczak​ , the general suggestion when using the X-CUBE-MEMS1 libraries is to combine the MotionFX library with the calibration libraries for the motion sensors (MotionAC for accelerometer and MotionGC for gyroscope calibration) and the magnetometer (MotionMC for magnetometer calibration), in order to minimize the residual offsets that can affect the data integration that gives the device position in the space. For the details of the MotionFX library (which is unfortunately not open source) I suggest you to contact the Sales and representatives of the ST support in your geographical region at this LINK. Regards