1 Basic Concepts and Motivation
A Kalman filter estimates the internal condition (state) of a system that changes over time. The only available information is a sequence of measurements that are incomplete and contaminated by noise. By combining a model of how the system evolves with new observations, the filter produces a continuously updated estimate along with a quantified measure of uncertainty.
1.1 State-Space Models
State-space models describe a dynamic system using variables that evolve through time and produce measurable outputs.
1.1.1 Hidden state and observations
The “state” is the set of variables that fully describe the system’s condition at a given time (or at least contains the information needed by the model). Often, the true state cannot be observed directly. Instead, sensors report observations that relate to the hidden state through a measurement mechanism.
1.1.2 System dynamics and measurement models
The model typically includes two components:
- Dynamics model: how the state changes from one time step to the next.
- Measurement model: how the observed data are generated from the state.
Together, these form the basis for predicting what the state should be, then correcting that prediction when measurements arrive.
1.2 Noise and Uncertainty Modeling
Uncertainty is central to the Kalman filter. Noise represents the mismatch between the model and reality, as well as sensor imperfections.
1.2.1 Process noise
Process noise captures randomness in the system evolution—effects that disturb the state prediction even when the dynamics model is correct on average. It reflects, for example, unmodeled forces, variability in motion, or disturbances.
1.2.2 Measurement noise
Measurement noise captures errors in the sensor readings. Even if the state is known, the sensor output can differ due to electronics noise, environmental effects, quantization, or interference.
1.2.3 Probabilistic interpretation of uncertainty
In the Kalman filter framework, uncertainty is treated as a probability distribution over the state. In the standard linear-Gaussian setting, this distribution can be summarized efficiently using a mean (the estimate) and a covariance matrix (the uncertainty structure).
1.3 Recursive Estimation
The hallmark of the Kalman filter is recursion: each new observation updates the previous estimate without reprocessing the entire measurement history.
1.3.1 Batch estimation vs. online filtering
Batch estimation computes an estimate after collecting all data, often by solving a global optimization problem. Online filtering, by contrast, processes data sequentially, which is advantageous for real-time operation, limited memory, and time-varying decisions.
1.3.2 The predict-then-update paradigm
At each time step, the filter performs two logically distinct actions:
1 Basic Concepts and Motivation
2 Kalman Filter Foundations
The result is an updated state estimate and updated uncertainty.
2 Kalman Filter Foundations
Kalman filtering becomes especially tractable under linear dynamics and Gaussian noise, where it provides optimal estimates in a precise mathematical sense.
2.1 Linear Gaussian Assumptions
The standard Kalman filter assumes linear relationships and noise that follows Gaussian distributions.
2.1.1 Gaussian noise and linear dynamics
Under these assumptions, the state evolution and measurement generation are linear functions of the current state, with additive noise. If the initial state is also Gaussian, then the posterior distribution remains Gaussian over time.
2.1.2 Why these assumptions enable optimality
When linear-Gaussian conditions hold, the conditional mean of the state given all measurements up to the current time has a closed-form expression and can be computed recursively. The covariance update ensures that the uncertainty description remains consistent with the assumed probabilistic model.
2.2 The Estimation Goal
The goal is not merely to fit a model, but to compute an estimate that is robust under uncertainty.
2.2.1 Minimum mean-square error (MMSE) estimate
In the linear-Gaussian regime, the Kalman filter yields the MMSE estimate: the expected value of the hidden state conditioned on measurements. This minimizes the expected squared estimation error.
2.2.2 State estimate and covariance tracking
The filter maintains two coupled quantities:
- the estimated state mean, and
- the estimated error covariance, which describes how uncertainty evolves and correlates across state components.
As new measurements arrive, the covariance typically decreases in well-observed directions and may increase due to uncertainty introduced by process noise.
2.3 Notation and Core Variables
Clear notation is essential for implementing and analyzing the algorithm.
2.3.1 State vector and control input
Let the state at time step \(k\) be represented by a vector \(x_k\). A control input \(u_k\) can influence the state evolution; when present, it is treated as known information that drives the system model.
2.3.2 Observation vector
Let \(z_k\) be the observation at time \(k\). The observation model maps the state into the measurement space, typically through a linear transformation.
2.3.3 Covariance matrix interpretation
The covariance matrix \(P_k\) encodes uncertainty and correlations. Diagonal entries quantify variance of each state component, while off-diagonal entries capture statistical dependence between components.
3 The Kalman Filter Algorithm (Standard Form)
The standard Kalman filter operates in two phases every time step: prediction and measurement correction.
3.1 Prediction Step
The prediction uses the dynamics model to estimate the next state and its uncertainty.
3.1.1 Propagating the state estimate
| Given the previous estimate \( \hat{x}_{k-1} \), the predicted state mean \( \hat{x}_{k | k-1} \) is obtained by applying the system model forward to time \(k\). |
|---|
3.1.2 Propagating the error covariance
| Uncertainty also propagates. The predicted covariance \(P_{k | k-1}\) reflects both how uncertainty evolves through the dynamics and how process noise adds new uncertainty. |
|---|
3.1.3 Time update with system matrices
In the common linear formulation, the dynamics can be written using matrices that multiply the state and control input. These matrices determine how the estimate and covariance transform during the time update.
3.2 Update Step (Measurement Correction)
The update step blends the predicted state with the incoming observation.
3.2.1 Computing the innovation (residual)
The innovation is the difference between the actual measurement and the predicted measurement generated from the predicted state. It indicates how surprising the measurement is relative to the model prediction.
3.2.2 Computing the innovation covariance
The innovation covariance measures the expected variability of the innovation, incorporating both predicted state uncertainty and measurement noise. It determines how much weight should be placed on the new observation.
3.2.3 Kalman gain calculation
The Kalman gain is a matrix that sets the relative influence of measurement correction. Larger uncertainty in the prediction or smaller uncertainty in the measurement typically increases the gain, causing the update to rely more on observations.
3.3 State and Covariance Update
After computing the gain, the filter updates both the state mean and covariance.
3.3.1 Updating the mean estimate
The corrected state estimate \( \hat{x}_k \) is formed by adding the innovation scaled by the Kalman gain to the predicted mean. This move pulls the estimate toward the measurement in directions where the measurement is reliable.
3.3.2 Updating the error covariance
The corrected covariance \(P_k\) updates the uncertainty by accounting for information gained from the measurement. In the ideal linear-Gaussian case, the updated covariance reflects the posterior uncertainty.
3.3.3 Joseph-form covariance updates (numerical stability)
Direct covariance updates can suffer numerical issues due to finite precision arithmetic. The Joseph-form update is a mathematically equivalent expression designed to preserve symmetry and positive semidefiniteness more reliably in implementations.
4 Mathematical Derivation and Properties
This section outlines why the Kalman filter has its particular form and what properties it satisfies.
4.1 Optimality Under Linear Gaussian Models
The Kalman filter can be derived from Bayesian reasoning in the linear-Gaussian setting.
4.1.1 Bayesian update viewpoint
The prediction step corresponds to propagating the prior distribution forward in time. The update step corresponds to applying Bayes’ rule when a new measurement becomes available, combining prior belief with measurement likelihood.
4.1.2 Relation to conditional expectations
In this framework, the posterior mean of the state conditioned on all measurements up to time \(k\) takes the same structure as the recursive Kalman equations. This links the filter output directly to conditional expectation.
4.2 Equivalent Formulations
Different algebraic representations can be useful depending on implementation goals.
4.2.1 Information form of the filter
The information form expresses the filter using the inverse covariance (information matrix) rather than covariance itself. This can be advantageous in scenarios such as sparse measurements or certain computational strategies.
4.2.2 Steady-state and simplified variants
For systems that meet conditions for time-invariant behavior, the Kalman gain may converge to a steady value. When this occurs, the filter can use a simplified repeated update, reducing computation.
4.3 Consistency and Uncertainty Behavior
The covariance update governs how uncertainty changes, and its behavior reveals the filter’s assumptions.
4.3.1 Covariance contraction/expansion intuition
When observations provide informative data, the filter typically reduces uncertainty along observed directions, a phenomenon often described as covariance contraction. Conversely, during prediction without measurements, uncertainty can expand due to process noise.
4.3.2 Numerical stability considerations
Stable implementations respect the mathematical properties of covariance matrices, such as symmetry and positive semidefiniteness. Numerically robust formulations and careful linear algebra help prevent divergence caused by rounding errors.
5 Extensions and Generalizations
Real systems may violate assumptions of linearity or Gaussianity. Extensions broaden applicability.
5.1 Extended Kalman Filter (EKF)
The EKF extends the Kalman filter to nonlinear dynamics and nonlinear measurements.
5.1.1 Linearization of nonlinear dynamics
The EKF approximates nonlinear functions by their first-order Taylor expansion around the current estimate. This produces local linear dynamics used by the standard Kalman equations.
5.1.2 Jacobians and local approximation
The linearization relies on Jacobian matrices of the nonlinear models with respect to the state. Because the approximation is local, the EKF’s accuracy depends on the degree of nonlinearity and the quality of the current estimate.
5.2 Unscented Kalman Filter (UKF)
The UKF addresses nonlinearities by propagating a set of carefully chosen sample points.
5.2.1 Sigma points and moment matching
Instead of linearizing, the UKF represents the current uncertainty distribution by sigma points. These points are propagated through the nonlinear model, and the resulting mean and covariance are reconstructed to match moments of the transformed distribution.
5.2.2 Comparing EKF vs. UKF conceptually
Conceptually, the EKF uses local derivatives, while the UKF uses deterministic sampling to capture nonlinear effects more accurately. Which method performs better depends on system characteristics and computational constraints.
5.3 Beyond Gaussian Noise
Other filtering approaches relax the Gaussian assumption or use different representations of uncertainty.
5.3.1 Particle filters (overview)
Particle filters approximate the posterior distribution using a set of weighted samples. They can represent multi-modal distributions but may require many particles for good accuracy, especially in high dimensions.
5.3.2 Robust filtering motivations
When noise is non-Gaussian, has outliers, or the model is uncertain, more robust strategies may be needed. Approaches include alternative likelihood models, adaptive noise estimation, or different filter families that reduce sensitivity to violations of assumptions.
6 Practical Implementation Topics
Practical success depends on correct initialization, careful tuning, and numerically stable computation.
6.1 Initialization
An initial estimate and covariance are required before recursion begins.
6.1.1 Choosing initial state estimates
If prior knowledge exists (e.g., from calibration or first measurements), it can seed the initial mean. Otherwise, a neutral or physically plausible starting point may be used, understanding that convergence may take time.
6.1.2 Choosing initial covariance
The initial covariance encodes how confident the initial guess is. Too small a covariance can make the filter stubborn, while too large a covariance can cause overly aggressive corrections.
6.2 Tuning Noise Covariances
The process and measurement noise covariances strongly influence filter behavior.
6.2.1 Process noise calibration
Process noise tuning reflects how much the dynamics model is expected to deviate from the true system. Adjusting it can balance responsiveness and smoothness in the estimated trajectory.
6.2.2 Measurement noise calibration
Measurement noise calibration determines how much the filter trusts sensors. Overestimating measurement noise can underreact to real changes, while underestimating it can amplify measurement errors.
6.3 Handling Missing or Irregular Measurements
Real data streams may have dropouts or nonuniform sampling.
6.3.1 Skipped updates
If a measurement is missing at a time step, the filter can perform prediction only and postpone the update until observations return. The covariance naturally increases during these intervals.
6.3.2 Variable sampling intervals
When sampling intervals vary, the dynamics model typically must be adjusted to match the elapsed time. This can involve recomputing discretized system matrices for each time gap.
6.4 Computational Considerations
Efficiency affects feasibility for real-time systems.
6.4.1 Complexity per time step
The dominant cost often comes from matrix multiplications and matrix inversions (or solving linear systems) required during gain computation. Complexity grows with state dimension, motivating careful implementation for large problems.
6.4.2 Efficient matrix operations
Using optimized linear algebra routines and exploiting structure (such as sparsity or diagonal blocks) can reduce runtime. Appropriate data layouts and avoiding unnecessary conversions also help.
6.5 Numerical Issues
Numerical robustness prevents filter divergence and preserves correctness.
6.5.1 Positive semidefinite covariance
Covariance matrices should remain symmetric and positive semidefinite. Implementations may use stable update formulas and symmetry enforcement to maintain these properties.
6.5.2 Mitigating rounding errors
Rounding errors can accumulate over many iterations. Techniques include stable factorizations, using Joseph-form updates, and monitoring condition numbers of innovation covariance matrices.
7 Applications
Kalman filters and related methods are widely used because they provide an uncertainty-aware way to fuse information over time.
7.1 Target Tracking and Navigation
Tracking problems benefit from combining motion models with sensor data.
7.1.1 Radar/GPS fusion
Different sensors provide complementary strengths: some measure position directly with noise, while others measure relative motion or velocity. A Kalman filter can fuse these inputs into a single consistent estimate.
7.1.2 Tracking in presence of uncertainty
When targets maneuver unpredictably or sensor readings fluctuate, uncertainty propagation enables the filter to adapt its confidence and maintain stable tracking.
7.2 Signal Processing and Control
Estimation supports control and improves decision-making under uncertainty.
7.2.1 State estimation for control systems
Controllers often require knowledge of states that are not directly measurable. Kalman filtering supplies a real-time estimate that can be used by feedback laws.
7.2.2 Smoothing and estimation in dynamic systems
While the basic filter estimates the state at each time using past measurements, smoothing methods incorporate additional information from future data to refine earlier estimates.
7.3 Data Fusion and Sensor Networks
Distributed systems may collect multiple streams of information.
7.3.1 Combining heterogeneous sensors
Sensors with different noise characteristics and measurement types can be integrated by mapping their outputs into a shared state-space model.
7.3.2 Distributed estimation (overview)
In networked settings, filters may run locally at nodes and exchange information. Distributed variants aim to approximate a global estimate while limiting communication overhead.
8 Related Methods and Concepts
Kalman filtering sits within a broader family of estimation techniques.
8.1 Kalman Smoother
Smoothing refines estimates by using information across time.
8.1.1 Forward-backward estimation idea
The smoother typically combines forward filtering (using past data) with a backward pass that leverages future observations, producing improved state estimates for earlier times.
8.1.2 Fixed-interval vs. fixed-lag smoothing
A fixed-interval smoother revisits a full time window after data are collected, whereas a fixed-lag smoother delays output by a limited amount, providing a compromise for real-time requirements.
8.2 Control-Oriented Extensions
Connections to control theory explain why estimation and feedback often pair naturally.
8.2.1 Linear quadratic estimation connections (overview)
In linear-quadratic settings, estimation problems relate to minimizing expected error costs. This connection motivates systematic choices of models and noise assumptions.
8.3 Assumptions, Limitations, and When to Avoid
Despite its power, the Kalman filter depends on assumptions that can fail in practice.
8.3.1 Nonlinearity and non-Gaussian effects
Strong nonlinearities or non-Gaussian noise can reduce the accuracy of standard and extended filters. Alternative methods such as UKF or particle filters may better match the true uncertainty structure.
8.3.2 Model mismatch considerations
If the system model is inaccurate or the noise covariances are poorly chosen, the filter may become overconfident or underresponsive. Diagnostics and adaptive tuning can mitigate these issues, but severe mismatch may require revising the model.