ABSTRACT

In this chapter we will develop a simple MATLAB function that implements the computations necessary to complete both the “Prediction Phase” and the “Correction (or Update) Phase” of a single iteration of the Discrete Kalman Filter. We will start by re-stating the two prediction equations and the three correction equations that were found in Chapter 6, with the computation of the Kalman Gain (KG) as the first calculation needed for the Correction Phase. Fortunately, we will see that MATLAB allows a simple one-to-one mapping from the set of equations to this function. This is the set of calculations that needs to be executed, recursively, by a MATLAB program or a real-time system to actually implement a Kalman Filter. The single-iteration process will be illustrated as a block diagram, and the iterative execution of that process will be illustrated by a series of copies of the one-iteration block diagram.