Development of a quaternion-based algorithm to process data in
robotics applications

Industrial Presenter: Jacqueline Ashmore, TIAX LLC

Reliable data about the orientation and location of a device is
needed, and this information can be determined using measurements from inertial
and magnetometer sensors, in combination with gyros. Typically a three axis accelerometer,
a three-axis magnetometer, and a gyro will be employed for each physical component
which is to be tracked. The readings from these sensors must be filtered and
transformed to provide useful data. We are concerned here with transforming the
readings from the moving sensor frame into the Earth’s frame. In general,
it is useful for the transformations to be feasible for all orientations
of the device, and for them to be achieved with computational efficiency.

A sensor attached to the device gives readings of the measured acceleration,
angular rate, or magnetic field in the moving sensor frame from three axes
which are not exactly orthogonal. An algorithm is required to

calibrate the sensor readings;

process data from the sensor to determine the readings in the Earth’s frame,
accounting for both the nonorthogonality of the sensor axes and the necessary
transformations from the sensor frame to the Earth’s frame;

This algorithm has been formulated using Euler angles, which have the advantage of
relative simplicity but the disadvantage of the occurrence of singularities in the
transformations, which limits the range of readings that can be processed accurately.
Therefore a more useful algorithm is based on quaternions, which use complex four-dimensional
vectors [1,2]. The advantages of quaternions are that no singularities occur in the
transformations, i.e., all readings can be converted from the sensor to the
Earth’s frame, and the manipulations are computationally less expensive.
TIAX is asking for development of the necessary mathematical framework.
We would also find it useful to have a Matlab code that implements the
necessary calibrations and transformations. The code may use the robotics
toolbox for Matlab that can be downloaded from the web [3].
This problem relates to motion control in robotics, as well as in other moving objects.