cancel
Showing results for 
Search instead for 
Did you mean: 

Severe gyro integration error on LSM6DSM

YNeum.752
Associate

Our application requires extraction of angle from the gyro samples over short periods of time- a few seconds. In other words, we need to integrate the gyros. 

We see that when we integrate the data when the device is static the accumulated error is fine- a few degrees per minute. Needless to say we remove the gyro bias error from the readings.

However, we ran the following experiment: we set the device on a table with the 'y' axis oriented towards gravity. We then rotate the device about the 'z' axis, back and forth around 90 degrees each time, going back in the end to the original orientation. The whole test took 15 seconds. Each back and forth rotation cycle took around 2 or 3 seconds.

The expected result is, obviously, that the 'z' angle (resulting from integration of the 'z' gyro) should change between 0 and 90 degrees. The 'x' and 'y' angles should remain near zero, since there is no rotation there.

In the actual results we see that the 'z' angle are as expected. However, the 'x' and 'y' angles change dramatically every time the 'z' is rotated back and forth and accumulate an error of as much as 30 degrees over a few seconds, with the 'x' axis drifting by 90 degrees over 15 seconds (!!!) .

See graphs attached

Any suggestions will be highly appreciated!

2 REPLIES 2
sanket47
Associate II

It is obvious on any movement all 3 axis will change. You need to filter and apply different mathematical algorithms to get the final result. You can FIFO and take n number of samples from the time the movement started till movement ends and then average and filter the stored values to get the final reading or measure of change over Z axis in degrees.

YNeum.752
Associate

The fact there is a bit of back and forth rotation about the other axes when I rotate back and forth in the 'z' axis doesn't explain why the other axes' integral blows up.