Lithium battery temperature prediction method and system based on deep learning
Through deep learning-based methods, a long-term memory network model is constructed, and the key features of the historical operation data of lithium batteries are extracted, which solves the problem of low temperature prediction accuracy of lithium batteries and realizes accurate temperature prediction and battery safety management.
Patent Information
- Application Number
- CN202411734608.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-04
AI Technical Summary
The prior art is difficult to accurately predict complex changes in lithium battery temperature, resulting in low prediction accuracy.
Using a deep learning-based method, key features are extracted and long-term memory network models are constructed to predict temperature by collecting and preprocessing the historical operation data of lithium batteries.
Accurate prediction of the temperature changes of lithium batteries is achieved, the accuracy and generalization of predictions are improved, and the battery life is ensured safely.
Smart Images

Figure CN119557566A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of battery maintenance, and in particular relates to a lithium battery temperature prediction method and system based on deep learning. Background Art
[0002] During the use of lithium batteries, real-time and accurate prediction of battery temperature is crucial to ensure safe operation of the battery and extend battery life. However, the dynamic change of lithium battery temperature during charging and discharging is affected by many factors, such as current size, ambient temperature, battery aging, etc. The interaction of these factors makes temperature prediction complicated. Traditional temperature prediction models often ignore the timing and nonlinear characteristics of battery temperature changes, resulting in low prediction accuracy.
[0003] To address this problem, it is necessary to develop a prediction model that can make full use of historical temperature data while taking into account the complexity and timing of battery temperature changes. This model should be able to automatically learn the pattern of temperature changes from a large amount of historical temperature data and predict future temperature changes. In addition, considering the nonlinear characteristics of battery temperature changes at different charging and discharging stages, the model also needs to be able to handle this nonlinear relationship to improve the accuracy of the prediction.
[0004] However, the main technical challenge of building such a model lies in how to effectively integrate and process data from different sources and types, and how to select appropriate algorithms to capture and learn the complex dynamic characteristics of temperature changes. This requires a lot of data preprocessing and feature engineering in the model design stage to ensure that the model can receive high-quality input data, and to improve the model's learning efficiency and prediction accuracy through algorithm optimization. Summary of the invention
[0005] In order to solve the above technical problems, the present invention proposes a lithium battery temperature prediction method and system based on deep learning to solve the problems existing in the above-mentioned prior art.
[0006] To achieve the above object, the present invention provides a lithium battery temperature prediction method based on deep learning, comprising the following steps:
[0007] Collect historical operation data of lithium batteries and perform preprocessing to obtain preprocessing data;
[0008] Extracting key features of the preprocessed data, training a long short-term memory network model through the key features, and obtaining a temperature prediction model;
[0009] The temperature prediction model is evaluated, and when the evaluation passes, the temperature of the lithium battery is predicted using the prediction model.
[0010] Preferably, preprocessing the historical operation data of the lithium battery includes:
[0011] Detect missing values and outliers in lithium battery historical operation data;
[0012] The missing values are supplemented by linear interpolation method, and the abnormal values are smoothed by moving average method;
[0013] The smoothed historical operating data is standardized to obtain preprocessed data.
[0014] Preferably, obtaining the temperature prediction model includes:
[0015] Construct long and short time neural network models;
[0016] Optimizing the long-short time neural network model by gradient descent method to obtain an optimized model;
[0017] The key features of the preprocessed data are input into the optimization model for training to obtain a temperature prediction model.
[0018] Preferably, evaluating the temperature prediction model includes:
[0019] The cross-validation method is used to evaluate the tuned model, and the performance indicators of the model are obtained by calculating the accuracy, precision, recall rate and F1 value of the model;
[0020] During training, the preprocessed data is divided into a training set and a test set. The training set is used to train the model, and the test set is used to evaluate the generalization ability of the model.
[0021] The present invention also proposes a lithium battery temperature prediction system based on deep learning, comprising:
[0022] A preprocessing module is used to collect and preprocess the historical operation data of the lithium battery to obtain preprocessed data;
[0023] A model building module, used for extracting key features of the preprocessed data, training a long short-term memory network model through the key features, and obtaining a temperature prediction model;
[0024] The temperature prediction module is used to evaluate the temperature prediction model, and when the evaluation is passed, the temperature of the lithium battery is predicted by the prediction model.
[0025] Preferably, the preprocessing module comprises:
[0026] Data acquisition unit, used to collect historical operation data of lithium batteries;
[0027] A monitoring unit, used to detect missing values and abnormal values in the historical operation data of the lithium battery;
[0028] An exception processing unit, used to supplement the missing values by a linear interpolation method and to smooth the abnormal values by a moving average method;
[0029] The standardization processing unit is used to perform standardization processing on the historical operation data after smoothing processing to obtain pre-processed data.
[0030] Preferably, the model building module comprises:
[0031] Preliminary building blocks for building long and short-term neural network models;
[0032] An optimization unit, used for optimizing the long-short time neural network model by a gradient descent method to obtain an optimized model;
[0033] The training unit is used to input the key features of the preprocessed data into the optimization model for training to obtain a temperature prediction model.
[0034] Preferably, the temperature prediction module comprises:
[0035] An evaluation unit, used to evaluate the generalization ability and model performance of the temperature prediction model;
[0036] The application unit is used to predict the temperature of the lithium battery by using the evaluated temperature prediction model.
[0037] Preferably, the evaluation unit comprises:
[0038] The performance evaluation unit is used to evaluate the tuned model using the cross-validation method and obtain the performance indicators of the model by calculating the accuracy, precision, recall and F1 value of the model;
[0039] The generalization ability evaluation unit is used to divide the preprocessed data into a training set and a test set during training, use the training set to train the model, and use the test set to evaluate the generalization ability of the model.
[0040] The present invention also proposes a computer device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0041] Compared with the prior art, the present invention has the following advantages and technical effects:
[0042] Aiming at the problem of battery temperature prediction, the present invention collects a large amount of data such as battery historical temperature, charge and discharge status, ambient temperature, current size, etc., and performs data cleaning and standardization processing to remove outliers and noise to ensure data quality. On this basis, key features such as battery charge and discharge status, historical temperature trend, and current change rate are extracted. The time series data processing capability of the long short-term memory network is utilized to learn the complex pattern of battery temperature changes and establish a battery temperature prediction model. The model is trained and tuned by the cross-validation method to ensure prediction accuracy and generalization ability. Finally, the trained model is deployed in the battery management system to realize real-time prediction and monitoring of battery temperature, thereby performing thermal management in advance, ensuring battery safety and extending battery life. The present invention effectively solves the problem of battery temperature prediction, realizes accurate prediction and real-time monitoring of battery temperature, and improves the safety and efficiency of the battery management system. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0044] Figure 1 The figure is a flow chart of a method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0045] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0046] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0047] Embodiment 1
[0048] like Figure 1 As shown, this embodiment provides a lithium battery temperature prediction method based on deep learning, comprising the following steps:
[0049] Collect historical operation data of lithium batteries and perform preprocessing to obtain preprocessing data;
[0050] Extract the key features of the preprocessed data, train the long short-term memory network model through the key features, and obtain the temperature prediction model;
[0051] The temperature prediction model is evaluated, and when the evaluation is passed, the temperature of the lithium battery is predicted through the prediction model.
[0052] Furthermore, the historical operation data of lithium batteries is collected. For example, the battery temperature, ambient temperature, current size, and charge and discharge status can be recorded every one minute. Assume that in the initial stage of charging, the battery temperature is 25 degrees Celsius, the ambient temperature is 20 degrees Celsius, and the current is 2 amps; in the middle stage of charging, the battery temperature rises to 30 degrees Celsius, the ambient temperature is 22 degrees Celsius, and the current is 1.5 amps; in the final stage of charging, the battery temperature reaches 35 degrees Celsius, the ambient temperature is 24 degrees Celsius, and the current is 0.5 amps. In the discharge stage, similar data can be recorded for subsequent analysis of the battery temperature change law at different stages. Preprocess the acquired historical data. Assume that at a certain point in time, the battery temperature data is missing. The mean interpolation method can be used to fill the missing value with the average value of the adjacent temperature data before and after the time point. For example, if the temperature data at 10:00 is missing, and the temperature at 9:59 is 28 degrees Celsius, and the temperature at 10:01 is 29 degrees Celsius, then the temperature at 10:00 can be filled with (28+29) / 2=28.5 degrees Celsius. If the battery temperature at a certain point in time suddenly rises to 100 degrees Celsius, this is obviously an outlier. The Laida criterion can be used for processing, for example, to replace the outlier with the average of the temperature data a few minutes before and after the time point. After data cleaning, standardization is required. For example, subtract the average temperature from all temperature data and divide it by the standard deviation of the temperature so that the mean of the processed temperature data is 0 and the standard deviation is 1. This can avoid the influence of different feature dimensions and improve the accuracy of the model.
[0053] Furthermore, preprocessing the lithium battery historical operation data includes:
[0054] Detect missing values and outliers in lithium battery historical operation data;
[0055] Linear interpolation was used to supplement missing values, and moving average was used to smooth outliers;
[0056] The smoothed historical operating data is standardized to obtain preprocessed data.
[0057] The specific steps include:
[0058] Step 1: Data cleaning. Check whether there are missing values in the original temperature data set. If there are missing values, use linear interpolation to supplement them. Step 2: Outlier detection. Use the Laida criterion to detect outliers. Calculate the absolute median difference of each temperature data to determine whether the temperature data exceeds the preset threshold. If it exceeds the preset threshold, it is marked as an outlier. Step 3: Outlier processing. For the marked outliers, use the moving average method to smooth the marked outliers to obtain the smoothed temperature data set. Step 4: Data standardization. Use the Z-score standardization method to standardize the smoothed temperature data set and convert the data into a distribution with a mean of 0 and a standard deviation of 1. The formula is as follows: z = (x-μ) / σ, where z is the standardized value, x is the original temperature data, μ is the mean value of the temperature data set, and σ is the standard deviation of the temperature data set to obtain the standardized temperature data set.
[0059] The following steps may also be included:
[0060] Step 5: Noise removal. The wavelet transform method is used to remove noise from the standardized temperature data set. Through wavelet decomposition and reconstruction, high-frequency noise components are filtered out to obtain the denoised temperature data set. Step 6: Data consistency test. The denoised temperature data set is tested for consistency. The coefficient of variation of the data is calculated to determine the data fluctuation. If the coefficient of variation is less than the preset threshold, the data consistency is judged to meet the requirements and the final processed temperature data set is obtained.
[0061] For example, in the data cleaning stage, if the data at several time points are missing in the read data, linear interpolation can be used to supplement these missing values. Specifically, if the data at 12 noon and 2 pm are normal, but the data at 1 o'clock is missing, the temperature at 1 o'clock can be estimated by the temperature values at 12 and 2 o'clock. In outlier detection, the Laida criterion is a commonly used method. For example, if most of the data is concentrated between 25℃ and 30℃, and a data point suddenly jumps to 50℃, this data point may be an outlier. By calculating the absolute median difference, it can be determined whether this data point really deviates from the normal state. For the marked outliers, the moving average method can be used for smoothing. Assuming that a continuous temperature record is 28℃, 29℃, 50℃, 30℃, and 31℃, the outlier value of 50℃ is replaced by the average value of the temperature before and after it (that is, the average value of 29℃ and 30℃, 29.5℃), so as to smooth this data point. Data standardization is to eliminate the influence of units and dimensions and improve the comparability between different data. Through the Z-score method, each data point is subtracted from the mean and divided by the standard deviation, so that the processed data set has a mean of 0 and a standard deviation of 1. For example, if the mean of the original data is 30°C and the standard deviation is 5°C, then a data point with an original temperature of 35°C has a standardized value of (35-30) / 5=1. In the noise removal stage, wavelet transform is an effective tool that can decompose data into components of different frequencies and remove those unwanted high-frequency noises. For example, temperature data may have high-frequency jumps due to a short-term failure of the sensor. Through wavelet transform, these high-frequency components can be filtered out and a smoother temperature trend can be retained. Finally, in the data consistency check stage, the coefficient of variation is an indicator of data volatility. If the calculated coefficient of variation is lower than the preset threshold, it means that the data fluctuation is within an acceptable range, thereby confirming the consistency of the data. After this series of processing, the resulting temperature data set will be more suitable for further analysis and model building.
[0062] Further, obtaining the temperature prediction model includes:
[0063] Construct long and short time neural network models;
[0064] The long and short time neural network models are optimized by gradient descent method to obtain the optimized model;
[0065] The key features of the preprocessed data are input into the optimization model for training to obtain the temperature prediction model.
[0066] Below are the steps to optimize the LSTM model using gradient descent:
[0067] Initialize model parameters:
[0068] Before starting training, you need to initialize the parameters of the LSTM model, including the weights and biases of each layer. These parameters can be initialized randomly, but avoid excessively large values to prevent numerical instability during training.
[0069] Forward propagation:
[0070] At each time step, the LSTM model receives input data and the hidden state of the previous time step, and calculates the hidden state and output of the current time step through a series of gating mechanisms (forget gate, input gate, output gate) and cell state updates.
[0071] Calculate the loss:
[0072] Use a loss function (such as mean squared error) to measure the difference between the model's predicted output and the true value. The choice of loss function depends on the specific task. For example, mean squared error is commonly used for regression tasks, and cross entropy loss may be used for classification tasks.
[0073] Backward Propagation:
[0074] The gradient of the loss function with respect to the model parameters is calculated through the back-propagation algorithm. For LSTM, this involves calculating the gradient at each time step and taking into account the dependencies of the time series data, which is usually achieved through back-propagation through time (BPTT).
[0075] Parameter update:
[0076] Use the calculated gradient and the pre-set learning rate to update the model parameters. The core idea of the gradient descent method is to adjust the parameters along the direction of the gradient so that the value of the loss function decreases.
[0077] Training loop:
[0078] The above steps are integrated into a training loop to train the model for multiple iterations. In each iteration, all or part of the training data is used to update the model parameters and the change in the loss function is monitored until the model converges or the preset number of iterations is reached.
[0079] Evaluate the model:
[0080] After training is complete, an independent test dataset is used to evaluate the performance of the model. Metrics such as loss and accuracy on the test set can provide an indication of the model's generalization ability.
[0081] Through these steps, the gradient descent method can gradually optimize the parameters of the LSTM model in order to minimize the loss function, thereby improving the accuracy of the model's prediction of battery temperature.
[0082] In this embodiment, the hyperparameters of the model can also be adjusted through grid search or Bayesian optimization methods during the key feature training optimization model process.
[0083] Through the grid search method, we traverse the learning rate, the number of trees and other hyperparameter combinations to find the best parameter settings. Bayesian optimization predicts the performance of hyperparameter combinations through probability models to reduce the number of searches.
[0084] Furthermore, the temperature prediction model is evaluated including:
[0085] The cross-validation method is used to evaluate the tuned model, and the performance indicators of the model are obtained by calculating the accuracy, precision, recall rate and F1 value of the model;
[0086] During training, the preprocessed data is divided into a training set and a test set. The training set is used to train the model, and the test set is used to evaluate the generalization ability of the model.
[0087] In this embodiment, the cross-validation method divides the data into multiple subsets, and trains and validates them in turn to ensure the stability of the model under different data distributions. Finally, the best hyperparameter combination is determined to obtain the tuned model. In the model evaluation stage, cross-validation is used to calculate the accuracy, precision, recall and F1 value of the model. Assuming that the accuracy of a battery temperature prediction model is 90%, the precision is 85%, the recall is 88%, and the F1 value is 86.5%, these indicators comprehensively reflect the performance of the model. The accuracy rate indicates the overall correct prediction ratio of the model, the precision rate and recall rate respectively reflect the prediction accuracy and coverage of the model for positive samples, and the F1 value is the harmonic average of the two, which comprehensively evaluates the performance of the model. The model generalization ability is evaluated by dividing the training set and the test set. Assume that the data set is divided into 8:2 ratios, the training set is used to train the model, and the test set evaluates the generalization ability. If the accuracy, precision and other indicators of the model on the test set are close to those of the training set, it means that the model has good generalization ability. On the contrary, if the difference in indicators is large, there may be an overfitting problem, and the model needs to be re-tuned. Model deployment and application is to put the trained model into the actual production environment. Taking the battery management system as an example, after the model is deployed, it receives sensor data in real time and predicts future temperature changes. The system performs temperature control and warning based on the prediction results to prevent battery overheating and extend the service life. The prediction results of the model also need to be interpreted in combination with business needs. For example, when the predicted temperature exceeds the safety threshold, the system automatically starts the cooling device. Model monitoring and maintenance are important links to ensure the long-term effectiveness of the model. By continuously monitoring the performance of the model in the production environment, such as regularly evaluating the prediction accuracy, and finding that the performance has declined, timely analyze the reasons, which may be due to changes in data distribution or model aging. At this time, new data needs to be collected again, model training and tuning are carried out, and the model is updated to ensure its continuous and stable operation. Through the above steps, from data preprocessing to model deployment and maintenance, a complete machine learning application process is formed to ensure that the model plays the maximum role in actual business and improve the intelligence level of the battery management system.
[0088] Embodiment 2
[0089] The present invention also proposes a lithium battery temperature prediction system based on deep learning, comprising:
[0090] A preprocessing module is used to collect and preprocess the historical operation data of the lithium battery to obtain preprocessed data;
[0091] The model building module is used to extract the key features of the preprocessed data, train the long short-term memory network model through the key features, and obtain the temperature prediction model;
[0092] The temperature prediction module is used to evaluate the temperature prediction model. When the evaluation is passed, the temperature of the lithium battery is predicted through the prediction model.
[0093] Furthermore, the preprocessing module includes:
[0094] Data acquisition unit, used to collect historical operation data of lithium batteries;
[0095] A monitoring unit, used to detect missing values and abnormal values in the historical operation data of the lithium battery;
[0096] The exception handling unit is used to supplement the missing values by linear interpolation and smooth the abnormal values by moving average method;
[0097] The standardization processing unit is used to perform standardization processing on the historical operation data after smoothing processing to obtain pre-processed data.
[0098] Furthermore, the model building module includes:
[0099] Preliminary building blocks for building long and short-term neural network models;
[0100] An optimization unit, used for optimizing the long-short time neural network model by gradient descent method to obtain an optimized model;
[0101] The training unit is used to input the key features of the preprocessed data into the optimization model for training to obtain a temperature prediction model.
[0102] Furthermore, the temperature prediction module includes:
[0103] An evaluation unit, used to evaluate the generalization ability and model performance of the temperature prediction model;
[0104] The application unit is used to predict the temperature of the lithium battery by using the evaluated temperature prediction model.
[0105] Furthermore, the evaluation unit includes:
[0106] The performance evaluation unit is used to evaluate the tuned model using the cross-validation method and obtain the performance indicators of the model by calculating the accuracy, precision, recall and F1 value of the model;
[0107] The generalization ability evaluation unit is used to divide the preprocessed data into a training set and a test set during training, use the training set to train the model, and use the test set to evaluate the generalization ability of the model.
[0108] Embodiment 3
[0109] The present invention also provides a computer device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0110] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A lithium battery temperature prediction method based on deep learning, characterized in that: The following steps are involved: Collect historical operation data of lithium batteries and perform preprocessing to obtain preprocessing data; Extracting key features of the preprocessed data, training a long short-term memory network model through the key features, and obtaining a temperature prediction model; The temperature prediction model is evaluated, and when the evaluation passes, the temperature of the lithium battery is predicted using the prediction model.
2. The method according to claim 1, characterized in that Preprocessing of lithium battery historical operation data includes: Detect missing values and outliers in lithium battery historical operation data; The missing values are supplemented by linear interpolation method, and the abnormal values are smoothed by moving average method; The smoothed historical operating data is standardized to obtain preprocessed data.
3. The method according to claim 1, characterized in that Obtaining the temperature prediction model includes: Construct long and short time neural network models; Optimizing the long-short time neural network model by gradient descent method to obtain an optimized model; The key features of the preprocessed data are input into the optimization model for training to obtain a temperature prediction model.
4. The method according to claim 1, characterized in that: Evaluating the temperature prediction model includes: The cross-validation method is used to evaluate the tuned model, and the performance indicators of the model are obtained by calculating the accuracy, precision, recall rate and F1 value of the model; During training, the preprocessed data is divided into a training set and a test set. The training set is used to train the model, and the test set is used to evaluate the generalization ability of the model.
5. A lithium battery temperature prediction system based on deep learning, characterized in that: include: A preprocessing module is used to collect and preprocess the historical operation data of the lithium battery to obtain preprocessed data; A model building module, used for extracting key features of the preprocessed data, training a long short-term memory network model through the key features, and obtaining a temperature prediction model; The temperature prediction module is used to evaluate the temperature prediction model, and when the evaluation is passed, the temperature of the lithium battery is predicted by the prediction model.
6. The system according to claim 5, characterized in that The preprocessing module comprises: Data acquisition unit, used to collect historical operation data of lithium batteries; A monitoring unit, used to detect missing values and abnormal values in the historical operation data of the lithium battery; An exception processing unit, used to supplement the missing values by a linear interpolation method and to smooth the abnormal values by a moving average method; The standardization processing unit is used to perform standardization processing on the historical operation data after smoothing processing to obtain pre-processed data.
7. The system according to claim 5, characterized in that The model building module includes: Preliminary building blocks for building long and short-term neural network models; An optimization unit, used for optimizing the long-short time neural network model by a gradient descent method to obtain an optimized model; The training unit is used to input the key features of the preprocessed data into the optimization model for training to obtain a temperature prediction model.
8. The system according to claim 5, characterized in that The temperature prediction module comprises: An evaluation unit, used to evaluate the generalization ability and model performance of the temperature prediction model; The application unit is used to predict the temperature of the lithium battery by using the evaluated temperature prediction model.
9. The system according to claim 8, characterized in that The evaluation unit comprises: The performance evaluation unit is used to evaluate the tuned model using the cross-validation method and obtain the performance indicators of the model by calculating the accuracy, precision, recall and F1 value of the model; The generalization ability evaluation unit is used to divide the preprocessed data into a training set and a test set during training, use the training set to train the model, and use the test set to evaluate the generalization ability of the model.
10. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method of claims 1-4.
Citation Information
Cited By
Lithium ion battery thermal runaway process internal temperature assessment method based on deep learning
CN120742111A