Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Gyro z (or yawrate) is not zero

I collected imu.g.z of lsm6 imu.

The data is mutiplied with (pi8.75)/(1000180) to convert it to rad/s (8.75 mdps/lab)

I got 0.024 without any movement!!

Technically it is close to zero but without movement, this value should be abosolutely zero otherwise the yaw angle should be changed !!
When i rotate the sensor i got -0.32376 (always) it should be that value only one then should be back zero instead.

Appreciate any comment to read yawrate properly


You will practically never see a reading of exactly zero from a rate gyro even when it is not being rotated. In addition to noise in the readings, there will typically be some offset, which is usually specified as something like “zero-rate level”. For the LSM6DS33, this has a typical value of ±10 dps according to its datasheet. So, assuming you are seeing 0.024 rad/s (1.4 dps) from your sensor, this is well within the expected range.

The zero-rate level tends to be pretty stable over time, so in applications that are sensitive to gyro drift, you can compensate for it by performing calibration in your software. Typically, this involves averaging some readings while the gyro is stationary (on startup, for example) to determine the zero-rate offset, then subtracting this offset from subsequent readings.