Crow Search Algorithm for MEMS Gyroscope Temperature Drift Signal and Processing for Denoising

,


Introduction
In recent years, the research of micro-electro-mechanical system (MEMS) gyroscope is endless, and it has been widely used in aviation, spaceflight, navigation, and civil electronic equipment.
e reason for this is that micro-electro-mechanical system (MEMS) gyroscope has high efficiency, low price, low energy consumption, and other cost-effective characteristics [1]. However, some inevitable defects of the MEMS gyroscope (e.g., noise and temperature drift) limit its application in many aspects [2]. erefore, it is crucial to eliminate the influence of errors.
ere are two kinds of temperature error processing methods: hardware compensation and software compensation [3].
By controlling the circuit and improving the structure of the gyroscope, the temperature performance of the gyroscope is improved and the hardware compensation is realized [4]. For instance, in [5], an innovative temperature compensation method is presented, which is based on variable temperature resistance-driven mode vibration characteristic compensation. In [6], it reduces the damping coefficient effect and designs an effective resonant frequency of the circuit. e appearance of software compensation makes up the disadvantage of high cost and complicated steps in the hardware compensation of MEMS gyroscope. By setting up the specific mathematical model, it achieves the goal of simple operation and high performance-price ratio. Similar to signal filtering, temperature compensation is also the most commonly used software compensation method for various gyroscopes and MEMS gyroscopes when dealing with temperature error. In [7], improved empirical mode decomposition (EMD) and integrated extreme learning machine (ELM) model are used for temperature compensation.
In order to get the compensated signal and eliminate the drift and noise, we deal with the software temperature error of MEMS gyroscope. rough serial processing and parallel processing and according to the low frequency characteristics of the drift part and the high frequency characteristics of the noise part, they are processed, respectively [8]. Empirical mode decomposition (EMD) [9] and wavelet decomposition [10] are commonly used in multiscale analysis. However, mode mixing is often mixed with empirical mode decomposition (EMD), so ensemble empirical mode decomposition (EEMD) is proposed. In order to improve the shortcomings of EEMD, such as false mode, extra postprocessing, and large computation burden, and to avoid the problem of predecomposition and overdecomposition, this paper proposes a method to stratify the decomposed subsignals by using sample entropy.
Variational mode decomposition (VMD) can achieve noise signal processing to a certain extent, and it is necessary to determine the values of two parameters α and K when using this method. Different values have different influences on the final denoising results. erefore, when these two parameters are artificially set, incomplete decomposition or excessive decomposition will usually be caused. Similarly, when the least square support vector machine (LSSVM) realizes temperature compensation, it also involves the choice of two parameters. e advantage of crow search algorithm (CSA) is that it can determine the optimal value of parameters, so as to achieve the most efficient signal processing. e variational mode decomposition (VMD) method [11] optimized by CSA in this paper is used to decompose the noise signal, and the Savitzky-Golay smoothing denoising (SG) method is used to denoise the decomposed signal. e framework is as follows. We give a brief introduction to MEMS gyroscopes in Section 2. In Section 3, VMD and CSA-VMD are introduced, and the CSA algorithm is described in detail, and then the SG method is analyzed. In Section 4, the optimized VMD method is compared with the traditional VMD method to prove that the former is due to the latter. Section 5 draws the conclusion.

e Introduction of MEMS Gyroscope
Structure. e gyroscope shown in Figure 1 has a tuning fork structure. As can be seen from Figure 1, the operating mode of the rotating fork gyroscope can be divided into the drive mode and sense mode. Drive frame, drive combs, and drive springs constitute the drive mode [12,13], sense frame, sense combs, and sense springs constitute the sense mode, and the mass is included in them. Under the control of the monitoring circuit, the two masses of the drive mode vibrate opposite each other along the x axis, driven by a certain amount of static electricity. When the angular velocity along the Z-axis is input, the vibration mass produces a Coriolis effect, and it then moves onto the Y-axis and becomes a motion of the sensory frame [14]. e gyroscope connects the spring (U-shaped) to the driving mass, and the X-axis of the driving spring is connected to the two sensory masses, respectively. e driving mode follows the shifting fork principle. Figure 2 shows the first four stages of simulation using Ansys software, and there are large frequency differences between the modes. Here set the actual driving mode as the fourth with a quality factor greater than 2000. e other three modes have different driving modes with different resonant frequencies, and driver reversing mode is what we expect. erefore, the left and right Coriolis masses are two degrees of freedom of the driving frame (X-axis) and the feeling frame (Y-axis), respectively.
2 Shock and Vibration  MEMS gyroscope is driven by alternating Coriolis forces caused by orthogonal vibration and rotation. Based on the principle of conservation of angular momentum, it is a constantly rotating object, and the axis direction does not change with the rotation of the bracket. MEMS gyroscopes use Coriolis forces to provide the tangential force exerted by a rotating object in radial motion. e equations of motion of a gyroscope are equations (1)- (3). n x is equivalent mass of drive mode, n y is the quality of sense mode, and n c is equivalent mass of Coriolis mass. x, y 1 , and y 2 are the displacements of the driving mode, the sensing in-phase mode and the anti-phase mode respectively. Q x2 , Q y1 , and Q y2 are the quality factors of driving mode, sensing in-phase and anti-phase modes.

e Introduction of the Gyroscope Monitoring System.
e monitoring system of the gyroscope is shown in Figure 3. When the driving sensor comb perceives the displacement of the driving frame (set to x (t)), the signal is transmitted to the split amplifier to require the full-wave signal phasor, and the phase delay of the signal vector is 90°, which also satisfies the phasor and the AC drive signal. e low-pass filter and the rectifier are then applied to the extracted V dac and the reference voltage V ref . After the comparator outputs, the integrator controller generates a control signal. V dac sin (w d t) low-pass filter demodulates the moving signal. e yellow part of the image shows the sensing open-loop output signal [15,16].
By detecting the motion signals of the left and right sensing frames, the differential detection amplifier amplifies the output again and generates the motion signals of the sensing mode. V dac sin (w d t) demodulation can obtain detection mode movement signal and eliminate noise [17]. To generate a sensing mode movement signal, the output signal can be processed with a second differential amplification. Acquisition of detected mode motion signals is combined with the use of low-pass filter noise cancellation.

Algorithm
VMD is a method of signal decomposition, similar to a Vinax filter bank [11]. e technology has the ability to determine the number of mode decomposition. en, the search and the solving process can adaptively match best center frequency for each mode and limited bandwidth and can achieve effective separation of intrinsic mode components (IMF) and signal in the frequency domain and then get the effective decomposition of given signal components. e sum of the decomposed subcomponents is the original signal, and the constraint variational expression is as follows: where ϑ k represents the k-th IMF and ρ k represents the central frequency. e Lagrange multiplier operator λ(t) and α solve the problem of constrained variation by transforming the constrained variation into unconstrained variation. erefore, the Lagrangian is e multiplier alternating direction method (ADMM) can be used to solve equation (2) and is updated according to the following equations: Update the Lagrange multiplier λ ∧ by the following equation: e update process is repeated until equation (9) is satisfied.
Given σ � 10 −6 , all IMFs can be recovered according to the above cycle. e specific VMD algorithm can be found in [18]. 4 Shock and Vibration

CSA-VMD Method.
In the actual operation, the VMD method must set the parameters (α and K) artificially. In [19][20][21][22], it is explained that these two parameters have a great influence on the decomposition amount, resulting in overdecomposition or underdecomposition; thus, loss of effective information and incomplete denoising are caused. e CSA algorithm can reasonably determine the parameters and optimize the parameters to the optimal position. Figure 4 shows the flowchart of CSA-VMD.
CSA is called a crow search algorithm, which is observed from the behavior of crows. e crows put the food they have hunted in their nests and take it back when they eat it. Crows also observe other crows hiding food in their nests and attempt to steal the food from the current nest. When the first crow commits a theft, it will be on high alert and take certain protective measures to prevent itself from becoming the victim of stolen food. Research has shown that crows are highly logical, and they will use a variety of reasonable ways to protect their food, such as moving nests. ey use their behavioral experience to predict what the next thief will do and to move their nest to a safer place to avoid food theft.
Based on the habits of crows, the CSA algorithm is used in this paper to optimize the parameter selection of the traditional VMD method. e principles are as follows: (1) Crows live in groups.
(2) Crows can remember the location of the nest where they hide their food. Next, according to the above principles, in order to determine the internal parameters of the VMD method, we will conduct the simulation of this algorithm in a threedimensional environment.
Step 1. initialize the problem. Let the number of crows N � 30, the probability of protection consciousness be AP � 0.1, the flight length be f1 � 2, all crows be regarded as a crow group, and the maximum iteration number be 30.
Step 2. Set the crow group and the crow memory matrix according to equations (10) and (11). Since the crows have no experience at the beginning, let the food be hidden in the crows' nests, that is, the initial position.
Crows � Step 3. Since internal parameters α and K need to be optimized, we put values of α and K into each nest.
Step 4. e fitness function (ft) was set to determine whether the crows formed memories.
Step 5. Identify the location of the crow's new nest by equation (12) and determine if it is feasible. If feasible, update the nest location; otherwise, the original position remains unchanged.
Sense loop Drive signal Sense signal -+ Shock and Vibration where x i,NEST+1 represents the new nest, x i,NEST represents the last nest, rand represents the consciousness probability of the crow, and m j,NEST represents the location of the new nest in the memory of the crow.
Step 7. Determine whether the iteration is completed, determine the best memory and the best position, and correspond to the internal parameters α and K of the VMD method.
is means that there are m consecutive values of x. e distance between x p+1 (j) and x p (j) is the absolute value of the maximum value of the difference between the two elements.
Calculate the distance between x p (i) and x p (j) given, and record the number of distances that are less than or equal to r, which we call φ i .
Define φ (p) (r) as When the dimension is k+1, calculate the number of x p+1 (i) and x p+1 (j) that are less than r apart from c i . Define c p i (r) and c p (r) as e sample entropy is defined as  Shock and Vibration After CSA-VMD decomposition, sample entropy is used to classify the decomposed subsignals to achieve the purpose of denoising.

SG Filtering.
e SG smoothing algorithm was proposed by Savitzky and Golay. Polynomial smoothing algorithm is based on least squares principle, also known as convolution smoothing. In [26], the algorithm is described in detail. Take m points near the original data x and set x as the origin. Next, construct 2m + 1 x-centered sampling points to take window data and then construct i-order polynomial: e corresponding residual is e filtering result is Savitzky and Golay found that calculating a 0 is equivalent to performing a FIR filter on the original data. In other words, you can do it using convolution.

(23)
When ε K is the minimum value, it has a good fitting degree with the original data. e partial derivative of ε K with respect to each parameter is 0.
After the formula is solved, the result is After equation (16), SG filtering is completed.

CSA-LSSVM Method.
e introduction of CSA-LSSVM will be divided into two parts. SVM-and LSSVM-related issues will be explained. Support vector machine (SVM) can directly analyze the linear case. When the linearity is not separable, the nonlinear mapping algorithm is used to transform it into the linear separable state of the high-dimensional mode. In this way, the linear algorithm is used to analyze the original nonlinear situation in the high-dimensional space, and then it is extended to the function fitting and other machine learning problems.
Based on structural risk minimization, SVM seeks a balance between the complexity (learning accuracy) and learning ability (error-free recognition) of the model constructed with limited sample information, so as to obtain the best generalization ability (generalization ability). SVM schematic diagram is shown in Figure 5. Its optimal classification function is Obviously, the SVM classification function is similar to the neural network in form, which obtains the corresponding output through the linear combination of the process nodes.
e inner product of the support vector machine corresponds to the nodes, which is also called the support vector network. Due to the inequality constraint problem, SVM has great hindrance in solving Lagrange multiplier and alpha. e least square support vector machine (LSSVM) transforms the original inequality constraint problem into equality constraint, which greatly optimizes the solution process and speeds up the operation speed. Inequality constraints for SVM are as follows: e equality constraints for LSSVM are as follows:

Shock and Vibration 7
where μ is the relaxation variable and represents the introduction outlier in the support vector. e optimization objective contains η and μ, ε and c, and they determine the optimal hyperplane and the minimum deviation value. Next, the Lagrange multiplier method is used to find the maximum value of m in the classification function Take the derivative of the parameters, respectively, make the derivative result 0, and define the kernel matrix F(x k , x t ): Obtain the linear equations of A and B: After solving the equation and getting relevant data, the regression function of LSSVM is as follows: e advantages of CSA-LSSVM are described below. Firstly, the least square support vector machine (LSSVM) is an improvement of the support vector machine (SVM), which realizes the optimization of temperature compensation effect. It is to change the inequality constraint of traditional support vector machine into equality constraint and take the error square and loss function as the experience loss of training set, so that the quadratic programming problem is transformed into the problem of solving linear equations, and the speed and convergence precision of solving the problem are improved.
Secondly, CSA optimized the two parameters of LSSVM, GAM and SIG2, to find the optimal combination of parameters, so as to improve the classification accuracy and achieve the optimal processing of temperature compensation.
e flowchart of CSA-LSSVM model recognition process is shown in Figure 6.

CSA-VMD-SG-LSSVM Method.
Based on the previous explanation, this paper integrates the above methods and applies them to MEMS gyroscope denoising and temperature compensation. e flowchart is shown in Figure 7. e specific steps are as follows: (1) e experimental MEMS gyroscope output data are decomposed by variational mode decomposition (VMD). (2) CSA is used to optimize the two parameters of VMD, and the optimal solution was obtained. (3) e decomposed components are divided into drift layer, mixed layer, and pure noise layer by using sample entropy. (4) CSA-LSSVM processing is applied to the trend layer, and SG filtering is applied to the mixed noise layer to remove the pure noise layer. (5) e processed trend layer and the mixed noise layer are superimposed to form the final reconstructed signal.

Experiments.
By testing the temperature characteristics of MEMS gyroscopes, we can verify the accuracy and feasibility of the proposed method-CSA-VMD-SE-SG. e gyroscopes and instruments used in the experiment are shown in Figure 8. e detection circuit is connected to the electrical signal through a metal pin and the printed circuit board is wrapped with a rubber pad to protect the printed circuit. To shield against electromagnetic interference, the coated printed circuit board is placed in a grounded metal housing. e structure chip connection interface (the first PCB) realizes the processing of the weak signal, and the sensing loop and the drive closed loop correspond to the two remaining PCBs, respectively. e experimental device has a signal generator for generating test voltage, signal amplitude, and phase; ±10 v DC voltage and ground power supply (Agilent E3631A) are obtained by means of multimeter (Agilent 34401A) and oscilloscope (Agilent DSO7104B). e temperature oven provides a full temperature range for our experiment; the actual bandwidth is measured by the measuring gyroscope [24]. First, the MEMS gyroscope is powered for one hour at room temperature. e ambient temperature is raised to 60°C (initial temperature) using a temperature oven, and the temperature of the gyroscope's inner shell remains the same as the ambient temperature. To ensure that there is no temperature difference between the gyroscope and the oven, the temperature of the oven should be kept at 10°C per hour during the data collection. e detailed experimental data and analysis process are presented below.    Shock and Vibration

Experimental Results.
e original data of the MEMS gyroscope experiment are shown in Figure 9. e experiment is accompanied by noise interference. Figure 9 shows the output analysis and temperature drift analysis based on the experimental data. It can be seen from the image that there is a certain correlation between the two, and the voltage changes by 0.0301 V between 55°C and −32°C. To minimize the error of the experimental results, we need to carry out denoising operation. Next, we will process the noise signal to make it easy to compare the effect before and after noise removal.
We decompose the experimental data using the CSA-VMD method, as shown in Figure 10, into eleven IMFs.
rough experiments, we found that CSA found the optimal α and K (30 iterations). However, due to the influence of artificially set internal parameters, VMD has underdecomposition, as shown in Figure 11. Next, the sample entropy of the 11 components after decomposition is calculated, and the calculated results are shown in Figure 12.
According to the sample entropy theory, the larger the sample entropy is, the more complex the sample component is. After the sample entropy is divided, the noisy component is divided into three parts, which are drift part, mixed noise part, and pure noise part. First of all, SG filtering is used to denoise the mixed noise part. As can be seen from Figure 13, SG filtering can effectively filter out noise interference and retain effective data. Next, the drift part is compensated. e CSA-LSSVM   Figure 11: Signal after CSA-VMD.     compensation method adopts two groups of experimental data for training and testing. As shown in Figure 14, the predicted output and the test output have a good fit. e reconstructed signal after compensation is shown in Figure 15. It can be seen that the temperature drift phenomenon is greatly eliminated after compensation, and the fitting error is small.

Comparison.
In the following, we will intuitively illustrate the effectiveness of the processing method by comparing the eigenvalues of the original signal and the signal processed based on CSA-VMD-SG-LSSVM. Figure 15 shows the comparison of denoising effects of different denoising methods in this experiment. It can be clearly seen that CSA-VMD-SG has the best denoising result. In order to illustrate the superiority and effectiveness of CSA algorithm, we separately compared VMD with CSA-VMD, LSSVM, and CSA-LSSVM. As shown in Figure 16, due to the underdecomposition problem of VMD algorithm, although the noise is reduced to some extent, some noise is still not effectively removed. CSA-VMD selects the optimal parameters during the stratification, and after the optimal stratification, the noise can be removed to the maximum extent within the capability of the method, which lays a foundation for the subsequent SG filtering.
Similarly, there are two parameters of LSSVM that need to be determined by CSA algorithm. Figure 17   predicted output and test output before and after the use of CSA. ere is a significant error in the range of 6000 to 8000 seconds, and the LSSVM-predicted output has a large deviation from the test output. From the local magnification of other fitting parts, it can be seen that CSA-LSSVM has better fitting degree than LSSVM. e mean square error of LSSVM is 0.0049°/s, while that of CSA-LSSVM is 4.0678 * 10 −5°/ s, which can intuitively show the differences between the two methods through data. No matter the mean difference or the contrast figure of two methods, CSA-LSSVM has a higher fitting effect than LSSVM and can better eliminate errors caused by temperature drift. e variances of the two signals are calculated by Allan algorithm. Allan algorithm has a high degree of recognition in the aspect of gyroscope denoising analysis. Figure 18 shows the processing results of signals before and after denoising using different algorithms. e results in the figure show that for the original signal, the angular random walk value is 0.0054°/h/√Hz, and the angular random walk value based on CSA-VMD-SE-SG-LSSVM processing is 1.1175 * 10 −4°/ h/√Hz. e bias stability of the original signal is 0.0909°/h, and the denoising signal is 0.0017°/h. Compared with the original signal, angular random walk value of the processed signal is optimized by 98.1% and bias stability of it is optimized by 98.2%.
In order to show the advantages of CSA algorithm directly, the Allan algorithm without using CSA algorithm is analyzed. e angular random walk value is 1.0364 * 10 −4°/ h/√Hz, and the bias stability is 0.0103°/h. Compared with the original signal, these two indexes are optimized by 98.1% and 88.7%, respectively. It can be clearly seen from the optimized percentage that the optimized result of CSA algorithm is significantly better than the unoptimized one. erefore, the method proposed in this paper can filter out the noise in the original signal well and has a good performance in the data processing of MEMS gyroscope.

Conclusion
A temperature error denoising method for MEMS gyroscope based on CSA-VMD-SG-LSSVM is proposed in this paper. First of all, the above methods are effective in denoising. In both VMD and LSSVM, the optimized results using CSA are better than those before optimization. Each component can be distinguished from the analysis of the SE of each component, and the mixing layer can be filtered by SG and CSA-LSSVM compensates the drift layer. en, by comparing the angular random walk value and the bias stability of the signal before and after denoising, the optimization effect is intuitively demonstrated. It can be seen from the above experimental results that the proposed method is more effective in MEMS gyroscope denoising.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest. 14 Shock and Vibration