proprioception stateEstimation
see Kalman Filter for basic explanation of the Kalman Filter.
Setup
The Basic Kalman Filter only functions on linear systems. It assumes that your state can be modeled as:
So as a linear system (in matrix form).
The Extended Kalman Filter expands on the capabilities of the basic Kalman Filter to handle non-linear systems modeled by
Relationship with Bayes Filter
Coming from Bayes Filter. We make alot of assumptions to make the math easier to handle.
We assume that our posterior belief is Gaussian, and our noise variables are Gaussian and outside our non-linear state transition and observation models.
- Why Gaussians? Two reasons
- Its a way to represent a continuous PDF in a finite way
- The normal product of two gaussians is also a gaussian
- A large portion of randomness in our world is Gaussian in nature (its a safe-enough approximation)
- Note: Passing our Gaussians through non-linear functions cause the output PDF to be non-Gaussian.
You can draw connections better if you take a look at the Generalized Gaussian Filter
Linearization
The way an EKF gets around this is by linearizing the non-linear system! This is done via a Taylor Series (only using a first-order approximation).
These both become Jacobians where…
Predict
First compute the state estimate prior with the non-linear state transition function
We derive the first order approximation of the non-linear state about the paste state estimate and control input.
We then use that to predict our state covariance prior.
Update
Compute the first order approximation of the non-linear measurement function using our predicted state prior.
Compute the Kalman Gain
Update the priors with the measurement using the Kalman Gain (this becomes the posterior)
Another way to Represent this
There’s just some notation mess because I learned these two concepts from two different sources. The Extended Kalman Filter can also be defined as the following:
[![error] Vee is the predicted prior. hat is the corrected posterior
When do we have a non-linear system?
Its pretty often.
IE. an Ackermann Model is an example of a non-linear state transition model IE. landmark detection would be an example of a non-linear measurement model
EXAMPLE (2D ROBOT LOCALIZATION)
Say a robot moves in 2D with state
The Motion Model of the robot is differential drive and is given by
Similarly, its measurement model is given by landmark detection (the landmark being in the same coordinate frame as the robot)
During Prediction
During Update Given that
Rinse and repeat
