LMIs in Control/Click here to continue/Applications of Linear systems/An LMI for the Kalman Filter

This is a An LMI for the Kalman Filter. The Kalman Filter is one of the most widely used state-estimation techniques. It has applications in multiple aspects of navigation (inertial, terrain-aided, stellar.)

The System
Continuous Time:

\begin{align} \dot x(t)&=Ax(t)+Bu(t)+w(t),\\ y(t)&=Cx(t)+v(t)\\ \end{align}$$

The process and sensor noises are given by $$ w(t) $$ and $$ v(t) $$ respectively.

Discrete Time:

\begin{align} x_{k+1} &= Ax_k+w_k\\ y_k &= Cx_k +v_k \end{align}$$

The process and sensor noises are given by $$ w_k $$ and $$ v_k $$ respectively.

The Data
The data required for the Kalman Filter include a model of the system that the states are trying to be output and a measurement that is the output of the system dynamics being estimated.

The Filter
The Filter and Estimator equations can be written as:

Continuous Time

\begin{align} \dot \hat{x}(t) &= A\hat{x}(t)+Bu(t)+L(y(t)-\hat{y}(t))\\ \end{align}$$

Discrete Time

\begin{align} \hat{x}_{k+1} &= A\hat{x}_k + L(C\hat{x}_k-y_k)\\ \end{align}$$

The Error
The error dynamics evolve according to the following expression

Continuous Time

\begin{align} \dot e(t)&=(A+LC)e(t)+w(t)+Lv(t)\\ \end{align}$$

Discrete Time

\begin{align} e_{k+1}&=(A+LC)e_k + w_k + Lv_k\\ \end{align}$$

The Optimization Problem
The Kalman Filtering (or LQE) problem is a Dual to the LQR problem. Replace the matrices $$ (A,B,Q,R,K) $$ from LQR with $$ (A^T,C^T,V_1,V_2,L^T). $$

The Kalman Filter chooses $$ L $$ to minimize the cost $$ J = E[e^Te]. $$ This cost can be thought of as the covariance of the state error between the actual and estimated state. When the state error covariance is low the filter has converged and the estimate is good.

The Luenberger or Kalman gain can be computed from $$ L = \Sigma C^TV_2^{-1} $$

The process and measurement noise covariances for the Kalman filter are given by



\begin{align} V_1 &= E[w(t)w(t)^T] \text{ aka: } Q\\ V_2 &= E[v(t)v(t)^T] \text{ aka: } R\\ \end{align}$$

The matrix $$ \Sigma $$ satisfies the following equality

$$ A\Sigma + \Sigma A^T + V_1 = \Sigma C^TV_2^{-1}C\Sigma $$

We also cover the discrete Kalman Filter formulation which is more useful for real-life computer implementations.

The discrete Kalman filter chooses the gain $$ L = A\Sigma C^T(C\Sigma C^T+V)^{-1} $$ where the PSDs of the process and sensor noises are given by



\begin{align} W &= E[w_kw_k^T] \text{ aka: } Q\\ V &= E[v_kv_k^T] \text{ aka: } R\\ \end{align}$$

The steady-state covariance of the error in the estimated state is given by $$\Sigma$$ and satisfies the following Riccati equation.



\begin{align} \Sigma = A\Sigma A^T+W-A\Sigma C^T (C\Sigma C^T+V)^{-1}C\Sigma A^T \end{align}$$


 * Objective: State Estimate Error Covariance
 * Variables: Observer Gains
 * Constraints: Dynamics of System to be Estimated

The LMI: H2-Optimal Control Full-State Feedback to LQR to Kalman Filter
The Kalman Filter is a dual to the LQR problem which has been shown to be equivalent to a special case of H2-static state feedback.

Start with the H2-Optimal Control Full-State Feedback.

The following are equivalent



\begin{align} 1. ||S(K,P)||_{H2} &< \gamma\\ \end{align}$$

\begin{align} 2. K &= ZX^{-1} \text{ for some } Z \text{ and } X > 0 \text{ where} \\ \end{align}$$



\begin{align} [A \ B_2] \begin{bmatrix} X\\ Z\\ \end{bmatrix} + [X \ Z^T] \begin{bmatrix} A^T\\ B_2^T\\ \end{bmatrix} + B_1B_1^T < 0 \\

\begin{bmatrix} X & (C_1X+D_{12}Z)^T\\ C_1X+D_{12}Z & W \end{bmatrix} > 0 \\ TraceW < \gamma \\ \end{align}$$

To solve the LQR problem using H2 optimal state-feedback control the following variable substitutions are required.



\begin{align} C_1 = \begin{bmatrix} Q^{1/2}\\ 0\\ \end{bmatrix}, D_{12} = \begin{bmatrix} R^{1/2}\\ 0\\ \end{bmatrix}, D_{11} = 0, \\ B_2 = B, B_1 = I \end{align}$$

Then



\begin{align} S(P,K) = \begin{bmatrix} A+B_2K & B_1\\ C_1+D_{12}K & D_{11}\\ \end{bmatrix} = \begin{bmatrix} A+BK& I\\ Q^{1/2}& 0 \\K & 0\\ \end{bmatrix} \end{align}$$

This results in the following LMI.



\begin{align} [A \ B] \begin{bmatrix} X\\ Z\\ \end{bmatrix} + [X \ Z^T] \begin{bmatrix} A^T\\ B^T\\ \end{bmatrix} + I < 0 \\

\begin{bmatrix} X & (\begin{bmatrix} Q^{1/2}\\ 0\\ \end{bmatrix}X+\begin{bmatrix} R^{1/2}\\ 0\\ \end{bmatrix}Z)^T\\ \begin{bmatrix} Q^{1/2}\\ 0\\ \end{bmatrix}+\begin{bmatrix} R^{1/2}\\ 0\\ \end{bmatrix}Z & W \end{bmatrix} > 0 \\ TraceW < \gamma \\ \end{align}$$

To solve the Kalman Filtering problem using the LQR LMI replace $$A,B,Q,R,K$$ with $$A^T,C^T,V_1,V_2,$$ and $$L^T.$$ This results in the following LMI.



\begin{align} [A^T \ C^T] \begin{bmatrix} X\\ Z\\ \end{bmatrix} + [X \ Z^T] \begin{bmatrix} A\\ C\\ \end{bmatrix} + I < 0 \\

\begin{bmatrix} X & (\begin{bmatrix} V_1^{1/2}\\ 0\\ \end{bmatrix}X+\begin{bmatrix} V_2^{1/2}\\ 0\\ \end{bmatrix}Z)^T\\ \begin{bmatrix} V_1^{1/2}\\ 0\\ \end{bmatrix}+\begin{bmatrix} V_2^{1/2}\\ 0\\ \end{bmatrix}Z & W \end{bmatrix} > 0 \\ TraceW < \gamma \\ \end{align}$$

The discrete-time Kalman Filtering LMI is saved for another page as it requires derivation of the Discrete-Time LQR LMI problem which was not covered in class.

Conclusion:
The LMI for the Kalman Filter allows us to calculate the optimal gain for state estimation. It is shown that it can be found as a special case of the H2-optimal state feedback with the appropriate substitution of matrices. The LMI gives us a different way of computing the optimal Kalman gain.

Implementation
A link to CodeOcean or other online implementation of the LMI

Related LMIs
Links to other closely-related LMIs


 * H2OptimalObserver