User:Drrggibbs/Sandbox

Square root form
One problem with the Kalman filter is its numerical stability; when the process is well known (the process noise covariance Qk is small), it is easy for rounding error to render the state covariance matrix P invalid: negative diagonal entries or otherwise not positive semi-definite.

Positive semi-definite matrices have the property that they have a triangular matrix square root P=S·ST. This can be computed efficiently using the Cholesky factorization algorithm, but more importantly if the covariance is kept in this form, it can never have a negative diagonal or become asymmetric. An equivalent form, which avoids many of the square root operations required by the matrix square root yet preserves the desirable numerical properties, is the U-D decomposition form, P=U·D·UT, where U is a unit triangular matrix (with unit diagonal), and D is a diagonal matrix.

Between the two, the U-D factorization uses the same amount of storage, and somewhat less computation, and is the most commonly used square root form. (Early literature on the relative efficiency is somewhat misleading, as it assumed that square roots were much more time-consuming than divisions, while on 21-st century computers they are only slightly more expensive.)

Efficient algorithms for the Kalman prediction and update steps in the square root form were developed by G. J. Bierman and C. L. Thornton.

Square Root Covariance Filter
Equations for the square root covariance filter (SRCF) can be found in Anderson and Moore.