A Temperature Error Parallel Processing Model for MEMS Gyroscope Based on a Novel Fusion Algorithm

: To deal with the inﬂuence of temperature drift for a Micro-Electro-Mechanical System (MEMS) gyroscope, this paper proposes a new temperature error parallel processing method based on a novel fusion algorithm. Firstly, immune based particle swarm optimization (IPSO) is employed for optimal parameters search for Variational Modal Decomposition (VMD). Then, we can get the optimal decomposition parameters, wherein permutation entropy (PE) is employed as the ﬁtness function of the particles. Then, the improved VMD is performed on the output signal of the gyro to obtain intrinsic mode functions (IMFs). After judging by sample entropy (SE), the IMFs are divided into three categories: noise term, mixed term and feature term, which are processed di ﬀ erently. Filter the mixed term and compensate the feature term at the same time. Finally, reconstruct them and get the result. Compared with other optimization algorithms, IPSO has a stronger global search ability and faster convergence speed. After Back propagation neural network (BP) is enhanced by Adaptive boosting (Adaboost), it becomes a strong learner and a better model, which can approach the real value with higher precision. The experimental result shows that the novel parallel method proposed in this paper can e ﬀ ectively solve the problem of temperature errors.


Introduction
The MEMS gyroscope based on Coriolis acceleration mainly conveys vibration between the drive mode and the detection mode [1,2], due to its advantages such as robustness, low noise, and low power consumption [3], MEMS technology and gyroscopes have been widely used in aviation, aerospace, measuring and other important fields [4][5][6][7][8][9][10].
Temperature is one of the factors limiting the continued development of MEMS gyroscopes. There are two main methods for solving the temperature limitation: one is to improve the performance through hardware facilities, including further optimization of the structure and strengthening the control of the circuit. Cao et al. [11] proposed how the mechanical model of the gyroscope is affected by temperature changes, and the method of improving the silicon structure is used to achieve hardware compensation. In [12], an effective gyro thermal compensation system is proposed by Chiu et al. for low temperature bias drift (TBD) MEMS. In order to compensate for the drift temperature energy loss, Liu et al. adopted a more complete design structure for MEMS vibratory gyroscopes [13]. Cao et al. designed a very reasonable equivalent electrical model of silicon structure to deal with the difficulty of inaccurate performance caused by excessive temperature [14]. Fu et al. adopted a special a great impact on the results. IPSO can optimize it well, an this has a great effect on the extraction of noise and drift. For the temperature drift term, Adaboost can improve the prediction accuracy to a certain degree. Therefore, this paper proposes a novel hybrid algorithm based on IPSO-VMD and BP-Adaboost after comparing with various algorithms. The model focuses on practical effects and it is very suitable for gyroscope's signal, the experimental results prove this. The detailed introductions are as follows.

Gyro Structure
The dual-mass gyroscope using turning-fork is studied, and its structure is shown in Figure 1. It contains two masses that can be counter-vibrated under the action of electrostatic forces. There are two modes in the rotary fork structure, namely sense mode and drive mode. The drive mode includes a drive frame, drive springs, and a drive comb, and the sense mode includes a sense frame, sense springs, and a sense comb. Since it is a separated structure, the drive mode and the sense mode are separated from each other, and there is no coupling displacement. In addition, the common parts of the two modes constitute mass, when an electrostatic force acts on the drive mode, the two masses will produce opposite vibration on the X-axis, and the angular velocity around the Z-axis will increase, when the angular velocity reaches ψ z , the Coriolis force is generated by the mass of the vibration and is transmitted to the sense frame on the Y-axis, which is then detected by the detection circuit.
Electronics 2020, 9,499 3 of 23 accuracy to a certain degree. Therefore, this paper proposes a novel hybrid algorithm based on IPSO-VMD and BP-Adaboost after comparing with various algorithms. The model focuses on practical effects and it is very suitable for gyroscope's signal, the experimental results prove this. The detailed introductions are as follows.

Gyro Structure
The dual-mass gyroscope using turning-fork is studied, and its structure is shown in Figure 1. It contains two masses that can be counter-vibrated under the action of electrostatic forces. There are two modes in the rotary fork structure, namely sense mode and drive mode. The drive mode includes a drive frame, drive springs, and a drive comb, and the sense mode includes a sense frame, sense springs, and a sense comb. Since it is a separated structure, the drive mode and the sense mode are separated from each other, and there is no coupling displacement. In addition, the common parts of the two modes constitute mass, when an electrostatic force acts on the drive mode, the two masses will produce opposite vibration on the X-axis, and the angular velocity around the Z-axis will increase, when the angular velocity reaches ψz, the Coriolis force is generated by the mass of the vibration and is transmitted to the sense frame on the Y-axis, which is then detected by the detection circuit. This structure is driven by tuning fork theory, U-shaped springs are used to connect the left and right drive masses, the two sense masses in series are connected by the drive spring in X-axis. There are related simulations of the first four sequential modes in Ansys soft, as shown in Figure 2. In practice, the drive mode shows purely anti-phase mode drive, it is for three main reasons: the relevant excitation mode of the drive mode, the quality factor Rx2 of the anti-phase drive mode is greater than 2000, the frequency difference between the anti-phase mode and the in phase mode is more than 1000Hz., Since the actual sensing mode used for work consists of the second and the third mode, the motion equation of gyroscope structure can be expressed by Equation (1) in ideal case: is the damping coefficient, ] is the stiffness, E = [Edsin(ωdt), −2mcψz , −2mcψz ] T is the external force matrix; x represents the displacement of drive mode; y1, y2 and Ry1, Ry2, are the displacement and quality factors respectively of sense in-phase and anti-phase mode; mx is drive mode equivalent mass; ψz is input angular velocity; my represents the sense mode quality, This structure is driven by tuning fork theory, U-shaped springs are used to connect the left and right drive masses, the two sense masses in series are connected by the drive spring in X-axis. There are related simulations of the first four sequential modes in Ansys soft, as shown in Figure 2. In practice, the drive mode shows purely anti-phase mode drive, it is for three main reasons: the relevant excitation mode of the drive mode, the quality factor R x2 of the anti-phase drive mode is greater than 2000, the frequency difference between the anti-phase mode and the in phase mode is more than 1000Hz., Since the actual sensing mode used for work consists of the second and the third mode, the motion equation of gyroscope structure can be expressed by Equation (1) in ideal case: where, S = [x,y 1 ,y 2 ] T is the displacement, m = [m x ,m y ,m y ] T is the mass, a = diag w x2 m x R x2 , x] T is the external force matrix; x represents the displacement of drive mode; y 1 , y 2 and R y1 , R y2 , are the displacement and quality factors respectively of sense in-phase and anti-phase mode; m x is drive mode equivalent mass; ψ z is input angular velocity; m y represents the sense mode quality, which is similar to the Coriolis mass m c ; E d and ω d represent the amplitude and frequency of the excitation drive mode. Through modeling calculations, we conclude that the damping coefficient and stiffness are affected by temperature [11]: where A cx = 8.68 × 10 −9 m·sJ/mol·K 1.5 is a coefficient, n and V are parameters that change with the package, and T is temperature. It can be seen that the gyroscope structure has temperature characteristics, and more details can be found in [11].
Electronics 2020, 9, 499 4 of 23 which is similar to the Coriolis mass mc; Ed and ωd represent the amplitude and frequency of the excitation drive mode. Through modeling calculations, we conclude that the damping coefficient and stiffness are affected by temperature [11]: where Acx = 8.68 × 10 −9 m·sJ/mol·K 1.5 is a coefficient, n and V are parameters that change with the package, and T is temperature. It can be seen that the gyroscope structure has temperature characteristics, and more details can be found in [11].

Gyro Monitoring System
The working principle of the gyroscope monitoring system is shown in Figure 3. The drive frame shift x(t) is detected by the differential amplifier and detected by the drive sense comb, which is done in the drive loop, thereafter, the AC drive signal VdacSin(ωdt) must delay the signal phase by 90°, the pickup of VdacSin(ωdt) is then performed by a low-pass filter and a full-wave rectifier, and then the corresponding reference voltages Vref and Vdac are used for comparison. Next, the integrator controller outputs a corresponding signal which is used to generate the stimulating force to form the drive mode to superimpose VdacSin(ωdt) with the driving DC signal VDC. The interface of the sensing circuit is the same as the driver circuit and is open loop; two differential amplifiers are used to detect the sensing signals of the left and right masses respectively, and the second differential of the output signals can be used to be the sense mode amplified signal Vstotal. The amplified signal of the sense module is demodulated by VdacSin(ωdt), which generates a sense mode moving signal VOopen through a low-pass filter, which is also a product of sense open loop [35].

Gyro Monitoring System
The working principle of the gyroscope monitoring system is shown in Figure 3. The drive frame shift x(t) is detected by the differential amplifier and detected by the drive sense comb, which is done in the drive loop, thereafter, the AC drive signal V dac Sin(ω d t) must delay the signal phase by 90 • , the pickup of V dac Sin(ω d t) is then performed by a low-pass filter and a full-wave rectifier, and then the corresponding reference voltages V ref and V dac are used for comparison. Next, the integrator controller outputs a corresponding signal which is used to generate the stimulating force to form the drive mode to superimpose V dac Sin(ω d t) with the driving DC signal V DC . The interface of the sensing circuit is the same as the driver circuit and is open loop; two differential amplifiers are used to detect the sensing signals of the left and right masses respectively, and the second differential of the output signals can be used to be the sense mode amplified signal V stotal . The amplified signal of the sense module is demodulated by V dac Sin(ω d t), which generates a sense mode moving signal V Oopen through a low-pass filter, which is also a product of sense open loop [35].

Variational Modal Decomposition (VMD)
As an effective signal decomposition algorithm, VMD adopts the non-recursive and variational mode decomposition method, which can effectively improve the modal aliasing phenomenon in empirical mode decomposition (EMD), and has good robustness. VMD can get the optimal result of the variational model through continuous iterative processing, and can obtain the bandwidth and frequency center of each intrinsic mode function (IMF) by adaptively separating the components. Using VMD to decompose complex signals is actually the process of solving the sum of the smallest frequency bands by constructing multiple variation functions, a brief introduction of the VMD is as follows [36,37]: (1) First, the input signal x(t) is decomposed to obtain k eigenmode function components {uK(t)} = {u1(t), u2(t), …, uk(t)}, indicating k IMF components. Initialize the center frequency of each eigenmode function {wK} = {w1, w2, …, wk}, and then calculate the square norm of the demodulated signal gradient. The bandwidth of each eigenmode function component is estimated, and the expression of the constrained variational model is: where ∂t is the partial derivative of the time.
(2) To deal with the optimal solution of the constrained variational problem, the Lagrangian multiplication operator λ(t) and the penalty factor α are proposed, the extended Lagrangian expression is:

Variational Modal Decomposition (VMD)
As an effective signal decomposition algorithm, VMD adopts the non-recursive and variational mode decomposition method, which can effectively improve the modal aliasing phenomenon in empirical mode decomposition (EMD), and has good robustness. VMD can get the optimal result of the variational model through continuous iterative processing, and can obtain the bandwidth and frequency center of each intrinsic mode function (IMF) by adaptively separating the components. Using VMD to decompose complex signals is actually the process of solving the sum of the smallest frequency bands by constructing multiple variation functions, a brief introduction of the VMD is as follows [36,37]: (1) First, the input signal x(t) is decomposed to obtain k eigenmode function components {u K (t)} = {u 1 (t), u 2 (t), . . . , u k (t)}, indicating k IMF components. Initialize the center frequency of each eigenmode function {w K } = {w 1 , w 2 , . . . , w k }, and then calculate the square norm of the demodulated signal gradient. The bandwidth of each eigenmode function component is estimated, and the expression of the constrained variational model is: where ∂ t is the partial derivative of the time.
(2) To deal with the optimal solution of the constrained variational problem, the Lagrangian multiplication operator λ(t) and the penalty factor α are proposed, the extended Lagrangian expression is: in the formula: α is the penalty factor, which is a large enough positive number to ensure the reconstruction accuracy of the signal. λ(t) is a Lagrangian multiplier operator, which can make the constraint condition strict. So as to deal with the above variational problem, the time-frequency transformation is performed on the formula, and then the variables u n+1 k , ω n+1 k , λ n+1 are updated by the alternating direction multiplier algorithm, where u n+1 k is the modal function at the (n + 1)th cycle, ω n+1 k represent the center frequency of the current mode function, λ n+1 is the multiplication operator at the (n + 1)th cycle. Then, we can get the solution to this optimization problem: (3) Update λ(w) by Equation (5): where τ represents the time constant. If the accuracy requirement is not high, such as in a strong noise environment, λ may not be updated, and τ = 0. (4) Repeat the above steps iteratively, and if the discriminant Formula (9) is satisfied, the iteration is stopped: where ε is the discriminant precision, and its value is greater than zero. Thus, k eigenmode functions can be obtained after the iteration stops, and the VMD decomposition is completed.
According to the principle of VMD, the value of the penalty factor α and the number of the decomposition mode k are set before the decomposition, and the decomposition result will have a very large influence due to the different settings of α and k. If k is greater than the expected quantity of decomposition modes, the phenomenon of over-decomposition will take place, but if the quantity of k is too small, under-decomposition will occur. If the quantity of the penalty factor α is larger, the bandwidth value of the modal function will be smaller. Conversely, the smaller the α, the larger the bandwidth value of the modal function, which will greatly affect the effect of the decomposition, consequently, finding the optimal parameter values for k and α is necessary.

Immune Algorithm Based Particle Swarm Optimization (IPSO)
IPSO is applied in this paper to optimize the parameters of the VMD to improve its adaptability and accuracy. IPSO is the result of particle swarm optimization combined with immune algorithm, and permutation entropy (PE) are applied as the fitness function.

Permutation Entropy (PE)
PE is an algorithm for judging the time series' degree of complexity, due to its robustness, simplicity and low computing effort, it has received extensive attention. It amplifies the micro-signals in the system and detects very fine information, so it is very sensitive to the signal. In addition, it does not require any model assumptions, the window length and sampling frequency have little effect on the results. It can also be used to detect nonlinearities and non-stationary signals. Here, permutation entropy is the fitness functions in IPSO optimization. The specific process is introduced as follows [38,39]: Step.1 Reconstruct phase space.
For a series of time {s(k), k = 1, 2, . . . , j}, by performing phase space reconstruction on it, we can obtain a phase sequence: . . .
Step.2 Rearrangement of reconstructed components The t-th row is selected, and the reconstructed components Q(t) are arranged in ascending order. In reconstructed components, the positions of each element are arranged in a sequence of k 1 , k 2 , k 3 , . . . , k e , namely: It is easy to know if k p < k q , then: for any reconstruction component Q(t), we can obtain a series of sequences B(k) = (k 1 , k 2 , . . . , k θ ), t = 1, 2, . . . , r.
Step.3 Calculation and normalization of PE After regrouping, the probability of each location index series is assumed to be P 1 , P 2 , . . . , P θ , and then the entropy (PE) is expressed as: It is a time series containing r index positions. After normalization, H p is: After normalization, it is easier to compare the change of the value of the time series, that is, the higher the complexity of the time series, the greater the entropy. In contrast, if the time series is more regular, the value of H p is smaller.

Immune Algorithm (IA)
Immune algorithm is the promotion of genetic algorithm, which combines the concept of biological immunity with genetic algorithm, can use the information in the problem to be solved selectively and purposefully on the premise of retaining the original excellent characteristics, and effectively restrain the degradation phenomenon in the optimization process. The flow chart is shown in Figure 4 and its main steps are as follows [40,41]: 1. Antigen recognition. The target functions and constraints are used as antigens for recognition. Determine whether such problems have been solved.
2. The initial antibody is produced. That is to get the initial value of the solution. If this kind of problem has been solved, search for early memory cells to generate the initial antibody.
3. Memory unit update. The antibody with high affinity was selected for storage and memory. 4. Antibody inhibition and promotion. The antibody with high affinity was promoted, the probability of passing on to the next generation was high, and the antibody with low affinity was inhibited. At the same time, new groups are generated to keep diversity and prevent single group evolution.
5. Genetic manipulation. After crossover and mutation, the next generation of antibody is produced to ensure that the population evolves in the direction of high adaptability.

PSO with IA
On the basis of immune algorithm, IPSO uses particle swarm optimization to update antibody population. Its flow chart and steps are as follows ( Figure 5): 1. Antigen recognition. The target functions and constraints are used as antigens for recognition. Determine whether such problems have been solved.
2. The initial antibody is produced. That is to get the initial value of the solution. If this kind of problem has been solved, search for early memory cells to generate the initial antibody.
3. Memory unit update. The antibody with high affinity was selected for storage and memory. 4. Antibody inhibition and promotion. The antibody with high affinity was promoted, the probability of passing on to the next generation was high, and the antibody with low affinity was inhibited. At the same time, new groups are generated to keep diversity and prevent single group evolution.
5. Genetic manipulation. After crossover and mutation, the next generation of antibody is produced to ensure that the population evolves in the direction of high adaptability.

PSO with IA
On the basis of immune algorithm, IPSO uses particle swarm optimization to update antibody population. Its flow chart and steps are as follows ( Figure 5):  Figure 5. The flow chart of Immune based PSO.
(1). Determine initialization parameters, including particle swarm number, etc. Then, M particles xi (antibodies) and their velocities vi are mapped by logistic regression analysis to form the initial population of particles (antibodies) P0.
(2). Initialize immune memory particles (antibodies), and at the same time, the fitness values of the actual population are calculated.
(3). Determine whether the algorithm meet the optimization requirements. If it meets the optimization requirements, get the optimization result, if not, continue.
(4). Update local and social optimal particles according to the formula:  (5). Generating N new particles (antibodies) by logical mapping (6). Select some particles (antibodies) to enter new group according to concentration. The probability of generating N+M new particles (antibodies) is calculated by using the percentage of similar antibodies in the population. Select N particles (antibodies) according to the probability to form the population P, and then return to the third step [42,43].

Sample Entropy (SE)
Sample entropy is an effective metric. Through calculating the possibilities of producing different patterns in sequence, it can measure the regularity and complexity. It has the characteristics of not relying on data length, not including its own data segment comparison, and high precision, it only needs shorter data to get a stable estimate. Next is a brief introduction to it [44]: Step  (1). Determine initialization parameters, including particle swarm number, etc. Then, M particles x i (antibodies) and their velocities v i are mapped by logistic regression analysis to form the initial population of particles (antibodies) P 0 .
(2). Initialize immune memory particles (antibodies), and at the same time, the fitness values of the actual population are calculated.
(3). Determine whether the algorithm meet the optimization requirements. If it meets the optimization requirements, get the optimization result, if not, continue.
(4). Update local and social optimal particles according to the formula: (5). Generating N new particles (antibodies) by logical mapping (6). Select some particles (antibodies) to enter new group according to concentration. The probability of generating N+M new particles (antibodies) is calculated by using the percentage of similar antibodies in the population. Select N particles (antibodies) according to the probability to form the population P, and then return to the third step [42,43].

Sample Entropy (SE)
Sample entropy is an effective metric. Through calculating the possibilities of producing different patterns in sequence, it can measure the regularity and complexity. It has the characteristics of not relying on data length, not including its own data segment comparison, and high precision, it only needs shorter data to get a stable estimate. Next is a brief introduction to it [44]: Step Step.2 For each i(1 ≤ i ≤ N -m + 1), in the case where the allowable deviation is r, count the number of d < r, and calculate the ratio of this number to the total number of distances, denoted as Step.3 Increase m by one, repeat the above steps to get C m+1 i (r), Φ m+1 (r), and the sample entropy of the sequence is: In practice, N is impossible to take ∞, when N takes a finite value, it has: If the value of SampEn is small, the self-similarity of the sequence is high. If the SampEn is large, the similarity is low and the sequence is complicated.

BP Adaboost Algorithm
BP is applied as a weak learner, and the Adaboost is employed to adaptively enhance it. The specific process of them is as follows:

Back Propagation Neural Network (BP)
There are two main parts in the process of BP algorithm: the forward propagation of signal and the back propagation of error. The input samples are transferred from the input layer to the hidden layer, and then sent to the output layer after being processed by neurons. If there is an error between the output and the expected result, the error is propagated back to the input layer, the error is distributed to each neuron and the connection weight is modified [45].
If a group of input and a group of targets form a pattern pair, set a total of P pattern pairs. When the P pattern acts, the error function of the output layer is defined as: where m indicates the quantity of neurons in the output layer, y jp indicates the actual output of the j-th neuron in the output layer under mode P, and t jp is the theoretical output. For the connection weight w ij between any two neurons, according to the gradient descent principle, the correction direction of each w ij is E, and the reverse direction of the function gradient is: where η is the step size. After all the samples are input, the weights are corrected according to their total errors. The modification of weights is a process that starts from time to time. The weights of each layer are adjusted through continuous propagation until the degree of error can be accepted. The process of modifying weights is also the process of learning. Generally speaking, the more neurons there are, the more information that can be recognized and memorized by neural network. The prediction model can be built by using neural network. The simple structure of BP is as follows ( Figure 6): (2) Perform m iterations. Use Gm(x) to represent the learner at the mth iteration, em to denote the error of the current learner, and αm the sum coefficient. Using the training data with the weight distribution Dm, the basic learner Gm is obtained, and the error of Gm(x) on the training set is calculated: The relative error of each sample is: where Em is the maximum error of the mth learner on the training set and Gm(xi) is the predicted value of the mth learner to xi.
The error rate of the mth weak learner is: where Z is a generalization factor and its expression is:
(2) Perform m iterations. Use G m (x) to represent the learner at the mth iteration, e m to denote the error of the current learner, and α m the sum coefficient. Using the training data with the weight distribution D m , the basic learner G m is obtained, and the error of G m (x) on the training set is calculated: The relative error of each sample is: where E m is the maximum error of the mth learner on the training set and G m (x i ) is the predicted value of the mth learner to x i . The error rate of the mth weak learner is: w mi e mi (24) (3) Compute the weak learner's weight coefficient α: (4) Update and process the weight distribution of training samples, the sample set weight coefficients of the (m + 1)th weak learner are: where Z is a generalization factor and its expression is: (5) Combine each weak learner. Perform a weighted average of each weak learner to get the final strong learner: The core of the Adaboost algorithm is shown in Figure 7. As we can see from the figure, the adaptive enhancement algorithm trains the weak learner based on the samples with weights. At the beginning, the weights of all sample points are the same, and then adjust the weight of the sample based on the data that the weak learner predicts to be erroneous, and increase the weight of the error sample point, use the adjusted weighted sample for the next weak learner's training, thereby performing a loop until the termination condition is reached, and the loop is stopped. Finally, all weak learners are combined according to the combination strategy, thus forming a strong learner. According to this principle, we can know that after increasing the weights corresponding to the sample points with high prediction error rate, these sample points will be paid attention to in the subsequent trainer training. Therefore, we can obtain the prediction model with the desired accuracy. Because of its simple structure, no screening, and other characteristics, it is not easy to produce an over-fitting phenomenon.
Electronics 2020, 9,499 12 of 23 The core of the Adaboost algorithm is shown in Figure 7. As we can see from the figure, the adaptive enhancement algorithm trains the weak learner based on the samples with weights. At the beginning, the weights of all sample points are the same, and then adjust the weight of the sample based on the data that the weak learner predicts to be erroneous, and increase the weight of the error sample point, use the adjusted weighted sample for the next weak learner's training, thereby performing a loop until the termination condition is reached, and the loop is stopped. Finally, all weak learners are combined according to the combination strategy, thus forming a strong learner. According to this principle, we can know that after increasing the weights corresponding to the sample points with high prediction error rate, these sample points will be paid attention to in the subsequent trainer training. Therefore, we can obtain the prediction model with the desired accuracy. Because of its simple structure, no screening, and other characteristics, it is not easy to produce an over-fitting phenomenon.

The Parallel -Model Based on IPSO-VMD and BP-Adaboost
The proposed hybrid algorithm flow chart is shown in Figure 8, followed by a brief introduction to the flow chart: (1) First, the output signal of the gyroscope and the corresponding temperature value are obtained, after that, the output signal is decomposed by IPSO-VMD, wherein the IPSO is used to search for the optimal VMD parameters. After decomposing, IMFs are obtained.
(2) Then, SE is used to judge each IMF according to the complexity of the sequence, and they are divided into three different components: noise term, mixed term and feature term. The noise term tends to be white noise without any useful component, so it can be removed directly. The mixed term contains both noise and useful information, so SG filter is used to smooth it. For the Feature term, this part is the drift part of the gyroscope affected by the temperature, which is compensated by the temperature prediction method of BP-Adaboost.
(3) Finally, the signal reconstruction of SG filtered mixed term and feature term is carried out, the denoised signal is obtained. Reconstruct the SG filtered mixed term and compensated feature term, and the final result can be obtained.

The Parallel -Model Based on IPSO-VMD and BP-Adaboost
The proposed hybrid algorithm flow chart is shown in Figure 8, followed by a brief introduction to the flow chart: (1) First, the output signal of the gyroscope and the corresponding temperature value are obtained, after that, the output signal is decomposed by IPSO-VMD, wherein the IPSO is used to search for the optimal VMD parameters. After decomposing, IMFs are obtained.
(2) Then, SE is used to judge each IMF according to the complexity of the sequence, and they are divided into three different components: noise term, mixed term and feature term. The noise term tends to be white noise without any useful component, so it can be removed directly. The mixed term contains both noise and useful information, so SG filter is used to smooth it. For the Feature term, this part is the drift part of the gyroscope affected by the temperature, which is compensated by the temperature prediction method of BP-Adaboost.
(3) Finally, the signal reconstruction of SG filtered mixed term and feature term is carried out, the denoised signal is obtained. Reconstruct the SG filtered mixed term and compensated feature term, and the final result can be obtained.

Temperature Experiment
The sample gyroscope and test equipment are shown in Figure 9. There are three printed circuit boards, the first is connected to a fabric chip for processing weak signals, the second is equivalent to a drive cycle device, and the third is composed of an inductive loop. The PCB [46] is placed in a metal casing and wrapped in a rubber mat, the function of the metal housing is to receive the "GND" signal and electromagnetic shielding, the rubber mat prevents external impact and vibration of the PCB and structural chips. The monitoring circuit is located in three PCBs, and the metal pins connect the electrical signals to the mechanical structure. Some circuit temperature compensation methods are employed to improve the temperature performance of the MEMS gyroscope.
Test equipment has power supply (Agilent E3631A, Santa Clara, CA, USA), signal generator (Agilent 33220A), oscilloscope (Agilent DSO7104B), multimeter (Agilent 34401A), temperature oven and turntable power supply, providing ±10 V DC voltage and grounding device. Signal generator output voltage value during test, the oscilloscope observes the phase and amplitude of the signal, the multimeter is used to measure various data of the signal, the temperature oven and the turntable can generate a full temperature environment and can also measure the actual bandwidth of the gyroscope.
The gyroscope was first placed at room temperature and then energized for one hour. In order to ensure that the temperature of the gyroscope is 60 °C, heat the oven to 60 °C for one hour. At the same time, the thermistor is used to display the temperature of the gyroscope.
Data were collected from 60 °C. The temperature of the gyroscope and the temperature of the oven must be equal and stable during data acquisition, so we reduce the temperature of the oven by ten degrees per hour. Finally, after holding at −40 °C for an hour, all work was completed.

Temperature Experiment
The sample gyroscope and test equipment are shown in Figure 9. There are three printed circuit boards, the first is connected to a fabric chip for processing weak signals, the second is equivalent to a drive cycle device, and the third is composed of an inductive loop. The PCB [46] is placed in a metal casing and wrapped in a rubber mat, the function of the metal housing is to receive the "GND" signal and electromagnetic shielding, the rubber mat prevents external impact and vibration of the PCB and structural chips. The monitoring circuit is located in three PCBs, and the metal pins connect the electrical signals to the mechanical structure. Some circuit temperature compensation methods are employed to improve the temperature performance of the MEMS gyroscope.

Experiment Results and Analysis
The test results are shown in Figure 10. The result shows that the temperature change greatly affects the output of the gyroscope, there are a lot of irregular noise in output signal. The output of the dull-mass gyroscope and temperature changes are closely related, it changes by 0.0286 V in the range of 55 °C to −32 °C, and the noise and drift are different at different temperatures so the denoising and temperature drift compensation is necessary. Test equipment has power supply (Agilent E3631A, Santa Clara, CA, USA), signal generator (Agilent 33220A), oscilloscope (Agilent DSO7104B), multimeter (Agilent 34401A), temperature oven and turntable power supply, providing ±10 V DC voltage and grounding device. Signal generator output voltage value during test, the oscilloscope observes the phase and amplitude of the signal, the multimeter is used to measure various data of the signal, the temperature oven and the turntable can generate a full temperature environment and can also measure the actual bandwidth of the gyroscope.
The gyroscope was first placed at room temperature and then energized for one hour. In order to ensure that the temperature of the gyroscope is 60 • C, heat the oven to 60 • C for one hour. At the same time, the thermistor is used to display the temperature of the gyroscope.
Data were collected from 60 • C. The temperature of the gyroscope and the temperature of the oven must be equal and stable during data acquisition, so we reduce the temperature of the oven by ten degrees per hour. Finally, after holding at −40 • C for an hour, all work was completed.

Experiment Results and Analysis
The test results are shown in Figure 10. The result shows that the temperature change greatly affects the output of the gyroscope, there are a lot of irregular noise in output signal. The output of the dull-mass gyroscope and temperature changes are closely related, it changes by 0.0286 V in the range of 55 • C to −32 • C, and the noise and drift are different at different temperatures so the denoising and temperature drift compensation is necessary.
Electronics 2020, 9,499 15 of 23 Figure 10. Temperature and gyroscope output data obtained from temperature experiments. Figure 11. Optimal particle value and particle distribution in ISPO search.
Through IPSO-VMD, the original is decomposed into eight IMFs. In Figure 12, we can see that the noise and feature trend are in different dimensions, if we process them one by one, it will be a huge workload and there will be many errors. Therefore, the SE is employed to calculate the sequence The signal of gyro is decomposed by IPSO-VMD, IPSO is employed to get the optimal VMD parameters k and α. First, initialize the parameters of IPSO: the range of variable k is [2,12], the range of variable α is [10000,20000], the population of particles is 50, the maximum number of iterations is 30, and the inertia weight is 0.8, the learning factor one and two are all 1, check whether the optimal individual becomes better every eight cycles and particle replacement probability is 0.5. PE is used as the fitness function. After processing, the result of the IPSO particle swarm optimization algorithm is shown in Figure 11. From the figure we can see the search results. The picture on the right shows the particle distribution, a black circle represents a particle, the picture on the left shows the values of the two parameters. Obviously, the position corresponding to minimum entropy is obtained, and the corresponding position [8,12000] is selected as the optimal parameters. That is to say, the optimal decomposition layer number k is 8, the optimal penalty factor α is 12,000, and the best autocorrelation of IMFs can be obtained by setting this way.  Through IPSO-VMD, the original is decomposed into eight IMFs. In Figure 12, we can see that the noise and feature trend are in different dimensions, if we process them one by one, it will be a huge workload and there will be many errors. Therefore, the SE is employed to calculate the sequence complexity and take them into three categories: noise term, mixed term, and feature term, as shown in Figure 13. Through IPSO-VMD, the original is decomposed into eight IMFs. In Figure 12, we can see that the noise and feature trend are in different dimensions, if we process them one by one, it will be a huge workload and there will be many errors. Therefore, the SE is employed to calculate the sequence complexity and take them into three categories: noise term, mixed term, and feature term, as shown in Figure 13.  Then, parallel processing will be performed. As for the noise term, it contains no useful signal component and tends to be white noise, so it is directly removed. As for the mixed term, this is a mixture of noise and temperature trends because we can't separate the temperature trend completely from noise. Thus, noise will also become a trend through constant amplification. Therefore, the mixed terms are filtered by SG to retain the effective components. For feature term, this part is caused by temperature, it presents a nonlinear trend of change, so a temperature prediction by BP-Adaboost is applied to compensate them. The processing results are shown in Figure 14. Then, parallel processing will be performed. As for the noise term, it contains no useful signal component and tends to be white noise, so it is directly removed. As for the mixed term, this is a mixture of noise and temperature trends because we can't separate the temperature trend completely from noise. Thus, noise will also become a trend through constant amplification. Therefore, the mixed terms are filtered by SG to retain the effective components. For feature term, this part is caused by temperature, it presents a nonlinear trend of change, so a temperature prediction by BP-Adaboost is applied to compensate them. The processing results are shown in Figure 14.  Figure 15 shows the denoised signal and the original signal, the denoised signal is obtained by reconstructing the filtered mixed term and feature term, it can be seen clearly that the noise has been eliminated very well. Subsequently, by reconstructing the filtered mixed term and the compensated feature term, we get the final compensation signal, as shown in Figure 16.
Finally, the Allan variance is used to measure the signal after model denoising and compensation [47]. The Allan variance is widely used in gyroscope performance analysis as an IEEE-approved Figure 14. Results of parallel processing by IPSO-VMD and BP-Adaboost model. Figure 15 shows the denoised signal and the original signal, the denoised signal is obtained by reconstructing the filtered mixed term and feature term, it can be seen clearly that the noise has been eliminated very well. Subsequently, by reconstructing the filtered mixed term and the compensated feature term, we get the final compensation signal, as shown in Figure 16.     Finally, the Allan variance is used to measure the signal after model denoising and compensation [47]. The Allan variance is widely used in gyroscope performance analysis as an IEEE-approved standard analysis method. The result is shown in Figure 17, in comparison with the original signal, the angular random walk of the original signal is 0.010095 • /h/ √ Hz, and the angular random walk of the compensated signal is 1.195 × 10 −5• /h/

√
Hz. The bias stability of the original signal is 0.1806 • /h, after compensation, the bias stability of the processed signal is 7.17 × 10 −4• /h. The comparison results demonstrate that the proposed temperature compensation method based on IPSO-VMD and BP-Adaboost has a good effect. However, there are also shortcomings, for example, it takes a long time in the optimization process, which we will improve in the future research.

Conclusions
This paper studies the denoising and compensation of gyro temperature drift. A new temperature error compensation method based on IPSO-VMD and BP-Adaboost is proposed. Firstly, we found that the noise and drift of gyroscope vary with different temperatures, so we need to extract them separately for different processing. Here, IPSO-VMD is applied, and after decomposing, we get a certain amount of IMFs, the IPSO algorithm is employed to search for the optimal VMD parameters to achieve the best decomposition denoising effect. Subsequently, all the IMFs are divided into three categories by SE, the noise term is discarded, and the mixed term is filtered. Through signal reconstruction by adding the feature term, we can get the denoised sequence. Finally, the BP-Adaboost is employed to compensate the feature term, reconstruct the filtered mixed term and compensated feature term, the final compensation sequence is obtained. After that, a simulation experiment shows that the processed signal has excellent index relative to the original output signal, and the angular random walk changes from 0.010095°/h/√Hz to 1.195 × 10 −5°/ h/√Hz, the bias stability is changed from 0.1806°/h to 7.17 × 10 −4°/ h. Therefore, the proposed model has a good effect on denoising and compensation for the temperature drift error of the gyroscope.

Conclusions
This paper studies the denoising and compensation of gyro temperature drift. A new temperature error compensation method based on IPSO-VMD and BP-Adaboost is proposed. Firstly, we found that the noise and drift of gyroscope vary with different temperatures, so we need to extract them separately for different processing. Here, IPSO-VMD is applied, and after decomposing, we get a certain amount of IMFs, the IPSO algorithm is employed to search for the optimal VMD parameters to achieve the best decomposition denoising effect. Subsequently, all the IMFs are divided into three categories by SE, the noise term is discarded, and the mixed term is filtered. Through signal reconstruction by adding the feature term, we can get the denoised sequence. Finally, the BP-Adaboost is employed to compensate the feature term, reconstruct the filtered mixed term and compensated feature term, the final compensation sequence is obtained. After that, a simulation experiment shows that the processed signal has excellent index relative to the original output signal, and the angular random walk changes from 0.010095 • /h/ √ Hz to 1.195 × 10 −5• /h/ √ Hz, the bias stability is changed from 0.1806 • /h to 7.17 × 10 −4• /h. Therefore, the proposed model has a good effect on denoising and compensation for the temperature drift error of the gyroscope.