What is it about?

This article compares three different algorithms used to compute Euler angles from data obtained by the angular rate sensor (e.g., MEMS gyroscope)—the algorithms based on a rotational matrix, on transforming angular velocity to time derivations of the Euler angles, and on unit quaternion expressing rotation. Algorithms are compared by their computational efficiency and accuracy of Euler angles estimation. If the attitude of the object is computed only from data obtained by the gyroscope, the quaternion-based algorithm seems to be most suitable (having similar accuracy as the matrix-based algorithm, but taking approx. 30% fewer clock cycles on the 8-bit microcomputer). Integration of the Euler angles’ time derivations has a singularity, therefore is not accurate at the full range of object’s attitude. Since the error in every real gyroscope system tends to increase with time due to its offset and thermal drift, we also propose some measures based on compensation by additional sensors (a magnetic compass and accelerometer). Vector data of mentioned secondary sensors has to be transformed into the inertial frame of reference. While the transformation of the vector by the matrix is slightly faster than doing the same by a quaternion, the compensated sensor system utilizing a matrix-based algorithm can be approximately 10% faster than the system utilizing quaternions (depending on implementation and hardware).

Featured Image

Why is it important?

By comparing relative errors of each mentioned algorithm we can see that the worst algorithm is direct Euler angles integration due to its singularity. The precise version of the quaternion-based algorithm is slightly faster than the precise matrix-based algorithm. The fast version of the quaternion-based algorithm at lower sampling frequency is also more accurate than the matrix-based algorithm (see Table 3). The difference in accuracy between fast and precise versions of the same algorithm decreases with a sampling frequency (see Figure 7 and Figure 12). The choice of the proper algorithm depends on: Available computational power (CPU) and maximal sampling frequency of the sensors (which reflects in the overall cost of the sensor system and its accuracy). At lower sampling frequency the fast quaternion-based algorithm is more precise than the fast matrix-based algorithm. Precision requirements (in order to achieve long-term stability the compensated system with sensor fusion has to be used). Amount of vectors transformed from the non-rotated coordinate system to rotated coordinates and vice versa (transformation performed by the matrix is faster).

Read the Original

This page is a summary of: Improving the Precision and Speed of Euler Angles Computation from Low-Cost Rotation Sensor Data, Sensors, March 2015, MDPI AG,
DOI: 10.3390/s150307016.
You can read the full text:

Read

Contributors

The following have contributed to this page