This article provides a comprehensive explanation of the Kalman filter for state estimation in control systems. Starting from the basic discrete-time formulation, it covers the prediction-update algorithm, steady-state Kalman filter, continuous-time Kalman-Bucy filter, and extensions to multi-rate sensing environments using LMI optimization. Related articles, research papers, and MATLAB links are placed at the bottom.
Author: Hiroshi Okajima, Associate Professor, Kumamoto University, Japan — 20 years of control engineering research
For the overview of state estimation methods, see the hub article: State Observer and State Estimation: A Comprehensive Guide
- Why the Kalman Filter Matters
- Problem Formulation
- Kalman Filter Algorithm
- Steady-State Kalman Filter
- Continuous-Time Kalman-Bucy Filter
- Tuning the Kalman Filter: Choosing Q and R
- Extensions of the Kalman Filter
- Relationship Between Kalman Filter and Luenberger Observer
- Connections to Related Research
- MATLAB Code
- Related Articles and Videos
- Paper Information
- KalmanFilter #StateEstimation #StateObserver #LMI #MultiRateSystems #SensorFusion #DiscreteTimeControl #ControlEngineering #Riccati #MATLAB
Why the Kalman Filter Matters
The Kalman filter is one of the most widely used algorithms in engineering and science. Since its introduction by Rudolf E. Kalman in 1960, it has become the standard tool for optimal state estimation in systems subject to noise and uncertainty.
In practice, the Kalman filter is essential in:
- Navigation and GPS/INS integration: Fusing data from GPS receivers, inertial measurement units (IMUs), and other sensors to estimate position, velocity, and orientation.
- Robotics and autonomous vehicles: Combining camera, LiDAR, radar, and wheel encoder data for localization and mapping (SLAM).
- Industrial process control: Estimating unmeasured process variables from noisy sensor readings for feedback control.
- Economics and finance: Estimating unobserved state variables such as trend components in time series data.
- Signal processing and communications: Tracking and predicting signals in noisy channels.
The Kalman filter can be understood as a Luenberger observer with an optimally designed gain. While the Luenberger observer requires the designer to choose the gain (e.g., via pole placement), the Kalman filter automatically computes the optimal gain
by minimizing the mean-squared estimation error, given knowledge of the noise statistics.
Problem Formulation
Discrete-Time Stochastic System
Consider the discrete-time linear time-invariant system:
where:
is the state vector
is the known control input
is the measured output
is the process noise (disturbance)
is the measurement noise
are system matrices of appropriate dimensions
Noise Assumptions
The standard Kalman filter assumes:
and
are zero-mean white Gaussian noise sequences
with
(process noise covariance)
(measurement noise covariance, positive definite)
and
are mutually uncorrelated
The matrices and
characterize the trust the designer places in the model versus the measurements. A large
relative to
means the model is unreliable and the filter should rely more on measurements; conversely, a large
means the measurements are noisy and the filter should rely more on the model prediction.
Kalman Filter Algorithm
The Kalman filter operates recursively in two steps: prediction and update.
Prediction Step
Using the system model, propagate the state estimate and error covariance from time to time
:
Here, is the a priori state estimate (prediction based on the model), and
is the a priori error covariance matrix representing the uncertainty in this prediction.
Update Step
Incorporate the new measurement to correct the prediction:
The matrix is the Kalman gain, which optimally balances the model prediction against the noisy measurement. The term
is called the innovation (or measurement residual) — it represents the new information brought by the measurement that was not predicted by the model.
Interpretation of the Kalman Gain
The Kalman gain has an intuitive interpretation:
- When the measurement noise covariance
is small (accurate sensors),
is large, and the filter trusts the measurement more.
- When the prediction uncertainty
is small (accurate model),
is small, and the filter trusts the model prediction more.
- The Kalman gain automatically balances these two sources of information at each time step.
Initialization
The filter requires initial values:
: initial state estimate (typically set to the expected value of the initial state, or zero if unknown)
: initial error covariance (set to a large diagonal matrix if the initial state is uncertain)
Steady-State Kalman Filter
For time-invariant systems where the pair is detectable and the pair
is stabilizable, the error covariance
converges to a steady-state value
as
. This steady-state covariance satisfies the discrete algebraic Riccati equation (DARE):
The corresponding steady-state Kalman gain is:
Once the steady-state gain is computed, the Kalman filter reduces to a time-invariant Luenberger observer:
This is computationally efficient because the gain does not need to be recomputed at each time step. The steady-state Kalman filter is widely used in practice due to its simplicity and guaranteed optimality properties.
Simulation Result
The following figure shows a simulation example of the steady-state Kalman filter. The true state, noisy measurements, and the Kalman filter estimate are compared. The filter successfully tracks the true state despite the presence of process and measurement noise.

The MATLAB code for generating this figure is available at: MATLAB_state_observer/03_kalman_filter
Duality with LQR
There is a fundamental duality between the Kalman filter and the Linear Quadratic Regulator (LQR):
- The LQR minimizes a quadratic cost on the state and input for a deterministic system, leading to a state feedback gain via the Riccati equation.
- The Kalman filter minimizes the estimation error covariance for a stochastic system, leading to an observer gain via the dual Riccati equation.
This duality means that computational tools developed for LQR (e.g., MATLAB's dlqr function) can also be used to solve the Kalman filter problem, and vice versa.
Continuous-Time Kalman-Bucy Filter
For continuous-time systems:
where and
are continuous-time white noise processes with intensities
and
, the Kalman-Bucy filter is given by:
where the error covariance satisfies the continuous-time Riccati equation:
The steady-state version is obtained by setting and solving the resulting continuous algebraic Riccati equation (CARE), which can be computed using MATLAB's
care function.
For the relationship between continuous-time and discrete-time formulations, see: Discretization of Continuous-Time Control Systems
Tuning the Kalman Filter: Choosing Q and R
In practice, the noise covariances and
are often not known precisely. The tuning of
and
is therefore a critical practical issue:
- Measurement noise covariance
can often be estimated from sensor specifications or by analyzing sensor data when the system is at rest.
- Process noise covariance
is more difficult to determine. It represents the model uncertainty and is typically tuned based on engineering judgment or experimental validation.
- A common approach is to start with
and
with scalar tuning parameters
and
, and adjust their ratio
to achieve the desired estimation performance.
- Increasing
makes the filter more responsive (faster tracking) but more sensitive to measurement noise.
- Decreasing
makes the filter smoother but slower to respond to state changes.
When the noise statistics are poorly known, the H-infinity filter provides an alternative that guarantees worst-case performance without relying on Gaussian noise assumptions.
For the H infinity filter approach using LMI optimization, see: H infinity Filter: Robust State Estimation Using LMI Optimization
Extensions of the Kalman Filter
Extended Kalman Filter (EKF)
For nonlinear systems of the form:
the Extended Kalman Filter (EKF) linearizes the system around the current state estimate at each time step and applies the standard Kalman filter equations to the linearized system. The Jacobian matrices and
replace
and
in the prediction and update equations.
The EKF is the most widely used nonlinear state estimator in practice, particularly in navigation (GPS/INS) and robotics (SLAM). However, it is not guaranteed to be optimal for nonlinear systems, and may diverge if the initial estimate is far from the true state or if the nonlinearity is strong.
Unscented Kalman Filter (UKF)
The Unscented Kalman Filter (UKF) uses a set of deterministically chosen sigma points to capture the mean and covariance of the state distribution as it propagates through the nonlinear system. Unlike the EKF, the UKF does not require Jacobian computation and generally provides better accuracy for highly nonlinear systems.
Multi-Rate Kalman Filter
In many practical systems, sensors operate at different sampling rates. For example, in automotive applications, GPS may update at 1–10 Hz while wheel speed sensors operate at 100 Hz. The standard Kalman filter assumes all measurements arrive at a uniform rate and does not directly handle this situation.
The multi-rate Kalman filter addresses this by modeling the multi-rate system as a periodically time-varying system where the observation structure changes cyclically depending on which sensors are active at each time step. The Kalman gains converge to periodic steady-state values that repeat every frame period (the least common multiple of all sensor periods).
A key challenge in the multi-rate setting is that the cyclic reformulation used to convert the periodically time-varying system into an LTI system produces a measurement noise covariance matrix that is only positive semidefinite (not positive definite), because at certain time instants some sensors are inactive and contribute zero rows. This prevents direct application of the standard Riccati equation.
This challenge is addressed by an LMI optimization approach based on the dual LQR formulation, which naturally handles semidefinite covariance matrices. The LMI framework also enables multi-objective design, including:
- Pole placement constraints for guaranteed convergence rates
- Mixed H₂/l₂-induced norm design for balancing average-case and worst-case estimation performance
For the detailed LMI-based multi-rate Kalman filter design method, see the paper: H. Okajima, LMI Optimization Based Multirate Steady-State Kalman Filter Design, arXiv:2602.01537 (2026, submitted).
For the multi-rate observer design using l₂-induced norm, see: State Observer Under Multi-Rate Sensing Environment and Its Design Using l2-Induced Norm
Relationship Between Kalman Filter and Luenberger Observer
The following table clarifies the relationship between the Kalman filter and the basic Luenberger observer.
| Aspect | Luenberger Observer | Kalman Filter |
|---|---|---|
| System model | Deterministic | Stochastic (with noise) |
| Gain design | Manual (pole placement, LMI) | Automatic (minimizes error covariance) |
| Optimality | No optimality guarantee | Optimal for Gaussian noise |
| Requires noise statistics | No | Yes (Q, R) |
| Steady-state form | Time-invariant observer | Time-invariant (steady-state KF) |
| Mathematical structure | Same — both are feedback estimators with gain L or K |
In the steady-state case, the Kalman filter is a Luenberger observer with a specific, optimally computed gain. This means that all the theoretical properties of the Luenberger observer (stability via eigenvalue placement, separation principle, etc.) also apply to the steady-state Kalman filter.
Connections to Related Research
Multi-Rate State Observer — H. Okajima, Y. Hosoe and T. Hagiwara, State Observer Under Multi-Rate Sensing Environment and Its Design Using l2-Induced Norm, IEEE Access (2023). Designs a periodically time-varying state observer for multi-rate sensing environments. The LMI-based approach in this paper serves as the foundation for the multi-rate Kalman filter extension.
Multi-Rate Observer-Based Feedback Control — H. Okajima, K. Arinaga and A. Hayashida, Design of observer-based feedback controller for multi-rate systems with various sampling periods using cyclic reformulation, IEEE Access (2023). Extends the multi-rate observer to a complete feedback control system.
Multi-Rate System Identification — H. Okajima, R. Furukawa and N. Matsunaga, System Identification Under Multirate Sensing Environments, Journal of Robotics and Mechatronics, Vol. 37, No. 5, pp. 1102–1112 (2025). Provides the system identification algorithm that obtains the plant model required for Kalman filter design in multi-rate environments.
Outlier-Robust State Estimation (MCV Observer) — When sensor measurements contain outliers (large sporadic errors), the standard Kalman filter performance degrades significantly. The MCV observer provides a robust alternative using median-based estimation.
Model Error Compensator (MEC) — When there is a gap between the plant model and the actual system, the Model Error Compensator can enhance robustness of the observer-based control system.
MATLAB Code
- GitHub (Kalman Filter Simulation): MATLAB_state_observer/03_kalman_filter
- GitHub (Multi-Rate Kalman Filter): multirate-kalman-filter
- MATLAB File Exchange (Multi-Rate Observer): State Estimation under Multi-Rate Sensing: IEEE ACCESS 2023
- GitHub (LMI basics): MATLAB Fundamental Control LMI
Related Articles and Videos
Blog Articles (blog.control-theory.com)
- State Observer and State Estimation: A Comprehensive Guide — Hub article covering all state estimation methods
- State Observer for State Space Model — Basic Luenberger observer
- Controllability and Observability of Systems — Observability as a prerequisite
- H∞ Filter: Robust State Estimation Using LMI Optimization
- Discretization of Continuous-Time Control Systems
- Stability Analysis and Pole Placement Control for Discrete-Time Systems
- Design of Controller Parameters Using Linear Matrix Inequalities in MATLAB — LMI-based design fundamentals
- Advanced LMI Techniques in Control System Design
- State Observer Under Multi-Rate Sensing Environment (IEEE ACCESS 2023)
- State Estimator Unaffected by Sensor Outliers: MCV Approach
- System Identification: Obtaining Dynamical Model
- Model Error Compensator (MEC)
Research Web Pages (www.control-theory.com)
Video
Paper Information
- Okajima, "LMI Optimization Based Multirate Steady-State Kalman Filter Design", arXiv preprint, arXiv:2602.01537 (2026, submitted).
Self-Introduction
Hiroshi Okajima — Associate Professor, Graduate School of Science and Technology, Kumamoto University. Member of SICE, ISCIE, and IEEE.
If you found this article helpful, please consider bookmarking or sharing it.