SRIF#
- class SRIF(propagator: Propagator | MissionSequence, measurements: MeasurementSpec, settings: FilterSettings, traj_name: str | None = None, traj_dir: str | None = None, overwrite_traj: bool = True)#
Bases:
FilterODSquare Root Information Filter (SRIF) for spacecraft orbit determination.
The SRIF is the sequential square-root information estimator. It shares the fixed-reference-trajectory philosophy of the
LKF— the reference is never updated mid-pass — but represents the state uncertainty in the square-root information domain rather than the covariance domain. This eliminates explicit matrix inversion from the inner loop and roughly doubles the effective numerical precision compared to the covariance-form LKF.State representation
Instead of the covariance \(P\) and deviation \(\hat{x}\), the SRIF stores the pair \((R_{xx},\, z_x)\) defined by:
\[P = R_{xx}^{-1} R_{xx}^{-T}, \qquad \hat{x} = R_{xx}^{-1} z_x\]where \(R_{xx}\) is the upper-triangular Cholesky factor of the information matrix \(\Lambda = P^{-1} = R_{xx}^T R_{xx}\).
Time update
The square-root information matrix is propagated backward through the one-step STM \(\Phi_{k,k-1}\):
\[R_{xx,k|k-1} = R_{xx,k-1}\,\Phi_{k,k-1}^{-1}, \qquad z_{x,k|k-1} = z_{x,k-1}\](the information vector is unchanged when no process noise is active). When SNC or DMC process noise is present, the Thornton–Bierman augmented QR formulation updates both \(R_{xx}\) and the process-noise sub-block in a single orthogonal transformation without ever forming \(Q_k\) explicitly.
Measurement update
At each epoch \(t_k\), the whitened observation equation is appended below the current information block and the combined system is triangularized via a Householder QR decomposition (no matrix inversion):
\[\begin{split}\begin{bmatrix} R_{xx,k|k-1} & z_{x,k|k-1} \\ \tilde{R}_k^{-1} H_k & \tilde{R}_k^{-1} y_k \end{bmatrix} \xrightarrow{\text{QR}} \begin{bmatrix} \hat{R}_{xx,k} & \hat{z}_{x,k} \\ 0 & e_k \end{bmatrix}\end{split}\]where \(\tilde{R}_k\) is the upper-triangular Cholesky factor of the measurement noise covariance \(R_k\), and \(e_k\) is the normalized postfit residual. The posterior estimate and covariance are recovered as:
\[\hat{x}_k = \hat{R}_{xx,k}^{-1}\,\hat{z}_{x,k}, \qquad \hat{P}_k = \hat{R}_{xx,k}^{-1}\,\hat{R}_{xx,k}^{-T}.\]This sequential update is numerically equivalent to the
SRIFBbatch accumulation applied one epoch at a time, with intermediate time updates between epochs enabling SNC and DMC process noise.Schmidt consider parameters
When consider parameters \(c\) are present, the whitened measurement equation is augmented with the consider Jacobian \(H_{c,k}\) before the QR step:
\[\begin{split}\begin{bmatrix} \hat{R}_{xx,k|k-1} & 0 & \hat{z}_{x,k|k-1} \\ \tilde{R}_k^{-1} H_{x,k} & \tilde{R}_k^{-1} H_{c,k} & \tilde{R}_k^{-1} y_k \end{bmatrix} \xrightarrow{\text{QR}} \begin{bmatrix} \hat{R}_{xx,k} & \hat{R}_{xc,k} & \hat{z}_{x,k} \\ 0 & e_{c,k} & e_k \end{bmatrix}\end{split}\]The off-diagonal block \(\hat{R}_{xc,k}\) encodes the cross- correlation between estimated and consider uncertainties. The consider covariance \(P_{cc}\) is fixed throughout and only inflates the posterior covariance of the estimated state.
Backward smoother (Bierman–Thornton)
The forward pass stores at every epoch \(k\) the posterior information pair \((\hat{R}_{xx,k},\, \hat{z}_{x,k})\) and the process-noise sub-blocks needed to account for SNC/DMC. The backward smoother then processes from epoch \(K\) down to \(1\).
At each backward step, the smoothed information square root \(\tilde{R}_{xx,k+1}\) from epoch \(k+1\) is first back-propagated through the one-step STM:
\[\tilde{R}_{xx,k+1}^- = \tilde{R}_{xx,k+1}\,\Phi_{k+1,k}^{-1}\]and then combined with the forward-filter information via an orthogonal transformation:
\[\begin{split}\begin{bmatrix} \hat{R}_{xx,k} & \hat{z}_{x,k} \\ \tilde{R}_{xx,k+1}^- & \tilde{z}_{x,k+1} \end{bmatrix} \xrightarrow{\text{QR}} \begin{bmatrix} \tilde{R}_{xx,k} & \tilde{z}_{x,k} \\ 0 & e_k^s \end{bmatrix}\end{split}\]The smoothed estimate and covariance are recovered as:
\[\hat{x}_k^s = \tilde{R}_{xx,k}^{-1}\,\tilde{z}_{x,k}, \qquad \hat{P}_k^s = \tilde{R}_{xx,k}^{-1}\,\tilde{R}_{xx,k}^{-T}\]When SNC or DMC process noise is active, the stored Thornton–Bierman sub-blocks \((\bar{R}_{uu},\, \bar{R}_{ux},\, \tilde{b}_u)\) enter the backward QR step to account for the noise contribution in the inter-epoch transition.
- Parameters:
propagator (
PropagatororMissionSequence) – Defines the reference trajectory and STMs. AMissionSequencecan be used for multi-leg trajectories with maneuver events.measurements (
MeasurementSpec) – Measurement specification object.settings (
FilterSettings) – Filter configuration including initial covariance and optional SNC/DMC process noise model.traj_name (
str, optional) – Name for the trajectory BSP file. Auto-generated ifNone.traj_dir (
str, optional) – Directory for the trajectory BSP file.overwrite_traj (
bool, optional) – IfTrue, overwrite any existing trajectory file.
Notes
The SRIF is preferred over
LKFwhen the problem is ill-conditioned (e.g., sparse tracking, very tight a-priori, or poorly observable parameters). When no process noise is required, the batch formulationSRIFBis simpler and equivalent.See also
scarabaeus.LKFCovariance-form sequential filter; same algorithm, lower numerical precision.
scarabaeus.SRIFBBatch (non-sequential) SRIF; no process noise support.
scarabaeus.FilterODBase class providing trajectory and measurement handling.
References
[1]Tapley, B. D., Schutz, B. E., & Born, G. H. (2004).
Statistical Orbit Determination. Elsevier Academic Press. ISBN 978-0-12-683630-1.
[2]Bierman, G. J. (1977).
Factorization Methods for Discrete Sequential Estimation. Academic Press. ISBN 978-0-12-097650-8.
- Attributes:
DMC_flagTruewhen Dynamic Model Compensation (DMC) process noise is active.SNC_flagTruewhen State Noise Compensation (SNC) process noise is active.apriori_covariance_estApriori covariance restricted to the estimated parameter subspace.
bhat_kPosterior information vectors \(\hat{z}_{x,k}\) stored during the forward pass for the backward smoother.
btilde_u_sub_kProcess-noise sub-block \(\tilde{b}_u\) from the Thornton–Bierman augmented QR factorisation (SNC/DMC smoother).
covariance_analysisTruewhen running in covariance-analysis mode (no measurement updates).covariance_consider_historyConsider-parameter covariance block at each epoch.
covariance_historyPosterior covariance \(\hat{P}_k\) at each measurement epoch.
flag_sequenceTruefor multi-leg (mission-sequence) trajectories.has_considerTrueif consider parameters are present in the state vector.measurement_dataContainer for all measurement datasets, residuals, and editing flags.
measurementsMeasurement specification object passed at construction time.
nDimension of the estimated state vector.
postfit_residualsPost-update residuals, keyed by dataset name.
prefit_residualsPre-update residuals \(y_k\), keyed by dataset name.
propagatorPropagator or ScenarioSetup used to build the reference trajectory.
qDimension of the process-noise vector (3 for SNC and DMC).
rbar_u_sub_kUpper-triangular noise sub-block \(\bar{R}_{uu}\) from the augmented QR factorisation (SNC/DMC smoother).
rbar_ux_sub_kCross sub-block \(\bar{R}_{ux}\) from the augmented QR factorisation (SNC/DMC smoother).
rhat_k\(\hat{R}_{xx,k}^{-1}\) stored at each epoch during the forward
settingsFilter configuration (covariance, process noise, output options).
smoothed_covarianceSmoothed covariance at each epoch.
smoothed_state_deviationSmoothed state deviation at each epoch.
state_deviation_historyPosterior state deviation \(\hat{x}_k\) at each measurement epoch.
trajectoryPropagated reference trajectory stored in a SPICE BSP kernel with a companion JSON file for STMs and estimated parameters.
Methods
fit([traj_name, traj_dir, overwrite_traj, ...])Perform iterative orbit determination with automatic convergence checking.
observability_test([print_obs, threshold, ...])Compute the observability and information matrices for the current filter setup.
- property bhat_k: list#
Posterior information vectors \(\hat{z}_{x,k}\) stored during the forward pass for the backward smoother.
- property btilde_u_sub_k: list#
Process-noise sub-block \(\tilde{b}_u\) from the Thornton–Bierman augmented QR factorisation (SNC/DMC smoother).
- property covariance_consider_history: list#
Consider-parameter covariance block at each epoch. Empty list when no consider parameters are active.
- property covariance_history: list#
Posterior covariance \(\hat{P}_k\) at each measurement epoch. Populated after calling
fit().
- property postfit_residuals: dict#
Post-update residuals, keyed by dataset name. Populated after calling
fit().
- property prefit_residuals: dict#
Pre-update residuals \(y_k\), keyed by dataset name. Populated after calling
fit().
- property rbar_u_sub_k: list#
Upper-triangular noise sub-block \(\bar{R}_{uu}\) from the augmented QR factorisation (SNC/DMC smoother).
- property rbar_ux_sub_k: list#
Cross sub-block \(\bar{R}_{ux}\) from the augmented QR factorisation (SNC/DMC smoother).
- property rhat_k: list#
\(\hat{R}_{xx,k}^{-1}\) stored at each epoch during the forward pass for use by the backward smoother.
- property smoothed_covariance: list#
Smoothed covariance at each epoch. Populated when smoothing is enabled in
OutputSettings.
- property smoothed_state_deviation: list#
Smoothed state deviation at each epoch. Populated when smoothing is enabled in
OutputSettings.