Kalman Filter Noise Covariance Calculator

Calculate the process noise covariance matrix (Q) and measurement noise covariance matrix (R) for a Kalman filter, along with the steady-state Kalman gain (K).

...

Formulas

Process Noise Covariance Q (discrete-time, piecewise constant white acceleration):

Q = σ_a² · Γ · Γᵀ

Constant Velocity: Γ = [Δt²/2, Δt]ᵀ → Q = σ_a² · [[Δt⁴/4, Δt³/2], [Δt³/2, Δt²]]

Constant Acceleration: Γ = [Δt²/2, Δt, 1]ᵀ → Q = σ_a² · [[Δt⁴/4, Δt³/2, Δt²/2], [Δt³/2, Δt², Δt], [Δt²/2, Δt, 1]]

Measurement Noise Covariance R: R = σ_z²

Steady-State Kalman Gain (via Discrete Algebraic Riccati Equation — DARE):

P = F·P·Fᵀ + Q  (predict)

K = P·Hᵀ·(H·P·Hᵀ + R)⁻¹  (gain)

P = (I − K·H)·P  (update) — iterated until convergence

H = [1, 0, ...] (position-only measurement)

Assumptions & References

  • Linear, time-invariant system with Gaussian noise.
  • Process noise modeled as piecewise constant white acceleration (Singer model variant).
  • Single-axis (1D) position measurement only; H = [1, 0, ...] .
  • Steady-state gain computed by iterating the Riccati recursion until convergence (≤ 2000 iterations, tol = 1×10⁻¹²).
  • σ_a represents the standard deviation of unknown acceleration disturbances.
  • σ_z represents the standard deviation of position measurement noise (e.g., GPS, encoder).
  • Larger σ_a / σ_z ratio → higher Kalman gain → more trust in measurements.
  • Reference: Grewal & Andrews, Kalman Filtering: Theory and Practice, 4th ed., Wiley, 2015.
  • Reference: Bar-Shalom, Li & Kirubarajan, Estimation with Applications to Tracking and Navigation, Wiley, 2001.

In the network