Abstract
This research aims to establish the properties of the directional cosines and quaternion parameters to examine the proper scale, inclination, and numerical drift errors in a four-dimensional space. The research uses transformation matrices in the four-dimensional space whose elements are the directional cosines or quaternions. The kinematic equations are derived in terms of both directional cosines and quaternions. Applying the Kalman filter allows us to minimize the measurement error and refine the numerical calculation. The observation of the Euler angle covariance matrix takes on a crucial feature in the design of inertial navigation systems vital for analyzing efficient attitude.
1 Introduction
Non-linear functional measurements can evaluate the coordinates of a point in three-dimensional space [1]. The coordinates in one frame can be represented with other coordinates of another structure [2]. A helpful model represents the coordinate transformation model, which connects the two frames [3]. The task is to transform the coordinates. The transformation approach contains practical complexities and unknown error patterns [4]. A model can be helpful, but it may contain errors. Repeated measurements, cross-correlation, or hypothesis testing may select or validate the model [5].
The transformation of coordinates, rotation, and attitude in navigation can be developed using direction cosine matrix, quaternions, and Euler angles [6]. A sequence of 3 angles can represent a rotation in space. Formulations with the direction cosine matrix and quaternions can avoid singularities and non-linearities, especially for processes with not sufficiently small angles. Rotational sequences have 3 degrees of freedom. Quaternions have 4 variables. The above four variables represent any rotation without singularity. In fact, the definition of Euler angles considers the sequence of rotations. Quaternions represent a 4-dimensional mathematical object to represent the 3D orientation. Quaternions ensure that each orientation is uniquely represented. The difference between Euler angles and quaternions will be explained in next section. The stochastic model of measurement errors can develop a statistically significant inference; identify variables that contain errors; evaluate the statistical properties of mistakes. This research aims to establish the properties of directional cosines and quaternion parameters to examine appropriate errors of scale, inclination and numerical drift in a four-dimensional space. The application of the Kalman filter allows us to minimize the measurement error and refine the numerical calculation.
2 Theory of rigid body dynamics
2.1 Rotation sequences by Euler angles
Consider two three-dimensional frame of reference B and I. The Euler angles are the angles that we need to rotate frame I three times to obtain another attitude (frame B). Euler’s three rotations employ the axes of coordinates. If the frame I rotates to frame B, the rotation of frame I is about the X-axis, Y-axis and Z-axis of frame I (Figure 1).
where

Euler’s three rotations.
The total sequence of three rotations is 12.
2.2 Relationship between direction cosine matrix and Euler angles
The Euler angles
The rotation sequence Z → Y → X offers the following relation:
The Euler angles ϕ, θ, and ψ consider the angles for three physical rotations
2.3 Euler’s eigenaxis rotation
The quaternions identify the axis and the angles of rotation about the Euler’s angles.
where θ denotes the rotation angle; the terms
The following relation indicates the resultant matrix:
The quaternions satisfies the following condition:
The relation (8) confirms the quaternions.
2.4 Inverse transformation
An orthonormal matrix satisfies the following condition:
The symbol I indicates the identity matrix and C T the transpose of matrix C . All direction cosine matrices are orthonormal (Eq. (9)). The inverse matrix of an orthonormal matrix is equivalent to transpose.
Therefore, the transposed matrix can be used to find the inverse matrix of a directing cosine matrix easily.
2.5 Conversion of parameters
The following relationship is obtained by Eq. (7)
or
The term θ is found as
The term ψ becomes:
2.6 Rotational kinematic equations
The cross product of two vectors
If the body frame rotates at the velocity
with
The following equation shows the kinematic equation for the Euler angles
The right hand side of the equation presents cosθ in the denominator. The Eq. (19) is not valid for θ = ±90°, because cos 90° = 0. The Eq. (19) cannot be divided by zero. Considering the
The quaternions can avoid the problem of singular point. By multiplying the inverse matrix of the directional cosine matrix on both sides of the Eq. (18) and using the orthonormality property, the Eq. (18) turns into:
Expanding and rearranging the left side of (21) yield ω x , ω y and ω z
The quaternions offer the following formula:
or in matrix form
Expanding and rearranging the Eq. (24) offers the following relation
The kinematic equation is available by the quaternions
2.7 Time derivative of vector
The derivative of vector
the derivative of vector
2.8 Rotational kinematic equations
The vectors
The kinematic equation of rotation is the following relation:
If the body frame coincides with the principal-axes, the angular momentum is
Substituting the Eqs. (32) into (31) it follows
2.9 Translational equations of motion
The
or
The kinematic equation of translation becomes
3 Kinematic equation of Euler angles
The direction cosine matrix for Euler angles
with
from which
or
The next kinematic equation consider the following relation:
for which
or
Solve the Eq. (43) for
From direction cosine matrix
or
from which
and
The system of Eqs. (40), (44) and (48) provides the kinematic equation for the Euler angles
4 Prediction by Kalman filter
Sensor groups for acceleration, angular rate, and magnetic field strength are part of the mechanical system. The Figure 3 shows the theoretical background of the proposed approach. Kalman filter is an algorithm to obtain the estimate with some sophisticated formulae through multiple steps. The estimate is obtained from the sum of the prediction average or predicted

Theoretical background.
The weights
Error covariance
The relationship between the estimate
In Kalman filter, the prediction process is also included. Prediction is a separate process from estimation and the system model is crucial:
The performance of Kalman filter varies. It depends on how close the system model is to the actual system:
5 Experimental set-up
The current experiments examine the effect of standard flight maneuvers, such as tack, yaw, take-off, and landing of the aircraft. The measurements concern the accelerations and the Euler angles of the aircraft. The measuring chain consists of the following components: Arduino MKR NB 1500, Arduino MKR IMU shield, and Arduino MKR GPS shield. The Arduino MKR IMU shield has a sampling frequency of 3 Hz, and the Arduino MKR IMU shield has a sampling frequency of 200 Hz (Figure 4). The SV 111 multi-frequency vibration calibrator enables the calibration of the Arduino MKR IMU shield to ISO 8041. The SV 111 calibrator allows calibration checks at different frequencies from 16 Hz up to 640 Hz. The calibration level varies from 1 m/s2 to 10 m/s2. The shaker can be loaded with a weight of up to 1 kg at 16 Hz. The experimental investigation concerns the flight maneuver to describe a circular trajectory (Figure 5). The Figure 3 shows the flow diagram for the stages in this experiment.

Experimental set-up with Arduino MKR NB 1500, Arduino MKR IMU shield and Arduino MKR GPS shield.

Flight maneuver.
6 Results
The orientation of a mechanical system can be absolute or relative. The final measure provides direction concerning the magnetic north. Absolute and relative orientation sensors integrate rotation via an accelerometer correction factor, detecting the influence of gravity. The orientation sensor also uses the magnetometer to orient itself concerning the magnetic field. By contrast, relative measurement uses the accelerometer and gyroscope without the aid of a magnetometer to provide absolute feedback. The proposed algorithm estimates the position and orientation of mechanical system by merging the data of an inertial measurement unit (IMU) and a global positioning system (GPS). The sampling frequencies of the gyroscope accelerometer in the IMU have fixed sampling rates. The GPS sampling rate may differ from the IMU sampling rate. The sampling frequency of the IMU (accelerometer and gyroscope) is 100 Hz in the proposed simulation. The GPS sampling rate is 10 Hz (Figure 6). The pitch and the yaw angle show singular points where the Euler angles don’t predict the behavior of the mechanical system. The singolar point is the value of yaw angle at 25.47 s (Figure 6). The yaw angle is 179.79° at 25.47 and it becomes −179.87° at 25.51 s. For against, the parts of quaternion have no singular points (Figure 7).
The IMU and GPS melt filter uses an extended Kalman filter to trace the orientation through the sensors’ quaternions, position, speed, and distortions (Figure 7).
The proposed algorithm predicts forward states concerning current accelerometer and gyroscope data and updates the error covariance of the extended Kalman filter.
Measurement noise affects the reading of IMU and GPS signals and generates uncertainty in the dynamic model.
Estimating the mean quadratic error ensures convergence between the position and actual and estimated orientation (Figure 8). The Figure 9 offers the angular velocity array from an array of quaternions.
7 Discussion
The process model predicts the state vector’s evolution and describes the random variable’s influence. The process noise includes the error correction by a Kalman filter (Figure 10). Note that a priori uncertainty in the initial state, covariant error, and gain only affect the estimate for a relatively short time. Using Kalman filtering decreases the noise influences of measurements on the final error level reached. The introduction of the Kalman filter has a very substantial advantage as an optimal estimator in the presence of noise. The disadvantage of the Kalman Filter is that it works on the prediction-correction model used for linear and time-variant or time-invariant systems. The prediction model involves the actual design and the process noise. The upgraded model updates the predicate or estimated value with the observation noise. The analysis of the covariance matrix of the Euler angles inferred by the direction cosine matrix approach indicates the numeric and inclination error. The observation of the covariance matrix is crucial in the design of inertial navigation systems vital for the calculation of efficient attitude.
8 Conclusions
Tracking systems provide a direct view of mechanical systems. Loss of GPS signal is hazardous. Measurements using more sensors allow the location of the mechanical systems. The proposed inertial navigation system uses IMU sensors, such as accelerometer, gyroscope, and magnetometer. The proposed approach approximates the location of the mechanical systems by using the predicted sensors via the Kalman filter. The parts of quaternion have no singular points unlike Euler angles. The computational efficiency of the process model implements a quaternion approach to describe the rotation of rigid bodies.
-
Research ethics: Not applicable.
-
Author contributions: The author has accepted responsibility for the entire content of this manuscript and approved its submission.
-
Competing interests: The authors state no competing interests.
-
Research funding: None declared.
-
Data availability: Not applicable.
References
[1] B. Juttler, “Visualization of moving objects using dual quaternion curves,” Comput. Graph., vol. 18, no. 3, pp. 315–326, 1994. https://doi.org/10.1016/0097-8493(94)90033-7.Search in Google Scholar
[2] J. B. Kuipers, Quaternions and Rotation Sequences: A Primer with Applications to Orbits, Aerospace, and Virtual Reality, Princeton, NJ, Princeton University Press, 1998.10.1515/9780691211701Search in Google Scholar
[3] X. Yun, M. Lizarraga, E. R. Bachmann, and R. B. McGhee, “An improved quaternion–based Kalman filter for real–time tracking of rigid body orientation,” in Proceedings 2003 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2003) (Cat. No. 03CH37453), vol. 2, IEEE, 2003, pp. 1074–1079.10.1109/IROS.2003.1248787Search in Google Scholar
[4] E. Kraft, “A quaternion–based unscented Kalman filter for orientation tracking,” in Proceedings of the Aixth International Conference of Information Fusion, vol. 1, Cairns, IEEE, 2003, pp. 47–54.10.1109/ICIF.2003.177425Search in Google Scholar
[5] J. S. Dai, “An historical review of the theoretical development of rigid body displacements from Rodrigues parameters to the finite twist,” Mech. Mach. Theory, vol. 41, no. 1, pp. 41–52, 2006. https://doi.org/10.1016/j.mechmachtheory.2005.04.004.Search in Google Scholar
[6] E. Pennestri and P. Paolo Valentini, “Dual quaternions as a tool for rigid body motion analysis: a tutorial with an application to biomechanics,” Arch. Mech. Eng., vol. 57, no. 2, pp. 187–205, 2010. https://doi.org/10.2478/v10180-010-0010-2.Search in Google Scholar
© 2024 the author(s), published by De Gruyter, Berlin/Boston
This work is licensed under the Creative Commons Attribution 4.0 International License.
Articles in the same Issue
- Frontmatter
- Research Articles
- Error analysis of inertial navigation based on quaternion approach
- Novel robot arm concept for lightweighting high-performance machinery
- On the design of unconventional testing machines for engineering testing – the case study of advanced joining processes unit
Articles in the same Issue
- Frontmatter
- Research Articles
- Error analysis of inertial navigation based on quaternion approach
- Novel robot arm concept for lightweighting high-performance machinery
- On the design of unconventional testing machines for engineering testing – the case study of advanced joining processes unit