Determining the model and order of the MEMS gyro signal.

## Abstract

In this chapter, a low-cost micro electro mechanical systems (MEMS) gyroscope drift is modeled by time series model, namely, autoregressive-moving-average (ARMA). The optimality of ARMA (2, 1) model is identified by using minimum values of the Akaike information criteria (AIC). In addition, the ARMA model based Sage-Husa adaptive fading Kalman filter algorithm (SHAFKF) is proposed for minimizing the drift and random noise of MEMS gyroscope signal. The suggested algorithm is explained in two stages: (i) an adaptive transitive factor ( a 1 ) is introduced into a predicted state error covariance for adaption. (ii) The measurement noise covariance matrix is updated by another transitive factor ( a 2 ). The proposed algorithm is applied to MEMS gyroscope signals for reducing the drift and random noise in a static condition at room temperature. The Allan variance (AV) analysis is used to identify and quantify the random noise sources of MEMS gyro signal. The performance of the suggested algorithm is analyzed using AV for static signal. The experimental results demonstrate that the proposed algorithm performs better than CKF and a single transitive factor based adaptive SHFKF algorithm for reducing the drift and random noise in the static condition.

### Keywords

- strap down inertial navigation system (SINS)
- MEMS gyro (MEMS)
- random drift
- Sage-Husa adaptive Kalman filter (SHAKF)
- Allan variance

## 1. Introduction

During the last two decades, low cost, small size, accurate and reliable navigation system development is a hot research in the modern navigation technology. *The word navigation is a process of monitoring and controlling any moving object from one place to other. Inertial navigation system (INS) is a dead reckoning positioning method based on measurements and mathematical processing of the vehicle absolute acceleration and angular speed in order to estimate its attitude, speed and position related to difference* [1, 2, 3, 4, 5]. INS technology is categorized into (i) gimbal INS and (ii) strap-down INS. In the early 1940s, a gimbal INS system was developed based on the mechanical inertial sensor (i.e., accelerometers and gyroscopes) for providing the navigation information [5]. Its accuracy was limited by mechanical inertial sensor errors. The main drawbacks of the gimbal INS system are its designed complexity and it requires synchronous servo motors, slip rings, control electronics, etc., for acquiring the navigation information. Because of these factors, the gimbals INS systems are used in low grade navigation applications [6]. In the early 1950, strap-down INS (SINS) was developed based on solid state inertial sensor [5]. The SINS is a self-contained navigation system that has been developed for providing the accurate navigation information (i.e., position, velocity and rotation information. It has three gyroscopes ad three accelerometers. In general, the operation principle of SINS follows the physical laws of motion equations. It is an emerging technology as compared to gimbal INS systems and it has significant features such as easy to design, lower cost of ownership, moderate manufacturing cost and also high reliability. SINS consist of an inertial measurement that includes 3-axis accelerometers and 3-axis gyroscopes, and a processing computer. IMU is a key device to the INS and has been widely used for measuring the rotation rate and acceleration of an object. In practice, SINS accuracy degrades due to internal and external errors of the inertial sensors. These errors are mainly caused due to fluctuation in temperature, pressure and internal electronics components of the sensor. Due to these factors, stochastic errors and drift errors are generated at the IMU output [7, 8].

With the recent development of modern navigation technology, inertial sensor based SINS technology have been characterized into three categories, (i) low accuracy (tactical applications), (ii) medium accuracy (navigation applications) and (iii) high accuracy (strategic navigation applications) sensor technology. The performance improvements of inertial sensors are decided by the inertial sensor errors [9]. Currently, the strap-down INS use (i) low-cost MEMS and (ii) precision fiber optic gyroscope. MEMS sensor has more attractive to manufacturers of navigation systems because of their small size, low cost, light weight, low power consumption and ruggedness [10]. However, MEMS sensors give poor performance in the highly dynamic environment. Hence, the reliability of MEMS-based INS navigation accuracy is limited. Because of these features MEMS have only been used for low-end navigation applications (i.e., commercial domain) [11].

In the recent years, MEMS devices have been developed and tested successfully for low-end accuracy applications [12, 13]. MEMS sensor operates for a long time under poor condition and it generates the noise due to internal circuits and electronics interferences of the MEMS sensor [14, 15, 16]. As a result, noise and drift are generated at the MEMS output. In general, drift error is affected by ambient temperatures and magnetic field effect [17, 18, 19]. Many studies have been reported for temperature error model of MEMS sensor to capture the temperature variation affects [20]. According to the IEEE standard specification, MEMS errors can be characterized into two categories, such as (i) deterministic errors and (ii) stochastic errors. Deterministic errors are due to scale factor errors, bias and misalignment errors [18, 19]. Several calibration methods have been developed for eliminating the bias errors, scale factor errors in the lab environments. Stochastic errors are due to quantization effect, temperature effect (random bias), random drift, and additive noise of MEM sensor. In the case of stochastic errors analysis, calibration techniques cannot be suitable because of randomness [21, 22, 23, 24]. This chapter concentrates on random errors modeling and random noise elimination techniques. The developments of random noise suppressing methods are helpful for improving the MEMS accuracy as well as SINS accuracy. In general stochastic error includes quantitation noise (QN), bias instability (BS), angle random walk (ARW), rate random walk (RRW) and rate ramp (RR) drift. With the extension of research, random noise and bias drift are the non-negligible errors in the MEMS sensor output. In this chapter, different signal processing techniques are developed to minimize the bias drift and random noise [25].

In time domain, Allan Variance (AV) is a popular technique has been widely used to identify and quantify different random noises present in the MEMS sensor [16, 26, 27]. In literature, several noise compensation techniques such as discrete wavelet transform (DWT), empirical mode decomposition (EMD) method and Forward linear prediction (FLP) methods have been developed and applied to MEMS sensors for filtering the high-frequency noise [28, 29]. These methods are not suitable when the sensor includes the correlated noise. Kalman filter (KF) is a most popular state estimation technique that has been used for minimizing the correlated noise of the MEMS sensor [30, 31, 32, 33, 34]. The priori knowledge of an initial values of the process and measurement noise covariance matrix are known exactly, when the KF become an optimal. However, in practice, these noise parameters may vary with time so that the performance of the KF can be degraded and then the filter become diverge.

To solve the divergence problems, Adaptive Kalman filter technique (AKF) is a better solution. The adaptation can be based on either (i) innovation based adaptive estimation AKF (IAE-AKF) or (ii) residual based estimation AKF (RAE-AKF) and also multiple model based AKF [34, 35]. Among the other methods, adaptive KF is developed using IAE. In general, an innovation sequence is defined as the difference between true and estimated values. In the IAE-AKF method, the measurement and process noise matrices are estimated based on innovation sequence and followed by sliding average window method. In real time, the selection of window size is a critical issue. Sage-Husa Adaptive KF is another version of adaptive KF that has been developed to improve the AKF performance by introducing a time varying estimator. In the SHAKF, using a time-varying noise estimator can be helpful in estimating the statistical characteristics of the uncertainty in the measurements in real time and mitigating the filter divergence. A further study on the SHAKF is developed based on adaptive factors for improving the filter practicability and optimality [23].

An adaptive fading Kalman filter (AFKF) was proposed for compensating the effect of the uncertainty in the measurements by transitive factor to the state error covariance (P). In AFKF, the state error covariance (P) is scaled with a single transitive factor for improving the filter variance and gain correction. When it is used for complex systems, the performance of AFKF degrades because of it may not be sufficient to use a single transitive factor for estimating the covariance matrix of the filter [24]. To overcome the difficulties of single transitive factor, multiple fading factors are used in AFKF. Because of that reason, authors are developed double transitive factor based SHAFKF that adapts both predicted state error covariance (P) and measurement noise covariance matrix (R) based on the innovation sequence. Although it has been successively applied to different domains, its performance for MEMS gyroscope sensor signal is not explored. The stochastic errors of MEMS gyroscope cannot be eliminated using calibration technique. It needs to be modeled before filtering the signal. Therefore, adaptive filtering techniques have been developed for minimizing the random noise from MEMS gyroscope system. In general, auto-regressive (AR), Moving Average (MA), and Auto-Regressive and Moving Average (ARMA) and Gauss-Markov model (GM) have been used for modeling stochastic signal [17]. Among these models, ARMA is a better choice for modeling MEMS gyroscope drift errors. In general, the ARMA modeling involved three steps as (i) randomness and stationary test (ii) selection of suitable time series model and (iii) estimation of model parameters. The unit root test and inverse sequence techniques have been used for checking the stationary of the signal. The model order is obtained by using auto correlation function (ACF) and partial auto correlation function (PACF). Moreover, Akaike Information Criterion also used to check the model order. The modified Yule-Walker method is used estimate the model parameters. Once an optimal ARMA model is defined, a suitable adaptive Kalman filter can be applied to minimize the drift of inertial sensors [14, 30].

In this chapter, we developed double transitive factors based on Sage-Husa adaptive fading Kalman filter (SHAFKF), namely SHAFKF-P Adaption and SHAFKF-R adaption. In addition, ARMA model is used to model the random drift errors of MEMS sensor. ARMA model based SHAFKF algorithm is developed and applied for minimizing the bias drift and random noise in the presence of MEMS gyroscope signal. The suggested algorithm is analyzed in two stages. In the first stage, the predicted state error covariance is adapted by a transitive factor, whereas, in the second stage, another transitive factor is scaled to the measurement noise covariance matrix (R). The efficiency of the algorithm is analyzed using Allan Variance technique.

The remainder of the paper is organized as follows. Section 2, explains the theory of ARMA models for MEMS gyroscope random noise analysis. The Allan Variance method is explained in Section 3. In Section 4, Conventional and adaptive Kalman filters are discussed based on innovation sequence. Section 5 explains the proposed algorithm based on double transitive factors. Designing state space model for ARMA (2, 1) model is presented in Section 6. Experimental results and static test analysis are explained in Section 7 and also followed by conclusions in Section 8.

## 2. Auto regressive and moving average (ARMA) model

In literature, several time series models have been widely used in many fields such as industry, science and engineering. Among the other model, auto regressive (AR) and moving average (MA) models have been most popular and since then widely used for forecasting [14, 15, 16]. The combination of AR and MA models has been used for inertial sensors error modeling. In this chapter, stationary ARMA model is proposed for characterizing the stochastic errors of the MEMS gyroscope signals. In general, the ARMA model is a combination of weighted sum of AR and MA model. The expression for the ARMA model with an order (*p*, *q*) is defined as

where *p* and *q* are the AR and MA model orders, receptively.

### 2.1 Time series model selection

In the time series analysis, several methods have been developed for selecting the order of the AR, MA and ARMA order. In general, auto-correlation function (ACF) and partial ACF (PACF) are the basic methods to select the model based on the characteristics of the ACF and PCF graphs as shown in Table 1. From Table 1, we observed that both ACF and PACF are tail off. In this chapter, ARMA (p, q) is suitable for modeling the MEMS Gyroscope data.

Model order | ACF | PACF |
---|---|---|

AR(p) | Tail off | Cut of at order P |

MA(q) | Cut of at order q | Tail off |

ARMA(p, q) | Tail off | Tail off |

The samples autocorrelation function (ACF) is defined as

and the partial autocorrelation is expressed as

where

This can also cross checked using Akaike Information Criterion (AIC) method. In this work, AIC values of the time series data are evaluated using Table 1. The model order is selected based on the minimum value of AIC.

The general expression of Akaike information criterion (AIC) is

where

### 2.2 Model parameter estimation

Suitable model parameters are estimated by using Yule-Walker, Burg, Unconstrained Least-Squares method and Levinson-Durbin methods. In general, for large data-set analysis, Yule-Walker and Unconstrained Least-Squares method are the better estimators.

## 3. Allan variance analysis

Allan variance (AV) is a popular time domain method has been widely used for identifying and quantifying random errors in the presence of inertial sensor [14]. Cluster based analysis is used to develop the AV technique. In the AV analysis, the IMU raw data can be divided into clusters with specified length, “*kc*”. The total number of clusters can be represented by “K,” (i.e.,

To calculate each clusters average is

Here,

The Allan variance is computed from two successive cluster averages for the specified correlation time which is defined as:

where

There is a unique relationship between the Allan Variance (time domain) and the PSD (frequency domain) of the random process as:

where

The different random noise processes are characterized at various frequencies that are fitted by the AV method. The root Allan variance with each correlation time and slope are computed and presented in Table 2.

Noisy type | Units | Slope | Root Allan variance |
---|---|---|---|

Quantization noise (QN) | −1 | ||

Angle random walk (ARW) | −1/2 | ||

Bias instability (BS) | 0 | ||

Rate random walk (RRW) | 1/2 | ||

Rate ramp (RR) | 1 |

## 4. Adaptive Kalman filtering

### 4.1 Conventional Kalman filter

The application of conventional Kalman filter (CKF) for the MEMS gyroscope requires a prior knowledge of dynamic process and measurement models. In addition, the process and measurement noise of the MEMS gyroscope. Considering a linear dynamic system, the state and measurement equations can be written as

where

Basically, the Kalman Filtering estimation algorithm comprises two steps, namely prediction and updating equations. The main Kalman Filtering equations are given below.

Prediction equations can be expressed as

In the above equations, *k*.

In the linear Kalman filter, the measurement updated equations are

where

### 4.2 Innovation based adaptive estimation adaptive Kalman filter (IAE-AKF)

CKF requires a prior knowledge of the measurement and dynamic process models of MEMS IMU. In practice, statistical noise models of the process and measurement models are varying with time because of that the CKF would deprive optimality. To address this divergence, an adaptive KF (AKF) is a better solution. In the AKF, the adaptation can be carried out using three ways: (a) varying *Q* by trial and error until a stable state is estimated with fixed *R* [20]; (b) varying *R* by keeping *Q* fixed; (c) varying *Q* and *R* simultaneously [21]. In the IAE-AKF algorithm, we selected the second adaption method is that varying the measurement noise covariance matrix (R) by keeping Q fixed based on innovation sequence

The innovation sequence is defined as the difference between true measurements and predicated measurements that can assume to be additional information to the filter. The innovation sequence is a zero-mean white Gaussian noise sequence, defined as

The weighted innovation

The optimal estimation of covariance matrix of innovation sequence using average window method can be expressed as

where

The estimated measurement noise covariance based on innovation sequence is

where

### 4.3 Sage-Husa adaptive Kalman filter (SHAKF)

Sage-Husa AKF (SHAKF) is another class of adaptive filtering that uses a time-varying noise statistical estimator to proceed recursively. It is also used to reduce the sensor noise in the presence of MEMS IMU signals [16]. The linear dynamical process and measurement model equations can be written in the Eqs. (4) and (5).

The expectation and the covariance matrices of

where

The time-varying noise statistic recursive estimator is given by:

where

Prediction equations as.

Measurement updated equations are equations:

Here, an innovation sequence can be written as

The

## 5. Proposed: Sage-Husa adaptive fading Kalman filter (SHAFKF) based on double transitive factors

Adaptive estimation methods have been developed for improving the CKF performance [22, 23]. In the AKF, covariance matching techniques is used to estimate the covariance matrix of the innovation or residual by fixing the values of *Q*. By using a scale factor in the AKF hence the performance filter was improved for estimating the state error covariance and also it improves the variance of the predicted state. Further, adaptive fading Kalman filters have been developed for improving the filter performance by introducing multiple adaptive scaling factors [24]. In the proposed algorithms, adaptive transitive factors based linear Adaptive Kalman filter algorithm is proposed also used for improving the MEMS gyroscope performance [25, 30]. However, a limited work has been reported the use of transitive factors in ARMA model based Sage-Husa KF. The proposed algorithm is explained in two cascaded stages. The predicted state error covariance *P* is adapted in the stage one, whereas in the second stage, the measurement noise covariance *R* is adapted by another transitive factor. The proposed scheme is shown in Sections 5.1 and 5.2, respectively.

### 5.1 Stage one: adaptation of predicted state error covariance (P)

In this stage, the predicted state error covariance is modified using an adaptive transitive factor. This stage is also termed as SHAFKF-P adaptation. The transitive factor is used to reduce the process noise of kinematic model based on the residual sequence.

The transitive factor

where *tr* is the trace function and

The predicted state covariance

The SHAFKF-P adaptation algorithm, the predicted and estimated state error covariance are updated based on the SHAKF algorithm.

The suboptimal state and update the measurement equations as

where

### 5.2 Stage two: adaptation of measurement noise covariance matrix (R)

The stage one algorithm requires prior knowledge of the state error vector and kinematic of model errors. To overcome this drawback and to eliminate the influence of the measurement noise disturbances, another transitive factor is introduced for updating the measurement noise covariance matrix (R). This stage is also termed as AUFKF-R adaptation.

In this stage, modified residual sequence is evaluated as the difference between measurement vector **zk** and the suboptimal estimated state (

Furthermore, using the suboptimal state error covariance

The suboptimal estimation of covariance matrix of residual sequence using the average window method is

The transitive factor

In this algorithm, the measurement noise covariance matrix is scaled by a factor

The Kalman gain and state equations are updated as Eqs. (41)–(46). In this algorithm, measurement noise covariance matrix is multiplied by the adaptive transitive factor,

## 6. Designing state space model for ARMA (2, 1) model

The ARMA (p, q) model order is obtained using AIC method as in Table 3. The minimum values of AIC can be decided the optimal order of the ARMA (2, 1) is chosen. The ARMA (2, 1) model parameters such as **Φ1** = **−0.5422**, **Φ2** = **−0.1204** and *θ***1** = **0.1382** are estimated based on the minimum AIC value, i.e., −5.7612. The parameters are tabulated in Table 3.

Model | AIC | |||
---|---|---|---|---|

AR(1) | −0.5422 | −5.1769 | ||

AR(2) | −0.5422 | −0.1204 | −5.1832 | |

MA(1) | −0.1382 | −5.1860 | ||

ARMA(1, 1) | −0.5422 | −0.1382 | −5.5726 | |

ARMA(2, 1) | −0.5422 | −0.1382 | −5.7612 |

The ARMA (2, 1) model is used to approximate the MEMS Gyro sensor as:

where **Φ** is the AR coefficients and *θ* is the MA model parameter,

where *I* are selected. In practice, the process noise covariance matrix and the measurement noise covariance matrix are assumed as

## 7. Test results and discussion

The experimental setup consists of a single axis a prototype Xsens MTi 10 series MEMS sensor, turn table control unit, data acquisition board, and data processing computer. The MEMS gyroscope specification and test conditions of three single axis gyro sensor detailed results are reported in [36]. The experimental raw data is collected for 1 hour duration with sampling frequency at 100 Hz at room temperature. In the static condition, MEMS gyro is in zero rotation under the room temperature, for a more detailed specification of the Xsens MTi 100 series MEMS please refer to [36, 37].

### 7.1 Static performance test analysis

Three single-axis MEMS gyro sensor raw data are collected for 1 hour duration with sampling frequency at 100 Hz. The pre-processing methods are required to test the zero mean values for the sensor raw data before analyzing the Allan variance (AV) results [16]. Three single-axes of the MEMS Gyro sensor signals and corresponding AV results are plotted in Figure 4a and b respectively. From these figures, we see that the −1/2 slope indicates the angle random walk (ARW), which is a white noise characteristics. Bias instability (Bs) is due to internal and external electronic components of the sensor and is indicated at zero slope in log-log AV plot [16]. The three axes of MEMS IMU sensors are identified and quantified using AV analysis, which are presented in Table 2. From this table, we can observe that ARW and BI are the two that dominate noises in the presence of the MEMS sensor.

Conventional Kalman filter (CKF) algorithm is applied for minimizing the all three axis MEMS gyro static signal. In this experiment, the initial values of measurement and process noise covariance matrix are chosen as 0.098 and 0.0001 respectively. In practical application, these noise covariance matrices vary with time. In real-time, by adjusting the noise parameters are critical. The adaptive KF algorithm, an innovation sequence is used to adjust the noise parameters of process and measurement noise matrices ad it is followed by covariance matching principle. In the IAE-AKF algorithm, the window width selection is critical and can decide the filter optimality. In general, the window width is varied between 5 and 30. In this analysis, we observed that 15 samples of the window width is the optimal choice for statistical smoothing.

In the SHAKF algorithm, the innovation sequence is used to estimate the measurement noise covariance matrix and followed by sliding window average method. In addition, statistical noise estimator is used in the AKF frame work for updating the noise coefficients in each iteration recursively. The window width is 15 samples for statistical smoothing. The SHAKF algorithm results are plotted in Figures 5a, 6, 7a, respectively.

In the proposed approach, the predicted state error covariance is updated by one transitive factor whereas the measurement noise covariance matrix is updated using another transitive factors based on the residual sequence. The covariance matrix of residual sequence is estimated using sliding average window method. In this method, window width is chosen empirically as 15. In the first stage of the proposed algorithm (SHAFKF-P adaption), the transitive factor (

Methods | ARW ( | BS ( | Drift ( |
---|---|---|---|

MEMS raw data | 165.115 | 8.775 | 1.758 |

CKF | 103.235 | 7.459 | 1.362 |

IAE-AKF | 24.858 | 3.496 | 0.859 |

SHAKF | 4.228 | 2.296 | 0.0014 |

SHAFKF-P Adaption | 1.279 | 0.690 | 0.00038 |

SHAFKF-R Adaption | 0.331 | 0.421 | 0.00012 |

Methods | ARW ( | BS ( | Drift ( |
---|---|---|---|

MEMS raw data | 33.0437 | 4.7297 | 1.7587 |

CKF | 30.6510 | 1.5762 | 1.3624 |

SHKF | 4.0098 | 1.2862 | 0.0859 |

IAE-SHAKF | 3.4075 | 0.4371 | 0.00386 |

SHAFKF-P adaption | 0.6570 | 0.2653 | 0.000562 |

SHAFKF-R adaption | 0.442 | 0.150 | 0.000312 |

Methods | ARW ( | BS ( | Drift ( |
---|---|---|---|

MEMS raw data | 38.9222 | 9.8105 | 1.758 |

CKF | 24.3805 | 8.3228 | 1.216 |

SHKF | 7.0068 | 3.502 | 0.597 |

IAE-SHAKF | 3.3229 | 3.071 | 0.0013 |

SHAFKF-P adaption | 1.2516 | 0.832 | 0.00028 |

SHAFKF-R adaption | 0.914 | 0.542 | 0.00014 |

From these tables, it is evident that SHAFKF of R adaptation using transitive factor improves the performance of the algorithm. In this proposed algorithm, measurement noise covariance is scaled by the transitive factor. It ensures the variance is inversely proportional to the uncertainty of measurement. Due to this, SHAFK-R adaptation algorithm outperforms other algorithms.

In addition, we observed the Drift error for the MEMS gyroscope signals. Drift error is considered as one of the performance indicator of all the proposed algorithms. From Tables 4, 5, 6, it is observed that the proposed SHAFKF-R adaptation filter performs better than CKF, IAE-AKF SHAKF, and SHAFKF-P adaptation filters because of that the measurement noise covariance tunes by the adaptive transitive factor

## 8. Conclusions

In this chapter, the MEMS gyroscope drift is modeled by using ARMA (2, 1) for characterizing the MEMS gyro noise behavior. Moreover, ARMA-based linear Sage-Husa adaptive fading Kalman filter with double transitive factors is proposed. In the proposed algorithm, double adaptive transitive factors are used to update in the predicted state vector and measurement noise covariance matrix. The suggested algorithm is used to reduce the drift and random noise in the presence of MEMS gyroscope. From the AV analysis, the noise terms of ARW and Bs are reduced by order of 100. The proposed SHAFKF outperforms the CKF, IAE-AKF, and SHAKF algorithms in static case. It concludes that the SHAFKF algorithm is suitable for MEMS gyroscope signal drift minimization.