Temperature drift modeling and compensation of micro-electro-mechanical system gyroscope based on improved support vector machine algorithms

This article suggested two methods to compensate for the temperature drift of the micro-electro-mechanical system gyroscopes, which are support vector machine method and C-means support vector machine. The output of X axis which was ranged from −40°C to 60°C based on the micro-electro-mechanical system gyroscope is reduced and analyzed in this article. The results showed the correctness of the two methods. The final results indicate that when the temperature is ranged from −40°C to 60°C, the factor of B is reduced from 0.424 ( ° h ) to 0.02194 ( ° h ) , and when the temperature is ranged from 60°C to −40°C, the factor of B is reduced from 0.1056 ( ° h ) to 0.0329 ( ° h ) , and the temperature drift trend and noise characteristics are improved clearly.


Introduction
The micro-electro-mechanical system (MEMS) gyroscope is an inertial sensor based on the technology of MEMS, which is used to sense the rotation rate of the carrier. The outstanding characteristics of the MEMS gyroscope are small size, light weight, low power consumption, and batch production. Low-precision MEMS gyroscope products have been very popular in the civil market and are widely used in consumer electronics and automotive fields. At the same time, the MEMS gyroscope is also widely used in the fields of attitude control and vehicle-borne satellite antenna. Most authors pay attention to improve the performance of MEMS gyroscopes. However, two main methods are used to improve their performance. 1,2 On one hand, one way is using hardware methods to reduce the temperature drift of the MEMS gyroscope. Therefore, most hardware methods have been suggested which contain structure and circuit. For instance, Cao et al. 3 proposed that a bandwidth expansion method for dual-mass MEMS gyroscopes based on the pole-zero temperature compensation method. Cao et al. 4 also proposed a sense mode closed-loop method for dual-mass MEMS gyroscopes based on the bi-pole temperature compensation method, and the experiment results show the bias temperature coefficient is decreased to 9.534°/h/°C and 5.991°/h/°C, respectively, based on sense open-loop and closed-loop circuits. Ou et al. 5 investigated a new stress-released structure to improve the performance of temperature stability of MEMS gyroscope. Li et al. 6 proposed a new method named frequency mismatch control to improve the temperature stability sensitivity for MEMS gyroscope. The results show that the scale factor temperature coefficient reduces from 1300 to 282.12 ppm/°C. Cao et al. 7 proposed a new structure, which is a vibration ring gyroscope with a double Ubeam and designed using a combination of mathematical analysis and the finite-element method. This new structure can easily improve performance. Although hardware methods have effectively improved the performance of MEMS gyroscopes under different temperature, these methods spend more time and amount of work.
On the other hand, the other way is to establish the mathematical model is to reduce temperature drift that is reported as software compensation. Fu et al. 8 introduced the principle of MEMS gyroscope and the influence of MEMS gyroscope based on the temperature characteristic. Cao et al. 9 proposed a method which called radial basis function neural network (RBF NN) to compensate the temperature energy influence. The results indicate that, after RBF NN-GA-KF method compensation, the bias instability of Gyros X, Y, and Z improves from 1398=h, 1548=h, and 1788=h to 2:98=h, 3:98=h, and 1:68=h. Shen et al. 10 proposed a multi-scale parallel model based on sample entropy based bounded ensemble empirical mode decomposition (SE-BEEMD), forward linear prediction (FLP) and extreme learning machine (ELM) for temperature error processing of MEMS gyroscope. The results show that the ELM has the best modeling accuracy and shortest training time, which would be valuable for online temperature drift modeling and compensation. Jianli et al. 11 proposed a novel error model based on RBF NN optimized by particle swarm optimization (PSO) to reduce the temperature error. This method is used in ring laser gyroscope (RLG), but it is not mentioned on MEMS gyroscope. Wei et al. 12 describes a novel approach for identifying the drift of RLG based on genetic algorithm and support vector regression. Although the method can easily decrease the drift of RLG based on room temperature, the drift of temperature was not processed in this article. Li et al. 13 proposed a new algorithm method named support vector machine (SVM) which is used to reduce the temperature error based on the RLG. Li et al. 14 proposed an SVM model to compensate for the temperature drift of the fiber optic gyroscope (FOG). The performance of the FOG was improved effectively. Also the least square support vector machine (LS-SVM) mode has the advantages like training speed, global optimum, high accuracy, and good non-linear properties. Wang and Chen 15 proposed that a method of modeling and compensation for FOGs based on traditional SVM algorithms and the temperature drift of the FOG is greatly reduced. Although the algorithm has been already used to improve the performance of FOG and RLG, it is not mentioned on MEMS gyroscope and the temperature drift of MEMS gyroscope.
In this article, for the sake of improving the performance, a temperature drift model is established, and some methods are suggested to compensate for temperature drift. The algorithm of SVMs which is first used in temperature compensation of MEMS gyroscope is suggested to analyze and reduce the drift. Instead of a single algorithm, a novel improved SVMs algorithm is also suggested to reduce the drift. The Allan variance is suggested to compare the performance of compensation and improve the availability and practicability of the suggest methods.

Structure model of MEMS gyroscope
As it is shown in Figure 1, the structure of this MEMS gyroscope can be divided into two modes: drive mode and sense mode, which can be described as a springmass-damping second-order system. It can be shown that the drive mode has 1 degree of freedom (DOF) along the X axis, and the sense mode also has 1 DOF along the Y axis. Each axis has two sections, which are stiffness k and damping d. As it is described in Figure 1, Coriolis mass m has 2 DOF in both X axis and Y axis. As usual, MEMS gyroscopes work on the drive mode by drive stiffness k x and drive damping d x , when the Coriolis mass is subjected to an angular velocity of Z axis, the sense stiffness k y and sense damping d y are used by sensing mode to detect angular velocity. The dynamic system can be represented by the simplified equations where m is the main mass of this MEMS gyroscope, which used by drive mode and sense mode. F d is the drive force amplitude, w d is the drive force angular frequency, and O z is the angular rate around the Z axis. Therefore, the natural frequency and the damping ratio of the drive mode should be described as By solving equation (1), the displacement of the MEMS gyroscope in the drive direction can be described as where the phase and amplitude should be determined as When the MEMS gyroscope gets an angular velocity O z , the sense mode can be described as where F O Z is the Coriolis force which is generated from the angular velocity O z . So, the equation of motion in sense mode is given as where the natural frequency and the damping ratio of the sense mode should be described as By solving equation (1), the displacement of the MEMS gyroscope in the sense direction can be described as where the phase and amplitude should be determined as The temperature model and drift of MEMS gyroscope Temperature is one of the most significant factors that affects the performance of the MEMS gyroscope. There are two main factors that are to be considered: the size of the structure and the material of the elastic modulus when the temperature is changed. Among the two factors, the size of the structure has less influence on the performance of gyroscopes and the influence of the material of the elastic modulus should be mainly discussed.
The stiffness of the MEMS gyroscope system will be changed when the material of the elastic modulus is changed and the resonant frequency also changes with the stiffness of the system. Therefore, the change of temperature will lead to the drift of resonant frequency. Obviously, elastic modulus varies linearly with the temperature as shown in the following equation where E(T ) is the elastic modulus when the temperature of silicon is T , E 0 is the elastic modulus when the temperature of silicon is T 0 , and k ET is a temperature variation coefficient of the elastic modulus of silicon. The stiffness of the system is proportional to the modulus of elasticity by the simplified equations where K is the stiffness of the system when the temperature is T, K 0 is the stiffness of the system when the temperature is T 0 . So the relationship between the resonant frequency and temperature is described by the following equation So, we can see from these equations that temperature is one of the most significant factors which affects the performance of the MEMS gyroscope.

The experiment of temperature
The MEMS gyroscope is placed at the inside of a temperature-controlled oven for the sake of outputting the signal and not being affected by temperature variations of environment; the ranges of temperature and the temperature rate are set from -40°C to 60°C and 1°C/min, respectively. First, the initial temperature should be set as 60°C and placed in the temperature for an hour to ensure that the structural temperature is stable at 60°C. Then, the temperature is decreased at a rate of -1°C/min to -40°C and that temperature is also maintained for an hour to ensure that the structural temperature is of -40°C. The temperature-controlled oven should be observed at every 10°C for an hour to collect the data and be ensured that the structural temperature has a good stability and equal to oven temperature. The environment and steps are shown in Figure 2.
As for the test, the original output of an axis which described the output data reduce from 60°C to -40°C and rise from -40°C to 60°C is shown in Figure 3.

The model of temperature and algorithms
The drift model of temperature based on algorithms A novel temperature drift model is established in this article: temperature and temperature variation rate. These two factors could reflect the performance perfectly, therefore, H is defined as the matrix of all two factors where T represents the temperature, and _ T represents the temperature variation rate. For the sake of establishing a model which is used in the new method, a function could be established as a target which can be trained as Algorithm of SVMs SVMs 16 are based on the theory of statistical learning theory (SLT). SLT has several characteristics such as intuitive geometric explanations and perfect mathematical forms. Since Vapnik put forward the concept of SVM in the 1990s, the basic framework of algorithmic and theoretical concepts has been completely determined, which is based on many kinds of SVMs.
With the majority of data samples based on SVM, we can describe that the linear separable samples are considered as two classes, which are (x 1 , y 1 ),(x 2 , y 2 ),. . .,(x l , y l ) x 2 R n ,y 2 fÀ1, + 1g; these linear separable samples are classified by the hyperplane showed on the above equation and its standard form can be constrained by the expression of above equation Figure 4 shows the classification of a sample hyperplane. We can focus on that the distance from the point of the data sample to the hyperplane is described as the equation This distance is called the classifications distance, and the maximum distance classification is required. In order for the maximum classification interval to be equivalent to the minimum of values of (1=2)jjwjj 2 when the current classification interval is 2=jjwjj, the above equation (21) should be satisfied which is the best classification. Therefore, the original appearance of the SVM can be represented by the following quadratic programming problem equations where j i is a slack variable when j i ø 0, ans C represents a penalty for the error of classification samples.  So equation (22) can be represented as the following form of unconstrained Lagrange norm where the Lagrange factor is a i , and equation (23) can also be expressed by the above equation We can also express the question of dual optimization by equations (27) where a i is obtained by solving equation (8) because only a small part of a i is not found in the solution, which the corresponding sample is support vector. So the optimal classification function is given as where b is threshold of classification which can be expressed by any support vector. As for non-linear data samples, the non-linear transformation can be transformed into another linear question in high-dimensional space to solve, which needs to be achieved by the kernel function such as K(x i , x j ) = \F(x i ) F(x j ).. At this point, the objective function becomes and the function of classification becomes In conclusion, these are SVMs. The kernel function is one of the most significant factors in the algorithm of SVM. The present kernel function makes the function solution bypass the eigenspace and get directly in the input space which avoids computational jealousy of non-linear mappings. There are some general kernel functions such as linear kernel function (LKF), polynomial kernel function (PKF), sigmoid kernel function (SKF), radial basis kernel function (RBKF), and spline kernel function (SPKF) which are described as follows LKF As is shown on these equations, LKF is a typical global kernel function that can be regarded as classifying the linearly separable data sets. PKF is an extensive applied non-linear mapping function, and the approaching capability of it is determined by the order of the polynomial. PKF is a d-order polynomial classifier which can be described as the above function SKF actually includes a multi-layer perceptron network with a hidden layer, but the weight and the amount of hidden layer nodes are automatically determined by the algorithm, unlike the traditional perceptron network, which is determined by human experience. RBKF is the most extensive applied localized kernel function and strong in local regression. The smaller the value of s, the stronger the learning ability of SVM and the larger the confidence interval, but the SVM generalization ability gets worse at the same time. Therefore, the value of s could be properly selected. SPKF could approximate any non-linear functions theoretically, but the flexibility in practice is not best than RBKF.

Improved algorithm of SVMs
An improved SVM algorithm which is based on fuzzy C-means clustering is suggested to compensate for temperature drift more effectively. The SVM algorithm based on fuzzy C-means clustering includes three main processes which are shown in Figure 5. The processes are to use the fuzzy C-means clustering to preprocess the data of the learning sample. The second process is to describe the application of different classes SVM algorithm which is generated clustering by different classifications. The third process is to calculate the distance from the sample to each clustering center. Finally, the results of the whole system output for each calculation results of SVM algorithm. The steps of C-means support vector machine (C-SVM) method are shown in Figure 5.
The steps of C-SVM method is as follows: Step1: Judging whether pre-clustering is necessary according to the size of learning sample data. As the number of clusters is larger than the set value, the number of clusters is calculated and the fuzzy Cmeans clustering is performed.
Step 2: As for each sample, find out the maximum membership degree of each cluster center and classify it into corresponding classes.
Step 3: After the clustering is completed, the number of samples contained in each class is calculated. And if the number is less than the corresponding value, the relevant class centers and the number of redundant classes will be eliminated. The samples are clustered again according to the new cluster number.
Step 4: Different SVMs are used to learn different classes.
Step 5: A fuzzy classifier is constructed to get the output of SVM. The input for each membership degree of sub-SVM is determined. According to the membership degree, the output of each sub-SVM model is synthesized and the final output is obtained where C is the number of classes, Y i is the output of the first i SVM, and u i is the test sample points to the membership degree of each cluster center. u i is related to the square of the distance from the sample point to the cluster centers. It can slightly ensure that the SVM of similar classes plays a greater role in the output of classification synthesis where d(x, c i ) expresses the Euclidean distance between the input and the corresponding clustering center, and c i expresses the center of class i.

Computation complexity of SVM and C-SVM
In order to compare the computation complexity of SVM and C-SVM, computation time and space complexity is provided in this article. In order to analyze, we assume that the time spent for all operators is the same and the computation complexity concerns only performance and running hardware. After running the algorithms based on MATLAB, the results are shown in Table 1.

Verification and analysis
As for the test, the output data are shown in Figure 6. There are 2200 data points in each temperature experiment, with the majority of data points of the 220 data points are chosen to represent all data points ( Figure 6). In order to improve the accuracy of C-SVM and SVM method, we add the output data of Y axis based on another MEMS gyroscope under the temperature experiment. The original data are shown in Figure 7, and Figure 8 includes 220 points of data. From Figures 9 and 10, we can see that the output of X axis varied a lot in the test. For the sake of reducing the temperature drift, SVM, an improved SVM algorithm method and the least square method are used in this article. From Figures 9 and 10, we also can see that the temperature drift model based on SVM algorithm, C-SVM algorithm, and the least square method are established.
From Figures 11 and 12, we can see that the output of Y axis varied a lot in the test. For the sake of Table 1. The results of computation time and space complexity based on SVM and C-SVM.

Algorithm
Computation time Space complexity SVM: support vector machine; C-SVM: C-means support vector machine.   reducing the temperature drift, SVM, an improved SVM algorithm method and the least square method are used in this article. From Figures 11 and 12, we also can see that the temperature drift model based on SVM algorithm, C-SVM algorithm, and the least square method are established. Based on these temperature drift models, it can be easily recognized that the three curves which are the best algorithm to reduce the temperature drift. Obviously, C-SVM method is suitable to reduce the temperature drift.
Allan variance 17 was proposed to distinguish the various error sources which are used to evaluate the performance of MEMS gyroscopes nowadays. The temperature drift will be divided into mainly five parts and the most important parts which are N (Angle random walk) and B (Bias instability). The method results of Allan variance analysis based on X axis and Y axis are shown in Tables 2 and 3.
From Table 2, it can be seen that by using SVM and C-SVM methods, the factors of Allan variance analysis are reduced, which shows that C-SVM method is the better method. [18][19][20][21][22][23][24] As for bias instability, when the temperature is ranged from -40°C to 60°C, the factor of B is reduced from 0.424 (8h) to 0.02194 (8h), and when the temperature is ranged from 60°C to -40°C,      the factor of B is reduced from 0.1056 (8h) to 0.0329 (8h). From Table 3, it also can be seen that by using SVM and C-SVM methods, the factors of Allan variance analysis are reduced, which shows that C-SVM method is the better method. As for bias instability, when the temperature is ranged from -40°C to 60°C, the factor of B is reduced from 0.066 (8h) to 0.0145 (8h), and when the temperature is ranged from 60°C to -40°C, the factor of B is reduced from 0.4207 (8h) to 0.0093 (8h).

Conclusion
In this article, two methods are suggested to reduce the temperature drift, which are SVM method and C-SVM. As for bias instability, when the temperature is ranged from -40°C to 60°C, the factor of B is reduced from 0.424 (8h) to 0.02194 (8h), and when the temperature is ranged from 60°C to -40°C, the factor of B is reduced from 0.1056 (8h) to 0.0329 (8h). The comparison results between two methods and the original data are shown obviously by Allan variance method. [17][18][19][20][21] Specifically, by using C-SVM, the drift of temperature is reduced more evidently.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.