# What actually causes gyroscope drift in IMU?

I've been researching online to understand how to get gyroscope data from the MPU-6050 which is probably one of the most popular IMU's out there. But i am confused over the reason why the gyroscope drifts, as i found two sources which give different reasons...

"Because we can't take a perfectly continuous integral, we have to take the sum of a finite number of samples taken at a constant interval Ts. Ts is called the sampling period. Of course this approximation will introduce errors. When gyrosocope data changes faster than the sampling frequency, we will not detect it, and the integral approximation will be incorrect. This error is called drift, as it increases in time."

So, this source claims that the drift is due to the non-ideal sampling frequency when using a microcontroller like Arduino to sample the output of the gyro.

"In order to get rotation (angle) from a gyroscope, which senses angular velocity, you need to perform a single integration.

f ≡ frequency

∫cos(2π×ft)) = (1/(2π×f)) × sin(2π×ft)

But be aware that integration turns noise into drift. As we see above, the integration gets a 1/f outside, meaning that high frequency (f) noise disappears with integration, i.e. a noise of frequency will drop by a factor of a 100, but a very low frequency will be amplified, meaning the gyroscope will drift over time."

And this source claims that integration itself gives the reciprocal of frequency which would cause this drift, and that's without even going to the digital sampling.

So, which one is correct? Or maybe none of them??

• For a complex subject like this, I suggest reading academic papers or vendor app notes. These are more likely to have been subjected to expert scrutiny. Both of these sources seem to be a less knowledgeable person's interpretation. Your first source is more of an Arduino hacker than a gyro expert. Jun 28, 2019 at 8:49

I always understood drift to be DC bias (you can think of it as a voltage offset inherent in all amplifiers and some sensors, even metal junctions can contribute to voltage offsets.) But its a little more than that.

Drift comes from a few sources:

The gyroscope drift is mainly due to the integration of two components: a slow changing, near-dc variable called bias instability and a higher frequency noise variable called angular random walk (ARW). These parameters are measured in degrees of rotation per unit of time. The yaw axis is most sensitive to this drift. A good portion of the pitch (attitude) and roll axis gyroscope drift can be removed within an IMU through the use of accelerometer feedback to monitor position relative to gravity. Filtering the gyroscope output within an IMU using a low-pass or Kalman filter is also a widely used method to cancel a portion of the drift error.

So, which one is correct? Or maybe none of them??

The second quote makes sense, the first one does not. I think the first quote is referring to saturation error. Saturating the gyro is not the same as drift. Drift is more of a constant. Saturation error comes from hitting the upper limit of the sensor and doesn't contribute to error all of the time, drift does. I'd throw the first quote out the window.

• The first quote is talking about aliasing. Jun 28, 2019 at 6:11
• I couldn't remember what the exact word for it was, Thanks Jun 28, 2019 at 6:12

The second quote is more accurate than the first. Integration causes drift, but not just because of the frequency response of the integrator.

There are two primary components of the input signal that contribute to drift, DC offset and noise.

DC offset is obvious — integrate any nonzero constant over time, and you get an output that grows linearly without bound.

Noise is less obvious. When you integrate noise — even noise with zero mean — you get what is called a random walk. While the mean of the output can still be zero, the most probable output magnitude grows proportionally to the square root of elapsed time.

So, in a sense, it does tie back to the frequency response of the integrator: As the frequency gets closer to 0, the gain becomes arbitrarily large, and as time goes on, those low-frequency components of the noise increasingly dominate the output.

"Noise" in this case can come from any of a number of sources. Of course, thermal noise in the sensor and the electronics is the most obvious source. Aliased signals, as mentioned in the first quote, is another. And in discrete systems, there's the quantization noise associated with the ADC and jitter in the sampling process.

It has a drift because of its construction. Imagine an oscillating spring and mass system that moves in two dimensions: back and forth because of excitation, and left/right because of Cooriolis force. Because of friction it stucks and it does not return in default path even when Coriolis force goes away. So it's about mechanics, no ADC problems.

• Not sure what you're getting at here. Is it possible that you're referring to coning and sculling errors? If so, that isn't what the OP is asking about. Jun 28, 2019 at 12:37