A method for detecting abnormal fluctuations in battery production process based on deep learning

By adopting the improved self-coded unsupervised learning anomaly detection algorithm DAUAD in the battery production process, combined with the autoencoder and GRU network, the problem of insufficient robustness and generalization ability of multi-dimensional time series anomaly detection in the battery production process is solved, and efficient abnormal detection is achieved and losses are reduced.

CN114118385BActive Publication Date: 2025-02-28HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111511948.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2025-02-28
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

The prior art has problems of robustness and insufficient generalization capabilities in the detection of multi-dimensional time series anomaly in battery production. Especially in the case of extreme data imbalance, it is difficult to detect abnormalities in time, resulting in huge losses.

Method used

A method for abnormal fluctuation detection of battery production processes based on deep learning is proposed. The improved autoencoding unsupervised learning anomaly detection algorithm DAUAD is used. By building a DAUAD model, combining the reconstruction ability of the autoencoder and the time dependence of the GRU network, the stability of the potential spatial expression vector of the input sample is improved and abnormal detection is achieved.

Benefits of technology

It effectively solves the problem that the autoencoder cannot obtain key information of the input sample during feature extraction, improves the robustness and generalization ability of the model, and can accurately detect multi-dimensional time series anomalies during battery production, reducing losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114118385B_ABST
    Figure CN114118385B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting abnormal fluctuations in battery production processes based on deep learning. The present invention proposes a DAUAD model, which combines the powerful reconstruction and feature extraction capabilities of the autoencoder. In order to improve the stability of the latent space expression vector of the input sample, the present invention adds an Encoder_g module to encode the reconstructed sample, so that the latent space expression of the input sample and the latent space vector expression of the reconstructed sample are as close as possible, thereby improving the stability of the latent expression space vector. The problem that the autoencoder cannot obtain the key information of the input sample during the feature extraction process is effectively solved, and the GUR network is used to consider the impact of the past battery production process on the present, and finally realize the abnormal detection of multi-dimensional time series in the battery production process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial production process fluctuation analysis, and in particular to a method for detecting abnormal fluctuations in a battery production process based on deep learning. Background Art

[0002] With the rapid development of smart factories and sensor technology, more and more time series about the process fluctuations of battery production can be collected through sensors. Anomaly detection of multidimensional time series has become a very important issue. In the actual operation of the equipment, since battery production equipment often works in a normal state, normal samples account for the vast majority of the collected data. The extreme imbalance of data affects the robustness and generalization ability of the anomaly detection model. When an anomaly occurs, failure to detect it in time will lead to huge losses. In recent years, many unsupervised anomaly detection algorithms for multidimensional time series have been proposed, which can achieve better performance, but there are still some problems.

[0003] The anomaly detection algorithm based on deep autoencoder is often used for anomaly detection of multidimensional time series. This method mainly judges whether the data is abnormal by reconstruction error. During the training process, only normal data can be used for training. In the test phase, normal data can be well reconstructed, while the trained model cannot reconstruct abnormal data. By setting an effective threshold, it is judged as abnormal when the reconstruction error is greater than the threshold, otherwise it is normal. However, the smaller the reconstruction error of the model during the training process, the better the performance of the model. The processing of the hidden layer is a very cumbersome problem. Recurrent neural network (RNN) is often used to process sequence signals. GRU (gated recurrent unit) is a variant of recurrent neural network, which can overcome the gradient vanishing and gradient exploding problems of RNN, making GRU perform better in processing the problem of multidimensional time series anomaly detection. GRU neural network is often used to predict the sample distribution of the next moment. The neural network is trained by comparing the deviation between the predicted value and the actual value, thereby realizing multidimensional time series anomaly detection. However, GRU neural network is very sensitive to noise, which will affect the robustness of the model.

[0004] In summary, in dealing with the problem of process fluctuation analysis in battery production, finding an effective new method for anomaly detection of multidimensional time series, considering the time dependence of multidimensional time series and the correlation between multidimensional time series, has become a problem that needs to be solved urgently. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention proposes a method for detecting abnormal fluctuations in battery production processes based on deep learning, an improved autoencoder unsupervised learning anomaly detection algorithm DAUAD (Double Autoencoder Unsupervised Anomaly Detection), and the algorithm flow chart is as follows: Figure 1 As shown, the algorithm takes into account the stability of the autoencoder latent space and can realize the function of anomaly detection of process fluctuations in the battery production process.

[0006] The technical solution of the present invention comprises the following steps:

[0007] 1) Divide the battery production process abnormal fluctuation data set into training set X train , validation set X val , test set X test , where the training set X train Contains only normal samples, validation set X val and the test set X test Includes both normal and abnormal samples;

[0008] 2) Build the DAUAD model and use the training set X train Train the model;

[0009] The specific steps of constructing the DAUAD model are as follows:

[0010] The DAUAD neural network specifically includes encoder Encoder_h, decoder Decoder_h, encoder Encoder_g, decoder Decoder_g and y_net;

[0011] In encoder Encoder_h, the input is the sample x at time t-1 t-1 ,There are four fully connected layers in the design, and the number of neurons is 256, 64, 16, and 8 respectively. Except for the last fully connected layer, the first three fully connected layers are connected with Leaky ReLU nonlinear activation function, and the last layer uses Tanh nonlinear activation function; to prevent the model from overfitting, Dropout is added to the first two fully connected layers to improve the robustness of the model; the output z of the last layer of neurons is t-1 As a latent space vector, the latent space vector is used to store the key information of the input sample; Represents the parameters in Encoder_h. The process is expressed by the following formula:

[0012]

[0013] The decoder Decoder_h is designed with four fully connected layers, and the number of neurons is 16, 64, 256, and 100 respectively. Except for the last fully connected layer, the first three layers are connected with SELU nonlinear activation function, and the last layer uses Tanh nonlinear activation function. To prevent the model from overfitting, Dropout is added to the second and third layers; the output of the last layer of neurons is the reconstructed sample x′ of the input sample t-1 ; Among them, ε is the parameter of Decoder_h, and the process is expressed by the following formula:

[0014] x′ t-1 =Decoder_h(z t-1 ,ε) (2)

[0015] Encoder Encoder_g has the same structure as Encoder Encoder_h and shares all parameter weights. Encoder Encoder_g reconstructs sample x′ t-1 After encoding, we get x′ t-1 The latent space representation z′ t-1 , expressed as:

[0016]

[0017] The y_net uses the GRU neural network structure, with {x t-L , x t-L+1 ,...,x t-1} as input, output the hidden layer state of the last layer at time t-1, and concatenate the output Z of Encoder_h t-1 As the input of the fully connected layer, the output is the expression of the latent space of the input sample at time t θ represents the parameters of y_net, where L represents the length of the input sequence, and the formula is expressed as:

[0018]

[0019] Decoder_g decoder represents the latent space of the input sample at time t As input, decode to get the predicted input sample X at time t t , Decoder_g and Decoder_h have the same structure and share all parameters; the formula is expressed as:

[0020]

[0021] The specific training process of DAUAD is as follows:

[0022] During the forward propagation process, the Encoder_h network inputs the sample X at time t-1 t-1, get the expression Z of the latent space at the current moment t-1 , Z t-1 Input Decoder_h to get the reconstructed input sample X′ at the current moment t-1 , thereby calculating the residual between the input sample data and the reconstructed sample data, || || represents the L2 norm, which is expressed by the following formula:

[0023]

[0024] Reconstruct the input sample X′ t-1 Input Encoder_g to get the latent space expression Z′ of the reconstructed sample t-1 , thereby calculating the residual of the latent space expression vector of the input sample and the reconstructed sample, which is expressed by the following formula:

[0025]

[0026] Use y_net to predict the latent space expression at time t. The specific process is to input the samples from time tL to time t-1 into the GRU neural network, obtain the state of the last hidden layer, connect it with the output of Encoder_h in series, pass through a fully connected layer, the number of neurons in the fully connected layer is 8, and the fully connected layer is followed by the Tanh nonlinear activation function to predict the latent space expression prediction vector at time t. Will Input Decoder_g to decode and get the predicted value X′ of the sample input at time t t , and the prediction error at time t is calculated. The prediction error formula at time t is expressed as:

[0027]

[0028] Therefore, the total loss function is:

[0029]

[0030] Where N represents the total number of samples, w1, w2, w3 are three hyperparameters. In this loss function, the first term represents the reconstructed residual of the input sample, the second term represents the residual of the latent space expression of the input sample and the reconstructed sample, and the third term represents the deviation between the predicted sample and the actual sample.

[0031] During the back propagation of the model, the Adam optimization algorithm is used to update the parameters of the Encoder_h, Decoder_h, Encoder_g, Decoder_g, and y_net networks. The gradient descent parameter update formula is as follows:

[0032]

[0033] in represents the parameters of Encoder_h and Encoder_g, ε represents the parameters of Decoder_h and Decoder_g, θ represents the parameters of y_net, α, β, γ are their corresponding learning rates respectively; use the training set X train After repeated training of multiple networks, the networks Encoder_h, Decoder_h, Encoder_g, Decoder_g and y_net will approach the optimal solution.

[0034] 3) Use the validation set X val Used to adjust hyperparameters of trained models, propose threshold strategies, weigh the false alarm rate and missed detection rate of the model, and select the most appropriate threshold;

[0035] 4) Use test set X test Measure model performance and generalization ability.

[0036] Preferably, the step 1) is specifically as follows:

[0037] The original data X∈R N×T ={x 0 ,x 1 ,x 2 ,...x T ), where N is the dimension of the sequence, which is 100, and T is the length of each sequence, which is 200000, and is divided into training set X according to the ratio of 2:1:1 train , validation set X val and the test set X test , where each sample contains N sample points, that is Where i represents the i-th sample in the original data set; there are 200,000 samples in the original data set, of which the training set X train ={x 0 ,x 1 ,…,x 99999}Total 100,000 samples, validation set X val ={x 100000 ,x 100001 ,…,x 149999} A total of 50,000 samples, the remaining test data set X test ={x 150000 ,x 150001 ,…,x 199999} A total of 50,000 samples, of which only the training set X train Contains only normal samples, validation set X val and the test set X test The types of abnormalities are diverse and their forms vary.

[0038] Preferably, the GRU is another type of RNN, having a reset gate, an update gate, and a cell for storing hidden states; the hidden state h of the previous time step is stored in t-1 and the current input x t Connect them in series to create a reset gate and get r t ; The reset gate is applied to the hidden state h t-1 , and combined with the current time x t Then pass this vector to a fully connected layer with weight W and tanh nonlinear activation function to generate a new The hidden state h at the previous time step t-1 and the current input x t Connect in series to create an update gate; cell and h t-1 Follow the update door t The determined ratio is mixed to generate the updated hidden state h t , which is the output of the cell; * is used to represent the Hadamard product, and the whole process is expressed as follows:

[0039] r t =σ(W r ·[h t-1 ,x t ] (4)

[0040]

[0041] z t =σ(W z ·[h t-1 ,x t ]) (6)

[0042]

[0043] Preferably, in step 3), the validation set X val Data validation is performed on the trained network model. The validation indicators include precision, recall and F1 score. Hyperparameters are adjusted, i.e. the number of neurons in the connection layer, the dropout probability of Dropout, the dimension L of the GRU hidden layer and the number of hidden layers of the GRU neural network.

[0044] The validation set X val and the test set X testThe data is trained with normal samples, and the anomaly score is obtained in the trained model. Since the model is trained with normal samples, the model can achieve good reconstruction and prediction for normal samples, but the model cannot reconstruct and predict abnormal data, resulting in a large error. The anomaly score is expressed by the following formula:

[0045] S ource =w1||X t-1 -X′ t-1 ||+w2||Z t-1 -Z′ t-1 ||+w3||X t -X' t || (17)

[0046] The abnormal score S ource The first term represents the reconstruction residual, the second term represents the residual of the input sample and the reconstructed sample in the latent space vector, and the third term represents the deviation between the predicted sample and the actual sample;

[0047] The threshold is chosen by the lowest E rr The rate is determined by:

[0048]

[0049] Where TP represents true positive, FP represents false positive, FN represents false negative, and TN represents true negative;

[0050] Since abnormal data often accounts for a very small proportion, the threshold setting that only considers precision and recall will affect the performance of the model and will result in the lowest E rr The threshold is set to the optimal threshold; in equation (18), μ is a hyperparameter. By adjusting the value of μ, the model can pay different attention to the false positive rate or the false negative rate. That is, when μ>0.5, it will pay more attention to false positives than false negatives; when μ=0.5, it pays equal attention to false positives and false negatives; when μ<0.5, it will pay more attention to false negatives than false positives. After weighing the costs of both, select the appropriate threshold.

[0051] Preferably, the model after training and adjusting parameters in step 4) is tested on the test set X. test The model is tested on the data to obtain the anomaly score, precision, recall and F1 score of each sample in the test set, thereby verifying the performance test results of the model.

[0052] Preferably, the discard probability p of the encoder Encoder_h and the decoder Decoder_h is set to 0.1.

[0053] Preferably, in the GRU neural network structure, the initial value of the length of L is 20, and the initial value of the number of layers of the GRU neural network is 3.

[0054] The beneficial effects of the present invention are:

[0055] The manufacturing process of high-end power batteries includes core processes such as mixing, coating, lamination and formation. By configuring a multi-sensor system, reliable data of the production process can be obtained. Different processes affect each other, and the occurrence of anomalies is often related to the previous time step operation, so the time dependency and the influence of the core process must be considered. The present invention proposes a DAUAD model, which combines the powerful reconstruction and feature extraction capabilities of the autoencoder. In order to improve the stability of the latent space expression vector of the input sample, the present invention adds an Encoder_g module to encode the reconstructed sample so that the latent space expression of the input sample and the latent space vector expression of the reconstructed sample are as close as possible, thereby improving the stability of the latent expression space vector. It effectively solves the problem that the autoencoder cannot obtain the key information of the input sample during the feature extraction process, and adopts the GUR network to consider the impact of the past battery production process on the present, and finally realizes the anomaly detection of multi-dimensional time series in the battery production process. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 is a flow chart of the present invention;

[0057] Figure 2 It is the overall structure diagram of the neural network model of the present invention; Specific implementation plan

[0058] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0059] like Figure 1 As shown, the present invention comprises the following steps.

[0060] 1) Divide the original data set into training set X train , validation set X val , test set X test , where the training set X train Contains only normal samples, validation set X val and the test set X test Includes both normal and abnormal samples;

[0061] 2) Build the DAUAD model and use the training set X train Train the model;

[0062] 3) Use the validation set X val Used to adjust hyperparameters of trained models and propose threshold strategies to balance the false alarm rate and missed detection rate of the model and select the most appropriate threshold;

[0063] 4) Use test set X test Measure model performance and generalization ability.

[0064] The step 1) converts the original data X∈R N*T ={x 0 ,x 1 ,x 2 ,...x T ) (where N is the dimension of the sequence, which is 100, and T is the length of each sequence, which is 200000) is divided into training set X according to the ratio of 2:1:1. train , validation set X val and the test set X test , where each sample contains N sample points, that is Where i represents the i-th sample in the original data set. There are 200,000 samples in the original data set, of which the training set X train ={x 0 ,x 1 ,x 2 ,x 99999}Total 100,000 samples, validation set X val ={x 100000 ,x 100001 ,…,x 149999} A total of 50,000 samples, the remaining test data set X test ={x 150000 ,x 150001 ,…,x 199999} A total of 50,000 samples, of which only the training set X train Contains only normal samples, validation set X val and the test set X test The types of abnormalities are diverse and their forms vary.

[0065] The overall structure diagram of the DAUAD model in step 2) is as follows Figure 2 As shown, the specific construction steps are as follows:

[0066] The DAUAD neural network is specifically divided into encoder Encoder_h, decoder Decoder_h, encoder Encoder_g, decoder Decoder_g and y_net.

[0067] In encoder Encoder_h, the input is the sample x at time t-1 t-1,There are four fully connected layers in the design, and the number of neurons is 256, 64, 16, and 8 respectively. Except for the last fully connected layer, the first three fully connected layers are connected with Leaky ReLU nonlinear activation function, and the last layer uses tanh nonlinear activation function. To prevent the model from overfitting, Dropout is added to the first two fully connected layers, and the drop probability p is set to 0.1 to improve the robustness of the model. The output z of the last layer of neurons t-1 As a latent space vector, the latent space vector is used to store the key information of the input sample. Represents the parameters in Decoder_h:

[0068]

[0069] The decoder Decoder_h is designed with four fully connected layers, with the number of neurons being 16, 64, 256, and 100, respectively. Except for the last fully connected layer, the first three layers are connected with SELU nonlinear activation function, and the last layer uses tanh nonlinear activation function. To prevent the model from overfitting, Dropout is added to the second and third layers, and the drop probability p is set to 0.1. The output of the last layer of neurons is the reconstructed sample x′ of the input sample. t-1 . Among them, ε is the parameter of Decoder_h, and the process can be expressed by the following formula:

[0070] x′ t-1 =Decoder_h(z t-1 ,ε) (2)

[0071] Encoder Encoder_g has the same structure as Encoder Encoder_h and shares all parameter weights. Encoder Encoder_g reconstructs sample x′ t-1 After encoding, we get x′ t-1 The latent space representation z′ t-1 , expressed as:

[0072]

[0073] GRU (Gated Recurrent Unit) is another type of RNN with a reset gate, an update gate, and a cell for storing hidden states. t-1 and the current input x t Connect them in series to create the reset gate. The reset gate is applied to the hidden state h t-1 , and combined with the current time x t This vector is then passed to a fully connected layer (with weight W and tanh nonlinear activation function) to generate a new The hidden state h at the previous time step t-1 and the current input x t They are connected in series to create an update gate, which is used to determine how many Mixed into the current hidden state h t-1 .cell and h t-1 Follow the update door t The determined ratio is mixed to generate the updated hidden state h t , which is the output of the cell. * represents the Hadamard product, and the whole process is expressed as follows:

[0074] r t =σ(W r ·[h t-1 ,x t ] (4)

[0075]

[0076] z t =σ(W z ·[h t-1 ,x t ]) (6)

[0077]

[0078] DAUAD's y_net uses a GRU neural network structure with {x t-L , x t-L+1 ,...,x t-1} as input, output the hidden layer state of the last layer at time t-1, and concatenate the output Z of Encoder_h t-1 As the input of the fully connected layer, the output is the expression of the latent space of the input sample at time t θ represents the parameters of y_net, where the initial value of the length of L is 20, and the initial value of the number of layers of the GRU neural network is 3. The formula is expressed as:

[0079]

[0080] Decoder_g decoder represents the latent space of the input sample at time t As input, decode to get the predicted input sample X at time t t , Decoder_g and Decoder_h have the same structure and share all parameters. The formula is expressed as:

[0081]

[0082] The specific training process of DAUAD in step 2) is as follows:

[0083] During the forward propagation process, the Encoder_h network inputs the sample X at time t-1 t-1 , get the expression Z of the latent space at the current moment t-1 , Z t-1 Input Decoder_h to get the reconstructed input sample X′ at the current moment t-1 , from which the residual between the input sample data and the reconstructed sample data can be calculated, || || represents the L2 norm, which is expressed by the following formula:

[0084]

[0085] Reconstruct the input sample X′ t-1 Input Encoder_g to get the latent space expression Z′ of the reconstructed sample t-1 , from which the residual of the latent space expression vector of the input sample and the reconstructed sample can be calculated, which is expressed by the following formula:

[0086]

[0087] Use y_net to predict the latent space expression at time t. The specific process is to input the samples from time tL to time t-1 into the GRU neural network, obtain the state of the last hidden layer, connect it with the output of Encoder_h in series, pass through a fully connected layer, the number of neurons in the fully connected layer is 8, and the fully connected layer is followed by a tanh activation function to predict the latent space expression prediction vector at time t Will Input Decoder_g to decode and get the predicted value X′ of the sample input at time t t , from which the prediction error at time t can be calculated. The prediction error formula at time t is expressed as:

[0088]

[0089] Therefore, the total loss function is:

[0090]

[0091] Where N represents the total number of samples, w1, w2, and w3 are three hyperparameters. In this loss function, the first term represents the reconstructed residual of the input sample, the second term represents the residual of the latent space expression of the input sample and the reconstructed sample, and the third term represents the deviation between the predicted sample and the actual sample.

[0092] During the back propagation of the model, the Adam optimization algorithm is used to update the parameters of the Encoder_h, Decoder_h, Encoder_g, Decoder_g, and y_net networks. The gradient descent parameter update formula is as follows:

[0093]

[0094] in ε, θ represent the parameters of Decoder_h, Encoder_h, Decoder_g, Encoder_g and y_net respectively, α, β, γ are their corresponding learning rates, and the training set X is used. train Through the joint training of multiple networks, after repeated training, the networks Encoder_h, Decoder_h, Encoder_g, Decoder_g and y_net will tend to the optimal solution.

[0095] In step 3), the validation set X val Data validation is performed on the trained network model. The validation indicators include precision, recall and F1 score. Hyperparameters are adjusted, such as the number of neurons in the fully connected layer, the drop probability of Dropout, the dimension L of the GRU hidden layer, and the number of hidden layers of the GRU neural network.

[0096] The validation set X val and the test set X test The data is trained with normal samples, and the anomaly score is obtained in the trained model. Since the model is trained with normal samples, the model can achieve good reconstruction and prediction for normal samples, but the model cannot reconstruct and predict abnormal data, resulting in a large error. The anomaly score can be expressed by the following formula:

[0097] S ource =w1||X t-1 -X′ t-1 ||+w2||Z t-1 -Z′ t-1 ||+w3||X t -X′ t || (17)

[0098] The abnormal score S ource The first term represents the reconstruction residual, the second term represents the residual of the input sample and the reconstructed sample in the latent space vector, and the third term represents the deviation between the predicted sample and the actual sample.

[0099] The threshold is chosen by the lowest E rr The rate is determined by:

[0100]

[0101] Among them, TP (True Positive) represents true positive, FP (False Positive) represents false positive, FN (False Negative) represents false negative, and TN (True Negative) represents true negative.

[0102] Since abnormal data often accounts for a very small proportion, the setting of the threshold only considering precision and recall will affect the performance of the model. Therefore, this design proposes to result in the lowest E rr The threshold is set to the optimal threshold. In equation (18), μ is a hyperparameter. By adjusting the value of μ, the model can pay different attention to the false positive rate or false negative rate. That is, when μ>0.5, it will pay more attention to false positives than false negatives; when μ=0.5, it will pay equal attention to false positives and false negatives; when μ<0.5, it will pay more attention to false negatives than false positives. After weighing the costs of both, select the appropriate threshold.

[0103] The model trained and adjusted in step 4) is tested on the test set X test The model is tested on the data to obtain the anomaly score, precision, recall and F1 score of each sample in the test set, thereby verifying the performance test results of the model.

Claims

1. A method for detecting abnormal fluctuations in battery production process based on deep learning, characterized in that: The method specifically comprises the following steps: 1) Divide the battery production process abnormal fluctuation data set into training set X train , validation set X val , test set X test , where the training set X train Contains only normal samples, validation set X val and the test set X test Includes both normal and abnormal samples; 2) Build the DAUAD model and use the training set X train Train the model; The specific steps of constructing the DAUAD model are as follows: The DAUAD neural network specifically includes encoder Encoder_h, decoder Decoder_h, encoder Encoder_g, decoder Decoder_g and y_net; In encoder Encoder_h, the input is the sample x at time t-1 t-1 , there are four fully connected layers in the design, the number of neurons is 256, 64, 16, and 8 respectively. Except for the last fully connected layer, the first three fully connected layers are connected with Leaky ReLU nonlinear activation function, and the last layer uses Tanh nonlinear activation function. To prevent the model from overfitting, Dropout is added to the first two fully connected layers to improve the robustness of the model. The output z of the last layer of neurons is t-1 As a latent space vector, the latent space vector is used to store the key information of the input sample; Represents the parameters in Encoder_h, expressed by the following formula: The decoder Decoder_h is designed with four fully connected layers, and the number of neurons is 16, 64, 256, and 100 respectively. Except for the last fully connected layer, the first three layers are connected with SELU nonlinear activation function, and the last layer uses Tanh nonlinear activation function. To prevent the model from overfitting, Dropout is added to the second and third layers; the output of the last layer of neurons is the reconstructed sample x′ of the input sample t-1 ; Among them, ε is the parameter of Decoder_h: x′ t-1 =Decoder_h(z t-1 ,e) (2) Encoder Encoder_g has the same structure as Encoder Encoder_h and shares all parameter weights. Encoder Encoder_g reconstructs sample x′ t-1 After encoding, we get x′ t-1 The latent space representation z′ t-1 , expressed as: The y_net uses the GRU neural network structure, with {x t-L , x t-L+1 , ..., x t-1 } as input, output the hidden layer state of the last layer at time t-1, and concatenate the output z of Encoder_h t-1 As the input of the fully connected layer, the output is the expression of the latent space of the input sample at time t θ represents the parameters of y_net, where L represents the length of the input sequence, and the formula is expressed as: Decoder_g decoder represents the latent space of the input sample at time t As input, decode to get the predicted input sample X at time t t , Decoder_g and Decoder_h have the same structure and share all parameters; the formula is expressed as: The specific training process of DAUAD is as follows: During the forward propagation process, the Encoder_h network inputs the sample X at time t-1 t-1 , get the expression Z of the latent space at the current moment t-1 , Z t-1 Input Decoder_h to get the reconstructed input sample X′ at the current moment t-1 , thereby calculating the residual between the input sample data and the reconstructed sample data, || || represents the L2 norm, which is expressed by the following formula: Reconstruct the input sample X′ t-1 Input Encoder_g to get the latent space expression Z′ of the reconstructed sample t-1 , thereby calculating the residual of the latent space expression vector of the input sample and the reconstructed sample, which is expressed by the following formula: Use y_net to predict the latent space expression at time t. The specific process is to input the samples from time tL to time t-1 into the GRU neural network, obtain the state of the last hidden layer, connect it with the output of Encoder_h in series, pass through a fully connected layer, the number of neurons in the fully connected layer is 8, and the fully connected layer is followed by the Tanh nonlinear activation function to predict the latent space expression prediction vector at time t. Will Input Decoder_g to decode and get the predicted value X′ of the sample input at time t t , and the prediction error at time t is calculated. The prediction error formula at time t is expressed as: Therefore, the total loss function is: Where N represents the total number of samples, w1, w2, w3 are three hyperparameters. In this loss function, the first term represents the reconstructed residual of the input sample, the second term represents the residual of the latent space expression of the input sample and the reconstructed sample, and the third term represents the deviation between the predicted sample and the actual sample. During the back propagation of the model, the Adam optimization algorithm is used to update the parameters of the Encoder_h, Decoder_h, Encoder_g, Decoder_g, and y_net networks. The gradient descent parameter update formula is as follows: in represents the parameters of Encoder_h and Encoder_g, ε represents the parameters of Decoder_h and Decoder_g, θ represents the parameters of y_net, and α, β, and γ are their corresponding learning rates respectively; use the training set X train After repeated training of multiple networks, the networks Encoder_h, Decoder_h, Encoder_g, Decoder_g and y_net will approach the optimal solution. 3) Use the validation set X val It is used to adjust the hyperparameters of the trained model. The verification indicators include precision, recall and F1 score. The hyperparameters are adjusted, namely the number of neurons in the connection layer, the drop probability of Dropout, the dimension L of the GRU hidden layer and the number of hidden layers of the GRU neural network. The validation set X val and the test set X test The anomaly score is obtained in the trained model based on the data, and the anomaly score is expressed by the following formula: S ource =w1‖X t-1 -X′ t-1 ‖+w2‖Z t-1 -Z′ t-1 ‖+w3‖X t -X′ t ‖ (13) The abnormal score S ource The first term represents the reconstruction residual, the second term represents the residual of the input sample and the reconstructed sample in the latent space vector, and the third term represents the deviation between the predicted sample and the actual sample; The threshold is chosen by the lowest E rr The rate is determined by: Where TP means true positive, FP means false positive, FN means false negative, and TN means true negative; Where μ is a hyperparameter. By adjusting the value of μ, the model can pay different attention to the false positive rate or false negative rate. That is, when μ>0.5, it will pay more attention to false positives than false negatives. When μ=0.5, it pays equal attention to false positives and false negatives. When μ<0.5, it will pay more attention to false negatives than false positives. After weighing the costs of both, choose the appropriate threshold. 4) Use test set X test Measure model performance and generalization ability.

2. According to claim 1, a method for detecting abnormal fluctuations in battery production process based on deep learning is characterized in that: The step 1) is specifically as follows: The original data X∈R N×T ={x 0 ,x 1 ,x 2 ,...x T ), where N is the dimension of the sequence, which is 100, and T is the length of each sequence, which is 200000, and is divided into training set X according to the ratio of 2:1:1 train , validation set X val and the test set X test , where each sample contains N sample points, that is Where i represents the i-th sample in the original data set; there are 200,000 samples in the original data set, of which the training set X train ={x 0 ,x 1 ,…,x 99999 }Total 100,000 samples, validation set X val ={x 100000 ,x 100001 ,…,x 149999 } A total of 50,000 samples, the remaining test data set X test ={x 150000 ,x 150001 ,…,x 199999 } A total of 50,000 samples, of which only the training set X train Only normal samples are included.

3. According to claim 1, a method for detecting abnormal fluctuations in battery production process based on deep learning is characterized in that: The GRU described above is another type of RNN, which has a reset gate, an update gate, and a cell for storing hidden states; the hidden state h of the previous time step is t-1 and the current input x t Connect them in series to create a reset gate and get r t ; The reset gate is applied to the hidden state h t-1 , and combined with the current time x t Then pass this vector to a fully connected layer with weight W and tanh nonlinear activation function to generate a new The hidden state h at the previous time step t-1 and the current input x t Connect in series to create an update gate; cell and h t-1 Follow the update door t The determined ratio is mixed to generate the updated hidden state h t , this is the output of the cell; * is used to represent the Hadamard product, and the whole process is expressed as follows: r t =σ(W r ·[h t-1 ,x t ] (15) z t =σ(W z ·[h t-1 ,x t ]) (17) 4. A method for detecting abnormal fluctuations in battery production process based on deep learning according to claim 1, characterized in that: The model trained and adjusted in step 4) is tested on the test set X test The model is tested on the data to obtain the anomaly score, precision, recall and F1 score of each sample in the test set, thereby verifying the performance test results of the model.

5. A method for detecting abnormal fluctuations in battery production process based on deep learning according to claim 1, characterized in that: The discard probability p of the encoder Encoder_h and the decoder Decoder_h is set to 0.

1.

6. A method for detecting abnormal fluctuations in battery production process based on deep learning according to claim 1, characterized in that: In the GRU neural network structure, the initial value of the length of L is 20, and the initial value of the number of layers of the GRU neural network is 3.

Citation Information

Patent Citations

  • Data processing method and device, and electronic equipment

    CN111177655A

  • Intrusion detection method based on long-short-term memory self-encoding classifier under Internet of Things

    CN113556319A