MEMS gyroscope noise reduction method
Through the 1D-CNN-BiGRU model based on attention mechanism, the problem of automatically setting weights of feature importance in the existing technology is solved, and the measurement accuracy and error compensation performance are significantly improved, so as to achieve It has better noise reduction effect.
Patent Information
- Application Number
- CN202411130286.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-03
AI Technical Summary
The prior art is difficult to automatically set weights by analyzing the importance of features, further improving the measurement accuracy and error compensation performance of MEMS gyroscopes, and reducing noise.
Using the 1D-CNN-BiGRU model based on attention mechanism, the MEMS gyroscope data is preprocessed, feature extraction, timing analysis and weight allocation through the input layer, 1D-CNN layer, BiGRU layer, attention layer and output layer to achieve Data noise reduction.
The absolute value and variance of the error are significantly reduced, and the data accuracy of the MEMS gyroscope is improved. The average absolute value of the error is reduced by 57.03%, and the error variance is reduced by 81.07%, which has good engineering application value.
Smart Images

Figure CN119066338A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of MEMS gyroscopes, and in particular to a MEMS gyroscope noise reduction method. Background Art
[0002] Micro-electromechanical system (MEMS) gyroscopes have the advantages of small size, low power consumption, low cost, and high cost performance. They play an important role in small organizations such as drones, navigation terminals, and robots. Since MEMS gyroscopes have high noise, it is necessary to suppress the noise of MEMS gyroscopes in practical engineering applications. Therefore, the noise reduction method of MEMS gyroscopes has become a research hotspot in academia.
[0003] Traditional gyroscope noise reduction methods include Kalman filtering, empirical mode decomposition, and wavelet transform. With the continuous improvement of computer computing power, researchers have adopted deep learning models with more robust fitting capabilities to reduce the noise of MEMS gyroscope signals.
[0004] According to the public literature: Xinwang Wang, Huiliang Cao. Improved VMD-ELM Algorithm for MEMS Gyroscope of Temperature Compensation Model Based on CNN-LSTM and PSO-SVM[J]. Micromachines, 2022, 13(12): 2056. A method based on convolutional neural network-extreme learning machine is proposed. The signal is processed as a time series, and the MEMS gyroscope output signal is filtered using LSTM.
[0005] According to the public literature: Yaohua Liu, Jinqiang Cui, Wei Liang. A hybrid learning-based stochastic noise eliminating method with attention-Conv-LSTM network for low-cost MEMS gyroscope [J]. Frontiers in Neurorobotics, 2022, 16: 993936. It is proposed to use one-dimensional convolutional neural network and LSTM network to capture the regularity in gyroscope timing data, extract local features and learn time correlation.
[0006] However, how to automatically set weights by analyzing feature importance to reduce gyroscope data noise and how to further improve the measurement accuracy of MEMS gyroscopes to improve the performance of error compensation are urgent issues that need to be addressed. Summary of the invention
[0007] The purpose of the present invention is to solve the defects in the prior art and to propose a MEMS gyroscope noise reduction method.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions:
[0009] A MEMS gyroscope noise reduction method, the method comprising a 1D-CNN-BiGRU model based on an attention mechanism;
[0010] The method comprises the following steps:
[0011] S1: Input raw data of MEMS gyroscope and pre-process the data;
[0012] S2: Train the processed data through the 1D-CNN model;
[0013] S3: Perform network data forward propagation error back propagation and output feature mapping data;
[0014] S4: Time series feature analysis through Bi-GRU network;
[0015] S5: Use attention mechanism for weight allocation;
[0016] S6: Output the noise reduction data and complete the noise reduction.
[0017] Furthermore, the 1D-CNN-BiGRU model based on the attention mechanism includes an input layer, a 1D-CNN layer, a BiGRU layer, an attention layer, and an output layer, wherein:
[0018] The input layer is responsible for processing the raw data of the gyroscope and inputting it into the 1-D CNN layer after preprocessing;
[0019] The 1-D CNN layer is responsible for the preliminary feature extraction of the time series information. According to the characteristics of the one-dimensional time series signal output by the gyroscope, feature extraction is realized through the 1D-CNN network;
[0020] The BiGRU layer is used to perform time series analysis on the feature information output by the 1-D CNN layer, learn the time series rules, and extract features from the output information of the upper neural network after building the BiGRU network, and analyze the change rules of the information;
[0021] The attention layer is used to determine the weight of information after time series information analysis. The input is the feature vector processed by the BiGRU layer, and the output is the weight matrix obtained through continuous iteration;
[0022] The output layer is used to output the information through the fully connected (Dense) network after the information is processed by the attention layer. The output information with a step size of l can be expressed as Y = [y1, y2, ..., y l ], the activation function of the fully connected layer is the Sigmoid function, and the information calculation formula of the fully connected layer is:
[0023] y t =Sigmoid(w0s t +b0)
[0024] Where: s t The output at time y is t , w0 and b0 are weight and bias respectively, and the activation function is Sigmoid function.
[0025] Further, in step S2, the 1D-CNN model includes a convolutional layer, an activation function, a pooling layer, and a fully connected layer, wherein:
[0026] Several one-dimensional convolution kernels perform convolution processing on the sequence data to generate a series of feature maps;
[0027] The pooling layer reduces the dimension of the feature map and retains the main features;
[0028] The fully connected layer passes the results of the pooling layer to the output layer for classification, regression or other tasks.
[0029] Furthermore, in step S2, the 1D-CNN model uses convolution operations to extract features from the input sequence, specifically:
[0030] Use a one-dimensional convolution kernel to slide on the input sequence and extract local features by performing convolution operations on local areas, where the information in the i-th time window can be expressed as:
[0031] S i =[x1,x2,…,x l ]
[0032] Where l is the length of the time window, x t is the raw data output by the gyroscope at time t;
[0033] The specific method of convolution operation of 1D-CNN is:
[0034] c k =ReLU(ω k ·x+b)
[0035] Among them, c k represents the feature map output by the kth convolution kernel, ω k and b represent weights and biases.
[0036] Further, in step S4, in the BiGRU network, the forward unit implements the forward state sequence regularity analysis, and the reverse unit implements the reverse state sequence regularity analysis, wherein the sigmoid function analysis is adopted, and the analysis process is as follows:
[0037]
[0038] in, is the state of the forward hidden layer, is the state of the reverse hidden layer, w t1 , w t2 is the output weight of the hidden layer for forward and backward propagation, b t represents the bias, and f represents the activation function.
[0039] Furthermore, in step S5, the attention mechanism is:
[0040]
[0041] Where αi represents the importance of the i-th time window to the MEMS gyroscope sequence prediction, and the score si is the attention weight.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] By constructing a neural network to reduce the noise of MEMS gyroscope data, using a one-dimensional CNN network to extract the features of MEMS gyroscope time series data, BiGRU to perform feature analysis, and the attention mechanism to achieve key information focus, the gyroscope data noise reduction is achieved. Compared with the Kalman filter method optimized by BP neural network and QPSO method, the method proposed in the present invention has significant advantages in terms of error absolute value and error variance. The average absolute value of the error is reduced by 57.03% and 47.8%, and the error variance is reduced by 81.07% and 73.01%. It has certain advantages in MEMS gyroscope data noise reduction, improves the accuracy of MEMS gyroscope data, and has certain engineering application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0045] Figure 1 A schematic diagram of the implementation logic of the MEMS gyroscope noise reduction method in an embodiment of the present invention;
[0046] Figure 2 Schematic diagram of the BiGRU structure in an embodiment of the present invention;
[0047] Figure 3Schematic diagram of a neural network structure in an embodiment of the present invention;
[0048] Figure 4 is a time domain diagram of a gyroscope after noise reduction in an embodiment of the present invention;
[0049] Figure 5 for Figure 4 A partial enlarged display of the . DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0051] Reference Figure 1-5 , a MEMS gyroscope noise reduction method, which includes a 1D-CNN-BiGRU model based on an attention mechanism;
[0052] The method comprises the following steps:
[0053] S1: Input raw data of MEMS gyroscope and pre-process the data;
[0054] S2: Train the processed data through the 1D-CNN model;
[0055] S3: Perform network data forward propagation error back propagation and output feature mapping data;
[0056] S4: Time series feature analysis through Bi-GRU network;
[0057] S5: Use attention mechanism for weight allocation;
[0058] S6: Output the noise reduction data and complete the noise reduction.
[0059] In a specific embodiment of the present application, the 1D-CNN model performs feature analysis on the gyroscope timing information output by the gyroscope;
[0060] The gyroscope timing information after feature analysis is input into the BiGRU network to extract the timing information features;
[0061] The internal rules of feature information are learned through the attention layer, and the denoised information is obtained through the output layer.
[0062] As the preferred embodiment of this application:
[0063] The 1D-CNN-BiGRU model based on the attention mechanism includes an input layer, a 1D-CNN layer, a BiGRU layer, an attention layer, and an output layer, where:
[0064] The input layer is responsible for processing the raw data of the gyroscope and inputting it into the 1-D CNN layer after preprocessing;
[0065] The 1-D CNN layer is responsible for the preliminary feature extraction of the time series information. According to the characteristics of the one-dimensional time series signal output by the gyroscope, feature extraction is realized through the 1D-CNN network;
[0066] The specific process is as follows: its structure is that the convolution layer and the pooling layer are alternately used to process data, and then the data is expanded into high-dimensional nodes and activated by the ReLU function, and then the structure is converted by the fully connected layer to extract the feature vector and output it;
[0067] like Figure 2 As shown in the figure, the BiGRU layer is used to perform time series analysis on the feature information output by the 1-D CNN layer, learn the time series rules, and after building the BiGRU network, perform feature extraction on the output information of the upper neural network and analyze the change rules of the information;
[0068] The attention layer is used to determine the weight of information after time series information analysis. The input is the feature vector processed by the BiGRU layer, and the output is the weight matrix obtained through continuous iteration;
[0069] The calculation formula of the weight coefficient of this layer is:
[0070] e t =utanh(wh t +b)
[0071]
[0072] Where: h t is the output vector of the BiGRU layer at time t, e t is the corresponding attention probability distribution value, u and w are weights, b is the bias, and the output of the attention layer at time t is s t .
[0073] like Figure 3 As shown in the figure, the output layer is used to output the information through the fully connected (Dense) network after the information is processed by the attention layer. The output information with a step size of l can be expressed as Y = [y1, y2, ..., y l ], the activation function of the fully connected layer is the Sigmoid function, and the information calculation formula of the fully connected layer is:
[0074] y t =Sigmoid(w0s t +b0)
[0075] Where: s t The output at time y is t, w0 and b0 are weight and bias respectively, and the activation function is Sigmoid function.
[0076] As a preferred embodiment of the present application, in step S2, the 1D-CNN model includes a convolutional layer, an activation function, a pooling layer and a fully connected layer, wherein:
[0077] Several one-dimensional convolution kernels perform convolution processing on the sequence data to generate a series of feature maps;
[0078] The pooling layer reduces the dimension of the feature map and retains the main features;
[0079] The fully connected layer passes the results of the pooling layer to the output layer for classification, regression or other tasks.
[0080] As a preferred embodiment of the present application, in step S2, the 1D-CNN model uses a convolution operation to extract features from the input sequence, specifically:
[0081] Use a one-dimensional convolution kernel (one-dimensional filter) to slide on the input sequence and extract local features by performing convolution operations on local areas, where the information in the i-th time window can be expressed as:
[0082] S i =[x1,x2,…,x l ]
[0083] Where l is the length of the time window, x t is the raw data output by the gyroscope at time t;
[0084] The specific method of convolution operation of 1D-CNN is:
[0085] c k =ReLU(ω k ·x+b)
[0086] Among them, c k represents the feature map output by the kth convolution kernel, ω k and b represent weights and biases.
[0087] like Figure 3 As shown, as a preferred embodiment of the present application, in step S4, the GRU module is a simplified network of the LSTM network, and the input gate and the forget gate in the LSTM network are replaced with update gates.
[0088] The update gate is used to selectively retain historical information, and the reset gate is used to combine current information with historical information. The main calculation formula is:
[0089] z t =σ(w z [h t-1,x t ]+b z )
[0090] r t =σ(w r [h t-1 ,x t ]+b r )
[0091]
[0092] Among them, h t represents the output data at time t, x t represents the input data at time t, z t represents the update gate, r t Represents the reset gate, It represents the information generated by the update gate, σ is the sigmoid function, tanh is the hyperbolic tangent function as the activation function, b and w are the bias term and weight term respectively.
[0093] In step S4, in the BiGRU network, the forward unit implements the forward state sequence regularity analysis, and the reverse unit implements the reverse state sequence regularity analysis, wherein the sigmoid function is used for analysis, and the specific analysis process is as follows:
[0094]
[0095] in, is the state of the forward hidden layer, is the state of the reverse hidden layer, w t1 , w t2 is the output weight of the hidden layer for forward and backward propagation, b t represents the bias, and f represents the activation function.
[0096] As a preferred embodiment of the present application, in step S5, the attention mechanism is:
[0097]
[0098] Where αi represents the importance of the i-th time window to the MEMS gyroscope sequence prediction, and the score si is the attention weight.
[0099] In this application, the mean square error function (MSE) commonly used in machine learning is used as the loss function, and the calculation method is:
[0100]
[0101] In order to better understand the technical solution of the present invention, further explanation is given below in combination with experimental simulation.
[0102] Build an experimental platform and conduct experimental verification, collect data for neural network training and algorithm effect testing;
[0103] The experimental gyroscope is a three-axis MEMS gyroscope developed in accordance with STIM210. It uses RS-422 interface for transmission, with a data transmission baud rate of 230400 bit / s and an update rate of 2kHz.
[0104] The gyroscope is fixed on the three-axis turntable using special tooling. The turntable is equipped with special measurement and control software, which can perform real-time data acquisition. The data acquisition rate is set to 2kHz. During the experiment, the turntable is set to reciprocate and the gyroscope and turntable signals are sampled synchronously.
[0105] Experimental simulation:
[0106] After the experimental platform was built according to the experimental settings, it was preheated for 1 hour, and then the experiment was carried out to collect 1 hour of gyroscope angular velocity data. The denoising neural network proposed in Chapter 2 was constructed using the python language and pytorch framework. The hyperparameter settings of the neural network are shown in Table 1. A preliminary experiment was carried out before the formal experiment to adjust the parameters. In order to verify the effectiveness of the method in this paper, the BP neural network and the QPSO optimized Kalman filter method (BP-KF and QPSO-KF method) were selected for comparison. The specific results are shown in Table 1.
[0107]
[0108] Table 1 Neural network model parameter setting table
[0109] As can be seen from the table, the neural network input is the gyroscope output data, the optimization goal is to minimize the mean square error between the turntable and the gyroscope denoising data, and the output is the denoised gyroscope data. The gyroscope output data and the corresponding turntable data are grouped together, and the test set, training set, and validation set are divided into 70%, 15%, and 15% ratios.
[0110] result:
[0111] Different noise reduction methods are used to process the data and the gyro time domain image is obtained as follows: Figure 4 and Figure 5 The noise variance is shown in Table 2.
[0112] Data processing methods Noise variance Gyroscope 0.301484 Methods 0.025949 BP-KF method 0.137086 QPSO-KF method 0.096149
[0113] Table 2 Noise variance of each processing method
[0114] from Figure 4 , Figure 5As can be seen from Table 2, the method proposed in the present invention shows good results in the experiment. Compared with the BP-KF and QPSO-KF methods, the average absolute value of the filtering effect noise of the method proposed in the present invention is reduced by 57.03% and 47.8%, respectively, indicating that the method proposed in the present invention has a good noise reduction effect.
[0115] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for reducing noise of a MEMS gyroscope, It is characterized in that The method includes a 1D-CNN-BiGRU model based on the attention mechanism; The method comprises the following steps: S1: Input raw data of MEMS gyroscope and pre-process the data; S2: Train the processed data through the 1D-CNN model; S3: Perform network data forward propagation error back propagation and output feature mapping data; S4: Time series feature analysis through Bi-GRU network; S5: Use attention mechanism for weight allocation; S6: Output the noise reduction data and complete the noise reduction.
2. The MEMS gyroscope noise reduction method according to claim 1, It is characterized in that The 1D-CNN-BiGRU model based on the attention mechanism includes an input layer, a 1D-CNN layer, a BiGRU layer, an attention layer, and an output layer, where: The input layer is responsible for processing the raw data of the gyroscope and inputting it into the 1-D CNN layer after preprocessing; The 1-D CNN layer is responsible for the preliminary feature extraction of the time series information. According to the characteristics of the one-dimensional time series signal output by the gyroscope, feature extraction is realized through the 1D-CNN network; The BiGRU layer is used to perform time series analysis on the feature information output by the 1-D CNN layer, learn the time series rules, and extract features from the output information of the upper neural network after building the BiGRU network, and analyze the change rules of the information; The attention layer is used to determine the weight of information after time series information analysis. The input is the feature vector processed by the BiGRU layer, and the output is the weight matrix obtained through continuous iteration; The output layer is used to output the information through the fully connected (Dense) network after the information is processed by the attention layer. The output information with a step size of l can be expressed as Y = [y 1 ,y 2 ,…,y l ], the activation function of the fully connected layer is the Sigmoid function, and the information calculation formula of the fully connected layer is: y t =Sigmoid(w 0 s t +b 0 ) Where: s t The output at time y is t , w 0 and b 0 are weight and bias respectively, and the activation function is Sigmoid function.
3. The MEMS gyroscope noise reduction method according to claim 2, It is characterized in that In step S2, the 1D-CNN model includes a convolutional layer, an activation function, a pooling layer, and a fully connected layer, where: Several one-dimensional convolution kernels perform convolution processing on the sequence data to generate a series of feature maps; The pooling layer reduces the dimension of the feature map and retains the main features; The fully connected layer passes the results of the pooling layer to the output layer for classification, regression or other tasks.
4. The MEMS gyroscope noise reduction method according to claim 3, It is characterized in that In step S2, the 1D-CNN model uses convolution operations to extract features from the input sequence, specifically: Use a one-dimensional convolution kernel to slide on the input sequence and extract local features by performing convolution operations on local areas, where the information in the i-th time window can be expressed as: S i =[x 1 ,x 2 ,…,x l ] Where l is the length of the time window, x t is the raw data output by the gyroscope at time t; The specific method of convolution operation of 1D-CNN is: c k =ReLU(ω k ·x+b) Among them, c k represents the feature map output by the kth convolution kernel, ω k and b represent weights and biases.
5. The MEMS gyroscope noise reduction method according to claim 4, It is characterized in that In step S4, in the BiGRU network, the forward unit implements the forward state sequence regularity analysis, and the reverse unit implements the reverse state sequence regularity analysis, wherein the sigmoid function is used for analysis, and the specific analysis process is as follows: in, is the state of the forward hidden layer, is the state of the reverse hidden layer, w t1 , w t2 is the output weight of the hidden layer for forward and backward propagation, b t represents the bias, and f represents the activation function.
6. The MEMS gyroscope noise reduction method according to claim 5, It is characterized in that In step S5, the attention mechanism is: Where αi represents the importance of the i-th time window to the MEMS gyroscope sequence prediction, and the score si is the attention weight.
