I'm try to implement an Imm filter. In one step I need to perform the multivariate gaussian probability function. The problem is that the covariance matrix S of the filter has a negative determinant. My questions:

  1. Is it possible to have a negative determinant? The S matrix is a positive semi-definite matrix so I think it's not possible at all, right?
  2. If for some reason a negative determinant is found, what could I do in my filter? How to recover from a mathematical point of view?

You've got something wrong with your code, probably. A covariance matrix is a symmetric matrix which is positive semi-definite so all its eigenvalues are non-negative. Thus, the determinant (product of eigenvalues) is non-negative.

If it is becoming indefinite due to numerical roundoff, you can replace $S$ with $S + \epsilon I$ for some small $\epsilon >0$. If $S$ is symmetric and $\epsilon \geq \lambda_{min} (S)$, this matrix is positive semi-definite (which you can check from the Raleigh quotient). This is called diagonal loading.

Also, you can propagate a square root of $S$ (e.g. a Cholesky decomposition or something). Square root filters for RLS/Kalman are relatively common and covered in literature (e.g. Haykin's Adaptive filter theory).

  • $\begingroup$ The problem is that due to numerical problem, S is not exactly a symmetric matrix. Thank you very much for your answer. $\endgroup$ – greywolf82 Apr 11 '15 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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