cancel
Showing results for 
Search instead for 
Did you mean: 

MotionDI precision issue when translating the sensor

paul19
Associate III

I'm using the MotionDI "dynamic inclinometer" library with a LSM6DSOX (on a NUCLEO-L476RG).

The rotation computed by the library looks right as long as the sensor remains stationary. But when I translate the sensor, there is a temporary but significant error in the angles (several degrees).

The issue can be seen when running the CUSTOM_DynamicInclinometer sample code with the Unicleo-GUI Windows application. When I display the dozer 3D model (in the "Dynamic Inclinometer Model" window):

  • when rotating the sensor, the orientation of the dozer correctly matches the orientation of the sensor,
  • when translating the sensor (by moving it at the surface of a table), the dozer wrongly rotates a few degrees, then immediately comes back to the right orientation. This happens both when starting and ending the translation movement.

Is it the expected behavior? What software and/or hardware solution can I use to solve this? Thanks.

4 REPLIES 4
Miroslav BATEK
ST Employee

Hello,

rotation a few degrees seems to be quite large, we are looking into it and let you know asap.

paul19
Associate III

Thanks @Miroslav BATEK​ .

I did some more tests and I believe the issue is caused by the gyroscope: it seems to be very sensible to linear acceleration, i.e. it returns wrong angular velocity values when linearly accelerating.

A partial solution for me has been to increase MDI_knobs_t.SFKnob.ATime a lot. As a result, I seem to get more long term drift, but less short term angular error.

Notice that it is not an easy tuning to do, as ATime and and FrTime are pretty much undocumented in UM2724. Why those particular default values? What's the impact of setting them to 0? to 1? to 10? to 1000? We're totally blind here.

Miroslav BATEK
ST Employee

Here is at least some info about the parameters:

ATime, MTime, FrTime represent the weighting stability of sensors for prediction (trust factor), from 0 to 1. Default values are recommended.

– ATime: lowering the value will increase the accelerometer weight and sensitivity towards external acceleration. If the application experiences low acceleration (<1g) most of time, it is recommended to increase the value.

– MTime, FrTime: for 9X solution, the lower value will increase the weight of magnetometer reading. If the application experiences low magnetic interference (<50 μT) most of time, it is recommended to increase the value.

paul19
Associate III

Thanks, that is very useful.

> weighting stability of sensors for prediction (trust factor), from 0 to 1

That surprises me. I seem to see significant behavior change with ATime > 1. In fact, in my setup (LSM6DSOX mounted on a pedestrian), I get acceptable angular precision only with ATime > 3.