A Gyroscope Error Compensation Method Based on Stacked Denoising Autoencoders
By using a stacked denoising autoencoder method, a mapping relationship between the gyroscope signal and the actual rotation speed is established, which solves the problem of insufficient accuracy in gyroscope error compensation, realizes simultaneous compensation for random and deterministic errors, and improves the measurement accuracy of the gyroscope.
Patent Information
- Application Number
- CN202211664554.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-12-23
AI Technical Summary
Existing gyroscope error compensation methods have poor compensation accuracy, and random error filtering methods rely on human experience and have insufficient generalization ability, making it difficult to achieve end-to-end learning.
A stacked denoising autoencoder-based method is adopted. By collecting gyroscope output data and utilizing multiple coding layers and fully connected layers, a mapping relationship between gyroscope signals and actual rotation speed is established. This method simultaneously compensates for random and deterministic errors, reducing reliance on human experience.
This improves the prediction accuracy of the gyroscope, effectively eliminates random errors in the signal, and enables end-to-end learning, thereby improving the measurement accuracy of the gyroscope.
Smart Images

Figure CN115790663B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of gyroscope error compensation technology, specifically a gyroscope error compensation method based on a stacked denoising autoencoder. Background Technology
[0002] Gyroscopes, relying on their two fundamental characteristics of fixed-axis stability and precession, are widely used in measuring the angular velocity of moving vehicles such as drones, ships, and vehicles. With the continuous development of science and technology, higher technical requirements are being placed on the accuracy of gyroscopes. Currently, there are two main methods to improve gyroscope accuracy: 1) improving manufacturing processes to increase machining precision; 2) improving the measurement accuracy of the device through modeling and compensation. Relatively speaking, the latter has become a major research focus because it is easier to implement.
[0003] The errors of a gyroscope can be divided into deterministic errors and random errors. Deterministic errors include zero bias error, scale coefficient error, and installation error, while random errors are mainly composed of random constants, first-order Markov processes, and white noise.
[0004] For deterministic and random errors in gyroscopes, existing research mostly employs modeling and digital filtering methods. In the Chinese Patent Publication No. CN112729266A, "An Analysis Method for Random Errors in MEMS Gyroscopes," the main random error coefficients of the gyroscope are calculated using Allan variance, and a filtering model for gyroscope errors is established accordingly to ensure the accuracy and performance of the gyroscope. However, due to the numerous influencing factors during actual gyroscope testing, this method can only compensate for random errors and cannot adequately consider all factors, resulting in poor accuracy in error compensation. In the Chinese Patent Publication No. CN111896029A, "A Random Error Compensation Method for MEMS Gyroscopes Based on a Combinatorial Algorithm," a random error model based on an extreme learning machine is established using experimental data, followed by a maximum a posteriori Kalman filter based on this model to compensate for gyroscope drift data. This method also only compensates for random errors, and the random error filtering method relies on human experience, suffers from insufficient generalization ability of artificial intelligence methods, and is difficult to implement in an end-to-end learning paradigm. In the Chinese Patent Gazette publication of "A MEMS-IMU Full-Temperature Full-Parameter Calibration and Compensation Method" (Publication No.: CN108534800A), the actual accuracy of MEMS-IMU is improved by establishing a parameter calibration model of the gyroscope and completing the calibration of error parameters, but the method is computationally complex. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a gyroscope error compensation method based on a stacked denoising autoencoder. This method can solve the problems of poor compensation accuracy of existing error compensation methods and the reliance on human experience and insufficient generalization ability of random error filtering methods. It achieves high-precision compensation of gyroscope errors, thereby ensuring accurate data measurement of the gyroscope.
[0006] To address the aforementioned technical problems, the gyroscope error compensation method based on a stacked denoising autoencoder of the present invention is as follows: For any rotation axis of the gyroscope, multiple gyroscope output data are collected according to a set sampling frequency and sampling time. The gyroscope output data corresponding to the three rotation axes are then concatenated to form a data vector, which is then normalized. The normalized data vector is then degraded to the input vector H1 of the trained network model with a degradation rate of 0.1 to 0.5. The network model has M encoding layers and a fully connected layer network, where M = 1, 2, or 3. For the nth encoding layer, its output vector is calculated according to the following formula:
[0007] H n+1 =f(W en H n +b en )
[0008] Where H n+1 H is the output vector of the nth coding layer. n W is the input vector for the nth coding layer. en and b en ...
[0009] The output vector H of the Mth coding layer M+1 As the input vector of the fully connected layer network; as the output vector H of the fully connected layer network. t After reverse normalization, the output value vector of the gyroscope after compensation for the three rotation axes of the gyroscope is obtained.
[0010] H t =f(W b H M+1 +b b )
[0011] Where f(·) is the activation function, W b Let b be the input weight matrix of the fully connected layer network. b It is the node bias matrix of a fully connected layer network.
[0012] Let H be the input vector of the nth coding layer. n Dimension P n The output vector H of the nth coding layer n+1 Dimension Q n Then the input weight matrix W of the coding layeren and node bias matrix b en P respectively n ×Q n Q n A matrix of size ×1.
[0013] Let H be the output vector of the Mth coding layer. M+1 Dimension Q M The input weight matrix W of the fully connected layer network b and node bias matrix b b Q M 3×3 and 3×1 matrices.
[0014] The network model training method is as follows:
[0015] The first step is to acquire gyroscope angle measurement data.
[0016] The gyroscope is securely mounted on the test turntable, and multiple test rates are set in three mutually perpendicular directions of the test turntable. For each test rate of any axis, the forward and reverse rotation output data of the gyroscope are collected at frequency f within time T.
[0017] The second step is data preprocessing.
[0018] Assuming the gyroscope's data reading period is T1, the gyroscope output data collected within time T is divided into... The corresponding gyroscope output data of the three-axis rotation are spliced together in a set order to form a data vector; the data vectors corresponding to the forward and reverse tests at all speeds are normalized, then randomly shuffled and divided into training and test sets;
[0019] The third step is to pre-train the stacked denoising autoencoder model.
[0020] The stacked denoising autoencoder model includes M denoising autoencoders; each denoising autoencoder package contains an encoding layer and a decoding layer; the first denoising autoencoder A contains an encoding layer A and a decoding layer A.
[0021] Each normalized data vector D in the training set is degenerated into the input vector D1 = (D1) of the coding layer A according to a set ratio. 1 D1 2 , ..., D1 p The data degradation rate is 0.1–0.5; during the encoding stage, the mapping relationship between the input layer and the hidden layer of the denoising autoencoder A is expressed by the following formula:
[0022] D2=f(W e D1+b e )
[0023] Where, D2=(D21 D2 2 D2 q ) represents the output vector of coding layer A; q represents the number of hidden layer neurons; W e and b e These represent the input weight matrix and node bias matrix of coding layer A, respectively. The initial input weight matrix and node bias matrix of coding layer A are randomly generated p×q and q×1 matrices, respectively.
[0024] During the decoding phase, decoding layer A reconstructs the features extracted by encoding layer A:
[0025] D3=f(W d D2+b d )
[0026] Where, D3=(D3 1 D3 2 D3 p W represents the output vector of decoding layer A. d and b d These represent the input weight matrix and node bias matrix of decoding layer A, respectively. The initial input weight matrix and node bias matrix of decoding layer A are randomly generated q×p and p×1 matrices, respectively.
[0027] The input weight matrix and node bias matrix of the encoding layer A and the decoding layer A are optimized with the goal of minimizing the network loss function Loss(D1,D3) of the denoising autoencoder A. When Loss(D1,D3) is minimized, the pre-training of the denoising autoencoder A ends and the pre-trained model of the encoding layer A is obtained.
[0028]
[0029] Where k is the number of normalized data vectors D in the training set, w e and w d b are the weights in the input weight matrices of coding layer A and decoding layer A, respectively; e and b d , respectively, are the biases in the node bias matrices of coding layer A and decoding layer A, and λ is the regularization coefficient;
[0030] For other denoising autoencoders, the output vector of the previous denoising autoencoder's encoding layer is used as the input vector, and the same pre-training method as denoising autoencoder A is used for pre-training to obtain the pre-trained model of the encoding layer.
[0031] Step 4: Pre-training the network test model
[0032] The network test model includes M test coding layers and a fully connected layer test network; the pre-trained model of each denoising autoencoder layer serves as the corresponding test coding layer.
[0033] With input vector D1=(D1 1 D1 2 ..., D1 P ) is used as input to the network test model to minimize the network test model loss function Loss(y) real D t With the objective of updating the input weight matrix and node bias matrix of the test network at each test coding layer and fully connected layer using stochastic gradient descent, the network test model loss function Loss(y) is updated. real D t When the minimum value is reached, the pre-training of the network test model ends, and the pre-trained model of the network test model is obtained.
[0034]
[0035] This is the vector of expected output values for the gyroscope; These are the expected output values in the X, Y, and Z directions, respectively; D t D represents the actual output numerical vector of the fully connected layer test network. t =f(W bc D M +b bc ), f() is the activation function, W bc B bc Here are the input weight matrix and node bias matrix of the fully connected layer test network. The initial input weight matrix and node bias matrix of the fully connected layer test network are randomly generated Q... M ×3, 3×1 matrix, D M Q is the output vector of the last test coding layer. M The dimension of the output vector of the last test encoding layer;
[0036] The normalized data vectors in the test set are degraded and used as the input vectors of the pre-trained model of the network test model. If the loss function of the pre-trained model of the network test model is Loss(y real D t If the value is less than the set threshold, then the pre-trained model of the network test model at this time is used as the trained network model; otherwise, the parameters of the input weight matrix and node bias matrix in each denoising autoencoder and the network test model are randomly initialized, and the above pre-training is repeated until the loss function of the pre-trained model of the network test model is Loss(y). real D t () is less than the set threshold.
[0037] Compared with the prior art, the advantages of this invention are:
[0038] (1) Compared with the existing gyroscope error theoretical compensation model, the present invention uses a denoising autoencoder model to reconstruct the data of the degraded input, which can effectively eliminate random errors in the gyroscope signal and improve the prediction accuracy of the gyroscope.
[0039] (2) Compared with the existing neural network-based gyroscope error compensation model, the error compensation method based on stacked denoising autoencoder takes the gyroscope acquisition signal as input and the actual rotation speed of the turntable as output. By extracting the deep features of the data through the encoder, a mapping relationship between the gyroscope signal and the actual rotation speed is established. This method can not only compensate for random errors and deterministic errors at the same time, but also reduce the dependence on human experience. It can achieve end-to-end learning, saving time and effort. Attached Figure Description
[0040] Figure 1 This is a schematic diagram of the gyroscope error compensation method in Embodiment 2 of the present invention.
[0041] Figure 2 This is a flowchart of the network model training method.
[0042] Figure 3 This is a schematic diagram illustrating the principle of a network model training method.
[0043] Figure 4 This is a schematic diagram of a noise reduction autoencoder A.
[0044] Figure 5 This is a schematic diagram of the noise reduction autoencoder B. Detailed Implementation
[0045] To make the technical solution and beneficial effects of the present invention clearer, the present invention will be described in detail below with reference to specific embodiments of the optoelectronic pod gyroscope error compensation. This embodiment is based on the technical solution of the present invention and provides detailed implementation methods and specific operating procedures, but the scope of protection of the present invention is not limited to the following embodiment.
[0046] Example 1
[0047] The gyroscope error compensation method based on a stacked denoising autoencoder of the present invention is as follows: The gyroscope is securely mounted on a test turntable; the gyroscope includes axes of rotation in the X, Y, and Z directions; for any axis of rotation in any direction, multiple gyroscope output data are collected according to a set sampling frequency f and sampling time T; typically f = 100~2000H. Z T = 30000~300000ms; in this embodiment, f = 1000H is selected. ZT = 120000ms; then, the gyroscope output data corresponding to the X, Y, and Z axes are concatenated in the order XYZ to form a data vector and normalized. The normalized data vector is then degraded to the input vector H1 of the trained network model with a degradation rate of 0.5. The network model has one coding layer and a fully connected layer. The output vector H2 of the coding layer is calculated according to the following formula:
[0048] H2=f(W e1 H1+b e1 )
[0049] Among them, W e1 and b e1 represent the input weight matrix and node bias matrix of the coding layer, respectively; f(·) is the activation function;
[0050] The output vector H2 of this coding layer serves as the input vector of the fully connected layer network; the output vector of the fully connected layer network, after inverse normalization, becomes the output vector H of the gyroscope after compensation for the three rotation axes in the three directions. t ;
[0051] H t =f(W b H2+b b )
[0052] in, After inverse normalization, the compensated output values are the corresponding to the X, Y, and Z axis rotation directions, where f(·) is the activation function and W is the output value. b Let b be the input weight matrix of the fully connected layer network. b It is the node bias matrix of a fully connected layer network.
[0053] Let the input vector H1 of this coding layer have dimension P1 and the output vector H2 have dimension Q1, then the input weight matrix W of the coding layer... e1 and node bias matrix b e1 P1×Q1 and Q1×1 are respectively; the input weight matrix W of the fully connected layer network. b and node bias matrix b b These are matrices of size Q1×3 and 3×1, respectively.
[0054] Example 2
[0055] The gyroscope error compensation method based on a stacked denoising autoencoder of the present invention is as follows: The gyroscope is securely mounted on a test turntable; the gyroscope includes rotation axes in three directions: X, Y, and Z. For any rotation axis in any direction, multiple gyroscope output data are collected according to a set sampling frequency f and sampling time T; in this embodiment, f = 1000H is selected. ZT = 120000ms; then, the gyroscope output data corresponding to the X, Y, and Z axes are concatenated in the order XYZ to form a data vector and normalized. The normalized data vector is then degraded to the input vector H1 of the trained network model with a degradation rate of 0.1. The network model has two coding layers and a fully connected layer. The output vector H2 of the first coding layer is calculated according to the following formula:
[0056] H2=f(W e1 H1+b e1 )
[0057] Among them, W e1 and b e1 represent the input weight matrix and node bias matrix of the coding layer, respectively; f(·) is the activation function;
[0058] Let the input vector H1 of this coding layer have dimension P1 and the output vector H2 have dimension Q1, then the input weight matrix W of the coding layer... e1 and node bias matrix b e1 They are P1×Q1 and Q1×1, respectively;
[0059] The output vector H3 of the second coding layer is calculated according to the following formula:
[0060] H3=f(W e2 H2+b e2 )
[0061] Among them, W e2 and b e2 represents the input weight matrix and node bias matrix of the coding layer, respectively; f(·) is the activation function.
[0062] Let the input vector H2 of this coding layer have dimension P2 = Q1, and the output vector H3 have dimension Q2. Then the input weight matrix W of the coding layer... e2 and node bias matrix b e2 They are Q1×Q2 and Q2×1, respectively;
[0063] The output vector H3 of the second coding layer serves as the input vector of the fully connected layer network; the output vector of the fully connected layer network, after inverse normalization, becomes the output vector H of the gyroscope after compensation for the three rotation axes in the gyroscope. t ;
[0064] H t =f(W b H3+b b )
[0065] in, After normalization, the compensated output values are respectively for the X, Y, and Z axis rotation directions, where f(·) is the activation function and W b Let b be the input weight matrix of the fully connected layer network. b It is the node bias matrix of a fully connected layer network.
[0066] The input weight matrix W of a fully connected layer network b and node bias matrix b b The matrices are Q2×3 and 3×1, respectively.
[0067] Example 3
[0068] The gyroscope error compensation method based on a stacked denoising autoencoder of the present invention is as follows: The gyroscope is securely mounted on a test turntable; the gyroscope includes rotation axes in three directions: X, Y, and Z. For any rotation axis in any direction, multiple gyroscope output data are collected according to a set sampling frequency f and sampling time T; in this embodiment, f = 1000H is selected. Z T = 120000ms; then, the gyroscope output data corresponding to the X, Y, and Z axes are concatenated in the order XYZ to form a data vector and normalized. The normalized data vector is then degraded to the input vector H1 of the trained network model with a degradation rate of 0.1. The network model has three coding layers and a fully connected layer. The output vector H2 of the first coding layer is calculated according to the following formula:
[0069] H2=f(W e1 H1+b e1 )
[0070] Among them, W e1 and b e1 represent the input weight matrix and node bias matrix of the coding layer, respectively; f(·) is the activation function of the coding layer;
[0071] Let the input vector H1 of this coding layer have dimension P1 and the output vector H2 have dimension Q1, then the input weight matrix W of the coding layer... e1 and node bias matrix b e1 They are P1×Q1 and Q1×1, respectively;
[0072] The output vector H3 of the second coding layer is calculated according to the following formula:
[0073] H3=f(W e2 H2+b e2 )
[0074] Among them, W e2 and b e2 represents the input weight matrix and node bias matrix of the coding layer, respectively; f(·) is the activation function.
[0075] Let the input vector H2 of this coding layer have dimension P2 = Q1, and the output vector H3 have dimension Q2. Then the input weight matrix W of the coding layer... e2 and node bias matrix b e2 They are Q1×Q2 and Q2×1, respectively;
[0076] The third coding layer output vector H4 is calculated using the following formula:
[0077] H4=f(W e3 H3+b e3 )
[0078] Among them, W e3 and b e3 ...
[0079] Let the input vector H3 of this coding layer have dimension P3 = Q2, and the output vector H3 have dimension Q3. Then the input weight matrix W of the coding layer... e3 and node bias matrix b e3 They are Q2×Q3 and Q3×1, respectively;
[0080] The output vector H4 of the third coding layer serves as the input vector of the fully connected layer network; the output vector of the fully connected layer network, after inverse normalization, becomes the output vector H of the gyroscope after compensation for the three rotation axes. t ;
[0081] H t =f(W b H4+b b )
[0082] in, After normalization, the compensated output values are respectively for the X, Y, and Z axis rotation directions, where f(·) is the activation function and W b Let b be the input weight matrix of the fully connected layer network. b It is the node bias matrix of a fully connected layer network.
[0083] The input weight matrix W of a fully connected layer network b and node bias matrix b b The matrices are Q3×3 and 3×1, respectively.
[0084] Taking Example 2 as an example, such as Figure 2 , 3 As shown, the specific method for training the network model is as follows:
[0085] The first step is to acquire gyroscope angle measurement data.
[0086] Securely mount the gyroscope on the test turntable, connect the gyroscope power supply and related data acquisition equipment, and set the gyroscope's actual sampling frequency. Preheat the gyroscope before data acquisition to ensure it operates in a stable state. Based on the gyroscope's actual usage, set multiple test rates in three mutually perpendicular directions on the test turntable. Taking the X-axis gyroscope data acquisition process as an example, select the first test rate in the X-axis direction, causing the test turntable to rotate clockwise around the X-axis at this rate. Collect data from the gyroscope during the clockwise rotation for time T. Then, stop the turntable and reverse its rotation, collecting data from the gyroscope during the reverse rotation for time T. After data acquisition, stop the turntable and set the second test rate around the X-axis. Collect the gyroscope's output data in the same way until test data acquisition at different rates in all three axial directions is completed.
[0087] The second step is data preprocessing.
[0088] In the data preprocessing stage, assuming the actual gyroscope output data reading period is T1, the gyroscope output data collected at each test rate of the three axes can be decomposed into: The data is divided into segments, each with a length of f*T1. After the data is segmented, the remaining unsegmentable output data is deleted. Then, the corresponding segments of three-axis gyroscope output data collected at each test rate are concatenated in XYZ order, forming a data vector of length f*T1*3 for each segment. All data vectors collected from forward and reverse tests at all rates are normalized to accelerate the convergence speed during network training. Then, they are randomly shuffled in an 8:2 ratio and divided into training and test sets.
[0089] The third step is to pre-train the stacked denoising autoencoder model.
[0090] In the pre-training stage of stacked denoising autoencoders: Stacked denoising autoencoders are obtained by stacking multiple denoising autoencoders. Each encoder is trained using degraded data. Each encoding layer can be regarded as a feature extractor with high fault tolerance. The network parameters of the encoding layers can be used to learn the high robustness of the deep features of the data.
[0091] like Figure 4 As shown, the denoising autoencoder A includes an encoding layer A and a decoding layer A.
[0092] The normalized data vector D of length f*T1*3 from the k data points in the training set is "degraded" into the input vector D1 of the encoding layer A according to a certain ratio. The data degradation ratio, i.e., the degradation rate, is usually taken in the range of 0.1 to 0.5. The degraded input vector D1 = (D1 1 D1 2 ..., D1 pThe dimension p = f * T1 * 3 of the denoising autoencoder A is the same as the number of neurons in the input layer of the denoising autoencoder A. During the encoding phase, the mapping relationship between the input layer and the hidden layer of the denoising autoencoder A can be expressed by the following equation:
[0093] D2=f(W e D1+b e (1)
[0094] Where, D2=(D2 1 D2 2 D2 q ) represents the output vector of coding layer A, q represents the number of hidden layer neurons, and W represents the output vector of coding layer A. e and b e Let f(·) represent the input weight matrix and node bias matrix of coding layer A, respectively. The initial input weight matrix and node bias matrix of coding layer A are randomly generated p×q and q×1 matrices, respectively, and f(·) is the activation function.
[0095] In the decoding stage, decoding layer A decodes and reconstructs the features extracted by encoding layer A, a process similar to the encoding process:
[0096] D3=f(W d D2+b d (2)
[0097] Where, D3=(D3 1 D3 2 D3 p W represents the output vector of decoding layer A, i.e., the reconstructed data vector. The number of neurons in the output layer is the same as the number of neurons in the input layer. d and b d Let f(·) represent the input weight matrix and node bias matrix of decoding layer A, respectively. The initial input weight matrix and node bias matrix of decoding layer A are randomly generated q×p and p×1 matrices, respectively, and f(·) is the activation function.
[0098] To minimize reconstruction error, the denoising autoencoder A employs an error backpropagation algorithm to minimize the network loss function during both encoding and decoding, thereby learning the abstract features of the training samples. Here, λ is a regularization coefficient used to avoid overfitting by reducing the weights; the regularization coefficient is typically set to a value less than the sample mean square error.
[0099]
[0100] Where Loss(D1,D3) is the network loss function of the denoising autoencoder A, k is the number of normalized data vectors D in the training set, and w e and w db are the weights in the input weight matrices of encoding layer A and decoding layer A, respectively. e and b d These are the biases in the node bias matrices of coding layer A and decoding layer A, respectively.
[0101] The input weight matrix and node bias matrix of the encoding layer A and the decoding layer A are optimized with the goal of minimizing Loss(D1,D3). When Loss(D1,D3) is minimized, the pre-training of the denoising autoencoder A ends, and the pre-trained model of the encoding layer A is obtained.
[0102] like Figure 5 As shown, the denoising autoencoder B consists of an encoding layer B and a decoding layer B. The output vector of the encoding layer A is D2 = (D2... 1 D2 2 D2 q As the input vector D4 of the denoising autoencoder B, the denoising autoencoder B is pre-trained using the same pre-training method as the denoising autoencoder A, resulting in the pre-trained model of the encoding layer B.
[0103] By stacking and pre-training the denoising autoencoder, the randomness error of the gyroscope sensor data can be eliminated, the measurement accuracy can be improved, and data features with high robustness can be obtained.
[0104] The network test model includes a first test coding layer, a second test coding layer, and a fully connected layer test network; the pre-trained models of coding layer A and coding layer B serve as the first test coding layer and the second test coding layer in the network test model, respectively.
[0105] Step 4: Training and testing the error compensation network model
[0106] After pre-training the stacked denoising autoencoder, with input vector D1 = (D1 1 D1 2 ..., D1 p As input to the network test model, the expected output vector y of the gyroscope is used. real The network's output serves as the ground truth for the test model. The parameters of the network's feature extraction layer and autoencoder layer are hard-shared. The mean squared error between the ground truth output and the actual output of the test model is used as the loss function. By minimizing this loss function using stochastic gradient descent, the parameters of the input weight matrix and node bias matrix of the first test coding layer, second test coding layer, and fully connected layer test network are updated. This establishes a mapping between the gyroscope's actual output and the true output, achieving end-to-end learning for gyroscope error compensation.
[0107] Input vector D1 = (D1 1 D12 ..., D1 p The first test coding layer's input vector is used as the first test coding layer's input vector, and the first test coding layer's output vector is used as the second test coding layer's input vector; the second test coding layer's output vector is used as the fully connected layer test network's input vector; the actual output value vector D of the fully connected layer test network... t Calculate according to the following formula:
[0108] D t =f(W bc D3+b bc )
[0109] Among them, D t =(D t X D t Y D t Z ),D t X D t Y D t Z These represent the actual output values in the X, Y, and Z directions, respectively, where f(·) is the activation function and W is the actual output value in the Z direction. bc B bc The input weight matrix and node bias matrix of the fully connected layer test network are Q2×3 and 3×1 matrices, which are randomly generated. D3 is the output vector of the last test coding layer, and Q2 is the dimension of the output vector of the second test coding layer.
[0110] Loss function of network test model. real D t This can be represented as:
[0111]
[0112] This represents the expected output value of the gyroscope. These are the expected output values in the X, Y, and Z directions, respectively.
[0113] To minimize the loss function Loss(y) of the network test model real D t With the objective of updating the parameters of the input weight matrix and node bias matrix of the test network (first test coding layer, second test coding layer, and fully connected layer) using stochastic gradient descent, the network test model loss function Loss(y) is updated. real D tWhen the minimum value is reached, the pre-training of the network test model ends, and the pre-trained model of the network test model is obtained.
[0114] The pre-trained model of the network test model is tested using normalized data vectors from the test set. The normalized data vectors are degraded and used as the input vectors of the pre-trained model. If the loss function of the network test model is Loss(y... real D t If the value is less than the set threshold, then the pre-trained model of the network test model at this time is used as the trained network model; otherwise, the parameters of the denoising autoencoder A, B, and the input weight matrix and node bias matrix in the network test model are randomly initialized again, and the above pre-training is repeated until the network test model loss function Loss(y) is obtained. real D t () is less than the set threshold.
[0115] The following section uses a two-axis, two-frame optoelectronic pod as an example to explain in detail the training method of the network model.
[0116] The first step is to acquire gyroscope signals from the optoelectronic pod.
[0117] The three-axis gyroscope is fixedly mounted on the inner frame of the optoelectronic pod using a gyroscope adapter. The three axes of the gyroscope are parallel to the pod's azimuth, pitch, and roll axes, respectively. The inner frame of the pod is connected to the test turntable, and the gyroscope power supply and data acquisition equipment are turned on. The actual sampling frequency of the gyroscope is set to 1000Hz. Based on GB321-80 and considering the actual range of the gyroscope and turntable, the R5 series data system is selected, and 12 test rates are set for each of the three axes. For each experimental rate on a single axis, 1 minute of forward and reverse gyroscope output data is collected and stored.
[0118] The second step is the preprocessing of the collected data.
[0119] The collected gyroscope output data was segmented. Since the actual reading period of the gyroscope is 20ms, the single-axis, single-rate gyroscope output data can be divided into 3000 segments, each with a data length of 20. The corresponding segments were concatenated according to the XYZ data order to form a new data vector with a length of 60. The data vector was normalized to the range [0,1] to accelerate the convergence speed of the network. All normalized data vectors were divided into training and test sets in an 8:2 ratio, resulting in 57,600 training samples and 14,400 test samples.
[0120] The third step is to pre-train the stacked denoising autoencoder model.
[0121] First, a denoising autoencoder A with a network structure of 60-20-60 (i.e., the input vector D1 has a dimension of p=60, the number of hidden layer neurons q is 20, and the output vector of the decoding layer A has a dimension of p=60) is constructed. The network parameters are randomly initialized and pre-trained using the training set data vector. The degradation rate of the denoising autoencoder A is set to 0.1, the network learning rate is set to 0.1, the regularization coefficient λ is 1e-3, the activation function of the encoding layer A and the decoding layer A is set to the sigmoid function, and the number of pre-training iterations is set to 500. The network is trained by minimizing the loss function, and after training, the input weight matrix and node bias matrix of the decoding layer A are stored. Secondly, a denoising autoencoder B with a network structure of 20-10-20 (i.e., the input vector of the encoding layer B has a dimension of 20, the number of hidden layer neurons is 10, and the output vector of the decoding layer B has a dimension of 20) is constructed. The output vector of the decoding layer A is used as the input vector of the encoding layer B, and pre-training is performed in the same way as the denoising autoencoder A. After training, the input weight matrix and node bias matrix of the decoding layer B are stored. Finally, the input weight matrix and node bias matrix of the trained decoding layer A are used as the input weight matrix and node bias matrix of the first test encoding layer, respectively, and the input weight matrix and node bias matrix of the trained decoding layer B are used as the input weight matrix and node bias matrix of the second test encoding layer, respectively. A network test model with a network structure of 60-20-10-3 is constructed, with a network learning rate of 0.1, a network activation function of sigmoid, and a training iteration of 1000. The network test model is trained by minimizing the mean square error between the true output value and the actual output value of the network test model. The network test model is tested for error using the test set data. The error threshold is set to 1e-3. If the error is less than the set threshold, the network test model training is completed and a trained network model is obtained. Otherwise, the parameters of the denoising autoencoder A, B and the network test model are re-initialized and the relevant hyperparameters are adjusted. The training is repeated until the error is less than the set threshold.
[0122] Optical pod gyroscope error compensation:
[0123] The data collected by the optoelectronic pod gyroscope is input into the trained network model, which outputs gyroscope data in the X, Y, and Z directions respectively. After inverse normalization, the output is the compensated gyroscope output data, thus completing the error compensation of the optoelectronic pod gyroscope.
[0124] It should be noted that the specific embodiments described above are merely illustrative of the principles and processes of the present invention and do not constitute a limitation thereof. Therefore, any modifications and equivalent substitutions made without departing from the spirit and scope of the present invention should be included within the protection scope of the present invention.
Claims
1. A gyroscope error compensation method based on a stacked denoising autoencoder, characterized in that... The method is as follows: For any axis of rotation of the gyroscope, multiple gyroscope output data are collected according to a set sampling frequency and sampling time. Then, the gyroscope output data corresponding to the three axes of rotation are concatenated to form a data vector, which is then normalized. The normalized data vector is then degraded at a degradation rate of 0.1 to 0.5 to obtain the input vector H1 of the trained network model. The network model has M coding layers and fully connected layers, where M = 1, 2, or 3. For the nth coding layer, its output vector is calculated according to the following formula: H n+1 =f(W en H n +b en ) Where H n+1 H is the output vector of the nth coding layer. n W is the input vector for the nth coding layer. en and b en ... The output vector H of the Mth coding layer M+1 As the input vector of the fully connected layer network; as the output vector H of the fully connected layer network. t After reverse normalization, the output value vector of the gyroscope after compensation for the three rotation axes of the gyroscope is obtained. H t =f(W b H M+1 +b b ) Where f() is the activation function, W b Let b be the input weight matrix of the fully connected layer network. b It is the node bias matrix of the fully connected layer network; The network model training method is as follows: The first step is to acquire gyroscope angle measurement data. The gyroscope is securely mounted on the test turntable, and multiple test rates are set in three mutually perpendicular directions of the test turntable. For each test rate of any axis, the forward and reverse rotation output data of the gyroscope are collected at frequency f within time T. The second step is data preprocessing. Assuming the gyroscope's data reading period is T1, the gyroscope output data collected within time T is divided into... The corresponding gyroscope output data of the three-axis rotation are spliced together in a set order to form a data vector; the data vectors corresponding to the forward and reverse tests at all speeds are normalized, then randomly shuffled and divided into training and test sets; The third step is to pre-train the stacked denoising autoencoder model. The stacked denoising autoencoder model includes M denoising autoencoders; each denoising autoencoder contains an encoding layer and a decoding layer; the first denoising autoencoder A contains an encoding layer A and a decoding layer A. Each normalized data vector D in the training set is degenerated into the input vector D1 = (D1) of the coding layer A according to a set ratio. 1 D1 2 , ..., D1 p The data degradation rate is 0.1–0.5; during the encoding stage, the mapping relationship between the input layer and the hidden layer of the denoising autoencoder A is expressed by the following formula: D2=f(W e D1+b e ) Where, D2=(D2 1 D2 2 D2 q ) represents the output vector of coding layer A; q represents the number of hidden layer neurons; W represents the output vector of coding layer A. e and b e These represent the input weight matrix and node bias matrix of coding layer A, respectively. The initial input weight matrix and node bias matrix of coding layer A are randomly generated p×q and q×1 matrices, respectively. During the decoding phase, decoding layer A reconstructs the features extracted by encoding layer A: D3=f(W d D2+b d ) Where, D3=(D3 1 D3 2 D3 p W represents the output vector of decoding layer A. d and b d These represent the input weight matrix and node bias matrix of decoding layer A, respectively. The initial input weight matrix and node bias matrix of decoding layer A are randomly generated q×p and p×1 matrices, respectively. The input weight matrix and node bias matrix of the encoding layer A and the decoding layer A are optimized with the goal of minimizing the network loss function Loss(D1,D3) of the denoising autoencoder A. When Loss(D1,D3) is minimized, the pre-training of the denoising autoencoder A ends and the pre-trained model of the encoding layer A is obtained. Where k is the number of normalized data vectors D in the training set, w e and w d b are the weights in the input weight matrices of coding layer A and decoding layer A, respectively; e and b d These are the biases in the node bias matrices of coding layer A and decoding layer A, respectively, where λ is the regularization coefficient and λ is 1e-3; For other denoising autoencoders, the output vector of the previous denoising autoencoder's encoding layer is used as the input vector, and the same pre-training method as denoising autoencoder A is used for pre-training to obtain the pre-trained model of the encoding layer. Step 4: Pre-training the network test model The network test model includes M test coding layers and a fully connected layer test network; the pre-trained model of each denoising autoencoder layer serves as the corresponding test coding layer. With input vector D1=(D1 1 D1 2 , ..., D1 P ) is used as input to the network test model to minimize the network test model loss function Loss(y) real D t With the objective of updating the input weight matrix and node bias matrix of the test network at each test coding layer and fully connected layer using stochastic gradient descent, the network test model loss function Loss(y) is updated. real D t When the minimum value is reached, the pre-training of the network test model ends, and the pre-trained model of the network test model is obtained. This is the vector of expected output values for the gyroscope; These are the expected output values in the X, Y, and Z directions, respectively; D t D represents the actual output numerical vector of the fully connected layer test network. t =f(W bc D M +b bc ), f() is the activation function, W bc B bc Here are the input weight matrix and node bias matrix of the fully connected layer test network. The initial input weight matrix and node bias matrix of the fully connected layer test network are randomly generated Q... M ×3, 3×1 matrix, D M Q is the output vector of the last test coding layer. M The dimension of the output vector of the last test encoding layer; The normalized data vectors in the test set are degraded and used as the input vectors of the pre-trained model of the network test model. If the loss function of the pre-trained model of the network test model is Loss(y real D t If the value is less than the set threshold, then the pre-trained model of the network test model at this time is used as the trained network model; otherwise, the parameters of the input weight matrix and node bias matrix in each denoising autoencoder and the network test model are randomly initialized, and the above pre-training is repeated until the loss function of the pre-trained model of the network test model is Loss(y). real D t () is less than the set threshold.
2. The gyroscope error compensation method based on stacked denoising autoencoders according to claim 1, characterized in that... The input vector H of the nth coding layer n Dimension P n The output vector H of the nth coding layer n+1 Dimension Q n Then the input weight matrix W of the coding layer en and node bias matrix b en P respectively n ×Q n Q n A matrix of size ×1.
3. The gyroscope error compensation method based on stacked denoising autoencoders according to claim 1, characterized in that... The output vector H of the Mth coding layer M+1 Dimension Q M The input weight matrix W of the fully connected layer network b and node bias matrix b b Q M 3×3 and 3×1 matrices.
Citation Information
Patent Citations
MEMS-IMU (Micro-electromechanical Systems-Inertial Measurement Unit) full-temperature and full-parameter calibration and compensation method
CN108534800A
MEMS gyroscope random error compensation method based on combination algorithm
CN111896029A
Analysis method for random errors of MEMS gyroscope
CN112729266A
BP neural network-based MEMS gyro random error compensation method
CN108168577A
A one-dimensional synthetic aperture microwave radiometer SST inversion method based on deep learning
CN109829547A