Power battery anomaly detection method based on important sample screening under big data framework
By screening important samples for power battery anomaly detection under the big data framework, the problem of resource and time limitation in deep learning algorithms in large-scale vehicle monitoring is solved, and efficient anomaly detection and model deployment is achieved.
Patent Information
- Application Number
- CN202411736187.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-29
AI Technical Summary
Deep learning algorithms cannot be deployed in large-scale vehicle monitoring due to resource and time constraints, making it difficult to achieve accurate monitoring and efficient computing.
The power battery abnormality detection method based on important samples screening under the big data framework is adopted. By pre-processing the vehicle operation history data, important samples are screened for model training, and the impact of redundant samples on model performance is reduced.
This method shortens the model training time while ensuring model performance, provides support for the deployment of deep learning algorithms under large-scale vehicle safety monitoring, and realizes efficient anomaly detection under limited resources and time.
Smart Images

Figure CN119691356A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power battery safety and relates to a battery anomaly detection method, specifically a power battery anomaly detection method based on important sample screening under a big data framework. Background Art
[0002] As society pays more and more attention to green energy, new energy vehicles are gradually becoming the mainstream trend in the automotive industry. In the application of on-board power battery systems, abnormal performance of battery parameters often means a decrease in battery safety. Therefore, early and accurate identification of battery abnormalities is of great significance to ensure the safe operation of vehicles and early warning of battery failures. In recent years, with the rapid development of the number of electric vehicles, how to achieve large-scale vehicle safety monitoring has become an urgent problem to be solved. With the continuous development of AI technology, deep learning algorithms have been widely used in academia for safety detection of electric vehicles. However, in the face of the real-world vehicle big data environment, due to the limitations of training time and computing resources caused by massive training samples, there are practical bottlenecks in deploying deep learning algorithms. For large-scale vehicle real-time monitoring, the less computing resources the monitoring method consumes, the more vehicles can be monitored. Therefore, accurate monitoring and efficient computing should be placed in the same position of importance. Summary of the invention
[0003] The purpose of the present invention is to provide a power battery anomaly detection method based on important sample screening to solve the problem that deep learning algorithms cannot be deployed under large-scale vehicle monitoring due to resource and time constraints. This method performs importance evaluation at the sample level, screens important samples instead of all samples for model training, reduces the impact of redundant samples on model performance, and provides support for the deployment of deep learning algorithms under large-scale vehicle safety monitoring.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] A power battery anomaly detection method based on important sample screening under a big data framework specifically includes the following steps:
[0006] Step 1, preprocessing the vehicle operation history data to obtain preprocessed vehicle operation data, and selecting model input item data from the preprocessed data;
[0007] Step 2, divide the model input data obtained in step 1 into a training set and a test set; determine the neural network model structure and input the training set into the neural network model for pre-training, determine the number of pre-training iterations and extract the network parameter w under the current number of iterations;
[0008] Step 3, input the training set obtained in step 2 into the neural network model with a network parameter w in sequence, and calculate the importance score of each sample, including the following sub-steps;
[0009] Step 31, the importance score is composed of the gradient change score, the global stability error score and the local sensitivity error score of each input sample;
[0010] Step 32, using the Z-score method to standardize GCS, GSS and LSS respectively, and the sum of the standardized GCS, GSS and LSS is used as the sample importance score;
[0011] Step 4, sorting the training set samples according to the importance score of each sample obtained in step 3, and determining the appropriate sample screening ratio to form important samples, including the following sub-steps;
[0012] Step 41, determining the sample screening ratio, which is the proportion of important samples to the samples in the training set;
[0013] Step 42, sorting the training set samples from large to small according to the sample importance scores obtained in step 3, and selecting the first k% samples with the largest importance scores from the sorting according to the sample screening ratio k determined in step 41 as important samples;
[0014] Step 5, inputting the important samples obtained in step 4 into the neural network model obtained in step 2 for training, and obtaining a trained neural network model, i.e., a prediction model;
[0015] Step 6: Input the real-time data of the vehicle as test data into the prediction model to obtain the model output; calculate the residual between the test data and the model output. If it is greater than the set abnormal threshold, it is determined that the vehicle is abnormal at the current moment, otherwise it is normal.
[0016] Furthermore, in step 1, the vehicle operation history data includes mileage, vehicle speed, SOC, battery probe temperature and battery cell voltage; and the preprocessing includes data cleaning and feature importance analysis.
[0017] Furthermore, the feature importance analysis specifically uses the Pearson correlation coefficient to evaluate the correlation between data.
[0018] Furthermore, step 2 includes the following sub-steps:
[0019] Step 21, divide the model input data obtained in step 1 into a training set and a test set; randomly set initial hyperparameters and define a model loss function; the model loss function Loss is defined as:
[0020]
[0021] In the formula, n is the number of samples tested, and U i are the predicted value and the true value respectively;
[0022] Step 22, selecting multiple possible hyperparameter combinations from the initial hyperparameters, using a grid search method to test the model performance of each hyperparameter combination one by one, selecting a set of hyperparameters with the best performance for use in the neural network model, and determining the model structure;
[0023] Step 23, input the training set into the neural network model obtained in step 22 for pre-training, so as to extract the network parameters required for sample importance evaluation; the following principles are adopted for selection:
[0024] 1) As the number of pre-training iterations increases, when the loss function Loss is less than 2.5*10 -4 Stop pre-training when , and save the network parameters w at the current number of iterations;
[0025] 2) If the first 10 iterations of pre-training do not meet the conditions corresponding to 1), stop pre-training and save the network parameters w corresponding to the number of iterations with the minimum training set loss in the first 10 iterations.
[0026] Furthermore, in step 31, the gradient change fraction is as follows:
[0027]
[0028] Among them, f w (X) is the output predicted by the neural network model with network parameter w at the current iteration of the input sample X. is the gradient of the loss function with respect to the network parameter w;
[0029] The global stability error score and the local sensitivity error score are as follows:
[0030] GSS=||Yf w (X)||2
[0031] LSS=||Yf w (X)||1
[0032] Furthermore, in step 41, if the average standard deviation of the voltage of each single cell in the training set data is greater than 0.17, the optimal sample screening ratio is determined to be 40%, and if it is less than 0.17, the optimal sample screening ratio is determined to be 30%.
[0033] Furthermore, step 6 includes the following operations: inputting the test set data obtained in step 21 into the prediction model obtained in step 5, and calculating the residual between the model prediction value and the true value; using the box plot method to set the abnormal threshold, and the calculation formula for setting the abnormal threshold of the box plot is as follows:
[0034] Thr = Q3 + 1.5 * IQR
[0035] Where Q3 is the third quartile of the residual of the test set data, IQR is the interquartile range, and Thre is the abnormal threshold.
[0036] Compared with the prior art, the present invention focuses on the abnormal identification method of electric vehicle power batteries. Based on the cloud monitoring big data of electric vehicles, it proposes a power battery abnormality detection method based on important sample screening to address the problem that deep learning algorithms cannot be deployed on a large scale due to resource and time constraints. This method realizes abnormality detection by predicting normal battery parameters. It is not limited to the type of battery parameters and can be applied to parameters such as battery voltage and temperature. It uses important samples instead of full samples for model training, which can achieve similar model performance while greatly improving the timeliness of the model. At the same time, this method realizes sample importance evaluation at the sample level and does not involve specific network models. Therefore, it is also applicable to other neural network models optimized by gradient descent method, and has strong generalization ability. It provides support for large-scale vehicle safety monitoring and fault prediction based on cloud data. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a flow chart of the method of the present invention;
[0038] Figure 2 It is the voltage prediction effect of the full sample training model;
[0039] Figure 3 It is the voltage prediction effect of the model trained with the top 30% of samples with the highest sample importance;
[0040] Figure 4 It is the voltage prediction effect of the model trained with the first 30% of samples with the lowest sample importance. DETAILED DESCRIPTION
[0041] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0042] like Figure 1 As shown, the present invention provides a power battery anomaly detection method based on important sample screening under a big data framework, which specifically includes the following steps:
[0043] Step 1: preprocess the vehicle operation history data to obtain the preprocessed vehicle operation data, and select the model input item data from the preprocessed data. This step is used to ensure that the data format can meet the needs of the model.
[0044] In this embodiment, according to the national standard GB / T 32960 "Technical Specifications for Electric Vehicle Remote Service and Management System", the historical data uploaded by the electric vehicle includes multiple main data items such as mileage, vehicle speed, SOC, battery probe temperature and battery cell voltage. The above data items will be used as candidate input items of the model and need to be pre-processed by data cleaning, feature importance analysis and other pre-processing processes before being used as input of the model. The specific operations are as follows:
[0045] 1) For the vehicle operation history data, if a data frame has a null value, the data frame is filled by linear interpolation of the two adjacent frames of data;
[0046] 2) Considering that different data items have different effective ranges and distribution characteristics, this embodiment uses the Z-score method to standardize the data to ensure that each feature has a similar scale and range. The formula of the Z-score method is as follows:
[0047]
[0048] In the formula, x is the data to be standardized, μ is the mean value of all data under the data item corresponding to x, σ is the standard deviation of all data under the data item corresponding to x, and Z is the standardized data.
[0049] 3) In order to obtain better model performance, it is necessary to screen important features through feature importance analysis. In this embodiment, the Pearson correlation coefficient is used to evaluate the correlation between data. A stronger correlation represents a greater contribution to the model performance. Therefore, it is necessary to screen data with strong correlation as the input of the model. In the present invention, the total battery voltage, SOC, and battery cell voltage data items after Z-score standardization are determined as model input items. In addition, considering that the present invention performs battery anomaly detection by predicting the battery cell voltage, the battery cell voltage is used as the target feature item.
[0050] The calculation formula of Pearson correlation coefficient is:
[0051]
[0052] In the formula, n is the number of samples, x is i and i are the i-th values of the model candidate input item and target feature item data, respectively. and are the average values of the model candidate input items and target feature item data, respectively, and coef is the Pearson correlation coefficient.
[0053] Step 2, obtain the training set and test set from the model input data obtained in step 1; determine the neural network model structure and input the training set into the neural network model for pre-training, determine the number of pre-training iterations and extract the network parameter w under the current number of iterations.
[0054] Specifically, step 2 includes the following sub-steps:
[0055] Step 21, divide the model input data obtained in step 1 into a training set and a test set. Randomly set the initial hyperparameters and define the model loss function. Specifically, the model loss function Loss is defined as:
[0056]
[0057] In the formula, n is the number of samples tested, and U i are the predicted value and the true value respectively;
[0058] Step 22, in order to ensure that the model with the best performance is obtained, the hyperparameters of the model need to be optimized. In the present invention, multiple groups of possible hyperparameter combinations are selected from the initial hyperparameters, and the model performance of each group of hyperparameter combinations is tested one by one using a grid search method, and a group of hyperparameters with the best performance is selected for use in a neural network model (such as LSTM) to determine the model structure.
[0059] Step 23, inputting the training set into the neural network model obtained in step 22 for pre-training, so as to extract the network parameters required for sample importance evaluation;
[0060] The corresponding network parameters under a certain number of pre-training iterations affect the effect of importance evaluation. Therefore, how to select an appropriate number of pre-training iterations is particularly important. In order to select the relatively optimal number of pre-training iterations in the shortest possible time, this embodiment adopts the following principles for selection:
[0061] 1) As the number of pre-training iterations increases, when the loss function Loss is less than 2.5*10 -4 Stop pre-training when , and save the network parameters w at the current number of iterations.
[0062] 2) If the first 10 iterations of pre-training do not meet the conditions corresponding to 1), stop pre-training and save the network parameters w corresponding to the number of iterations with the minimum training set loss in the first 10 iterations.
[0063] Step 3, input the training set obtained in step 2 into the neural network model with a network parameter w in sequence, and calculate the importance score of each sample, including the following sub-steps;
[0064] In step 31, the importance of samples is evaluated from the perspectives of network parameters and model output. The importance score consists of the gradient change score (GCS), global stability error score (GSS), and local sensitivity error score (LSS) of each input sample.
[0065] Specifically, the gradient descent method is a commonly used neural network model optimization method, and its gradient update formula is:
[0066]
[0067] In the formula, w t and w t-1 are the network parameters in the current iteration and the previous iteration respectively, η is the learning rate, l(·) is the loss function Loss, X and Y are the input samples and model output, is the network parameter w of the input sample X at the last iteration t-1 The output of the neural network prediction, is the loss function for the network parameters w t-1 The gradient of
[0068] From the perspective of network parameters, samples that have a greater impact on model performance often cause greater gradient changes after entering the neural network. Therefore, the gradient change score (GCS) is used as an indicator to evaluate the importance of samples, as shown in the following formula:
[0069]
[0070] Among them, f w (X) is the output predicted by the neural network model with network parameter w at the current iteration of the input sample X. is the gradient of the loss function with respect to the network parameter w;
[0071] From the perspective of model output, the larger the residual between the model prediction value and the true value, the more likely it is that the sample contains more information that is not taken into account by the model, so such samples have a greater impact on model performance. In order to characterize the residual between the model prediction value and the true value from multiple perspectives, the global stability error score (GSS) and the local sensitivity error score (LSS) are used as indicators for evaluating sample importance, as shown in the following formula:
[0072] GSS=||Yf w (X)||2
[0073] LSS=||Yf w (X)||1
[0074] Step 32, since the fluctuation range and distribution characteristics of the importance scores of different samples are different, the present invention adopts the Z-score method to standardize GCS, GSS and LSS respectively, and the sum of the standardized GCS, GSS and LSS is used as the sample importance score.
[0075] Step 4, sorting the training set samples according to the importance score of each sample obtained in step 3, and determining the appropriate sample screening ratio to form important samples, including the following sub-steps;
[0076] Step 41, determine the sample screening ratio, which is the proportion of important samples to the training set samples. For different training set samples, the increase in the amount of data does not mean an increase in the amount of information contained in the data. Generally, the discreteness of a data set can be used to characterize the variability and volatility between data points. For data sets with higher discreteness, the model usually requires more data to accurately represent the data characteristics. Therefore, the present invention uses the standard deviation of the training set data to quantify the amount of information contained in the data set to determine the optimal sample screening ratio. Accordingly, if the average standard deviation of the voltage of each single cell in the training set data is greater than 0.17, the optimal sample screening ratio is determined to be 40%; if it is less than 0.17, the optimal sample screening ratio is determined to be 30%.
[0077] Step 42, sort the training set samples from large to small according to the sample importance scores obtained in step 3, and select the first k% samples with the largest importance scores from the sorting according to the sample screening ratio k determined in step 41 as important samples.
[0078] Step 5: Input the important samples obtained in step 4 into the neural network model obtained in step 22 for training to obtain a trained neural network model, i.e., a prediction model.
[0079] Step 6: Input the real-time vehicle data as test data into the prediction model to obtain the model output; calculate the residual between the test data and the model output. If it is greater than the set abnormal threshold, it is determined that the vehicle is abnormal at the current moment, otherwise it is normal.
[0080] Step 6 includes the following operations: Since the proportion of data in the normal state of the vehicle in the vehicle operation data is much higher than the proportion of data in the abnormal state of the vehicle, the acquired vehicle data is generally biased towards the normal state. Therefore, the model prediction result obtained by training the vehicle data can be considered as a normal value. When the prediction result is significantly different from the actual value (that is, greater than the set threshold), this can be considered as an anomaly. Input the real-time vehicle data into the prediction model obtained in step 5, and calculate the residual between the model prediction value and the true value; use the box plot method to set the anomaly threshold.
[0081] Specifically, the calculation formula for setting the abnormal threshold of the box plot is as follows:
[0082] Thr = Q3 + 1.5 * IQR
[0083] Where Q3 is the third quartile of the residual of the test set data, IQR is the interquartile range, and Thre is the abnormal threshold.
[0084] In summary, the present invention proposes a power battery anomaly detection method based on important sample screening, which evaluates the importance of training samples from two perspectives: network parameters of the neural network model and model output, and uses important samples instead of all samples for training, thereby shortening the training time of the model while ensuring accuracy, and provides support for the deployment of neural network models under large-scale vehicle safety monitoring.
[0085] The anomaly detection effect of the method of the present invention depends on the performance of the prediction model. Therefore, taking voltage prediction as an example, the actual operation data of a real vehicle in 2020 is verified using a model trained with all samples, a model trained with the top 30% of samples with the highest sample importance, and a model trained with the top 30% of samples with the lowest sample importance. The verification effect is as follows: Figures 2 to 4 As shown. Figures 2 to 4 It can be seen that the effect obtained by training the model with the top 30% of samples with the highest sample importance is almost the same as that of the full sample training model, which indicates that the important samples extracted by the method of the present invention can cover the information of the entire sample with only 30% of the data volume; by comparing the training model with the top 30% of samples with the highest sample importance and the training model with the top 30% of samples with the lowest sample importance, it can be found that the performance gap between the two models is large, which also verifies the accuracy of the extraction of important samples in the method of the present invention, thereby proving the feasibility and effectiveness of the method of the present invention.
Claims
1. A power battery anomaly detection method based on important sample screening under a big data framework, characterized in that: The specific steps include: Step 1, preprocessing the vehicle operation history data to obtain preprocessed vehicle operation data, and selecting model input item data from the preprocessed data; Step 2, divide the model input data obtained in step 1 into a training set and a test set; Determine the neural network model structure and input the training set into the neural network model for pre-training, determine the number of pre-training iterations and extract the network parameters w under the current number of iterations; Step 3, input the training set obtained in step 2 into the neural network model with a network parameter w in sequence, and calculate the importance score of each sample, including the following sub-steps; Step 31, the importance score is composed of the gradient change score, the global stability error score and the local sensitivity error score of each input sample; Step 32, using the Z-score method to standardize GCS, GSS and LSS respectively, and the sum of the standardized GCS, GSS and LSS is used as the sample importance score; Step 4, sorting the training set samples according to the importance score of each sample obtained in step 3, and determining the appropriate sample screening ratio to form important samples, including the following sub-steps; Step 41, determining the sample screening ratio, which is the proportion of important samples to the samples in the training set; Step 42, sorting the training set samples from large to small according to the sample importance scores obtained in step 3, and selecting the first k% samples with the largest importance scores from the sorting according to the sample screening ratio k determined in step 41 as important samples; Step 5, inputting the important samples obtained in step 4 into the neural network model obtained in step 2 for training, and obtaining a trained neural network model, i.e., a prediction model; Step 6: Input the real-time data of the vehicle as test data into the prediction model to obtain the model output; calculate the residual between the test data and the model output. If it is greater than the set abnormal threshold, it is determined that the vehicle is abnormal at the current moment, otherwise it is normal.
2. The power battery anomaly detection method based on important sample screening under the big data framework of claim 1 is characterized in that: In step 1, the vehicle operation history data includes mileage, vehicle speed, SOC, battery probe temperature and battery cell voltage; the preprocessing includes data cleaning and feature importance analysis.
3. The power battery anomaly detection method based on important sample screening under the big data framework as claimed in claim 2 is characterized in that: The feature importance analysis specifically uses the Pearson correlation coefficient to evaluate the correlation between data.
4. The power battery anomaly detection method based on important sample screening under the big data framework of claim 1 is characterized in that: Step 2 includes the following sub-steps: Step 21, divide the model input data obtained in step 1 into a training set and a test set; randomly set initial hyperparameters and define a model loss function; the model loss function Loss is defined as: In the formula, n is the number of samples tested, and U i are the predicted value and the true value respectively; Step 22, selecting multiple possible hyperparameter combinations from the initial hyperparameters, using a grid search method to test the model performance of each hyperparameter combination one by one, selecting a set of hyperparameters with the best performance for use in the neural network model, and determining the model structure; Step 23, inputting the training set into the neural network model obtained in step 22 for pre-training, so as to extract the network parameters required for sample importance evaluation; The following principles are used for selection: 1) As the number of pre-training iterations increases, when the loss function Loss is less than 2.5*10 -4 Stop pre-training when , and save the network parameters w at the current number of iterations; 2) If the first 10 iterations of pre-training do not meet the conditions corresponding to 1), stop pre-training and save the network parameters w corresponding to the number of iterations with the minimum training set loss in the first 10 iterations.
5. The power battery anomaly detection method based on important sample screening under the big data framework of claim 1 is characterized in that: In step 31, the gradient change fraction is as follows: Among them, f w (X) is the output predicted by the neural network model with network parameter w at the current iteration of the input sample X. is the gradient of the loss function with respect to the network parameter w; The global stability error score and the local sensitivity error score are as follows: GSS=||Y-f w (X)||2 LSS=||Y-f w (X)||1 6. The power battery anomaly detection method based on important sample screening under the big data framework of claim 1 is characterized in that: In step 41, if the average standard deviation of the voltage of each single cell in the training set data is greater than 0.17, the optimal sample screening ratio is determined to be 40%, and if it is less than 0.17, the optimal sample screening ratio is determined to be 30%.
7. The power battery anomaly detection method based on important sample screening under the big data framework of claim 1 is characterized in that: Step 6 includes the following operations: input the test set data obtained in step 21 into the prediction model obtained in step 5, and calculate the residual between the model prediction value and the true value; use the box plot method to set the abnormal threshold, and the calculation formula for setting the abnormal threshold of the box plot is as follows: Thr = Q3 + 1.5 * IQR Where Q3 is the third quartile of the residual of the test set data, IQR is the interquartile range, and Thre is the abnormal threshold.
Citation Information
Patent Citations
Automobile battery system service life detection method based on online feature extraction
CN115856640A
System, method, and apparatus for a neural network model for a vehicle
US20210073626A1