On the Interpretation of 3D Gyroscope Measurements
We demonstrate that the common interpretation of angular velocities measured by a 3D gyroscope as being sequential Euler rotations introduces a systematic error in the sensor orientation calculated during motion tracking. For small rotation angles, this systematic error is relatively small and can be mistakenly attributed to different sources of sensor inaccuracies, including output bias drift, inaccurate sensitivities, and alignments of the sensor sensitivity axes as well as measurement noise. However, even for such small angles, due to accumulation over time, the erroneous rotation interpretation can have a significant negative impact on the accuracy of the computed angular orientation. We confirm our findings using real-case measurements in which the described systematic error just worsens the deleterious effects typically attributed to an inaccurate sensor and random measurement noise. We demonstrate that, in general, significant improvement in the angular orientation accuracy can be achieved if the measured angular velocities are correctly interpreted as simultaneous and not as sequential rotations.
With the ongoing developments in gyroscope-manufacturing technology, their use in various fields is observably increasing [1–29]. 3D gyroscopes are integral components of inertial navigation units [5–8]; have been shown feasible for motion capture, classification, and analysis [9–24]; and are essential elements of the assistive, rehabilitative, and wearable health technology [21, 22]. However, the utility of 3D gyroscopes can be diminished without an associated meaningful interpretation of the measured values and computation of the angular orientation.
A 3D gyroscope measures the angular velocity of its rotation in a reference frame along its three sensitivity axes. For an ideal sensor, these outputs are equal to the projections of the rotation angular velocity on the sensitivity, that is, intrinsic coordinate system axes. In the measurement context, the sensor is hence simultaneously rotating around its three coordinate system axes. Properly combined, these three rotations are equivalent to the actual rotation of the sensor in the reference frame.
Misleading practices arise from interpreting the three measured angular velocities as being sequential, that is, Euler rotations. As the three angular velocities that a 3D gyroscope provides represent simultaneous rotations, in general, the use of Euler angles introduces a systematic error in the calculated angular orientation. It is only in the case of infinitesimal rotations, which are shown to be commutative, that the sequential and simultaneous rotations around orthogonal axes result in the same angular orientation [30, 31].
There are a number of literature contributions [23–28] that present otherwise promising applications of 3D gyroscopes that adopt the above-emphasized misleading interpretations. For this reason, we find it necessary to emphasize in more detail the realistic effects of the gyroscope measurement interpretation. Our objective is therefore to investigate the systematic error that arises from erroneously interpreting the 3D gyroscope measurements and quantify its effect on the accuracy of the computed angular orientation.
The paper is organized as follows. In Section 2, we resolve the problem of the correct interpretation of 3D gyroscope measurements by invoking the expressions for the rotation that is equivalent to the three simultaneous orthogonal rotations measured by a 3D gyroscope, as derived in , and present proper means for computing the angular orientation.
To isolate and quantify the deleterious effect of the erroneous rotation interpretation on the angular orientation accuracy, we consider, in Section 3, an ideal 3D gyroscope and a simple rotation at a constant angular velocity around a fixed rotation axis. In Section 4, we present angular orientation error reduction that can be achieved when using a real, imperfect 3D gyroscope in real-case measurements in which the described systematic error obfuscates the accuracy of the computed angular orientation along with typical errors attributed to an inaccurate sensor and random measurement noise.
Although the manufacturing technologies of low-cost gyroscopes is improving rapidly, these sensors have been shown to suffer from output bias drift and inaccurate sensitivities and alignments of the sensor sensitivity axes. As it is our aim to quantify the deleterious effect of the erroneous rotation interpretation, we here consider a properly calibrated sensor. Improving the accuracy of 3D gyroscopes has been the subject of a number of ongoing research works and is presented elsewhere [32–35]. Finally, in Section 5, we summarize our results and draw the conclusions.
In all subsequent sections, we obey the following notation rules: bold letters denote matrices and vectors, and large and small italics denote scalars.
2. 3D Gyroscope Measurements Interpretation
2.1. Simultaneous Rotations
Let us consider an ideal 3D gyroscope that rotates at constant angular velocity ω around a rotation axis v in a 3D reference frame. It provides measurements of simultaneous angular velocities ωx, ωy, and ωz around its three orthogonal sensor intrinsic coordinate system axes, x, y, and z, respectively. In [30, 36], we have derived a rotation vector Φ called Simultaneous Orthogonal Rotation Angle (SORA), which we can use to interpret the measured values correctly. The components of this vector are equal to the rotation angles of the three simultaneous rotations around the sensor axes: where ωx, ωy, and ωz are the three measured angular velocities; φx, φy, and φz are the rotation angles; and T is the measurement interval.
As long as the axis v of rotation is constant during the measurement interval T, the orientation and magnitude of vector SORA Φ (1) are respectively equal to the axis and angle of the actual rotation of the gyroscope. It holds that
From (1)–(3), we can conclude that the gyroscope measures the projections of its rotation angular velocity vector on its sensitivity axes. Note that, in general, due to rotation noncommutativity, the rotation (1) and angular velocity vectors (4) cannot be considered as real vectors. This is possible only in the particular case of a constant rotation axis.
Using the rotation axis (2) and angle (3), we can compute the angular orientation of the sensor intrinsic coordinate system axes in the reference frame. We introduce R(φ,v) to denote a 3 × 3 rotation matrix associated with the axis (2) and angle (3) of rotation: where c and s respectively denote cos(φ) and sin(φ).
We further introduce 3 × 3 matrices Sinit and to represent the sensor initial and final orientation in the reference frame. The columns of Sinit and are 3 × 1 unit vectors representing the initial and final orientations, respectively, of the sensor coordinate axes. We can write
2.2. Sequential Rotations
As opposed to the three rotations represented with SORA (1), Euler angles represent a sequence of three elemental rotations, that is, rotations about the axes of the (intrinsic or reference) coordinate system. If only rotations around different intrinsic coordinate system axes are considered, six sequences are possible: x-y-z, y-z-x, z-x-y, x-z-y, z-y-x, and y-x-z. Because rotations are in general not commutative, each of these six sequences brings to a different final angular orientation, none of which is correct when all three rotations are simultaneous, as is the case when the 3D gyroscope rotates around an arbitrary axis. Using any of these sequences in calculating the angular orientation of the sensor introduces a systematic error.
As the three coordinate axes of the sensor are equivalent, we can use any of the aforementioned sequences to quantify the error in the calculated angular orientation. We chose the sequence z-y-x, also known as the aerospace sequence with rotation angles called yaw, pitch, and roll.
Using angles φz, φy, and φx obtained with a 3D gyroscope in place of the yaw, pitch, and roll, respectively, we can calculate the final orientation of the sensor according to the sequential rotation interpretation as
RE(φz, φy, φx) (7) denotes a 3 × 3 Euler rotation matrix composite: where sk and ck respectively denote sin(φk) and cos(φk), k representing one of the axes, x, y, or z.
The orientation of an aircraft may indeed be represented in a convenient and intuitive way with the three Euler orientations. However, Euler angles are not equal to the angles measured with a 3D gyroscope, and obviously, their use in this context is erroneous. Comparing (5) and (8), we can conclude that rotation matrices for simultaneous (5) and sequential (8) rotation interpretations are not equal and that relying on the latter will not yield the correct result in the case of 3D gyroscope measurements.
Let us look at a simple illustrative example. Suppose that the sensor rotates with an angular velocity ω = 360°/s around the unit axis for T = 1 s. After this rotation time, the orientation of the sensor is obviously equal to its initial orientation; thus, the rotation matrix for the simultaneous interpretation (5) is actually, in this case, the identity matrix. We can write
Substituting these angles for the yaw, pitch, and roll Euler angles in (8) yields
The obtained rotation matrix RE(φz, φy, φx) is not equal to the identity matrix I and would obviously bring to an incorrect angular orientation:
In practice, much smaller angles of rotations are used in calculations of final angular orientation. As the rotation angles become ever smaller, the difference between the simultaneous and sequential rotation results becomes ever more negligible. However, even for small angles, the error in the computed angular orientation accumulates over time and can become significant, as we will present and discuss in the next sections.
3. Angular Orientation Systematic Error
3.1. Angular Orientation Error Measures
We express the angular orientation error ε in terms of the orientation deviation angle, that is, the angle of a rotation that would correct the calculated orientation of the sensor: where Sfin is the 3 × 3 matrix of the actual final orientation and is the 3 × 3 matrix of the calculated state.
Due to integration, the error in the computed angular orientation accumulates over time. To make the results comparable across different simulations and measurements, we normalize the deviation angle ε (14) with respect to the total time of rotation T:
To isolate the effect of the erroneous rotation interpretation, we consider an ideal 3D gyroscope that provides time-discrete samples of angular velocities at sample moments nTs, where Ts is the sampling interval: and fs is the sampling rate. We thus obtain N = T fs samples of the angular velocity vector ω (4).
We further consider the sensor and reference frame coordinate axes to be initially aligned. The initial orientation of the sensor is hence given by the identity matrix:
For this investigation, we finally consider that the sensor rotates for T = 1 s with a constant angular velocity ω = 360°/s, around the unit axis:
For this example, the initial and actual final orientations of the sensor are hence identical. We can write
For each of the N rotation samples, the sensor rotates for an angle Δφ = 360°/N around the constant axis v. As we are assuming the gyroscope is accurate and the rotation axis is constant throughout the rotation, we can conclude that all samples of the measured angular velocities are equal to and that all angles of rotations around the sensor axes are equal to
We can finally conclude that for all samples n, the angle of rotation calculated according to (3) is equal to
It is obvious that combining all N rotations in a single rotation matrix would yield the identity matrix I. Considering this and (19) for calculating the resulting angular orientation (6), we can hence write
By substituting for in (14), we can calculate the angular orientation error for the sequential rotation interpretation. Because both the initial and actual final angular orientations of the sensor are given with the identity matrix (19), (14) simplifies to
Total measurement time is set to T = 1 s, so the normalized deviation angle (15) is equal to
3.3. Results and Discussion
The normalized orientation deviation angles εnorm obtained according to (26) for different sampling frequencies decreasing from 10,000 Hz to 4 Hz in a logarithmic scale are presented in Figure 1. Different sampling frequencies correspond to different angles of the gyroscope rotations Δφ, increasing from 0.036° to 90°.
As expected, the results obtained show that the angular orientation error that is a consequence of erroneously interpreting the three simultaneous orthogonal rotations measured using a 3D gyroscope as sequential increases with the magnitude of the angles of the considered rotation steps.
We can observe that by substantially lowering the sampling frequency, that is, enlarging the angle of individual rotation Δφ, the magnitude of the error can become so significant that the results become completely unreliable, even after only one second of rotation. In the considered measurement scenario, for a sampling frequency of 4 Hz, the individual rotation angle is Δφ = 90°. For an angle of that magnitude, the normalized error in the angular orientation calculated according to the sequential rotation interpretation is εnorm = 73.16°/s.
Due to accumulation over time, the absolute error in the calculated angular orientation cannot be neglected, even for small angles. For example, for a common sampling frequency fs = 2048 Hz, the individual rotation angle is 0.176° and the systematic error in the computed angular orientation ε exceeds 6° after one minute of rotation.
It is also worth noting that as the rotation axis is constant throughout the rotation, by correctly interpreting the measured angular velocities, we can compute the final angular orientation in a single step. If applied when interpreting the measured rotations as sequential, the same approach would result in even larger errors than presented here.
4. Real-Case Measurement
To observe the implications of rotation interpretation in real-case measurements, in which the described systematic error obfuscates the accuracy of the computed angular orientation along with typical errors attributed to an inaccurate sensor and random measurement noise, we rely on real motion tracking.
We used the MEMS 3D gyroscope ITG3200-3, manufactured by InvenSense (Sunnyvale, CA, USA) , providing for 16-bit outputs in a ±2000°/s range. The sampling rate of the sensor’s analog-to-digital converter was set to 1000 Hz. However, to relate to a real-time measurement environment more realistically and to support computational efficiency, the obtained signals were downsampled to fs = 50 Hz. Prior to the measurements, we performed static calibration of the sensor according to the procedure described in .
We performed seven measurements. In each of these, we manually rotated the sensor. At the end of each measurement, we positioned the sensor in the exact same orientation as it was initially. This procedure enabled us to estimate the angular orientation accuracy as the deviation of the sensor’s final (computed) orientation from its initial orientation and compare both interpretations’ results in a simple manner, avoiding the use of additional equipment.
We rotated the sensor in such a way that for each measurement, the dynamics of the rotation was larger than that for the previous measurement. As has been elaborated in Section 2, as long as the axis of the gyroscope rotation is constant during the measurement interval, the orientation and the magnitude of vector SORA (1) are respectively equal to the axis and angle of the actual rotation of the gyroscope. For a general measurement scenario, however, it is necessary to account for possible rotation axis changes during Ts. By progressively enlarging the dynamics of the measured rotations, we could quantify the effect that these (immeasurable) rotation axis changes have on the angular orientation accuracy.
Otherwise than stated, the motion of the gyroscope, including its rotation, was arbitrary. The obtained angular velocities are presented in Figure 2.
By assuming that, on average, the change in the angular velocity between two consecutive samples reflects the change during samples, that is, the measurement intervals n, we can use the following measure of angular velocity dynamics: to represent rotation axes changes during Ts.
Different sources of measurement inaccuracies including imperfect sensor calibration, noise, and immeasurable rotation axis changes obviously introduce errors in the angular orientation computed according to both the simultaneous and the sequential rotation interpretations. As the initial and actual final angular orientations of the sensor in all of the seven performed measurements were identical, we could calculate the respective deviation angles (14) as where ε(seq) is the orientation deviation angle when sequential and ε(sim) when simultaneous rotations are considered. We further obtained the normalized deviation angles for both respective interpretations, and , by inserting (28) into (15). We expect all of these errors to be affected by the angular velocity dynamics (27).
To evaluate the gain of using the correct interpretation of 3D gyroscope measurements, we introduce Ferr to denote the angular orientation error reduction factor:
4.2. Results and Discussion
The results are presented in Figure 3. For the simultaneous rotation interpretation, the error in the calculated angular orientation ranges from 0.034° to 1.250° per second of rotation and can become significant over time. However, the error that results when interpreting rotations as sequential is much larger and ranges from 0.132° to 16.152° per second of rotation. An error reduction of 74% to 98% is achievable if the gyroscope measurements are interpreted correctly.
Considering the applicative value of these results, we can point out the following: even for the largest error obtained by interpreting the measured rotations as simultaneous (1.250°/s), we can rotate the sensor up to almost 13 times longer before reaching the error of the sequential rotation interpretation approach (16.152°/s).
The results provided show that the error in the angular orientation obtained according to both interpretations of rotations, in general, increases with the dynamics of the angular velocities, which reflect the changes of the rotation axis during measurement intervals. This error is, in essence, a measurement error and cannot be computationally taken into account, regardless of the interpretation method employed. However, even for the most extreme conditions here considered, the error reduction factor is significant.
Due to different sources of motion sensor inaccuracies, accurate position estimation is a delicate task. Erroneous interpretation of the values measured with a 3D gyroscope only extends the deleterious effects on the estimated position of the sensor. Estimating the angular orientation by interpreting the three simultaneous rotations as sequential, that is, Euler, may seem straightforward. However, the angles measured with a gyroscope are not, in general, equal to the angles of the elemental Euler rotations. We have shown that not only is interpreting simultaneous rotations as sequential theoretically erroneous, it introduces a significant systematic error in the angular orientation when the rotation angles become large.
For a rotation rate of 360°/s when sampled at 2048 Hz, the angular orientation error exceeds 6° after one minute of rotation. For the lowest sampling rate considered (4 Hz) for the same motion, the computed angular orientation is entirely unreliable as the error exceeds 73° after only one second of rotation. We have shown that significant accuracy improvements can be achieved in the real-case measurement scenario in which this systematic error only extends the deleterious effects of sensor inaccuracies in a noisy environment.
It is necessary to note that the simultaneous rotation interpretation and angular orientation computation presented in this article are orientated towards eliminating the systematic error that arises from the erroneous rotation interpretation. Different interpretations cannot compensate for other sources of inaccuracies.
Besides random errors attributed to an inaccurate sensor, an error that cannot be eliminated is a consequence of angular velocity changes between the sampling moments. This error is in its essence a measurement error, and rather than computationally, it can be adequately accounted for by suitably reducing the measurement interval, that is, enlarging the sampling frequency. Unfortunately, this opposes the restriction of the energy autonomy of the devices that utilize gyroscopes for frequent or continuous everyday motion tracking and will demand an ever-lower sampling frequency.
However, even when the angular velocity changes during the measurement intervals, for the illustrative motion considered in this article, an error reduction of 74% to 98% is achievable if the 3D gyroscope measurements are interpreted correctly and the sensor itself is properly calibrated. For more accurate high-end gyroscopes, this factor would be even larger. Consequently, we can rotate the sensor for a significantly longer time before reaching the error of the sequential rotation computation approach.
With these observations, we can confirm our primary assumption; that is, in general, significant error reduction can be achieved with correct interpretation of the 3D gyroscope measurement. We can finally conclude that by adopting the practices presented in this article, more accurate motion tracking and analysis can be performed.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
O. J. Woodman, “An introduction to inertial navigation,” Tech. Rep., University of Cambridge Computer Laboratory, Cambridge, UK, 2007, UCAM-CL-TR-696, 2007, http://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-696.html.View at: Google Scholar
D. Roetenberg, H. J. Luinge, and P. Slycke, Xsens MVN: Full 6DOF Human Motion Tracking Using Miniature Inertial Sensors, Xsens Tech, Netherlands, 2013, http://www.xsens.com/images/stories/PDF/.
P. Sarcevic, Z. Kincses, S. Pletl, and L. Schaffer, “Distributed movement recognition algorithm based on wrist-mounted wireless sensor motes,” in Proceedings of European Wireless 2015; 21th European Wireless Conference, pp. 1–6, Budapest, Hungary, 2015.View at: Google Scholar
D. Giansanti, G. Maccioni, and V. Macellari, “The development and test of a device for the reconstruction of 3-D position and orientation by means of a kinematic sensor assembly with rate gyroscopes and accelerometers,” IEEE Transactions on Biomedical Engineering, vol. 52, no. 7, pp. 1271–1277, 2005.View at: Publisher Site | Google Scholar
H. Negoro, M. Ueda, K. Watanabe, K. Kobayashi, and Y. Kurihara, “Measurement and analysis of golf swing using 3D acceleration and gyroscopic sensors,” in 2011 Proceedings of SICE Annual Conference, pp. 1111–1114, Tokyo, Japan, 2011.View at: Google Scholar
J. B. Kuipers, Quaternions & Rotation Sequences: A Primer with Applications to Orbits, Aerospace and Virtual Reality, Princeton University Press, Princeton, NJ, USA, 2nd edition, 1999.
D. Giansanti and G. Maccioni, “Guidelines for calibration and drift compensation of a wearable device with rate-gyroscopes and accelerometers,” in 2007 29th Annual International Conference on the IEEE Engineering in Medicine and Biology Society, pp. 2342–2345, Lyon, 2007.View at: Publisher Site | Google Scholar
S. Tomažič and S. Stančin, “Simultaneous orthogonal rotation angle,” Journal of Electrical Engineering and Computer Science, vol. 78, pp. 7–11, 2011.View at: Google Scholar
InvenSense ITG3200–3, Integrated triple-axis digital-output gyroscope, InvenSense, Sunnyvale, CA, USA, http://www.invensense.com/mems/gyro/itg3200.html.