"If you can't explain it simply, you don't understand it well enough."
Albert EinsteinThe Kalman Filter algorithm is a powerful tool for estimating and predicting system states in the presence of uncertainty and is widely used as a fundamental component in applications such as target tracking, navigation, and control.
Although the Kalman Filter is a straightforward concept, many resources on the subject require extensive mathematical background and fail to provide practical examples and illustrations, making it more complicated than necessary.
Back in 2017, I created an online tutorial based on numerical examples and intuitive explanations to make the topic more accessible and understandable. The online tutorial provides introductory material covering the univariate (one-dimensional) and multivariate (multidimensional) Kalman Filters.
Over time, I have received many requests to include more advanced topics, such as non-linear Kalman Filters (Extended Kalman Filter and Unscented Kalman Filter), sensors fusion, and practical implementation guidelines.
Based on the material covered in the online tutorial, I authored a book.
The original online tutorial is available for free access. The e-book and the source code (Python and MATLAB) for the numerical examples are available for purchase.
The book takes the reader from the basics to the advanced topics, covering both theoretical concepts and practical applications. The writing style is intuitive, prioritizing clarity of ideas over mathematical rigor, and it approaches the topic from a philosophical perspective before delving into quantification.
The book contains many illustrative examples, including 14 fully solved numerical examples with performance plots and tables. Examples progress in a paced, logical manner and build upon each other.
The book also includes the necessary mathematical background, providing a solid foundation to expand your knowledge and help to overcome your math fears.
Upon finishing this book, you will be able to design, simulate, and evaluate the performance of the Kalman Filter.
The book includes four parts:
"The road to learning by precept is long, by example short and effective."
Lucius SenecaMy name is Alex Becker. I am from Israel. I am an engineer with over 20 years of experience in the wireless technologies field. As a part of my work, I had to deal with Kalman Filters, mainly for tracking applications.
I welcome constructive criticism and sincerely value your feedback and suggestions. As an author, I rely on reader input to enhance my work. The book's second edition has been enriched based on your insights, offering more comprehensive explanations for challenging topics. Please don't hesitate to email me with your thoughts.
Many modern systems utilize multiple sensors to estimate hidden (unknown) states through a series of measurements. For instance, a GPS receiver can estimate location and velocity, where location and velocity represent the hidden states, while the differential time of the arrival of signals from satellites serves as measurements.
One of the biggest challenges of tracking and control systems is providing an accurate and precise estimation of the hidden states in the presence of uncertainty. For example, GPS receivers are subject to measurement uncertainties influenced by external factors, such as thermal noise, atmospheric effects, slight changes in satellite positions, receiver clock precision, and more.
The Kalman Filter is a widely used estimation algorithm that plays a critical role in many fields. It is designed to estimate the hidden states of the system, even when the measurements are imprecise and uncertain. Also, the Kalman Filter predicts the future system state based on past estimations.
The filter is named after Rudolf E. Kálmán (May 19, 1930 – July 2, 2016). In 1960, Kálmán published his famous paper describing a recursive solution to the discrete-data linear filtering problem.
Before delving into the Kalman Filter explanation, let us first understand the necessity of a tracking and prediction algorithm.
To illustrate this point, let's take the example of a tracking radar.
Suppose we have a track cycle of 5 seconds. At intervals of 5 seconds, the radar samples the target by directing a dedicated pencil beam.
Once the radar "visits" the target, it proceeds to estimate the current position and velocity of the target. The radar also estimates (or predicts) the target's position at the time of the next track beam.
The future target position can be easily calculated using Newton's motion equations:
\( x \) | is the target position |
\( x_{0} \) | is the initial target position |
\( v_{0} \) | is the initial target velocity |
\( a \) | is the target acceleration |
\( \Delta t \) | is the time interval (5 seconds in our example) |
When dealing with three dimensions, Newton's motion equations can be expressed as a system of equations:
The set of target parameters \( \left[ x, y, z, v_{x},v_{y},v_{z},a_{x},a_{y},a_{z} \right] \) is known as the System State. The current state serves as the input for the prediction algorithm, while the algorithm's output is the future state, which includes the target parameters for the subsequent time interval.
The system of equations mentioned above is known as a Dynamic Model or State Space Model. The dynamic model describes the relationship between the input and output of the system.
Apparently, if the target's current state and dynamic model are known, predicting the target's subsequent state can be easily accomplished.
In reality, the radar measurement is not entirely accurate. It contains random errors or uncertainties that can affect the accuracy of the predicted target state. The magnitude of the errors depends on various factors, such as radar calibration, beam width, and signal-to-noise ratio of the returned echo. The random errors or uncertainties in the radar measurement are known as Measurement Noise.
In addition, the target motion is not always aligned with the motion equations due to external factors like wind, air turbulence, and pilot maneuvers. This misalignment between the motion equations and the actual target motion results in an error or uncertainty in the dynamic model, which is called Process Noise.
Due to the Measurement Noise and the Process Noise, the estimated target position can be far away from the actual target position. In this case, the radar might send the track beam in the wrong direction and miss the target.
In order to improve the radar's tracking accuracy, it is essential to employ a prediction algorithm that accounts for both process and measurement uncertainty.
The most common tracking and prediction algorithm is the Kalman Filter.