1. Introduction
State estimation is one of the most essential tasks in automated and autonomous systems. It refers to determining a usually time-variant state, which cannot be observed directly, by fusing information from one or multiple sensors. A common example is localization, i.e., estimating the position and altitude of a vehicle or other objects in an environment.
Due to their computational efficiency, variants of the Kalman filter [
1] are popular choices for solving state estimation problems. They assume that the uncertainty of all models and the posterior is normally distributed, and they estimate the state in terms of its mean and covariance. For non-linear systems, the extended Kalman filter (EKF) [
2], the unscented Kalman filter (UKF) [
3], and the cubature Kalman filter (CKF) [
4] are three of the most fundamental implementations. The EKF uses a first-order Taylor series expansion in order to linearize the models, while the latter two employ deterministic sampling techniques. The UKF uses the so-called sigma points as samples, and the CKF uses cubature points, which are generated in a slightly different way. In contrast to the EKF, the UKF and the CKF are derivative-free and tend to be more accurate, but they also have a higher computational complexity. An enhancement of the UKF and the CKF is the square-root UKF (SRUKF) [
5] and the square-root CKF (SCKF) [
4], respectively, which do not track the covariance matrix but tracks its square root. In the case of state estimation, they have the same theoretical complexity as the corresponding non-square-root versions, but the practical implementation can be faster. For the special case of parameter estimation, the algorithms can be modified, resulting in an improved theoretical complexity [
5]. Finally, they are numerically more stable.
A challenge in state estimation is the handling of manifold spaces. They behave like a vector space locally but have a more complex global topology. Particularly in the case of localization, one is almost always facing the special orthogonal group
, which is the space of all rotations in
n-dimensional space (usually
) and has a circular topological structure. In other words, whenever an orientation in 2D or 3D is part of a state or a measurement, one has to deal with a manifold. This applies to many practically relevant applications, including but not limited to aerospace, ground vehicles, maritime applications, household robotics, and logistics. However, many estimation algorithms, including the basic variants of the Kalman filter, can only operate on vector spaces and cannot be applied here. As a result, dedicated implementations are needed, and a detailed discussion on that can be found in [
6,
7]. There exist multiple approaches for the EKF [
8,
9,
10,
11], the UKF [
7,
12], and the CKF [
13]. However, to the best of our knowledge, there is no generic and coherent implementation of the SRUKF or the SCKF on manifolds.
In this paper, we present modified versions of the SRUKF and the SCKF for use on manifold spaces, which are based on the ⊞-method (pronounced “boxplus-method”) [
7]. With those algorithms, one can benefit from the improved properties of a square-root filter in all applications where the state space or the measurement space is a manifold. We make a one-to-one comparison of the SRUKF on manifolds to the SRUKF for vector space and discuss all necessary changes in detail. Furthermore, we show how to convert the SRUKF on manifolds into a SCKF on manifolds. The resulting algorithms can be applied to almost arbitrary manifolds and are not limited to any particular ones. We use the challenging problem of localizing an autonomous vehicle in 3D Euclidean space as an example application in order to demonstrate the effectiveness of our approach. In particular, the proposed SRUKF and SCKF are compared to the UKF and the CKF on a real-world dataset. While maintaining the same localization performance, the SRUKF and the SCKF are shown to be computationally more efficient.
The remainder of the paper is structured as follows. We first review related work regarding, in particular, other attempts to apply the SRUKF and the SCKF to manifolds as well as applications of the ⊞-method. Furthermore, a brief overview of other advances in Kalman-filtering techniques is given. In
Section 3, we discuss the basics of encapsulating manifolds using the ⊞-method and corresponding challenges. In
Section 4, we recap the classical SRUKF and derive our SRUKF approach for use on manifolds. After that, in
Section 5, the necessary changes to turn the SRUKF on manifolds into a SCKF on manifolds are discussed. The example application and a detailed empirical evaluation are presented in
Section 6. The paper concludes with a summary and an outlook.
2. Related Work
There are some works on using the SRUKF and the SCKF on manifold spaces. But to the best of our knowledge, there is no solution that is both generic and coherent. In [
14], an SRUKF is used for visual–inertial navigation, with a quaternion being part of the state space. The parameters of the quaternion are treated as a vector. Accordingly, the state space has more degrees of freedom than the underlying manifold space, and thus, the resulting constraints (unit quaternion) need to be enforced by a workaround. A quaternion is also used in the state vector of [
15], where the SRUKF is applied to spacecraft relative navigation. Here, a three-dimensional vector representing the attitude error is used when generating the sigma points, which solves the issue of an over-parametrized state space. While this is conceptually similar to the ⊞-method used in our approach, the particular solution is specific to quaternions. Furthermore, the algorithm cannot deal with measurement spaces that are manifolds. A similar error-state formulation is employed in [
16] for using the SCKF in a strap-down inertial navigation system. This also applies to [
17], where the SCKF is used for attitude estimation. Accordingly, those approaches have the same disadvantages. A detailed analysis on how to treat quaternions in a UKF, and a possible solution is presented in [
18]. The findings are applied to the SRUKF as well and a corresponding algorithm is proposed. Both filters are able to handle not only quaternions in the state but also quaternions as measurements. However, the treatment of the state and the measurement space is specific to quaternions. In [
19], a SCKF for attitude estimation is proposed. It also allows for using quaternions in the state and as measurements. But this approach is specific to quaternions as well and thus cannot be applied to other manifolds.
A more general approach to using the UKF and the SRUKF on constraint state spaces is proposed in [
20], which also has similarities to the ⊞-method. However, the algorithm does not apply a final transformation of the covariance matrix (or, more precisely, its Cholesky factor), which is required to correctly represent the posterior state uncertainty. This particular problem is discussed more in detail in the context of the UKF in [
7] and in
Section 3 of this work. Furthermore, the approach also does not support measurements in manifold spaces. Both apply to [
21] as well, where the SCKF is modified for use on manifolds by employing Lie groups. It also does not perform the final transformation of the covariance matrix, and the measurements are restricted to vector spaces. In [
22], another more general algorithm is presented, which utilizes Lie groups to implement an SRUKF on manifolds. The need for a final transformation of the state uncertainty is addressed here. The proposed solution is to apply a linearization using a first-order Taylor series expansion, which is also discussed in
Section 3 (see (5) and (6)). However, this approach is undesirable in a derivative-free filter like the SRUKF. In [
23], the PhD thesis corresponding to [
18], an SRUKF on Riemannian manifolds is proposed. Since this algorithm is very general, it cannot be embedded within a generic framework, which would allow for a convenient handling of practically relevant manifolds (e.g.,
,
, and combinations of those with
). Instead, it requires the definition of manifolds-specific operations in order to apply the approach to a particular problem, which results in a significant implementation effort.
One of the most popular approaches for generic filtering on manifolds is the use of Lie groups [
8,
9,
12,
13,
21,
22,
24]. The general idea is to represent the state as a group element, i.e., in a manifold space, while filter operations take place in the tangent space, which is a vector space. The ⊞-method, which is used for our approach, has been proposed in [
7]. It is mathematically basically equivalent to filtering on Lie groups but offers a more convenient notation by encapsulating the group operations. The formalism has been used to implement various estimation algorithms on manifolds. In the original publications, modified variants of least squares and the UKF are presented. An implementation of the EKF on manifolds is derived in [
10] and further improved in [
11]. The latter publication also demonstrates how to realize a particle filter on manifolds using the ⊞-method. Another popular application is graph optimization [
25], which is particularly relevant in the context of graph-based simultaneous localization and mapping [
26]. Most recently, [
27] utilized the ⊞-method for applying the interacting multiple model filter and smoother to manifold spaces.
There are other advances in Kalman-filtering techniques beyond the SRUKF and SCKF that are worth mentioning. However, since we are modifying existing approaches and do not propose a fundamentally new one, we leave the detailed comparison of the different algorithms to the corresponding papers. Furthermore, we are focusing on conceptional developments and do not include application-specific improvements. One advancement is the combination of interacting multi-model techniques with the EKF (IMM-EKF). Here, the filter can switch between different models based on the development of uncertainty in order to adapt to changing conditions. This has, for example, been applied to vehicle localization [
28] and multi-target state estimation [
29]. The technique has also been applied to the UKF, which is consequently referred to as interacting multi-model UKF (IMM-UKF). Possible applications are, for example, sensor fault detection for unmanned aerial vehicles [
30] or sensor calibration for underwater vehicles [
31]. Another development is the multi-state constraint Kalman filter (MSCKF) [
32], which is based on the EKF. Here, the filter tracks multiple instances of the state at different time points, which is particularly relevant for visual odometry. There is also a cubature-variant of the MSCKF [
33]. Furthermore, IMM techniques have most recently been combined with the MSCKF in order to form the IMM-MSCKF [
34]. Finally, the invariant EKF (IEKF) [
24] is another significant advancement in recent years. It is mainly used for filtering on Lie groups and uses an alternative formulation of the EKF, where the filter gain becomes invariant of the estimated state. As a result, the filter has a better convergence behavior and is more stable in cases of a large deviation between the estimate and the true state. An invariant UKF (IUKF) [
12] and invariant CKF (ICKF) [
13,
35] have been proposed as well. In addition to the Kalman filter, the unscented transform has been applied to the particle filter, which is referred to as the unscented particle filter (UPF) [
36]. There exists also a square-root variant, which is the square-root UPF (SRUPF) [
37].
3. Encapsulation of Manifolds Using the ⊞-Method
The ⊞-method is based on two observations: First, manifolds locally behave like a vector space. Second, many algorithms that may potentially be used on manifolds (examples see previous section) mainly manipulate the elements of the state space using addition and subtraction. This is exploited by encapsulating a manifold state space
using two operators
and
, where
n denotes the number of degrees of freedom in
. The operator ⊞ adds a small perturbation given in
to an element in
, which yields an element in
. The operator ⊟ calculates the difference between two elements in
, which yields an element in
. Thus we have
with
and
. A manifold space with both box operators is referred to as a ⊞-manifold. Further relevant properties, mathematical derivations, as well as the definitions of those operators for different manifold spaces can be found in [
7].
In order to extend an algorithm defined for vector spaces to work on ⊞-manifolds, one basically needs to replace
with
. However, many fusion algorithms rely on probability distributions in order to represent the uncertainty of the estimate and the sensor measurements. Most commonly, a normal distribution is used. Its definition can be extended to ⊞-manifolds using [
7]
with mean
and covariance
. Here,
is an ordinary multivariate normal distribution defined on vector spaces, while
is a normal distribution on
. When clear from the context, the subscript of
is omitted in the following.
An important implication of (3) is that the mean cannot be changed without updating the covariance as well [
7]. In particular, when adding a perturbation
d to
using
(e.g., in the correction step of a Kalman filter),
is still defined with respect to the old mean. This results in an inconsistency since
For derivation-based algorithms, like the EKF on ⊞-manifolds [
11], the problem can be solved by linearizing
using a first-order Taylor series expansion developed around
and transforming
accordingly. This gives us
with
. However, as discussed already, this approach is not desired in derivation-free algorithms.
Consequently, in the UKF on ⊞-manifolds [
7], an additional sigma point transformation is performed to retrieve the updated mean and covariance. In particular, instead of using the ⊞-operator to apply
d to
directly, sigma points with a corresponding deviation are generated, which are then used to compute the new mean and covariance. This results in
where
is given in
Table 1. Further details on this approach can be found in [
7] and are discussed in the context of the SRUKF in the following section.
Table 1.
Method for computing the mean
of a set of sigma points
, where
corresponds to the weight associated with the
i-th sigma point. (Algorithm adopted from [
7]).
Table 1.
Method for computing the mean
of a set of sigma points
, where
corresponds to the weight associated with the
i-th sigma point. (Algorithm adopted from [
7]).
|
---|
Input: |
|
Determine mean : |
|
6. Evaluation
We compare the proposed SRUKF on manifolds and SCKF on manifolds to the UKF on manifolds [
7] and the CKF on manifolds. For the latter, we modify the UKF on manifolds analogously to the changes discussed in
Section 5. All filters are implemented in C++ using the Eigen library (
https://eigen.tuxfamily.org, accessed on 26 August 2024). For the implementation of the SRUKF and the SCKF, there are a few points to consider: The QR decomposition in Eigen is based on Househoulder transformations. To gain a speed advantage, we implement the QR decomposition using the modified Gram-Schmidt algorithm [
39] (Sect. 5.2.8), which is further optimized for computing
R only, since we are not interested in
Q. Furthermore, Eigen’s matrix storage order should be taken into account to benefit from CPU caching. The Cholesky update or downdate is computed in-place. One could also convert constant covariance matrices (e.g., for sensor noise) to their square-root forms once in order to save time for the additional computations in each step, but this is not performed here for the commonality with the non-square-root filters.
In this section, we first introduce the example application as well as the corresponding dataset and used parameters. After that, we evaluate the performance of the filters in terms of state estimation accuracy and runtime.
6.1. Example Application: Inertial Odometry
We use relative localization (i.e., odometry) of an autonomous car as an example application for our evaluation. For this purpose, the vehicle [
40] is equipped with an inertial measurement unit (IMU), wheel odometers, and a sensor measuring the steering wheel angle. The application, all corresponding models, and the use of the UKF on manifolds to solve the estimation problem are described in detail in [
41]. The values to be estimated are the 3D position in
, the 3D orientation in
, the 3D velocity in
, as well as the 3D accelerometer and 3D gyroscope biases, each in
. Since
is a manifold, the joint state space is a manifold as well, and a corresponding filter needs to be used.
One challenge with this particular estimation task is that there is no external source for directly or indirectly correcting the position and the rotation around the global z-axis. This is no issue for the application itself since we are only interested in odometry, i.e., estimating the relative movement of the vehicle. But it results in a growing covariance matrix, which may result in instabilities of the filter. Moreover, the (SR)UKF and the (S)CKF may fail completely, since the generated sample points are not meaningful anymore for very large covariance values.
The solution proposed in [
41] is to estimate the uncertainty with respect to a reference state, which is moved forward in time. By that means, the covariance matrix remains within a reasonable range. The moving reference is implemented using two Kalman filters, which process the same measurements but use different references. After a defined period of time or driven distance, the uncertainty of one filter is transferred to the other filter, while the uncertainty of the first filter is set to zero. Again, full details and all derivations can be found in the original publication.
In the UKF and the CKF, the uncertainty transfer and the uncertainty reset are each implemented using a propagation of sample points followed by recovering the mean and covariance. To apply this concept to the SRUKF on manifolds, we employ the familiar modifications: The sigma points are generated using the Cholesky factor without the need for an additional Cholesky factorization, the mean is calculated using the
function (see
Table 1), and the updated Cholesky factor is retrieved using a QR decomposition followed by a Cholesky up- or downdate. This is, in essence, equivalent to the prediction step (see (32)–(36) in
Table 2) except for that the state transition function
f is replaced by the functions for the uncertainty transfer or the uncertainty reset defined in [
41]. Furthermore, no additional noise is introduced, i.e.,
is omitted. For the SCKF, the uncertainty transfer and the uncertainty reset are implemented in the same way as for the SRUKF, but with the changes discussed in
Section 5, i.e., we generate cubature points instead of sigma points, the scaling factor and the weights are adapted, and there is no need for a Cholesky up- or downdate to retrieve the updated Cholesky factor. Furthermore, the modified version of
is used.
6.2. Dataset and Parameters
To the best of our knowledge, there exists no public dataset that contains all desired measurements (IMU, speed, steering angle, and RTK reference system) for our application. For that reason, we use a self-recorded dataset, which consists of four complementary scenarios, which are listed in
Table 3. The first scenario takes place on a parking lot with partially harsh maneuvers, including sharp accelerating and decelerating as well as high turning speeds. In the second scenario, we are driving through a suburb of Bremen, Germany, with comparably low speeds. The third scenario is recorded in the inner city of Chemnitz, Germany, and has medium speeds. The fourth and longest scenario also takes place in Chemnitz, Germany, but the majority of the time, we are driving on an urban freeway with higher speeds.
The ground-truth position is given by RTK-corrected GNSS measurements provided by a ublox F9P receiver at 10 Hz. When the GNSS solution has a quality of “RTK fix” (i.e., integer solution), the position accuracy is within 0.05 m. All data points with a worse quality are excluded. For the datasets “Parking lot”, “City”, and “Urban freeway”, the vehicle was equipped with a second ublox F9P receiver operating in moving base mode, which provides a precise heading (and pitch) estimate with an accuracy of less than 1°. In the case of the “Suburb” dataset, a second receiver was not available, and the heading is estimated from the vehicle’s movement. The assumed accuracy is about 5°. The ground-truth trajectories are shown in
Figure 1.
All parameters used for the evaluation are listed in
Table 4. They are equal for both filters. If possible, the noise parameters for the sensors have been estimated from the data. Otherwise, the values have been set by experts and were tuned for the best performance of the filters.
6.3. Relative Trajectory Error
Since the state is estimated without absolute position corrections, the relative trajectory error is the most relevant accuracy measure. As proposed in [
42], we use segments of constant lengths (100 m, 200 m, 500 m, 1000 m, and 2000 m), align the first pose estimate of each segment with the corresponding ground-truth pose, and then compute the translation and rotation error for the pose at the end of the segment. The values are normalized with respect to the respective segment length, resulting in the translation error being in percent, while the rotation error is given in degrees per meter. For computing the errors and generating the plots, the script of [
43] is used.
The resulting box plots are shown in
Figure 2. The median of the translation error is between 7% and 1%, while the rotation error is between 0.04 °/m and 0.005 °/m. For all datasets, the rotation error decreases with the segment length. For the “Parking lot” and the “Urban freeway” scenario (see
Figure 2a,d), this also holds true for the translation error, while for “Suburb” and “City” (see
Figure 2b,c), it is rather constant. The smallest translation error can be observed for “Parking lot”, which can be explained by the short overall distance. The “Urban freeway” scenario, with its long distance and high speeds, has the highest translation error, particularly for short segment lengths. The “Suburb” dataset has the highest rotation error, which is caused by the fact that a different IMU is used here. Regarding the scope of this work, the most significant insight is that the SRUKF and the SCKF have exactly the same performance as the UKF and the CKF.
6.4. Absolute Trajectory Error
Due to the lack of absolute position corrections (see above), the absolute trajectory error is less relevant. It is nevertheless analyzed for completeness. A difficulty is that a small estimation error at the beginning (in particular in the orientation) can have a huge impact on the overall error, even though the remaining trajectory has been estimated with high accuracy. To mitigate this effect, we align the estimated trajectory with the ground-truth using an
transformation (see [
43] for further details). After that, the root-mean-square error (RMSE) of the position is computed over the whole trajectory.
The aligned trajectories are shown in
Figure 3 and
Figure 4. All estimated trajectories show a small drift compared to the ground-truth, which cannot be avoided without absolute position corrections. Most noticeable is a deviation at the beginning of the “City” scenario (top right in
Figure 3c and
Figure 4c). This is likely caused by the fact that the estimate of the IMU biases did not match the true values while they converged later. It is again evident that the performance of all filters is equivalent since the estimated trajectories of the UKF and the SRUKF, as well as the trajectories of the CKF and the SCKF, align perfectly with each other.
This is confirmed by the quantitative errors given in
Table 5. In case of “Parking lot”, the RMSE of all filters is exactly the same, except for the SCKF, where the RMSE is 1 mm smaller. For “Suburb” the RMSE differs between 3 mm and 7 mm. The biggest difference can be seen in the “City” scenario, where the RMSE of the cubature filters is almost 0.5 m larger than the RMSE of the unscented filters. However, as discussed above, all filters had difficulties estimating the IMU biases correctly at the beginning of that scenario and a minor orientation error has a large impact on the absolute positioning error. Finally, in the “Urban freeway” scenario, the RMSE of the UKF and the CKF are equal, and the RMSE of the SRUKF and the SCKF are equal as well. At the same time, the error of the square-root filters is 8 mm smaller than the error of the non-square-root variants. Note that the errors are calculated over several kilometers, i.e., the deviations between the filters are negligibly small.
6.5. Runtime
Finally, we evaluate the runtime of the algorithms on a desktop computer with an Intel® Core™ i7 13700K (16 cores, 5.40 GHz, Intel Corporation, Santa Clara, CA, USA) and 64 GB RAM. Note that the filters do not make use of parallelization and, thus, utilize only one core. The results are averaged over 10 runs.
The total duration for processing each dataset, as well as the percentage difference between the filters, are given in
Table 6. Related to the duration of the respective scenarios (see
Table 3), all filters are able to process the measurements in real time. The speed advantage of the SRUKF over the UKF is between 3% and 5%, while the speed advantage of the SCKF over the CKF is between 3% and 6%. The CKF is slightly faster than the UKF, with an advantage of up to 3%, while in the “City” scenario, it is 0.5% slower. In comparison to the SRUKF, the SCKF is between 1% and 2% faster. Consequently, the largest difference is between the UKF and the SCKF, where the latter has a speed advantage of 4% to 7%. Overall, this confirms the expectations: The square-root filters are faster than the non-square-root filters, while the cubature filters are, in general, faster than the unscented filters.
7. Conclusions
In this work, we modified the SRUKF and the SCKF for use on manifolds. More precisely, not only the state but also the measurements can be elements in almost arbitrary manifold spaces. This is, for example, particularly relevant for state estimation when an orientation is part of a state vector or a measured quantity, where the classical SRUKF and SCKF cannot be applied. We employ the ⊞-method for our approach, which offers a sound way to encapsulate manifold spaces. In contrast to other solutions, our SRUKF on manifolds and our SCKF on manifolds are both generic and mathematically coherent. They have the same theoretical complexity as the UKF on manifolds and the CKF on manifolds, respectively, but the practical implementation can be faster. In addition, as the classical SRUKF and SCKF, they have improved numerical properties compared to the UKF and the CKF. Furthermore, for parameter estimation, the algorithm can be modified for a lower computational complexity. The only disadvantage is that the implementation effort is a little bit greater.
We demonstrated the effectiveness of our approach using the example of relative localization (i.e., odometry) of an autonomous car, where the 3D orientation of the vehicle is part of the state vector, and thus, the state space is a manifold. For this purpose, we used four real-world datasets of different scenarios (parking lot, suburb, city, and urban freeway). It was shown that the SRUKF and the SCKF on manifolds have the same localization performance as the UKF and the CKF on manifolds in terms of relative translation and rotation error as well as the absolute positioning error. At the same time, our SRUKF and our SCKF have lower computational demands than their non-square-root counterparts.
One of our next steps is to compare the SRUKF and the SCKF to the UKF and the CKF for parameter estimation on manifolds. Furthermore, we plan to apply our SRUKF and our SCKF in different applications. One example is extended object tracking, where the state of a dynamic object (e.g., another traffic participant) is estimated. This state consists of a position, orientation, size, and velocity, and thus, it is an element of a manifold [
44]. Another possible application is maritime robotics, where we aim to use the proposed approach for localizing an unmanned surface vehicle. The state space is also a manifold here since the 3D orientation is part of the state. Furthermore, angular heading and pitch measurements are incorporated, so we have a manifold measurement space as well.