Using Inertial Sensors for Position and Orientation Estimation
Manon Kok, Jeroen D. Hol, Thomas B. Sch\"on

TL;DR
This paper reviews methods for estimating position and orientation using MEMS inertial sensors, highlighting algorithms like Kalman filters and smoothing techniques, with evaluations on experimental and simulated data.
Contribution
It provides a comprehensive overview of signal processing algorithms for inertial sensor-based estimation, emphasizing modeling choices and practical implementations.
Findings
Algorithms like extended Kalman filter and complementary filter effectively estimate position and orientation.
Signal processing techniques can mitigate drift in inertial sensor measurements.
Experimental and simulated data validate the effectiveness of discussed algorithms.
Abstract
In recent years, MEMS inertial sensors (3D accelerometers and 3D gyroscopes) have become widely available due to their small size and low cost. Inertial sensor measurements are obtained at high sampling rates and can be integrated to obtain position and orientation information. These estimates are accurate on a short time scale, but suffer from integration drift over longer time scales. To overcome this issue, inertial sensors are typically combined with additional sensors and models. In this tutorial we focus on the signal processing aspects of position and orientation estimation using inertial sensors. We discuss different modeling choices and a selected number of important algorithms. The algorithms include optimization-based smoothing and filtering as well as computationally cheaper extended Kalman filter and complementary filter implementations. The quality of their estimates is…
| RMSE | Roll [∘] | Pitch [∘] | Heading [∘] | |
| Smoothing optimization (Alg. 1) | 0.39 | 0.39 | 2.30 | |
| Filtering optimization (Alg. 2) | 0.45 | 0.45 | 3.54 | |
| EKF quaternions (Alg. 3) | 0.45 | 0.45 | 3.57 | |
| EKF orientation deviation (Alg. 4) | 0.45 | 0.45 | 3.55 | |
| Complementary filter (Alg. 5), | 1.44 | 1.43 | 4.39 | |
| Complementary filter (Alg. 5), | 0.47 | 0.47 | 12.98 | |
| RMSE | Roll [∘] | Pitch [∘] | Heading [∘] | |
| Smoothing optimization (Alg. 1) | 0.39 | 0.39 | 2.29 | |
| Filtering optimization (Alg. 2) | 1.06 | 0.95 | 3.55 | |
| EKF quaternions (Alg. 3) | 1.08 | 0.97 | 4.41 | |
| EKF orientation deviation (Alg. 4) | 1.08 | 0.96 | 3.57 | |
| Complementary filter (Alg. 5), | 3.02 | 2.77 | 4.48 | |
| Complementary filter (Alg. 5), | 1.13 | 1.01 | 12.99 | |
| RMSE | Roll [∘] | Pitch [∘] | Heading [∘] | Position [ c m ] | |
|---|---|---|---|---|---|
| Stationary | 0.41 | 0.41 | 11.84 | 0.97 | |
| Constant acceleration | 1.23 | 0.46 | 11.37 | 0.97 | |
| Acceleration | 0.41 | 0.41 | 2.68 | 0.97 | |
| Acceleration | 0.46 | 0.39 | 0.87 | 0.97 | |
| RMSE | Roll [∘] | Pitch [∘] | Heading [∘] | |
|---|---|---|---|---|
| Smoothing optimization | 0.39 | 0.39 | 2.29 | |
| EKF orientation deviation | 0.46 | 0.46 | 4.20 | |
| RMSE | \adl@mkpreamc\@addtopreamble \@arstrut\@preamble | \adl@mkpreamc\@addtopreamble \@arstrut\@preamble | ||||||
|---|---|---|---|---|---|---|---|---|
| ML | 5.0 | 1.0 | -4.0 | 5.1 | 5.3 | 6.4 | ||
| MAP | 5.0 | 1.0 | -4.0 | 5.1 | 5.3 | 6.4 | ||
| MAP | 3.9 | 0.8 | -2.8 | 4.1 | 4.0 | 4.7 | ||
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
**Using Inertial Sensors for Position and Orientation Estimation
**
Manon Kok⋆, Jeroen D. Hol† and Thomas B. Schön‡
⋆Delft Center for Systems and Control, Delft University of Technology, the Netherlands111At the moment of publication Manon Kok worked as a Research Associate at the University of Cambridge, UK. A major part of the work has been done while she was a PhD student at Linköping University, Sweden.
E-mail: [email protected]
†Xsens Technologies B.V., Enschede, the Netherlands
E-mail: [email protected]
‡Department of Information Technology, Uppsala University, Sweden
E-mail: [email protected]
Please cite this version:
Manon Kok, Jeroen D. Hol and Thomas B. Schön (2017), ”Using Inertial Sensors for Position and Orientation Estimation”, Foundations and Trends in Signal Processing: Vol. 11: No. 1-2, pp 1-153. http://dx.doi.org/10.1561/2000000094
In recent years, microelectromechanical system (MEMS) inertial sensors (3D accelerometers and 3D gyroscopes) have become widely available due to their small size and low cost. Inertial sensor measurements are obtained at high sampling rates and can be integrated to obtain position and orientation information. These estimates are accurate on a short time scale, but suffer from integration drift over longer time scales. To overcome this issue, inertial sensors are typically combined with additional sensors and models. In this tutorial we focus on the signal processing aspects of position and orientation estimation using inertial sensors. We discuss different modeling choices and a selected number of important algorithms. The algorithms include optimization-based smoothing and filtering as well as computationally cheaper extended Kalman filter and complementary filter implementations. The quality of their estimates is illustrated using both experimental and simulated data.
Contents
-
1.2 Using inertial sensors for position and orientation estimation
-
4.1.2 Smoothing estimates of the orientation using optimization
-
4.2.1 Filtering estimates of the orientation using optimization
-
4.3.2 Estimating orientation using orientation deviations as states
-
6.1 Non-Gaussian noise distributions: time of arrival measurements
-
6.2 Using more complex sensor information: inertial and vision
-
6.3 Including non-sensory information: inertial motion capture
-
B.4 Extended Kalman filter with orientation deviation states
-
C.4 Extended Kalman filter with orientation deviation states
Chapter 1 Introduction
In this tutorial, we discuss the topic of position and orientation estimation using inertial sensors. We consider two separate problem formulations. The first is estimation of orientation only, while the other is the combined estimation of both position and orientation. The latter is sometimes called pose estimation. We start by providing a brief background and motivation in §1.1 and explain what inertial sensors are and give a few concrete examples of relevant application areas of pose estimation using inertial sensors. In §1.2, we subsequently discuss how inertial sensors can be used to provide position and orientation information. Finally, in §1.3 we provide an overview of the contents of this tutorial as well as an outline of subsequent chapters.
1.1 Background and motivation
The term inertial sensor is used to denote the combination of a three-axis accelerometer and a three-axis gyroscope. Devices containing these sensors are commonly referred to as inertial measurement units (IMUs). Inertial sensors are nowadays also present in most modern smartphone, and in devices such as Wii controllers and virtual reality (VR) headsets, as shown in Figure LABEL:fig:intro-inertialSensors.
A gyroscope measures the sensor’s angular velocity, i.e. the rate of change of the sensor’s orientation. An accelerometer measures the external specific force acting on the sensor. The specific force consists of both the sensor’s acceleration and the earth’s gravity. Nowadays, many gyroscopes and accelerometers are based on microelectromechanical system (MEMS) technology. MEMS components are small, light, inexpensive, have low power consumption and short start-up times. Their accuracy has significantly increased over the years.
There is a large and ever-growing number of application areas for inertial sensors, see e.g. [7, 59, 109, 156]. Generally speaking, inertial sensors can be used to provide information about the pose of any object that they are rigidly attached to. It is also possible to combine multiple inertial sensors to obtain information about the pose of separate connected objects. Hence, inertial sensors can be used to track human motion as illustrated in Figure 1.2. This is often referred to as motion capture. The application areas are as diverse as robotics, biomechanical analysis and motion capture for the movie and gaming industries. In fact, the use of inertial sensors for pose estimation is now common practice in for instance robotics and human motion tracking, see e.g. [86, 54, 112]. A recent survey [1] shows that 28% of the contributions to the IEEE International Conference on Indoor Positioning and Indoor Navigation (IPIN) make use of inertial sensors. Inertial sensors are also frequently used for pose estimation of cars, boats, trains and aerial vehicles, see e.g. [139, 23]. Examples of this are shown in Figure 1.3.
There exists a large amount of literature on the use of inertial sensors for position and orientation estimation. The reason for this is not only the large number of application areas. Important reasons are also that the estimation problems are nonlinear and that different parametrizations of the orientation need to be considered [47, 77], each with its own specific properties. Interestingly, approximative and relatively simple position and orientation estimation algorithms work quite well in practice. However, careful modeling and a careful choice of algorithms do improve the accuracy of the estimates.
In this tutorial we focus on the signal processing aspects of position and orientation estimation using inertial sensors, discussing different modeling choices and a number of important algorithms. These algorithms will provide the reader with a starting point to implement their own position and orientation estimation algorithms.
1.2 Using inertial sensors for position and orientation estimation
As illustrated in §1.1, inertial sensors are frequently used for navigation purposes where the position and the orientation of a device are of interest. Integration of the gyroscope measurements provides information about the orientation of the sensor. After subtraction of the earth’s gravity, double integration of the accelerometer measurements provides information about the sensor’s position. To be able to subtract the earth’s gravity, the orientation of the sensor needs to be known. Hence, estimation of the sensor’s position and orientation are inherently linked when it comes to inertial sensors. The process of integrating the measurements from inertial sensors to obtain position and orientation information, often called dead-reckoning, is summarized in Figure 1.4.
If the initial pose would be known, and if perfect models for the inertial sensor measurements would exist, the process illustrated in Figure 1.4 would lead to perfect pose estimates. In practice, however, the inertial measurements are noisy and biased as will be discussed in more detail in §2.4. Because of this, the integration steps from angular velocity to rotation and from acceleration to position introduce integration drift. This is illustrated in Example 1.1.
Example 1.1** (Integration drift)**
Let us first focus on the general case of measuring a quantity that is constant and equal to zero. The integrated and double integrated signals are therefore also equal to zero. However, let us now assume that we measure this quantity using a non-perfect sensor. In case our measurements are corrupted by a constant bias, integration of these measurements will lead to a signal which grows linearly with time. Double integration leads to a signal that instead grows quadratically with time. If the sensor instead measures a zero-mean white noise signal, the expected value of the integrated measurements would be zero, but the variance would grow with time. This is illustrated in Figure 1.5 for the integration of a signal with . Hence, integration drift is both due to integration of a constant bias and due to integration of noise.
To illustrate integration drift using experimental data, a stationary data set is collected with a Sony Xperia Z5 Compact smartphone using the app described in [57]. The smartphone contains accelerometers and gyroscopes produced by Invensense [64]. We integrate the inertial measurements to obtain position and orientation estimates. Since the smartphone is kept stationary during the data collection, we expect the position and orientation to remain the same. However, the orientation estimates drift a few degrees over seconds as shown in Figure 1.6(a). Note that the integration drift is not the same for all axes. This is mainly due to a different sensor bias in the different axes. This will be studied further in Example 2.3, where the same data set is used to study the sensor characteristics. As shown in Figure 1.6(b), the position drifts several meters over . The reason for this is two-fold. First, the accelerometer measurements need to be integrated twice. Second, the orientation estimates need to be used to subtract the gravity and any errors in this will result in leakage of gravity into the other components.
**
From the example above, it can be concluded that errors in the measurements have a large impact on the quality of the estimated position and orientation using inertial sensors only. This is particularly the case for position, which relies both on double integration of the acceleration and on accurate orientation estimates to subtract the earth’s gravity. Because of this, inertial sensors need to be supplemented with other sensors and other models to obtain accurate position and orientation estimates.
Inertial sensors provide pose estimates at high sampling rates which are accurate on a short time scale but drift over longer time scales. They are therefore very suitable for being combined with sensors with a lower sampling rate but with information that does not drift over time. For pose estimation, inertial sensors are often combined with measurements from for instance a global navigation satellite system (GNSS) [71, 147, 59], an ultrawideband (UWB) system [74, 132, 110, 27, 30] or cameras [26, 61, 79, 94]. For orientation estimation, they are often used in combination with magnetometers, which measure the direction of the magnetic field [124, 120].
This tutorial aims at giving an introduction on how to use inertial sensors for position and orientation estimation, but also on how to combine them with additional information. These additional sensors are not the focus of this paper but simple models will be used for magnetometers and sensors providing position information to illustrate the combined use of these sensors.
1.3 Tutorial content and its outline
To obtain accurate position and orientation estimates using inertial sensors in combination with additional measurements and models, a number of important things need to be considered. First, the quantities measured by the inertial sensors need to be accurately described and the sources of error need to be characterized. This is the topic of Chapter 2. Note that throughout the tutorial, we will focus on MEMS inertial sensors and consider both data from standalone IMUs and from smartphones. This implies that we do not focus on for instance mechanical or optical gyroscopes and on mechanical or solid-state accelerometers [147]. These sensors may have characteristics that are quite different from the MEMS inertial sensors considered here.
Based on the analysis of the sensors in Chapter 2 and on additional analysis of the application at hand, models can be constructed. This is the topic of Chapter 3, where we will also discuss different parametrizations of orientation. This will highlight the challenges in parametrizing and estimating orientations and show that the orientation estimation problem is inherently nonlinear. Furthermore, we will present two models that can be used for position and orientation estimation. The first is a model for pose estimation using inertial measurements in combination with position measurements. The second is a model for orientation estimation, using inertial and magnetometer measurements.
In Chapter 4, different algorithms for position and orientation estimation will be introduced. The general structure of the algorithms will be discussed, after which explicit algorithms for orientation estimation using inertial and magnetometer measurements are given. We will also discuss how the algorithms can be extended to pose estimation when position measurements are available. Some general characteristics of the two estimation problems will be given and the quality of the estimates from the different algorithms will be analyzed. Which algorithm is most suitable for which application depends strongly on the computational power that is available, the accuracy that is required and the characteristics of the problem at hand.
In Chapter 4, we assume that the sensors are properly calibrated. However, calibration of the sensors is important to for instance estimate the inertial sensor biases. Furthermore, calibration is specifically of concern when combining inertial data with other sensors. In these cases, it is important that the inertial sensor axes and the axes of the additional sensors are aligned. Sensor calibration is the topic of Chapter 5. As an illustrative example, we will consider the estimation of an unknown gyroscope bias.
Our focus in this tutorial is to present models and algorithms that can be used for position and orientation estimation using inertial measurements. Because of this, we assume fairly simple models for the additional information — the magnetometer and position measurements. In Chapter 6, we will discuss how the algorithms from Chapter 4 can be used in more complex settings. For example, we will consider the cases of more complex position information in the form of images from a camera, the presence of non-Gaussian measurement noise and the availability of additional information that can be exploited. The information provided by the inertial sensors remains one of the main building blocks of algorithms that can be used for these cases. Adaptations of the algorithms presented in Chapter 4 can therefore be used to also solve these more complex scenarios. We will end this tutorial with some concluding remarks in Chapter 7.
Chapter 2 Inertial Sensors
To combine inertial measurements with additional sensors and models for position and orientation estimation, it is important to accurately describe the quantities measured by the inertial sensors as well as to characterize the typical sensor errors. This will be the topic of this chapter. It will serve as a basis for the probabilistic models discussed in Chapter 3.
As discussed in Chapter 1, accelerometers and gyroscopes measure the specific force and the angular velocity, respectively. In §2.2 and §2.3, we will discuss these quantities in more detail. To enable a discussion about this, in §2.1 a number of coordinate frames and the transformations between them will be discussed. We assume that we have 3D accelerometers and 3D gyroscopes, i.e. that the sensors have three sensitive axes along which these physical quantities are measured. They are measured in terms of an output voltage which is converted to a physical measurement based on calibration values obtained in the factory. Even though the sensors are typically calibrated in the factory, (possibly time-varying) errors can still remain. In §2.4, the most commonly occurring sensor errors are discussed.
2.1 Coordinate frames
In order to discuss the quantities measured by the accelerometer and gyroscope in more detail, a number of coordinate frames need to be introduced:
The body frame
is the coordinate frame of the moving IMU. Its origin is located in the center of the accelerometer triad and it is aligned to the casing. All the inertial measurements are resolved in this frame.
The navigation frame
is a local geographic frame in which we want to navigate. In other words, we are interested in the position and orientation of the -frame with respect to this frame. For most applications it is defined stationary with respect to the earth. However, in cases when the sensor is expected to move over large distances, it is customary to move and rotate the -frame along the surface of the earth. The first definition is used throughout this tutorial, unless mentioned explicitly.
The inertial frame
is a stationary frame. The IMU measures linear acceleration and angular velocity with respect to this frame. Its origin is located at the center of the earth and its axes are aligned with respect to the stars.
The earth frame
coincides with the -frame, but rotates with the earth. That is, it has its origin at the center of the earth and axes which are fixed with respect to the earth.
The , and coordinate frames are illustrated in Figure 2.1. We use a superscript to indicate in which coordinate frame a vector is expressed. Vectors can be rotated from one coordinate frame to another using a rotation matrix. We use a double superscript to indicate from which coordinate frame to which coordinate frame the rotation is defined. An illustration is given in Example 2.1.
Example 2.1** (Rotation of vectors to different coordinate frames)**
Consider a vector expressed in the body frame . We denote this vector by . The rotation matrix rotates a vector from the body frame to the navigation frame . Conversely, the rotation from navigation frame to body frame is denoted . Hence, the vector expressed in the body frame () and expressed in the navigation frame () are related according to
[TABLE]
**
2.2 Angular velocity
The gyroscope measures the angular velocity of the body frame with respect to the inertial frame, expressed in the body frame [147], denoted by . This angular velocity can be expressed as
[TABLE]
where is the rotation matrix from the navigation frame to the body frame. The earth rate, i.e. the angular velocity of the earth frame with respect to the inertial frame is denoted by . The earth rotates around its own -axis in hours with respect to the stars [101]. Hence, the earth rate is approximately .
In case the navigation frame is not defined stationary with respect to the earth, the angular velocity , i.e. the transport rate is non-zero. The angular velocity required for navigation purposes — in which we are interested when determining the orientation of the body frame with respect to the navigation frame — is denoted by .
2.3 Specific force
The accelerometer measures the specific force in the body frame [147]. This can be expressed as
[TABLE]
where denotes the gravity vector and denotes the linear acceleration of the sensor expressed in the navigation frame, which is
[TABLE]
The subscripts on the linear acceleration are used to indicate in which frame the differentiation is performed. For navigation purposes, we are interested in the position of the sensor in the navigation frame and its derivatives as performed in the navigation frame
[TABLE]
A relation between and can be derived by using the relation between two rotating coordinate frames. Given a vector in a coordinate frame ,
[TABLE]
where is the angular velocity of the -frame with respect to the -frame, expressed in the -frame. For a derivation of this relation in the context of inertial navigation, see [59, 147]. For a general introduction, see any textbook on dynamics, e.g. [92, 96].
Using the fact that
[TABLE]
the velocity and acceleration can be expressed as
[TABLE]
where we have made use of (2.5), (2.6), and the fact that the angular velocity of the earth is constant, i.e. . Using the relation between the earth frame and the navigation frame
[TABLE]
where is the distance from the origin of the earth coordinate frame to the origin of the navigation coordinate frame, expressions similar to (2.8) can be derived. Note that in general it can not be assumed that . Inserting the obtained expressions into (2.8), it is possible to derive the relation between and . Instead of deriving these relations, we will assume that the navigation frame is fixed to the earth frame, and hence and are constant and
[TABLE]
This is a reasonable assumption as long as the sensor does not travel over significant distances as compared to the size of the earth and it will be one of the model assumptions that we will use in this tutorial. More on the modeling choices will be discussed in Chapter 3.
Inserting (2.10) into (2.8) and rotating the result, it is possible to express in terms of as
[TABLE]
where is the acceleration required for navigation purposes. The term is known as the centrifugal acceleration and is known as the Coriolis acceleration. The centrifugal acceleration is typically absorbed in the (local) gravity vector. In Example 2.2, we illustrate the magnitude of both the centrifugal and the Coriolis acceleration.
Example 2.2** (Magnitude of centrifugal and Coriolis acceleration)**
The centrifugal acceleration depends on the location on the earth. It is possible to get a feeling for its magnitude by considering the property of the cross product stating that
[TABLE]
Since the magnitude of is approximately and the average radius of the earth is [101], the magnitude of the centrifugal acceleration is less than or equal to .
The Coriolis acceleration depends on the speed of the sensor. Let us consider a person walking at a speed of . In that case the magnitude of the Coriolis acceleration is approximately . For a car traveling at , the magnitude of the Coriolis acceleration is instead .
**
2.4 Sensor errors
As discussed in §2.2 and §2.3, the gyroscope measures the angular velocity and the accelerometer measures the specific force . However, as already briefly mentioned in §1.2, there are several reasons for why this is not exactly the case. Two of these reasons are a slowly time-varying sensor bias and the presence of measurement noise. The sensor errors in the inertial measurements are illustrated in Example 2.3 using experimental data.
Example 2.3** (Inertial sensor measurements and their errors)**
In Figures 2.2–2.4, gyroscope and accelerometer measurements are displayed for around seconds of stationary data collected with a Sony Xperia Z5 Compact smartphone. Since the smartphone is stationary, the gyroscope is expected to only measure the earth’s angular velocity. However, as can be seen in Figure 2.2(a), the gyroscope measurements are corrupted by noise. As shown in Figure 2.3, this noise can be seen to be quite Gaussian. Furthermore, the measurements can be seen to be biased.
During the stationary period, we would expect the accelerometer to measure the gravity, the centrifugal acceleration and the Coriolis acceleration. Note that again the measurements are corrupted by noise, which can be seen to be quite Gaussian in Figure 2.4. The - and -components of the accelerometer measurements are not zero-mean. This can be due to the fact that the table on which the smartphone lies is not completely flat, implying that part of the gravity vector is measured in these components. It can also reflect a sensor bias. The -component is actually larger than expected which indicates the presence of an accelerometer bias at least in this axis.
Note that from the above discussion it can be concluded that it is more straightforward to determine the gyroscope bias than it is to determine the accelerometer bias. To be able to estimate the gyroscope bias, it is sufficient to leave the sensor stationary. For the accelerometer, however, it is in that case difficult to distinguish between a bias and a table that is not completely flat. For more information about accelerometer or general inertial sensor calibration, see [145, 106, 108].
The gyroscope in the smartphone is automatically recalibrated during stationary time periods. The measurements shown in Figure 2.2(a) have not been corrected for this (so-called uncalibrated or raw data). The reason why the gyroscope is calibrated during stationary periods, is because its bias is slowly time-varying. As an example, let us consider a data set of minutes. The gyroscope bias during the first minute of the data set was , while the gyroscope bias during the last minute of the data set was .
**
The performance of IMUs is often specified in terms of their Allan variance [63, 33, 2]. The Allan variance gives information about the sensor errors for stationary conditions, i.e. in a stable climate without exciting the system. It studies the effect of averaging measurements for different cluster times . Typically, the Allan standard deviation is plotted against the cluster time as illustrated in Figure 2.5. This figure shows the characteristic behavior of the Allan variance for inertial sensors. To study it more in detail, we will discuss two components of the Allan variance that are typically of concern for inertial sensors: the white noise and the bias instability.
Assume, as in Example 1.1, that we have a white noise signal with standard deviation . A longer averaging time would for this signal lead to values closer to zero. The contribution to the Allan standard deviation from the white noise component is given by where is the number of samples averaged over. This corresponds to a line with slope in a – plot. For instance in the Allan deviation for the gyroscope in Figure 2.5, the lines can be seen to have a slope of until around , which indicates that the white noise is the dominating source of error for these short integration times.
A constant bias does not have any effect on the Allan variance diagram. However, in case the bias changes, longer averaging times will no longer be beneficial. Hence, the Allan variance diagrams in Figure 2.5 show a deviation from the slope for longer averaging times.
The Allan variance is a useful tool to study and compare the noise characteristics of inertial sensors. However, it only considers stationary conditions. In dynamic conditions, a large number of other error sources potentially come into play, see e.g. [147, 154]. These are for instance related to the fact that the sensors sample at discrete times. Hence, to capture high-frequency signals, high sampling frequencies are desired [128, 129]. Furthermore, large dynamics can lead to erroneous or saturated measurements. Other errors that are not included are for instance changes in the sensitivity of the axes due to changes in temperature. We should therefore never just rely on the Allan variance when deciding which sensor to use in a particular application.
Chapter 3 Probabilistic Models
Pose estimation is about estimating the position and orientation of the body frame in the navigation frame . This problem is illustrated in Figure 3.1, where the position and orientation of the body changes from time to time . In this chapter, we will introduce the concept of probabilistic models and discuss different modeling choices when using inertial sensors for pose estimation.
The subject of probabilistic modeling is introduced in §3.1. Most complexity in pose estimation lies in the nonlinear nature of the orientation and the fact that orientation can be parametrized in different ways. How to parametrize the orientation is therefore a crucial modeling choice in any pose estimation algorithm. Because of this, we will discuss different parametrizations for the orientation in §3.2 and in §3.3 we will discuss how these different parametrizations can be used in probabilistic modeling.
Our probabilistic models consist of three main components. First, in §3.4, we introduce models describing the knowledge about the pose that can be inferred from the measurements. Second, in §3.5, we model how the sensor pose changes over time. Finally, in §3.6, models of the initial pose are introduced.
The chapter will conclude with a discussion on the resulting probabilistic models in §3.7. The models that will be used in the position and orientation estimation algorithms in Chapter 4 will be introduced in this section.
3.1 Introduction
Probabilistic models constitute the foundation of the estimation algorithms in Chapter 4. In this section we will introduce the concept of probabilistic modeling and the notation that is used in building our models. Models are used to describe the information about the dynamics and the available measurements. These models are subsequently used in combination with the measurements to infer some knowledge. The knowledge that we are interested in is the pose of the sensor and we use information about the sensor dynamics and the available measurements (amongst others, inertial measurements). A simplified case where probabilistic modeling is used to estimate the position of a sensor is given in Example 3.1.
Example 3.1** (Probabilistic modeling)**
Let us estimate the 2D position of a sensor at time from two position measurements
[TABLE]
A straightforward suggestion for an estimate of the position would be . Let us now assume that we know the accuracy of the sensors and represent this in terms of the following probabilistic models
[TABLE]
where denotes a identity matrix. A reasonable position estimate would instead be
[TABLE]
We will not go into details about how this estimate is derived. Instead, we would like to point out two differences between this position estimate and our initial suggestion . First, based on the knowledge of the accuracy of the sensors, it is sensible to trust the measurement from the first sensor more than the measurement from the second sensor. Our improved position estimate is therefore closer to the measurement of the first sensor than our initial suggestion . Furthermore, based on the accuracy of the sensors, it is possible to derive the accuracy of our estimate.
Now consider the case where we are also interested in estimating the position . Knowledge that the sensor is worn by a human or placed in a car, would give us information about how far the sensor can travel from time to time . If the sensor would be placed in for instance a train, the motion would even be constrained to be along the tracks. Incorporating this information about the dynamics of the sensor will improve the estimate of .
**
We split the knowledge that we want to infer into the unknown time-varying states for , or equivalently , and the unknown constant parameters . We denote the measurements by for . The times at which these measurements are obtained do not necessarily correspond with the times at which the states are defined. It is also not necessary for all sensors to sample at the same frequency. As discussed in §2.4, the inertial sensors are typically sampled at fairly high rates to capture high-frequency dynamics. In stand-alone, wired IMUs, all sensors typically have the same, constant sampling frequency. Specifically in the case of wireless sensors and smartphones, however, the sampling frequencies can vary both over sensors and over time. In the remainder, we assume that the times at which the states are defined coincide with the times at which the gyroscopes sample. Hence, we denote the gyroscope measurements with . For notational convenience, we will also use the subscript for the measurements from other sensors. Note that these are not required to actually sample at each time for . For instance, magnetometers in smartphones often sample either at equal or at half the sampling frequencies of the inertial sensors, while position aiding sensors like for instance GNSS or UWB typically sample at much lower sampling frequencies.
Our aim is now to infer information about the states and the parameters using the measurements and the probabilistic models. This can be expressed in terms of a conditional probability distribution
[TABLE]
where denotes the conditional probability of given . In the pose estimation problem, we are interested in obtaining point estimates which we denote and . It is typically also highly relevant to know how certain we are about these estimates. This is often expressed in terms of a covariance. When the distribution (3.1) is Gaussian, the distribution is completely described in terms of its mean and covariance.
In (3.1) we assume that all measurements are used to obtain the posterior distribution of and . This is referred to as smoothing. Although it makes sense to use all available information to obtain the best estimates, a downside of smoothing is that we need to wait until all measurements are collected before the pose can be computed. Because of this, in many applications, we are also interested in filtering. In filtering we estimate using all measurements up to and including time . One way of dealing with constant parameters in filtering is to treat them as slowly time-varying. In this case, they can be considered to be included in the time-varying states . The filtering problem can be expressed in terms of the conditional probability distribution
[TABLE]
We have now introduced smoothing, where the states are estimated simultaneously, and filtering, where at each time instance the state is estimated. There is a large range of intermediate methods, where a batch of states , with and being positive integers, is estimated using the measurements . This is related to fixed-lag smoothing and moving horizon estimation [66, 113].
The topic of how to estimate the conditional probability distributions for position and orientation estimation will be introduced in Chapter 4. We will now instead take a closer look at these distributions and their different components. A fundamental assumption here is that we assume that our models possess the Markov property, implying that all information up to the current time is contained in the state . This is illustrated in Figure 3.2 in terms of a probabilistic graphical model [12]. The state can be seen to depend on and to result in the measurements . It is conditionally independent of given the state . Using Bayes’ rule and the Markov property, the conditional distributions (3.1) and (3.2) can be decomposed as
[TABLE]
The predictive distribution can be computed by marginalizing out the previous state as
[TABLE]
In (3.3), and encode our prior information of and the knowledge of the state given , respectively. The dynamics are modeled in terms of and . The distributions and model the information given by the measurements about the state and the parameters.
The dynamics of the state can be modeled in terms of a nonlinear function as
[TABLE]
The uncertainty of the dynamic model is modeled in terms of , which is often referred to as the process noise. The model (3.5) provides information about the distribution . More explicitly, if is Gaussian additive noise with , then
[TABLE]
where we use the notation to explain that the random variable is normal distributed with mean and covariance .
The information given by the measurements about the state can be modeled as
[TABLE]
where is a possibly nonlinear function and is the measurement noise. The measurement model (3.7) provides information about the distribution . The combination of (3.5), (3.7) and a model of the prior is referred to as a state space model [69] which is widely used in a large number of fields.
3.2 Parametrizing orientation
Rotating a vector in changes the direction of the vector while retaining its length. The group of rotations in is the special orthogonal group . In this section we introduce four different ways of parametrizing orientations. Note that these describe the same quantity and can hence be used interchangeably. The different parametrizations can be converted to one another, see also Appendix A. There are differences in for instance the number of parameters used in the representation, the singularities and the uniqueness.
3.2.1 Rotation matrices
We encountered rotation matrices already in Chapter 2. Rotation matrices have the following properties
[TABLE]
The properties (3.8) provide an interpretation of the name special orthogonal group . All orthogonal matrices of dimension have the property and are part of the orthogonal group . The notion special in specifies that only matrices with are considered rotations.
Consider two coordinate frames denoted and . As was illustrated in Example 2.1, a vector expressed in the -frame can be rotated to the -frame as
[TABLE]
A rotation matrix is a unique description of the orientation. It has components which depend on each other as defined in (3.8).
3.2.2 Rotation vector
As described by Leonhard Euler in [34], a rotation around a point is always equivalent to a single rotation around some axis through this point, see [107] for a number of proofs. This is generally referred to as Euler’s rotation theorem. Hence, it is possible to express the rotation between two coordinate frames in terms of an angle and a unit vector around which the rotation takes place. In this section, we will derive a relation between the representation and the rotation matrix parametrization from the previous section. Instead of directly considering the rotation of a coordinate frame, we start by considering the rotation of a vector. Note that a counterclockwise rotation of the coordinate frame is equivalent to a clockwise rotation of a vector, see Example 3.2.
Example 3.2** (Rotation of a coordinate frame and rotation of a vector)**
Consider the 2D example in Figure 3.3, where on the left, a vector is rotated clockwise by an angle to . This is equivalent to (on the right) rotating the coordinate frame counterclockwise by an angle . Note that .
**
In Figure 3.4, a vector is rotated an angle around the unit vector . We denote the rotated vector by . Suppose that as expressed in the coordinate frame is known (and denoted ) and that we want to express in terms of , and . It can first be recognized that the vector can be decomposed into a component parallel to the axis , denoted , and a component orthogonal to it, denoted , as
[TABLE]
where denotes the inner product. Similarly, can be decomposed as
[TABLE]
Hence, can be expressed in terms of as
[TABLE]
Denoting the rotated coordinate frame the -frame and using the equivalence between and as shown in Example 3.2, this implies that
[TABLE]
This equation is commonly referred to as the rotation formula or Euler’s formula [135]. Note that the combination of and , or , is denoted as the rotation vector or the axis-angle parameterization.
To show the equivalence between (3.13) and the rotation matrix parametrization, we will rewrite (3.13). Here, we make use of the fact that a cross product can be written as a matrix vector product. Given vectors and we have,
[TABLE]
where denote the three components of the vector . Furthermore, given vectors , and , multiple cross products can be expanded in terms of the inner product as
[TABLE]
Using these relations, (3.13) can be rewritten as
[TABLE]
Comparing (3.16) and (3.9a), it can be seen that a rotation matrix can be parametrized in terms of as
[TABLE]
Note that equivalently, can also be written as
[TABLE]
since
[TABLE]
The rotation vector introduced in this section parametrizes the orientation in only three parameters. It is, however, not a unique parametrization since adding to any angle results in the same orientation. This is called wrapping. As shown in (3.17) and (3.18), the rotation matrix can straightforwardly be expressed in terms of the axis-angle representation.
3.2.3 Euler angles
Rotation can also be defined as a consecutive rotation around three axes in terms of so-called Euler angles. We use the convention which first rotates an angle around the -axis, subsequently an angle around the -axis and finally an angle around the -axis. These angles are illustrated in Figure 3.5. Assuming that the -frame is rotated by with respect to the -frame as illustrated in this figure, the rotation matrix is given by
[TABLE]
where we make use of the notation introduced in (3.17) and the following definition of the unit vectors
[TABLE]
The angles are also often referred to as yaw (or heading), pitch and roll, respectively. Furthermore, roll and pitch together are often referred to as inclination.
Similar to the rotation vector, Euler angles parametrize orientation as a three-dimensional vector. Euler angle representations are not unique descriptions of a rotation for two reasons. First, due to wrapping of the Euler angles, the rotation is for instance equal to for any integer . Furthermore, setting in (3.20), leads to
[TABLE]
Hence, only the rotation can be observed. Because of this, for example the rotations , , are all three equivalent. This is called gimbal lock [31].
3.2.4 Unit quaternions
A commonly used parametrization of orientation is that of unit quaternions. Quaternions were first introduced by [52] and are widely used in orientation estimation algorithms, see e.g. [76, 59]. A unit quaternion use a -dimensional representation of the orientation according to
[TABLE]
A unit quaternion is not a unique description of an orientation. The reason for this is that if represents a certain orientation, then describes the same orientation.
A rotation can be defined using unit quaternions as
[TABLE]
where denotes the quaternion conjugate, defined as
[TABLE]
and denotes the quaternion representation of as
[TABLE]
Note that (3.26) is typically not a unit quaternion. The notation denotes the quaternion multiplication given by
[TABLE]
where
[TABLE]
Using (3.25)–(3.28), (3.24) can be written as
[TABLE]
Comparing (3.2.4) to (3.17), it can be recognized that if we choose
[TABLE]
the two rotation formulations are equivalent since
[TABLE]
Here, we made use of standard trigonometric relations and the fact that since , . Hence, it can be concluded that can be expressed in terms of and as in (3.30).
Equivalently, can also be written as
[TABLE]
where
[TABLE]
This leads to
[TABLE]
Note the similarity to (3.18) and (3.2.2). The reason why both rotation matrices and unit quaternions can be described in terms of an exponential of a rotation vector will be discussed in §3.3.1.
3.3 Probabilistic orientation modeling
The four parametrizations of orientation discussed in §3.2 can be used interchangeably. However, the choice of which parametrization to use as states in the filtering and smoothing problems introduced in §3.1 has significant impact on the workings of the algorithm. An important reason for this is that estimation algorithms typically assume that the unknown states and parameters are represented in Euclidean space. For instance, they assume that the subtraction of two orientations gives information about the difference in orientation and that the addition of two orientations is again a valid orientation. For the four parametrizations discussed in §3.2, this is generally not true. For instance, due to wrapping and gimbal lock, subtraction of Euler angles and rotation vectors can result in large numbers even in cases when the rotations are similar. Also, addition and subtraction of unit quaternions and rotation matrices do not in general result in a valid rotation. The equality constraints on the norm of unit quaternions and on the determinant and the orthogonality of rotation matrices are typically hard to include in the estimation algorithms. In §3.3.1, we will discuss a method to represent orientation in estimation algorithms that deals with the issues described above. It is frequently used in the algorithms that will be described in Chapter 4. In §3.3.2, we will also discuss some alternative methods to parametrize orientation for estimation purposes.
3.3.1 Linearization
As mentioned in §3.2, the group of rotations in three dimensions is the special orthogonal group . More specifically, is a so-called matrix Lie group. For a discussion on the properties of matrix Lie groups and on the reasons why is indeed such a group we refer the reader to e.g. [8]. Since rotations are a matrix Lie group, there exists an exponential map from a corresponding Lie algebra. Using this property, it is possible to represent orientations on using unit quaternions or rotation matrices, while orientation deviations are represented using rotation vectors on , see e.g. [14]. Hence, we encode an orientation in terms of a linearization point parametrized either as a unit quaternion or as a rotation matrix and an orientation deviation using a rotation vector . Assuming that the orientation deviation is expressed in the body frame ,111A similar derivation can be done by assuming an orientation deviation in the navigation frame .
[TABLE]
where analogously to (3.2.4) and (3.2.2),
[TABLE]
For notational convenience, in the remainder we will use the mappings
[TABLE]
which allow us to rewrite (3.35) as
[TABLE]
The reverse mappings are defined as
[TABLE]
where is the standard matrix logarithm. Since we typically assume that is small, we will frequently make use of the following approximations
[TABLE]
The idea briefly outlined in this section is closely related to approaches used to estimate orientation in robotics, see e.g. [47, 48, 14, 8, 38]. It is also related to the so-called multiplicative extended Kalman filter (MEKF) frequently used in aeronautics, see e.g. [93, 28].
3.3.2 Alternative methods
An alternative method to estimate orientation assumes that the states representing the orientation lie on a manifold. This can be done by modeling the orientation and its uncertainty using a spherical distribution which naturally restricts the orientation estimates and their uncertainties to be in . In recent years, a number of approaches have been proposed to estimate the orientation using these kinds of distributions. For instance, in [77, 44, 45] algorithms are presented to estimate orientation by modeling it using a Bingham distribution.
The difficulties caused by directly using one of the four orientation parametrizations introduced in §3.2 in orientation estimation algorithms is widely recognized. Nevertheless, a large number of approaches directly uses these parametrizations in estimation algorithms. For instance, it is common practice to use unit quaternions in estimation algorithms and to normalize the resulting quaternions each time they loose their normalization, see e.g. [124, 91, 89]. Different approaches to handle the normalization of the quaternions in these algorithms are discussed in [67].
3.4 Measurement models
In the past two sections, we have focused on how orientations can be parametrized. In this section, we will go back to the probabilistic models for the position and orientation estimation problems introduced in §3.1 and provide different measurement models .
3.4.1 Gyroscope measurement models
As discussed in §2.2, the gyroscope measures the angular velocity at each time instance . However, as shown in §2.4, its measurements are corrupted by a slowly time-varying bias and noise . Hence, the gyroscope measurement model is given by
[TABLE]
As was shown in Figure 2.3, the gyroscope measurement noise is quite Gaussian. Because of this, it is typically assumed that . If the sensor is properly calibrated, the measurements in the three gyroscope axes are independent. In that case, it can be assumed that
[TABLE]
The gyroscope bias is slowly time-varying, as discussed in §2.4. There are two conceptually different ways to treat this slowly time-varying bias. One is to treat the bias as a constant parameter, assuming that it typically changes over a longer time period than the time of the experiment. The bias can then either be pre-calibrated in a separate experiment, or it can be considered to be part of the unknown parameters as introduced in §3.1. Alternatively, it can be assumed to be slowly time-varying. This can be justified either by longer experiment times or by shorter bias stability. In the latter case, can instead be considered as part of the state vector and can for instance be modeled as a random walk
[TABLE]
where represents how constant the gyroscope bias actually is.
Modeling the sensor noise and bias is related to the sensor properties. However, there are also modeling choices related to the experiments that can be made. As described in §2.2, the angular velocity can be expressed as
[TABLE]
If the sensor does not travel over significant distances as compared to the size of the earth — which is often the case for the applications discussed in Chapter 1 — the navigation frame can safely be assumed to be stationary. In that case, the transport rate is zero. Although the earth rotation as expressed in the body frame is not constant, its magnitude as compared to the magnitude of the actual measurements is fairly small (see §2.2 and the experimental data presented in Example 2.3). Assuming that the earth rotation is negligible and the navigation frame is stationary leads to the following simplified measurement model
[TABLE]
3.4.2 Accelerometer measurement models
The accelerometer measures the specific force at each time instance , see also §2.3. As shown in §2.4, the accelerometer measurements are typically assumed to be corrupted by a bias and noise as
[TABLE]
The accelerometer noise is typically quite Gaussian as was illustrated in Figure 2.4 and can hence be modeled as . For a properly calibrated sensor, the covariance matrix can often be assumed to be diagonal.
The accelerometer bias is slowly time-varying. Similar to the gyroscope bias, the accelerometer bias can either be modeled as a constant parameter, or as part of the time-varying state, for instance using a random walk model as in (3.43).
As introduced in §2.3, the specific force measured by the accelerometer is given by
[TABLE]
Assuming that the navigation frame is fixed to the earth frame, we derived a relation for as
[TABLE]
The centrifugal acceleration is typically absorbed in the local gravity vector. The magnitude of the Coriolis acceleration is small compared to the magnitude of the accelerometer measurements (see Example 2.2 and the experimental data presented in Example 2.3). Neglecting this term leads to the following simplified measurement model
[TABLE]
Since the accelerometer measures both the local gravity vector and the linear acceleration of the sensor, it provides information both about the change in position and about the inclination of the sensor. For orientation estimation, only the information about the inclination is of concern. Hence, a model for the linear acceleration needs to be made to express the relation between the inclination and the measurements. To model this, it can be recognized that in practice, most accelerometer measurements are dominated by the gravity vector, as illustrated in Example 3.3.
Example 3.3** (Magnitude of a sensor’s linear acceleration)**
Let us consider a 1D example where a sensor has an initial velocity and accelerates with . After seconds, the sensor will have traveled meters. This is about twice as fast as the world record currently held by Usain Bolt. In fact, humans can reach fairly high accelerations but can only accelerate for a short time. Naturally, cars can accelerate to higher velocities than humans. The sensor in this example has reached a final velocity of . Even in the case of a car it is therefore unlikely that it can have an acceleration this high for a long period of time.
**
Since the accelerometer measurements are typically dominated by the gravity vector, a commonly used model assumes the linear acceleration to be approximately zero
[TABLE]
Naturally, the model (3.50) is almost never completely true. However, it can often be used as a sufficiently good approximation of reality. Note that the noise term in this case does not only represent the measurement noise, but also the model uncertainty. The model (3.50) can for instance be used in combination with outlier rejection where measurements that clearly violate the assumption that the linear acceleration is zero are disregarded. It is also possible to adapt the noise covariance matrix , depending on the sensor’s acceleration [39, 115]. Furthermore, it is possible to instead model the acceleration based on physical reasoning [85].
3.4.3 Modeling additional information
In this section we will discuss models for the measurements we use to complement the inertial sensor measurements. For orientation estimation we use magnetometers, while for pose estimation we use position measurements.
Magnetometer models
Magnetometers measure the local magnetic field, consisting of both the earth magnetic field and the magnetic field due to the presence of magnetic material. The (local) earth magnetic field is denoted and it is illustrated in Figure LABEL:fig:models-magneticField. Its horizontal component points towards the earth’s magnetic north pole. The ratio between the horizontal and vertical component depends on the location on the earth and can be expressed in terms of the so-called dip angle . The dip angle and the magnitude of the earth magnetic field are accurately known from geophysical studies, see e.g. [102].
Assuming that the sensor does not travel over significant distances as compared to the size of the earth, the local earth magnetic field can be modeled as being constant. In case no magnetic material is present in the vicinity of the sensor, orientation information can be deduced from the magnetometer. More specifically, magnetometers are typically used to complement accelerometers to provide information about the sensor heading, i.e. about the orientation around the gravity vector which can not be determined from the accelerometer measurements. Magnetometers provide information about the heading in all locations on the earth except on the magnetic poles, where the local magnetic field is vertical. Orientation can be estimated based on the direction of the magnetic field. The magnitude of the field is irrelevant. Because of this, without loss of generality we model the earth magnetic field as
[TABLE]
i.e. we assume that . Assuming that the magnetometer only measures the local magnetic field, its measurements can be modeled as
[TABLE]
where . The noise represents the magnetometer measurement noise as well as the model uncertainty. Note that using the models (3.51) and (3.52), we define the heading with respect to the magnetic north, which is sufficient for most applications. In case we would be interested in navigation with respect to the true north instead, the magnetic declination needs to be taken into account. Since the magnetic declination depends on the location on the earth it is necessary to know the location of the sensor to correct for this.
In practice, the actual magnetic field can differ significantly from the earth magnetic field. In indoor environments, for instance, presence of magnetic material in the structure of buildings and in furniture influences the magnetic field that is measured by the magnetometer. Furthermore, the magnetic field is affected in applications where the magnetometer is mounted in e.g. a vehicle, train or on a robot. In case the magnetic material is rigidly attached to the sensor, the magnetometer can be calibrated for its presence [75, 149, 118, 126]. The presence of magnetic material in the vicinity of the sensor that can not be calibrated for is of major concern for practical applications. Because of this, there is a vast amount of literature on the topic, see e.g. [21, 80, 120].
Note that when using magnetometers for orientation estimation, the presence of magnetic material is typically considered to be an undesired disturbance. However, the presence of magnetic material can also be considered to be a property which can be exploited. This is done in approaches which use the magnetic field as a source of position information [143, 56, 119].
Position information
Position information can be obtained from for instance GNSS or UWB measurements. In this tutorial, we will consider a very basic measurement model where the sensors directly measure the position as
[TABLE]
with .
Many sensors do not measure the position directly. Their measurements can, however, be pre-processed to obtain position estimates and their corresponding covariances [51]. For example, time of arrival measurements can be pre-processed using multilateration techniques. Measurements of this type often contain a significant amount of outliers. The reason is that the signals can be delayed due to multipath or non-line-of-sight (NLOS) conditions. Possible solutions deal with this by doing outlier rejection, by using robust algorithms, see e.g. [158], or by modeling the noise distribution as a non-Gaussian distribution, see e.g. [74, 51, 104]. We will discuss an example of this in more detail in §6.1.
3.5 Choosing the state and modeling its dynamics
The fundamental continuous-time relations that form the basis of our dynamic models are the fact that the position , velocity and acceleration are related as
[TABLE]
and that the orientation and angular velocity are related as
[TABLE]
depending on orientation parametrization. For a derivation of (3.55), see e.g. [59]. Using an Euler discretization of (3.54) assuming that the acceleration is constant between samples, the dynamics of the position and velocity can be expressed in terms of the acceleration as
[TABLE]
where is the time between two samples. Similarly, the dynamics of the orientation can be expressed in terms of unit quaternions or rotation matrices as
[TABLE]
Dynamic models describe how the state changes over time. For the problem of position and orientation estimation using inertial sensors, there are two commonly used modeling alternatives for the dynamics [50]. In the first, the state vector is chosen to consists of
[TABLE]
The change in position, velocity and orientation states can then be described in terms of the velocity, acceleration and angular velocity states, respectively. The dynamics of the acceleration and the angular velocity can be described in terms of a motion model. Examples of motion models that can be used are a constant acceleration model, which assumes that the dynamics of the acceleration can be described as
[TABLE]
with , and a constant angular velocity model, which describes the dynamics of the angular velocity as
[TABLE]
with . The process noise terms and model the assumptions on how constant the acceleration and angular velocity actually are.
Alternatively, the state vector can be chosen as
[TABLE]
To describe the dynamics of the states, the inertial measurements can then be used as an input to the dynamic equation (3.5). Hence, the change in position, velocity and orientation is directly modeled in terms of the inertial measurements. In this case, expressions for and in (3.56) and (3.57) are obtained from the accelerometer measurement model and the gyroscope measurement model, see §3.4. The process noise can explicitly be modeled in terms of the accelerometer measurement noise and the gyroscope measurement noise .
The benefit of using a motion model for the state dynamics is that knowledge about the motion of the sensor can be included in this model. However, it comes at the expense of having a larger state vector. The benefit of using the inertial measurements as an input to the dynamics is that the process noise has the intuitive interpretation of representing the inertial measurement noise. Hence, the latter approach is often used for applications where it is difficult to obtain sensible motion models. Another difference between the two approaches is that changes in the acceleration and angular velocity will have a slightly faster effect on the state when the inertial measurements are used as an input to the dynamics. The reason for this is that the constant acceleration and angular velocity models delay the effects of changes in the dynamics. Because of this, their estimates typically look slightly more smooth.
3.6 Models for the prior
Looking back at §3.1, to solve the smoothing and filtering problems (3.3a) and (3.3b), we have now discussed different models for the dynamics in §3.5 and for the measurements in §3.4. The remaining distributions to be defined are and . Note that we typically assume that is independent of . Hence, in this section we focus on the prior distributions and .
In many cases, there is fairly little prior information available about the parameters . It is, however, often possible to indicate reasonable values for the parameters. For example, it is reasonable to assume that the gyroscope bias is fairly small but can be both positive and negative. For instance, for the data presented in Example 2.3, the average bias over the 55-minute data set was . If we would assume that in of the cases, the bias is within the bounds with , a reasonable prior would be
[TABLE]
For the prior , it is typically possible to get a reasonable estimate from data. For the position and velocity, this can be modeled as
[TABLE]
Here, the estimate can for instance be determined based on the first position measurement. In that case, the uncertainty can also be chosen equal to the uncertainty of the position measurements. In case no additional information is available, the estimates and can be set to zero with an appropriate standard deviation instead.
A commonly used method to determine the initial orientation is to use the first accelerometer and magnetometer samples. This method is based on the fact that given two (or more) linearly independent vectors in two coordinate frames, the rotation between the two coordinate frames can be determined. The implicit assumption is that the accelerometer only measures the gravity vector and the magnetometer only measures the local magnetic field. Hence, the four vectors are given by the measurements and , the local gravity vector and the local magnetic field . These vectors are linearly independent except when the measurements are obtained on the magnetic north or south poles where the dip angle is and the magnetic field does not contain any heading information.
The accelerometer provides information about the sensor’s inclination. Heading information is provided by the magnetometer. However, at all locations except on the equator, the magnetometer also provides information about the inclination due to its non-zero vertical component, see (3.51). In practice, the accelerometer typically provides more accurate inclination information. Hence, we choose to use the magnetometer only to provide heading information by projecting the magnetic field and the magnetometer measurement on the horizontal plane. Furthermore, we normalize the vectors. Because of this, an adapted model uses the four normalized vectors
[TABLE]
A number of algorithms are available to estimate the orientation from these vectors. Well-known examples are the TRIAD algorithm, the QUEST algorithm, see e.g. [137], and the method presented in [62]. For our problem at hand, these methods give equivalent results, even though they use slightly different solution strategies. Generally speaking, they solve the problem of determining the rotation from
[TABLE]
Recall from (3.24) that is the rotation of the vector to the -frame. The optimization problem (3.6) therefore determines the orientation that minimizes the distance between the normalized magnetic field and gravity vectors measured in the first sample and the normalized magnetic field and gravity vectors in the navigation frame. These four vectors were defined in (3.64).
Defining
[TABLE]
where the left and right quaternion multiplications are defined in (3.28), (3.6) can equivalently be written as
[TABLE]
For a derivation, see [59]. The solution to this problem is given by the eigenvector corresponding to the largest eigenvalue of . Note that although this method can be used to compute the orientation from any two linearly independent vectors in two coordinate frames, we only use it to compute a prior on the orientation.
Based on the estimate from (3.67), we can model the orientation at time in terms of an orientation deviation
[TABLE]
Explicit formulations for the covariance of the orientation estimates from the TRIAD and QUEST algorithms are discussed by [136]. In practice, however, the accuracy of the estimates from (3.67) highly depends on the validity of the model assumptions, i.e. on whether the sensor is indeed far from magnetic material and whether the linear acceleration is indeed zero. Because this has such a significant influence on the quality of the estimates, we choose and somewhat conservatively. Modeling that in of the cases the orientation error is less than ,
[TABLE]
where we use the fact that . Note that the covariance is defined in terms of the covariance to allow for explicit comparison between different algorithms in Chapter 4.
3.7 Resulting probabilistic models
The information from the previous sections can now be combined into one model which will be used in the algorithms in Chapter 4. In this section, we describe our modeling choices for the pose estimation problem and for the orientation estimation problem.
We assume that the sensor does not travel over significant distances as compared to the size of the earth and hence keep the navigation frame fixed with respect to the earth frame . Furthermore, we assume that the magnitude of the earth rotation and of the Coriolis acceleration are negligible. Our gyroscope and accelerometer models are hence given by
[TABLE]
In the remainder, for notational convenience we drop the subscripts which indicate in which frame the differentiation is performed, see §2.3, and use the shorthand notation for . Furthermore, we will denote simply by and omit the superscript on the noise terms and and the bias terms and . We assume that the inertial measurement noise is given by
[TABLE]
i.e. we assume that the three sensor axes are independent and have the same noise levels.
3.7.1 Pose estimation
For pose estimation, we model the accelerometer and gyroscope measurements as inputs to the dynamics. Hence, the state vector consists of the position , the velocity and a parametrization of the orientation. We use the inertial measurements in combination with position measurements to estimate the pose.
Using the accelerometer measurement model (3.70a) in (3.56), the dynamics of the position and velocity is given by
[TABLE]
where without loss of generality, we switch the sign on the noise. Note that the noise term should be rotated to the navigation frame by multiplying it with the rotation matrix . However, because of the assumption (3.71), the rotation matrix can be omitted without loss of generality. The dynamics of the orientation parametrized using quaternions is given by
[TABLE]
Equivalent dynamic models can be obtained for the other parametrizations.
The position measurements are modeled as in (3.53). In summary, this leads to the following state space model for pose estimation
[TABLE]
where the initial orientation uncertainty is given in terms of a standard deviation of .
In Chapter 4 we assume that the inertial measurement are properly calibrated. Hence, we assume that their biases and are zero. Calibration is the topic of Chapter 5 where we will also introduce possible extensions of the state space model in which the bias terms are included either as states or as unknown parameters.
3.7.2 Orientation estimation
For orientation estimation, the state vector only consists of a parametrization of the orientation. We use the inertial sensors in combination with the magnetometer measurements to estimate the orientation. The magnetometer measurements are modeled as in (3.52). Instead of using the accelerometer measurements model (3.70a), we use the model (3.50) where it is assumed that the linear acceleration is approximately zero. This leads to the following state space model for orientation estimation,
[TABLE]
with and . The initial orientation is given by the QUEST algorithm described in §3.6 and is modeled as in (3.74g) or (3.74h). Also for orientation estimation, in Chapter 4 we assume that the inertial measurements are properly calibrated. Hence, we assume that the bias is zero.
Chapter 4 Estimating Position and Orientation
In this chapter we will focus on position and orientation estimation using the models (3.74) and (3.75) derived in Chapter 3. In §4.1, we will first describe a method to solve the smoothing problem (3.3a). Subsequently, in §4.2–§4.4, we will derive different methods for solving the filtering problem (3.3b). In each section, after a general introduction of the estimation method, we will illustrate the method by explicitly deriving algorithms to estimate the orientation using the state space model (3.75). The orientation estimation problem also illustrates the most important parts of the pose estimation problem, since most complexities lie in the parametrization of the orientation and in the nonlinear nature of the orientation. In §4.5, we show some characteristics of the different algorithms for the orientation estimation problem. In §4.6, we will discuss how the algorithms for orientation estimation can be extended to also estimate the position. Throughout this section, we assume that the sensors are calibrated, i.e. we assume that we do not have any unknown parameters in our models. Because of this, the models that we use are the most basic models that can be used for position and orientation estimation using inertial sensors.
4.1 Smoothing in an optimization framework
Perhaps the most intuitive way to solve the smoothing problem is by posing it as an optimization problem, where a maximum a posteriori (MAP) estimate is obtained as
[TABLE]
Here, we use the notation in terms of probability distributions as introduced in §3.1 and model the measurements and the state dynamics as described in §3.4 and §3.5, respectively. Furthermore, we assume that a prior on the initial state is obtained using the measurements at as described in §3.6. Because of this, the measurement model from (3.3a) is explicitly omitted in (4.1). Note that in practice, we typically minimize instead of maximizing itself, resulting in the optimization problem
[TABLE]
There are various ways to solve problems of this kind, for instance particle smoothers [81], an extended Rauch-Tung-Striebel (RTS) smoother [127] and optimization methods, see e.g. [103, 95]. The latter approach is closely related to iterated Kalman smoothers [10, 65]. We will solve the problem using an optimization method. Compared to extended RTS smoothers, optimization methods allow for more flexibility in the models that are being used. For instance, additional information outside of the standard state space model can straightforwardly be included. Optimization approaches are typically computationally heavier than extended RTS smoothers but less heavy than particle smoothers. The latter are capable of capturing the whole distribution, which is a clear advantage when the distributions are multi-modal. Optimization instead gives a point estimate and an associated measure of uncertainty. This is typically sufficient for position and orientation estimation using inertial sensors.
4.1.1 Gauss-Newton optimization
To obtain a smoothing estimate of the position and orientation using optimization, we first recognize that for our models (3.74) and (3.75), all probability distributions in (4.2) are Gaussian. Let us therefore consider a slightly more general problem where the objective function consists of the product of Gaussian probability functions , . Hence, the optimization problem can be written as
[TABLE]
The probability distribution of is given by
[TABLE]
Omitting the terms independent of , the optimization problem (4.3) reduces to
[TABLE]
with . The function that is being minimized in optimization problems, is often referred to as the objective function.
The solution to (4.5) can be found by studying the shape of the objective function as a function of . This can be characterized in terms of the gradient and Hessian , which provide information about the slope and curvature of the function, respectively. Defining
[TABLE]
and the stacked variables
[TABLE]
the gradient and the Hessian are given by
[TABLE]
Note that for notational convenience, we have omitted the explicit dependence of on . In (4.6), we introduced the notation , which is the Jacobian of the vector with respect to as
[TABLE]
where is the length of the vector . Instead of computing the true Hessian (4.6b), we compute an approximation of it [103], given by
[TABLE]
This has the benefit of not having to compute second derivatives, at the same time as it guarantees that the Hessian is positive semidefinite. The downside of using (4.8) is that it introduces an approximation.
The gradient and the (approximate) Hessian can be used to find the minimum of the objective function. For our models (3.74) and (3.75), in which the functions are nonlinear, an estimate can iteratively be computed as
[TABLE]
where denotes the iteration number. The step length is computed for instance using a backtracking line search [103, 16]. The search direction is computed as . Note that an initial point needs to be chosen close enough to the desired minimum to ensure convergence to this minimum.
In case the functions would be linear, the problem (4.5) would be a least squares (LS) problem for which the update (4.9) directly leads to the minimum of the objective function, irrespective of the initial point. In our case where the functions are nonlinear due to the nonlinear nature of the orientation, the problem (4.5) is instead a nonlinear least squares (NLS) problem. Each iteration in (4.9) can be interpreted as solving a LS problem around a linearization point. The linearization point is updated after each iteration, bringing it closer to the minimum of the objective function. Computing an estimate by iterating (4.9) until convergence, making use of the approximate Hessian from (4.8), is called Gauss-Newton optimization.
Note that since the inertial sensors sample at high sampling rates, the length of the vector quickly becomes fairly large. For instance, for inertial sensors sampling at for seconds, and the size of the (approximate) Hessian is , where is the length of the vector . However, as can be seen in (4.2), the components of the objective function only depend on the current and next time steps and . Hence, the structure of the Hessian (4.8) is of the form given in Figure 4.1. There exist efficient algorithms to compute search directions for problems with this sparsity pattern, which can be exploited using sparse matrix packages, see e.g. [29], or by using tools like dynamic programming and message passing [11, 46, 123].
4.1.2 Smoothing estimates of the orientation using optimization
In this section, we will illustrate the use of Gauss-Newton optimization to obtain smoothing estimates of the orientation. As discussed in the previous section, the crucial part is to identify the objective function and its Jacobian. From this, the gradient and approximate Hessian can be computed using (4.6a) and (4.8), which can be used to iteratively update the estimates using (4.9).
Combining the general formulation of the smoothing problem (4.2) and using the model for orientation estimation (3.75), the orientation smoothing problem is given by
[TABLE]
with
[TABLE]
Convex equality constraints can straightforwardly be incorporated in optimization problems. However, using equality constraints to preserve the unit norm of the quaternions, severely complicates the optimization problem since these norm constraints are non-convex. Instead, we encode an orientation in terms of a linearization point parametrized as a unit quaternion and an orientation deviation parametrized as a rotation vector as discussed in §3.3.1. Hence, we model the orientation as
[TABLE]
At each Gauss-Newton iteration (4.9), we estimate the state vector . Before starting the next iteration, the linearization points are updated and the state vector is reset to zero.
Using the notation introduced in §3.3.1, the objective function (4.10) can be expressed in terms of the orientation deviation by rewriting (4.11) as
[TABLE]
Here, is the rotation matrix representation of the linearization point . This leads to the following derivatives
[TABLE]
where, using (3.40) and the definition of the quaternion conjugate (3.25),
[TABLE]
Using the approximate derivatives (4.14), the gradient and approximate Hessian can be computed for the Gauss-Newton iterations. The resulting solution is summarized in Algorithm 1. One of the inputs to the algorithm is an initial estimate of the orientation , which will aid the convergence to the desired minimum. There are (at least) two ways to obtain good initial estimates . First, they can be obtained by direct integration of the gyroscope measurements. As discussed in §1.2, these estimates will suffer from integration drift. However, they still form a good initial estimate for the optimization problem. Second, one of the other, computationally cheaper estimation algorithms that will be discussed in the remainder of this section can be used to obtain initial estimates of the orientation.
4.1.3 Computing the uncertainty
As discussed in §3.1, we are not only interested in obtaining point estimates of the position and orientation, but also in estimating their uncertainty. In our case of Gaussian noise, this is characterized by the covariance. As shown in e.g. [82, 150], if our position and orientation estimation problems would be LS problems, the covariance of the estimates would be given by the inverse of the Hessian of the objective function (4.6b). Instead, we solve an NLS problem, for which a number of LS problems are solved around linearization points closer and closer to the minimum of the objective function. Hence, when the algorithm has converged, the problem can locally well be described by the quadratic approximation around its resulting linearization point. We can therefore approximate the covariance of our estimates as
[TABLE]
An intuition behind this expression is that the accuracy of the estimates is related to the sensitivity of the objective function with respect to the states. The covariance of the estimate will play a crucial role in the filtering approaches discussed in §4.2 and §4.3.
The matrix quickly becomes fairly large due to the high sampling rates of the inertial sensors. Hence, computing its inverse can be computationally costly. We are, however, typically only interested in a subset of the inverse. For instance, we are often only interested in diagonal or block diagonal elements representing . It is therefore not necessary to explicitly form the complete inverse, which makes the computation tractable also for larger problem sizes.
4.2 Filtering estimation in an optimization framework
One of the benefits of using a smoothing formulation is that all measurements are used to get the best estimates of the states . However, both the computational cost and the memory requirements grow with the length of the data set. Furthermore, it is a post-processing solution in which we have to wait until all data is available. Alternatively, the filtering problem can be formulated as
[TABLE]
Note that without loss of generality, we have shifted our time indices as compared to the notation in §3.1. The probability distribution can now be seen as a prior and can be obtained by marginalizing out the previous state as
[TABLE]
Assuming that
[TABLE]
the integral in (4.2) can be approximated as
[TABLE]
Here, F_{t}=\left.{\tfrac{\partial f(x_{t})}{\partial x_{t}}}_{\leavevmode\hbox{\set@color\leavevmode\hbox{\set@color}\raisebox{-1.0pt}{\leavevmode\hbox{\set@color}}}}\right|_{\leavevmode\hbox{\set@color\leavevmode\hbox{\set@color\scriptscriptstyle x_{t}=\hat{x}{t}}\raisebox{9.08334pt}{\leavevmode\hbox{\set@color\scriptscriptstyle w{t}=0}}\hskip 12.30035pt}}, \left.{G_{t}=\tfrac{\partial f(x_{t})}{\partial w_{t}}}_{\leavevmode\hbox{\set@color\leavevmode\hbox{\set@color}\raisebox{-1.0pt}{\leavevmode\hbox{\set@color}}}}\right|_{\leavevmode\hbox{\set@color\leavevmode\hbox{\set@color\scriptscriptstyle x_{t}=\hat{x}{t}}\raisebox{9.08334pt}{\leavevmode\hbox{\set@color\scriptscriptstyle w{t}=0}}\hskip 12.30035pt}} and is the process noise defined in (3.5). Using (4.22), the filtering problem (4.2) can again be written as a nonlinear least squares problem and can be solved using Gauss-Newton optimization as described in §4.1.1. Instead of optimizing over the whole data set at once as in §4.1, we solve a small optimization problem at each time instance . This is closely related to what is often called an iterated extended Kalman filter [65, 141].
4.2.1 Filtering estimates of the orientation using optimization
In this section, we will derive an algorithm to obtain filtering estimates of the orientation using Gauss-Newton optimization. The resulting algorithm is closely related to the iterated multiplicative extended Kalman filter presented in [142].
To derive the approximation (4.22) for the orientation estimation problem, we first derive an expression for the function that expresses in terms of . Using (4.12) in combination with (3.75a),
[TABLE]
Here, and provide information about the previous time step. We denote the orientation estimate from the previous time step as and assume that is zero since the linearization point is updated after each iteration of the optimization algorithm. To start with a fairly good linearization point, we choose at iteration as
[TABLE]
Following (4.22), the distribution around this linearization point can now be written as
[TABLE]
with
[TABLE]
The covariance in (4.25) can be approximated as the inverse of the Hessian of the objective function from the previous time step, see also §4.1.3. We make use of the shorthand notation and define
[TABLE]
Note that is equal to zero for iteration but can be non-zero for subsequent iterations. Using this notation, the filtering problem (4.2) results in the following optimization problem
[TABLE]
Note the similarity of this optimization problem to the smoothing formulation in (4.10). The term takes into account both the knowledge about the previous state and the dynamics. Furthermore, due to the fact that is time-varying, the uncertainty and cross-correlation of the states at the previous time instance is taken into consideration. Including this term is similar to the inclusion of an arrival cost in moving horizon estimation approaches [114].
After each Gauss-Newton iteration, we need to recompute the linearization point as
[TABLE]
We also need to compute the covariance around this updated linearization point as
[TABLE]
where can be derived similarly to the derivation of in (4.26a). Since , in practice the relinearization of the covariance can be omitted. The process of estimating orientation using filtering is summarized in Algorithm 2.
4.3 Extended Kalman filtering
Instead of using optimization for position and orientation estimation, it is also possible to use extended Kalman filtering. Extended Kalman filters (EKFs) compute filtering estimates in terms of the conditional probability distribution (3.2). Hence, the approach is similar to the one discussed in §4.2. In fact, extended Kalman filtering can be interpreted as Gauss-Newton optimization of the filtering problem using only one iteration (4.9) with a step length of one, see e.g. [141]. In this section we first introduce how an EKF can be used to compute state estimates in a general nonlinear state space model. Subsequently, we illustrate the use of EKFs for position and orientation estimation by focusing on the orientation estimation problem. Two different implementations will be discussed. First, we introduce an EKF implementation that uses unit quaternions as states. Subsequently, we discuss an EKF which parametrizes the orientation in terms of an orientation deviation from a linearization point, similar to the approach used in §4.1 and §4.2.
An EKF makes use of a nonlinear state space model. Assuming that the measurement noise is additive and that both the process and the measurement noise are zero-mean Gaussian with constant covariance, the state space model is given by
[TABLE]
with and .
The state is estimated recursively by performing a time update and a measurement update. The time update uses the model (4.34a) to “predict” the state to the next time step according to
[TABLE]
with
[TABLE]
Here, the matrix denotes the state covariance. The double subscripts on and denote the state estimate and the state covariance at time given measurements up to time . Similarly, and denote the state estimate and the state covariance at time given measurements up to time .
The measurement update makes use of the measurement model (4.34b) in combination with the measurements to update the “predicted” state estimate as
[TABLE]
with
[TABLE]
and
[TABLE]
Note that in (4.37) we have shifted our notation one time step compared to the notation in (4.35) to avoid cluttering the notation. The EKF iteratively performs a time update and a measurement update to estimate the state and its covariance.
4.3.1 Estimating orientation using quaternions as states
In this section, we will illustrate the use of an EKF to compute filtering estimates of the orientation. As discussed in the previous section, the crucial part is to compute the matrices , and to perform the EKF time and measurement updates. Using the state space model (3.75) and using unit quaternions as states in the EKF, the dynamic model is given by
[TABLE]
The following derivatives of the dynamic model (4.40) can be obtained
[TABLE]
In the measurement update of the EKF, the state is updated using the accelerometer and magnetometer measurements. Using the measurement models
[TABLE]
the matrix in (4.39) is given by
[TABLE]
The derivative can be computed from the definition of the relation between and the rotation matrix and the quaternion representation given in (A.10).
Note that the quaternion obtained from the measurement update (4.37) is no longer normalized. We denote this unnormalized quaternion and its covariance by and , respectively. The instead of the is meant to explicitly indicate that the quaternion still needs to be updated. This is done by an additional renormalization step as compared to a standard EKF implementation. A possible interpretation of the renormalization is as an additional measurement update without measurement noise. Hence, we adjust both the quaternion and its covariance as
[TABLE]
Here, is the standard vector transpose. The resulting EKF is summarized in Algorithm 3.
4.3.2 Estimating orientation using orientation deviations as states
An alternative EKF implementation parametrizes the orientation in terms of an orientation deviation around a linearization point. The linearization point is parametrized in terms of quaternions or rotation matrices and denoted or equivalently . The orientation deviation is the state vector in the EKF. This EKF implementation is sometimes referred to as a multiplicative EKF [28, 93]. One of its advantages is that its implementation is computationally attractive since it only uses a 3-dimensional state compared to the 4-dimensional state in Algorithm 3.
Similarly to (4.2.1) in §4.2, the dynamics of the state is given by
[TABLE]
In the time update of the EKF, we first use (3.75a) to directly update the linearization point as
[TABLE]
Around this linearization point, the derivatives of the dynamic model (4.48) are given by
[TABLE]
Note the similarity with (4.26).
In the measurement update of the EKF, the state is updated using the accelerometer and magnetometer measurements. The accelerometer measurement equation can be written in terms of the state as
[TABLE]
Equivalently, the magnetometer measurement equation can be written in terms of the state as
[TABLE]
From these equations, the derivatives as defined in (4.39) can straightforwardly be computed.
After the measurement update, the orientation deviation is non-zero. Hence, as an additional step in the EKF, we update the linearization point and reset the state. In our algorithm, we consider the relinearization as the “measurement update” for the linearization point, i.e. the relinearization updates the linearization point to as
[TABLE]
For the same reasons as in §4.2, the relinearization of the covariance can be omitted. The resulting EKF is summarized in Algorithm 4. Note the similarities between this algorithm and Algorithm 2.
4.4 Complementary filtering
An alternative to using EKFs for orientation estimation is to use complementary filters [58, 17]. This type of algorithms again estimates the orientation at time given the measurements . However, it does not use the probabilistic models presented in Chapter 3. Instead, complementary filters explicitly use the fact that both the gyroscope and the combination of the accelerometer and the magnetometer provide information about the orientation of the sensor. The orientation estimates obtained from the accelerometer and the magnetometer measurements are noisy but accurate over long periods of time. On the other hand, the orientation estimates using the gyroscope measurements are accurate on a short time scale but they drift over time. These properties can be interpreted and exploited in the frequency domain. The orientation estimates using the gyroscope have desirable properties at high frequencies. We would therefore like to filter these using a high-pass filter. Conversely, the orientation estimates obtained from the accelerometer and magnetometer measurements have desirable properties at low frequencies. We would therefore like to filter these orientation estimates using a low-pass filter.
This can be illustrated by considering the one-dimensional case of estimating an angle from gyroscope measurements and magnetometer measurements . We denote the angle estimated by the complementary filter by , the angle obtained from the magnetometer measurements by and the angle obtained from the gyroscope measurements by . Note that the latter is obtained by integrating the gyroscope measurements. The Laplace transforms of , , and are denoted by , , and , respectively. The complementary filter computes as
[TABLE]
where is a low-pass filter and is hence a high-pass filter. Note that the sum of the two filters, and , is equal to one, which is the reason behind the name complementary filter. Choosing as a first-order low-pass filter and using Euler backward discretization, the filter (4.4) can be written in discrete time as
[TABLE]
where . The relation (4.58) allows us to recursively estimate the angle . The only parameter that needs to be chosen to run the complementary filter (4.58) is the parameter of the low-pass filter . Choosing a large (and hence a close to one) results in a lower cut-off frequency and a more significant contribution of the gyroscope measurements on the orientation estimates. Conversely, a small (and hence a close to zero) results in a higher cut-off frequency and a more significant contribution of the magnetometer measurements on the orientation estimates.
There is a strong relationship between complementary and Kalman filtering for linear models, see e.g. [58, 17]. To highlight the similarities and differences between complementary and extended Kalman filtering for orientation estimation, let us define the estimate from the complementary filter as and write the recursion (4.58) equivalently as
[TABLE]
So far, we have discussed the one-dimensional case of estimating an angle . Let us now focus on estimating orientation in three dimensions and parametrize this as a unit quaternion . Two well-known complementary filter implementations to estimate the orientation are presented in [90] and [89]. Open-source implementations of both algorithms are available online [155]. The filter presented in [89] is specifically designed to be computationally efficient and has for instance been implemented in the robot operating system (ROS) [146]. In this section, we will derive a complementary filter that is inspired by this implementation but which is also meant to illustrate the similarities and differences between complementary filters and extended Kalman filters for orientation estimation. Because of that, the complementary filter that we will present is not as computationally efficient as the one in [89].
Similar to the one-dimensional case (4.59a), the orientation estimate of the complementary filter can be updated using the gyroscope measurements as
[TABLE]
where is the orientation estimate from the complementary filter and the double subscripts are defined analogously to (4.59). Note that the update (4.60) is equivalent to the time update in the EKF in Algorithm 3.
The orientation from the accelerometer and magnetometer measurements, denoted , can be obtained by solving
[TABLE]
see also §3.6. Similar to [89], we do not completely solve the optimization problem (4.4) in each recursion of the complementary filter. Instead, we use an initial estimate and only perform one iteration of an optimization algorithm. In [89], one iteration of a gradient descent algorithm is performed. We instead perform one Gauss-Newton update as in (4.9). Hence, using
[TABLE]
the estimate is given by
[TABLE]
Analogously to (4.59b), the second update of the complementary filter is therefore given by
[TABLE]
There are many similarities between (4.4) and the measurement update in the EKF in Algorithm 3. First of all, if we neglect the presence of and for a moment, and in (4.62) are equal to and in the measurement update in Algorithm 3. Inclusion of and in (4.62) ensures that the uncertainty of the accelerometer and magnetometer measurements is properly taken into account when obtaining . The contributions to the orientation estimate from integration of the gyroscope measurements and from are determined by the factor . In the EKF on the other hand, the uncertainty of the gyroscope, accelerometer and magnetometer measurements is taken into account through the covariance matrices , and .
Second of all, comparing (4.4) to the EKF measurement update (4.37), the update (4.4) can be interpreted as a scaled version of an EKF update with and . In that case, the matrix in the EKF would be given by . The matrix is rank deficient. Because of this, to compute , we would have to use the pseudo-inverse, see e.g. [46]. Denoting the pseudo-inverse of a matrix as , . An important difference between the EKF and complementary update is that the scaling factor in (4.4) is constant, while the matrix in the EKF is time-varying. In the remainder, we will denote this constant by for notational brevity.
Our complementary filter implementation is summarized in Algorithm 5. Note again the similarity to Algorithm 3. To stress this similarity even more, we call the update (4.60) the time update of the complementary filter and (4.4) the measurement update.
4.5 Evaluation based on experimental and simulated data
In this section, we apply the algorithms described in §4.1–§4.4 to both simulated and experimental data. Some general characteristics of the orientation estimation algorithms will be illustrated and the quality of the different algorithms will be analyzed. The simulated data allows for controlled analysis of the workings of the algorithms. Furthermore, it allows us to compare the different algorithms using Monte Carlo simulations. The experimental data shows the applicability to real-world scenarios. We will start by introducing the data sets.
Experimental data is collected using the setup shown in Figure 4.2, where data is collected using multiple mobile IMUs and smartphones. The algorithms presented in this section can be applied to measurements from any of these devices. However, we focus our analysis on the data from the Trivisio Colibri Wireless IMU [148]. In Figure 4.3, the inertial and magnetometer measurements from this IMU are displayed for around seconds during which the sensor is rotated around all three axes. The experiments are performed in a lab equipped with multiple cameras [151], able to track the optical markers shown in Figure 4.2. This provides highly accurate ground truth reference position and orientation information, against which we can compare our estimates. For comparison, the optical and IMU data need to be time-synchronized and aligned. We synchronize the data by correlating the norms of the gyroscope measurements and of the angular velocity estimated by the optical system. Alignment is done using the orientation estimates in combination with Theorem 4.2 from [59].
In Figure 4.4, simulated inertial and magnetometer measurements are displayed. The data represents a sensor that is kept stationary for 100 samples, after which it is rotated around all three axes. The sensor is assumed to be rotated around the origin of the accelerometer triad. Hence, during the entire data set, the accelerometer is assumed to only measure the gravity vector. The magnitude of the simulated gravity vector is . The magnitude of the simulated local magnetic field is equal to one. Its direction is approximately equal to that in Linköping, Sweden, where a dip angle of leads to a magnetic field . The simulated noise levels are
[TABLE]
Note that we deliberately chose the noise levels to be fairly high, to clearly illustrate the workings of the different algorithms.
Although our algorithms parametrize the orientation as quaternions, it is typically more intuitive to visualize the orientation estimates in Euler angles. Hence, we visualize our results in terms of roll, pitch and heading (yaw) angles. Both for the experimental data and for the simulated data, we are able to compare our estimates to reference orientations denoted . To represent the orientation error, we compute a difference quaternion as
[TABLE]
which can be converted to Euler angles for visualization. Note that using this definition, the orientation errors in Euler angles can be interpreted as the errors in roll, pitch and heading.
4.5.1 General characteristics
In this section, we will discuss some general characteristics of the orientation estimation problem and illustrate them in three different examples. Our goal is not to compare the different estimation algorithms, but to illustrate some characteristics common to all of them.
In Example 4.1 we focus on the accuracy of the orientation estimates that can be obtained if the state space model (3.75) is completely true. We illustrate that it is typically easier to obtain accurate roll and pitch estimates than it is to obtain accurate heading estimates.
Example 4.1** (Orientation estimation using inertial and magnetometer data)**
The orientation errors from the smoothing optimization approach in Algorithm 1 using simulated inertial and magnetometer measurements as illustrated in Figure 4.4 are depicted in the top plot of Figure 4.5. For comparison we also show the orientation errors from dead-reckoning the gyroscope measurements in the bottom plot (see also §1.2). These errors can be seen to drift over time.
Although the accelerometer and the magnetometer measurement noises are of equal magnitude, the heading angle is estimated with less accuracy compared to the roll and pitch angles. The reason for this is twofold. First, the signal to noise ratio for the magnetometer is worse than that of the accelerometer, since the magnetometer signal has a magnitude of while the accelerometer signal has a magnitude of . Second, only the horizontal component of the local magnetic field vector provides heading information. This component is fairly small due to the large dip angle () in Linköping, Sweden.
**
The accelerometer provides inclination information, while the magnetometer provides heading information, see §3.4. In case only inertial measurements and no magnetometer measurements are available, the heading can only be estimated using the gyroscope measurements and will therefore drift over time. This is illustrated in Example 4.2.
Example 4.2** (Orientation estimation using only inertial measurements)**
The orientation errors from the smoothing optimization approach in Algorithm 1 using simulated inertial measurements as presented in Figure 4.4 can be found in Figure 4.6. The roll and pitch angles can be seen to be accurate, while the heading angle drifts significantly. To obtain the results in Figure 4.6, we used data with the same noise realization as in Example 4.1. Hence, we refer to Figure 4.5 for comparison to the orientation errors from dead-reckoning the gyroscope measurements. The drift in the heading angle can be seen to be similar to the drift from dead-reckoning of the gyroscope measurements.
**
The two examples above assume that our state space model (3.75) is an accurate description of the measurements. In practice, however, this is not always the case, for instance due to the presence of magnetic material in the vicinity of the sensor. In Example 4.3 we illustrate that if the state space model does not accurately describe the data, it is not possible to obtain accurate orientation estimates.
Example 4.3** (Orientation estimation in the presence of magnetic material)**
We simulate 400 samples of stationary data. Between samples 150 and 250, we simulate the presence of a magnetic material, causing a change in the magnetic field of . In Figure 4.7, we show the adapted magnetometer data and the orientation estimates using the smoothing optimization approach from §4.1. As can be seen, the heading estimates show significant errors when the magnetic material is present. Depending on the amount of disturbance and the uncertainty in the inertial and magnetometer measurements, magnetic material can also result in errors in the roll and pitch estimates.
**
4.5.2 Representing uncertainty
So far, we have discussed the quality of the orientation estimates in three different examples. However, we did not discuss the uncertainty of the estimates. Algorithms 1–4 provide estimates of the uncertainties. We will now discuss how these uncertainties can be displayed and interpreted and highlight some difficulties with this.
Both the optimization and the EKF approaches discussed in §4.1–§4.3 compute the uncertainty of the estimates in terms of a covariance matrix. Let us use the more general notation for the covariance of the orientation deviation states , computed in Algorithms 1, 2 and 4, and for the covariance of the quaternion states , computed in Algorithm 3. If the states would be in normal, Euclidean space, the square root of the diagonal of these matrices would represent the standard deviation of the estimates in the different directions. These could then be visualized by for instance plotting confidence bounds around the estimates.
One could imagine that an equivalent way of visualizing the orientation deviation uncertainties, would be to compute the bounds in terms of orientation deviations in each of the three directions as
[TABLE]
after which the bounds can be parametrized in terms of quaternions as
[TABLE]
The resulting estimates and bounds are visualized in terms of Euler angles in Figure 4.8 for simulated data similar to the data presented in Figure 4.4. The orientation and its covariance are estimated using Algorithm 4. As can be seen, the bounds are difficult to interpret due to the wrapping of the Euler angles.
As argued in [38], it is more intuitive to directly represent the uncertainty in terms of orientation deviations. The covariance can be interpreted as the uncertainty in the roll, pitch and heading angles as illustrated in Example 4.4.
Example 4.4** (Orientation estimation using only inertial measurements (continued))**
Since the accelerometer provides only inclination information, in the case of Example 4.2 where magnetometer measurements are unavailable, we expect only the roll and pitch angles to be estimated with small uncertainty. In fact, we expect the uncertainty of the heading at to be equal to the uncertainty of the initial from §3.6 and to steadily grow over time, depending on the amount of gyroscope noise. In Figure 4.9, we plot the standard deviation of the orientation estimates computed using the smoothing algorithm from §4.1 as the square root of the diagonal elements of . As can be seen, the standard deviation of the yaw angle at is indeed as modeled in §3.6. The increase in the uncertainty in the yaw angle exactly matches the increase of the uncertainty due to dead-reckoning.
**
From Example 4.4 it can be concluded that seems to be an intuitive measure of the uncertainty of the orientation estimates. The covariance computed by Algorithm 3 relates to as
[TABLE]
The relation (4.71) allows us to compare the orientation estimates and covariances from the different algorithms in more detail in Example 4.5.
Example 4.5** (Orientation estimation using only inertial measurements (continued))**
As discussed in Example 4.4, using only inertial measurements and no magnetometer measurements, we can only expect to be able to accurately estimate the inclination. The uncertainty of the heading estimates grows over time. We will now analyze the behavior of the different algorithms in more detail for this specific example. In Table 4.1, we show the root mean square error (RMSE) values over Monte Carlo simulations for Algorithms 1–4. In Figure 4.10, we also represent the orientation estimates from the four algorithms for one of these realizations. As can be seen from both Table 4.1 and Figure 4.10, as expected, the smoothing algorithm outperforms the other algorithms. However, more surprisingly, the EKF with quaternion states has much larger errors in the heading angle. In Figure 4.11, we also show the standard deviations of the estimates from all algorithms. As can be seen, the EKF with quaternion states over-estimates its confidence in the estimates of the heading direction. This can most likely be attributed to linearization issues.
**
From Example 4.5, it can be concluded that not properly estimating the covariance can have negative effects on the quality of the estimates. It can also be concluded from this section that covariances can best be represented in terms of but that they are difficult to visualize in Euler angles. Because of that, in the remainder of this section, we will typically plot the uncertainty in a separate plot like in Figure 4.11.
4.5.3 Comparing the different algorithms
We use the experimental data presented in Figure 4.3 to assess the quality of the estimates from the different algorithms. We also have a short sequence of stationary data available that allows us to determine the gyroscope bias and the sensor noise covariances. The gyroscope bias is subtracted from the data to allow for better orientation estimates. The standard deviation of the gyroscope noise is experimentally determined to be . As discussed in §3.4, the covariance matrices in the measurement models reflect not only the sensor noise, but also the model uncertainty. Both the assumptions that the sensor’s acceleration is zero and that the magnetic field is homogeneous are only approximately true. Because of this, we choose and . These values are a factor 10 respectively 100 larger than the experimentally determined noise values. Note that this choice is highly dependent on the data set. The RMSE values as compared to the optical reference system for the different methods described in this chapter are summarized in Table 4.2. A good value for in the complementary filter is experimentally determined to be for this specific data set. As an illustration of the estimates, the orientation estimates as obtained using the smoothing algorithm and the orientations from the optical reference system are shown in Figure 4.12.
It is of course difficult to draw quantitative conclusions based on only one data set. The RMSE values in Table 4.2 should therefore mainly be seen as an indication of the performance. Comparing the different algorithms amongst each other is hard. In fact, the algorithms perform differently with respect to each other for different choices of the covariance matrices. Because of this, we will study the accuracy of the different methods using simulated data instead.
We run 100 Monte Carlo simulations where the simulated data illustrated in Figure 4.4 is generated with different noise realizations. Table 4.3 shows the mean RMSE for the five estimation algorithms. Algorithms 1–4 use the noise covariance matrices that are also used to generate the data. The complementary filter also uses these to determine the orientation from the accelerometer and magnetometer data. To combine this with the orientation from the gyroscope measurements, we need to determine a good value for . We empirically choose a value that leads to good performance for this data set. The orientation from the accelerometer and magnetometer measurements can be expected to be more accurate in the roll and the pitch than in the heading, see Example 4.1. Since is scalar, however, it is not possible to weigh these contributions differently. Because of this, we present results both for , which leads to small RMSE values in the heading but relatively larger RMSE in the roll and the pitch, and for , which leads to small RMSE values in the roll and pitch but large RMSE in the heading.
From the results summarized in Table 4.3, it can be seen that the smoothing approach outperforms the filtering approaches. The estimates for one of the noise realizations are shown in Figure 4.13. For Algorithms 1–4, we also depict the covariance estimates in Figure 4.14. The filtering approaches from Algorithms 2–4 estimate the standard deviation of the orientation errors at to be equal to . After this, they can be seen to converge to around degrees for the heading angle and for roll and pitch angles. The smoothing algorithm estimates an uncertainty in the heading angle of around for the first and last sample, while converging to a standard deviation of for the middle of the data set. For the roll and pitch angles, the initial and final uncertainties are estimated to be around , converging to for the middle of the data set. Note that these values correspond fairly well with the RMSE values in Table 4.3.
For the Monte Carlo simulations described above, the three filtering algorithms perform similarly. However, differences can be seen when an update of the filter needs to correct the orientation estimates significantly. Examples for when this happens are when the initial orientation is not accurately known or when magnetometer measurements are not available for a longer period of time. In these cases, the uncertainty of the state is large and large corrections to the state estimates are needed when measurements become available. To analyze this case in more detail, we assume that the estimate of the initial orientation is normal distributed around the true initial orientation with a standard deviation of . Hence, we do not use the first accelerometer and magnetometer data for initialization. Note that a standard deviation of is equal to the uncertainty on the initial state assumed by the algorithms. The results for Monte Carlo simulations are summarized in Table 4.4. As can be seen, specifically the EKF with quaternion states and the complementary filter with perform worse than Algorithm 2 and Algorithm 4 for this data.
Which algorithm to use is highly application-specific. However, in general it can be concluded that all five algorithms actually produce fairly good orientation estimates, assuming that the models from §3.7 are indeed valid. The smoothing algorithm performs better than the filtering approaches but it is also the most computationally expensive. The EKF with quaternion states and the complementary filter suffer from linearization issues when large orientation corrections need to be made or when magnetometer data is unavailable.
4.6 Extending to pose estimation
In §4.5, we have evaluated the performance of Algorithms 1–5 for orientation estimation. The estimation methods presented in §4.1–§4.3 can also be used to estimate the sensor’s pose using the state space model (3.74). Complementary filtering is predominantly used for orientation estimation and will therefore not be considered in this section.
The pose estimation problem can be written as a smoothing optimization problem as
[TABLE]
with and
[TABLE]
In this section, we will discuss some details about the workings of the pose estimation algorithm using this model. We will not go through a complete derivation of the four algorithms. However, the adaptations that are needed to use Algorithms 1–4 for pose estimation can be found in Appendix B.
An important observation is that and in (4.73d) and (4.73e) depend on the orientation . Because of this, the position, velocity and orientation states are coupled. The position measurements therefore do not only provide information about the position and velocity, but also about the orientation of the sensor. This is the reason why it is no longer essential to include magnetometer data and to assume that the acceleration is approximately zero. However, the accuracy of the orientation estimates depends on the movements of the sensor. This will be illustrated below. For this, we simulate 400 samples of inertial and position measurements for a non-rotating sensor with noise levels
[TABLE]
We consider four different sensor motions. The results in this section are based on the solution to the smoothing optimization problem (4.6). First, we simulate data assuming that the sensor is stationary. For this case, the position measurements provide information about the inclination of the sensor, but not about its heading. This is illustrated in Example 4.6.
Example 4.6** (Pose estimation for a stationary sensor)**
We estimate the pose of a stationary sensor using simulated data and a smoothing algorithm that solves (4.6) as described in §4.1. The orientation error for a specific noise realization is depicted in Figure 4.15(a). The inclination errors can be seen to be small, while the heading estimates drift.
**
Next, in Example 4.7, we consider the case where the sensor has a constant linear acceleration. For this case, a drift in the orientation estimates can be seen in the direction that is orthogonal to the direction of the accelerometer measurements.
Example 4.7** (Pose estimation for a sensor with constant linear acceleration)**
We estimate the pose of a sensor with an acceleration of in the -direction using simulated data and obtain smoothed estimates by solving (4.6). The orientation error for a specific noise realization is depicted in Figure 4.15(b). Again, a drift can be seen in the orientation estimates. This drift is no longer only in the heading direction, but there is also a small drift on the roll angle.
**
Finally, in Example 4.8 we consider the case of a time-varying linear acceleration. Based on simulated data, we show that accurate heading estimates can be obtained for this case. Furthermore, we show that the larger the acceleration, the more accurate the heading estimates will be.
Example 4.8** (Pose estimation for a sensor with time-varying linear acceleration)**
We estimate the pose of a sensor with an acceleration in the -direction of using simulated data and compute smoothed estimates by solving (4.6). The orientation error for a specific noise realization is depicted in Figure 4.15(c). Furthermore, we simulate data with . The orientation errors based on this data can be found in Figure 4.15(d). As can be seen, for these cases, it is possible obtain reliable heading estimates using the state space model (3.74). The larger the acceleration, the more accurate the heading estimates.
**
In general, it can be concluded that it is possible to estimate position and orientation using the state space model (3.74). Except in the cases of constant or zero acceleration, it is possible to obtain drift-free orientation estimates. The heading accuracy depends on the amount of acceleration. This is summarized in Table 4.5 where the mean RMSE of the state estimates over 100 Monte Carlo simulations is shown. Four cases were considered, inspired by Examples 4.6–4.8.
Chapter 5 Calibration
In Chapter 4, we assumed that the sensors were properly calibrated. In practice, however, there are often calibration parameters to be taken into account. Examples of calibration parameters are the inertial sensor biases discussed in Chapter 2. Furthermore, calibration is specifically of concern when combining the inertial data with other sensors. In these cases, it is important that the inertial sensor axes and the axes of the additional sensors are aligned. Examples include using inertial sensors in combination with magnetometers [75, 126, 15] and with cameras [60, 83, 98].
In this chapter we will introduce several useful calibration methods. In §5.1 we explain how calibration parameters can be included as unknowns in the smoothing and filtering algorithms from §4.1–§4.3. This results in MAP estimates of the parameters. In §5.2 we instead focus on obtaining maximum likelihood (ML) estimates of the parameters. In §5.3, the workings of the calibration algorithms are illustrated by considering the gyroscope bias to be unknown in the orientation estimation problem. Finally, in §5.4, we discuss the topic of identifiability. Parameters are said to be identifiable if they can be estimated from the available data.
5.1 Maximum a posteriori calibration
As discussed in §3.1, unknown parameters can be estimated in the smoothing problem (3.1) as
[TABLE]
with
[TABLE]
Recall that a discussion on the choice of the prior of the parameters and the states can be found in §3.6.
Within the filtering context we typically model the parameters as slowly time-varying states. These can be estimated by solving
[TABLE]
where
[TABLE]
Note that compared to §3.1, in (5.4) we do not consider the parameters to be part of but instead represent them explicitly. A prior on the parameters at has to be included as well as a dynamic model of the parameters.
Both the formulations (5.1) and (5.3) compute MAP estimates of the parameters. Algorithms 1–4 presented in Chapter 4 can straightforwardly be extended to also estimate these unknown parameters or . This is illustrated in Example 5.1 for the case of orientation estimation in the presence of an unknown gyroscope bias. Note that Algorithm 5 can also be extended to estimate an unknown gyroscope bias. We will, however, not consider this. Instead, we refer the reader to [90].
Example 5.1** (MAP estimates of the gyroscope bias)**
It is possible to estimate an unknown gyroscope bias in the state space model (3.75). For this, the dynamic model (3.75a) in the smoothing problem described in §4.1 is assumed to include a constant gyroscope bias as
[TABLE]
The smoothing algorithm presented in §4.1 can be extended to also estimate . Furthermore, the filtering algorithms presented in §4.2 and §4.3 can be extended to estimate for . Only minor changes to the algorithms presented in these sections are needed. These mainly concern including derivatives with respect to the additional unknowns or . Explicit expressions for these can be found in Appendix C.
**
5.2 Maximum likelihood calibration
Alternatively, it is possible to obtain ML estimates of the parameters as
[TABLE]
Here, and is referred to as the likelihood function. It is defined as , where are random variables and are a particular realization of . Using conditional probabilities and the fact that the logarithm is a monotonic function we have the following equivalent formulation of (5.6),
[TABLE]
where we use the convention that . The ML estimator (5.7) enjoys well-understood theoretical properties including strong consistency, asymptotic normality, and asymptotic efficiency [82].
Due to the nonlinear nature of the orientation parametrization, our estimation problems are nonlinear, implying that there is no closed form solution available for the one step ahead predictor in (5.7). However, similar to the filtering approaches from Chapter 4, it is possible to approximate the one step ahead predictor according to
[TABLE]
where and are defined in (4.39) and (4.38), respectively. Inserting (5.8) into (5.7) and neglecting all constants not depending on results in the following optimization problem,
[TABLE]
Unlike the optimization problems discussed so far, it is not straightforward to obtain an analytical expression of the gradient of (5.9). This is because it is defined recursively through the filtering update equations. In [3] and [134], different approaches to derive analytical expressions for objective functions of the same type as (5.9) are provided. They, however, consider the case of a linear model. Some methods for obtaining ML estimates of parameters in nonlinear models are explained in the tutorial by [131].
Instead of deriving analytical expressions for the gradient of (5.9), it is also possible to compute a numerical approximation of the gradient. Numerical gradients can be used in a number of different optimization algorithms, such as the Broyden-Fletcher-Goldfarb-Shanno (BFGS) method, see e.g. [103]. Similar to the Gauss-Newton method, in the BFGS method, the parameters are iteratively updated until convergence. However, instead of using the Hessian approximation (4.8), BFGS iteratively estimates the Hessian using information from previous iterations. Hence, solving (5.9) using BFGS with numerical gradients, requires running at least filtering algorithms for each iteration. These are required to evaluate the objective function and to compute the numerical gradients. More evaluations can be necessary to compute a step length, see also §4.1.
Example 5.2** (ML estimates of the gyroscope bias)**
To obtain ML estimates of the gyroscope bias, we run the EKF with orientation deviation states from Algorithm 4 to obtain and for a given value of . This allows us to evaluate the objective function in (5.9). To compute , the optimization problem (5.9) is solved iteratively using BFGS.
**
5.3 Orientation estimation with an unknown gyroscope bias
We estimate the gyroscope bias in simulated data as described in §4.5 and illustrated in Figure 4.4. Compared to the data presented in §4.5, however, a constant gyroscope bias to be estimated is added. Using Monte Carlo simulations of this data, we illustrate a few specific features of the different ways to estimate the bias.
First, we focus on obtaining MAP estimates of the bias using the smoothing and filtering approaches as described in §5.1. We simulate the measurement noise as described in §4.5 and simulate the gyroscope bias as
[TABLE]
Note that is a factor 10 larger than the value discussed in §3.6 to clearly illustrate the effect of the presence of a gyroscope bias. The priors and in the smoothing and filtering algorithms are set equal to the distribution in (5.10). The covariance of the random walk model (5.5c) is set as with . This small value ensures that after convergence, the bias estimate is quite constant. The resulting mean RMSEs of the orientation over 100 Monte Carlo simulations are summarized in Table 5.1. Since the filtering algorithms typically have similar characteristics as discussed in §4.5, we only consider the EKF with orientation deviation states here. Comparing these results to the ones presented in Table 4.3, the RMSEs of the smoothing optimization algorithm are almost the same as when there was no gyroscope bias present. However, the filtering results are worse. This is because the bias needs some time to be properly estimated. This is illustrated in Figure 5.1 where the gyroscope bias estimates and their uncertainties are shown for the filtering algorithm.
A major difference between the MAP and the ML approaches, is that the MAP takes into account a prior on the gyroscope bias. We analyze the effect of this prior using Monte Carlo simulations, simulating the gyroscope bias to be . We study the estimated gyroscope biases using ML estimation, and using MAP estimation by including the gyroscope bias as an unknown in the smoothing algorithm. The smoothing algorithm assumes two different priors on the gyroscope bias . In the first case, the prior on the gyroscope bias can well describe the data (). In the other case, the prior is too tight (). The mean and standard deviations for the gyroscope bias estimates are summarized in Table 5.3. As can be seen, when the prior is chosen appropriately, the ML and MAP estimates are comparable. If the prior is too tight, the MAP estimates can be seen to be biased towards zero.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] S. Adler, S. Schmitt, K. Wolter, and M. Kyas. A survey of experimental evaluation in indoor localization research. In Proceedings of the IEEE International Conference on Indoor Positioning and Indoor Navigation (IPIN) , pages 1–10, Banff, Alberta, Canada, October 2015.
- 2[2] D. W. Allan. Statistics of atomic frequency standards. Proceedings of the IEEE , 54(2):221–230, 1966.
- 3[3] K. J. Åström. Maximum likelihood and prediction error methods. Automatica , 16(5):551–574, 1980.
- 4[4] A. Avci, S. Bosch, M. Marin-Perianu, R. Marin-Perianu, and P. Havinga. Activity recognition using inertial sensing for healthcare, wellbeing and sports applications: A survey. In Proceedings of the 23rd International Conference on Architecture of Computing Systems (ARCS) , pages 1–10, Hannover, Germany, February 2010.
- 5[5] T. Bailey and H. Durrant-Whyte. Simultaneous localization and mapping (SLAM): Part II. IEEE Robotics & Automation Magazine , 13(3):108–117, 2006.
- 6[6] M. J. Baker. Euclidean Space – Mathematics and computing. http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrix To Quaternion/ , 2016. Accessed on October 4.
- 7[7] N. Barbour and G. Schmidt. Inertial sensor technology trends. IEEE Sensors Journal , 1(4):332–339, 2001.
- 8[8] T. D. Barfoot. State Estimation for Robotics . Cambridge University Press, 2017.
