# Intuition for $\mathbf{P} = \mathbf{0}$ in steady-state when $\mathbf{Q} = \mathbf{0}$ (Kalman filter)

Consider the following discrete-time system:

$$\begin{equation} \mathbf{x}(k+1) = \mathbf{A}_d \mathbf{x}(k) + \mathbf{B}_d \mathbf{u}(k) \end{equation}$$ $$\begin{equation} y(k) = \mathbf{C}_d \mathbf{x}(k) + D_d \mathbf{u}(k) +v(k) \end{equation}$$

Where $$\mathbf{A}_d = \begin{bmatrix}1 & dt\\0 & 1\end{bmatrix}$$, $$\mathbf{B}_d = \begin{bmatrix}dt\\0\end{bmatrix}$$, $$\mathbf{C}_d = \begin{bmatrix}1 & 0\end{bmatrix}$$, $$D_d = 0$$

The system is process noise free ($$\mathbf{Q} = \mathbf{0}$$) and the measurement noise $$v(k)$$ is a GWN with variance $$R = 0.01$$.

Assume now a steady-state Kalman filter has been designed to estimate the state vector. The prediction error covariance matrix is:

$$\begin{equation} \mathbf{P_p}(k+1|k) = \mathbf{A}_d\mathbf{P_p}(k|k)\mathbf{A}_d^T + \mathbf{Q} \end{equation}$$

And the estimation error covariance matrix is:

$$\begin{equation} \mathbf{P_e}(k+1|k) = (\mathbf{I}-\mathbf{K}_f\mathbf{C}_d)\mathbf{P_p}(k+1|k) \end{equation}$$

Because $$\mathbf{Q} = \mathbf{0}$$, $$\mathbf{P_p}(k+1|k) = \mathbf{A}_d\mathbf{P_p}(k|k)\mathbf{A}_d^T$$ and $$\mathbf{P_e}(k+1|k)$$ will decrease asymptotically to zero. This result can be also verified by the discrete-time algebraic Riccati equation.

I understand this result mathematically. My question is about the intuition behind this, my understanding of the Kalman filter would tell me that the steady-state error covariance (being the covariance of the error bewteen the true state and the estimate, that is $$\boldsymbol{\epsilon}(k) = \mathbf{x}(k) - \hat{\mathbf{x}}(k)$$) would tend towards something greater than zero, the measurement noise being present. Why would $$\mathbf{P_e}(k+1|k)$$ be equal to zero in the case of process noise free systems?

We each have different life experiences to fuel our intuition, but try this one out:

Let $$\mathbf A = 1$$ and $$\mathbf Q = 0$$, and $$\mathbf C = 1$$ -- i.e., the actual state variable just doesn't change, and the measurement is unity (presumably with noise). If you construct a Kalman filter for this, then after a moderate amount of work you'll get a difference equation for the estimate as $$\hat x_k = \hat x_{k-1} + \frac{1}{k}\left (y_k - \hat x_{k - 1} \right). \tag 1$$

Do a bit more math, and you'll find that $$\hat x_k = \frac{1}{k} \sum_{p = 1}^k y_p, \tag 2$$ i.e., the estimate is just the running average of the process output.

You should know, from plain old statistics, that if you're taking a noisy measurement of something unchanging, then assuming Gaussian noise, the best estimate of the thing is an average, and as the number of points you average over goes to infinity, the error goes to zero.

Your question just involves a multivariate extension of this -- if the transition from $$x_{k-1}$$ to $$x_k$$ is perfect, and if the system is observable, then each measurement adds to your knowledge of the states, and this added knowledge exhibits itself in the math as the covariance tending to zero.

If you're intuition is still shaking it's head and saying "no, no, no, you're gaslighting me!" then consider that in any real system you're almost guaranteed to not have perfect knowledge about the transition from $$x_{k-1}$$ to $$x_k$$. If this is why your intuition is objecting -- good for it. That perfect knowledge about the transitions is a nice mathematical conceit, but it rarely happens in real life. You probably want to have a serious discussion about boundaries with your intuition, because being able to see how perfect knowledge (and observability) causes error to go to zero does lead to useful insights into how Kalman filters work, even if they're modeling something that may not actually exist in the real world.

• Nice simplified example! :-)
– Peter K.
Jul 25, 2022 at 22:48
• I found this thought experiment very useful when I was first trying to wrap my head around Kalman filtering, and every once in a while it's a nice touchstone (usually when my intuition is thrashing around and foaming at the mouth). Jul 25, 2022 at 23:29
• Thank you for the answer! You are assuming a time-varying Kalman gain $K_f(k) = \frac{1}{k}$ (hence the moving-average), but what about an arbitrary, fixed $K_f$ (steady-state filter) ? I assumed this would break the assumption of $Q = 0$ and would be irrelevant?
– Gab
Jul 26, 2022 at 8:23
• Also, (I did not try extensively), but do you have any reference on how those two equations are derived from the Kalman's equations? Particularly I cannot manage to make the gain $\frac{1}{k}$ appear in my attempt to derive equation $(1)$.
– Gab
Jul 26, 2022 at 12:03
• There's not a meaningful steady-state solution for the zero process noise case, because the Kalman gain asymptotically approaches zere. Jul 26, 2022 at 14:56