Next Article in Journal
A Simple Low-Temperature Glass Bonding Process with Surface Activation by Oxygen Plasma for Micro/Nanofluidic Devices
Previous Article in Journal
Effect of KDP-Crystal Material Properties on Surface Morphology in Ultra-Precision Fly Cutting
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

External Disturbances Rejection for Vector Field Sensors in Attitude and Heading Reference Systems

1
Guangxi Key Laboratory of Automatic Detecting Technology and Instruments, Guilin University of Electronic Technology, Guilin 541004, China
2
Key Laboratory of Unmanned Aerial Vehicle Telemetry, Guilin University of Aerospace Technology, Guilin 541004, China
*
Author to whom correspondence should be addressed.
Micromachines 2020, 11(9), 803; https://doi.org/10.3390/mi11090803
Submission received: 20 July 2020 / Revised: 19 August 2020 / Accepted: 24 August 2020 / Published: 25 August 2020
(This article belongs to the Section E:Engineering and Technology)

Abstract

:
The attitude and heading reference system (AHRS), which consists of tri-axial magnetometer, accelerometer, and gyroscope, has been widely adopted for three-dimensional attitude determination in recent years. It provides an economical means of passive navigation that only relies on gravity and geomagnetic fields. However, despite the advantages of small size, low cost, and low power, the magnetometer and accelerometer are susceptible to external disturbances, such as the magnetic interference from nearby ferromagnetic objects and current-carrying conductors, as well as the motional acceleration of the carrier. To eliminate such disturbances, a vector-based parallel structure is introduced for the attitude filter design, which can avoid the mutual interference between gravity and geomagnetic vectors. Meanwhile, an approach to estimate and compensate the external disturbances in real time for magnetometer and accelerometer is also presented. Compared with existing designs, the proposed filter architecture and external disturbance rejection algorithm can feasibly and effectively cooperate with mainstream data fusion techniques, including complementary filter and Kalman filter. According to experiment results, in the case that large and persistent external disturbances exist, the proposed method can improve the accuracy and robustness of attitude estimation, and it outperforms the existing methods such as switching filter and adaptive filter. Furthermore, through the experiments, the critical role of fading factor in handling the external disturbance is revealed.

1. Introduction

Attitude and heading reference systems (AHRS) can provide three-dimensional attitude information [1,2,3,4,5,6], and they are widely used in unmanned aerial vehicles (UAV), mobile robots, motion tracking, etc. A typical sensor configuration in AHRS consists of a tri-axial magnetometer, a tri-axial accelerometer, as well as a tri-axial gyroscope. The combination of magnetometer, accelerometer, and gyroscope is also referred to as a MARG sensor [7,8,9], which has the advantages of ultra-low size, cost, and power.
Three-dimensional attitude estimation in AHRS mainly relies on two natural vector fields, namely gravity and geomagnetic fields [1,10]. The former points to the center of the Earth and can be measured by the accelerometer, while the latter points to the magnetic north and can be measured by the magnetometer. Besides the above two vectors, the gyroscope can provide the angular velocity of the carrier that the AHRS is attached to, and it can help to augment dynamic attitude accuracy.
In recent decades, theories and techniques for MARG sensor-based AHRS have been well developed. The scalar checking (or ellipsoid fitting) method [1,11,12,13,14,15] and the multi-position calibration [16,17] can help to compensate MARG sensor errors, including the bias, scale factors, misalignments, etc. Meanwhile, various solutions for MARG sensor fusion can also be found in the voluminous literature, such as the Kalman filter (KF) [1,2,3,7] and complementary filter (CF) [6,8,18,19,20].
Still, the complicated and volatile environments can bring in external disturbances for MARG-based AHRS. For instance, the motional acceleration of carrier (also known as external acceleration) will be vectoral added to gravity, and hence the calculation of pitch and roll angles will be affected [1,2,3]. On the other hand, external magnetic interference can lead to significant heading error [21], since geomagnetic field intensity is very low. Such external disturbances cannot be thoroughly solved by the above-mentioned error calibration and data fusion methods, since most of these methods are mainly based on time-invariant models. Hence, specific approaches are necessary to improve the accuracy and robustness of MARG-based AHRS against temporary external disturbances.
The existing external disturbances rejection algorithms can be categorized into two major types [5]: The threshold-based [1,3] and the model-based methods [2].
The threshold-based methods use one or more criteria (e.g., whether the norm of gravity or geomagnetic vector has notable deviation) to detect the external disturbance. They are also called switching filters, and can be further divided into ‘hard-switching’ and ‘soft-switching’ ones. The former directly excludes the vector field sensor from the filter once it is affected by external disturbance [3,21,22], while the latter gradually reduces the weight of the affected sensor for data fusion when the disturbance increases [1,9,23,24,25,26,27,28,29,30].
On the other hand, the model-based methods use certain model to estimate the external disturbance in real time, and then subtract it from the measurement of the corresponding sensor [2,31,32,33,34,35,36,37].
Nevertheless, the problem of external disturbance rejection still needs further studies. It is noteworthy that the existing approaches were mostly designed for specific attitude filter architecture, i.e., for most cases, an approach designed for KF cannot be directly applied to CF due to the difference in architecture, and vice versa. For instance, the method in [37] estimates the disturbances outside the KF, but it also modifies the covariance matrix in KF, and thus it is not fit for CF. Moreover, since it works outside but is not independent of the attitude filter, its mechanism needs more discussion.
In this paper, a more versatile approach is discussed and evaluated to estimate and compensate the external disturbances for vector field sensors (i.e., the accelerometer and magnetometer) in AHRS. This algorithm can cooperate with different types of attitude filters, and thus it is broadly applicable for MARG-based attitude determination.
The rest of this paper is organized as follows. The existing algorithms will be briefly surveyed in Section 2, and then the versatile algorithm for disturbance rejection will be introduced in Section 3. After that, experimental evaluation and concluding remarks of the proposed algorithm will be presented in Section 4 and Section 5, respectively.

2. Previous Works

2.1. MARG Sensor Error Modeling

As stated above, the MARG sensor in AHRS are used to measure three different vectors, namely the gravity vector g , the geomagnetic vector h , and the angular velocity ω . The measurement model of MARG sensor can be written as (1), which includes various error sources [1,11,12,13,14,15,16,17].
{ v a c c = C s f ,   a c c C m a , a c c C n o , a c c ( g + f a ) + b a c c + ε a c c v m a g = C s f , m a g C m a , m a g C n o , m a g C s i ( h + b h i ) + b m a g + ε m a g v g y r = C s f , g y r C m a , g y r C n o , g y r ω + b g y r + δ b g y r + ε g y r
In Equation (1), the subscripts ‘acc’, ‘mag’, and ’gyr’ indicate the parameters corresponding to accelerometer, magnetometer, and gyroscope, respectively. The 3 × 1 vector v , b , and ε denote the sensor outputs, biases, and noise terms, respectively. Moreover, the 3 × 3 matrices C s f , C m a , and C n o stand for the scale factors, misalignment, and non-orthogonality, respectively. Meanwhile, there are several noticeable issues in Equation (1) for each sensor.
According to Equation (1), the accelerometer is sensitive to both the specific force f a (defined as the non-gravitational force per unit mass) and gravity g . In the case that accelerometer is used to measure the motional acceleration [38], the measurand is f a , while gravity g can be viewed as the disturbance. However, in AHRS, g is needed for attitude estimation, and f a plays the role of external disturbance.
For the magnetometer, the magnetic interferences can be categorized into hard-iron and soft-iron disturbances. The soft-iron disturbance is proportional to the external magnetic field, and it is described by the matrix C s i in Equation (1). On the other hand, the hard-iron disturbance usually comes from the permanent magnetism of nearby ferromagnetic materials, and it is described by the 3 × 1 vector b h i in Equation (1). In AHRS, the geomagnetic vector h is used for attitude estimation, and b h i is the source of external disturbance.
For the gyroscope, δ b g y r denotes the drift of its bias b g y r , and it should be properly handled in attitude estimation algorithm to avoid accumulative error.
The measurement model in Equation (1) can be rewritten as Equation (2), in which g * , h * , and ω * stand for the measurements of g , h , and ω , respectively. Moreover, the 3 × 3 matrix K and 3 × 1 vector b with corresponding subscripts indicate the deterministic sensor errors. Moreover, δ b g y r is simplified to δ b , while d a and d m indicate the undetermined external disturbances for the accelerometer and magnetometer, respectively.
{ g * = K a c c · g + b a c c + d a + ε a c c h * = K m a g · h + b m a g + d m + ε m a g ω * = K g y r · ω + b g y r + δ b + ε g y r
The commonly used calibration methods for MARG sensor (such as the ellipsoid fitting method and multi-position method) can determine K and b , but most of them presume that both K and b are time-invariant. In other words, such calibrations are based on linear time-invariant (LTI) error models, and thus they are insufficient to compensate δ b , d a , and d m .
In the following discussion, it is presumed that the time-invariant error terms of MARG sensor have already been calibrated appropriately.

2.2. MARG Sensor Data Fusion

As stated above, KF and CF are the two major types of MARG sensor fusion techniques.
There are two essential parts in KF, namely the state transition (or prediction) and state correction steps. As can be seen in Figure 1a, when KF is used for attitude estimation, in each time step, the 3D attitude Θ is predicted according to ω * , and then the prediction is corrected according to g * and h * . The superscripts ‘−’ and ‘+’ indicate the a priori and a posteriori estimation, respectively.
Either the prediction or correction step may involve nonlinear mathematics, and thus nonlinear KFs had been proposed, e.g., the extended Kalman filter (EKF), unscented Kalman filter (UKF) [2], and cubature Kalman filter (CKF) [39,40]. Meanwhile, since there are various representations of 3D attitude Θ , such as Euler angles (i.e., heading, pitch, and roll), quaternion, direction cosine matrix (DCM), and even the vectors g and h [41,42], they also lead to numerous attitude filters.
On the other hand, complementary filters perform data fusion in frequency domain, as shown in Figure 1b,c. In Figure 1b, H ( s ) stands for a high-pass transfer function that can help to eliminate the gyro bias drift, and TRIAD refers to the tri-axial attitude determination algorithm [43]. Figure 1c shows another widely used implementation of CF that first presented in [18].
Hereafter, it is assumed that the noise term ε and the gyro bias drift δ b can be properly handled by the attitude filter (i.e., KF or CF), and thus the only problem left is to handle the external disturbances d a and d m .

2.3. Switching Filters

Different criteria can be used to detect the disturbances d a and/or d m :
-
The norm of g * (or h * ): it is the most widely used criterion, due to its high convenience and feasibility.
-
The deviation between g ^ and g * (or h ^ and h * ): it is another frequently used criterion, which can be easily acquired from the residual (or innovation) in the state correction step of KF. However, it may be affected by the filter’s instability.
-
The angular velocity: it can be used to detect rotational acceleration (especially the centripetal acceleration) [28], but it is not always reliable since the turning radius is usually unknown.
-
The magnetic dip (i.e., the angle between h and the horizontal plane): it can be used to detect d m [21,27], but with the requisite that the pitch and roll angles are accurately known.
Besides the variety of criteria, there are also different ways to implement hard-switching and soft-switching filters:
(a)
Tune the filter gain (or the weighting coefficient, cut-off frequency, etc.) directly [8,27].
(b)
Enlarge the measurement covariance of g * and/or h * , to adjust the filter gain indirectly [1,23,24,25]. This is only fit for KF.
(c)
Tune the filter according to more complex switching logic, such as the hidden Markov model in [28] and the state machine in [30].

2.4. External Disturbances Estimation

Model-based disturbance rejection method tries to extract the external disturbances from raw measurement, rather than discarding it. Therefore, it can probably preserve more information than the threshold-based methods.
To estimate the external disturbance, it can be included in the state variables of attitude filter (specifically the KF) [31,32]. However, it will increase the dimension of KF, as well as the computational burden.
Alternatively, the external disturbance can be estimated outside the attitude filter, to avoid state augmentation [33,34,35,36,37]. Hereinafter, these two approaches are referred to as ‘interior’ estimator and ‘exterior’ estimator, respectively.
The principle of exterior estimator can be summarized as follows.
(1)
Assuming that the a posteriori estimation of d a and d m at the (k − 1)th time step are already available (denoted as d ^ a , k 1 + and d ^ m , k 1 + ), the a priori estimations at the kth time step (denoted as d ^ a , k and d ^ m , k ) are calculated according to Equation (3). Please note that the coefficient c a and c m are both between 0 and 1.
{ d ^ a , k = c a · d ^ a , k 1 + d ^ m , k = c m · d ^ m , k 1 +
(2)
Using d ^ a , k and d ^ m , k , the measurements g k * and h k * are corrected according to Equation (4).
{ g k c = g k * d ^ a , k h k c = h k * d ^ m , k
(3)
Once the a posteriori estimation g ^ k + and h ^ k + are provided by KF, the estimations of d a and d m can be updated according to Equation (5).
{ d ^ a , k + = g k * g ^ k + d ^ m , k + = h k * h ^ k +
The exterior estimator described by Equations (3)–(5) has been proven to be effective in [33,34,35,36,37], but it can only work with KF. Meanwhile, it still has two major problems that need further explanation.
The first problem is the interpretation of Equation (3), which was called the first-order auto-regressive process [36] or Markov chain process [37] that driven by low-pass filtered white noise [33,34,35]. However, in most cases, the external disturbances d a and d m are unpredictable, i.e., there is no sufficient a priori knowledge about their arising and changes over time. Therefore, Equation (3) is by no means rigorous, and it is certainly not driven by white noise (as presumed in [33,34,35,36,37]).
The second problem is the measurement covariance in KF when using the above exterior estimator. Theoretically, if the covariance of d ^ a , k is R a , while the covariance of g k * is R g , the covariance of g k c should be ( R g + R a ) . Unfortunately, R a remains unknown in most cases due to the lack of a priori knowledge. In [33,34,35,36,37], R a was calculated according to d a itself. For instance, R a can be simply defined as a scalar matrix in Equation (6) [33,37]:
R a , k = 1 3 | d ^ a , k | 2 = 1 3 c a 2 | d ^ a , k 1 + | 2
Alternatively, R a can be calculated by a windowed smoothing approach, as in Equation (7) [34]:
R a , k = 1 m c a 2 i = 1 m d ^ a , k i + ( d ^ a , k i + ) T
Obviously, Equations (6) and (7) will enlarge the measurement covariance of g k c once the external disturbance arises, but they are not rigorous either.
In the following section, the versatility of the exterior estimation algorithm will be expanded, and a different interpretation of Equation (3) will be given. Furthermore, it will be proved that the above modification of measurement covariance are unnecessary (and can even bring in negative effects) by experiments in Section 4.

3. Novel Attitude Filter Design

3.1. Attitude Filter Architecture

Figure 2 shows a universal architecture for attitude estimation as well as external disturbances rejection. This architecture can cooperate with all variants of KF and CF, since the estimation and compensation of either d a or d m is performed outside the filter. Moreover, this architecture incorporates several features that can help to simplify the structure and/or enhance the robustness.
First, the 3D attitude information is preserved in g and h , instead of the commonly used quaternion or DCM. Thus, there is no need to calculate the quaternion or DCM according to g and h , or vice versa. Once g and h have been estimated, the heading, pitch, and roll angles (denoted as ψ , θ , and φ , respectively) can be solved by TRIAD algorithm [43]. This feature is known as the vector-based or sensor-based design [41,42].
Secondly, since the filter is vector-based, it is possible to use two sub-filters to estimate g and h separately. This is called the parallel filter [37], which can avoid the mutual interference between g and h , and thus help to restrain the impact of external disturbances. Meanwhile, it is also beneficial for reducing the dimension of each sub-filter.
Last but not least, the external disturbances d a and d m are estimated outside the attitude filter, i.e., it is an exterior estimator of d a and d m , as introduced in Section 2.4. Thus, it is possible to use different algorithms in the filter, including EKF, UKF, CKF, and CF.

3.2. External Disturbances Estimation

Figure 2 also shows the algorithm for external disturbances estimation, in which the superscripts ‘−’ and ‘+’ indicate the a priori and a posteriori estimations, respectively.
In each time step, the proposed attitude estimation and external disturbances rejection algorithm can be summarized as follows:
  • Step 1: Predict the disturbances d ^ a , k and d ^ m , k . This step is the same as (3).
  • Step 2: Subtract d ^ a , k and d ^ m , k from the corresponding measurements (i.e., g k * and h k * ) to get the corrected vectors (denoted as g k c and h k c ). This step is the same as (4).
  • Step 3: Get the estimated vectors g ^ k and h ^ k according to g k c , h k c , and ω k * through a certain algorithm (KF or CF).
  • Step 4: Update the estimated disturbances d ^ a , k + and d ^ m , k + according to g ^ k and h ^ k , i.e., d ^ a , k + = g k * g ^ k and d ^ m , k + = h k * h ^ k . Then k = k + 1 and go to Step 1.

3.3. Specific Implementations

The above algorithm can cooperate with KF and CF, as presented below.

3.3.1. The Proposed Method with Kalman Filter (Abbreviated as PM-KF Hereafter)

  • PM-KF Step 1: Get a priori estimation according to Equation (8), in which the state transition matrix is calculated as F k = I 3 × 3 Δ t · [ ω k * ] × . The matrix [ ω k * ] × satisfies [ ω k * ] × u = ω k * × u for any 3 × 1 vector u , and Δ t is the sampling period.
    { g ^ k = F k g ^ k 1 + h ^ k = F k h ^ k 1 +
  • PM-KF Step 2: Calculate a priori covariance matrices according to (9). The process covariance matrices are defined as Q g = | g | 2 σ ω 2 I 3 × 3 and Q h = | h | 2 σ ω 2 I 3 × 3 , with σ ω denoting the noise of gyroscope.
    { P k , g = F k P k 1 , g + F k T + Q g P k , h = F k P k 1 , h + F k T + Q h
  • PM-KF Step 3: Get a posteriori estimation according to Equations (10)–(12). The measurement covariance matrices are defined as R g = σ g I 3 × 3 and R h = σ h I 3 × 3 , with σ g and σ h denoting the noise of accelerometer and magnetometer, respectively.
    { K k , g = P k , g ( P k , g + R g ) 1 K k , h = P k , h ( P k , h + R h ) 1
    { g k c = g k * d ^ a , k h k c = h k * d ^ m , k
    { g ^ k + = g ^ k + K k , g ( g k c g ^ k ) h ^ k + = h ^ k + K k , g ( h k c h ^ k )
  • PM-KF Step 4: Calculate a posteriori covariance matrix according to Equation (13).
    { P k , g + = ( I 3 × 3 K k , g ) P k , g P k , h + = ( I 3 × 3 K k , h ) P k , h
Then k = k + 1 and go to PM-KF Step 1.

3.3.2. The Proposed Method with Complementary Filter (Abbreviated as PM-CF Hereafter)

  • PM-CF Step 1: Correct the angular velocity according to Equation (14).
    { ω k , g c = ω k * K g ω k 1 , g e r r ω k , h c = ω k * K h ω k 1 , h e r r
  • PM-CF Step 2: Update gravity and geomagnetic vectors using to the corrected angular velocity, as described by Equations (15)–(17).
    { g k , p = g ^ k 1 + g ^ k 1 × ω k 1 , g c h k , p = h ^ k 1 + h ^ k 1 × ω k 1 , h c
    { g k , c = g ^ k 1 + g k , p × ω k , g c h k , c = h ^ k 1 + h k , p × ω k , h c
    { g ^ k = ( g k , c + g k , p ) / 2 h ^ k = ( h k , c + h k , p ) / 2
  • PM-CF Step 3: Compensate external disturbances and calculate equivalent angular velocity errors, as described by Equations (18) and (19). Δ t denotes the sampling period.
    { g k c = g k * d ^ a , k h k c = h k * d ^ m , k
    { ω k , g e r r = g ^ k × g k c | g ^ k | | g k c | Δ t ω k , h e r r = h ^ k × h k c | h ^ k | | h k c | Δ t
Then k = k + 1 and go to PM-CF Step 1.

3.4. Remarks

As can be seen in the above implementations, the proposed parallel vector-based architecture can greatly simplify the design of attitude filter, especially the KF. There is no need to use UKF, CKF, or other nonlinear version of KF, since both the process and measurement models are concise and straightforward. Moreover, the proposed external disturbance rejection method seems to be a direct extension of Equations (3)–(5). However, it can be interpreted in a different way as follows.
As pointed out in the above section, the external disturbances d a and d m are unpredictable in most cases. As a matter of fact, the essence of Equation (3) is the assumption that either d a or d m will not have drastic change during a single sampling period, and thus the last a posteriori estimation can be used to correct the sensor measurement at the present time step. Obviously, this approach is inexact, and the actual role of the coefficients c a or c m is to make the estimation error tend to decrease. In other words, c a and c m are actually the fading factors that help to avoid divergence. Nonetheless, if c a (or c m ) is too close to zero, it will inevitably weaken the compensation of d a (or d m ). The effects of these two fading factors will be evaluated in the following section.
To find a general solution for not only the KF, it is unnecessary to modify the covariance of g k c and/or h k c . In fact, the proposed algorithm makes no change to the attitude filter itself, and thus it is an actual exterior estimator of external disturbances. Moreover, it can be seen in the following experiments that the modification of the measurement covariance is not always helpful to improve the performance.

4. Experiments

4.1. Basic Settings

The proposed algorithm is evaluated on an AHRS module, which is based on a monolithic MARG sensor MPU9250 and working at the sampling rate of 20 Hz. Meanwhile, a single-axis rate table is used to provide heading and angular rate references with 0.0001° resolution. The AHRS module and rate table, as well as the hardware installation, are shown in Figure 3.
The magnetometer and accelerometer in MPU9250 are calibrated using a calibration scheme based on dual inner products, which can be viewed as an improved ellipsoid fitting method and was detailed in [44]. Moreover, the gyroscope in MPU9250 is calibrated using a cross product-based algorithm, which was presented in [45].
After the above calibration, raw data are then acquired according to the flowchart in Figure 4. It can be seen that the AHRS experiences high-speed stop-and-go rotations, which can generate considerable centripetal acceleration. Meanwhile, it also suffers artificial magnetic interference that caused by ferromagnetic objects.
Three different algorithms are used for attitude estimation, including PM-KF and PM-CK that introduced in Section 3.3, as well as the parallel Kalman filter in [37] (abbreviated as PA-KF). The main difference between PM-KF and PA-KF is that the latter has adaptive measurement covariance, as described by Equation (6).
In both PM-KF and PA-KF, the sensor noise covariances are σ h = 0.5   μ T , σ g = 0.1   m / s 2 , and σ ω = 0.005   rad / s , respectively. On the other hand, the coefficients of PM-CF are set to K g = K h = 0.3 .

4.2. Experiment Results

Since each of the above algorithms outputs the estimations of g and h , their performance is evaluated in terms of the directional errors of g and h , i.e., the angle between the estimated vector and the true vector. At the kth time step, if the estimated vector is g ^ k (or h ^ k ), while the true vector is g r , k (or h r , k ), the directional error can be calculated as δ g , k = cos 1 [ ( g ^ k · g r , k ) / ( g ^ k g r , k ) ] (or δ h , k = cos 1 [ ( h ^ k · h r , k ) / ( h ^ k h r , k ) ] ). Moreover, both fading factors c a and c m are increased from 0 to 2 with the increment of 0.01, so as to evaluate their impacts. Figure 5 shows the maximum error and root mean square error (RMSE) of each algorithm versus the fading factors.
As can be seen in Figure 5, the fading factors c a and c m have significant impacts on the performance of each algorithm. It is clear that all the algorithms will diverge once c a or c m is greater than 1. Meanwhile, in Figure 5, the optimal fading factors for each algorithm (i.e., the fading factors that lead to the best performance) can be found, as listed in Table 1. It is noteworthy that the optimal fading factors of PA-KF are quite small, especially the optimal value of c a is only around 0.05 (but coincides with [33] and [37]). As mentioned in Section 3.4, such small fading factors will weaken the compensation of external disturbances.
To further demonstrate the performance of each algorithm with its optimum fading factors, the estimated vectors g and h , the estimated disturbances d a and d m , as well as the corresponding 3D attitude outputs (heading ψ , pitch θ , and roll φ ) are all plotted in Figure 6 and Figure 7.
In Figure 6a,b, the centripetal acceleration caused by rapid rotations can be spotted, and it results in the fluctuation and divergence in the output of PA-KF in Figure 6d,e. On the contrary, the outputs of PM-KF and PM-CF remains stable when the centripetal acceleration exists. This is consistent to the results in Table 1, i.e., both PM-KF and PM-CF have better results than PA-KF in compensating the large and lasting external acceleration.
Nevertheless, it can also be noticed in Table 1 that PM-KF and PM-CF do not outperform PA-KF when compensating magnetic interference. More details of the magnetic interference and its compensation by different algorithms are shown in Figure 7.

5. Discussion

The above experiment results have proven the feasibility and effectiveness of the proposed method, including the vector-based parallel architecture and the external disturbance rejection algorithm. Still, there are some noteworthy issues.
First, the proposed method (including PM-KF and PM-CF) outperforms PA-KF when dealing with the centripetal acceleration, but shows no superiority in handling the magnetic interference. As shown in Figure 6, the raw data from accelerometer contain large and long-term centripetal acceleration, and the proposed method is more adaptive to such hostile conditions. On the contrary, PA-KF works better against momentary and moderate disturbances, as shown in Figure 7.
The main reason for the above phenomenon lies in the data fusion process of MARG sensor. Once the external disturbance arises, the measurement of accelerometer and/or magnetometer becomes unreliable, and thus the attitude estimation algorithm can only rely on the integration of angular velocity. However, inevitable bias drift of gyroscope results in a dilemma that the attitude filter will either diverge due to accumulated error, or still use the distorted measurement of accelerometer and/or magnetometer. In a word, any solution for disturbance rejection is essentially a trade-off between the gyro drift and the external disturbances.
Compared to the switching filters that completely discard the unreliable measurements, both PA-KF and the proposed method partially retain the measurements of accelerometer and magnetometer even when they contain external disturbances. However, PA-KF assigns more weight to the gyroscope by enlarging the measurement covariance of accelerometer and/or magnetometer. Consequently, PA-KF will be more significantly affected by the gyro drift when the disturbance is large and lasting.
Another key issue is the fading factor c a and c m , which can greatly impact the compensating of external disturbance. As discussed in Section 3.4, a fading factor between 0 and 1 can help to decrease the estimation error, and it is proven by the fact that the optimal fading factors of all the algorithms are less than 1 in Table 1. However, if the fading factor is too small, it will evidently weaken the compensation of external disturbance, and it is also proven by the results listed in Table 1.
Compared to PM-KF and PM-CF, the optimal fading factors of PA-KF are much closer to 0. Since PA-KF is more significantly affected by the gyro drift due to its adjustment to the measurement covariance, it needs a smaller fading factor to alleviate this problem. Unfortunately, such a small fading factor will definitely weaken the compensation effect, and it results in the poor performance of PA-KF when handling large and lasting centripetal acceleration.
Finally, it is worth mentioning again that the main advantage of the proposed method is not only its better performance against strong and persistent disturbances, but also its flexibility to cooperate with commonly used sensor fusion algorithms (including but not limited to KF and CF).

6. Conclusions

In this paper, a versatile external disturbance rejection approach is presented, along with a vector-based parallel architecture for 3D attitude estimation. It is proven by experiments that the proposed filter architecture and disturbance rejection approach can work well with KF and CF in the presence of external acceleration and magnetic interference.
The proposed method provides a feasible and generally applicable solution for MARG-based 3D attitude estimation. Nonetheless, the problem of external disturbance rejection for accelerometer and magnetometer is far from completely solved. As stated in the above section, all solutions for disturbance rejection in MARG-based AHRS, either the existing approaches or the proposed method, are no more than trade-offs between the gyro drift and the external disturbance. Since the significant role of the fading factor is revealed, a possible direction for future exploring is the adaptive adjustment of such fading factors.

Author Contributions

Conceptualization, X.L.; methodology, Y.W. and X.L.; software, Y.W.; validation, Y.W. and X.L.; formal analysis, X.L.; investigation, Y.W. and X.L.; resources, Z.L.; data curation, Y.W. and X.L.; writing—original draft preparation, X.L.; writing—review and editing, Y.W.; visualization, X.L.; supervision, Z.L.; project administration, Z.L.; funding acquisition, Z.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China (grant number 61603107 and 41761087).

Acknowledgments

The authors wish to thank Yanmei Tang from Guangxi Normal University and Zhoumo Zeng from Tianjin University, for their kindly support.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Jurman, D.; Jankovec, M.; Kamnik, R.; Topic, M. Calibration and data fusion solution for the miniature attitude and heading reference system. Sens. Actuators A Phys. 2007, 138, 411–420. [Google Scholar] [CrossRef]
  2. Pourtakdoust, S.H.; Asl, H.G. An adaptive unscented Kalman filter for quaternion-based orientation estimation in low-cost AHRS. Aircr. Eng. Aerosp. Technol. 2007, 79, 485–493. [Google Scholar] [CrossRef]
  3. Liu, J.; Zhu, Y.; Lai, J.; Yu, Y. Inner Attitude integration algorithm based on fault detection for strapdown inertial attitude and heading reference system. Chin. J. Aeronaut. 2010, 23, 68–74. [Google Scholar]
  4. Martin, P.; Salaun, E. Design and implementation of a low-cost observer-based attitude and heading reference system. Control Eng. Pract. 2010, 18, 712–722. [Google Scholar] [CrossRef]
  5. Ligorio, G.; Sabatini, A.M. Dealing with magnetic disturbances in human motion capture: A survey of techniques. Micromachines 2016, 7, 43. [Google Scholar] [CrossRef] [Green Version]
  6. Blachuta, M.; Grygiel, R.; Czyba, R.; Szafranski, G. Attitude and Heading Reference System Based on 3D Complementary Filter. In Proceedings of the 2014 19th International Conference on Methods and Models in Automation and Robotics (MMAR 2014), Miedzyzdroje, Poland, 2–5 September 2014; pp. 851–856. [Google Scholar]
  7. Valenti, R.G.; Dryanovski, I.; Xiao, J. A linear Kalman filter for MARG orientation estimation using the algebraic quaternion algorithm. IEEE Trans. Instrum. Meas. 2016, 65, 467–481. [Google Scholar] [CrossRef]
  8. Wu, J.; Zhou, Z.; Chen, J.; Fourati, H.; Li, R. Fast complementary filter for attitude estimation using low-cost MARG sensors. IEEE Sens. J. 2016, 16, 6997–7007. [Google Scholar] [CrossRef]
  9. Valenti, R.G.; Dryanovski, I.; Xiao, J. Keeping a good attitude: A quaternion-based orientation filter for IMUs and MARGs. Sensors 2015, 15, 19302–19330. [Google Scholar] [CrossRef] [PubMed]
  10. Zhu, R.; Sun, D.; Zhou, Z.; Wang, D. A linear fusion algorithm for attitude determination using low cost MEMS-based sensors. Meas. J. Int. Meas. Confed. 2007, 40, 322–328. [Google Scholar] [CrossRef]
  11. Sipos, M.; Paces, P.; Rohac, J.; Novacek, P. Analyses of triaxial accelerometer calibration algorithms. IEEE Sens. J. 2012, 12, 1157–1165. [Google Scholar] [CrossRef]
  12. Hemerly, E.M.; Coelho, F.A.A. Explicit solution for magnetometer calibration. IEEE Trans. Instrum. Meas. 2014, 63, 2093–2095. [Google Scholar] [CrossRef]
  13. Liu, Z.; Song, J. A low-cost calibration strategy for measurement-while-drilling system. IEEE Trans. Ind. Electron. 2018, 65, 3559–3567. [Google Scholar]
  14. Renaudin, V.; Afzal, M.H.; Lachapelle, G. Complete triaxis magnetometer calibration in the magnetic domain. J. Sens. 2010, 2010, 967245. [Google Scholar] [CrossRef] [Green Version]
  15. Secer, G.; Barshan, B. Improvements in deterministic error modeling and calibration of inertial sensors and magnetometers. Sens. Actuators A Phys. 2016, 247, 522–538. [Google Scholar] [CrossRef]
  16. Yang, D.; You, Z.; Li, B.; Duan, W.; Yuan, B. Complete tri-axis magnetometer calibration with a gyro auxiliary. Sensors 2017, 17, 1223. [Google Scholar] [CrossRef]
  17. Sarkka, O.; Nieminen, T.; Suuriniemi, S.; Kettunen, L. A multi-position calibration method for consumer-grade accelerometers, gyroscopes, and magnetometers to field conditions. IEEE Sens. J. 2017, 17, 3470–3481. [Google Scholar] [CrossRef]
  18. Mahony, R.; Hamel, T.; Pflimlin, J.M. Nonlinear complementary filters on the special orthogonal group. IEEE Trans. Autom. Control. 2008, 53, 1203–1218. [Google Scholar] [CrossRef] [Green Version]
  19. Benziane, L.; Hadri, A.E.; Seba, A.; Benallegue, A.; Chitour, Y. Attitude estimation and control using linearlike complementary filters: Theory and experiment. IEEE Trans. Control. Syst. Technol. 2016, 24, 2133–2140. [Google Scholar] [CrossRef] [Green Version]
  20. Januz, W.; Czyba, R.; Niezabitowski, M.; Grzejszczak, T. Expansion of Attitude Determination Algorithms via Complementary Filtering. In Proceedings of the 25th Mediterranean Conference on Control and Automation (MED 2017), Valletta, Malta, 3–6 July 2017; pp. 607–612. [Google Scholar]
  21. Lee, J.; Lim, J.; Lee, J. Compensated heading angles for outdoor mobile robots in magnetically disturbed environment. IEEE Trans. Instrum. Meas. 2018, 65, 1408–1419. [Google Scholar] [CrossRef]
  22. Sabatini, A.M. Quaternion-based extended Kalman filter for determining orientation by inertial and magnetic sensing. IEEE Trans. Biomed. Eng. 2006, 53, 1346–1356. [Google Scholar] [CrossRef]
  23. Suh, Y.S.; Park, S.K.; Kang, H.J.; Ro, Y.S. Attitude Estimation adaptively compensating external acceleration. JSME Int. J. Ser. C 2006, 49, 172–179. [Google Scholar] [CrossRef] [Green Version]
  24. Suh, Y.S. Orientation estimation using a quaternion-based indirect Kalman filter with adaptive estimation of external acceleration. IEEE Trans. Instrum. Meas. 2010, 59, 3296–3305. [Google Scholar] [CrossRef]
  25. Suh, Y.S.; Ro, Y.S.; Kang, H.J. Quaternion-Based Indirect Kalman Filter Discarding Pitch and Roll Information Contained in Magnetic Sensors. IEEE Trans. Instrum. Meas. 2012, 61, 1786–1792. [Google Scholar] [CrossRef]
  26. Nemec, D.; Janota, A.; Hruboš, M.; Šimák, V. Intelligent real-time MEMS sensor fusion and calibration. IEEE Sens. J. 2016, 16, 7150–7160. [Google Scholar] [CrossRef] [Green Version]
  27. Fan, B.; Li, Q.; Wang, C.; Liu, T. An adaptive orientation estimation method for magnetic and inertial sensors in the presence of magnetic disturbances. Sensors 2017, 17, 1161. [Google Scholar] [CrossRef] [PubMed]
  28. Kang, C.W.; Kim, H.J.; Park, C.G. A human motion tracking algorithm using adaptive EKF based on Markov chain. IEEE Sens. J. 2016, 16, 8953–8962. [Google Scholar] [CrossRef]
  29. Königseder, F.; Kemmetmüller, W.; Kugi, A. Attitude estimation using redundant inertial measurement units for the control of a camera stabilization platform. IEEE Trans. Control. Syst. Technol. 2016, 24, 1837–1844. [Google Scholar] [CrossRef]
  30. Fan, B.; Li, Q.; Liu, T. Improving the accuracy of wearable sensor orientation using a two-step complementary filter with state machine-based adaptive strategy. Meas. Sci. Technol. 2018, 29, 115104. [Google Scholar] [CrossRef]
  31. Ligorio, G.; Sabatini, A.M. A novel Kalman filter for human motion tracking with an inertial-based dynamic inclinometer. IEEE Trans. Biomed. Eng. 2015, 62, 2033–2043. [Google Scholar] [CrossRef]
  32. Yuan, Q.; Asadi, E.; Lu, Q.; Yang, G.; Chen, I.M. Uncertainty-based IMU orientation tracking algorithm for dynamic motions. IEEE ASME Trans. Mechatron. 2019, 24, 872–882. [Google Scholar] [CrossRef]
  33. Lee, J.K.; Park, E.J.; Robinovitch, S.N. Estimation of attitude and external acceleration using inertial sensor measurement during various dynamic conditions. IEEE Trans. Instrum. Meas. 2012, 61, 2262–2273. [Google Scholar] [CrossRef] [Green Version]
  34. Ahmed, H.; Tahir, M. Improving the accuracy of human body orientation estimation with wearable IMU sensors. IEEE Trans. Instrum. Meas. 2017, 66, 535–542. [Google Scholar] [CrossRef]
  35. Ahmed, H.; Tahir, M. Accurate attitude estimation of a moving land vehicle using low-cost MEMS IMU sensors. IEEE Trans. Intell. Transp. Syst. 2017, 18, 1723–1739. [Google Scholar] [CrossRef]
  36. Rosario, M.B.D.; Khamis, H.; Ngo, P.; Lovell, N.H.; Redmond, S.J. Computationally efficient adaptive error-state Kalman filter for attitude estimation. IEEE Sens. J. 2018, 18, 9332–9342. [Google Scholar] [CrossRef]
  37. Lee, J.K. A Parallel attitude-heading Kalman filter without state augmentation of model-based disturbance components. IEEE Trans. Instrum. Meas. 2019, 68, 2668–2670. [Google Scholar] [CrossRef]
  38. Błachuta, M.; Czyba, R.; Janusz, W.; Szafranski, G. Data fusion algorithm for the altitude and vertical speed estimation of the VTOL platform. J. Intell. Rob. Syst. Theor. Appl. 2014, 74, 413–420. [Google Scholar] [CrossRef]
  39. Huang, W.; Xie, H.; Shen, C.; Li, J. A robust strong tracking cubature Kalman filter for spacecraft attitude estimation with quaternion constraint. Acta Astronaut. 2016, 121, 153–163. [Google Scholar] [CrossRef]
  40. Arasaratnam, I.; Haykin, S. Cubature Kalman filters. IEEE Trans. Autom. Control. 2009, 54, 1254–1269. [Google Scholar] [CrossRef] [Green Version]
  41. Batista, P.; Silvestre, C.; Oliveira, P. Vector-based attitude filter for space navigation. J. Intell. Rob. Syst. Theor. Appl. 2011, 64, 221–243. [Google Scholar] [CrossRef]
  42. Batista, P.; Silvestre, C.; Oliveira, P. Sensor-based globally asymptotically stable filters for attitude estimation: Analysis, design, and performance evaluation. IEEE Trans. Autom. Control. 2012, 57, 2095–2100. [Google Scholar] [CrossRef]
  43. Shuster, M.D. The TRIAD algorithm as maximum likelihood estimation. J. Astronaut. Sci. 2006, 54, 113–123. [Google Scholar] [CrossRef]
  44. Li, X.; Song, B.; Wang, Y.; Niu, J.; Li, Z. Calibration and alignment of tri-axial magnetometers for attitude determination. IEEE Sens. J. 2018, 18, 7399–7406. [Google Scholar] [CrossRef]
  45. Li, X.; Li, Z. Vector-aided in-field calibration method for low-end MEMS gyros in attitude and heading reference systems. IEEE Trans. Instrum. Meas. 2014, 63, 2675–2681. [Google Scholar] [CrossRef]
Figure 1. Block diagram of Kalman filter and complementary filter for 3D attitude estimation. (a) Kalman filter. (b) Classic complementary filter. (c) Mahony’s complementary filter.
Figure 1. Block diagram of Kalman filter and complementary filter for 3D attitude estimation. (a) Kalman filter. (b) Classic complementary filter. (c) Mahony’s complementary filter.
Micromachines 11 00803 g001
Figure 2. Block diagram of vector-based parallel attitude filter with external disturbances rejection.
Figure 2. Block diagram of vector-based parallel attitude filter with external disturbances rejection.
Micromachines 11 00803 g002
Figure 3. Experimental apparatus. (a) AHRS module. (b) Single-axis rate table. (c) Hardware installation (not to scale).
Figure 3. Experimental apparatus. (a) AHRS module. (b) Single-axis rate table. (c) Hardware installation (not to scale).
Micromachines 11 00803 g003
Figure 4. Flowchart for raw data acquisition.
Figure 4. Flowchart for raw data acquisition.
Micromachines 11 00803 g004
Figure 5. Performance of each algorithm versus fading factors, in terms of the directional errors of gravity vector g and geomagnetic vector h . (a) Maximum error of g . (b) RMSE of g . (c) Maximum error of h . (d) RMSE of h .
Figure 5. Performance of each algorithm versus fading factors, in terms of the directional errors of gravity vector g and geomagnetic vector h . (a) Maximum error of g . (b) RMSE of g . (c) Maximum error of h . (d) RMSE of h .
Micromachines 11 00803 g005
Figure 6. Estimation of gravity vector g and disturbance d a , as well as the corresponding pitch ( θ ) and roll ( φ ) angles. (a) g measurements, with uncompensated d a . (b) Theoretical value of d a . (c) θ and φ calculated from uncompensated g measurements. (d) g estimated by PA-KF with c a = 0.05 . (e) d a estimated by PA-KF. (f) θ and φ calculated from PA-KF outputs. (g) g estimated by PM-KF with c a = 0.92 . (h) d a estimated by PM-KF. (i) θ and φ calculated from PM-KF outputs. (j) g estimated by PM-CF with c a = 0.93 . (k) d a estimated by PM-CF. (l) θ and φ calculated from PM-CF outputs.
Figure 6. Estimation of gravity vector g and disturbance d a , as well as the corresponding pitch ( θ ) and roll ( φ ) angles. (a) g measurements, with uncompensated d a . (b) Theoretical value of d a . (c) θ and φ calculated from uncompensated g measurements. (d) g estimated by PA-KF with c a = 0.05 . (e) d a estimated by PA-KF. (f) θ and φ calculated from PA-KF outputs. (g) g estimated by PM-KF with c a = 0.92 . (h) d a estimated by PM-KF. (i) θ and φ calculated from PM-KF outputs. (j) g estimated by PM-CF with c a = 0.93 . (k) d a estimated by PM-CF. (l) θ and φ calculated from PM-CF outputs.
Micromachines 11 00803 g006
Figure 7. Estimation of geomagnetic vector h and disturbance d m , as well as the corresponding heading ( ψ ) angle. (a) h measurements, with uncompensated d m . (b) Theoretical value of d m . (c) ψ calculated from uncompensated h measurements. (d) h estimated by PA-KF with c m = 0.20. (e) d m estimated by PA-KF. (f) ψ calculated from PA-KF outputs. (g) h estimated by PM-KF with c m = 0.83. (h) d m estimated by PM-KF. (i) ψ calculated from PM-KF outputs. (j) h estimated by PM-CF with c m = 0.64. (k) d m estimated by PM-CF. (l) ψ calculated from PM-CF outputs.
Figure 7. Estimation of geomagnetic vector h and disturbance d m , as well as the corresponding heading ( ψ ) angle. (a) h measurements, with uncompensated d m . (b) Theoretical value of d m . (c) ψ calculated from uncompensated h measurements. (d) h estimated by PA-KF with c m = 0.20. (e) d m estimated by PA-KF. (f) ψ calculated from PA-KF outputs. (g) h estimated by PM-KF with c m = 0.83. (h) d m estimated by PM-KF. (i) ψ calculated from PM-KF outputs. (j) h estimated by PM-CF with c m = 0.64. (k) d m estimated by PM-CF. (l) ψ calculated from PM-CF outputs.
Micromachines 11 00803 g007
Table 1. The best performance of each algorithm.
Table 1. The best performance of each algorithm.
AlgorithmRaw DataPA-KFPM-KFPM-CF
Gravity vectorMaximum error/ c a 64.36°/−50.34°/0.0415.63°/0.9110.58°/0.92
RMSE/ c a 31.72°/−22.97°/0.057.41°/0.926.46°/0.93
Geomagnetic vectorMaximum error/ c m 52.75°/−8.24°/0.2131.31°/0.9610.26°/0.87
RMSE/ c m 5.24°/−1.76°/0.203.82°/0.832.18°/0.64

Share and Cite

MDPI and ACS Style

Wang, Y.; Li, Z.; Li, X. External Disturbances Rejection for Vector Field Sensors in Attitude and Heading Reference Systems. Micromachines 2020, 11, 803. https://doi.org/10.3390/mi11090803

AMA Style

Wang Y, Li Z, Li X. External Disturbances Rejection for Vector Field Sensors in Attitude and Heading Reference Systems. Micromachines. 2020; 11(9):803. https://doi.org/10.3390/mi11090803

Chicago/Turabian Style

Wang, Yongjun, Zhi Li, and Xiang Li. 2020. "External Disturbances Rejection for Vector Field Sensors in Attitude and Heading Reference Systems" Micromachines 11, no. 9: 803. https://doi.org/10.3390/mi11090803

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop