0
$\begingroup$

I see that, in the correction step of Kalman filter, there is an equation to update the covariance matrix. I have been using it in the form:

P = (I - KH)P'

Here P is the covariance matrix, K is the Kalman Gain and H is the observation model. The I is the identity matrix. However, I also see a different equation in some literature:

P = P' - KSKT

where

S = HPHT + Q

where Q is the noise matrix for the observation model. Are these two equations same? If so, how to prove it?

$\endgroup$
3
  • $\begingroup$ After discussion on my answer now I see the confusion. There's an identity I'm missing somewhere I think but I can't figure it out so I removed my answer. FYI, as a sanity check it might be worth setting up a script to generate random matrices, compute optimal $K$, and then compute both $P$ updates to see if they are equal. $\endgroup$
    – ryan0270
    Mar 22, 2018 at 16:46
  • $\begingroup$ @ryan0270 That's a good idea. I will do that. However, it would be much more satisfying if we could find a mathematical proof. $\endgroup$
    – skr
    Mar 22, 2018 at 16:48
  • $\begingroup$ The proof is only useful if the random tests all come back the same. If those tests start to show differences than you know for sure the two are not equivalent (or there are missed assumptions) $\endgroup$
    – ryan0270
    Mar 22, 2018 at 18:22

1 Answer 1

2
$\begingroup$

The Kalman Gain is defined as the following:

$K = PH^T (HPH^T + Q)^-1$

From your question, we need to prove:

$P - KSK^T = (I - KH)P$

primes omitted for simplicity

Canceling P, and substitute S with the provided definition:

$K (HPH^T + Q)K^T = KHP$

Substitute the first K on the left hand side with the definition of the Kalman gain provided: $PH^T (HPH^T + Q)^-1 (HPH^T + Q)K^T = KHP$

S and it's inverse reduces to identity, we are left with:

$PH^TK^T = KHP$

From the transpose property of matrices $(ABC)^T = C^T B^T A^T$ we can rearrange LHS with $P$ as $A$, $H^T$ as $B$, and $K^T$ as $C$:

$(KHP^T)^T = KHP$

Since covariance matrix is symmetric, and KHP must be symmetric (this can be inferred from $P' = P - KHP$) therefore:

$KHP = KHP$

$\endgroup$
8
  • $\begingroup$ When you go from second last to the last step, isn't it $PH^TK^T = KHP$? Correct me if I am wrong. $\endgroup$
    – skr
    Mar 22, 2018 at 20:09
  • $\begingroup$ I missed a transpose at the last steps in my original answer and edited just before your comment. Are you referring to the original answer or the edit? $\endgroup$
    – Wesley
    Mar 22, 2018 at 20:13
  • $\begingroup$ To the edit, with the missed transpose. $\endgroup$
    – skr
    Mar 22, 2018 at 20:14
  • $\begingroup$ How did you arrive at $PH^TK^T$? $\endgroup$
    – Wesley
    Mar 22, 2018 at 20:15
  • 1
    $\begingroup$ $KHP$ is symmetric, as is $P$ $\endgroup$
    – Wesley
    Mar 22, 2018 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.