Kalman Filter Basics
Kalman Filter Basics
Linear model
The two steps
Predict
Update
Intuition for the gain
1-D, measuring the state directly ():
- (perfect sensor): , take the measurement.
- (perfect prediction): , ignore the measurement.
Only the ratio of prediction uncertainty to measurement uncertainty matters — which is why tuning is about Q/R ratios. → Tuning Guide › What each knob does
Q and R in plain words
| Q (process noise) | R (measurement noise) | |
|---|---|---|
| Represents | how wrong the motion model can be per step | how noisy / wrong the sensor is |
| Increase it when | the system moves in ways the model misses | the sensor is noisy or its model is violated (e.g. linear acceleration hitting the accelerometer) |
| Effect | faster response, noisier | smoother, slower to correct |
Health checks
- Innovations should be zero-mean and white. A persistent offset means a bias or model error (e.g. the legacy ‖a‖ = 10.48 vs 9.8). → Sensor Calibration
- Consistency: the actual error should match . Error ≫ σ → over-confident (raise Q). Error ≪ σ → too timid.
- NEES / NIS are the formal versions: should average to the measurement dimension.
Non-linear models
Here, both the process model (quaternion integration) and the measurement model (rotating gravity) are non-linear.
- EKF — linearise with Jacobians , . Needs derivatives; first-order accurate.
- UKF — push a few well-chosen sample points (sigma points) through the real functions and measure the spread. No Jacobians; second-order accurate. → Unscented Transform
Next: Unscented Transform
Connections
Linked from