Fundamentals of Kalman Filters

Dan Simon

Cleveland State University

Suppose we are given a state space description of a system, either linear or nonlinear. How can we design a state estimator that will minimize the error between the true state and the estimated state? One answer to the optimal estimation problem is given by the Kalman filter. The Kalman filter has been implemented in literally thousands of applications since its inception in the early 1960s.

The course outline shows that this course has 12 units, designed to cover a total of 24 hours. Although the first two units provide a review of linear systems theory and probability, the course is written with the assumption that the student has at least some background in this material. The course material consists of over 400 pages of notes that are available from the instructor. Contact information is given in the instructor’s home page (see below).

I’ve written an Introduction to Kalman Filtering web site that some people have found helpful. You can also read a similar introduction (pdf, 425 KB - postscript, 1.26 MB) that appeared in the magazine Embedded Systems Programming.

This course uses Matlab a lot and Maple less frequently. You can find more information about Matlab and Maple from the links below.

Optional homework assignments are given with each of the 12 units. During the course several Matlab examples are discussed to illustrate the theory. The Matlab examples are written using m-files and are available in matlab.zip. None of the example files require Matlab toolboxes. The example files are summarized as follows:

·         MotorSim.m - This two phase step motor simulation can be used to investigate the effects of linearization. As the control input varies more from its nominal value, the linearized simulation diverges more from the nonlinear simulation.

·         Covariance.m - This is a discrete time Kalman filter for the position estimation of a Newtonian system. This example illustrates the effectiveness of the Kalman filter for state estimation. It also shows how the variance of the estimation error propagates between time steps and decreases as each measurement is processed.

·         Mismodel.m - This is a continuous time Kalman filter with a mismodel condition. We design the filter under the assumption that we are trying to estimate a constant bias state. In reality the state is a ramp. Performance can be improved by progressively increasing the assumed process noise. This illustrates the effectiveness of adding fictitious process noise to the assumed model to compensate for modeling errors.

·         Correlated.m - This simulates a Kalman filter with correlated process and measurement noise. This illustrates the filtering improvement that can be attained when correlation is taken into account in the filter design.

·         Colored.m - This simulates a Kalman filter with colored (time correlated) measurement noise. This illustrates the filter improvement that is attained when the time correlation is taken into account. The time correlation can be taken into account using either the state augmentation approach or the Bryson/Henrikson approach

·         KalmanConstrained.m - This simulates a vehicle tracking problem. With the a priori knowledge that the vehicle is on a particular road, the vehicle state is estimated with a constrained Kalman filter.

·         MotorKalman.m - This simulates a hybrid extended Kalman filter for state estimation of a two-phase step motor. We estimate the stator currents, and the rotor position and velocity, on the basis of noisy measurements of the stator currents.

·         ExtendedBody.m - This simulates the continuous time extended Kalman filter for a body falling through the atmosphere.

·         HybridBody.m - This simulates the hybrid extended Kalman filter for a body falling through the atmosphere.

·         FixPtSmooth.m - This illustrates the improvement over standard Kalman filtering that is available with fixed point smoothing.

·         FixLagSmooth.m - This illustrates the improvement over standard Kalman filtering due to smoothing for various lag values and various measurement noise magnitudes. As measurement noise increases, performance improvement due to smoothing decreases.

·         Parameter.m - This illustrates the use of an extended Kalman filter for parameter estimation. We use a Kalman filter to estimate the natural frequency of a second order system.

·         Multiple.m - This illustrates how multiple model estimation can be implemented. We use a Kalman filter to estimate the model parameters of a second order system.

·         Reduced.m - This shows a simple example of a reduced order filter that was designed using the Anderson/Moore approach. This is a way of sacrificing some estimation accuracy for the sake of reduing computational effort.

·         Schmidt.m - This illustrates the use of the reduced order Schmidt-Kalman filter using consider states.

·         Robust.m - This illustrates the use of the robust Kalman filter. The filter is designed to be robust to changes in the variance of the process noise and measurement noise.

·         HinfTF.m - This illustrates the use of the transfer function approach to continuous time H-infinity filtering for a radar tracking example.

·         Hinfinity.m - This illustrates the use of the time domain approach to discrete time H-infinity filtering and compares the results with Kalman filtering.