# How to handle the noise covariance matrices in a basic Kalman Filter setup?

I've recently been trying to learn about Kalman Filters; most explanations of the Kalman Filter confuse me in what is known / unknown. I'll assume the following setup: $$\begin{split} x_k &= F_kx_{k-1}+w_k\\ y_k &= H_kx_k + v_k \end{split}$$ where $x_k$ is the unknown state, $y_k$ is the observation, and $w_k, v_k$ are independent normal random variables. I am assuming that the quantitites that we have explicit knowledge of are $y_k, F_k$ and $H_k$.

If we know the exact properties of both noise variables $w_k$ and $v_k$ (i.e., mean zero with known covariance matrices), then the standard Kalman update equations make sense to me; they update the distribution of our belief about $x_k$ given all the information at time $k$, which uses knowledge of both covariance matrices of $w_k$ and $v_k$. However, knowing both of the covariance matrices seems like a very strict and unrealistic assumption to me.

MY QUESTION: Am I correct in assuming that the most basic Kalman Filter model assumes knowledge of both noise covariance matrices? What are the simplest and most common fixes for this issue when we aren't sure of the covariances?

As far as I know yes, the statistics of the disturbances are assumed to be known. And not just that, the standard approach falls into the so called Linear Quadratic Gaussian problem (LQG) where the system is assumed to be perfectly linear and both the disturbance $w$ and the measurement noise $v$ are Gaussian white noise with known covariance matrices (either independent or the joint covariance is known). Not white Gaussian noise is possible to treat too using whitening transformations. For not Gaussian signals, as far as I know, the optimality of the Kalman filter is a question. All that above is known as LQG or $H_2$ optimization/filtering/control.

In the 1980's there appeared an alternative approach, based on $H_\infty$ optimization or minimax where the integral norm was replaced by the uniform one, so that the feedback/filter minimized the worst case scenario in terms of the amount of energy coming from the disturbance to the output. $H_\infty$ filters were more robust and less sensitive to one's knowledge about disturbances or perfect linearity of the system, however, the problem was originally set as deterministic. Stochastic $H_\infty$ turned out to be quite hard and challenging mathematically, like minimization of the sum of $H_\infty$ and $H_2$ norms etc

MY QUESTION: Am I correct in assuming that the most basic Kalman Filter model assumes knowledge of both noise covariance matrices?

Yes, definitely. You need to estimate the covariance matrices of the system model ($$Q$$, related to $$w$$) and of the sensor ($$R$$, related to $$v$$). As you can imagine, this is very dependent on the actual application. In general, $$R$$ can be estimated from the sensor specifications.

It's important to notice that the estimated state depends on the ratio between $$Q$$ and $$R$$.

• If $$R\gg Q$$, we will mostly update our state according to the actions and the system model.
• On the other hand, if $$Q\gg R$$, we will tend to believe our measurements very strongly.

What are the simplest and most common fixes for this issue when we aren't sure of the covariances?

Applying a Kalman Filter to a practical application (almost) always has a covariance tuning phase based on experience.