1. Matched tuning
How to use
σₐ = 2.0 m/s², σ_z = 8 m, f = 2 Hz, maneuver 60%
Outcome
RMSE 6.69 m vs 11.34 m obs-only; NIS 93.1% inside the gate, mean 2.18 — the banner reads consistent.
Elysia Tools
Navigation
Signal Processing
Tune process noise Q and measurement noise R on a 2D target and watch RMSE, gain K, innovations and the NIS consistency test respond.
Open static visualizationAt a Glance

Verified Results
Every parameter set and result below is a fixed output of this page's built-in model (each asserted before delivery) and reproduces directly: set the Parameters column in the interactive panel.
| Scenario | Parameters | Result |
|---|---|---|
| Matched tuning | σₐ = 2.0 m/s², σ_z = 8 m, f = 2 Hz, maneuver 60% | position RMSE 6.69 m vs 11.34 m obs-only; NIS 93.1% inside χ²₂ gate, mean 2.18 → consistent |
| Q too small | σₐ = 0.05 m/s², maneuver 100% | RMSE 65.6 m (worse than raw observations); NIS 30.5% inside gate, mean 73 → overconfident, estimate lags in turns |
| Q too large | σₐ = 30 m/s² | RMSE 9.31 m; NIS mean 1.32 → over-conservative: ellipse inflates, estimate hugs the noise |
| High sampling rate | f = 10 Hz (σₐ = 2.0 m/s², σ_z = 8 m) | RMSE 4.81 m; 260 samples, final time 25.9 s (2 Hz preset: 129.5 s); different truth trajectory, so this is not a controlled sampling-rate comparison. |
| Q interior optimum | σₐ ∈ {0.05, 2.0, 30} m/s², scripted S-turns | RMSE 65.6 → 6.69 → 9.31 m: tuning Q has an interior optimum, not a monotone knob |
Sources
Papers and datasets underlying this visualization - every formula, algorithm, and data anchor on the page traces back to the sources below.
Kalman R. E. (1960). A New Approach to Linear Filtering and Prediction Problems. Journal of Basic Engineering 82(1), 35-45.
Kalman R. E., Bucy R. S. (1961). New Results in Linear Filtering and Prediction Theory. Journal of Basic Engineering 83(1), 95-108.
Kailath T. (1968). An innovations approach to least-squares estimation - Part I: Linear filtering in additive white noise. IEEE Transactions on Automatic Control 13(6), 646-655.
Related
Next
Welch G., Bishop G. (2001). An Introduction to the Kalman Filter. UNC-Chapel Hill TR 95-041.
Bar-Shalom Y., Li X.-R., Kirubarajan T. (2001). Estimation with Applications to Tracking and Navigation. Wiley, New York.
Julier S. J., Uhlmann J. K. (2004). Unscented Filtering and Nonlinear Estimation. Proceedings of the IEEE 92(3), 401-422.
Tool usage guide
A phone map shows one calm pin while the raw GPS fixes underneath jump by meters every second. The Kalman filter produces that calm pin: it alternates a prediction step that pushes the state estimate through a motion model and an update step that corrects it with each new measurement, weighted by which side it currently trusts more. This page makes the whole loop visible on a maneuvering 2D target with noisy radar/GPS-style fixes.
The filter carries a state estimate x = [px, vx, py, vy] and an error covariance P that says how unsure it is. Prediction steps both forward: x̂⁻ = Fx̂ and P⁻ = FPFᵀ + Q, where F is the constant-velocity transition and Q is the process noise — the model's honest confession about how much the target can accelerate between fixes. Here Q assumes independent random acceleration from step to step, constant within each step: per axis, σₐ² × [[dt⁴/4, dt³/2], [dt³/2, dt²]], with σₐ in m/s². It is not the discretization of continuous white acceleration with a fixed spectral density.
Each measurement z (a noisy position) then triggers the update. The innovation ν = z − Hx̂⁻ is the surprise — what the sensor saw minus what the model predicted. Its covariance is S = HP⁻Hᵀ + R, and the optimal gain is K = P⁻HᵀS⁻¹. The corrected state is x̂ = x̂⁻ + Kν and the covariance is updated in the numerically stable Joseph form P = (I−KH)P⁻(I−KH)ᵀ + KRKᵀ. K is not a knob anyone sets: it is computed every step from the Q/R ratio — large σ_z or small σₐ pushes K toward 0 (trust the model), the reverse pushes it toward 1 (trust the sensor).
| Control | Range | What it changes |
|---|---|---|
| Process noise σₐ | 0.01–50 m/s² | How much maneuvering the model admits (Q) |
| Measurement noise σ_z | 0.5–100 m | Sensor standard deviation (R) |
| Sampling rate f | 0.5–20 Hz | Step size dt; 260 samples cover different durations and true trajectories at different rates |
| Maneuver intensity | 0–100% | The true scripted S-turns the filter must survive |
Three linked charts grade the filter. The innovation panel plots νx and νy against the ±2√S envelope: a matched filter keeps its surprises inside the envelope. The gain panel shows K converging to the steady-state value K∞ predicted by the Riccati equation (dashed line). The NIS panel computes ε = νᵀS⁻¹ν, which follows a χ²₂ distribution when Q and R match reality — mean 2, with 95% of values under 5.99 = −2·ln(0.05).
The verdict banner turns this into a live grade. NIS mean near 2 and ~95% inside the gate: consistent. Innovations exploding outside the envelope with only ~30% inside: overconfident — Q is too small and the estimate lags through turns. Mean far below 2: over-conservative — Q is too large, the ellipse inflates and the estimate hugs the noise, giving up most of the fusion benefit.
How much should fusion help?
These are scenario-specific results, not a guaranteed improvement for arbitrary targets or tuning. The matched preset has RMSE 6.69 m versus 11.34 m for observations alone. Both sampling-rate presets use 260 samples: the final timestamps are 129.5 s at 2 Hz and 25.9 s at 10 Hz, with different true trajectories. The high-rate RMSE of 4.81 m therefore does not isolate the effect of sampling rate; it is not a controlled rate comparison.
How to use
σₐ = 2.0 m/s², σ_z = 8 m, f = 2 Hz, maneuver 60%
Outcome
RMSE 6.69 m vs 11.34 m obs-only; NIS 93.1% inside the gate, mean 2.18 — the banner reads consistent.
How to use
σₐ = 0.05 m/s², maneuver 100%
Outcome
RMSE 65.6 m — worse than raw observations; only 30.5% of NIS inside the gate (mean 73): overconfident with visible turn lag.
Given the linear model and known noise statistics, it is the minimum-mean-square-error optimal linear estimator — and with Gaussian noise, globally optimal (Kalman, 1960). The premise is an honest model, which is exactly what the NIS consistency test checks.
The phone fuses GPS fixes with a motion model plus accelerometer and gyroscope: R comes from the sensor spec, Q captures walking or riding maneuvers. Real systems use nonlinear extensions such as the EKF/UKF, but the predict-update skeleton is identical to this page.