Covariance matrix computation using the unscented transform

Hi everyone :smiley:

I am trying to obtain the state covariance matrix of a spacecraft for any given date in Python. For each measurement date, I obtain a Kalman estimator from:

estimator.estimationStep(measurement)[0]

I store an array of Kalman estimators in estimated_propagators, which I use to propagate the orbit between certain dates. Depending on the date, the algorithm automatically selects the appropriate Kalman estimator to use.

However, this approach only gives me the state; I would like to obtain the corresponding covariance matrix as well. I’ve seen that the StateTransitionMatrix is commonly used in these cases, but I would like to use the UnscentedTransform from the filter to retrieve the covariance matrix—not only at the update epochs, but whenever I want.

I want to use the UT to be consistent: since I am retrieving the covariance matrix at update epochs (when measurements arrive) using the UT, it would be awkward to obtain the covariance matrix at intermediate epochs using the STM.

Thank you so much in advance,
Antonio

Hi @a.malaver,

When you say

You mean a Propagator no ? Because that is what estimationStep()[0] returns a Propagator if I’m not wrong.

If I understand well, you want to propagate both state and covariance matrix, with the covariance being computed with the unscented transform ?

If so, this is not available in Orekit yet. It would be a nice addition.
It’s doable manually if required.

Cheers,
Maxime

Thank you, Maxime. Yes, it would be a nice addition. Cheers, Antonio.

Hi @a.malaver,

I’m answering here to your private question on how to propagate with the unscented theory; so that everyone can benefit from it.

The idea is to follow what is done in method UnscentedKalmanEstimator.estimationStep, extracting only the ā€œpredictionā€ phase (not the correction of the Kalman).

  • Build the sigma points from your initial (state, covariance) tuple.
    See Hipparchus UnscentedKalmanFilter.estimationStep()
    RealVector[] sigmaPoints = utProvider.unscentedTransform(state, covariance);
  • Propagate the sigma points
    See UnscentedKalmanModel.getEvolution()
    • Use a PropagatorBuilder to create a propagator per sigma point
    • Propagate each sigma point individually (note that you can multi-thread this step with a PropagatorsParallelizer)
  • Use the propagated sigma points to build the propagated mean state and covariance, with the unscented inverse transform
        // Reconstruct the state and covariance by inverting the unscented transform
        final Pair<RealVector, RealMatrix> inverseSigmaPoints =
                unscentedTransformProvider.inverseUnscentedTransform(propagatedSigmaPoints);
        final RealVector propagatedMeanState  = inverseSigmaPoints.getFirst();
        final RealMatrix propagatedCovariance  = inverseSigmaPoints.getSecond();

Beware that the unscented mean state is generally ā€œwrongā€, meaning that it is not the same as the central state of the distribution (if you propagated the initial state alone).

Hope this helps,
Maxime

1 Like