Welcome To EKF - A Diff Drive Example
EKF (Extended Kalman Filter) is widely applied in robotics to smooth sensor noises to get a better estimate of a car’s position.
Now let’s take a look at a diff (differential) drive example.
Imagine our world has two cones with known locations: c1
, c2
, and a diff drive with wheel encoders and a cone detector.
- A wheel encoder tells us how far (in m/s) a wheel has travelled within a known time window.
- The cone detector can detect the range
d
and bearing of each cone at any given time.
The goal is to estimate the
Mathematical Formulation
Wheel Encoder
The wheel encoder is able to give us a noisy estimate of the linear
Where:
is the linear velocity of the robot’s center inm/s
is the angular velocity of the robot’s rotation inrad/s
are the wheel encoder increments within time window inm/s
. is the distance between the two wheels (wheel base).
One can also notice that
Conventionally, we use
And we deem the linear and angular velocities as control input ,
Motion Model
In discrete time
Accordingly,
If we integrate the above derivatives, we can get the motion update. This motion update is equivalent to gettting the new coordinates on a circle. In the real world, we have a gaussian noise
- The process noise has a covariance matrix
:
However, to do Kalman Filtering, we must be able to compute kalman gain and covariance matrix using a linear form:
However, because of the non linear terms like
- We first get a prediction
using the full non-linear update model above, - Define Deviation between the last state estimate and the next state estimate:
- Linearize the deviation
So
- This is because we our motion model estimates a single state estimate
, and still linearizes around . However ESKF estimates the error
To be consistent with most other literature, we use
Observation Model
We assume that we know the positions of each landmark \beta, d
in our observation. Note that in real life, this observation is subject to observation noise:
Similarly, we think that deviation of the predicted observation from the real observation comes from the deviation of state estimate
is the real observation
Linearizing the above gives us the observation Jacobian
This is another difference from ESKF, where
- This is because we our observation model is still linearized on
(at $x=x_{t+1}^ h(x_{t+1, true}) - h(x_{t+1}^) \delta x$
Filtering Process
In EKF, we are implicitly applying the Kalman Filtering on the devivation
- Prediction is
- Update is:
Related Issues not found
Please contact @ricojia to initialize the comment