Next Article in Journal
Synthesis of Nanocrystalline SnOx (x = 1–2) Thin Film Using a Chemical Bath Deposition Method with Improved Deposition Time, Temperature and pH
Previous Article in Journal
Efficient Phase Unwrapping Architecture for Digital Holographic Microscopy
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Kalman-Filter-Based Orientation Determination Using Inertial/Magnetic Sensors: Observability Analysis and Performance Evaluation

The BioRobotics Institute, Scuola Superiore Sant’Anna, Piazza Martiri della Libertà 33, 56124 Pisa, Italy
Sensors 2011, 11(10), 9182-9206; https://doi.org/10.3390/s111009182
Submission received: 4 August 2011 / Revised: 21 September 2011 / Accepted: 23 September 2011 / Published: 27 September 2011
(This article belongs to the Section Physical Sensors)

Abstract

: In this paper we present a quaternion-based Extended Kalman Filter (EKF) for estimating the three-dimensional orientation of a rigid body. The EKF exploits the measurements from an Inertial Measurement Unit (IMU) that is integrated with a tri-axial magnetic sensor. Magnetic disturbances and gyro bias errors are modeled and compensated by including them in the filter state vector. We employ the observability rank criterion based on Lie derivatives to verify the conditions under which the nonlinear system that describes the process of motion tracking by the IMU is observable, namely it may provide sufficient information for performing the estimation task with bounded estimation errors. The observability conditions are that the magnetic field, perturbed by first-order Gauss-Markov magnetic variations, and the gravity vector are not collinear and that the IMU is subject to some angular motions. Computer simulations and experimental testing are presented to evaluate the algorithm performance, including when the observability conditions are critical.

1. Introduction

Accurate tracking of the orientation of rigid bodies moving in a three-dimensional (3D) space is important in several applications, including navigation of man-made vehicles, robotics, machine interaction and, of main interest to us in this paper, ambulatory human motion analysis. Several approaches are available to create trackers that determine orientation based on measurements from, e.g., acoustic, mechanical, optical, inertial and magnetic sensors [1]. One popular approach is based on the principles behind inertial/magnetic sensing.

A state-of-the-art Inertial Measurement Unit (IMU) consists of a tri-axial accelerometer, a tri-axial gyro, and a tri-axial magnetic sensor, henceforth referred to as an integrated IMU. The 3D orientation can be computed by time-integrating the gyro output from known initial conditions. Due to low-frequency gyro bias drift this operation is subject to errors that tend to grow unbounded over time. On the other hand, gyros may help achieving accurate orientation estimates for highly dynamic motions. The initial conditions needed for gyro integration are usually given by the accelerometer used in combination with the magnetic sensor. The accelerometer can provide drift-free inclination estimates by sensing the gravity vector; the magnetic sensor, which would sense the earth magnetic field vector, helps providing drift-free heading estimates. Serious limitations affect their operation when applied to ambulatory human motion tracking [24]. First, the difficulty of correctly interpreting the acceleration signals exists, when the component due to the gravity field (vertical reference) coexists with the component related to the body motion [5]. Second, ferromagnetic materials nearby the IMU are critically disturbing sources when the magnetic sensor output is used to build the horizontal reference for heading estimation [6,7].

Accurate estimates of the three-dimensional (3D) orientation of a rigid body by inertial/magnetic sensing require that the complementary properties of gyros, accelerometers and magnetic sensors are exploited [8]. Sensor fusion techniques are needed in order that the aiding sensors (accelerometer and magnetic sensor) help mitigating the low-frequency gyro bias errors, while, in turn, the signals from the aiding sensors, which are prone to relatively high-frequency errors, are smoothed using gyro data. Different approaches are available to design sensor fusion algorithms [8]. In [9] a simple time-domain first-order complementary filter is designed: it performs low-pass filtering on the signals from the accelerometer-magnetic sensor pair and high-pass filtering on the signals from the gyro. Another possible approach is represented by the use of deterministic single-frame estimation techniques [8]. They all are based on the concept of vector matching, which requires, in principle, the measurements of constant reference vectors (e.g., gravity and the Earth’s magnetic field) [10]. Mostly, these techniques have been employed in gyro-free systems for tracking static or slowly moving bodies in environments containing only small magnetic sources [3,4,11]. In their original formulation, they are unable to provide sequential estimates of a time-varying orientation and of other parameters than the orientation, such as sensor biases [12]. In contrast with the previous approaches, which bypass at all statistical modeling in the estimator design, extended stochastic linear estimation techniques use a model for predicting aspects of the time behavior of a system (dynamic model) and a model of the sensor measurements (measurement model). There appears to be wide consensus that the Kalman filter is “perhaps the perfect tool for elegantly combining multisensory fusion, filtering, and motion prediction in a single fast and accurate framework” [13]. Since orientation determination is intrinsically a non-linear problem, Extended Kalman filters (EKFs) are the tools to work with [14].

In [15] an indirect-state formulation of the EKF for an inertial head-tracker is described; it operates on errors in the primary variables of Euler angles, angular velocity and gyro bias. The indirect-state formulation is chosen to provide fast response, i.e., low latency due to computational demands of the algorithm. However, no expedient is provided to guard against the effects of body accelerations and magnetic disturbances. Very interesting is the work in [16], where the authors use one tri-axial accelerometer to measure inclination during dynamic tasks without requiring additional sensors, be they gyros or magnetic sensors. A KF-based algorithm is designed to estimate the different acceleration components, namely gravity and inertial acceleration, plus the accelerometer bias, based on few reasonable assumptions about the properties of human motion. In a later paper by the same group, an integrated IMU is used to estimate the full orientation matrix [17]. The KF for body segment orientation in [16] is thus extended with models of gyro and magnetic sensor biases, in the attempt to prevent heading drift and to compensate magnetic disturbances. A direct-state EKF is developed in [18], where the quaternion and the angular velocity are included in the vector state. Dynamic models of human limb motion in terms of first-order Gauss-Markov stochastic processes are used in developing the filter equations. The linear measurement equations include the components related to gyro measurements and components that are formulated in the quaternion space; this latter part of the measurement equations uses a deterministic single-frame estimation technique, i.e., a Gaussian Newton optimizer, that computes the corresponding quaternion for each set of accelerometer and magnetic sensor measurements. No compensation of sensor errors or protection against magnetic effects is provided in this work. A direct-state quaternion-based formulation of the EKF is developed in [2], where angular velocity is considered a control input and active compensation (gyro bias and magnetic effects) is achieved by using state-augmentation techniques. Since the angular velocity is not part of the state vector, models of human motion dynamics are not necessary in the development of the filter equations [19]. The non-linear measurement equations are formulated by rotating the reference vectors in the body-frame using the estimated orientation matrix. The EKF is made adaptive by introducing vector selection schemes that work on the measured gravity and magnetic field vectors [4,20,21]: the measurement noise variances are increased in value, thus giving more weight to the filter predictions, when variations are found between the measured acceleration and the gravity, or between the measured magnetic field and the earth magnetic field.

The use of state-augmentation techniques is the preferred approach within the KF framework to take sensor errors and magnetic disturbances into account. At one point or another, however, the dimension of the state vector may create problems of system observability. Issues of system observability have sometimes been addressed, e.g., [21,22], without a formal analysis being carried out. A primary contribution of this paper is to elucidate under which conditions a KF-based algorithm for orientation determination using an integrated IMU is observable; in other words, the conditions when sufficient information is available for estimating a state vector that includes, in the present case, the quaternion of rotation, the magnetic variation superimposed to the magnetic reference vector and the gyro bias vector. To the best of our knowledge, this is the first time an observability analysis based on tools from the nonlinear control theory, namely the Lie derivatives, is performed in this regard. We take inspiration from the work described in [23], where the observability analysis is applied to a problem of IMU-camera calibration. The observability conditions are that the magnetic field vector, perturbed by first-order Gauss-Markov magnetic variations, and the gravity vector are not collinear, and that the IMU is subject to some angular motions. Computer simulations and experimental testing are presented to evaluate the algorithm performance, including when the observability conditions are critical.

2. Theoretical Background

2.1. Using Quaternions to Represent the Orientation

The 3D orientation of a rigid body is represented using two right-handed coordinate systems: the earth-fixed frame E = {e1 e2 e3} and the body-fixed frame B = { e 1 e 2 e 3 }. In applications of motion tracking the motion of the E-frame due to the earth’s rotation is usually negligible; the E-frame is therefore an inertial frame. In the following, we also assume that the sensitivity axes of the IMU sensors are aligned with the axes of the B-frame, and the physical location of the accelerometer is where the origin of the B-frame is located, i.e., no centripetal acceleration effects exist.

An arbitrary vector x in the 3D space can be represented in terms of the coordinates (or components) with respect to either of the frames:

x = C x .

The subscripts E, B denote in which frame the vector x is represented. The columns of the orientation matrix C are the representations of the ei, i = 1,…,3 with respect to B, while its rows are the representations of the e i, i = 1,..., 3 with respect to E. The orientation matrix and its transpose allow moving vector representations from (to) E to (from) B, respectively. The orientation matrix is a 3 × 3 orthogonal matrix with unit determinant, which belongs to the 3D special orthogonal group SO(3) of rotation matrices. The quaternion is a more parsimonious representation of orientation than the orientation matrix [24]; it is derived by formulating the orientation matrix as a homogeneous quadratic function of the Euler symmetric parameters qi, i = 1,...,4:

C ( q ¯ ) = I 3 × 3 2 q 4   [ q × ] + 2 [ q × ] 2 ,
where the operator:
[ q × ] = [ 0 q 3 q 2 q 3 0 q 1 q 2 q 1 0 ]
is the standard vector cross product and In×n is the n × n identity matrix. It is commonplace to refer to q as the vector part and to q4 as the scalar part of the quaternion q ¯ = [ q T     q 4 ] T :
q = [ q 1     q 2     q 3 ] T = sin ( θ / 2 ) n T ,     q 4 = cos ( θ / 2 ) .

Here, the axis and angle of rotation (n,θ) are another valid representation of the orientation, closely related to the rotation vector θ = θ n [24]. As implied by Equation (4), in order to represent a valid rotation the quaternion must comply with the normalization constraint:

| q ¯ | = i = 1 4 q i 2 = | q | 2 + q 4 2 = 1.

In the quaternion space the multiplication between two generic quaternions and ′ is defined as follows:

q ¯ q ¯ = [ ( q 4 q + q 4 q + [ q × ] q ) T     q 4 q 4 q q ] T ,
where the symbol · denotes the standard vector dot product.

Given the vector quaternion x ¯ = [ x T     0 ] T, namely a quaternion with null scalar part associated with the vector x, the vector quaternion:

x ¯ = [ x T   0 ] T = q ¯ 1 x ¯ q ¯
is associated with the vector x, rotated about the n-axis through an angle θ, see Equation (4). The inverse quaternion −1 in Equation (7) is given by:
q ¯ 1 q ¯ = [ 0 T     1 ] T         q ¯ 1 = [ q T     q 4 ] | q ¯ | 2 .

When the unit norm constraint Equation (6) is enforced, a quaternion is left with the three degrees of freedom consistent with the SO(3) dimensionality. The four-component unit quaternion has thus the lowest dimension of any globally non-singular orientation parameterization. However, the representation is redundant, since the quaternion − represents the same rotation as .

2.2. Kinematic Equations

These describe the relations between the temporal derivatives of an orientation representation such as the quaternion and the angular velocity ω, namely the angular velocity of the -frame relative to the -frame, as it is measured by a tri-axial gyro fixed to the body:

d dt q ¯ = 1 2 q ¯   [ ω T     0 ] T = 1 2 [ [ ω × ] ω ω T 0 ] q ¯ = Ω ( ω ) q ¯ ,

In the following the time argument will always be dropped to make the notation a little easier. Ω(ωB) is a 4 × 4 skew symmetric matrix. The kinematic Equation (9) do not involve nonlinear computationally expensive trigonometric functions and are not affected by the presence of singularity points, in contrast to the formulation using representations of orientation such as the Euler angles.

The discrete-time equivalent of Equation (9) is given by:

q ¯ ( t k ) = Φ q ¯ ( t k 1 ) ,
with:
Φ = cos ( | u | / 2 ) I 4 × 4 + sin ( | u | / 2 ) | u | / 2 Ω ( ω ( t k 1 ) ) .

If the angular velocity is assumed constant in the sampling interval Ts = tktk−1, we have:

u = t k 1 t k ω ( τ ) d τ ω ( t k 1 ) T s .

2.3. Observability Analysis

A system is observable when, for any possible sequence of state and control input vectors, the current state can be inferred by measuring the output variables. In other words, the output variables contain all the information needed to determine the behavior of the system. For continuous time-varying nonlinear systems the observability analysis, namely the analysis needed to verify whether a system is observable or not, requires the development of specific tools [25].

Consider a nonlinear system Σ described, in state space form, by a set of equations of the following form:

{ d dt x = f   ( x , u ) = f 0   ( x ) + i = 1 l f i   ( x ) u i y = h ( x )

The time argument in x, u, and y is dropped. x = [x1, x2,…, xn]TX ⊂ ℝn, u = [u1, u2,…, ul,]T ∈ ℝl, y = [y1, y2,…, ym]T ∈ ℝm are, respectively, the state vector, the control input vector and the measurement vector. The process function f is input-linear, i.e., it can be decomposed into a sum of independent functions fi, each one corresponding to a different component ui of the control input vector u. The process function f and the measurement function h are assumed smooth in their arguments, namely they possess continuous partial derivatives of any order.

A suitable tool for studying the observability properties of Σ is the observability rank condition based on the Lie derivatives of the measurement functions hk(x), k = 1,...,m. The zero-order Lie derivative of a scalar function is, by definition, the function itself, 0 hk(x) = hk(x), k = 1,…,m. The first-order Lie derivative of the measurement function hk(x) with respect to the component fi of the process function f is given by:

f i 1 h k   ( x ) = h k   ( x ) f i   ( x ) = j = 1 n h k x j ( x )   f ij   ( x ) ,     i = 0 , ... , l ,
where ∇ denotes the gradient operator. Since the first-order Lie derivative is a scalar function itself, the second-order Lie derivative of hk(x) with respect to fi is defined in a similar fashion to (14):
f i 2 h k   ( x ) = f i 1 h k   ( x ) f i   ( x ) .

The definition of higher-order and mixed Lie derivatives with respect to different components fi, fj of the process function f follows the same route as above. For instance, the second-order Lie derivatives with respect to fj and fi, given their first-order derivatives with respect to fi, are given by

f j f i 2 h k   ( x ) = f i 1 h k   ( x ) f j   ( x ) ,      i , j = 0 , ... , l ;       k = 1 , ... , m .

The observability matrix is constructed by stacking the gradients of the Lie derivatives:

O ( x ) = { f i f j s   h k   ( x ) | i , j = 0 , ... , l ;     k = 1 , ... , m ;     s } .

The number of columns of the observability matrix is equal to the dimension n of the state vector x, while the number of rows may grow unbounded with the order of the computed Lie derivatives. Since the input and measurement functions are smooth, the number of rows of O can be thus virtually infinite.

For nonlinear systems the observability property is related to the concept of indistinguishability of states with respect to the control inputs. Two states x1 and x2 are said indistinguishable when, for every admissible control input, the system produces the same outputs in a given interval of time when starting from either x1 or x2. The system Σ is weakly observable at the state x0 if for every open neighborhood U of x0, x0 can be distinguished from states in U(x0), or weakly observable if it is so for every xX. The system Σ is locally weakly observable at the state x0 if x0 can be distinguished from states in an open neighborhood V(x0) ⊂ U(x0) when admissible control inputs lead to paths within U(x0), or locally weakly observable if it is so for every x in X. A sufficient condition for the system Σ to be locally weakly observable at x0 is that O(x0) is full rank, namely the gradients of the Lie derivatives of the measurement functions computed at x = x0 must span the state space X. If it is so for every xX the system Σ is locally weakly observable. It should be noted that the full-rank condition of the observability matrix O(x) is only sufficient to say that the system is locally weakly observable. In the case that the observability matrix O(x) is rank-deficient, the system’s behavior has to be verified through computer simulations and experimental testing.

3. Method

3.1. Sensor Modeling

In response to the time-variant body angular velocity ωbody, acceleration (constant gravity g and time-variant body acceleration abody), and local magnetic field (constant earth’s magnetic field h and any time-variant magnetic variation hb acting nearby the sensor) the measured outputs of the gyro, the accelerometer and the magnetic sensor from an integrated IMU can be written as follows:

{ ω m = g K ω body + g b + g v a m = a K C ( g + a body ) + a b + a v h m = m K C ( h + h b ) + m b + m v ,
gK, aK, mK are the matrices of the scale factors (ideally, they are equal to I3×3); gb, ab, mb are the bias vectors (ideally, they are null); gv, av, mv are assumed independent white Gaussian measurement noises, with null mean and covariance matrix Σ g = σ g 2 I 3 × 3, Σ a = σ a 2 I 3 × 3 and Σ m = σ m 2 I 3 × 3. Equation (18) is a simplified model that does not account for additional error sources, such as cross-axis sensitivity, gyro g-sensitivity, nonlinearity, hysteresis and misalignment [26]. In the context of MEMS sensors, the component in the gyro output due to the Earth’s rotation can be neglected as compared to sensor errors, and therefore it does not appear in Equation (18).

The scale factor and bias of inertial and magnetic sensors are functions of environmental conditions, in particular ambient temperature. Across the thermal variations typically encountered in practice, thermal effects on accelerometers are of relatively lower quantitative relevance than on gyros, and they are usually negligible on magnetic sensors. Moreover, scale factor drifts of inertial and magnetic sensors usually affect the accuracy of the measurement process to a much lesser extent than the bias drifts of these sensors, in particular gyros. Scale factor and bias errors of accelerometers can be compensated on time scales up to few hours, using the procedure described in [26]; the procedure described in [27] can be used to calibrate scale factors and hard iron offsets mb, on similar time scales.

A more serious problem concerns the bias errors of gyros and how they develop over time. This problem is well received in the literature, where orientation estimators are oftentimes developed with built-in devices for gyro-bias compensation. A random-walk vector random process with statistically independent components is widely used for carrying the compensation task in a Kalman filtering framework [28]:

d dt g b = w g ,
where wg is white Gaussian noise, with null mean and covariance matrix b Σ g = b σ g 2 I 3 × 3. We consider the implementation of these devices essential for a proper operation of the filter, especially when the opportunity to perform on-line bias capture are precluded by the nature of the tracked motions [29].

For slowly moving bodies in magnetically clean environments, gyro-free orientation determination systems have been developed with mixed success [3,11]. In these systems a further simplification is made in the sensor model Equation (18), where the only acceleration measured by the accelerometer is gravity. Henceforth, we make the simplifying assumption that abody0.

3.2. Modeling the Magnetic Variation

A magnetic sensor measures the Earth’s magnetic field plus any other magnetic field superimposed to it. For the purpose of orientation determination, an accurately known homogeneous magnetic field in the environment surrounding the tracked body is needed as the horizontal reference for heading estimation. Especially indoors, magnetic homogeneity is difficult to achieve, due to construction iron in floors, walls and ceilings, or to various equipment. The magnetic distortions occur in both the horizontal and vertical plane [6,7]. Suppose that, albeit not homogeneous, the magnetic field existing in a given region of space is at least time-invariant. In this case, an interesting possibility to deal with the problem of magnetic distortions would consist, in principle, of calibrating and mapping the measurement volume. Besides being complicated and time-consuming, this approach is also in contrast with the development of ambulatory sensor systems, whose prior knowledge of existence and location of disturbances cannot be taken for granted: for instance, current IMUs do not produce position information, which makes critical using the magnetic maps of the measurement volume.

IMUs are exposed to magnetic fields that can rapidly change in direction and magnitude, when they move relative to their surroundings in a magnetically non-homogeneous environment. These magnetic distortions, generically denoted with the term magnetic variation hb, can be expressed in the earth-fixed frame. In order to prevent heading drift, the orientation estimator has to be developed with a built-in device for compensation of magnetic variations. A first-order Gauss-Markov vector random process with statistically independent components is chosen to model the magnetic variation:

d dt h b = α   h b + w h ,
where α is a positive constant, and wh is white Gaussian noise, with null mean and covariance matrix b Σ h = b σ h 2   I 3 × 3. This model is the same considered in [17], and generalizes the random-walk model adopted in our previous research [2]. The random-walk model is obtained by Equation (20) by taking α = 0.

3.3. Filter Implementation

The main difficulty of using quaternion-based state vector components in an EKF lies in the formulation of the filter equations. For a review of these equations with a generic state-space model see [30]. The origin of the problem lies in the lack of independence of the four components of a quaternion, since they are related by the unit-norm constraint. Constraints imposed on the estimated state variables cannot be preserved by EKFs in their standard development [19]. A popular method to preserve the quaternion unit-norm property is to normalize the a posteriori estimate after the measurement update stage (“brute-force” approach). Even though it is neither elegant nor optimal [31], the “brute-force” approach is proven to work generally well [32]. The EKF developed in this paper enforces the unit-norm constraint by the “brute-force” approach [2].

Since the angular velocity is measured from a body-fixed tri-axial gyro, the kinematic equations of a rigid body can be used to obtain the orientation state [19]. Gyro data are treated as external inputs to the filter rather than as measurements, and gyro measurement noise and bias enter the filter as process noise rather than as measurement noise. An advantage of this choice is the reduction in the dimension of the state vector, which may lead to minimal-order, computationally efficient filter implementations.

An important feature of EKFs is the possibility they offer to estimate unknowns by state vector augmentation techniques. In this paper, we concentrate on the self-compensation of gyro bias and magnetic variation, both accounted for in the filter as additional state vector components.

The continuous-time system model combines (9)-(19)-(20) together:

{ d dt q ¯ = Ω ( ω ) q ¯ d dt h b = α   h b + w h d dt g b = w g .

The state vector in Equation (21) is x = [ q ¯ T h b T g b T ] T. The equations for propagating the state estimates in the model are obtained by applying the expectation operator to Equation (21). By rearranging the equations in a format suitable for computing the Lie derivatives [23], we obtain:

[ d dt q ¯ ^ d dt b ^ h d dt b ^ g ] = [ 1 2 Ξ ( q ¯ ^ ) b ^ g α   b ^ h 0 3 × 1 ] f 0 + [ 1 2 Ξ ( q ¯ ^ ) 0 3 × 1 0 3 × 1 ] f 1 ω m ,
where the angular velocity ω̂ = ωmg is treated as a control input, and the matrix Ξ() is given by:
Ξ ( q ¯ ) = [ q 4 I 3 × 3 + [ q × ] q T ] = [ q 4 q 3 q 2 q 3 q 4 q 1 q 2 q 1 q 4 q 1 q 2 q 3 ] = [ s ¯ 1 s ¯ 2 s ¯ 3 ]

In the following we drop the caret, which denotes the expectation of a random variable, to avoid unnecessary cluttering in the notation. The discrete-time model allows employing the sampled measurements of the IMU for state propagation:

q ¯ ( k ) [ h   b ( k ) g   b ( k ) ] x ( k ) = Φ ( k 1 ) [ exp ( α T s ) I 3 × 3 0 3 × 3 0 3 × 3 I 3 × 3 ] f ( k 1 ) q ¯ ( k 1 ) [ h b ( k 1 ) g b ( k 1 ) ] x ( k 1 ) q w ( k 1 ) [ h   w ( k 1 ) g w ( k 1 ) ] w ( k 1 )
where:
Φ ( k 1 ) = cos ( | ω ˜ ( k 1 ) | T s / 2 ) I 4 × 4 + sin ( | ω ˜ ( k 1 ) | T s / 2 ) | ω ˜ ( k 1 ) | T s / 2 Ω ( ω ˜ ( k 1 ) ) ω ˜ ( k 1 ) = ω m ( k 1 ) g b ( k 1 ) .

The process noise component qw(k − 1) describes how the gyro measurement noise enters the state model through a quaternion-dependent linear transformation, as follows:

q w ( k 1 ) = T s 2 Ξ   ( q ¯ ( k 1 ) ) g v ( k 1 )

The process noise components qw(k − 1), hw(k − 1), gw(k − 1) are assumed uncorrelated; hence, the process noise covariance matrix Q(k − 1) is shown to have the block-diagonal structure:

Q ( k 1 ) = [ σ g 2 ( T s / 2 ) 2 ( trace ( M o )   I 4 × 4 M o ) 0 3 × 3 0 3 × 3 0 3 × 3 σ h 2 1 exp ( 2 α   T s ) 2 α I 3 × 3 0 3 × 3 0 3 × 3 0 3 × 3 ( b σ g 2 T s ) I 3 × 3 ]
where:
M o = q ¯ ( k 1 ) q ¯ ( k 1 ) T + P q ( k 1 )
(k − 1) and Pq(k − 1) denote, respectively, the expectation and the covariance matrix of the quaternion component of the state vector [32].

Equation (18) is used to model the sensor measurements. Each reference vector component needed for vector matching is given a specific equation:

[ a m ( k ) h m ( k ) ] = [ C ( q ¯ ( k ) ) 0 3 × 3 0 3 × 3 C ( q ¯ ( k ) ) ] [ g h + h b ( k ) ] + [ a v ( k ) m v ( k ) ]
as done in [2]. The measurement equations are nonlinear, which forces to compute their Jacobian matrices when carrying out the linearization process implied by the EKF. They will be shown in the next Section, in connection with the problem of computing the Lie derivatives of the nonlinear system of Equation (22). The measurement noise covariance matrix can be expressed directly in terms of the statistics of the measurement noise affecting each sensor:
R ( k ) = [ σ a 2 I 3 × 3 0 0 σ m 2 I 3 × 3 ] .
No vector selection scheme is introduced in the filter developed in this paper [2].

The initialization procedure is carried out as follows: the processing of gyro data does not include the procedure of bias capture; an initialization error is thus introduced by setting the gyro bias component of the state vector to zero. The magnetic field is not taken from a magnetic field model, but is rather computed as follows. The aiding sensor measurements are averaged during the initial rest period (averaging time: 1s). Inclination is estimated by processing the acceleration average vector. The magnetic average vector is then projected in the horizontal plane using the estimated inclination, which allows estimating h in the earth-fixed frame. Finally, we apply the TRIAD method to the acceleration and magnetic average vectors, using the gravity vector g and the estimated value of h as reference vectors [3,33]. The initial quaternion and its covariance matrix are then computed.

3.4. Filter Observability

The observability test consists of demonstrating that the state space of the system with input-linear process function described by Equation (22) is spanned by the gradients of the Lie derivatives of the following measurement functions:

φ 1 ( x ) = C ( q ¯ )   ( g ) φ 2 ( x ) = C ( q ¯ )   ( h + h b ) φ 3 ( x ) = q ¯ T q ¯ 1

The measurement function φ3(x) is introduced to account for the quaternion normalization constraint [23]. For its relevance in performing the observability analysis, we introduce, for a generic vector p, the function:

ψ ( q ¯ ,   p ) = q ¯ C ( q ¯ )   p .

Using Equation (2) we obtain:

ψ ( q ¯ ,   p ) = [ 2 q 4 [ p × ] + 2 ( [ p × ] [ q × ] 2 [ q × ] [ p × ] )     2 [ q × ] p ]

Since the zero-order Lie derivatives are the measurement functions themselves, the gradients of the zero-order Lie derivatives are the Jacobian matrices of the measurement functions:

0 φ 1 ( x ) = [ ψ ( q ¯ , g ) 0 3 × 3 0 3 × 3 ] 0 φ 2 ( x ) = [ ψ ( q ¯ , h + h b ) C ( q ¯ ) 0 3 × 3 ] 0 φ 3 ( x ) = [ 2 q ¯ T 0 1 × 3 0 1 × 3 ]

The first-order Lie derivatives of φ1 and φ2 (with respect to f0) can be computed as:

f 0 1 φ 1 ( x ) = 0 φ 1 ( x ) f 0 = 1 2 ψ ( q ¯ , g ) Ξ ( q ¯ ) b g f 0 1 φ 2 ( x ) = 0 φ 2 ( x ) f 0 = 1 2 ψ ( q ¯ , h + h b ) Ξ ( q ¯ ) b g + C ( q ¯ ) ( α h b )

The gradients of the first-order Lie derivatives of φ1 and φ2 (with respect to f0) are then taken:

f 0 1 φ 1 ( x ) = [ X 1 0 3 × 3 1 2 ψ ( q ¯ , g ) Ξ ( q ¯ ) ] f 0 1 φ 2 ( x ) = [ X 2 X 2 1 2 ψ ( q ¯ , h + h b ) Ξ ( q ¯ ) ]

The next Lie derivative of interest is the first-order Lie derivative of φ2 with respect to f1:

f 1 1 φ 2 ( x ) = 0 φ 2 ( x ) f 1 = 1 2 ψ ( q ¯ , h + h b ) Ξ ( q ¯ )

The gradient of the first-order Lie derivative of φ2 with respect to f1 is obtained by expanding the Lie derivatives as column vectors. These column vectors are stacked together as follows:

f 1 1 φ 2 ( x ) = [ Γ ϒ 0 9 × 3 ] Γ = [ Γ 1 Γ 2 Γ 3 ] = 1 2 [ q ¯ ( ψ ( q ¯ , h + h b ) Ξ ( q ¯ ) e 1 ) q ¯ ( ψ ( q ¯ , h + h b ) Ξ ( q ¯ ) e 2 ) q ¯ ( ψ ( q ¯ , h + h b ) Ξ ( q ¯ ) e 3 ) ]     ϒ = [ ϒ 1 ϒ 2 ϒ 3 ] = 1 2 [ h b ( ψ ( q ¯ , h b ) Ξ ( q ¯ ) e 1 ) h b ( ψ ( q ¯ , h b ) Ξ ( q ¯ ) e 2 ) h b ( ψ ( q ¯ , h b ) Ξ ( q ¯ ) e 3 ) ]
where e1 = [1 0 0]T, e2 = [0 1 0]T, e3 = [0 0 1]T.

Finally, we obtain the 22 × 10 observability matrix O(x):

O ( x ) = [ 0 φ 1 ( x ) 0 φ 2 ( x ) f 0 φ 1 ( x ) f 0 φ 2 ( x ) f 1 φ 2 ( x ) 0 φ 3 ( x ) ] = [ C 6 × 7 0 6 × 3 D 6 × 7 A 6 × 3 B 10 × 7 0 10 × 3 ]
where the following matrices are introduced:
A = [ A 11 A 21 ] = [ 1 2 ψ ( q ¯ , g ) Ξ ( q ¯ ) 1 2 ψ ( q ¯ , h + h b ) Ξ ( q ¯ ) ]     B = [ Γ ϒ 2 q ¯ T 0 1 × 3 ] C = [ ψ ( q ¯ , g ) 0 3 × 3 ψ ( q ¯ , h + h b ) C ( q ¯ ) ]     D = [ X 1 0 3 × 3 X 2 X 3 ]

The salient steps of the observability proof are reported in Appendix A, where the matrices X1, X2, X3, and hence the matrix D, do not need to be computed explicitly. In short, the system of Equation (22) is certainly locally weakly observable when: (a) the magnetic field has components in the horizontal plane, which is necessary to have the horizontal reference for heading estimation; (b) at least one degree of rotational freedom is excited. Remind that the magnetic dip angle, also called magnetic inclination, is the angle the Earth’s magnetic field makes with the surface of the Earth; the observability condition (a) fails when the dip angle is ±90° (e.g., close to the Poles). Running the estimation algorithm during periods when the observability is not guaranteed—when the magnetic dip angle is close to ±90° or the IMU is in quasi-static conditions—is likely to degrade seriously the state estimation accuracy. This fact has to be verified by assessing the system’s behavior by computer simulations and experimental testing.

3.5. Filter Assessment

The performance metrics are based on computing the error quaternion Δ q ¯ = q ¯ t 1 q ¯, where t and are the true and the estimated quaternion, respectively. In the present context the term true implies the use of synthetic or experimental motion data to carry out the test procedure. An obvious advantage of working with synthetic signals is that the errors incurred in estimating the state vector components can be compared with the bounds that are predicted by the error covariance matrix produced by the EKF. This is a useful feature to assess the filter convergence and to diagnose a number of potential problems arising in its numerical implementation. Experimental motion data can be captured, e.g., from an optoelectronic motion tracker, so as to define the ground truth reference for filter assessment.

The error quaternion represents the rotation that brings the estimated body frame onto the true body frame. Its scalar component can be used to derive the orientation error Δθ, according to the equation Δθ = 2arccos(Δq4) The performance metrics are expressed in terms of the root-mean-square-value of the orientation error (RMSEq), averaged over the number of either the Monte Carlo simulation runs or the experimental trials available. Alternatively, a set of estimated and reference Euler angles (roll, pitch, yaw or heading) can be computed from t and using standard conversion formulas, and the filter performance can be summarized by presenting the RMSEs of the Euler angles, again averaged over the number of either the Monte Carlo simulation runs or the experimental trials available. Although the calculations for orientation are not performed using Euler angles, the results can be presented in this way for better interpretation.

3.6. Computer Simulations

The body-fixed frame has a fixed origin, and it is aligned with the Earth-fixed frame at the initial time of each simulation trial. Our choice of the earth-fixed frame follows the North-East-Down (NED) convention: the gravity vector is g = [0 0 g]T (g = 9.81 m/s2), and the earth magnetic field is h = [hx 0 hz]T (hx = 0.26 Gauss; hz = 0.37 Gauss). The simulated field strength is approximately 0.45 Gauss, with a magnetic dip angle δ ≈ 55°, situations typical of our latitudes. A magnetically perturbed environment is simulated by adding h with the output of a routine that generates samples from a Gauss-Markov vector random process with statistically independent components.

The angular velocity time functions are given as input to the simulation program. The true quaternion time functions are obtained by time integrating the kinematic Equation (9) at the sampling frequency of fs = 4 kHz, which is high enough to make integration errors negligible; the quaternion time functions are then time-decimated down to fs = 100 Hz (the sampling frequency used in many popular orientation trackers). Two distinct conditions are tested: static conditions, in which case the angular velocity is null, and then the IMU does not change the initial orientation; dynamic conditions, i.e., following an initial period of rest, a pure sinusoidal rotation around the vertical axis is simulated (amplitude: 100°/s; frequency: 1 Hz). In either case simulation trials last 10 min.

The magnetic field and the gravity vector can be expressed in the body-frame using the computed quaternions. White Gaussian noise is then injected into the body-referenced sensor time functions to simulate the effect of specified amounts of measurement noise: σa = 1 − 5 mg; σh = 1 mGauss. In dynamic conditions the value of σa is chosen relatively high as compared with values measured during on-bench calibration tests of MEMS accelerometers, which are less than 1 mg; this is to account for the minute motions that affect on-body IMUs, even when the body is quasi-static. No scale factor or bias errors are considered for the IMU sensors, with the exception of the gyro: the gyro time functions are corrupted by addition of a Gaussian white measurement noise component with standard deviation σg = 0.4°/s and a fixed offset (e.g., bg = [1 − 0.5 0.75]T °/s).

The different treatment of IMU sensors is motivated by the weight an uncompensated gyro bias has on the error budget of an inertial orientation sensor and consequently by our desire to always enable the compensation of gyro bias in our filter. The following two EKF implementations are considered: EKF-MA and EKF-MB, which differ in enabling the compensation of magnetic disturbances or not; in order to disable the compensation of magnetic disturbances, bσh = 0 and α = 0 are plugged in Equation (27). The two methods are tested in static and dynamic conditions, when either the magnetic variation is markovian, namely it follows the Gauss-Markov model of Equation (20) (magnetically perturbed environment, MPE), or when the magnetic variation is null (magnetically clean environment, MCE). For each combination of method and condition, N = 10 Monte Carlo runs are performed, and the values of orientation RMSEq are reported (mean ± standard deviation, SD). Another set of simulations is carried for different values of the magnetic inclination, from 55° to 90° (dynamic conditions—method MA). The aim is to verify the filter behavior in difficult observability conditions. The filter parameter setting is given in Table 1.

3.7. Experimental Validation

The MTx orientation tracker by Xsens Technologies B.V. (Enschede, The Netherlands) is used for carrying out the experimental validation. The raw sensor data are delivered through a USB interface to the host computer at a rate of 100 Hz, together with the Euler angle time functions estimated by the proprietary EKF, henceforth called the Xsens-EKF. The IMU sensors are calibrated before starting the experimental session as described in [26,27]; by contrast, no bias capture is considered for the gyro. The initial orientation of the sensor frame relative to the marker frame is found by taking data during the rest period when the IMU is still.

The tests for validation in static and dynamic conditions are carried out within one of our lab rooms. The static test, whose duration is 10 min, consists of leaving the IMU still on a table that is placed far from current wires, computer appliances, and ferromagnetic materials. A magnetic disturbance is induced at the time when a cell phone is placed close to the IMU; the cell phone is left in place for a while, then it is removed, so as to recover the initial magnetic field. The test for validation in dynamic conditions is performed as follows. The IMU is fastened to a 50 cm 50 cm wooden plate using double-side adhesive tape. The plate is raised by hand slightly over the table and then it is freely moved around; toward the end of the trial, which lasts about 137 s, the plate is replaced approximately in the same pose. The working volume visited by the plate during the motion trial is 100 cm × 50 cm × 60 cm. The plate orientation is recorded using a six-camera Vicon optical motion capturing system with a sampling rate of fs = 100 Hz. The IMU and Vicon data streams are electronically time-synchronized. The Vicon system measures the position of four reflective markers (diameter: 14 mm) arranged at the corners of the plate to form a square with side 45 cm. The accuracy of the marker frame is determined by analyzing the relative motion of two markers: the RMS of the Vicon orientation error Δθ is assumed in the same order as the RMS distance variation divided by the distance between two markers (Δθ < 0.5°). The RMSEs of the Euler angles and the RMSEq of the orientation are presented using the Euler angles time functions computed by the Vicon system as the truth reference. The filter parameter setting we choose for the experimental validation is reported in Table 2. The orientation sensor delivers the data from the magnetic sensor in arbitrary units.

4. Results

4.1. Computer Simulations

The Monte Carlo results are reported in Table 3. The EKF-MA performs better than the EKF-MB in a magnetically markovian environment, according to a paired-sample t-test (statistically significant difference, SSD at p < 0.001 and p < 0.01, in dynamic and static conditions). In the case of null magnetic variations, the EKF-MA performs as the EKF-MB. Figure 1 depicts the typical behavior in dynamic conditions. As for the second condition of observability, the EKF-MA is tested in the same conditions leading to the data in Figure 1, for different values of the magnetic dip angle, Figure 2.

4.2. Experimental Validation: Static Test

In Figure 3 we plot, in blue, the component of the magnetic field along the X-direction (earth-fixed frame), as is measured by the magnetic sensor. Since the test environment is almost magnetically unperturbed before placing the cell phone nearby the IMU at time t1 = 476 s, the measured magnetic field is the true magnetic field existing in the room with very good approximation. The EKF-MA is tested using three different values of the process noise standard deviation bσh.

All the other parameters being the same as in Table 2, these values are: bσh = 0.001 a.u./s (red); bσh = 0.01 a.u./s (black); bσh = 0.1 a.u./s (magenta). The RMS value of the difference between estimated and measured X-components of the magnetic field up to time t1 increases from 15 × 10−5 a.u. (bσh = 0.001 a.u./s) to 8.4 × 10−3 a.u. (bσh = 0.1 a.u./s). The magnetic disturbance from t1 to when the cell phone comes to a stop at time t2 = 480 s is best tracked with higher values of bσh. However, when the magnetic field is not time variant anymore from time t2 on, the filter behavior is unsatisfactory. The estimated heading angle is reported in Figure 4.

4.3. Experimental Validation: Dynamic Test

The norm of the acceleration magnitude is 1 g ± 60 mg throughout the trial, and the coefficient of variation of the norm of the measured magnetic field is about 1%. The RMSE of the Euler angles are reported in Table 4 for the EKF-MA and the EKF-MB. As a matter of comparison, we also report the errors statistics in three other cases: (a) when only the gyro angular velocities are used and the aiding sensors are disabled; (b) when only the accelerometer and magnetic sensor data are involved in determining the orientation using the TRIAD method; (c) when the orientation is estimated by the Xsens-EKF. The Euler angle time functions estimated by the Vicon system are reported with superimposed the errors incurred by the EKF-MA in Figure 5.

4. Discussion and Concluding Remarks

The conditions for the observability of the KF-based algorithm for IMU orientation tracking are based on the rank-condition of the observability matrix Equation (39). These conditions require that the local magnetic field, which may include magnetic variations superimposed to the earth magnetic field, and the gravity vector are not collinear; moreover, at least one rotational degree of freedom would excite the system. The computer simulations clearly show the relevance of the first condition. Indeed, when the magnetic dip angle becomes too large, the heading estimation accuracy undergoes an impressive degradation. Conversely, the computer simulations, and experimental testing as well, demonstrate that the condition concerning the IMU motion is not critical. In static conditions, the filter is stable and its performances are similar to those achieved in dynamic conditions. In general, we observe some problems of filter consistency. In particular, difficulties exist in picking up the third component of the quaternion and the horizontal magnetic states, as shown in Figure 1(c–d). The errors in these estimated state vector components turn out to be highly correlated in time, which is not reflected in the expression of the computed error state covariance matrix; moreover, while the compensation of gyro bias is generally fast, some possible problems exist for its Z-component, Figure 1(e). These behaviors are not unexpected: the estimated values of heading, horizontal component of the acting magnetic field and gyro bias component in the vertical direction must necessarily interact in the attempt to explain the information available to the filter. In other words, the observability conditions can never be too good. However, a safe start in a magnetic homogeneous area [7], and standing still few seconds to carry out the IMU alignment [8] are useful expedients to ensure the validity of the linear approximation of the IMU orientation tracking process. Some disadvantages of the linearization procedure implemented in an EKF are indeed sensitivity to initial conditions, biases in the estimation errors, and critical problems of convergence and filter stability, especially when the sampling interval is too large [28].

The results of the experimental validation support the results of the Monte Carlo study, either in the static case or in dynamic conditions. The importance of implementing sensor fusion algorithms is stressed by the results offered in Table 5. Presently, the reason why the yaw estimates from the Xsens-EKF start to diverge after about 40 s is unknown. The advantage of the compensation of the magnetic disturbances is shown in a situation where the level of contamination is low. It should be noted the importance of providing the filter with some sort of adaptability to the magnetic environment. In this regard, the results of the validation test in static conditions gives rise to several interesting considerations. Since the magnetic variations are quite small, the mechanism of magnetic disturbance compensation is on, with a small value of the process noise standard deviation. This helps making the filter stable; however, its capability of dealing with the magnetic disturbance, when it occurs, is very limited. If, in the effort to deal with the magnetic disturbance, we increase the process noise, the ability to follow the magnetic variations when they occur is remarkable, however the filter may lose track when the magnetic variations are small. On one hand, the injection of process noise is known as a useful recipe to account for mismodeling problems, and even to make the filter response faster [30]; on the other hand, excess process noise is also responsible for less accurate state estimates in benign tracking conditions.

The importance of implementing sensor fusion algorithms is further outlined by the results reported in Table 4. Two further implementations are considered: “only gyro” refers to the case when the EKF is unaided by the accelerometer and the magnetic sensor, and the orientation information is obtained exclusively by time-integrating noisy gyro signals from initial conditions we assume, for simplicity, to be known at the same level of accuracy as in EKF-MA and EKF-MB (we ignore the details of the Xsens’ initialization procedure). This can be obtained by plugging high values of the accelerometer and magnetic sensor measurement noise standard deviation into the filter matrix R. On the contrary, the column named “gyro-free” in Table 4 refers to the case when a gyro-free measurement unit is considered. In this case, only the accelerometer and the magnetic sensor are used: their information is combined while solving a specific instance of the Wahba’s problem using the TRIAD algorithm, which is often used to combine measured gravity and Earth magnetic field vectors, for slow motions occurring in magnetically clean environments. Either for the “only gyro” or the “gyro-free” systems, it is worth noting that the stabilization of inclination (roll and pitch) and heading (yaw) is achieved just to a limited extent. In the “only gyro” system, the limited stabilization is a consequence of the random-walk integration of wideband gyro measurement noise, while, in the “gyro-free” system, it is a consequence of the fact that, being a single-frame algorithm for orientation determination, the TRIAD per se does not smooth the estimates it produces: even small tremulous movements affecting the accelerometer and any magnetic disturbance in the environment combine their effects to produce noisy orientation estimates. Although the “only gyro” system seems to be almost equivalent to the “gyro-free” system in this particular experimental trial, it must be remembered that random-walk errors tend to grow unbounded over time, while the high-frequency noise affecting the “gyro-free” system is virtually drift-free. However, the “gyro-free” system is completely blind and vulnerable to abrupt changes in the body motion and to magnetic variations in the environment. On the other hand, the EKF is capable of making the best use of the available information, and provides outstanding performance as compared with the “only gyro” and the “gyro-free” systems. Although having a limited ability to overcome magnetic variations, as shown in the static test results, the EKF we have developed may be protected against the effects of body motion using vector selection schemes such as those implemented in [2], which make it adaptive to some extent (R-adaptation, or adaptation of the measurement noise covariance matrix R is involved in [2]). These schemes are not considered here. An interesting avenue of research will concern how to make the EKF Q-adaptive, namely how the process noise covariance matrix Q may be changed at run-time to reflect varying magnetic conditions. These considerations stress the importance of developing adaptive EKFs: this is beyond the scope of this paper and it is the subject of our current research. At the present time, we are investigating the rank-condition of observability matrices built from gradients of the Lie derivatives in our research on adaptive EKFs that aims at the compensation of magnetic disturbances in strongly perturbed environments.

The main contribution of this paper concerns the presentation of a method for testing the observability of KFs applied to a problem of orientation determination using inertial/magnetic sensors. Oftentimes, KFs are developed exploiting the considerable freedom in choosing the state and measurement equations, without paying proper consideration to possible problems of observability. This is the first time the observability rank criterion based on Lie derivatives is applied to test the observability of a quaternion-based EKF that is developed for determining the orientation of a rigid body using inertial/magnetic sensors. The formal demonstration of the conditions of observability and, in addition to that, the results of a set of Monte Carlo computer simulations and few experimental trials are offered in support of our approach.

Acknowledgments

This work has been supported by funds from the Italian Ministry of University and Research. The author is indebted to Andrea Mannini for his assistance in performing the experiments.

References

  1. Welch, GF; Foxlin, E. Motion tracking: No silver bullet, but a respectable arsenal. IEEE Comput. Graph. Appl 2002, 22, 24–38. [Google Scholar]
  2. Sabatini, AM. Quaternion-based extended Kalman filter for determining orientation by inertial and magnetic sensing. IEEE Trans. Biomed. Eng 2006, 53, 1346–1356. [Google Scholar]
  3. Yun, X; Bachmann, ER; McGhee, RB. A simplified quaternion-based algorithm for orientation estimation from earth gravity and magnetic field measurements. IEEE Trans. Instrum. Meas 2008, 57, 638–650. [Google Scholar]
  4. Lee, JK; Park, EJ. A fast quaternion-based orientation optimizer via virtual rotation for human motion tracking. IEEE Trans. Biomed. Eng 2009, 56, 1574–1582. [Google Scholar]
  5. Veltink, PH; Bussmann, HBJ; de Vries, WHK; Martens, WLJ; Van Lummel, RC. Detection of static and dynamic activities using uniaxial accelerometers. IEEE Trans. Rehabil. Eng 1996, 4, 375–385. [Google Scholar]
  6. Bachmann, ER; Yun, X; Peterson, CW. An investigation of the effects of magnetic variations on inertial/magnetic orientation sensors. Proceedings of IEEE International Conference on Robotics and Automation (ICRA '04), New Orleans, LA, USA, 26 April–1 May 2004; pp. 1115–1122.
  7. de Vries, WHK; Veeger, HEJ; Baten, CTM; van der Helm, FCT. Magnetic distortion in motion labs, implications for validating inertial magnetic sensors. Gait Posture 2009, 29, 535–541. [Google Scholar]
  8. Sabatini, AM. Estimating three-dimensional orientation of human body parts by inertial/magnetic sensing. Sensors 2011, 11, 1489–1525. [Google Scholar]
  9. Gallagher, A; Matsuoka, Y; Wei-Tech, A. An efficient real-time human posture tracking algorithm using low-cost inertial and magnetic sensors. Proceedings of IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2004), Sendai, Japan, 28 September–2 October 2004; pp. 2967–2972.
  10. Wahba, G. A least-square estimate of spacecraft attitude. SIAM Rev 1965, 7, 409. [Google Scholar]
  11. Gebre-Egziabher, D; Elkaim, GH; Powell, JD; Parkinson, BW. A gyro-free quaternion-based attitude determination system suitable for implementation using low cost sensors. Proceedings of IEEE Position Location and Navigation Symposium (PLANS '00), San Diego, CA, USA, 13–16 March 2000; pp. 185–192.
  12. Markley, FL. Attitude determination and parameter estimation using vector observations: Theory. J. Astronaut. Sci 1989, 37, 41–58. [Google Scholar]
  13. Welch, GF. The use of the Kalman filter for human motion tracking in virtual reality. Presence 2009, 18, 72–91. [Google Scholar]
  14. Brown, RG; Hwang, PYC. Introduction to Random Signals and Applied Kalman Filtering; John Wiley & Sons: New York, NY, USA, 1997. [Google Scholar]
  15. Foxlin, E. Inertial head-tracker sensor fusion by a complementary separate-bias Kalman filter. Proceedings of IEEE Virtual Reality Annual International Symposium, Santa Clara, CA, USA, 30 March–3 April 1996; pp. 185–194.
  16. Luinge, HJ; Veltink, PH. Inclination measurement of human movement using a 3-D accelerometer with autocalibration. IEEE Trans. Neur. Syst. Rehabil. Eng 2004, 12, 112–121. [Google Scholar]
  17. Roetenberg, D; Luinge, HJ; Baten, CTM; Veltink, PH. Compensation of magnetic disturbances improves inertial and magnetic sensing of human body segment orientation. IEEE Trans. Neur. Syst. Rehabil. Eng 2005, 13, 395–405. [Google Scholar]
  18. Yun, X; Bachmann, ER. Design, implementation, and experimental results of a quaternion-based Kalman filter for human body motion tracking. IEEE Trans. Robot 2006, 22, 1216–1227. [Google Scholar]
  19. Lefferts, EJ; Markley, FL; Shuster, MD. Kalman filtering for spacecraft attitude estimation. J. Guid 1982, 5, 417–429. [Google Scholar]
  20. Harada, T; Mori, T; Sato, T. Development of a tiny orientation estimation device to operate under motion and magnetic disturbance. Int. J. Rob. Res 2007, 26, 547–559. [Google Scholar]
  21. Tomé, P; Yalak, O. Improvement of orientation estimation in pedestrian navigation by compensation of magnetic disturbances. J. Navig 2008, 55, 179–190. [Google Scholar]
  22. Foxlin, E; Harrington, M; Altshuler, Y. Miniature 6-DOF inertial system for tracking HMDs. SPIE Proc 1998, 3362, 214–228. [Google Scholar]
  23. Mirzaei, FM; Roumeliotis, SI. A Kalman-filter-based algorithm for IMU-camera calibration: Observability analysis and performance evaluation. IEEE Trans. Robot 2008, 24, 1143–1156. [Google Scholar]
  24. Shuster, MD. A survey of attitude representations. J. Astronaut. Sci 1993, 41, 439–517. [Google Scholar]
  25. Isidori, A. Nonlinear Control Systems; Springer Verlag: London, UK, 1995. [Google Scholar]
  26. Ferraris, F; Grimaldi, U; Parvis, M. Procedure for effortless in-field calibration of three-axis rate gyros and accelerometers. Sens. Mater 1995, 7, 311–330. [Google Scholar]
  27. Gebre-Egziabher, D; Elkaim, GH; Powell, JD; Parkinson, BW. A non-linear, two-step estimation algorithm for calibrating solid-state strapdown magnetometers. Proceedings of 8th International Conference on Navigation Systems, St Petersburg, Russia, 28–30 May 2001.
  28. Crassidis, JL; Markley, FL. Unscented filtering for spacecraft attitude estimation. J. Guid. Contr. Dynam 2003, 26, 536–542. [Google Scholar]
  29. Sabatini, AM. Quaternion-based strap-down integration method for applications of inertial sensing to gait analysis. Med. Biol. Eng. Comput 2005, 43, 94–101. [Google Scholar]
  30. Maybeck, PS. Stochastic Models, Estimation and Control; Academic Press: New York, NY, USA, 1982. [Google Scholar]
  31. Markley, FL. Attitude error representations for Kalman filtering. J. Guid. Contr. Dynam 2003, 26, 311–317. [Google Scholar]
  32. Choukroun, D; Bar-Itzhack, IY; Oshman, Y. Novel quaternion Kalman filter. IEEE Trans. Aerosp. Electron. Syst 2006, 41, 174–190. [Google Scholar]
  33. Shuster, MD; Oh, S. Three-axis attitude determination from vector observations. J. Guid. Contr 1981, 4, 70–77. [Google Scholar]

Appendix

We prove the conditions under which the 6 × 3 matrix A is full rank:

A = [ [ q 4 [ p 1 × ] + ( [ p 1 × ] [ q × ] 2 [ q × ] [ p 1 × ] ) [ q × ] p 1 ] [ s ¯ 1 s ¯ 2 s ¯ 3 ] [ q 4 [ p 2 × ] + ( [ p 2 × ] [ q × ] 2 [ q × ] [ p 2 × ] ) [ q × ] p 2 ] [ s ¯ 1 s ¯ 2 s ¯ 3 ] ]
Be p1 = [0 0 gz]T and p2 = [hx hy hz]T. Let us consider elementary rotations about the three principal axes (roll, pitch and yaw). A script written using the symbolic computation software MAPLE helps proving that minors of order three can always be found with determinant values
roll : cos  φ h x g z 2 ,  sin  φ h x g z 2 ,  cos  φ h y g z 2 ,  sin  φ h y g z 2 pitch : cos  ϑ h x g z 2 ,  sin  ϑ h x g z 2 ,  cos  ϑ h y g z 2 ,  sin  ϑ h y g z 2 yaw : ( cos  ψ h x + sin  ψ h y ) g z 2 , ( sin  ψ h x + cos  ψ h y ) g z 2
The determinant values cannot be simultaneously zero for any elementary rotation, provided that the local magnetic field has components in the horizontal plane, i.e., hx, hy or both are different from zero, condition that can be considered always true, for all practical purposes.

Next, we prove the rank conditions for the 10 × 7 matrix B, for which we have:

Γ ( q ¯ , p ) = [ 0 0 0 0 2 ( q 1 p 3 + q 3 p 1 q 4 p 2 ) 2 ( q 2 p 3 + q 3 p 2 + q 4 p 1 ) 2 ( + q 1 p 1 + q 2 p 2 + q 3 p 3 ) 2 ( q 1 p 2 + q 2 p 1 + q 4 p 3 ) 2 ( + q 1 p 2 q 2 p 1 q 4 p 3 ) 2 ( q 1 p 1 q 2 p 2 q 3 p 3 ) 2 ( q 2 p 3 + q 3 p 2 + q 4 p 1 ) 2 ( q 1 p 3 + q 3 p 1 q 4 p 2 ) 2 ( + q 1 p 3 q 3 p 1 + q 4 p 2 ) 2 ( + q 2 p 3 q 3 p 2 q 4 p 1 ) 2 ( q 1 p 1 q 2 p 2 q 3 p 3 ) 2 ( + q 1 p 2 q 2 p 1 q 4 p 3 ) 0 0 0 0 2 ( + q 1 p 1 + q 2 p 2 + q 3 p 3 ) 2 ( + q 1 p 2 q 2 p 1 q 4 p 3 ) 2 ( + q 1 p 3 q 3 p 1 + q 4 p 2 ) 2 ( q 2 p 3 + q 3 p 2 + q 4 p 1 ) 2 ( q 1 p 2 + q 2 p 1 + q 4 p 3 ) 2 ( + q 1 p 1 + q 2 p 2 + q 3 p 3 ) 2 ( + q 2 p 3 q 3 p 2 q 4 p 1 ) 2 ( + q 1 p 3 q 3 p 1 + q 4 p 2 ) 2 ( q 1 p 1 q 2 p 2 q 3 p 3 ) 2 ( q 1 p 2 + q 2 p 1 + q 4 p 3 ) 2 ( q 1 p 3 + q 3 p 1 q 4 p 2 ) 2 ( + q 2 p 3 q 3 p 2 q 4 p 1 ) 0 0 0 0 0 ]   1 2 3 } ω x 4 5 6 } ω y 7 8 9 } ω z
ϒ ( q ¯ ) = [ 0 0 0 2 ( q 1 q 3 + q 2 q 4 ) 2 ( q 1 q 4 + q 2 q 3 ) 1 2 q 1 2 2 q 2 2 2 ( q 1 q 2 + q 3 q 4 ) 1 2 q 2 2 2 q 4 2 2 ( q 1 q 4 + q 2 q 3 ) 2 ( q 1 q 3 q 2 q 4 ) 2 ( q 1 q 4 q 2 q 3 ) 1 2 q 3 2 2 q 4 2 0 0 0 1 2 q 2 2 2 q 3 2 2 ( q 1 q 2 + q 3 q 4 ) 2 ( q 1 q 3 q 2 q 4 ) 2 ( q 1 q 2 q 3 q 4 ) 1 2 q 1 2 2 q 3 2 2 ( q 1 q 4 + q 2 q 3 ) 1 2 q 1 2 2 q 4 2 2 ( q 1 q 2 + q 3 q 4 ) 2 ( q 1 q 3 + q 2 q 4 ) 0 0 0 ] 1 2 3 } ω x 4 5 6 } ω y 7 8 9 } ω z
The variables shown right next to the row numbers indicate the control input that is involved in using the corresponding row numbers: when a row is retained in the observability matrix (e.g., the 4th row), the underlying assumption is that the corresponding control input (i.e., ωy) is non-zero. Note that, for either Γ or ϒ, rows 2 and 4; 3 and 7; 6 and 8 are equal, apart the sign. Rows 3, 4, 8 (or any other combination of rows that involve, at least, one control input) can be extracted from ϒ to form the reduced matrix
ϒ red ( q ¯ ) = [ 2 ( q 1 q 2 + q 3 q 4 ) 1 2 q 2 2 2 q 4 2 2 ( q 1 q 4 + q 2 q 3 ) 2 ( q 1 q 3 q 2 q 4 ) 2 ( q 1 q 4 q 2 q 3 ) 1 2 q 3 2 2 q 4 2 1 2 q 1 2 2 q 4 2 2 ( q 1 q 2 + q 3 q 4 ) 2 ( q 1 q 3 + q 2 q 4 ) ]
It should be noted that:
ϒ red ( q ¯ ) ϒ red T ( q ¯ ) = I 3 × 3
Hence ϒred() is seen to belong to SO(3). It is immediate to conclude that the matrix extracted from B by retaining rows 3, 4, 8 and 10, namely:
B red = [ 2 ( + q 1 p 2 q 2 p 1 q 4 p 3 ) 2 ( q 1 p 1 q 2 h 2 q 3 p 3 ) 2 ( q 2 p 3 + q 3 p 2 + q 4 p 1 ) 2 ( q 1 p 3 + q 3 p 1 q 4 p 2 ) 2 ( + q 1 p 3 q 3 p 1 + q 4 p 2 ) 2 ( + q 2 p 3 q 3 p 2 q 4 p 1 ) 2 ( q 1 p 1 q 2 p 2 q 3 p 3 ) 2 ( + q 1 p 2 q 2 p 1 q 4 p 3 ) ϒ red ( q ¯ ) 2 ( q 1 p 1 q 2 p 2 q 3 p 3 ) 2 ( q 1 p 2 + q 2 p 1 + q 4 p 3 ) 2 ( q 1 p 3 + q 3 p 1 q 4 p 2 ) 2 ( + q 2 p 3 q 3 p 2 q 4 p 1 ) 2 q 1 2 q 2 2 q 3 2 q 4 0 0 0 ]
is rank 4 if the quaternion is not identically equal to zero, which is true if the quaternion has to represent a valid rotation. We conclude that the motion would be one-dimensional at least, to excite all rows needed for the matrix Bred to be rank 4; hence the matrix B is rank 4 under the same conditions.

By performing Gaussian elimination on the corresponding rows of O and eliminating all the elements of the involved columns we obtain:

O = [ 0 3 × 4 0 3 × 3 0 3 × 3 0 3 × 4 C ( q ¯ ) 0 3 × 3 0 3 × 4 0 3 × 3 A 11 0 3 × 4 X 3 A 12 I 4 × 4 0 4 × 3 0 4 × 3 0 6 × 4 0 6 × 3 0 6 × 3 ]
By performing Gaussian elimination on the rows of the matrix A, which is of rank 3, we get:
O = [ 0 3 × 4 0 3 × 3 0 3 × 3 0 3 × 4 C ( q ¯ ) 0 3 × 3 0 3 × 4 0 3 × 3 I 3 × 3 0 3 × 4 0 3 × 3 0 3 × 3 I 4 × 4 0 4 × 3 0 4 × 3 0 3 × 4 0 3 × 3 0 3 × 3 ]

Since a valid DCM is non-singular, we conclude that the observability matrix is full rank when: (a) the magnetic field and the gravity vectors are not collinear; (b) at least one degree of rotational freedom is excited.

Figure 1. (a)–(e) State errors from the EKF. (f) Heading estimation error. (a)–(c) Quaternion components q1, q2, q3. (d) Magnetic variation Y-component. (e) Gyro bias Z-component. The black lines show the 3 standard deviation bounds estimated by the filter.
Figure 1. (a)–(e) State errors from the EKF. (f) Heading estimation error. (a)–(c) Quaternion components q1, q2, q3. (d) Magnetic variation Y-component. (e) Gyro bias Z-component. The black lines show the 3 standard deviation bounds estimated by the filter.
Sensors 11 09182f1 1024
Figure 2. Orientation RMSE vs. magnetic dip angle.
Figure 2. Orientation RMSE vs. magnetic dip angle.
Sensors 11 09182f2 1024
Figure 3. The time function of the X-component of the magnetic field, estimated by the EKF-MA. In blue the time function of the measured X-component of the magnetic field (see text).
Figure 3. The time function of the X-component of the magnetic field, estimated by the EKF-MA. In blue the time function of the measured X-component of the magnetic field (see text).
Sensors 11 09182f3 1024
Figure 4. Heading angle time function estimated by the EKF-MA and by the Xsens-EKF (bσh = 0.01 a.u./s)
Figure 4. Heading angle time function estimated by the EKF-MA and by the Xsens-EKF (bσh = 0.01 a.u./s)
Sensors 11 09182f4 1024
Figure 5. Euler angles time functions (truth reference and EKF-MA estimation errors).
Figure 5. Euler angles time functions (truth reference and EKF-MA estimation errors).
Sensors 11 09182f5a 1024Sensors 11 09182f5b 1024
Table 1. EKF parameter setting (Monte Carlo simulations).
Table 1. EKF parameter setting (Monte Carlo simulations).
MPE-MAMCE-MAMPE-MBMCE-MB
σg, °/s0.40.40.40.4
bσg, °/s20.010.010.010.01
bσh, mGauss/s10100
α, s−11100
σa, mg5555
σh, mGauss1111
Table 2. EKF parameter setting (experimental validation).
Table 2. EKF parameter setting (experimental validation).
StaticDynamic
σg, °/s0.40.4
bσg, °/s20.010.01
bσh, u.a./s (×10−3)1010
α, s−11010
σa, mg15
σh, mGauss11
Table 3. Monte Carlo simulation results (mean ± SD);
Table 3. Monte Carlo simulation results (mean ± SD);
Condition: MPE
EKF-MA
Static test0.93 ± 0.24 ***
Dynamic1.05 ± 0.24 **

EKF-MB
Static test1.27 ± 0.18 ***
Dynamic1.53 ± 0.21 **

Condition: MCE
EKF-MA
Static test0.29 ± 0.11
Dynamic0.32 ± 0.08

EKF-MB
Static test0.22 ± 0.11
Dynamic0.24 ± 0.15

**SSD at p < 0.01;***SSD at p < 0.001.

Table 4. RMSE statistics—EKF vs. competing filter implementations.
Table 4. RMSE statistics—EKF vs. competing filter implementations.
EKF-MAEKF-MBOnly gyroTRIADXsens-EKF
Roll, °0.891.022.142.150.92
Pitch, °0.970.933.854.490.71
Yaw, °1.141.187.625.8110.48
Orientation,°1.631.698.687.4410.60

Share and Cite

MDPI and ACS Style

Sabatini, A.M. Kalman-Filter-Based Orientation Determination Using Inertial/Magnetic Sensors: Observability Analysis and Performance Evaluation. Sensors 2011, 11, 9182-9206. https://doi.org/10.3390/s111009182

AMA Style

Sabatini AM. Kalman-Filter-Based Orientation Determination Using Inertial/Magnetic Sensors: Observability Analysis and Performance Evaluation. Sensors. 2011; 11(10):9182-9206. https://doi.org/10.3390/s111009182

Chicago/Turabian Style

Sabatini, Angelo Maria. 2011. "Kalman-Filter-Based Orientation Determination Using Inertial/Magnetic Sensors: Observability Analysis and Performance Evaluation" Sensors 11, no. 10: 9182-9206. https://doi.org/10.3390/s111009182

Article Metrics

Back to TopTop