# How is gyroscope bias exposed and tracked?

For an accelerometer, the measurement is defined in the following way: $$a_m = R_w^b(a_{w} - g) + b_a + v_a$$ Where $R$ is a rotation matrix, $g$ is gravity, $v_a$ is noise, and $b_a$ is the bias. With this, we can expose the bias and orientation error by rotating $g = \begin{bmatrix} 0 & 0 & 9.8 \end{bmatrix}^T$ and adding the bias: $$h(x) = Rg + b_a$$

However, for a gyroscope, we don't have anything like gravity to expose this bias in the same way. How is this usually done?

• Can you expand on 'expose'? I think there are a lot of assumptions baked into your understanding that are making the observability of gyroscope biases hard for you to grasp. I think spelling out your understanding of accel biases would be illuminating. Commented Jan 21, 2018 at 4:40
• So from my understanding of an EKF, on an update step you have a function, $h$, that takes your state, $x$, and outputs something in a sensor reading format. In the case of an accelerometer, you would take gravity, rotate it, then add your predicted bias and that would be your predicted accelerometer reading. With that you can "expose" your error state with the Kalman gain: $K(a_m - h(x))$. Since I am using my predicted orientation and predicted bias, when I expose the error state it exposes the accelerometer bias error and the orientation error. Commented Jan 21, 2018 at 17:03
• How do you know your orientation? Commented Jan 22, 2018 at 13:47
• Gyroscope integration with an accelerometer update. Commented Jan 22, 2018 at 15:01
• You are not able to estimate accel bias using a rotation that would be corrupted by accel bias. Commented Jan 22, 2018 at 15:21

I think you're confused. The method you're talking about would only really work if you know the magnitude and orientation of the accelerations you're trying to measure. If that's the case, then why are you using an accelerometer?

Gravity is essentially a bias. The only thing you're doing different for the accelerometer that you wouldn't do for a gyro is to remove the known bias (gravity) so you can try to find the unknown bias. But again, how do you distinguish between bias and a real reading?

If you're doing this as some sort of a calibration routine - hold the sensor fixed or in some known position/pattern prior to use, then you can do exactly the same thing for the gyro that you're doing for the accelerometer.

As @holmeski noted in the comments, you're skipping a couple steps in your question. For example, you skip from:

$$a_m=R_w^b(a_w−g)+b_a+v_a$$

straight to:

$$h(x)=Rg+b_a$$

The noise term went away, but the $a_w$ term conveniently went away, too. That's the actual acceleration. This is where I'm making the assumption that you're doing some pre-use calibration routine, like holding the accelerometer still ($a_w = 0$) and in some known orientation ($R = \mbox{known}$) in order to estimate the bias $b_a$ prior to use. But again, you could view this as:

$$h(x) = \mbox{known bias} + \mbox{unkown bias} \\$$

For the gyro, there just isn't any known bias like $Rg$, so you just wind up with:

$$h(x)_{\mbox{gyro}} = \mbox{unknown bias} \\$$

You skip the $Rg$ step altogether.

Parting note - a calibration routine like this won't last forever because of bias drift or random walk in the sensor output. If the biases were constant, the could be tested and removed at the factory and everyone could use really high quality IMUs for cheap. The bias changes over time, though, so you can't do that. Higher quality accelerometers or gyros have slower rates of drift, so an initial calibration would last longer, but they all drift.

• Sorry, I wasn't clear in my question. I am estimating several things in my EKF including orientation and the biases. R is the orientation of the quadcopter. Additionally, I can tell which part is gravity (with some error of course) because I know the thrust provided by my motors and my predicted orientation. Even though there are errors, shouldn't all of the error be propagated by the design of the EKF? Papers like this talk about tracking the biases of several sensors and I am simply wondering how it is done. Commented Jan 24, 2018 at 6:42
• Section 5 of that paper talks about the EKF. Commented Jan 24, 2018 at 6:44