Kalman filter initial prediction variance

624 Views Asked by At

I'm trying to learn about Kalman filters and I think that for the most part the explanations I found were sufficient (There is a great explanation on this forum). But I'm having trouble with the prediction variance and more specifically the initial value.

So from the literature I've read : the observation variance matrix R represents how accurate our measures are, and its concrete value would depend on the sensors we have.

But what about the initial variance of our prediction $P_0$ ? I don't understand what is the concrete meaning of this value. The only thing I found was the following :

It is often also natural to choose the stationary value of the variance as the initial value for the variance

Which if I understand correctly would mean that in some cases after a number of iterations, no matter the initial value, P(t) would converge towards a specific $P_{lim}$ and so we might as well use it as initial value ?

Is that what is meant ? And what if it doesn't converge ? Is it that the initial value for P is linked to how good we know our first guess for the state vector is ?

1

There are 1 best solutions below

0
On

But what about the initial variance of our prediction $P_0$ ? I don't understand what is the concrete meaning of this value.

It's how certain you are of the initial value of the state vector. For instance, imagine that you're in the middle of a corn field that's 100 meters on a side, and you're trying to locate a bean. You might model $x = \begin{bmatrix} x_{north} & x_{east} \end{bmatrix}^T$. Let the middle point of the field be at $x = \begin{bmatrix}0&0\end{bmatrix}^T$.

You could decide that the bean must have a positional probability that's uniformly distributed across the field. Since the Kalman filter is about Gaussian distributions and the uniform distribution isn't a good fit, it's not a bad idea to cheat a bit, and to assign an initial estimate of the position of the bean at $\hat x_0 = \begin{bmatrix}0&0\end{bmatrix}^T$, and the initial variance at $P_0 = \begin{bmatrix}2500 & 0 \\ 0 & 2500\end{bmatrix}^T$. This madly over-represents the exterior of the field (because you know the bean isn't there) and somewhat under-represents the interior of the field -- but you do this because the Gaussian and uniform distributions are different, and you want to use a plain old Kalman filter.

Subsequent measures of the position of the bean will be noisy (it's a GPS-equipped bean? You have bean-locating technology? Who knows?), but each measurement will refine the bean's position, even if it moves (it's a jumping bean?). At each point -- to the extent that your model is accurate -- your filter will tell you where the bean ought to be, and how accurately you should know it.

Note that if you're more interested in the end game than in the start, the "correct" $P_0$ is $P_0 = \begin{bmatrix}\frac{2500}{3} & 0 \\ 0 & \frac{2500}{3}\end{bmatrix}^T$. This accurately captures the covariance of the bean, while ignoring a lot of important differences between Gaussian and uniform distributions.