Skip to main content
Sensors (Basel, Switzerland) logoLink to Sensors (Basel, Switzerland)
. 2018 Oct 16;18(10):3490. doi: 10.3390/s18103490

Identification of Noise Covariance Matrices to Improve Orientation Estimation by Kalman Filter

Alexis Nez 1, Laetitia Fradet 1,*, Frédéric Marin 2, Tony Monnet 1, Patrick Lacouture 1
PMCID: PMC6210464  PMID: 30332842

Abstract

Magneto-inertial measurement units (MIMUs) are a promising way to perform human motion analysis outside the laboratory. To do so, in the literature, orientation provided by an MIMU is used to deduce body segment orientation. This is generally achieved by means of a Kalman filter that fuses acceleration, angular velocity, and magnetic field measures. A critical point when implementing a Kalman filter is the initialization of the covariance matrices that characterize mismodelling and input error from noisy sensors. The present study proposes a methodology to identify the initial values of these covariance matrices that optimize orientation estimation in the context of human motion analysis. The approach used was to apply motion to the sensor manually, and to compare the orientation obtained via the Kalman filter to a measurement from an optoelectronic system acting as a reference. Testing different sets of values for each parameter of the covariance matrices, and comparing each MIMU measurement with the reference measurement, enabled identification of the most effective values. Moreover, with these optimized initial covariance matrices, the orientation estimation was greatly improved. The method, as presented here, provides a unique solution to the problem of identifying the optimal covariance matrices values for Kalman filtering. However, the methodology should be improved in order to reduce the duration of the whole process.

Keywords: inertial sensors, human motion analysis, Kalman filter, covariance matrices, orientation measurement

1. Introduction

In the fields of medicine and biomechanics, human motion analysis is often used to extract quantitative and objective data to characterize a movement or a function of the neuro-musculo-skeletal system. During human motion analysis, the aim is frequently to define a body segment rotation with respect to its proximal segment [1]. To perform this analysis, optoelectronic systems that measure the 3D coordinates of reflective markers remain the “gold standard” [1,2]. However, such systems suffer from four main drawbacks: (a) even if such systems could be movable, because cameras have to be handled with caution, most systems are fixed inside the laboratory walls; (b) measurement volume is restricted to the camera’s field of vision; (c) sessions with multiple subjects require numerous cameras to counteract occlusion by the marker; (d) calibration of the whole system can be time-consuming and must be redone if a camera has been moved.

In this context, magneto-inertial measurement units (MIMUs) are a promising, emerging way to perform human motion analysis outside the laboratory, because they are wearable, light, and wireless [3,4]. These MIMUs typically include a combination of 3D accelerometers, gyroscopes, and magnetometers. However, MIMUs do not measure orientation directly. Rather, they measure its linear acceleration, angular velocity, and the magnetic field surrounding the sensor. Angular velocity can be numerically integrated to obtain rotation, but MIMUs designed for human motion analysis are based on low-cost microelectromechanical technology that also suffers from substantial noise and bias over the measurement [5]. This noise and bias particularly affects the angular velocity measure, [6] such that the estimation of the orientation by numerical integration leads to a well-known error: orientation drift [7]. To improve the orientation calculation, the sensor’s data are then combined [8], the linear acceleration and the magnetic field being used to correct the initial estimate obtained by numerical integration of the angular velocity [7]. Indeed, in the absence of movement, the linear acceleration measured by the sensor should be gravity, which is known to be vertical. This information can thus be exploited to define the inclination of the sensor. The measured magnetic field can also be used to express the orientation of the sensor relative to the Earth’s magnetic field. However, in practice such ideal conditions are never obtained. Since the MIMUs are used for the purpose of characterizing human movements, accelerometers measure external acceleration induced by body segment movements in addition to the acceleration induced by gravity. In addition, magnetometers are sensitive to the ferromagnetic components located near the MIMU, which is a recurrent issue.

The classic approach to processing all of these noisy and perturbed measurements to estimate MIMU orientation is to fuse them inside a Kalman filter. In fact, Kalman filtering is largely adopted to perform data fusion from noisy measurements [8,9]. Complementary filters have been more recently proposed as an alternative to Kalman filtering [10,11]. Some studies have compared the performance of such filters with that of Kalman filters during human movement [12,13]. Since the performances were relatively similar, further studies must be performed to assess the advantages and disadvantages of these two types of filtering, by measuring various human movements in terms of duration and movement acceleration. The principal concept of Kalman filtering is to combine different sensor measurements with a dynamic model that translates the time-behavior of the state to be estimated. Despite its extensive use in MIMU processing, there is no consensus as to the structure of the Kalman filter and its settings [8]. In particular, a critical point when implementing a Kalman filter is the definition initialization of the covariance matrices that characterize mismodelling and input error from noisy sensors [14]. These covariance matrices are crucial since their poor definition can lead to inaccurate estimation as well as divergence and stability problems [15]. When applied to the orientation estimation by MIMU data, covariance matrices represent measurement noise from gyroscopes, accelerometers, and magnetometers. However, they also represent the external perturbations of acceleration and the magnetic field since, as previously mentioned, both the external acceleration experienced by the sensor, and magnetic disturbances, tend to cause errors in the estimated orientation. The critical issues of the initialization of covariance matrices are little documented [16,17] and, surprisingly, are never considered in human motion captured by MIMUs.

The aim of the present study is to propose a methodology which will identify the values of these covariance matrices that optimize orientation estimation in the context of human motion analysis.

2. Materials and Methods

To identify the optimal values of the covariance matrices, we proposed to explore the space of sets of values for each parameter of the covariance matrices, and to compare Kalman filter results with a reference measurement. For these purposes, we compared the orientation of a rigid object measured simultaneously by an optoelectronic system and by an MIMU. The optoelectronic system was considered in this case to be the most suitable system, due to its faculty to measure a wide range of movements in terms of acceleration and angular velocity level.

2.1. Experimental Procedure

The optoelectronic measurement was provided by a system of 20 cameras (Vicon Motion Systems Ltd., Oxford, UK) with a sampling frequency of 250 Hz. The object used was a set square, seen in Figure 1, the usual function of which is to calibrate the optoelectronic system. This object was particularly suitable for this study because it is pre-equipped with five reflective markers that can form a coordinate system based on the geometry of the set square. Additionally, the handle makes it easy to apply hand movements, thus limiting marker occultation.

Figure 1.

Figure 1

Set square equipped with both an MIMU and five reflective markers. The reflective markers can be used to define local coordinate systems associated with the set square.

The MIMU (Opal sensors, APDM, Portland, OR, USA) was aligned with the set square by means of a custom adapter. Sensor data (triaxial accelerometers, gyroscopes, and magnetometers) were collected at 128 Hz.

Time synchronization between both systems was ensured by different procedures. During the experiment, an external trigger executed by the launch of the MIMU system measure triggered the optoelectronic system measure. However, after resampling the measurement from the optoelectronic system by cubic interpolation at 128 Hz to be consistent with the inertial measurement, post-processing showed a time-shift between the data. Therefore, another procedure, depicted in Annex A, was applied to time-synchronize the data.

The set square was moved manually in the calibrated volume of the optoelectronic system. In order to analyze the effect of external accelerations experienced by the MIMU on covariance matrices, three different intensity levels of movement were performed on the set square. To define these three intensity levels, the set square was moved as rapidly as possible and the corresponding values were recorded. The three intensity levels were then defined by creating three equal intervals between zero and the maximal recorded values. These levels were designated by the adjectives slow, intermediate, and fast. Table 1 lists the main kinematic characteristics corresponding to each movement intensity level. Given the likely presence of static or quasi-static periods during human motion, we subsequently added a static acquisition to our protocol to analyze this particular situation.

Table 1.

Main kinematic characteristics of the imposed movements.

Intensity Slow Intermediate Fast
Acceleration (g) 0.03 ± 0.02 0.7 ± 0.5 4 ± 2
Angular velocity (°/s) 40 ± 20 300 ± 150 700 ± 400

Each movement was executed for a duration of 10 min so that the possible drift caused by the gyroscopes had time to intervene [18]. The movements were also initiated by a short static phase to estimate the initial bias of the gyroscopes, as well as the initial orientation of the set square. The nature of the imposed movements was, to the extent possible, “random” and of “globally constant” intensity. The global acceleration and angular velocity were controlled retrospectively. Five recordings for which the kinematics did not follow the same movement intensity level over the 10 min period were performed again. The movements were not collected during typical human movement, such as gait, because this could have resulted in reduced combinations of acceleration, angular velocity, and magnetic field values.

To verify the repeatability of the parameters of the covariance matrices identified, the three movements were repeated three times (on three separate days) for each of the three Opal APDM MIMUs tested. Therefore, a total of 27 motion capture sessions were made for these three sensors.

2.2. Gold Standard Measure

Orientation of the set square was estimated using the QUEST algorithm [19], which gives an optimal solution in a least-squares sense, to the Wahba problem [20]. The Wahba problem seeks to find a unique quaternion q¯ that transforms all of the vectors that define the local coordinate system, based on the reflective markers seen in Figure 1, into the global coordinate system of the optoelectronic system. This algorithm makes it possible to consider all five markers for orientation, which tends to reduce measurement errors made on each of the markers. According to the QUEST algorithm, the Wahba’s problem can be formulated as:

 g(q¯)= q¯T.K.q¯ 

where K is the matrix defined by:

 K= [SσIZZTσ] 

with

 S =B+BT 
 Z=[B23B32B31B13B12B21] 
σ=tr[B] 

and

 B =kwkvkT 

wk and vk represent the vectors defined in the local and global coordinate systems respectively. Since three markers were placed on each part of the set square, three possibilities exist to define the x and the y axis of the local coordinate system (see Figure 1 for the representation of the x and y axis). Therefore, 2 × 9 = 18 local coordinate systems can be obtained, since it is possible to define the local coordinate system by keeping the x axis (such that y = z × x) or the y axis (such that x = y × z). The same importance (and therefore the same weight in the QUEST algorithm) was given to each defined local coordinate system. The optimal quaternion corresponds to the associated normalized eigenvector, which pertains to the largest positive eigenvalues of K [19].

The orientation error resulting from the measured position of the reflective markers (mainly white noise) was then evaluated. First, the Allan Variance method [21] was applied to the five reflective markers during a static acquisition. For the five reflective markers, the white noise characteristic was of 5.7 μm in mean. The impact of this noise over the orientation was estimated by entering the identified white noise into simulated data that were used as input of the QUEST algorithm. This simulation enabled us to evaluate this gold-standard measurement error to 3 × 10−30 on the set square orientation estimate.

2.3. MIMU Data Processing

The procedure was applied to three MIMUs (Opal sensors, APDM, Portland, OR, USA). Sensor data (triaxial accelerometers, gyroscopes, and magnetometers) were collected at 128 Hz and fused in a custom Kalman filter, as seen in Figure 2. According to the manufacturer, the noise density was 1.3 mm/s2/Hz for the accelerometer, 2.2 mrad/s/Hz for the gyroscope, and 160 nT/Hz for the magnetometer.

Figure 2.

Figure 2

Schematic diagram of the custom Kalman filter.

As the measurement model that relates sensor data to the orientation (expressed as a quaternion) is non-linear, we built an extended Kalman filter (EKF). To facilitate quaternion computation and to lighten the state vector, we used a multiplicative indirect Kalman structure [22]. The state vector was augmented with gyroscope bias, the behavior of which was modeled as a random walk. Angular velocity was thus corrected before the numerical integration. More details about this Kalman filter can be found in Annex B.

The reference orientation of the set square obtained by the optoelectronic system was expressed in the global coordinate system of the optoelectronic system, whereas the orientation resulting from the MIMU measurement was expressed in the north-east-down (NED) geographical coordinate system (the first axis defines the northern axis, the second the eastern axis, and the last, the descending vertical). For the purpose of comparison, the orientations measured by the two systems must therefore be expressed in the same coordinate system. To this end, we identified the quaternion that represents the transformation of the optoelectronic system coordinate system into the NED coordinate system.

To identify this transformation quaternion, we exploited the measurements obtained during the experimental procedure. The identification of this rotation was carried out in two steps. Firstly, the roll-pitch components of the transformation were identified at the beginning of the acquisition during a static phase, by taking the average quaternion [23] defined as follows:

 q¯optonedrollpitch= q¯opto*  q¯MIMU

Secondly, the yaw component of the transformation was identified, re-using the QUEST algorithm throughout the whole movement. This time, the optimal rotation being assessed corresponded to the transformation between the transformation q¯optonedrollpitch and the NED coordinate system. More details about the procedure is provided in Annex A.

2.4. Identification of the Kalman Parameters

As part of a multiplicative structure of the Kalman filter, the covariance matrix of the process noise was directly defined from the standard deviations characteristic of the noises of measurement [7]. The process Q and measurement Ra and Rm covariance matrices were then defined as follows:

Q=[σg2.I3O3O3σbg2.I3], Ra=σa2.I3, and Rm=σm2.I3

From this assumption, σg, σa, and σm, denote respectively the standard deviation of the gyroscope, accelerometer, and magnetometer global errors (noises, external perturbations, calibration defects etc.), while σbg represents the standard deviation of the gyroscope bias. The four parameters that were identified will be henceforth referred to as the Kalman parameters.

The process used to identify the four parameters is presented in Figure 3. For each set of Kalman parameters, the orientation was computed by means of the Kalman filter. On each occasion, this orientation was compared to the orientation resulting from the optoelectronic measurement.

Figure 3.

Figure 3

Identification process. MIMU: magneto-inertial measurement units; RMSe: root mean squared error.

This comparison enabled us to calculate the quaternion orientation error as follows:

 dq¯=q¯MIMUq¯ref* 

This quaternion thus defined the rotation transformation from the orientation obtained with the optoelectronic system into the orientation obtained with the Kalman filter. Returning to the definition of the quaternion, we could then calculate the absolute angle corresponding to this rotation:

 θ=2.acos(dq¯scal) 

Finally, the quality of orientation derived from the Kalman filter was characterized by the root mean squared error of this error angle over the 10 min of acquisition. This value, named RMSe, was obtained by the formula:

 RMSe=1Nk=1Nθ2 

where N represents the number of measures over the 10 min.

To reduce the possible combinations of Kalman parameters, a set of ten values per parameter was chosen. This set of parameters was initially based on the characteristic values of measurement noises identified by the Allan’s Variance method as seen in Table 2. These values were considered to be the minimal value for each Kalman parameter, because they should represent the minimum measurement errors. In fact, by definition they address only two stochastic disturbances (white noise and bias instability). So, to integrate the additional errors (other stochastic perturbations, calibration and model errors, and external perturbation), the nine other values of the set consisted of nine higher values. To explore a wide range of values, the ten values were regularly spaced on a logarithmic scale. This initial set of parameters was then refined to target the optimal parameters that were originally identified.

Table 2.

Values of measurement noise identified by the Allan’s Variance method.

σbg σg σa σm
3 × 10−3 rad/s 1 × 10−3 rad/s 4 × 10−3 m/s2 0.2 µT

We proposed to identify the parameters in two steps. First, the error was evaluated only in terms of roll-pitch, the effect of the magnetometers being therefore discarded. This approach made it possible to consider only three parameters initially: σg, σbg, and σa. At the end of this first step an “ideal” value of σbg was obtained. In the second step, the complete error was analyzed by integrating the effect of the magnetometers. We then considered the three parameters σg, σa, and σm. Indeed, these three parameters are very closely linked and must be computed together.

This approach was adopted to provide a reasonable duration for the identification process. For example, given that the execution of the Kalman filter on a 10 min acquisition took about 30 s, the first identification step of three σg, σbg, and σa lasted around 27 × 103 × 30 = 810,000 s, which already corresponded to nine days.

2.5. Optimality Criterion

For each movement, the average orientation errors on the three MIMUs tested, and on the three repetitions, were exploited. From the nine acquisitions at each intensity of movement, average and standard deviation of the RMSe were computed for each combination of Kalman parameters. To define the optimal values, it was proposed to consider a parameter defined by the sum of the RMSe and its associated standard deviation. Our optimality criterion was then to minimize this parameter. As such, this parameter takes into account not only the orientation error but also its variability during the identification process, which is more suitable for generalizing these results across more than three sensors.

2.6. Validation Procedure

To test the efficiency of the Kalman filter based on the optimal parameters identified, we performed a new experiment. First, we imposed on an MIMU from the same manufacturer (Opal sensors, APDM, Portland, OR, USA), that was not used during the identification procedure, a succession of movements, varying in intensity for a duration of 10 min. Then, we obtained orientations by setting the Kalman filter in five different ways. We first set the Kalman filter with the values of measurement noise identified by the Allan variance method, as seen in Table 2, then with the optimal Kalman parameters obtained for slow, intermediate, and fast movements. In addition, we implemented an adaptive Kalman filter as proposed by several authors [24,25]. In this study, we set the Kalman filter so that it selected automatically the set of parameters corresponding to the movement intensity, depending on the instantaneous acceleration and rotational speed. To prevent the Kalman filter from “oscillating” between two intensity modes, we defined a minimum duration of 10 s between each mode change. We will henceforth refer to this setting as “the adapted Kalman filter”.

The error angle between the orientations obtained with each of the five different settings of the Kalman filter and the orientation obtained with the optoelectronic system was computed as well as the RMSe as previously depicted over the 10 min of acquisition.

The orientation error for the orientation obtained from the manufacturer algorithm was also computed. According to the manufacturer, their algorithm uses a state space model with a causal Kalman Filter. Different settings are possible. We chose the “Variable Weight Magnetometer” setting since according to the information provided by the manufacturer “it is the best choice for an environment similar to where the field calibration was last performed, and where having an absolute heading reference is desired”, which was the case here.

3. Results

3.1. Identification of the Kalman Parameters

Beyond identifying optimal values to assign to Kalman parameters σg, σbg, σa, and σm, the analysis of the results revealed interesting information concerning the behavior of the Kalman filter. For instance, Figure 4 represents, for the intermediate intensity movements, the RMSe translating orientation error between the orientation estimated with the optoelectronic system and that obtained with the Kalman filter, depending on the values of the Kalman parameters σg and σa. Most importantly, Figure 4 shows that a bad parameter choice can induce a huge error (up to 65° for this movement), which confirms that appropriate selection of the Kalman parameters is essential.

Figure 4.

Figure 4

RMSe and standard error (black dots) of the RMSe between the orientation estimated with the optoelectronic system and the Kalman filter, depending on the values of Kalman parameters σg and σa for the intermediate intensity movements.

The area on the extreme right of the figure corresponds to high values assigned to σg and low values assigned to σa. In other words, these values force the Kalman filter to give maximum importance to the measurement resulting from the accelerometers, and to neglect the measurement from the gyroscopes. Conversely, the area on the far left corresponds to low values assigned to σg and high values assigned to σa. In other words, these values force the Kalman filter to give maximum importance to measurement from gyroscopes, and to neglect the measurement resulting from the accelerometers. These two areas usually lead to significant errors. Indeed, the error observed in the right-hand area translates into an error in orientation estimation due to external accelerations experienced by the MIMUs, while the error observed in the left-hand area corresponds to the drift phenomenon resulting from the numerical integration of noisy angular velocity. The zone containing the optimal values is therefore located between these two particular areas, since it reflects a compromise between the gyroscope measurement and the measurement resulting from the accelerometers.

Table 3 provides the optimal values for each Kalman parameter and the RMSe obtained for these values. These results confirm that the Kalman parameters are related to movement intensity. It is especially noted that σa is proportional to movement intensity (directly related with the external acceleration). These results also highlight the particular behavior of static condition because of which the Kalman filter must grant much less importance to gyroscopes (a hundred times less) in order to counteract bias instability.

Table 3.

Identified Kalman parameters and corresponding RMSe.

Static Slow Intermediate Fast
σbg (rad/s) 10−4 10−4 10−3 3 × 10−5
σg (rad/s) 0.1 10−3 10−2 6 × 10−3
σa (m/s2) 0.2 0.2 8 10
σm (µT) 10 1.5 4 45
RMSe (degree) 0.08 ± 0.01 1.5 ± 0.2 2.9 ± 0.3 13.7 ± 5.3

It can also be seen that the RMSe could not be reduced to under 13.7° in fast movements.

3.2. Results from the Validation Procedure

Figure 5 represents, over the whole movement, the orientation error computed between the orientation obtained with the optoelectronic system and those obtained with the four different settings of the Kalman filter based on the identified Kalman parameters. Because the orientation obtained with the Kalman filter based on the noise identified by the Allan’s Variance method was particularly bad, for greater clarity we chose not to represent it in Figure 5.

Figure 5.

Figure 5

Orientation errors computed during a 10 min movement for orientations obtained with four different settings of the Kalman filter, namely with adapted Kalman parameters and with Kalman parameters identified respectively on slow, intermediate, and fast movements. The orientation obtained with the optoelectronic system served as reference. The color bar at the top of the figure represents the intensity level recorded during the movement.

The RMSe computed during the whole movement was 10° for the orientation obtained with the adapted Kalman parameters, and 46°, 16°, and 15° for the orientation obtained with the Kalman parameters identified respectively on slow, intermediate, and fast movements. The RMSe was 95° for that obtained with the Kalman parameters based on the noise identified by the Allan’s Variance method. With the manufacturer algorithm, the RMSe computed during the whole movement was 20° for the orientation obtained, as seen in Figure 6.

Figure 6.

Figure 6

Orientation errors computed during the same 10 min movement for orientations obtained with adapted Kalman parameters and with the manufacturer algorithm. The orientation obtained with the optoelectronic system served as reference. The color bar at the top of the figure represents the intensity level recorded during the movement.

4. Discussion

In this study, a method for initializing covariance matrices has been proposed by comparing the inertial measurement with an optoelectronic measurement used as reference in the context of human motion analysis.

Results highlight the need to select the Kalman parameters required to define these covariance matrices rigorously, otherwise the performance of the Kalman filter can be seriously altered. This identification is even more important in that the optimal values obtained are relatively different from the quantities estimated by the Allan Variance method. Moreover, with the Kalman filter set to the quantities estimated by the Allan Variance method, considerable orientation error was found. The main advantage of the proposed approach is that it is global. Therefore, errors taken into account gather stochastic errors as well as behaviors not taken into account by the calibration models, or by the modeling carried out within the Kalman filter.

Our results clearly show that the optimal Kalman parameter values depend on movement intensity, which is of great importance for applications requiring human movement characterization. We proposed in the present paper to build a Kalman filter such that it automatically selected the set of Kalman parameters corresponding to the movement intensity, depending on the instantaneous acceleration and rotational speed. With such an adaptation, during a 10 min movement, orientation RMSe was reduced to 10° compared to the 15° obtained with the Kalman filter set to the optimal Kalman parameters obtained for fast movements. The remaining 10° of orientation RMSe can probably be mainly imputed to persistent problems that affect orientation estimation by MIMU for fast motion. Indeed, during the identification procedure, the difference between orientations obtained with the optoelectronic system and with our Kalman filter—even optimized—remained above 10° for fast movements. In that case, the optimal behavior of the Kalman filter leads us to place much more importance on gyroscopes than on accelerometers. Therefore, the drift phenomenon resulting from the numerical integration of noisy angular velocity cannot be avoided. This underlines the need for less noisy gyroscopes [26]. We have to admit that MIMUs nowadays include gyroscopes of higher quality than those present in the MIMUs used in this study. Noise density and bias stability of the gyroscopes are in fact greatly reduced in the new generation of MIMUs. For instance, the gyroscope noise density announced by the manufacturer was 0.05°/s/sqrt(Hz) for the version of the sensors used in the present study, whereas it is of 0.025°/s/√Hz for the latest version of these sensors [27]. Therefore, better results can be expected in the future. Moreover, our protocol designed a fast motion with 4 g acceleration and 700°/s angular velocity during 10 min. Such intensity is hardly to be expected during 10 min of human movement.

To test the benefits of the proposed method on MIMUs of different quality, and from a different manufacturer, we applied this methodology to another MIMU (MicroStrain 3DM-GX4-25). The corresponding results are presented in Appendix A. For this tactical-grade MIMU, the orientation error was also notably reduced (from 0.8 to 0.4°) despite the already small orientation error obtained with the manufacturer algorithm also based on Kalman filter, as seen in Table A1. Therefore, we are confident that the present methodology can be beneficial to all sorts of MIMUs in the context of human movement analysis.

Furthermore, let us notice that it is not straightforward to compare orientation errors obtained in the present study with orientation errors mentioned in previous studies. Not only were MIMUs used in the studies from different manufacturers and, as such, have not identical technical features, but also movement characteristics used to validate the methodology might have been different in terms of duration, linear acceleration, and angular velocity. Unfortunately, in previous studies movement characteristics are seldom fully documented. In the present paper, we obtain an orientation error of 1.5° and 2.9° for movements performed at respectively slow and intermediate intensity movement. Our results are close to Sabatini’s results who presented an orientation error of 1.63° with a new extended Kalman Filter [8]. However, as this previous study did not provide information regarding the movement intensity level, additional interpretation of the differences between the results from Sabatini’s study and the present one would remain speculative.

Our present study focused on Kalman filter. Recent publications showed complementary filters as a promising alternative for fusing inertial data to obtain orientation [10,11]. For instance, a recent paper has tested an improved explicit complementary filter that uses only acceleration and gyroscope data as inputs [28]. The orientation error for the yaw angle remains close to 1° but the nature of the movement tested is here again not known. Further investigations should then be conducted in order to assess thoroughly the advantages and disadvantages of complementary filters comparatively to Kalman filters.

Our proposed method has the disadvantage of being painstaking to achieve, not only in terms of experimentation but also in terms of computation, since many combinations of Kalman parameters have to be tested. To speed up the process, an optimization algorithm could be implemented to run the Kalman filter a small number of times. Other studies of minimal movement duration should be also performed to reduce the experimentation time. The proposed methodology required an optoelectronic system to provide the reference orientation. Robotic devices can probably be used to substitute this optoelectronic system and also the tester who is required to move the set square.

In the present paper, the identification procedure has been proposed from the study of three different movement intensities. The behavior of the Kalman filter in these situations should be considered in any study of human movement that is likely to lead to intermediate or mixed intensity movements. It is possible at first to simply exploit the Kalman parameters corresponding to the closest intensity tested, as proposed in the validation section of the present study. However, to go further, a continuous approach to Kalman parameter management could be considered. Indeed, the analysis of the roll-pitch component of the error showed that the optimal behavior of the Kalman filter was obtained by respecting a certain ratio between σa/σb function of movement intensity. A procedure that defines the evolution of this ratio according to the measured accelerations could then be proposed. We have in this study considered Kalman parameters common to all three Opal APDM MIMUs tested. However, each MIMU is slightly different, such that the assignment of specific parameters to each sensor could be advantageous. Such a choice would, however, require the reproduction of this identification process for all MIMUs.

One can also notice that the movements performed were not “natural” human movements, such as walking. Therefore, the real benefits of the presented method for human movement analysis must be further probed.

Finally, only the influence of movement intensity on the Kalman parameters has been tested. Additional, similar studies could also be conducted to specify the influence of magnetic perturbations on the optimal Kalman parameters.

5. Conclusions

The method presented provides a unique solution to the problem of identifying the optimal initial covariance matrices values for Kalman filtering. With these optimized initial covariance matrices, the orientation estimation was greatly improved. However, the methodology should be improved to reduce the duration of the whole process.

Appendix A. Synchronization of the MIMUs and Optoelectronic Systems

Appendix A.1. Temporal Synchronization

A process of synchronization of the two systems was initially planned by managing the triggering of the optoelectronic system from a rising edge executed by the MIMU measurement system. However, the effectiveness of this method was not satisfactory, because a significant time shift remained between the two measures.

We then implemented an optimization process to minimize the gap between the angular velocity measured by the two systems with a least squares approach. For the optoelectronic system, the angular velocity expressed in the local coordinate of the set square was obtained by discrete time-derivation of the quaternion angle as follows:

 θ=2×acos(qscal) 

and then

 ω= ΔθΔt 

Figure A1.

Figure A1

Comparison of the angular velocity obtained from the MIMU (in red) with that obtained from the optoelectronic system (in black) at the beginning of the 10 min acquisition (at the top) and at end (at the bottom).

Nevertheless, even after making this correction, a time lag appeared at the end of the acquisition. As illustrated by Figure A1, the two curves were well synchronized at the beginning of the acquisition but were no longer so at the end of the acquisition (i.e., after 10 min of measurement). This systematic observation revealed a problem of temporal proportionality between the two measurement systems.

A new optimization process was then implemented to identify the temporal homothety to apply to the optoelectronic data. Once applied, the synchronization of data throughout the acquisition was obtained. According to this optimization process, the temporal proportionality coefficient to be applied was systematically 0.003% or 30 ppm. This value shows that the progressive desynchronization observed was very weak. Indeed, this corresponds to an offset of 18 ms after an acquisition of 10 min, which is then equivalent to just over two points on a signal sampled at 128 Hz.

We attributed a higher confidence to the MIMU sensors, because their data are time-stamped, which is not the case for the data from the optoelectronic acquisition. Indeed, for the optoelectronic system, the time stamps are just deduced from the sampling frequency, without any control of the actual measurement times. This hypothesis was confirmed during the equivalent analysis conducted with another MIMU, the MicroStrain 3DMGX4-25, which had the same result. This result implies that characterization of the time of the optoelectronic measurement does not seem to be without fault.

Appendix A.2. Identification of the Quaternion Representing the Transformation of the Optoelectronic System Coordinate System into the MIMU Coordinate System

This procedure was carried out in two steps. Firstly, the pitch and roll components were identified and then the yaw component of the transformation between the optoelectronic coordinate system and the MIMU coordinate system.

For that purpose, during a static phase during which the set square was lying on the floor, at each time-step, the transformation quaternion between the two coordinate systems was identified according to the formula:

 q¯optonedrollpitch= q¯opto*  q¯MIMU 

Then, the average quaternion was computed according to the Markley et al. method [23]. One could notice that this transformation quaternion had mainly a roll component of 180°. In fact, the MIMU coordinate system is the north-east-down (NED) coordinate system. Therefore, its z axis is vertical, pointing downward, whereas the z axis of the optoelectronic coordinate system, which is perpendicular to the calibration wand placed on the floor during the calibration procedure, is almost vertical, pointing upward.

An intermediate coordinate system equivalent to the NED coordinate system in terms of pitch and roll, but different in terms of yaw, was then obtained.

During the movement, the quaternions obtained with the optoelectronic system were then expressed in this temporary coordinate system as follows:

q¯optotmp= q¯opto q¯optonedrollpitch 

The same procedure was not used during the second step. Indeed, the yaw component obtained from inertial measure is the component that suffers the most from inaccuracy. Moreover, the static phase being short, we preferred to estimate the yaw component during the whole movement. For these different reasons, we used a QUEST algorithm and only the magnetic field measure.

The QUEST algorithm seeks the optimal rotation in the least squares sense [29]. Here, we expressed two vectors in the NED coordinate systems:

r1=h and r2=[001] 

h being the magnetic field.

Two other vectors were expressed in the intermediate coordinate system:

s1=m˜ and s2=[001] 

m˜ being the magnetic field measured by the inertial sensor and expressed in the intermediate coordinate system. According to the formula:

 m˜=(q¯optoq¯optonedrollpitch)* m  q¯opto q¯optonedrollpitch 

The QUEST method is then used to find the attitude matrix A, such that:

Ar1= s1 and Ar2= s2 

The quaternions obtained through the QUEST method are then averaged to obtain q¯optonedy.

Quaternions measured from the optoelectronic system and expressed in the NED coordinate system can then be obtained as follows:

 q¯optoRned= q¯optoRopto q¯optonedrollpitch q¯optonedy 

Appendix B. Indirect Kalman Filter Used in the Study

The Kalman filter proposed in this study is partially based on a filter described by Trawny and Roumeliotis [22]. The update is based on the propositions made by Suh [25].

Appendix B.1. Attitude Prediction

In this model, the state x is given by the quaternion and the gyroscope bias:

 x= [q¯b] 

The state estimate is predicted at time-step k by:

 xk= Fk.xk1+vk1 

Fk being the state transition model at time-step k and vk1 the process noise at time-step (k − 1)

The gyroscope bias is represented as a random walk process; we can predict the current gyroscope bias such as:

 b^k|k1=b^k1 

A first estimation of the angular velocity is then provided by:

ω^k|k1=ω^kmb^k|k1 

ω^km being the angular velocity measured by the gyroscope at time-step k.

The actual quaternion can be predicted based on this angular velocity and the quaternion at the previous time-step according to a first-order quaternion integrator:

 q¯^k|k1= [exp(12.Ω(ω¯).T)+148(Ω(ω^k|k1).Ω(ω^k1)Ω(ω^k1).Ω(ω^k|k1))T2].q^¯k1 

with ω¯ the mean angular velocity defined by:

 ω¯=ω^k|k1ω^k12 

We consider an indirect approach; the prediction is then performed with the error state equation defined by the orientation error δθ and the bias error Δb as:

 x˜= [δθΔb] 

The dynamic model is here given by:

 x˜˙=Fc.x˜+Gc.v 

with Fc and Gc, v the process noise formulated as:

Fc=[[ω^×]I30303] Gc= [I30303I3] v=[vgvbg] 

[u^×] is the preproduct matricial product of a vector u.

The corresponding discrete state transition matrix Φ is given by:

Φ =[ΘΨ03I3] 

with

Θ =cos(|ω^|T). I3sin(|ω^T|).[ω^|ω^|×]+(1cos(|ω^|T)).[ω^|ω^|ω^T|ω^|] 

and

Ψ = I3.T+1|ω^|2(1cos(|ω^|T)).[ω^×] 1|ω^|3(|ω^|Tsin(|ω^|T)).[ω^×]2 

The noise covariance matrix is defined by:

 Qc= [σg2.I30303σbg2.I3] 

which becomes in a discrete case:

 Qd= [Q11Q12Q12Q22] 

with

 Q11= σg2.T.I3+σbg2.(I3.T33+(|ω^|T)33+2sin(|ω^|T)2|ω^|T|ω^|5. [ω^×]2 
 Q12= σbg2.(I3.T22+|ω^|Tsin(|ω^|T)|ω^|3. [ω^×]+(|ω^|T)22+cos(|ω^|T)1|ω^|4. [ω^×]2 
 Q22= σbg2.T.I3 

The propagation of the state covariance matrix is then:

 Pk|k1=Φk.Pk1.ΦkT+Qdk1 

Appendix B.2. Update

The update is performed in two steps as proposed by Suh [25]. The first step modifies the pitch and roll component by the use of the acceleration [25] (k is omitted for a sake of clarity):

 za=Ha.x+na 

The state vector is then only defined by:

 za=a 

and the covariance matrix is written:

 Ra= σa2.I3 

By adaptation of the proposal made by [22], we obtain:

 Ha=[[z^a×]03] 

where z^a is the theoretical acceleration computed from the predicted orientation:

 [z^a0]=q¯k|k1[g0]q¯k|k1* 

The residual is given by:

 ra=zaz^a 

and the associate covariance matrix is provided by:

 Sa= Ha.Pk|k1HaT+Ra 

The Kalman gain is then computed as:

 Ka= Pk|k1.HaT.Sa1 

The correction is then obtained by:

 Δx^a= [δθ^aΔb^a]= Ka.ra 

The corrective quaternion is then:

 δq¯^a=[12δθ^a1|12δθ^a|] 

and the quaternion update:

 q¯^a,k= δq¯^aq¯^k|k1 

Now, the gyroscope bias is updated as following:

 b^a,k=b^k|k1+Δb^a 

Then the angular velocity estimated can be improved by:

 ω^a,k=ωkmb^a,k 

The covariance matrix of the state vector is also updated by:

 Pa,k=Pk|k1Ka.Ha.Pk|k1 

The second step proposes a yaw correction based on the magnetometer measure m:

 zm=Hm.x+nm 

The state vector is only defined by:

 zm=m 

the covariance matrix by:

 Rm= σm2.I3 

and the measurement matrix by:

 Hm=[[z^m×]03] 

where z^m is the theoretical magnetic field computed from the orientation previously predicted:

 [z^m0]=q¯k|k1[h0]q¯k|k1* 

The residual is then:

 rm=zmz^m 

Suh proposes to apply this update only to the quaternion and not to the gyroscope bias by simplifying the state covariance matrix:

 Pm,k=[Pa,k(1:3,1:3)03,606,306,6] 

After that, the residual covariance matrix can be computed as:

 Sm= Hm.Pm,kHmT+Rm 

To limit the effect of the correction only to the yaw component, Suh [25] proposed to modify the computation of the gain as following:

 Km=[r3.r3T03,606,306,6]Pm,k.HmT.Sm1 

The correction is then:

 Δx^m= [δθ^m03,1]= Km.rm 

the new quaternion update:

 q¯^k= δq¯^mq¯^a,k 

and the new updated covariance matrix

 Pk=Pa,kKm.Hm.Pa,k 

Appendix C. Application of the Methodology to a MIMU of Tactical Grade

The same procedure was applied to another MIMU (MiscroStrain 3DM-GX4-25).

The good performance of this MIMU could be attested thanks to its bias instability assessed with the Allan variance method as seen in Table A1. The bias instability was of 10−4 rad/s, which is below 1.45 × 10−4 rad/s, the threshold under which a MIMU is characterized as being “tactical grade” [30].

The identification procedure could only be applied to slow intensity movements since the maximum angular velocity measured by this MIMU is 300°/s, which represents the mean value for the category “intermediate” intensity movements.

Table A1.

Values of measurement noise identified by the method of the Allan variance and Kalman parameters identified for slow movements.

σbg (rad/s) σg (rad/s) σa (m/s2) σm (µT)
Allan’s variance 1 × 10−4 1 × 10−3 2 × 10−2 0.6
Identification 0 2 × 10−4 1 4

As for the APDM MIMUs, Figure A2 depicts that the optimal behavior of the Kalman filter was obtained by respecting a certain ratio between σa/σb.

Figure A2.

Figure A2

RMSe between the orientation estimated with the optoelectronic system and the Kalman filter depending on the values of Kalman parameters σg and σa for the slow intensity movement.

The values of the Kalman parameters identified with the methodology presented in the paper are presented in Table A1. Once again, one can notice that the parameters identified are notably different from those estimated with the Allan variance method.

Table A2 presents the orientation error in terms of root mean squared error between the orientation obtained with the optoelectronic system and the orientation obtained (a) with the manufacturer algorithm (b) with our Kalman filter set with the parameters identified with the methodology described in the paper.

Table A2.

Orientation error for slow intensity movement.

RMSe (degree)
Manufacturer algorithm 0.8
Kalman filter set with identified parameters 0.4

According to this table, the orientation error resulting from the manufacturer algorithm, which was small, could nevertheless be divided by two with the Kalman filter and identification methodology proposed in the paper.

Author Contributions

Conceptualization, methodology, and validation A.N. and L.F.; Formal Analysis, A.N., L.F. and T.M.; Investigation, A.N.; Writing—Original Draft Preparation, A.N. and L.F.; Writing—Review & Editing, all; Supervision, T.M. and P.L.; Funding Acquisition, F.M. and P.L.

Funding

This research was partially funded by the French government research program “Investissements d’Avenir” through the Robotex Equipment of Excellence (ANR-10-EQPX-44).

Conflicts of Interest

The authors declare no conflict of interest.

References

  • 1.Muro-de-la-Herran A., Garcia-Zapirain B., Mendez-Zorrilla A. Gait analysis methods: An overview of wearable and non-wearable systems, highlighting clinical applications. Sensors. 2014;14:3362–3394. doi: 10.3390/s140203362. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Akhtaruzzaman M., Shafie A.A., Khan M.R. Gait analysis: Systems, technologies, and importance. J. Mech. Med. Biol. 2016;16:1630003. doi: 10.1142/S0219519416300039. [DOI] [Google Scholar]
  • 3.Iosa M., Picerno P., Paolucci S., Morone G. Wearable inertial sensors for human movement analysis. Expert Rev. Med. Devices. 2016;13:641–659. doi: 10.1080/17434440.2016.1198694. [DOI] [PubMed] [Google Scholar]
  • 4.Cuesta-Vargas A.I., Galán-Mercant A., Williams J.M. The use of inertial sensors system for human motion analysis. Phys. Ther. Rev. 2010;15:462–473. doi: 10.1179/1743288X11Y.0000000006. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Martin H., Newman M. The Limits of In-Run Calibration of MEMS Inertial Sensors and Sensor Arrays. NAVIGATION J. Inst. Navig. 2016;63:127–143. doi: 10.1002/navi.135. [DOI] [Google Scholar]
  • 6.Giacci F., Dellea S., Langfelder G. Capacitive vs. Piezoresistive MEMS Gyroscopes: A Theoretical and Experimental Noise Comparison. Procedia Eng. 2015;120:406–409. doi: 10.1016/j.proeng.2015.08.652. [DOI] [Google Scholar]
  • 7.Sabatini A.M. Estimating three-dimensional orientation of human body parts by inertial/magnetic sensing. Sensors. 2011;11:1489–1525. doi: 10.3390/s110201489. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Sabatini A.M. Kalman-filter-based orientation determination using inertial/magnetic sensors: Observability analysis and performance evaluation. Sensors. 2011;11:9182–9206. doi: 10.3390/s111009182. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Welch G.F. HISTORY: The Use of the Kalman Filter for Human Motion Tracking in Virtual Reality. Presence. 2009;18:72–91. doi: 10.1162/pres.18.1.72. [DOI] [Google Scholar]
  • 10.Mahony R., Hamel T., Pflimlin J. Nonlinear Complementary Filters on the Special Orthogonal Group. IEEE Trans. Autom. Control. 2008;53:1203–1218. doi: 10.1109/TAC.2008.923738. [DOI] [Google Scholar]
  • 11.Madgwick S.O.H., Harrison A.J.L., Vaidyanathan R. Estimation of IMU and MARG orientation using a gradient descent algorithm; Proceedings of the 2011 IEEE International Conference on Rehabilitation Robotics; Zurich, Switzerland. 29 June–1 July 2011; pp. 1–7. [DOI] [PubMed] [Google Scholar]
  • 12.Bergamini E., Ligorio G., Summa A., Vannozzi G., Cappozzo A., Sabatini A.M. Estimating orientation using magnetic and inertial sensors and different sensor fusion approaches: Accuracy assessment in manual and locomotion tasks. Sensors. 2014;14:18625–18649. doi: 10.3390/s141018625. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Fourati H., Manamanni N., Afilal L., Handrich Y. Complementary Observer for Body Segments Motion Capturing by Inertial and Magnetic Sensors. IEEE/ASME Trans. Mechatron. 2014;19:149–157. doi: 10.1109/TMECH.2012.2225151. [DOI] [Google Scholar]
  • 14.Schneider R., Georgakis C. How to NOT Make the Extended Kalman Filter Fail. Ind. Eng. Chem. Res. 2013;52:3354–3362. doi: 10.1021/ie300415d. [DOI] [Google Scholar]
  • 15.Foxlin E. Inertial head-tracker sensor fusion by a complementary separate-bias Kalman filter; Proceedings of the IEEE 1996 Virtual Reality Annual International Symposium; Santa Clara, CA, USA. 30 March–3 April 1996; pp. 185–194. [DOI] [Google Scholar]
  • 16.Kneip L., Scaramuzza D., Siegwart R. On the initialization of statistical optimum filters with application to motion estimation; Proceedings of the 2010 IEEE/RSJ International Conference on Intelligent Robots and Systems; Taipei, Taiwan. 18–22 October 2010; pp. 1500–1506. [DOI] [Google Scholar]
  • 17.Linderoth M., Soltesz K., Robertsson A., Johansson R. Initialization of the Kalman filter without assumptions on the initial state; Proceedings of the 2011 IEEE International Conference on Robotics and Automation; Shanghai, China. 9–13 May 2011; pp. 4992–4997. [DOI] [Google Scholar]
  • 18.Kok M., Hol J.D., Schön T.B. Using Inertial Sensors for Position and Orientation Estimation. arXiv. 2017. 1704.06053
  • 19.Keat J.E. Analysis of Least-Squares Attitude Determination Routine DOAO. Computer Sciences Corporation; Greenbelt, MD, USA: 1977. [Google Scholar]
  • 20.Wahba G. A Least Squares Estimate of Satellite Attitude. SIAM Rev. 1965;7:409–409. doi: 10.1137/1007077. [DOI] [Google Scholar]
  • 21.Allan D.W. Statistics of atomic frequency standards. Proc. IEEE. 1966;54:221–230. doi: 10.1109/PROC.1966.4634. [DOI] [Google Scholar]
  • 22.Trawny N., Roumeliotis S.I. Indirect Kalman Filter for 3D Attitude Estimation. Technical Report; University of Minneapolis; Minneapolis, MN, USA: 2005. [Google Scholar]
  • 23.Markley F.L., Cheng Y., Crassidis J.L., Oshman Y. Averaging Quaternions. J. Guid. Control Dyn. 2007;30:1193–1197. doi: 10.2514/1.28949. [DOI] [Google Scholar]
  • 24.Sabatini A.M. Quaternion-based extended Kalman filter for determining orientation by inertial and magnetic sensing. IEEE Trans. Biomed. Eng. 2006;53:1346–1356. doi: 10.1109/TBME.2006.875664. [DOI] [PubMed] [Google Scholar]
  • 25.Suh Y.S. Orientation Estimation Using a Quaternion-Based Indirect Kalman Filter with Adaptive Estimation of External Acceleration. IEEE Trans. Instrum. Meas. 2010;59:3296–3305. doi: 10.1109/TIM.2010.2047157. [DOI] [Google Scholar]
  • 26.Nasiri J. A Critical Review of the Market Status and Industry Challenges of Producing Consumer Grade MEMS Gyroscopes.pdf|Gyroscope|Microelectromechanical Systems. [(accessed on 1 March 2018)]; Available online: https://www.scribd.com/document/247752530/A-Critical-Review-of-the-Market-Status-and-Industry-Challenges-of-Producing-Consumer-Grade-MEMS-Gyroscopes-pdf.
  • 27.Wearable Sensors—APDM Wearable Technologies. [(accessed on 7 March 2018)]; Available online: https://www.apdm.com/wearable-sensors/
  • 28.Fan B., Li Q., Liu T., Fan B., Li Q., Liu T. How Magnetic Disturbance Influences the Attitude and Heading in Magnetic and Inertial Sensor-Based Orientation Estimation. Sensors. 2017;18:76. doi: 10.3390/s18010076. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Shuster M.D., Oh S.D. Three-axis attitude determination from vector observations. J. Guid. Control. 1981;4:70–77. doi: 10.2514/3.19717. [DOI] [Google Scholar]
  • 30.Passaro V.M.N., Cuccovillo A., Vaiani L., De Carlo M., Campanella C.E. Gyroscope Technology and Applications: A Review in the Industrial Perspective. Sensors. 2017;17:2284. doi: 10.3390/s17102284. [DOI] [PMC free article] [PubMed] [Google Scholar]

Articles from Sensors (Basel, Switzerland) are provided here courtesy of Multidisciplinary Digital Publishing Institute (MDPI)

RESOURCES