Introduction

An inertial navigation system (INS) comprises a set of three gyroscopes (gyros) and three accelerometers mounted mutually perpendicular on a platform. These sensors, referred to as inertial measurement units (IMUs), measure angular rates and accelerations, respectively. Using these observations, one can eventually compute attitude, velocity, and position via inertial navigation equations which are a set of differential equations.

Due to complementary features of INS and global positioning system (GPS), fusion of these two systems has been of great interest for years and many studies have been accomplished to improve the accuracy and reliability of such integrated systems (Farrell and Barth 1998; Grewal et al. 2007). Conventionally, the extended Kalman filter (EKF) is implemented for the integration which has also undergone some modifications based on properties of an INS/GPS system, such as using an adaptive Kalman filter (AKF) to tune the system and/or measurement noise covariance (Mohamed and Schwarz 1999).

The major problems of conventional INSs are their considerable size, price, and power consumption which restrict their applications. As a result, commercially affordable off-the-shelf micro-electro-mechanical system (MEMS) IMUs are now very popular in low-grade inertial systems making them much more widespread (Barbour and Schmidt 2001). But this technology is not mature yet, and its advantages come at the expense of low accuracy. From this point of view, integration of MEMS-INS with GPS seems essential to make the system applicable to areas such as unmanned or micro-aerial vehicles (UAVs or MAVs) (Wendel et al. 2006), mobile mapping systems (Schwarz and El-Sheimy 2004), sports (Supej 2010), and pedestrians (Godha et al. 2006). One important common issue in all of these applications is control of the inherent accumulative errors of the inertial system during GPS outages which can occur frequently in different situations such as dense forests, urban canyons, and tunnels.

Relevant studies have developed a wide range of methods and modifications for improvement of MEMS-INS/GPS integrated systems. Some studies have suggested incorporation of appropriate constraints such as zero lateral and vertical velocities (i.e., zero velocity in the transverse plane) (Nassar et al. 2006; Godha and Cannon 2007) and zero short-term height variations (Godha and Cannon 2007). Another increasing tendency is using artificial intelligence (AI) techniques such as fuzzy logic and neural networks. To bridge the GPS outages in the future, these AI techniques need to be trained when the GPS is available. While the AI can take the place of the Kalman filter (KF) as the core algorithm, its accuracy cannot meet the requirements, especially in shorter intervals (Chiang and Huang 2008). On the other hand, a hybrid utilization of KF and AI seems to be more efficacious (Goodall et al. 2005; Wang and Gao 2007; Noureldin et al. 2009). Besides, some modifications to the KF can also enhance the performance of the integrated system. Hide et al. (2003) have compared three different methods for adaptation of KF gain, while Zhou et al. (2010) have focused on the nonlinear nature of the system by comparing three different KFs in a tightly coupled algorithm, similar to the study by Li et al. (2006b) which has proposed the sigma-point Kalman filtering. Furthermore, some auxiliary sensors such as altimeter, odometer (for ground vehicles), air speed indicator (for aerial vehicles), and magnetic compass can also be implemented on the system to provide external observations during GPS dropout periods (Brown and Lu 2004). In addition, a backward smoother, e.g., Rauch–Tung–Striebel (RTS), can also refine the solution (Nassar et al. 2006; Godha and Cannon 2007); however, it is feasible just in a post-mission process.

It is well known that the tightly coupled INS/GPS integration offers some unique capabilities, e.g., employment of GPS data even under absence of minimum requirements (i.e., direct visibility of four satellites, at least) or aiding carrier tracking loops (Babu and Wang 2005). Nonetheless, the most popular method for MEMS-INS/GPS integration is the loosely coupled algorithm, which lets the GPS work on its own algorithm and thus remains immune from noisy MEMS-IMU observations, in addition to reduction in system complexity. A new standalone attitude and heading reference system (AHRS) solution is introduced here which can also be utilized as additional information in a modified loosely coupled closed-loop INS/GPS filtering method to enhance the reliability of the fusion algorithm during GPS dropout periods. A field test demonstrated the functionality of the proposed algorithm for MEMS-IMU/GPS integration.

A standalone AHRS algorithm

Attitude determination of a vehicle has been one of the most important subjects of navigation problem. While a multiple-GPS-antenna solution can figure out the attitude (Li et al. 2002), this approach suffers from all of the GPS drawbacks explained above. Yet, another disadvantage of such solution is the requirement for multiple high-rate receivers leading to a notable overall-price increase (Li et al. 2012). These shortcomings leave the IMU as the most fascinating tool for attitude determination.

An INS acquires attitude angles prior to velocity and position. In the presence of continuous high-quality GPS or other suitable observations, the errors of an INS can be controlled through the KF; otherwise, the attitude solution (along with velocity and position) will diverge rapidly in a cumulating manner due to the additive nature of the inertial problem. In a MEMS-INS, this issue is even more critical, because of high drift error of gyros. Therefore, a standalone AHRS algorithm is introduced here which is independent of the INS differential equations and, consequently, protected from accumulative errors.

Although the term AHRS can be referred, literally, to any attitude determination system, it is usually known as a system comprising IMUs along with magnetometers and obtains attitude based on the crucial zero-acceleration (ZA) assumption (Zhu and Zhou 2009). This assumption states that, in stationary mode, the dominant part of the sensed acceleration is the reaction to the gravity and that other minor accelerations can be ignored. ZA is obviously not an applicable assumption in non-stationary mode where, especially under the high-dynamic conditions, temporal accelerations or impacts can invalidate it. Nevertheless, it can be replaced by a zero-mean acceleration (ZMA) assumption which considers the vehicle to have zero acceleration with respect to the earth and any earth-fixed frame, on average. A ZMA-based AHRS method is proposed here which takes the rotations of the platform during the averaging interval into account, rather than a simple averaging (i.e., smoothing) of the accelerometers data or the attitude angles. The transformation of the accelerometers data to the earth-fixed frame, over the averaging interval, is the main challenge in this method. This transformation is executed using the gyroscopes data as follows.

Considering any arbitrary epoch, namely t k , we define an earth-fixed frame, the k-frame, which is identical to the sensor frame, the s-frame, at t k . Then clearly:

$$ C_{s}^{k} (t_{k} ) = I $$
(1)

and

$$ \varvec{q}_{s}^{k} (t_{k} ) = \left( {\begin{array}{*{20}c} 1 & 0 & 0 & 0 \\ \end{array} } \right)^{\text{T}} $$
(2)

where the transformation (direction cosines) matrix from any arbitrary Cartesian frame, say a-frame, to any other arbitrary Cartesian frame, say b-frame, is represented by an orthogonal matrix \( C_{a}^{b} \). Also, its corresponding quaternion is shown as \( \varvec{q}_{a}^{b} \), which is a unit quaternion. Having one of these quantities, the other is easily computable (Jekeli 2001). The aim is, as the term attitude refers, to describe the orientation of s-frame with respect to the navigation frame which is chosen to be the local north-east-down (NED) frame represented as l-frame here. This is analogous to find \( C_{s}^{l} \). Furthermore, from (1) the following equation can easily be concluded:

$$ C_{s}^{l} (t_{k} ) = C_{k}^{l} C_{s}^{k} (t_{k} ) = C_{k}^{l} $$
(3)

Therefore, the aim is to describe the orientation of the k-frame with respect to the navigation frame. Once the \( C_{k}^{l} \) is computed, the attitude at t k is determined.

Using the gyros data, at future instants t i  ∊ (t k t k  + Δt], where Δt is the length of the averaging interval, \( C_{s}^{k} (t_{i} ) \) can be computed via the following differential equation:

$$ \dot{\varvec{q}}_{s}^{k} = \frac{1}{2}Q_{s}^{k} \varvec{q}_{s}^{k} $$
(4)

where

$$ Q_{s}^{k} = \left( {\begin{array}{*{20}c} 0 & {\omega_{1} } & {\omega_{2} } & {\omega_{3} } \\ { - \omega_{1} } & 0 & {\omega_{3} } & { - \omega_{2} } \\ { - \omega_{2} } & { - \omega_{3} } & 0 & {\omega_{1} } \\ { - \omega_{3} } & {\omega_{2} } & { - \omega_{1} } & 0 \\ \end{array} } \right) $$
(5)

while the scalars ω j are the components of the angular-rate axial vector of s-frame with respect to k-frame and represented in s-frame, \( \varvec{\omega}_{ks}^{s} \). It can be approximated as follows:

$$ \begin{aligned} \varvec{\omega}_{ks}^{s} = & \,\left( {\begin{array}{*{20}c} {{\omega}_{1} } & {{\omega}_{2} } & {{\omega}_{3} } \\ \end{array} } \right)^{\text{T}} \\ = & \,\varvec{\omega}_{ki}^{s} + \varvec{\omega}_{is}^{s} \\ \approx & \,\varvec{\omega}_{is}^{s} \\ \end{aligned} $$
(6)

where the last line is a reasonable approximation due to the smallness of the rate of earth rotation compared with the resolution of MEMS gyros (i.e., it cannot be observed by these sensors) making the components of \( \varvec{\omega}_{ki}^{{}} \) negligible according to the earth-fixedness property of k-frame. \( \varvec{\omega}_{is}^{s} \) corresponds to the angular-rate axial vector of s-frame with respect to inertial frame, i-frame, resolved in s-frame and is provided via gyros output.

Now the sensed accelerations during the averaging period, \( \varvec{a}^{s} (t_{i} ) \), can be transformed to the k-frame:

$$ \varvec{a}^{k} (t_{i} ) = C_{s}^{k} (t_{i} )\,\varvec{a}^{s} (t_{i} ) $$
(7)

Then, averaging all of these transformed accelerations over the interval, the ZMA assumption states that:

$$ \bar{\varvec{a}}^{k} = - \varvec{g}^{k} $$
(8)

where \( \bar{\varvec{a}}^{k} \) is the averaged acceleration and \( \varvec{g}^{k} \) corresponds to the gravity vector resolved in the k-frame and indicates, approximately, the direction of the third axis of the l-frame (down).

The rest of the procedure is similar to the classical AHRS approach usually known as the bi-vector method. Knowing the components of the gravity and magnetic field in the k-frame and l-frame, the matrix \( C_{k}^{l} \) can be computed. To do so, we use the fact that the jth row of this matrix consists of elements of the jth unit vector of the l-frame, resolved in the k-frame (Jekeli 2001). Showing this vector as \( {}_{j}^{l} \varvec{e}^{k} = \left( {\begin{array}{*{20}c} {{}_{j}^{l} e_{1}^{k} } & {{}_{j}^{l} e_{2}^{k} } & {{}_{j}^{l} e_{3}^{k} } \\ \end{array} } \right)^{\text{T}} \), then

$$ C_{k}^{l} = \left( {\begin{array}{*{20}c} {\left( {{}_{1}^{l} \varvec{e}^{k} } \right)^{T} } \\ {\left( {{}_{2}^{l} \varvec{e}^{k} } \right)^{T} } \\ {\left( {{}_{3}^{l} \varvec{e}^{k} } \right)^{T} } \\ \end{array} } \right) = \left( {\begin{array}{*{20}c} {{}_{1}^{l} e_{1}^{k} } & {{}_{1}^{l} e_{2}^{k} } & {{}_{1}^{l} e_{3}^{k} } \\ {{}_{2}^{l} e_{1}^{k} } & {{}_{2}^{l} e_{2}^{k} } & {{}_{2}^{l} e_{3}^{k} } \\ {{}_{3}^{l} e_{1}^{k} } & {{}_{3}^{l} e_{2}^{k} } & {{}_{3}^{l} e_{3}^{k} } \\ \end{array} } \right) $$
(9)

Alternatively, this matrix can also be described as a sequence of axial rotations via three Euler angles, roll (α), pitch (β), and yaw (heading) (γ), respectively,

$$ \begin{aligned} C_{k}^{l} = & \,R_{3} \left( \gamma \right)R_{2} \left( \beta \right)R_{1} \left( \alpha \right) \\ = & \,\left( {\begin{array}{*{20}c} {\cos \gamma \cos \beta } & {\cos \gamma \sin \beta \sin \alpha + \sin \gamma \cos \alpha } & { {-}{\cos} \gamma \sin \beta \cos \alpha + \sin \gamma \sin \alpha } \\ { {-}{\sin} \gamma \cos \beta } & {{-}{\sin} \gamma \sin \beta \sin \alpha + \cos \gamma \cos \alpha } & {\sin \gamma \sin \beta \cos \alpha + \cos \gamma \sin \alpha } \\ {\sin \beta } & {{-}{\cos} \beta \sin \alpha } & {\cos \beta \cos \alpha } \\ \end{array} } \right) \\ \end{aligned} $$
(10)

On the other hand, ignoring the deflection of vertical (i.e., \( \varvec{g}^{l} \approx \left( {\begin{array}{*{20}c} 0 & 0 & {\left| \varvec{g} \right|} \\ \end{array} } \right)^{\text{T}} \)), the gravity aligns with the down direction \( ({}_{3}^{l} \varvec{e}) \). Thus, using (8), one can write:

$$ {}_{3}^{l} \varvec{e}^{k} \approx \frac{{\varvec{g}^{k} }}{{\left| \varvec{g} \right|}} = - \frac{{\bar{\varvec{a}}^{k} }}{{\left| {\bar{\varvec{a}}^{k} } \right|}} $$
(11)

Substituting this into the third row of \( C_{k}^{l} \) according to (9), and comparing the result with (10), the following equations for roll and pitch computation can easily be deduced,

$$ \begin{aligned} \alpha = & \tan^{ - 1} \left( {\frac{{ - {}_{3}^{l} e_{2}^{k} }}{{{}_{3}^{l} e_{3}^{k} }}} \right) = \tan^{ - 1} \left( {\frac{{\bar{a}_{2}^{k} }}{{ - \bar{a}_{3}^{k} }}} \right) \, \\ \alpha \in & \left[ { - 180^{ \circ } , \ldots , + 180^{ \circ } } \right] \\ \end{aligned} $$
(12)
$$ \begin{aligned} \beta = & \sin^{ - 1} \left( {{}_{3}^{l} e_{1}^{k} } \right) = \sin^{ - 1} \left( { - \frac{{\bar{a}_{1}^{k} }}{{\left| {\bar{\varvec{a}}^{k} } \right|}}} \right) \, \\ \beta \in & \left[ { - 90^{ \circ } , \ldots , + 90^{ \circ } } \right] \\ \end{aligned} $$
(13)

Now, using the estimated tilt angles (roll and pitch), the magnetometers output \( (\varvec{m}^{s} ) \) can be transformed into an auxiliary frame, namely w-frame, whose heading is identical to the heading of the k-frame and s-frame at t k :

$$ \varvec{m}^{w} = R_{2} (\beta )R_{1} (\alpha )\varvec{m}^{s} $$
(14)

Hence, the heading with respect to the magnetic north (γ m) is computed as

$$ \begin{aligned} \gamma^{m} = & \tan^{ - 1} \left(\frac{{m_{2}^{w} }}{{m_{1}^{w} }}\right) \, \\ \gamma^{m} \in & \left[ { - 180^{ \circ } , \ldots , + 180^{ \circ } } \right] \\ \end{aligned} $$
(15)

The angle between magnetic north and real north is called the magnetic declination (D). It can be estimated using a world magnetic model, e.g., IGRF-11 (Finlay et al. 2010):

$$ \begin{aligned} \tilde{D} = & \tan^{ - 1} \left(\frac{{\tilde{m}_{2}^{l} }}{{\tilde{m}_{1}^{l} }}\right) \, \\ \tilde{D} \in & \left[ { - 180^{ \circ } , \ldots , + 180^{ \circ } } \right] \\ \end{aligned} $$
(16)

where \( \tilde{\varvec{m}}^{l} = \left( {\begin{array}{*{20}c} {\tilde{m}_{1}^{l} } & {\tilde{m}_{2}^{l} } & {\tilde{m}_{3}^{l} } \\ \end{array} } \right)^{\text{T}} \) is the magnetic field, coordinated in l-frame, obtained from the world magnetic model. Finally, the heading with respect to the true north can be calculated:

$$ \gamma = \gamma^{m} - \tilde{D} $$
(17)

It is worth noting that the two-tier cascaded attitude determination algorithm, i.e., estimating heading after tilt angles, described through (12) to (17) can be replaced by a direct (unified) solution via resolving either the Wahba’s problem or the TRIAD algorithm (Wertz 1978) as proposed by Li et al. (2006a); however, the complexity of the problem increases when one wants to compensate for magnetic disturbances as will be discussed below.

Also, one should be selective in assigning the length of the averaging interval. As the duration lengthens, the ZMA assumption validity enhances, but this lengthening leads to loss of the earth-fixed frame orientation due to the gyros drifts. Since ground vehicles usually do not undergo long persistent accelerations, a short 7-second length for averaging was employed in this research to control the effect of MEMS gyros drifts.

An alternative to the ZMA assumption is utilizing GPS to monitor and respond properly to the dynamics of the vehicle. This can be done using carrier phase measurements to calculate the linear accelerations (Ellum and El-Sheimy 2002; Li et al. 2006a). Comparing the accelerometer-derived and GPS-derived accelerations, the gravity can be determined. But the major shortcoming of this approach is its dependency on GPS data which makes it unavailable during the GPS outages.

Despite the fact that the AHRS algorithm is, per se, a standalone solution with adequate long-term stability, it can also be fused with the gyro-derived attitude solution via implementing either a complementary filter (Lai et al. 2010) or a KF (Wu et al. 2008; Long et al. 2011) to provide both long-term and short-term accuracies. Nonetheless, a more interesting idea is the integration of AHRS with an INS/GPS system which is the main focus here.

Real-time implementation

An important demand for an AHRS algorithm is functionality for real-time situations. From this point of view, two practical problems in implementation of ZMA-based AHRS should be considered and solved. The first one is the delay arising from the fact that the system should wait for the accelerations to be observed over the averaging interval. This dilemma can easily be solved by setting the reference epoch t k at the end of averaging interval. Then, except for the first few seconds equal to the length of Δt, the averaging can be executed simultaneously; and for those first few seconds there is actually no need for an AHRS solution, because the accuracy of the gyro-derived attitude is sufficient in short intervals.

The second problem is the computational burden. This is because the system should, apparently, compute separately the parameters for each single epoch over the whole averaging interval. But, actually, Eq. (4) is numerically solved using (summing) small angle increments derived from gyroscopes. These values can be saved and used in subsequent overlapping intervals in a refined programming method. So, there is no need to execute the whole computations at each epoch, separately. Our tests showed that using appropriate numerical algorithms, the calculations can easily be accomplished simultaneously with off-the-shelf processors.

Adaptive weighting

The AHRS-derived attitude solution contributes to the KF as measurement update, provided it is weighted properly; otherwise, it can even be detrimental to the filter. Particularly, evaluating the validity of ZMA assumption, one can adaptively weight roll and pitch, since these two angles are directly estimated based on dynamics of the vehicle as described above. One adequate criterion to do so is the difference between the magnitude of the averaged acceleration and that of the gravity. The larger the difference, the less valid the ZMA. If we suppose the vehicle does not have significant vertical acceleration, which is an adequate constraint, especially for ground vehicles (Godha and Cannon 2007), the difference between magnitudes of these two vectors can be interpreted as the magnitude of the average horizontal acceleration, ϑ. Hence,

$$ \vartheta = \sqrt {\left| {\bar{\varvec{a}}^{k} } \right|^{2} - \left| \varvec{g} \right|^{2} } $$
(18)

This horizontal component then causes a misalignment of the horizontal plane which is not perpendicular to \( \bar{\varvec{a}}^{k} \) anymore, leading to errors in roll and pitch. The corresponding angle between \( \bar{\varvec{a}}^{k} \) and gravity vector \( (\varvec{g}) \), referred to as θ, can be calculated using the equation

$$ \theta = \sin^{ - 1} \left( {\frac{\vartheta }{{\left| {\bar{\varvec{a}}^{k} } \right|}}} \right) \approx \frac{\vartheta }{{\left| {\bar{\varvec{a}}^{k} } \right|}} $$
(19)

in which θ is expressed in radians. Then, the variance of the AHRS-derived roll and pitch can be assigned using a proper stochastic model such as

$$ \sigma_{\alpha }^{2} = \sigma_{\beta }^{2} = \theta^{2} + \sigma_{0}^{2} $$
(20)

where σ 0 is the error term associated with IMU errors. Since \( \bar{\varvec{a}}^{k} \) is an averaged quantity, it is expected to have been compensated for sensor noises to the extent possible. Thus, a small predefined nominal value will suffice for σ 0 which has been chosen to be equal to 0.2 deg in this study based on our experimental field tests. It is also worth noting that the adaptive weighting described here can also be used in a ZA-based AHRS solution by replacing the averaged acceleration, \( \bar{\varvec{a}}^{k} \), with the sensed triaxial acceleration, \( \varvec{a}^{s} \), in (18) and (19).

On the other hand, evaluation of the accuracy of the AHRS-derived heading is more sophisticated. This is because, in addition to the effect of roll and pitch errors via (14), the heading accuracy is extremely vulnerable to internal and external magnetic disturbances as well as magnetometer errors. A nominal value of 5 deg was picked for standard deviation of the AHRS-derived heading, σ γ , in this study based on our experimental field tests.

Modified MEMS-IMU/GPS integration

The details on traditional loosely coupled INS/GPS integrated systems are not discussed here but can be found in the literature; see, for instance, Farrell and Barth (1998) and Jekeli (2001). The EKF is used for the integration of these systems where the dynamic model is introduced via INS error equations and measurement updates are derived from comparison of GPS and INS results whenever the GPS is available. The error state vector comprises attitude error \( (\varvec{\psi}^{l} ) \), position error \( (\delta \varvec{p}^{l} ) \), and velocity error \( (\delta \varvec{v}^{l} ) \) along with IMU errors \( (\varvec{e}) \) including bias and scale factors where it can also be augmented by some correlated noises, e.g., random walk or Gauss–Markov. The transformation error can then be expressed in terms of attitude error as

$$ \begin{aligned} \delta C_{s}^{l} = & \,\left( {C_{s}^{l} } \right)_{INS} - C_{s}^{l} \\ = & \, - \varPsi^{l} C_{s}^{l} \\ \end{aligned} $$
(21)

where

$$ \varPsi^{l} = \left[ {\varvec{\psi}^{l} \times } \right] = \left[ {\left( {\begin{array}{*{20}c} {\psi_{1}^{l} } \\ {\psi_{2}^{l} } \\ {\psi_{3}^{l} } \\ \end{array} } \right) \times } \right] = \left( {\begin{array}{*{20}c} 0 & { - \psi_{3}^{l} } & {\psi_{2}^{l} } \\ {\psi_{3}^{l} } & 0 & { - \psi_{1}^{l} } \\ { - \psi_{2}^{l} } & {\psi_{1}^{l} } & 0 \\ \end{array} } \right) $$
(22)

In order to retain the validity of the linearized dynamic model, the estimation should be accomplished in a closed-loop manner, that is, correcting the parameters for their estimated error values. A trade-off between closed-loop and open-loop estimation can be made based on some predefined variance thresholds (Li et al. 2012). Once the variance of an estimated error gets smaller than the corresponding threshold, error correction is executed.

Two types of modifications are proposed here and should be executed simultaneously to enhance the performance of the fusion algorithm. These modifications apply AHRS solution to improve the filter solution, and vice versa.

As GPS outages occur, the quality of the system degrades rapidly due to noisy MEMS-IMU data. During these periods, AHRS can provide external attitude information contributing to the filter as attitude error update observations. We call it filter modification.

Besides, now, the AHRS solution can undergo some en route improvements. This is possible through compensating for estimated sensor errors and magnetic disturbances achieved by the EKF at preceding epochs. We call it AHRS modification.

Filter modification

The attitude error observations can be produced using (21), where \( \left( {\delta C_{s}^{l} } \right)_{\text{AHRS}} \) is the difference of the transformation matrix calculated by AHRS and the one derived from the system,

$$ \begin{aligned} \left( {\varPsi^{l} } \right)_{\text{AHRS}} \,= & \, - \left( {\delta C_{s}^{l} } \right)_{\text{AHRS}} \left( {\hat{C}_{l}^{s} } \right)_{\text{AHRS}} \\ \,= & \, - \left[ {\left( {\hat{C}_{s}^{l} } \right)_{\text{INS}} - \left( {\hat{C}_{s}^{l} } \right)_{\text{AHRS}} } \right]\left( {\hat{C}_{l}^{s} } \right)_{\text{AHRS}} \\ \,= & \,I - \left[ {\left( {\hat{C}_{s}^{l} } \right)_{\text{INS}} \left( {\hat{C}_{l}^{s} } \right)_{\text{AHRS}} } \right] \\ \end{aligned} $$
(23)

Eventually, the attitude error update \( (\varvec{\psi}_{\text{AHRS}}^{l} ) \) can be generated according to (22) and contributed to the EKF via an observation model with adaptive noise variances based on the discussions made in the previous section.

AHRS modification

Roll and Pitch

As time elapses, the EKF supplies feedback for IMU error correction. These errors can be then compensated for, simultaneously, in the closed-loop design of the filter. Subsequently, in future instants roll and pitch can be computed in AHRS algorithm using the corrected IMU data.

Heading

The heading is computed in AHRS algorithm using the earth magnetic field. However, this field can easily be disturbed by environmental and instrumental magnetic sources. Then, consequently, the magnetic declination derived from a world model would not be valid anymore due to variations of the magnetic north. Utilizing corrected attitude angles derived from the filter, the declination can be updated en route. This update should be applied only when the GPS is available.

To do so, the magnetic field sensed by magnetometers should be transformed to l-frame via the EKF-derived transformation matrix (\( \hat{C}_{s}^{l} \)),

$$ \hat{\varvec{m}}^{l} = \hat{C}_{s}^{l} \varvec{m}^{s} $$
(24)

Hence, the corrected magnetic declination is simply given similar to (16),

$$ \begin{aligned} \hat{D} = & \tan^{ - 1} \left( {\frac{{\hat{m}_{2}^{l} }}{{\hat{m}_{1}^{l} }}} \right) \\ \hat{D} \in & \left[ { - 180^{ \circ } , \ldots , + 180^{ \circ } } \right] \\ \end{aligned} $$
(25)

Then, the heading is estimated in future GPS outages via the following equation

$$ \gamma = \gamma^{m} - \hat{D} $$
(26)

which is similar to (17), but now it uses the corrected magnetic declination.

Field-test results

The performance of the proposed modified integration algorithm has been evaluated via a field test using real MEMS-IMU/GPS data. The installation of the assembled platform can be seen in Fig. 1 where the GPS antenna linked to a Leica system 500 receiver and an Xsens MTi MEMS device were mounted on the platform, while the shift between antenna reference point (ARP) and MTi was measured precisely to compensate for lever-arm effect (Hong et al. 2004). The platform itself was mounted on a four-wheel chassis with compatibility for attachment to a car. The data were collected on a trajectory inside the University of Isfahan with two U-turns during the motion as shown in Fig. 2. The trajectory was an off-road route which also included a large speed bump to evaluate the performance of the AHRS solutions in high-dynamic situations.

Fig. 1
figure 1

Installation of the GPS antenna and MTi

Fig. 2
figure 2

Trajectory of the platform and positions of the simulated GPS outages

Prior to the motion, a short 15-second static mode for coarse alignment was carried out via the average accelerometers and magnetometers data. Also, a coarse calibration was executed via compensation for gyros bias achieved by their average output. Throughout the test, the MTi provided synchronized triaxial acceleration, rate of turn, and earth magnetic field at approximately 100 Hz. However, this sampling rate was not guaranteed by the device and some interpolation was used to bridge the data gaps, as well as a smoothing low-pass filter inspired by the work of Li et al. (2012) to reduce the high-frequency noises. The specifications of MTi are depicted in Table 1. Meanwhile, the receiver provided synchronized real-time kinematic (RTK) position observations at a rate of 10 Hz. According to Leica Geosystems instruction manual, a nominal accuracy of 2 cm has been adopted for the horizontal position solution of RTK, while the height variations of the vehicle between GPS-ready instants have been ignored (Godha and Cannon 2007); consequently, their corresponding errors have been eliminated from the state vector. Due to dense and accurate RTK updates in this case, no further modifications were needed and the traditional closed-loop INS/GPS integration algorithm was implemented. This approach is picked as the main benchmark for the attitude angles and the reference path. While the roll and pitch solutions of this benchmark are not as robust as the position solution, it still provides an adequate reference for comparison of the other solutions with long GPS outages. However, heading, compared with roll and pitch, has a poorer observability via the conventional INS/GPS integration filter due to small coupling coefficients in the dynamic model of INS in the usually low velocities a ground vehicle encounters. See Han and Wang (2008, 2010) for more details on this concept. Hence, an alternative benchmark will also be introduced for assessment of the heading solutions.

Table 1 Specifications of the MTi

Practically, the system may encounter some rougher situations where the GPS data are corrupted in signal-degraded environments. In such circumstances, one should implement some improving manipulations to dampen the error growth during GPS dropout periods. The proposed modified algorithm is employed here to overcome this problem. For the sake of assessment of this algorithm, two simulated GPS outages with the length of 60 s (starting at the epochs 260 s and 410 s, respectively) were introduced to the system where the second one was intentionally placed during the second U-turn in heading (Fig. 2).

For this new situation, three different loosely coupled approaches with closed-loop design have been conducted and compared: the traditional unmodified INS/GPS method, the INS/GPS/AHRS with unmodified ZA-based AHRS, and the INS/GPS/AHRS with modified ZMA-based AHRS. These approaches are called IG, IGA-ZA, and IGA-ZMA, respectively. In IGA methods, the roll and pitch updates have been introduced into the system at the rate of 100 Hz throughout the entire path, while the heading updates have been employed at the rate of 10 Hz and only during the GPS outages. The updates configuration of the three methods is listed in Table 2.

Table 2 Comparison of the updates configuration in different methods

Figure 3 represents the Google-Earth image of the trajectory for a schematic comparison between the different methods with respect to the reference path. In addition, the comparison of horizontal position accuracy of these methods is shown in Fig. 4. Due to accurate high-frequency GPS updates, all of the methods provide sufficient accuracy outside the outage periods. During the outages, however, the results are different. The error of the IG method is the largest of the three in both outages and reaches tens of meters after a few seconds during the second outage, being completely unacceptable. The IGA-ZA method provides better accuracies compared with IG, while it is not satisfactory yet. This is mainly due to low validity of the ZA assumption leading to inaccurate roll and pitch updates. Finally, the IGA-ZMA algorithm provides the best solution during both outages, courtesy of its robust roll and pitch updates. Since the only difference between these algorithms is the AHRS attitude updates, one can conclude that the ZMA-based AHRS provides more reliable attitude solutions than the ZA-based one. The root mean square error (RMSE) and maximum absolute error of different position solutions during the GPS outages are also shown in Table 3.

Fig. 3
figure 3

Comparison of different methods on the Google-Earth image of the trajectory

Fig. 4
figure 4

Comparison of horizontal position error via different methods

Table 3 Comparison of statistics of horizontal position error during the outages

The comparisons between roll and pitch results are made in Fig. 5 where, again, the IGA-ZMA solution has the best overall accuracy compared with IG and IGA-ZA. The latter also has a large jump in error outside the outages around the epoch 390 s when the platform has gone over the speed bump. Generally, this problem can occur due to any large temporal acceleration of the platform or a sudden impact making the ZA assumption completely invalid. It is obvious that the IGA-ZMA has been immune from this problem. Hence, the ZMA-based AHRS is more capable of tracking the attitude of the platform even in high-dynamic circumstances due to its adaptive intelligent averaging procedure which suppresses the effect of temporal accelerations on attitude determination.

Fig. 5
figure 5

Comparison of absolute error of tilt angles during the whole trajectory (top), first outage (middle) and second outage (bottom)

Time variations of heading and error thereof via different approaches are shown in Fig. 6 where IGA-ZMA outperforms the two other methods due to heading updates which have been corrected for magnetic disturbances. It can be seen that the accuracy degradation with IG and IGA-ZA is even worse in this case and that they cannot achieve a stable solution even between the two outages. This fact also justifies the poor observability of the heading via position updates. Hence, an alternative benchmark is also employed via the heading values derived from GPS velocities (Ellum and El-Sheimy 2002; Li et al. 2006a). The larger the velocity, the more reliable this computed heading. Thus, only the epochs with velocities larger than 1 m/s are taken into account. Furthermore, since the first axes of the platform and the MTi were perpendicular (Fig. 1), a 90-deg shift has been applied to the GPS-derived headings to be comparable to those derived from the EKF.

Fig. 6
figure 6

Comparison of heading (top) and its absolute error during the outages via the main benchmark (bottom)

RMSE and maximum absolute error of the attitude components of all three methods during the GPS outages have been also listed in Tables 4 and 5, where the proposed IGA-ZMA algorithm clearly has the best performance in all cases.

Table 4 Comparison of statistics of attitude error via the main benchmark
Table 5 Comparison of statistics of heading error via the main and alternative benchmarks during the period [260 s, 470 s]

One problem with the heading results of the IGA-ZMA algorithm should be noted here. As it can be seen in Fig. 6, with the start of a large change in heading (U-turn) around the epoch 440 s, the heading solution of the IGA-ZMA starts to degrade. We guess that this is due to the instrumental sources of magnetic disturbance. These sources rotate with the platform, and hence, their effect on the magnetic north changes which, consequently, invalidates the estimated magnetic declination achieved from (25). This performance degradation is bounded by the maximum effect of the magnetic disturbance and will vanish after retrieving the GPS data for a long enough period of time.

Conclusions

It is already known that the performance of EKF in the classical INS/GPS integration scheme degrades quickly during GPS outages. Utilizing low-cost MEMS-IMUs, this problem gets even more critical insofar as the system loses its functionality in a few seconds. The proposed standalone AHRS algorithm based on ZMA assumption with an intelligent averaging manner can accurately figure out attitude even in high-dynamic motions, contrary to the ZA-based AHRS which is extremely vulnerable to temporal accelerations. In addition to the usual accelerating and braking circumstances, this advantage is also useful in the fields with high vibrations or large impacts such as farms and off-road routes. Furthermore, it was demonstrated via the experimental tests that this attitude solution and the EKF can mutually aid each other and eventually aid the INS/GPS system to maintain its functionality during GPS outages.

One theoretical drawback of the developed modified filtering technique should be mentioned here. There is a fundamental assumption in development of the KF which states that there is no consideration of time correlation in neither the observations noise nor the system noise where the latter comprises IMU errors. If time correlations are considered, the state vector should be augmented by the correlated noises (Jekeli 2001). The AHRS updates, as well as GPS and MEMS-IMUs data, include correlated noises which can be detrimental to the KF unless they are taken into account in the dynamic model. Thus, investigation on proper stochastic modeling of these parameters in future work can, potentially, improve the filter performance. This goal is achievable via utilization of some appropriate techniques such as least-squares variance component estimation (Teunissen and Amiri-Simkooei 2008) and Allan variance analysis (Zhang et al. 2008).