Class RtsSmoother

  • All Implemented Interfaces:
    KalmanObserver

    public class RtsSmoother
    extends Object
    implements KalmanObserver
    Perform an RTS (Rauch-Tung-Striebel) smoothing step over results from a sequential estimator.

    The Kalman and Unscented sequential estimators produce a state (mean and covariance) after processing each measurement. This state is a statistical summary of all the information provided to the filter, from the measurements and model of the spacecraft motion, up until the latest measurement. A smoother produces estimates that are summaries of information over all measurements, both past and future.

    For example, if a filter processes measurements from time 1 to 10, then the filter state at time 5 uses measurement information up to time 5, while the smoother state at time 5 uses measurement information from the entire interval, times 1 to 10. This typically results in more accurate estimates, with more information reducing the uncertainty.

    This smoother is implemented using the KalmanObserver mechanism. The smoother collects data from the forward estimation over the measurements, then applies a backward pass to calculate the smoothed estimates. Smoothed estimates are collected into a list of PhysicalEstimatedState, containing a timestamp, mean and covariance over all estimated parameters (orbital, propagation and measurement). The order of the parameters in these states is the same as the underlying sequential estimator, for example from a call to AbstractKalmanEstimator.getPhysicalEstimatedState().

    The smoother is compatible with the Kalman and Unscented sequential estimators, but does not support the semi-analytical equivalents.

    The following code snippet demonstrates how to attach the smoother to a filter and retrieve smoothed states:

         // Build the Kalman filter
         final KalmanEstimator kalmanEstimator = new KalmanEstimatorBuilder().
             addPropagationConfiguration(propagatorBuilder, new ConstantProcessNoise(initialP, Q)).
             build();
    
         // Add smoother observer to filter
         final RtsSmoother rtsSmoother = new RtsSmoother(kalmanEstimator);
         kalmanEstimator.setObserver(rtsSmoother);
    
         // Perform forward filtering over the measurements
         Propagator[] estimated = kalmanEstimator.processMeasurements(measurements);
    
         // Perform backwards smoothing and collect the results
         rtsSmoother.backwardsSmooth();
     

    Note that the smoother stores data from every filter step, leading to high memory usage for long-duration runs with numerous measurements.

    Since:
    13.0
    Author:
    Mark Rutten
    See Also:
    KalmanEstimatorBuilder, UnscentedKalmanEstimatorBuilder, "Särkkä S. Bayesian Filtering and Smoothing. Cambridge University Press, 2013."
    • Constructor Detail

    • Method Detail

      • init

        public void init​(KalmanEstimation estimation)
        Initialise the observer on the initial state of the filter, before processing the first measurement.
        Specified by:
        init in interface KalmanObserver
        Parameters:
        estimation - estimation performed by Kalman estimator
      • evaluationPerformed

        public void evaluationPerformed​(KalmanEstimation estimation)
        Notification callback after each one of a Kalman filter estimation. This accumulates the filter states as the sequential estimator processes measurements.
        Specified by:
        evaluationPerformed in interface KalmanObserver
        Parameters:
        estimation - estimation performed by Kalman estimator