This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).

User-worn sensing units composed of inertial and magnetic sensors are becoming increasingly popular in various domains, including biomedical engineering, robotics, virtual reality, where they can also be applied for real-time tracking of the orientation of human body parts in the three-dimensional (3D) space. Although they are a promising choice as wearable sensors under many respects, the inertial and magnetic sensors currently in use offer measuring performance that are critical in order to achieve and maintain accurate 3D-orientation estimates, anytime and anywhere. This paper reviews the main sensor fusion and filtering techniques proposed for accurate inertial/magnetic orientation tracking of human body parts; it also gives useful recipes for their actual implementation.

The problem of accurate tracking of the orientation (attitude) of rigid objects is important in several domains, among them navigation of man-made vehicles, e.g., air and spacecrafts, robotics and, of interest in this paper, ambulatory human movement analysis, which may include a range of interesting applications, from monitoring of activities of daily living (ADL) to virtual/augmented reality (VR/AR). Several technologies and approaches are available to produce motion tracking systems (trackers), which derive orientation estimates from electrical measurements of acoustic, inertial, magnetic, mechanical, optical and radio frequency sensors [

Several factors explain the popularity of inertial/magnetic sensing. Most current sensing approaches for motion tracking need the availability of external sources, e.g., cameras for optical trackers, ultrasonic/electromagnetic transmitters for acoustic/electromagnetic trackers. Usually, the sources can operate only over relatively short distances, which makes the trackers highly susceptible to interference and line-of-sight occlusion (shadowing): hence, proper functioning of these trackers is only possible within carefully controlled experimental setups (motion analysis laboratories). This fact precludes, for instance, the quantitative assessment of the behaviour of a human subject in unrestrained conditions. Conversely, inertial sensors are completely self-contained (sourceless), since they measure physical quantities, such as linear acceleration and angular velocity, which are related to the motion of the objects where the sensors are fixed; moreover, although magnetic sensing is externally referenced, the ubiquitous presence of a magnetic field on earth makes the magnetic source available almost everywhere. Recent technological advances in the field of micro-electro-mechanical systems (MEMS) have made it possible to manufacture inertial sensors that are relatively low cost, highly miniaturized and with limited power consumption. Inertial/magnetic sensors can therefore be considered the most valuable opportunity to monitor the ADLs of a human subject outside specialized laboratories, and over possibly extended periods of time. However, the measuring accuracies of MEMS inertial sensors are still largely inferior to those of the sensors used, e.g., in inertial navigation systems (INSs) for aeronautical and military applications [

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 purposefully exploited [

The main purpose of this paper is to review important methods for the design of these filtering algorithms. Section 2 surveys main sensing approaches proposed by researchers active in biomedical engineering, biomechanics and related fields. Section 3 provides the reader with background information about mathematical methods for representing the orientation; the kinematic equations of a rigid body and simple numerical methods for their solution are also briefly discussed. Section 4 reviews the main deterministic and stochastic algorithms for estimating the orientation, with particular emphasis on vector matching, linear Kalman Filters (KFs) and the their extended (EKF) version, suited for nonlinear models; KFs and EKFs are presented here as special cases of Bayesian filters. Section 5 discusses the modelling issues behind the implementation of a state-of-the-art EKF, and presents a worked-out example related to a head motion tracking trial. The paper concludes with Section 6.

A number of pioneering contributions in the 60–70s suggested reconstructing the field of motion of a rigid body, in terms of both position and orientation (pose), by sampling acceleration values in several suitably selected points of it. The rotation of a rigid body with one point fixed requires a minimum of three acceleration measurements; at least, three additional acceleration measurements are needed to resolve the motion of the fixed point in the 3D-space [

During the 80–90s, the use of accelerometers in biomechanics was promoted mainly in the clinical assessment of gait: under the simplifying assumption of a gait motion planar model, a minimal configuration set composed of two leg-mounted single-axis accelerometers with parallel sensitive axes would suffice to determine the angular acceleration of the leg. In the attempt to circumvent the problem of numerical integration drift, pairs of accelerometers on each segment were used to resolve the relative angle between two segments, namely the joint angle, without time-integration [

Toward the end of the 90s and in the early years of this century, the emergence on the consumer market of miniaturized MEMS gyros, with good metrological specifications and low cost, opened a new way to think about the role of inertial sensing in human body motion tracking and analysis [

However, it is critical to achieve high accuracy in pose determination by strap-down INSs that incorporate low-cost inertial/magnetic sensors, since their stand-alone accuracy and run-to-run stability are poor. Different applications may involve different accuracy requirements relative to the duration of each observation run: in the absence of special precautions, the requirements of human motion tracking applications are shown to be violated when the duration of the observation run exceeds just several seconds [

Besides being important

For motion on or near the earth surface, at speeds far below orbital velocity, it is convenient to describe the orientation of a rigid body using two coordinate systems: the earth-fixed coordinate system, specified by the right-handed orthonormal basis E = {_{1} _{2} _{3}}, whose coordinate axes are directed in the local north, east and down directions (NED)—for all practical purposes, an inertial coordinate system; the non-inertial coordinate system, aka body-fixed coordinate system, specified by the right-handed orthonormal basis

We recall that an orthonormal basis T = {

An arbitrary vector

The vector

The subscripts E, B indicate which basis is used for representing the vector

The columns of the direction cosine matrix (DCM)
_{i}

Lower-dimensional parameterizations of orientation can be derived based on the following considerations [_{3}-axis through an angle

The resulting rotation matrix is:
_{θ}_{θ}_{2}-axis and the _{1}-axis through an angle

We note that:

For the vector cross product, an equivalent expression is:

Be _{⊥} the projection of a column vector

For arbitrary vectors

The symbol □ denotes the standard vector dot product. _{P}) and perpendicular (_{⊥}) to

In conclusion:

It follows that two equivalent expressions of the rotation matrix are written (Euler’s formula):
_{n}

Euler’s theorem states that the most general motion of a rigid body with one point fixed is a rotation by an angle

All rotations can thus be mapped to points inside and on the surface of a sphere of radius

The orientation of the body-fixed frame relative to the earth-fixed frame can also be described using the Euler angle formulation, namely in terms of three consecutive rotations through three body-referenced Euler angles [

The rotation matrix as a function of the three Euler angles is given by:

The gravity vector is therefore represented in the body-fixed coordinate system as follows:

The time rates of change of the Euler angles are related to the components of the angular velocity _{B} = [^{T}

The rotation depends on the difference

Finally, since matrix multiplication is not generally commutative, finite rotations in space do not commute, unless infinitesimal rotation angles δ

In fact, the Euler’s formula _{1}, δ_{2}, δ_{3} are termed infinitesimal angles.

Finally, another mathematical representation of orientation can be constructed by rewriting the Euler’s formula

The rotation matrix _{i}

It is commonplace to refer to _{4} as the scalar part of the quaternion ^{T}_{4}]^{T}

The following two basic operations are defined in the quaternion space:

In contrast with quaternion addition, quaternion multiplication is not generally commutative. Moreover, by analogy with complex numbers, we define the conjugate of a quaternion; the definitions of quaternion norm and inverse follow:

The Euler-Rodrigues formulation predates the discovery of quaternions by Hamilton, who was not apparently interested in developing quaternion algebra as means of describing rotational transformations [

Alternatively, quaternions can be considered as vectors embedded in the four-dimensional Euclidean space R^{4}. The set of quaternions with null vector parts can be identified with R the set of quaternions with null scalar part, aka vector quaternions, can be identified with vectors in the Euclidean space R^{3}. At last, unit quaternions, namely quaternions with unit norm, lie on the three-dimensional sphere S^{3} with unit radius in R^{4}. Henceforth, the vector presentation is used in place of the representation as extended complex numbers.

The connection existing between unit quaternions and the problem of describing orientations starts with examining ^{T}^{T}_{1} and _{2} be arbitrary unit quaternions. Rotation by _{1} followed by rotation by _{2} is shown equivalent to rotation by _{2} ⊗ _{1}

The four-component unit quaternion has the lowest dimension of any globally non-singular orientation parameterization. Enforcing the unit norm constraint on a quaternion leaves it with the three degrees of freedom consistent with the SO(3) dimensionality. Moreover, the quaternion representation is redundant, as the rotation vector. The quaternion −

The kinematic equations that describe the motion of a rigid body capture the relations existing between the temporal derivative of the orientation representation and the angular velocity; we have already discussed the formulation of these equations in the case that the 3-2-1 rotation sequence of Euler’s angles are chosen for representing the orientation, see

Suppose that the orientation changes with time:

Taking the limit of _{B}

The time dependence of the angular velocity and the rotation matrix is not made explicit in _{B}_{B}) is a 4 × 4 skew symmetric matrix. If the angular velocity is time constant, then the closed-form solution to

The matrix exponential can be written:

It is worth noting that all three-dimensional representations of orientation are invariably associated to non-linear kinematic equations; on the other hand, higher-dimensional representations of orientation, such as the orientation matrix and the quaternion, present linear kinematic equations, as shown in

The gimbal-lock singularity and the presence of computationally taxing trigonometric functions in the numerical integration of the system

The claim that the physical interpretation of the quaternion is much less intuitive than that associated with Euler angles does not imply that the quaternion cannot find ample diffusion even in the biomechanical community. A systematic development of the kinematics equations is possible in terms, equivalently, of direction cosines, the rotation vector, Euler angles, the quaternion, and well-established relationships link all these descriptors to one another: at any stage of the processing and visualization tasks, one can adopt the descriptor that is more suited to the application specifics. Henceforth, we direct our attention exclusively to the quaternion-based formulation of the kinematic equations of a rigid body.

Estimating the orientation from body-fixed sensor measurements has a quite long history, in particular in applications of spacecraft guidance and control. Over the years, two main approaches have emerged: the deterministic (least-squares) approach and the stochastic (Kalman filtering) approach. The least-squares approach was originally introduced in 1965, in the so-called Wahba’s problem [

Estimating the orientation of human body parts from body-fixed inertial/magnetic sensor measurements is a relatively novel application. It does not come as a surprise that the same distinction as above is made between deterministic and stochastic approaches, as we will see shortly after.

Deterministic single-frame estimation algorithms can be proposed in connection with the operation of gyro-free aiding sensor systems. Four variants of the same approach are surveyed here: TRIAD (TRi-axial Attitude Determination), QUEST (QUaternion ESTimator), FQA (Factored Quaternion Algorithm) and Gauss-Newton (GN) optimization. They can be used to solve Wahba’s problem without the need for an

Suppose that two nonparallel reference unit vectors _{1}, _{2} are available, e.g., in the direction of the gravity field and the earth magnetic field, and resolved in the earth-fixed frame. The corresponding observation vectors _{1}, _{2} are measured in the body-fixed frame and normalized in amplitude to one. The TRIAD algorithm attempts to solve Wahba’s problem by finding an orthogonal matrix _{1}, _{2}) is optimally related to the pair (_{1}, _{2}), namely _{i}_{i}

First, two triads of orthonormal reference and observation vectors are constructed:

Second, the two orthogonal matrices _{ref} and _{obs} are formed, and the optimal estimate of the orthogonal matrix

The main disadvantage of the TRIAD algorithm is that it is sensitive to the order at which the algorithm receives the two vector pairs—the pair (_{1}, _{1}) is received first in _{2} and _{2} eliminate any contribution of _{2} and _{2} relative to the vertical axis. Since the accuracy of the orientation estimate is more influenced by the vector pair that is processed first, the best choice would be to process first the observation vector of greater accuracy. Another disadvantage of the TRIAD algorithm is that it accommodates only two observation vectors.

The basic QUEST delivers the optimal quaternion that minimizes the loss function:

The loss function _{i}_{i}_{i}

In contrast with the TRIAD algorithm, the QUEST is capable of accommodating more than two observation vectors; moreover, it is optimal with sensors with different accuracies by properly selecting the weighting coefficients _{i}

The singularity problem is eliminated in the QUEST by employing the method of sequential rotations, at the expense of computational cost [

The FQA is specifically created in the attempt to overcome the limitation of both the TRIAD algorithm and the QUEST that orientation errors arise from errors in just one of the sensor data [_{m} and _{m} denote the corresponding measurement vectors, normalized in amplitude to one. In the FQA, acceleration data are used in computing the pitch and roll angles, while local magnetic field data are used only in yaw angle computations. This decoupling eliminates the influence of magnetic variations on calculations that determine pitch and roll angles.

Upon examination of

From trigonometric half-angle formulas, half-angle values are given by:

The values of the sine and cosine of the roll angle can be expressed as:

Exploiting the half-angle formulas, the roll quaternion is given by:

The values of the sine and cosine of the yaw angle can be determined by matching the magnetic field reference vector in the horizontal plane [_{x}_{y}^{T}_{x}_{y}^{T}

Exploiting the half-angle formulas, the yaw quaternion is:

The rule of composition

Since the FQA uses three angles to derive the quaternion estimate, it suffers from a singularity, which occurs when the pitch angle is ± π/2. In order to circumvent this singularity, a method similar to the one proposed in the QUEST algorithm is adopted in the numerical implementation of the FQA. In essence, the FQA is very similar to the tilt compensation procedure customarily used in a strap-down magnetic compass to derive heading [

The last method reviewed in this Section is the GN optimizer [

The conventional GN method algorithm provides an iterative solution to this problem:

Give an initial guess, _{0};

Compute the correction:

Compute the updated quaternion:

Normalize the updated quaternion:

Return to step (2), and repeat until convergence using the stopping criterion:

The main merit of a GN optimizer is recognized in its robust estimation capability, nonetheless the intensive calculations required in step (2) and the need for iteratively evaluations until convergence may diminish its importance for real-time applications. It is reported that four-five iterations are requested for typical values of the sensor measurement noise, when the initialization errors are large. Fortunately, during tracking, when errors are much smaller, GN iteration typically converges to sufficient accuracy in only one-two steps. Clever algorithms are reported in the literature in order to reduce the computational burden of GN optimizers [

For an approach based on single-frame deterministic algorithms to work properly in human motion tracking, the acceleration and magnetic measurement vectors are to be determined by the gravity field and by the reference magnetic field, respectively. However, this assumption can cause serious errors in the orientation solution if any body accelerations and magnetic variations of affect the sensor signals: in principle, only slow motions occurring in magnetically clean environments would be allowed. The widespread practice of low-pass filtering acceleration signals in order to reduce the effect of dynamic motions leads to latency in the estimates produced by the algorithm, with the additional problem of how to optimally select the cut-off frequency of the filter. Alternatively, acceleration measurements would be screened before their use in the algorithm by computing the absolute value of the difference between their norm and the known value of gravity; if the computed value exceeds a preset threshold value, the measurement reliability is considered low. As for the impact of magnetic variations on the reliability of magnetic measurements, a similar approach can be considered by comparing the norm of the sensed magnetic field with the norm of the reference magnetic vector. A more detailed explanation of these vector selection techniques is deferred to Section 5.4, after that, in the next Section, stochastic estimation algorithms are presented and discussed.

Stochastic estimation algorithms use a model for predicting aspects of the time behaviour of a system (dynamic model) and a model of the sensor measurements (measurement model), in order to produce the most accurate estimate possible of the system state. KF algorithms lend themselves perfectly to this task [

For the sake of generality, our discussion starts here with considering the Bayesian approach to dynamic state estimation [_{1:k−1} = [_{1} _{2} … _{k−1}] is the collection of the states traversed by the system up to time _{k}_{k−1} represents the process noise. Process noise accounts for any mismodelling effects or disturbances in the dynamic model. Here the index _{k}_{k−1} = _{k}_{k−1} may be time-dependent, _{s}

The system state _{k}_{k}_{k}_{k}_{k}_{k−1} and _{k}_{0} is assumed to have a known PDF _{0}) and also to be independent of _{k−1} and _{k}

The goal of filtering can be stated as finding estimates of the states given _{1:k}. This requires the calculation of the posterior PDF _{k}|_{1:k}). Suppose that the required posterior PDF _{k−1}|_{1:k−1}) at time _{k−1} is available. The prediction stage involves the dynamic model _{k}

The transitional PDF _{k}_{k−1}) is defined by the dynamic model _{k−1}.

The update stage, at time _{k}_{k}_{k}_{k}

The _{k}_{1:k}) allows estimating the state, and obtaining measures of the accuracy of these estimates. The Bayesian solution cannot be determined analytically, expect that in a restrictive set of cases, including the KF.

The KF assumes that the posterior density at every time step is multivariate Gaussian, and hence it can be completely characterized by the mean vector and the covariance matrix. If the PDF _{k−1}|_{1:k−1}) is Gaussian, the PDF _{k}_{1:k}) is proven to be Gaussian provided that:

_{k−1} and _{k}

_{k−1}(_{k−1}, _{k−1}) is a known _{k−1} and _{k−1};

_{k}_{k}_{k}_{k}_{k}

In other words _{k−1} (of dimension _{x} × _{x}) and _{k}_{z} × _{z}) are known matrices. The additive noises _{k−1} and _{k}_{k−1} and _{k}_{k−1} and _{k}_{k−1} and _{k}

The Extended Kalman Filter (EKF) is derived for nonlinear systems with additive noise:

The additive noises _{k−1} and _{k}_{k−1} and _{k}_{k−1}(_{k−1}) and _{k}_{k}_{k}_{1:k}) is therefore approximated by a Gaussian density. The local linearization requires the computation of the Jacobian matrices of the dynamic model, the measurement model or both with current predicted states, see

The EKF and its many variants are referred to as analytic approximations because the Jacobian matrices _{k−1} and _{k}_{k}_{1:k}) as a multivariate Gaussian. If the nonlinearity in models is severe, the non-Gaussian nature of the posterior PDF _{k}_{1:k}) can be pronounced, e.g., it can be multimodal, heavily-tailed or skewed: the approximation to first-order is grossly inaccurate and the performance of the EKF can therefore be seriously degraded. In general, besides the computational costs incurred in the calculations of the Jacobian matrices, other disadvantages of the linearization procedure implemented in an EKF concern the sensitivity to initial conditions, biases in the estimation errors, critical problems of convergence and filter stability, especially when the sampling interval is too small.

The Unscented Kalman Filter (UKF) is developed with the aim to overcome these limitations [_{k}_{1:k}) contribute to make the EKF a preferred choice, even in the most demanding scenarios [

In applying Kalman filtering to the problem of inertial orientation tracking there is considerable freedom in dynamic and measurement modelling [

The most principled way to preserve the unit-norm property of the estimated quaternion is to create an algorithm where the error between the true and estimated quaternions is itself a quaternion and is multiplied (in the sense of quaternion multiplication) with the

In spite that MEKFs are theoretically correct in treating the normalization constraint, most reported implementations regard the application of AEKFs. AEKFs relax the quaternion unit-norm constraint and treat the four components of the quaternion as independent parameters. A method to preserve the quaternion unit-norm property is to derive a sort of quaternion measurement model from the non-linear equation that expresses the unit-norm property (pseudo-measurement model) [

The dynamic equations for describing the orientation of the parts to be tracked would cause severe difficulties in the filter modelling [

An additional important feature of stochastic estimation algorithms like the EKFs is that gyro drift bias can be estimated by state vector augmentation techniques [

Most studies in VR/AR fields employ head motion trackers that directly provide orientation measurements. In these cases, quaternions can be used with an EKF to estimate the angular velocity, which is needed to predict the future head orientation. Sometimes, angular velocity is measured with inertial sensors; the state vector can therefore be augmented with additional components, ^{2} is a variance factor. The GM model reflects underlying assumptions about the nature of human movements, namely, (a) the change of viewing direction is infrequent; (b) the angular velocity and acceleration are nonzero only during the infrequent changes in orientation. The decorrelation time constant and the variance factor are tuned in order that the spectral properties of the signal generated by the model match those of the angular velocities for paradigmatic motions [

In this paper, the application specifics concern orientation measurement devices that use angular velocity to estimate orientation using an EKF. At the sampling intervals that are common for these devices, say between 100–500 Hz, the angular velocity can be considered constant in the time interval between successive measurements, leading to the numerical integration of kinematic equations via

In a fully integrated IMMU, the gyro, the accelerometer and the magnetometer are each tri-axial, with mutually orthogonal sensitivity axes. Their output in response to the body angular velocity _{body}, acceleration (gravity _{body}), and local magnetic field (earth’s magnetic field _{earth} and some local magnetic effect modelled as a time-invariant magnetic vector _{ext}) are:
^{g}^{a}^{m}_{3}); ^{g}^{a}^{h}^{g}^{a}^{h}

To proceed in the discussion of the sensor model

The bias and scale factor of inertial and magnetic sensors are functions of environmental conditions, in particular ambient temperature; this is especially true for gyros [

The problem of magnetic variations due to ferromagnetic materials in the vicinity of a magnetic sensor raises additional modelling considerations. _{earth}. The presence of any constant field vector _{ext} superimposed on _{earth} does not preclude the possibility of constructing the horizontal reference needed for orientation estimation, provided that _{ext} is accurately known. This is in contrast with the need to perform ambulatory measurements, without prior knowledge of existence and location of disturbances. Moreover, we have to consider dynamic effects that are related to either ferromagnetic objects moving in the vicinity of the sensor or to movements of the body-fixed sensor relative to static ferromagnetic objects. Because of these dynamic effects, _{ext} turns out to be time-variant and unknown. A strategy to tackle this problem is to assume that a time-variant bias error ^{h}_{ext} by “absorbing” it into a mathematical model of the magnetic drift bias, e.g., random-walk or first-order Gauss-Markov models (state augmentation). In other terms, the horizontal reference is built and maintained by the EKF itself (auto-calibration) [

The role of aiding sensors is played by accelerometers, taken alone or in combination with magnetic sensors. Sometimes, and depending on the requirements of a specific application, the complexity of the measurement hardware setup, and the sophistication of the filtering algorithms as well, can be reduced to some extent. Simplifying assumptions are quite common in applications to gait analysis [

If motion occurs in the 3D space, heading estimation requires a horizontal reference, for which construction an IMMU is necessary. Few possibilities exist as for the choice of the measurement model. Since we prefer to take the measured angular velocity as an input to the filter, we have to decide how to handle acceleration and magnetic measurements. They can be fused together directly using any deterministic attitude estimation algorithm, e.g., TRIAD, QUEST, FQA, GN optimizer. An advantage of single-frame deterministic algorithms that deliver the quaternion at their output is that the measurement equations are linear; with the exception of the GN optimizer, see

Alternatively, each reference vector component is given a specific measurement equation, which helps moving its representation from the earth-fixed to the body-fixed frame via either

Another important issue in the EKF design deals with its behaviour when anomalous measurements are received. It takes relatively long for an EKF to recover from false measurements when they are given the opportunity to contribute to the estimate of the state vector [

As for the acceleration, in order to answer the question whether the body-fixed measured acceleration vector is suitable for measuring gravity, we would compare its norm with the known value of gravity; better yet, we may decide to work directly with the norm of the difference between the measured acceleration vector, resolved in the earth-fixed frame, and the gravity. If the deviation exceeds some properly chosen threshold value, a sensor glitch, or a contamination due to body motion would be suspected. Different actions can be taken: the measured vector is discarded, and the filter update is only based on magnetic measurements, unless they too are considered unreliable. This is equivalent to temporarily set the acceleration measurement noise variance to some large value, which can be considered, to all practical purposes, infinite:
_{a}_{k−1} is used in _{k}

A similar approach can be pursued as for the magnetic measurements. In this case we have to work with the difference between the measured magnetic vector, resolved in the earth-fixed frame, and the local magnetic reference vector. Sometimes, computing the dip angle is suggested to help improving the process; the dip angle is the angle between the magnetic field and the horizontal plane, which would be constant for given latitude and longitude. Unfortunately, the dip angle varies very erratically, especially within indoor environments, and we find its use somewhat critical. An effective norm-based adaptive algorithm applied to the magnetic sensor measurement noise variance is as follows:
_{h}_{k−1} is used in _{k}

A final comment concerns the applications in gait analysis, in the particularly important case that the IMMU is placed on the lower limbs, e.g., on the foot instep [_{g}_{s}

The parameters to be tuned in an EKF concern the statistical properties assumed for the process noise and the measurement noise. Since they are modelled as Gaussian noise, we need to specify the possibly time-variant covariance matrices _{k}_{k}

The measurement noise covariance matrix _{k}_{k}

Once the structure of the process noise covariance matrix _{k}_{k}_{k}_{k}_{k}

A study concerning the EKF performance assessment can be performed on experimental or synthetic motion data. With the former approach a series of experiments is performed, where monitored subjects are asked to perform paradigmatic motions. The main problem is that the true motion signals are unknown, because of the noise present in the measurement data. It is possible to smooth the data to some extent and use them as a reference signal, but the risk is to introduce false signal features, while removing true ones. With the latter approach, the main problem is whether the synthetic signals really capture the exact characteristics of the paradigmatic motions or not. If not, it is difficult to predict filter performance when applied to real-life tasks. As neither of these approaches is perfect, both analyses are usually performed and attempts are made to relate them to each other.

Mostly, in order to construct a dataset according to the approach based on experimental motion data, the motion is recorded using a gold standard optical tracker. The truth-reference unit quaternion _{true} can be built from the 3D-position coordinates of a minimum of three markers, using, e.g., the Horn algorithm [

The performance metrics can be based on computing
_{true} and _{4}). The performance metrics are expressed in terms of the root-mean-square-value of the orientation error (RMSE_{θ}_{true} and

The dynamic model equation is as follows:

The dynamic model is linear and time-variant. Implicit in the formulation ^{h}_{k}

The validity of the model part that describes the time-evolution of the unit quaternion depends on the assumption that the angular velocity is constant in the time interval [_{k−1} _{k}^{q}_{k−1} describes how the gyro noise enters the state model through a quaternion-dependent linear transformation. The process noise component ^{h}_{k−1} is assumed to have covariance matrix

Because of the assumption that ^{q}_{k−1} and ^{h}_{k−1} are uncorrelated, the process noise covariance matrix _{k}

The block diagram of the filter is sketched in

The dataset for the experiment described in this Section was obtained by collecting inertial/magnetic sensor data from the MTx orientation tracker by Xsens Technologies B.V., Enschede, The Netherlands. These data were delivered through the USB interface to a host computer at a rate of 100 Hz together with the unit quaternion time functions estimated by the native Xsens EKF that runs in its default setting. The device was placed on top of a 10 cm × 10 cm plate that was screwed on a cyclist helmet, and fastened using double-side adhesive tape. The plate orientation was recorded using a six-camera Vicon optical tracker with a sampling rate of 100 Hz. A trigger signal was generated by the host computer and enabled time-synchronization of MTx and Vicon data streams. The system measured the position of four reflective markers (diameter: 25 mm), placed at the corners of the plate.

The MTx sensors were calibrated before starting the experimental session and their scale factor and bias errors were therefore zeroed for all practical purposes. The initial orientation of the sensor frame relative to the reference frame was found by asking the subject to stand still for few seconds at the beginning of the trial. The calibration quaternion needed to estimate the reference magnetic vector was built during the still time. The subject was then asked to freely move and turn his helmet-capped head during the trial, while standing on the spot. The head motion trial lasted slightly more than half a minute. The Euler angles time functions delivered by the Vicon system were considered the truth reference for the purpose of error estimation.

The EKF was implemented in Matlab for off-line data processing on a MacBook Air computer. Using the virtualization technology from Parallels Desktop 4.0 for Mac, the cycle time for a single iteration turned out to be about 2.0 ms, without any particular programming effort made to optimize the computational efficiency of the filter. The optimally tuned parameter setting for the EKF is reported in

The error statistics are reported in

The first and last column report the errors incurred by the EKF and the Xsens EKF, respectively. The columns 3 to 5 give the errors incurred when the gyro is aided by: accelerometer only (column 3); magnetic sensor only (column 4); no sensors (column 5). Suppose that _{h}_{a}

Finally,

A comprehensive review of the endless literature on the problem of orientation determination is virtually impossible and necessarily incomplete, especially if one wishes to encompass all possible applications. We hope this article is interesting to experts and novice alike; the reported information would be sufficient to the readers, in order to cook their formulation of a state-of-the-art algorithm for 3D-orientation estimation using inertial/magnetic sensing in applications of human body motion tracking and analysis.

This work has been supported by funds from the Italian Ministry of Education and Research. The head motion tracking experiment has been performed within the framework of the EC project CLONS, coordinated by Silvestro Micera. Special appreciation is due to the valuable assistance provided by Jacopo Carpaneto, Vincenzo Genovese and Andrea Mannini throughout the experiment.

In this

Dynamic and measurement models:

Compute the _{k}_{k}_{k}_{k}

Compute the a priori error covariance matrix:

Compute the innovation and its covariance matrix:

Compute the covariance matrix of the innovation:

Compute the Kalman gain:

Compute the

Compute the

When the dynamic model, the measurement model or both are nonlinear the EKF comes to our rescue:

The EKF equations differ from the _{k−1} and _{k}

Earth-fixed frame and body-fixed frame on a toy aircraft.

Rotation about the _{3}-axis through an angle

The vector

Inclination of the strap-down magnetic compass relative to the horizontal plane as defined by gravity direction.

A single-axis accelerometer measures the projection (in the direction of the sensitive axis) of the specific force

EKF structure.

Roll angle time functions, truth reference and estimation error by the EKF.

Pitch angle time functions, truth reference and estimation error by the EKF.

Yaw angle time functions, truth reference and estimation error by the EKF.

Optimally tuned parameter setting for the EKF. The raw magnetic data from the MTx are expressed in arbitrary units (a.u.), since they are normalized to earth field strength by the manufacturer.

Gyro standard deviation ^{g}σ |
0.4 |

Magnetic bias standard deviation ^{b}σ^{−3}) |
0.1 |

Accelerometer standard deviation ^{a}σ |
10.0 |

Magnetic sensor standard deviation ^{h}σ^{−3}) |
1.0 |

Acceleration measurements: _{a}, m |
40.0 |

Magnetic sensor measurements: _{h}, a.u. (× 10^{−3}) |
50.0 |

Performance assessment.

RMSE | EKF | _{h} |
_{a} |
_{a}_{h} = 0 |
Xsens EKF |
---|---|---|---|---|---|

Roll angle, ° | 0.72 | 0.89 | 3.13 | 0.97 | 0.94 |

Pitch angle, ° | 0.83 | 0.88 | 1.20 | 4.91 | 0.76 |

Yaw angle, ° | 1.23 | 3.88 | 4.30 | 3.76 | 1.30 |

Orientation angle, ° | 1.62 | 3.96 | 5.26 | 6.19 | 1.72 |