1. Introduction
Accurate orientation is essential for the locating and tracking of moving objects relative to a given frame in various kinds of applications, such as unmanned aerial vehicle (UAV) navigation [
1], autonomous underwater vehicle (AUV) [
2], self-driving cars [
3], intelligent robots [
4], wearable devices [
5], and human position tracking [
6,
7,
8]
etc., in military and industrial areas. Inertial sensors, such as the gyros and accelerometer make it possible to determine the orientation of moving object by measuring kinetic physical quantities (acceleration and angular rate,
etc.) without any external additional information and other restrictions [
9]. Gimbaled gyros, fiber optic gyros, and laser gyros have been successfully used to provide the high-precision movement information for the aircraft and missile systems in military and aviation industries. Given an initial assumption of the orientation, gyros can provide accurate orientation information via integrating the angular rates of the moving object numerically [
10]. However, high-performance gyros are usually very expensive and bulky. Even the access to these devices may be limited. With the rapid expansions of the civilian and consumer markets, more and more micro-electro-mechanical system (MEMS)-based gyros are used for the low-precision orientation determination, benefited from their low price, small size, low-power dissipation, and relatively high reliability [
11].
However, due to the inherent noise and drifts with time, there are considerable cumulative errors when only the gyros are used for the orientation determination. Various kinds of time series models are used to estimate the stochastic process of the gyro [
12]. All of the published literature shows that the cumulative errors cannot be eliminated only according to the stochastic model of the gyro. Even for the extremely expensive MEMS gyros, the cumulative errors still cannot be neglected. Accordingly, it is necessary to integrate the gyro with some other sensors which there are no drifts and cumulative errors existing. Yun,
et al. proposed a factored quaternion method for the orientation estimation [
13]. Derivations of half-angle formulas were proposed in their paper. Taking advantage of the gravity decomposition, attitude angles (namely, the pitch and roll angles) are easily obtained from the accelerometer. Sequentially, the heading angle is available when the magnetometer is used. However, the gravity is coupled with the kinematic accelerations so strongly that it cannot be separated from the accelerometer outputs accurately, especially in the case of long-term high dynamics. Simultaneously, the geomagnetic field is very susceptible to the additional magnetic field induced by surrounding hard or soft magnet materials [
14]. Due to the deviations among the directions of the geomagnetic field in different locations, it is not appropriate to use the magnetic data for the pitch and roll estimation. All the reasons above make the accelerometer and magnetometer play the role of aided sensors.
Nowadays, typical MEMS-based orientation systems usually consist of three single-axis gyros and an electronic compass which includes a tri-axis accelerometer and a tri-axis magnetometer [
15,
16,
17]. It is crucial to develop appropriative embedded data fusion solutions for the orientation systems. The Kalman filter (KF) has already become the most commonly used sensor fusion technique for MEMS orientation systems. Various filter models were developed for different orientation representations, such as the direction cosine matrix, Euler angles, and quaternion. To simplify the implementation of KF, Zhu,
et al. developed a linear KF in which the state vector was composed of the gravity and geomagnetic field in body frame [
18]. A linear Kalman model was designed and the effect of the forgetting factor on the time lag was also investigated in their paper. Han and Wang proposed an Euler angle errors-based method to express errors in the local level frame rather than the body frame so as to achieve a linear KF [
19]. Though the nonlinearity problem was avoided, the observation model was still faced with the singularity problem in their approach when the pitch angle gets through the area near ±π/2. Li and Wang developed an improved linear KF based on the psi-angle propagation equation [
20]. The residuals of heading angle and accelerations were defined as the observation vector. In their paper, an adaptive gain is tuned for the KF according to the dynamic scale determined by the accelerometers when the system is in a high dynamic mode. However, not only the heading, but also that of the pitch and roll, would be affected if the magnetometer measurements were used with the accelerometer measurements directly. Furthermore, Sabatelli,
et al. designed a two-stage extended Kalman filter (EKF) to calculate the attitude angles and the heading angle separately [
21]. The accelerometer was used for the attitude determination in the first stage filter and the magnetometer was used for the heading correction in the second one. Due to the nonlinearity of the measurement equations in their method, high-order matrix operations lead to considerable increases in iterative computations eventually. Instead of implementing EKF, we designed an unscented Kalman filter (UKF) to obtain the high-accuracy indoor heading estimation in our previous works [
22]. The UKF was deemed to be more accurate and less computationally costly than EKF, while too many trigonometric functions and Taylor expansions greatly increased the complexity of system. What is worse, the singularity problem was unavoidable in the UKF-based method.
In this paper, we focused on the requirements of a complete system for the low-cost orientation determination. A novel dual-linear Kalman filter was designed for the multi-sensor system. The kinematic models were based on the propagation equations of the local gravity and geomagnetic field in the body frame. The outputs of accelerometer and magnetometer were defined as the measured quantities in the two independent observation models. Benefited from the specific design, only the gyro and accelerometer are enough to run the first stage filter for the attitude estimation and a magnetometer could be integrated optionally if the heading is needed. Considering the different statistical models for sensor errors, the proposed filter can achieve optimal orientation estimation if the sensor statistical error is assumed to be white noise. The proposed strategy precludes the impacts of geomagnetic distortions on the pitch and roll which the heading is subjected to. The RMSE of attitude angles are reduced by 30.6% under magnetic disturbances. Meanwhile, owing to the reduction of system complexity, total time consumption of the proposed method is reduced by 23.8% than that of a standard one, which means that a higher frequency can be implemented for the update of orientation. Furthermore, the separated filter design offers greater flexibility and robustness to magnetic anomalies for the system configuration, as it is possible to switch on or off the second filter to include or exclude the magnetometer compensation for the heading. Online experiments were performed on the homemade real-time miniature orientation determination system (MODS). Furthermore, we carried out more realistic tests on the two-wheel self-balancing vehicle driving and indoor pedestrian walking to evaluate the performance of the designed multi-sensor system when high linear accelerations and angular rates were introduced. The test results demonstrated that the accuracy and stability of MODS were well guaranteed. This paper provides a feasible alternative for low-cost orientation determination.
The kinematic modeling is introduced for the multi-sensor system in
Section 2. The dual-linear filter is proposed in
Section 3. Noise characteristics are analyzed for the sensor models in
Section 4. Hardware design is described for the MODS in
Section 5. Real-time experiments performed on the homemade MODS are presented and discussed in
Section 6. Finally, the forecasts are put forward for further study in
Section 7.
2. System Modeling
The orientation system is usually applied to determine Euler angles which are regarded as the essential parameters for the navigation and motion control. So-called Euler angles are defined as the rotation angles from the given inertial frame (usually called the navigation frame, denoted by
n) to the body frame (fixed to the moving object and denoted by
b), including yaw
, pitch
, and roll
. The body frame
is attached to the orientation system. The
-axis is aligned with its forward direction, the
-axis points to the bottom of the system and the
-axis rounds up the right-handed orthogonal coordinate frame. In this paper, the navigation frame
n is attached to the local level north frame, namely the North, East, Down (NED) frame, as shown in
Figure 1.
Here, we designate a column vector
, whose components are generally functions of the time
. The transformation between the vector
in the frame
b and the frame
n is as:
where
represents the direction cosine matrix (DCM) used to transform the measured quantities from the frame
b into the frame
n. Henceforward, the parameter
t will be omitted for the convenience of readers.
can be carried out through three different separate rotations about the three axes.
,
, and
represent the rotation
angle about the
-axis,
angle about the
-axis, and
angle about the
-axis, respectively, which are defined as:
The propagation equation of
accords with the following equation in [
23]:
where
is the skew symmetric matrix of
, which is the angular rate of the moving object in the frame
b. Differentiating Equation (1) with respect to the time:
Then, the propagation equation of
in the body frame can be derived as:
The vectors of the gravity and the geomagnetic field will both yield to Equation (6):
where
and
represent the vectors of the gravity and the geomagnetic field in the frame
b, respectively.
3. Dual-Linear Kalman Filter Design
As discussed in the introduction, the orientation angles obtained from the accelerometer and magnetometer provide long-term accuracy with high noise while the gyro-derived orientation angles suffer from drifts and cumulative errors. Neither of them will achieve accurate and stable orientation when only one method is used alone. Therefore, a dual-linear Kalman filter is designed to integrate these two approaches together for accurate orientation estimation in this paper. Unlike Zhu
et al. [
18], defining the system state vector as
, we define two state vectors which are the gravity and geomagnetic field in the body frame
b in this paper, respectively:
Similarly, the accelerometer and magnetometer outputs are defined as the two observation vectors corresponding to the state vectors:
The unified discrete-time dynamic equation of the system state can be expressed as follows:
where
and
are the process and measurement noises vectors, respectively. The system transfer matrix
is given as:
where
is the sampling interval. After estimating of the state vectors, the pitch, roll, and heading are obtained by the following arc-tangent formulas:
The next task is to compute the Kalman gain which is defined as:
where
is the covariance matrix of measurement noise (
for the accelerometer and
for the magnetometer). As the inverse of the 3 × 3 order matrix
is formulized, time consumption will be drastically reduced.
When the orientation system is in stable states, it is easy to achieve the optimal
. However, inertial sensor measurements may be unreliable and even useless in dynamic states. An adaptive mechanism is designed for the covariance matrixes of sensors noise in the filtering processes according to [
20,
24]. In the absence of magnetic disturbances, the locus of magnetometer output lies on the surface of a sphere. However, deviations of the magnetometer measurements are very large if magnetic disturbances exists. There are abundant literatures regarding the magnetometer calibration [
25,
26,
27]. The method proposed in [
28] was executed for the magnetometer calibration. The strategy will be performed for
as follows:
The schematic of the proposed dual-linear filter algorithm is shown in
Figure 2. The state vectors are divided into two independent linear filters and updated separately.
4. Noise Characteristics
The covariances of the process noise and measurement noise are regarded as the primary design parameters to achieve the minimum variance of estimation errors. In this paper, the process noise is mainly derived from the angular rates measured by the gyros. We can assume that there is a small perturbation
to
:
where
is the mean of
. The state equation can be rewritten as:
The second term on the right side of the Equation (16) is regarded as the process noise
. For a discrete-time system, the covariance matrix of the process noise
is obtained:
where
where
,
and
are the variances of
,
, and
.
The performance of the proposed filter is strongly linked with the quality of stochastic models used to describe the different sensors’ noise. In this paper, the sensors’ noise is assumed to be a white noise according to pertinent literatures. A generalized method of wavelet moments (GMWM) proposed by Guerrier
et al. [
12] was used to analyze the impacts of different sensor error models on the filter. A numerical simulation was implemented to evaluate three different models: (1) a white noise, (2) a Gauss-Markov (GM) process, and (3) a sum of three GM processes. Firstly, we created a theoretical trajectory as shown in
Figure 3. The attitude angle is expressed as follows:
where
t is the simulation time at a sampling instant.
The “perfect” inertial observations (angular rates and accelerations) were obtained by inverse strapdown. Then, we corrupted these perfect observations by three types of errors generated from the three different sensor models. Finally, the proposed filter was executed with the three kind of corrupted observations.
Figure 4 shows the time-varying pitch estimation error based on three different sensor models.
Figure 5 shows performance comparisons of the absolute pitch estimation error. As shown in the plots, the proposed filter can achieve robust orientation estimation for different sensors errors models. It can be seen that the proposed filter provides the optimal estimation when the sensors’ noise is assumed as a white noise. Meanwhile, the results of the Gauss-Markov model are very close to the white noise model.
7. Conclusions
In this paper, a novel dual-linear Kalman filter was designed for the orientation determination system using low-cost MEMS-based sensors. The propagation equations of the local gravity and geomagnetic field in frame b are used to establish the dynamic models. The accelerometer and magnetometer outputs are defined as the two measured quantities in the same, but independent, observation models. The proposed strategies precludes the impacts of magnetic disturbances on the pitch and roll angles which the heading is subjected to. The RMSE of estimated attitude angles are reduced by 30.6% compared with a standard filter under magnetic disturbances. The proposed filter can achieve optimal orientation estimation if the sensor statistical error is assumed to be white noise. Owing to the reduction of system complexity, time consumption is reduced by 23.8% compared with a standard filter, which means that higher frequency can be implemented for the orientation updates. The proposed separated method offers greater flexibility for the system design. Online experiments performed on a real-time homemade MODS demonstrate that the proposed sensor fusion algorithm can maintain an accurate and stable estimation for the orientation. The average RMSE are less than 0.4° and 1° in the static and low-dynamic turntable tests, respectively. More realistic tests were carried out on the two-wheel self-balancing vehicle driving and indoor pedestrian walking to evaluate the performance of the MODS. The results demonstrate that the accuracy and stability of the MODS are guaranteed even with high linear accelerations and angular rates, which shows remarkable robustness over the applicable operating range. Therefore, the proposed approach provides a feasible alternative for the low-cost real-time orientation determination system.
Further research will focus on the calibration of MEMS devices to improve the performance of orientation determination systems. Meanwhile, some additional sensors and modules, such as the barometer and GPS, can be optionally integrated into the existing MODS. In this case, a complete orientation and position determination system would be achieved.