1

I'm working with mpu9250 gyroscope and I got fine measurements for beginning period (few minutes). I calculated offset at start in manner to average sum of first 1000 results from mpu9250 gyro. But If I put mpu9250 on one place and I don't move it I got accumulated error of axes. For example after 5min I got offset of pitch ~1.2degree, roll ~2.5degree and yaw ~1degree.

Does anyone have idea how to solve this or what is there happening? I assume that mpu9250 need some movement each period (for example mpu9250 need position change every 10sec to avoid accumulating of error)

subavet995
  • 55
  • 1
  • 9
  • Please give more detail. How do you calculate the angles? Integration of gyro samples or a special filter(madgwick..) ? Have you heard a 'drift' term which is related to gyroscope? – Berker Işık Feb 26 '21 at 14:59
  • You can avoid from long term drift using kalman filtering or getbetter results applying some techniques high pass filtering. – Berker Işık Feb 26 '21 at 16:09
  • @BerkerIşık Sorry for later answer from me.. I use integration method. I heard for that and I'm trying to figurate out how to solve drift with some filter or proper integration – subavet995 Mar 01 '21 at 14:31
  • I try to use Complementary filter where accelerometer is involved in formula. Basically I use something like this: pitch = 0.82 * gyro_pitch + 0.18 * accel_pitch, roll = 0.82 * gyro_roll + 0.18 * accel_roll. I think this is sort of Kalman filter right? I'm still struggling to cancel accumulating error. I found that gyro gives error when mpu9250 is in static position (no movement for mpu9250) and accel gives error when I try (for example) to go the 90degree not large error but.. I compare pitch and roll from gyro, accel and complementary calculation that's how I notice when certain device – subavet995 Mar 01 '21 at 14:33
  • What is your Target? If it is calculating orientation but under what conditions? Accuracy criteria? There are a lot of disturbances in low cost IMUs. Drift only one of them. You should consider also temperature drift, noise, vibration, Axis misalignments, vibration, lineer acceleration(this effects your orientation), magnetic enviroment factors... Are you try to find orientation in static conditions(under no axial acceleration-deaccelaration) or what? Give detail please? You can use earths gravity(roll,pitch) or earth`s magnetic field(yaw) instead of gyroscope. – Berker Işık Mar 01 '21 at 21:33
  • @BerkerIşık Idea is to calculate well pitch, roll and yaw angles when there is little movement or movement which goes slowly (no rapidly angles change). Aha you suggest to try to implement magnetometer too? I saw that some people use quaternions and filters like Madgwick, Mahony.. These algorithm use gyro, accel and magnetometer data for calculating pitch, roll and yaw – subavet995 Mar 02 '21 at 08:02
  • Madgwick is good starting point. If your object doesnt move along axial direction nor magnetic jamming interference. You will her better result than complementary filter. – Berker Işık Mar 02 '21 at 16:55

2 Answers2

1

Here is answer Gyroscopic Drift Correction

For pitch and roll accelerometer is used as reference and for yaw magnetometer is used.

subavet995
  • 55
  • 1
  • 9
0

Temperature drift of the offset is +/-30°/s over -40~+85°C so it doesn't take much temperature delta to get 1-2.5°/600s.

If you know that it's not rotating you can correct the bias. If you have really deep pockets and probably appropriate security clearances you can get a much better gyro such as a ring laser gyro.

Or use GPNSS data fusion (using GPS, GLONASS, BeiDou, Galileo) to correct longer-term drifts and use the MEMS gyro for higher frequency information. In some cases you might be able to use a camera or magnetometer.

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842