# How does Kalman filtering work in inertial navigation systems?

As far as I understood it correctly most INS-systems use a Kalman filter to compensate measurement errors. I would like to know:

• Does the Kalman filter compensate the errors from all the onboard sensors?

• IIRC the Kalman filter is a tracker, that predicts future computation values. How is this useful here?

• Is this used on IRS as well? Or only on older INS?

Thank you

• See page 27 of Introduction to Inertial Navigation and Kalman Filtering
– mins
Mar 9, 2017 at 20:31
• First you need to understand that observations, or measurements has noises, or errors. Prediction is useful because it gives a reasonable estimate of the present state based on previous data. Say your measurement gives you a very big value but the kalman filter tells the state can not change that fast based on it's knowledge of the system's model, then it will reject reading and bias towards the estimate. Kalman filer receives a vector of inputs of different orders, combing locations, speed, acceleration readings will improve the estimate. Mar 9, 2017 at 20:37

A Kalman filter is used on all kinds of IRU's and INS's, even with airspeed information as in an ADIRU. A Kalman filter is just a general method (and a very useful one) for state estimation and sensor fusion, which is exactly what's going on in an INS system. I wouldn't call this "compensation". Inertial naviagation requires us to read in sensor values like angular acceleration, direction of magnetic north, longitudinal acceleration, and even airspeed, then convert those into more meaningful values like ground speed. If done correctly, these processes (called sensor fusion and state estimation) will minimize errors on all the sensors you feed into it. That's the quick version. For a longer explanation of how it works, read on.

Kalman filters are used for sensor fusion and/or state estimation. State estimation is when the basic physics parameters we want to know like speed and position (called the state of the system), are different from the sensor values we're getting, like magnetic compass readings and gyroscope values. State estimation problems attempt to estimate these values like speed even in tricky situations like when errors are present or when the state can't be directly computed from the sensor values. State estimation in Kalman filters can also take into account inputs to the dynamical system like airplane thrust and aileron position to try to improve the accuracy of the model, but this is not necessary and I'm skeptical about how often this is used based on my experience.

Sensor fusion, on the other hand, is when we want to combine several sensors to try and get a sensor that has the best of both worlds. Sensor fusion and state estimation can overlap. A classic example is GPS and accelerometer sensor fusion. GPS gives accurate position, but only down to a few meters and may not update at the rate desired. Accelerometers give accurate accelaration values even at small scales, but their position estimate tends to drift over longer periods of time. By combining the two we can get the precision of INS but with no drift. One advantage of a Kalman filter is that the different sensors being combined don't need to be measuring the same values as long as we have equations for how the sensor values and the internal state are related. For example, we can combine magnetic compass and gyroscope values even though the two aren't directly analogous. Sensor fusion can also be done with other methods like a complementary filter or Bayesian/Markov methods.

How does a Kalman filter work? First a Kalman filter estimates the state (say, position and speed) using a system model to predict what the new position should be based on previous values. This is the new predicted state. The filter then looks at the sensor values to see what the new position should be based on those measurements. It then reconciles the predicted and measured position to get a new position estimate based on the fact that both of those values may be inaccurate. The filter does this all including weights based on which errors in measurement and estimation are largest and which errors tend to be correlated with each other. Note that this includes errors in both estimation and measurement: outside forces and inaccuracies in our model can throw off our prediction step just like bad sensors can affect our measurement step.

Technically the six degree-of-freedom equations often used for inertial navigation are non-linear (which is kind of like saying we can't scale, add, and reorder these transformations and rotations). A regular Kalman filter will not work in this scenario and the Kalman filter must be a non-linear filter like an extended or unscented Kalman filter.

Kalman filters have several advantages over other filters like a complementary filter. In elementary situations they can arrive at an identical solution to a similar complementary filter or averaging filter. You mention tracking while predicting future values, and I'll explain why a Kalman filter helps. If our last three positions were 1.0, 1.5, 1.7, and 1.8, a simple filter might average 1.7 and 1.8 or similarly try combine past and current values. This would produce a lag behind the current value. Kalman filters (and some simple filters) extrapolate previous values to predict the current value more accurately. Kalman filters really begin to shine as the system we're trying to track changes in complex but predictable ways.

Simple filters like complementary filters struggle more than Kalman filters when errors are correlated or have different weights. Kalman filters use weighting in their estimate to compensate for correlation in errors and also to give the most bias to the best sensor values. For example, if angle of attack and airspeed tend to have the same inaccuracies at the same time, or if the gyroscope is much more accurate than the magnetic compass, the Kalman filter will give the sensors weights to compensate for that. If you're in a situation where you can model the equations of motion, or if you know something about the different types of noise in your system, the Kalman filter is probably more accurate than simpler alternatives.

Despite the accuracy of Kalman filters, I've seen a few places where simpler devices like complementary filters were used instead of Kalman filters. Why? The main reason is complexity, which I won't elaborate on too much at this point.

First of all you should know that a Kalman filter is a state estimation technique. More than a filter, it is an estimator. Whilst it does filter sensor noise in the process, the most important use is to estimate the state of a system.

The KF uses a mathematical model of a system (e.g. an aircraft moving over the earth) to estimate the state of the system (e.g. position, attitude, velocity) by comparing successive measurements to the values that were expected based of previous estimates of the state.

Does the Kalman filter compensate the errors from all the onboard sensors?

No. Firstly, there are many sensors on board, not all are used in Kalman filters. Secondly, you can't fully compensate for all errors, there will always be residual errors in the output.

IIRC the Kalman filter is a tracker, that predicts future computation values. How is this useful here?

It can be used as a tracker indeed. The KF uses its current estimation of the state of the system to predict the state at the time of the next measurement. The differences between the predicted measurement and the actual measurements are then used correct the estimation of the state and update the state uncertainty model.

Is this used on IRS as well? Or only on older INS?

Yes, the KF (usually a more advanced form such as EKF or AKF) is used to fuse data from the multiple sensors is the IRS. In an ADIRU, not only measurements from accelerometers and gyroscopes are used, but also pitot tube and static port measurements are fused in.

• I have read somewhere that a Kalman filter is also used for the GPS on aircraft. Is that correct? I would have expected that GPS nowadays work very well and don't have that much errors... Mar 12, 2017 at 10:26
• How do you think that GPS receivers comes up with these accurate position estimates? Exactly, Kalman filtering :-) Mar 12, 2017 at 16:18
• Can the downvoter please explain their reasons for the -1? I'd be happy to learn what I can improve. Thank you. Nov 22, 2018 at 17:46

A Kalman filter reduces noise. If the sensor has a systematic error, a Kalman filter won't help you.

Basically, the Kalman filter extrapolates an expected value and compares that to the next measurement. The output is a combination of the two. If the measurement jumps left and right, the filter will dampen those jumps. Besides thermal noise, a typical source of such noise is the quantization noise of an analog-digital converter. This kind of noise can be reduced by a Kalman filter.

Other kinds of errors like offset errors or linearization errors cannot be caught by a Kalman filter.

• 1) So one single Kalman filter can have many inputs, i.e. one for every sensor? Or does a single kalman filter have to be designed for each sensor? 2) So it can be used for IRS as well without any problem? (I mostly found it in INS online) Mar 9, 2017 at 21:27
• As long as the bias is observable, it is perfectly possible to do bias estimation and compensation in a Kalman filter. Mar 9, 2017 at 23:43
• @DeltaLima: As long as the bias is known, you need no fancy Kalman filter to account for it. If it is unknown, the filter won't be of any help. Mar 10, 2017 at 9:58
• The Kalman filter can be used to estimate the magnitude of the bias. The bias is often not directly measureable, but is its magnitude is often determinable over time. By including the bias in the state as a state variable the overall accuracy of the state estimation can be improved. If you have for example and one dimensional system where you can measure the position with an unbiased but very imprecise sensor, and the acceleration with a biased but precise sensor, a Kalman filter can be made that will give you a) accurate position, b) accurate acceleration, c) the bias of your accelerometer. Mar 10, 2017 at 10:05
• @DeltaLima What you describe is a low pass filter for the accelerometer where the long-term mean is integrated and compared to the position change. Do it several times to account for low position precision and you get the bias. Dec 19, 2021 at 12:43