3
$\begingroup$

I have implemented an EKF to track the state of a moving vehicle in 3D. My question is twofold:

  1. What happens if a measurement (e.g., for $y$ velocity) has a covariance that does not overlap with the current state and covariance? As an example, the measurement may have a value of 4 with an variance of 0.2, but the state vector's value for $y$ is 6 with a variance of 0.3.

  2. The reason I ask question 1 is that I am getting negative values along the diagonal in my covariance matrix, signaling negative variances, which is clearly wrong. I have tried using the Joseph form update equation, i.e.,

$ P' = (I - KH)P(I-KH)^T + KRK^T$

However, my covariance matrix is showing negative values after the predict stage, not the update. The issue is with the projection of the covariance matrix using

$P' = APA^T + Q$

where $A$ is actually a Jacobian matrix of my transfer function. Interestingly, the Wikipedia article has this for an EKF:

$P' = AP + PA^T + Q$

I have raw debug output matrices that I can post if needed. The issue seems to be some negative covariance values between my linear and rotational velocities. Apologies in advance if this is a simple question. I'm familiar with Kalman Filters, but have never implemented an EKF that was this complex before.

$\endgroup$

2 Answers 2

3
$\begingroup$

This type of situation can lead to negative Kalman gain matrices (K). This is why people usually implement some sort of sanity checking, if not more sophisticated data association or gating before updating their filters. That is, generally, a Kalman filter should not be provided measurements unless those measurements are consistent with the predicted state of the Kalman filter. Otherwise, negative gains can result and this can lead to non positive semi-definite covariance matrix results. This is especially true for the EKF, which is linearizing the Kalman filter around the predicted state and therefore assumes that the measurements being used to update the filter are consistent with the prediction model (A) being used. For more details and to verify your EKF approach, look at 8.28-8.30 here (https://www.dropbox.com/s/vv8kgd1yut732r7/EE690_08_Kinematic_Estimation_1_Spring04_1by1.pdf)

$\endgroup$
0
$\begingroup$

ayrton04, remember that gaussians curves are non-null from -inf to +inf. Therefore, there is always some overlap between two gaussians. In addition to the issue related by concipotech, you are may facing round-off problems, that causes you matrix to have negative values in the diagonal. Also due to round-off you may check you have a covariance matrix that is not symmetric, which, again, is clearly wrong. Wikipedia has a section about round-off issues on Kalman filter and an entire page about rounding standard.

$\endgroup$
1
  • $\begingroup$ Welcome to CV! I've edited your answer to conform to site style. (We're a little different from typical forum sites.) You may wish to post the request for pdf directly as a comment on the other answer. (This will notify the author.) $\endgroup$ Jul 21, 2017 at 13:48

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.