# Application of Improved Fast Dynamic Allan Variance for the Characterization of MEMS Gyroscope on UAV

Authors: Qian Zhang; Xueyun Wang; Shiqian Wang; Chaoying Pei
Journal: Journal of Sensors
 (2018)

---

## Abstract

Microelectromechanical systems (MEMS) are core components in unmanned aerial vehicles (UAV). The precision of MEMS sensors is very important when the GPS signal is invalid. However, the precision and performance of MEMS sensors will be degraded by the changing of environment. Therefore, estimation and identification of the various noise terms existing in MEMS sensors are deemed to be necessary. The Allan variance is a common and standard method to analyze MEMS sensors, but it cannot be used to analyze the dynamic characteristics. The dynamic Allan variance (DAVAR) is a sliding version of the Allan variance. It is a practical tool that could represent the nonstationary behavior of the MEMS signal. As the DAVAR needs to estimate the Allan variance at each time epoch, the computation time grows significantly with the length of the signal series. In this paper, in the case of MEMS gyroscope on UAV, an improved fast DAVAR algorithm based on the choice of relevant time is proposed to shorten the computation time. As an experimental validation, numerical experiments are conducted under the proposed method. The results demonstrate that the improved method could greatly increase the computation speed and does not affect the accuracy of estimation.


---

## Body

## 1. Introduction

The unmanned aerial vehicles (UAV) have been widely used in civil and military applications, including search and rescue operations, area mapping, weather monitoring, and agricultural operations [1–4]. Whenever the inertial navigation system (INS) of UAV is concerned, cost or weight is always an issue; therefore, the accurate inertial sensors have been constantly excluded. Instead, the microelectromechanical systems (MEMS) have been universally used [5–7], which have the characteristics of lightweight, small mass, less expensive, and lower power requirements [8, 9]. Typically, MEMS sensors have large bias drifts and stochastic errors, which make it difficult to use the MEMS sensors as INS only. Generally, the combination of INS/GPS is used to provide an ideal navigation system with full capability of continuous position, velocity, and attitude output [10–12]. However, the accuracy of the integrated navigation system degrades with time when GPS signals are blocked in environments such as high buildings and indoors. In order to control the simple INS error within a certain range, it is necessary to estimate and identify the various noise terms existing in MEMS sensors.Allan variance method is a time analysis technique developed by Dr. David Allan to study the characteristic of random noise terms and stability in precision oscillators used in clock application [13]. Allan variance method can be used to determine the characteristics of the underlying random processes which lead to data noises [14, 15], and it is also generally used to identify the errors of inertial sensors (i.e., gyroscopes and accelerometers) [16–19]. The dynamical Allan variance (DAVAR) is a sliding version of Allan variance, which could represent the nonstationary behavior of the signal [20, 21]. For MEMS sensor analyses, DAVAR could track and describe the dynamic characteristics of time series, and it is advantageous to analyze the process of gyroscope errors. The DAVAR is a cluster of Allan variance; therefore, the computational burden is very high because the DAVAR requires the computation of an Allan variance at every time instant [22, 23]. A recursive algorithm for DAVAR is proposed in [24]. In this fast DAVAR algorithm, the relationship of adjacent points of Allan variance has been revealed, then the calculation speed is accelerated. However, the Allan variance also needs to be calculated in many points of relevant times in this algorithm. In this paper, the MEMS gyroscope is regarded as the object of the analysis, and an improved method based on reasonable choice of relevant time is proposed to shorten the computation time further; the results show that the improved fast DAVAR algorithm dramatically reduces the computational time without affecting operation results.The article is organized as follows: in Section2, the theoretical basis and implementation process of the Allan variance and DAVAR are presented. In Section 3, the recursive algorithm for the DAVAR is introduced and the existing problems of this algorithm are discussed. Then, the improved fast algorithm of DAVAR is derived step by step. The experimental MEMS gyroscope signals are processed by the improved method in Section 4, followed by conclusion in Section 5.


## 2. The Principle of Allan Variance and DAVAR

### 2.1. Allan Variance

The calculation of Allan variance is based on the method of cluster analysis. Assuming that the signal of MEMS gyroscope is acquired at a sampling periodτ0, separating the N sampling data into K clusters and each cluster includes m sampling data:
(1)ω1,ω2,…,ωm⏟k=1⋯ωN−m+1,ωN−m+2,…,ωN⏟k=K,where ω∗ is the angular velocity and its unit is rad/s. The relevant time is defined as τ=mτ0. The typical Allan variance can be expressed as
(2)σA2τ=12Ω¯k+1−Ω¯k2=12K−1∑k=1K−1Ω¯k+1−Ω¯k2,k=1,2,…,K,where Ω¯k=1/m∑i=1mωk−1m+i represents the average value of each cluster. By varying the number of samples per cluster, variances are computed at different cluster length by (2). The relationship existing between Allan variance σA2τ and power spectrum density (PSD) of the intrinsic random process is given by
(3)σA2τ=4∫0∞SXfsin4πfτπfτ2df,where SXf is the PSD of specified noise xt, namely, the instantaneous output rate of the gyro, and τ is the relevant time. Equation (3) indicates that the Allan variance is proportional to the total power output of the random process when passing through a filter with the transfer function of the form sin4x/x2. This particular transfer function is the result of the method used to create and operate on the clusters [25].Allan variance method could be used to analyze the common five basic gyro noise terms, including angle random walk, rate random walk, bias instability, quantization noise, and rate ramp. Each noise term could be accessed through the PSD associated with Allan variance and can be described as follows [26]:
(4)σQN2τ=3⋅Q2τ2,σARW2τ=N2τ,σBI2τ=B2⋅2ln2π,σRRW2τ=K2⋅τ3,σDRR2τ=R2⋅τ22,where Q is the quantization noise coefficient, N is the angle random walk coefficient, B is the bias instability coefficient, K is the rate random walk coefficient, and R is the drift rate ramp coefficient.


### 2.2. Allan Variance Estimation Accuracy

In theory, Allan variance is a method which is used to analyze the stochastic process with finite length. Therefore, the estimation error is universal. Due to the finiteness of the divided clusters, the mean squared error of 1σ can be obtained by a straightforward calculation as [27]
(5)EAτ=∣σA∧τ−σAτ∣σAτ≈12N/m−1×100%.Combining the definition of (3), it can be seen that the confidence of Allan variance estimation improves as the number K of independent clusters increases or the averaging time τ decreases.


### 2.3. DAVAR

In the process of discrete calculation, angular increment is always used instead of angular velocity. Therefore, the Allan variance can be rewritten as(6)σA2τ=12Ω¯k+m−Ω¯k2=12τ2θn+2m−2θn+m+θn2=12m2τ021N−2m∑n=0N−2m−1θn+2m−2θn+m+θn2,where θn is the angular increment at time n, which is the integral value of angular velocity in a period of time and can be described as θn=τ∑i=1mωn−1m+i. The unit of angular increment is rad.The DAVAR is defined as a sliding version of the Allan variance, as Allan variance is a two-dimensional curve ofσA2τ∼τ, while the DAVAR is a three-dimensional figure which changes over time t and relevant time τ. DAVAR can be described as
(7)σA2n,m=12m2τ021Nw−2m×∑k=n−Nw/2n+Nw/2−2m−1θk+2m−2θk+m+θk2,where Nw is the discrete-time analysis window.


## 2.1. Allan Variance

The calculation of Allan variance is based on the method of cluster analysis. Assuming that the signal of MEMS gyroscope is acquired at a sampling periodτ0, separating the N sampling data into K clusters and each cluster includes m sampling data:
(1)ω1,ω2,…,ωm⏟k=1⋯ωN−m+1,ωN−m+2,…,ωN⏟k=K,where ω∗ is the angular velocity and its unit is rad/s. The relevant time is defined as τ=mτ0. The typical Allan variance can be expressed as
(2)σA2τ=12Ω¯k+1−Ω¯k2=12K−1∑k=1K−1Ω¯k+1−Ω¯k2,k=1,2,…,K,where Ω¯k=1/m∑i=1mωk−1m+i represents the average value of each cluster. By varying the number of samples per cluster, variances are computed at different cluster length by (2). The relationship existing between Allan variance σA2τ and power spectrum density (PSD) of the intrinsic random process is given by
(3)σA2τ=4∫0∞SXfsin4πfτπfτ2df,where SXf is the PSD of specified noise xt, namely, the instantaneous output rate of the gyro, and τ is the relevant time. Equation (3) indicates that the Allan variance is proportional to the total power output of the random process when passing through a filter with the transfer function of the form sin4x/x2. This particular transfer function is the result of the method used to create and operate on the clusters [25].Allan variance method could be used to analyze the common five basic gyro noise terms, including angle random walk, rate random walk, bias instability, quantization noise, and rate ramp. Each noise term could be accessed through the PSD associated with Allan variance and can be described as follows [26]:
(4)σQN2τ=3⋅Q2τ2,σARW2τ=N2τ,σBI2τ=B2⋅2ln2π,σRRW2τ=K2⋅τ3,σDRR2τ=R2⋅τ22,where Q is the quantization noise coefficient, N is the angle random walk coefficient, B is the bias instability coefficient, K is the rate random walk coefficient, and R is the drift rate ramp coefficient.


## 2.2. Allan Variance Estimation Accuracy

In theory, Allan variance is a method which is used to analyze the stochastic process with finite length. Therefore, the estimation error is universal. Due to the finiteness of the divided clusters, the mean squared error of 1σ can be obtained by a straightforward calculation as [27]
(5)EAτ=∣σA∧τ−σAτ∣σAτ≈12N/m−1×100%.Combining the definition of (3), it can be seen that the confidence of Allan variance estimation improves as the number K of independent clusters increases or the averaging time τ decreases.


## 2.3. DAVAR

In the process of discrete calculation, angular increment is always used instead of angular velocity. Therefore, the Allan variance can be rewritten as(6)σA2τ=12Ω¯k+m−Ω¯k2=12τ2θn+2m−2θn+m+θn2=12m2τ021N−2m∑n=0N−2m−1θn+2m−2θn+m+θn2,where θn is the angular increment at time n, which is the integral value of angular velocity in a period of time and can be described as θn=τ∑i=1mωn−1m+i. The unit of angular increment is rad.The DAVAR is defined as a sliding version of the Allan variance, as Allan variance is a two-dimensional curve ofσA2τ∼τ, while the DAVAR is a three-dimensional figure which changes over time t and relevant time τ. DAVAR can be described as
(7)σA2n,m=12m2τ021Nw−2m×∑k=n−Nw/2n+Nw/2−2m−1θk+2m−2θk+m+θk2,where Nw is the discrete-time analysis window.


## 3. Improved DAVAR Method

As shown in (6), the DAVAR is obtained by computing the Allan variance at each analysis time epoch t. With the length of signals increasing, it can result in a large computational burden. Therefore, the algorithm with less time consumption is urgently needed. In [24], the recursive property of the DAVAR was researched. The detailed process is described as follows.Firstly, (7) can be redefined as
(8)σA2n,m=12m2τ021Nw−2m∑k=n−Nw/2n+Nw/2−2m−1Δm2k,where Δmk=θk+2m−2θk+m+θk.Then, the DAVAR at the next time epochn+1 is given by
(9)σA2n+1,m=12m2τ021Nw−2m∑k=n−Nw/2+1n+Nw/2−2mΔm2k=12m2τ021Nw−2m∑k=n−Nw/2n+Nw/2−2m−1Δm2k+Δm2n+Nw2−2m−Δm2n−Nw2.Comparing (8) and (9), the recursive function can be obtained as
(10)σA2n+1,m=σA2n,m+12m2τ021Nw−2m×Δm2n+Nw2−2m−Δm2n−Nw2,where Δmn+Nw/2−2m=θn+Nw/2−2θn+Nw/2−m+θn+Nw/2−2m and Δmn−Nw/2=θn−Nw/2+2m−2θn−Nw/2+m+θn−Nw/2.As a conclusion of the above analysis, when the computation time goes fromn to n+1, the Allan variance at time epoch n+1 can be calculated by subtracting 1/2m2τ021/Nw−2m×Δm2n−Nw/2 from the Allan variance at time epoch n and adding 1/2m2τ021/Nw−2m×Δm2n+Nw/2−2m to the Allan variance at time epoch n. In this way, the computation time can be decreased to a certain extent. However, with the change of m, the Allan variances at time epoch 1 which are based on different relevant times also need to be calculated. In this paper, an improved fast DAVAR algorithm based on the selection of relevant time τ is proposed.As shown in (2), before calculating the Allan variance, the relevant time τ is selected based on τ=mτ0. In other words, the relevant time is a linear sequence in linear coordinate system. However, for the convenience of intuitively analyzing the different stochastic noise terms, the Allan standard deviation is always plotted on a log-log scale, and the time axis is a logarithmic coordinate. For example, if N=10,000 and the relevant time is selected as linear sequence, the relevant time series distributing in log-log coordinate system is showed in Figure 1.Figure 1
Linear sequenceτ distribution in logarithmic coordinate system.As shown in Figure1, the distribution in the log-log coordinate system is more and more intensive with the increasing of the relevant time. In practical application, there is no need to calculate the Allan variance at each continuous time sequence, which means that the cluster sizes do not need to be consecutive as in the normal Allan variance method. In this way, under the condition of without affecting the trend of the Allan variance characteristic curve, if the relevant time can be selected reasonably, the calculation burden will be relieved.According to the mathematics knowledge, if the relevant time series are selected as geometric sequence, for example, defining the exponential functionτi=τconτgi−1, and after the base number τg is selected, the Allan standard deviation can be evenly distributed along the logarithmic-scale time axis. Taking the precision of the Allan variance into consideration, we define the estimation error 25% and the minimum number of groups is
(11)Nmmax≥9,where mmax refers to the amount of data in minimum groups which is decided by the maximum relevant time that needs to be studied. Then, the following inequality can be described:
(12)τmax=τconτgi−1=mmaxτ0≤Nτ09.DefiningN=10,000; τcon=1; τ0=1s; and i=100, the base number can be calculated as τg=1.073. The modified relevant time series distributing in log-log coordinate system is shown in Figure 2, and it is clear that the distribution of modified relevant time series is more uniform.Figure 2
Exponential sequenceτ distribution in logarithmic coordinate system.


## 4. Experimental Results

In this section, several experimental tests have been conducted to confirm the validity of the proposed method. As shown in Figure3, the original signal is acquired from a navigation and flight control system which is equipped with a MEMS IMU named ADIS16488 on the printed circuit board (PCB). The IMU is compensated for temperature sensitivities to bias and scale factor and provides digital outputs of 3D angular rate, 3D acceleration, 3D magnetic field, and barometric altitude data. The key manufacture specifications of this IMU are listed in Table 1.Figure 3
The MEMS system of ADIS16488.Table 1
Specification of the IMU.
Mass
58 g
Size
47 × 44 × 14 mm
Operating temperature
−40°C: 85°C
Sensor performance
Gyroscope
Accelerometer
Full scale
−450 ~ +450 (o/s)
−18 ~ +18 (g)
Bias stability
5.1 (o/h)
0.07 (mg)
Bandwidth
330 (Hz)
330 (Hz)
Scale factor error
35 ppm/°C
25 ppm/°CThe navigation and control system is fixed on an approximate horizontal stationary platform as shown in Figure4. When calculating the Allan variance, in general, the time period of collecting static data needs to be ten times longer than the most significant noise relevant time. In our research, multiple signals have been collected from MEMS IMU during each 7-hour static test.Figure 4
The laboratory experimental equipment.


### 4.1. Performance of Allan Variance

To verify the performance of the proposed method, a comparison between the original Allan variance method and improved method is made. The result shows that the two curves basically coincide with each other in Figure5. What is more, it is clear that some details which are superimposed on the curve have been removed without affecting the trend of the curve. The estimation results of the five noise coefficients which are obtained by the normal and modified Allan variance method are given in Table 2; the result shows that the estimation error of modified method is very small or even negligible.Figure 5
Comparison of the two characteristic curves.Table 2
Fit error coefficients of Allan variance.
Error
Normal method
Modified method
Qv/o
6.0923e-3
5.9889e-3
Nv/o⋅h−1/2
9.2444
9.2459
Bv/o⋅h−1
4.0154
4.2011
Kv/o⋅h−3/2
1.6420
1.7012
Rv/o⋅h−2
1.1382e-1
1.4301e-1


### 4.2. Performance of DAVAR

The proposed method is applied in the computation of DAVAR. In Figure6, we show the DAVAR curve of the MEMS gyro signal whose data length is 10,000.Figure 6
The DAVAR of MEMS gyro.Then, the comparison of time consumption is made between normal DAVAR, fast DAVAR based on recursive method, and improved fast DAVAR. The experiment is done with a Matlab 7.11.0 program on an Intel Core2 Duo processor, with a clock of 3.2 GHz. To further prove the reliability of the proposed method, in Table3, numerical experiments with different length data are shown. It can be seen that when the length of the time series is short, for example, 1×103, the fast DAVAR saves 58.43% of computing time, and the improved fast DAVAR saves 80.90% of computing time. The operational efficiency is greatly increased with the increase of data length. When the length of the time series is 1×105, the fast DAVAR costs 862.07 s, and the improved fast DAVAR costs only 51.87 s, while the classical DAVAR costs 9672.39 s. The calculation results show that the fast DAVAR reduces 91.09% of computing time and the improved fast DAVAR reduces 99.46%. Therefore, the improved fast DAVAR could shorten the calculation time, and when the amount of data is larger, the operation is better.Table 3
Comparison between the DAVAR, fast DAVAR, and improved fast DAVAR.
N
DAVAR (s)
Fast DAVAR (s)
Improved fast DAVAR (s)
1×103
5.34
2.22
1.02
1×104
36.41
16.99
5.64
1×105
9672.39
862.07
51.87


## 4.1. Performance of Allan Variance

To verify the performance of the proposed method, a comparison between the original Allan variance method and improved method is made. The result shows that the two curves basically coincide with each other in Figure5. What is more, it is clear that some details which are superimposed on the curve have been removed without affecting the trend of the curve. The estimation results of the five noise coefficients which are obtained by the normal and modified Allan variance method are given in Table 2; the result shows that the estimation error of modified method is very small or even negligible.Figure 5
Comparison of the two characteristic curves.Table 2
Fit error coefficients of Allan variance.
Error
Normal method
Modified method
Qv/o
6.0923e-3
5.9889e-3
Nv/o⋅h−1/2
9.2444
9.2459
Bv/o⋅h−1
4.0154
4.2011
Kv/o⋅h−3/2
1.6420
1.7012
Rv/o⋅h−2
1.1382e-1
1.4301e-1


## 4.2. Performance of DAVAR

The proposed method is applied in the computation of DAVAR. In Figure6, we show the DAVAR curve of the MEMS gyro signal whose data length is 10,000.Figure 6
The DAVAR of MEMS gyro.Then, the comparison of time consumption is made between normal DAVAR, fast DAVAR based on recursive method, and improved fast DAVAR. The experiment is done with a Matlab 7.11.0 program on an Intel Core2 Duo processor, with a clock of 3.2 GHz. To further prove the reliability of the proposed method, in Table3, numerical experiments with different length data are shown. It can be seen that when the length of the time series is short, for example, 1×103, the fast DAVAR saves 58.43% of computing time, and the improved fast DAVAR saves 80.90% of computing time. The operational efficiency is greatly increased with the increase of data length. When the length of the time series is 1×105, the fast DAVAR costs 862.07 s, and the improved fast DAVAR costs only 51.87 s, while the classical DAVAR costs 9672.39 s. The calculation results show that the fast DAVAR reduces 91.09% of computing time and the improved fast DAVAR reduces 99.46%. Therefore, the improved fast DAVAR could shorten the calculation time, and when the amount of data is larger, the operation is better.Table 3
Comparison between the DAVAR, fast DAVAR, and improved fast DAVAR.
N
DAVAR (s)
Fast DAVAR (s)
Improved fast DAVAR (s)
1×103
5.34
2.22
1.02
1×104
36.41
16.99
5.64
1×105
9672.39
862.07
51.87


## 5. Conclusion

For UAV use, it is necessary to estimate and identify the various noise terms existing in MEMS sensors. Allan variance is a simple and efficient method for verifying and modeling these errors. Under the condition of the complex application environment, however, the analysis result of Allan variance has only average effect, and the change of details cannot be obtained. Being the extension and improvement of Allan variance method, DAVAR is a representation of all the variances obtained at every time epoch. However, the normal DAVAR often takes too long to deal with long time series. In this paper, an improved method based on chosen relevant timeτ is proposed, and some experimental researches have been made. Firstly, the estimation results of the five noise coefficients which are obtained by the normal and modified Allan variance method show that the estimation error of the modified method is very small or even can be neglected. Then, combined with fast DAVAR algorithm based on recursive method, the improved fast DAVAR algorithm is used for multiple experimental data. The results show that the proposed method could reduce the computing time significantly.



---

*Source: 2895187-2018-05-08.xml*