Numerically robust square root implementations of statistical linear regression filters and smoothers

Filip Tronarp · DOI

Abstract

Statistical Linear Regression (SLR) filters and smoothers are essential tools for state estimation in non-linear systems, such as those found in robotics and navigation. However, standard square-root implementations often rely on Cholesky downdates, which are numerically unstable in low-precision environments. This paper presents a novel, downdate-free square root implementation that utilizes QR decompositions. By restructuring the residual covariance calculation into an additive form, the proposed method maintains high accuracy in single-precision (32-bit) arithmetic, where traditional state-of-the-art methods typically fail.

1. Introduction

In fields ranging from aerospace to signal processing, estimating the state of a dynamic system from noisy sensor data is a fundamental challenge. For non-linear systems, practitioners often turn to Statistical Linear Regression (SLR) filters, a category that encompasses the Cubature Kalman Filter (CKF) and shares theoretical foundations with the Unscented Kalman Filter (UKF).

While these filters are mathematically sound, their practical implementation on embedded hardware—such as microcontrollers or GPUs—introduces numerical risks. Specifically, the covariance matrices used to represent uncertainty can become ill-conditioned. To mitigate this, "square root" implementations are used to track the matrix square root of the covariance, effectively doubling the dynamic range of the precision. However, even these implementations have a weakness: they frequently rely on Cholesky downdates (subtracting information), a process that is notoriously sensitive to rounding errors in low-precision floating-point arithmetic.

2. The Numerical Stability Problem

The primary hurdle in existing SLR square root implementations is the calculation of the residual covariance matrix. Standard algorithms subtract terms to find this value. In 64-bit (double-precision) environments, the errors introduced by these subtractions are often negligible. However, in 32-bit (single-precision) environments—which are preferred in many real-time robotics applications for their speed and power efficiency—these subtractions can lead to non-positive definite results. This causes the algorithm to "explode" or produce physically impossible estimates, rendering the filter useless.

3. Proposed Methodology: Downdate-Free SLR

This paper introduces a restructured mathematical framework for SLR filtering and smoothing that eliminates the need for subtraction-based downdates.

3.1 Core Innovation

The author proves a new mathematical identity (Proposition 1) showing that the residual covariance matrix can be expressed entirely as a sum of positive definite matrices. By reframing the problem as an update-only process, the inherent instability of subtraction is bypassed.

3.2 QR Decomposition Integration

Instead of relying on the Cholesky downdate, the proposed method utilizes QR decomposition. In numerical linear algebra, QR decomposition is considered the gold standard for stability because it avoids the precision loss associated with subtracting nearly equal large numbers. The paper provides a comprehensive framework for applying this stable approach to both the filtering step (estimating the current state) and the smoothing step (refining past state estimates).

3.3 Handling State-Dependent Noise

To ensure the method is applicable to complex real-world sensors, the author extends the framework to accommodate state-dependent noise. This allows the filter to remain robust even when sensor noise levels fluctuate based on the system's current state.

4. Experimental Evaluation

The proposed method ("prop") was evaluated against a standard reference implementation ("ref") using a continuous-time coordinated turn model, a benchmark for tracking objects moving in 2D space. The evaluation involved 100 Monte Carlo trials across different precision levels.

  • Double Precision (64-bit): Both the proposed and reference methods performed identically, confirming that the new formulation is mathematically equivalent to existing theories.
  • Single Precision (32-bit): The reference method failed completely due to numerical instabilities in the Cholesky downdate. In contrast, the proposed method remained perfectly stable, performing almost as accurately as the 64-bit version.

5. Discussion and Limitations

While the proposed method offers a significant leap in robustness for embedded systems, it does have specific constraints. The derivation relies on "Assumption 1," which requires integration weights to be positive. This makes the method directly applicable to Cubature Kalman Filters and Gauss-Hermite filters, but it may require modification for certain configurations of the Unscented Kalman Filter (UKF) that utilize negative weights.

Furthermore, while QR decompositions are more stable, they can be computationally more intensive than Cholesky updates. However, for critical applications where system failure is not an option, the trade-off of minor computational overhead for guaranteed numerical stability is highly favorable.

6. Conclusion

By replacing fragile downdates with robust QR decompositions, this paper provides a pathway for implementing high-performance statistical filters on low-power, single-precision hardware. This advancement is particularly relevant for the next generation of autonomous vehicles and edge-computing devices where numerical reliability is paramount.

Summary updated

BibTeX
@inproceedings{tronarp2024numerically,
  author = {Filip Tronarp},
  title = {{Numerically robust square root implementations of statistical linear regression filters and smoothers}},
  booktitle = {EUSIPCO},
  year = {2024},
  url = {https://openreview.net/forum?id=0J8i9cLbIj},
}
Figure