Learn about this "smart" signal processing algorithm that revolutionized fields from space exploration to modern robotics.
Starting with popular filters like the Moving Average, Low Pass, and Gaussian, we examine how the Kalman Filter blends future predictions with current measurements in real time.
We'll explore how this filter is used in autonomous navigation systems and computer vision, then focus on precise motion generation and implement this algorithm in Python and C++.
Most importantly, we'll will build intuition on how to select the right parameters for your specific application and unlock this algorithm's full potential.
Starting with popular filters like the Moving Average, Low Pass, and Gaussian, we examine how the Kalman Filter blends future predictions with current measurements in real time.
We'll explore how this filter is used in autonomous navigation systems and computer vision, then focus on precise motion generation and implement this algorithm in Python and C++.
Most importantly, we'll will build intuition on how to select the right parameters for your specific application and unlock this algorithm's full potential.
Who is this Course For?
- Robotics enthusiasts building robots from scratch
- Web developers re-defining themselves as Robotics Engineers
- Mechanical, Electrical, and Automation engineers crossing into robotics
- Data Scientists seeking hands-on work in robotics
- High school senior – college freshman level of education required
What is a Kalman Filter
A brief history of the Kalman filter and the problem it solves.
Moving Average, Low Pass, and Gaussian Filters
Examine the most popular filters in order of increasing complexity and understand why they cannot be used in real-time.
Predicting the Future
Explore how mathematical models of physical systems can be used to predict what the real objects will do, provided the models are detailed enough and the parameters are accurate enough.
Understanding Variance
Like the Gaussian filter, the Kalman filter is based around Probability. Variance is how we mathematically model the probability of something. This is the key to understanding this algorithm.
Filter Algorithm and Parameters
Kalman filter itself is only a few lines of code that anyone could copy at the stroke of a key. The challenge lies in understanding how the algorithm advances its estimates, and the role each parameter plays in unlocking the full potential of this filter.
Starting with an Initial Estimate
The first parameter we'll look at is the initial estimate: the starting point for the filter. From this point on, the filter will adjust its estimates to get closer and closer to optimum.
Integrating Measurements
We'll examine how measurements relate to the internal state of the system being measured and how they are consumed by the filter. The Kalman filter needs to know how accurate the measurements are in relation to the mathematical model of the same system: it's what enables it to work its magic.
Tuning the Kalman Gain
How can the Kalman Filter optimize its estimates over time? It does so by determining the perfect "blend" of precision afforded by your mathematical model with the accuracy provided by real measurements.
Modeling Systems
In this section we explore how real physical systems can be modeled simply by filling out some matrices that describe the system behavior and then multiplying them. These matrix parameters are how the mathematical model of the object you are measuring is provided to the Kalman filter.
Transitioning System Models
This section picks up where the previous one leaves off. The key ingredient in modeling a physical object is updating it over time based on things like mass, applied forces, and initial velocity. We look at how the Transition matrix is used to describe all of this information, enabling the filter to come up with reasonable predictions over time.
Understanding Covariance
Builds on Understanding Variance section earlier in this course to introduce Covariance: a measure of how a change in one variable affects another. Covariance is a necessary ingredient in classic Linear Regression - one of the pillars the Kalman filter is built on.
Estimate Covariance
In this section we are continuing to examine Kalman Filter algorithm parameters in detail. Estimate Covariance starts off as Initial Estimate Covariance, which is provided as a parameter, and then it's updated by the filter to reflect the blend of prediction and reality chosen for the current iteration.
Noise Covariance
One of the most confusing Kalman Filter parameters is Noise Covariance: an "increase" in uncertainty at each time step that reflects imperfections in the mathematical model chosen to represent the system being measured.
Transitioning Covariance
Kalman filter estimates dynamic, constantly changing properties. Because of this, we have to constantly update our estimation of how accurate they are. This ensures the filter will learn correctly and converge on optimal estimates.
System Identification
While it's important to understand how the filter works with physical models, this still doesn't help you model the particular system you are working with! We'll explore two main methods in modeling mechanical systems you are most likely to come into contact with: DC motors inside robot joints.
Kalman Filter in Python
In this section we'll look at a concrete implementation of the Kalman Filter in Python using GNU Octave, Matlab, and Jupyter Lab.
Kalman Filter in C++
In this section we'll look at a concrete implementation of Kalman Filter in C++, first as a small executable built with CMake, and then as an Arduino Sketch that filters sensor measurements for a robot arm joint position sensor before reporting them to the robot controller.
Sensor Fusion
No discussion about the Kalman filter is complete without a concrete implementation of sensor fusion: combining measurements of the same thing from multiple sensors in order to make the final estimate more accurate. Thankfully this is very simple to do.
Additional Resources
Kalman filter combines probability and stochastic processes, differential and integral calculus, and advanced mechanical and electrical engineering topics. In this section we explore resources that can be used as starting points to bridge gaps between the knowledge obtained in this introductory course and your real application.