From the series: Understanding Kalman Filters

*
Melda Ulusoy, MathWorks
*

Discover common uses of Kalman filters by walking through some examples. A Kalman filter is an optimal estimation algorithm used to estimate states of a system from indirect and uncertain measurements.

In the first example, you’re going to see how a Kalman filter can be used to estimate the state of a system (the internal temperature of a combustion chamber) from an indirect measurement (the external temperature of the combustion chamber).

The second example demonstrates another common use of Kalman filters, in which you can optimally estimate the state of a system (e.g., the position of a car) by fusing measurements from multiple sources (e.g., an inertial measurement unit (IMU), an odometer, and a GPS receiver) in the presence of noisy measurements.

In this video, we’ll discuss why you’d use Kalman filters. If you’re not familiar with the topic, you may be asking yourself, “What is a Kalman filter? Is it a new brand of coffee filter that brews the smoothest tasting coffee?” No, it’s not. A Kalman filter is an optimal estimation algorithm. Today we’ll discuss two examples that demonstrate common uses of Kalman filters. In the first example, we’ll see how a Kalman filter can be used to estimate a system state when it cannot be measured directly.

To illustrate this, let’s go to Mars before anyone else does. If your spacecraft’s engine can burn fuel at a high enough temperature, it can create thrust that will let you fly to Mars. By the way, according to NASA, liquid hydrogen is a light and powerful rocket propellant that burns with extreme intensity at 5500 degrees Fahrenheit. But be careful, because a too high temperature can put the mechanical components of the engine at risk. And this can lead to the failure of some of the mechanical parts. If that happens, you might be stuck in your small spacecraft where you’ve got to eat from tubes.

To prevent such a situation, you should closely monitor the internal temperature of the combustion chamber. This is not an easy task, since a sensor placed inside the chamber would melt. Instead, it needs to be placed on a cooler surface close to the chamber. The problem you’re facing here is that you want to measure internal temperature of the chamber but you can’t. Instead, you have to measure external temperature. In this situation, you can use a Kalman filter to find the best estimate of the internal temperature from an indirect measurement. This way, you’re extracting information about what you can’t measure from what you can.

Now that you know the solution to your problem, you can continue your journey to Mars. But are you scared of traveling in space? Let me tell you this: On Mars, you’re going to weigh 62% less than what you weigh on Earth. Still not convinced? Ok, then let’s go back and take a look at another scenario that takes place on Earth. In this example, we’re going to see how a Kalman filter can be used to estimate a state of the system by combining measurements from different sources that may be subject to noise.

You have guests visiting from overseas and you need to pick them up from the airport. You’re using your car’s navigation system. Let’s look at the sensors you have onboard, which help you find your position and navigate you to the airport. The inertial measurement unit (IMU) uses accelerometers and gyroscopes to measure the car’s acceleration and angular velocity. The odometer measures the relative distance traveled by the car. The GPS receiver receives signals from satellites to locate the car on earth’s surface. If you live in Boston as I do, you’ve got to travel through the Big Dig, a very very long tunnel. And in the tunnel, it gets harder to estimate your position through GPS, since the receiver’s line of sight to satellites is blocked and GPS signal is weak. In this case, you may want to trust the IMU readings, which give you the acceleration. However, acceleration itself doesn’t tell you much about the car’s position. For that, you need to take the double integral of the acceleration. Unfortunately, this operation is prone to drift due to small errors accumulating over time. To get better position estimates, you can use IMU measurements along with odometer readings. But note that odometer measurements may be affected by the tire pressure and road conditions.

To summarize, your sensors measuring the relative position of your car give you fast updates, but they are prone to drift. The GPS receiver provides your absolute location, but it gets updated less frequently and it may be noisy. In this scenario, a Kalman filter can be used to fuse these three measurements to find the optimal estimate of the exact position of the car.

Let’s look at some facts about Kalman filters. The Kalman filter is named after Rudolf Kalman, who is the primary developer of its theory. It is an optimal estimation algorithm that predicts the parameter of interest such as location, speed, and direction in the presence of noisy measurements. Common applications of Kalman filters include guidance, navigation, and control systems; computer vision systems; and signal processing. One of the first applications of Kalman filters was in the 1960s. Do you have any guesses as to what it helped with? Engineers used it in the Apollo project, where the Kalman filter was used to estimate trajectories of the manned spacecraft to the Moon and back.

Let’s summarize what we’ve seen in this video. Kalman filters are used to optimally estimate the variables of interest when they can’t be measured directly, but an indirect measurement is available. They’re also used to find the best estimate of states by combining measurements from various sensors in the presence of noise.

In the next videos, we’ll cover what Kalman filters are and how they work. We’ll start by discussing state observers since this will help us understand Kalman filtering, which is a method to design optimal state observers. Kalman filtering is a method to design optimal state observers. Therefore, in the next video, we’ll learn state observers and then we’ll continue our discussion with optimal state estimators.

**Recorded: 30 Jan 2017**