Non positive state covariance using squared unscented Kalman Filter

13 visualizzazioni (ultimi 30 giorni)
Hi,
i am trying to use an unscented kalman filter for state and parameter estimation of an ode.
And i am using the UKF-Function from Yi Ciao posted here on Matlab Central: https://de.mathworks.com/matlabcentral/fileexchange/18217-learning-the-unscented-kalman-filter
When trying to run this i get always the same error, that says that my Covariance Matrix P (or S for the squared UKF) becomes non positive definite and therefore the cholesky factorisation does not work. I have already tried a modified version of Ciao's code that implements a squared UKF found on github (https://github.com/JJHu1993/sr-ukf/blob/master/ukf.m).
For me it is unclear what is causing a non positive definite covariance at all. And if that is something that can be fixed by adjusting the tunable parameters (alpha,ki,beta). I found out that for both (ukf and sr-ukf) the code works if i choose alpha = 1 however then the state estimation is really bad. For any value for alpha smaller than 1 i receive the mentioned error. I tried this for two different models/functions and got the same behaviour.
I would be very glad if someone could answer me these questions:
  1. What is typically causing the covariance to become non-positive definite?
  2. Is this something that depends on the tunable parameters or is there a problem with the used model or even the observability?
  3. What is the typical procedure for this problem?
Thanks a lot in advance.

Risposte (1)

Neelanshu
Neelanshu il 30 Gen 2024
Hi Jonas,
I understand from your query that you are interested in finding out why the covariance matrix might become non-positive definite and whether tunable parameters affect it.
A covariance matrix becoming non-positive definite can be caused by several factors:
  1. Numerical Instabilities: When the UKF equations are solved using finite-precision arithmetic (as is the case in computer implementations), small numerical errors can accumulate and lead to a loss of positive definiteness.
  2. Improper Tuning Parameters: The UKF has several parameters, such as alpha, beta, and kappa (or ki), which control the spread of the sigma points around the mean state estimate and the confidence in the process and measurement noise covariance matrices. If these are not chosen correctly, they can lead to an ill-conditioned covariance matrix.
  3. Model Mismatch: If the process model or the measurement model used in the UKF does not accurately represent the true system dynamics or measurement process, it can lead to incorrect covariance updates.
  4. Poor Observability: If the system or the measurements do not provide enough information to fully observe the state of the system, it can make the covariance matrix estimation unreliable.
Regarding the tunable parameters, when the system response to a varying parameter is slow, a larger value for alpha might be required to maintain stability. If you are encountering stability issues, you may consider working with the Square Root UKF, which is computationally more stable.
Hope this helps.

Categorie

Scopri di più su Mathematics in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by