Tool 17 · Advanced Control Systems

Kalman Filter Visualizer

Visualize how a Kalman filter estimates true motion from noisy measurements. Tune process noise and measurement noise, compare truth, sensor readings, and estimated state, and see how uncertainty evolves over time.

What this tool computes

This page uses a simple one-dimensional constant-velocity tracking model. The true object moves with position and velocity, the sensor measures noisy position, and the Kalman filter estimates both position and velocity.

  • True position and velocity
  • Noisy position measurements
  • Kalman-estimated position and velocity
  • Position uncertainty band
  • Kalman gain history
  • RMSE comparison between raw sensor and filtered estimate

Prediction step

The filter first predicts the next state using a dynamics model:

\[ \hat{x}_{k|k-1}=F\hat{x}_{k-1|k-1} \] \[ P_{k|k-1}=FP_{k-1|k-1}F^T+Q \]

The process noise matrix \(Q\) represents uncertainty in the model, such as unmodeled acceleration or disturbance forces.

Measurement update

The filter then corrects the prediction using the noisy sensor measurement:

\[ K_k=P_{k|k-1}H^T(HP_{k|k-1}H^T+R)^{-1} \] \[ \hat{x}_{k|k}=\hat{x}_{k|k-1}+K_k(z_k-H\hat{x}_{k|k-1}) \]

The measurement noise \(R\) tells the filter how much to trust the sensor.

Engineering interpretation

  • High measurement noise makes the filter trust the model more.
  • High process noise makes the filter adapt faster to measurements.
  • Too little process noise can make the filter sluggish.
  • Too little measurement noise can make the estimate chase sensor noise.

Why this matters

Kalman filters are central to spacecraft navigation, orbit determination, sensor fusion, attitude estimation, and tracking systems.

Interactive Kalman filter

The filter model assumes constant velocity, so nonzero true acceleration acts like an unmodeled disturbance.
Presets show how Q and R tuning changes estimator behaviour.

Results

Measurement RMSE

Filter RMSE

Final position estimate

Final velocity estimate

Final Kalman gain

Final uncertainty σ

Interpretation

Run the visualizer to compare truth, noisy measurements, and filtered estimate.

Position: truth, noisy measurements, and Kalman estimate
Velocity estimate
Kalman gain and uncertainty

Assumptions and limitations

This visualizer assumes:

  • One-dimensional constant-velocity filter model
  • Position-only noisy measurements
  • Gaussian-like random noise for demonstration
  • No nonlinear measurement model
  • No sensor bias, outlier rejection, or multi-sensor fusion