Lithium-ion battery temperature prediction based on hybrid model convlstm-narx
By combining the hybrid model ConvLSTM-NARX, which integrates CNN, LSTM, and NARX, the problems of volatility and generalization in lithium-ion battery temperature prediction are solved, achieving higher prediction accuracy and stability, and making it suitable for various environments and operating conditions.
Patent Information
- Application Number
- CN202511162391.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-08-19
AI Technical Summary
Existing lithium-ion battery temperature prediction models struggle to accurately capture trends when faced with drastic temperature fluctuations, and their prediction performance deteriorates over time, with insufficient generalization ability.
We adopt a hybrid model-based approach, ConvLSTM-NARX, which combines classic CNN and LSTM models with the delay and feedback loop mechanisms of NARX. Through data preprocessing, reconstruction, learning historical feature data and performing temperature prediction, we use wavelet thresholding for denoising and MinMaxScaler for data normalization. We also combine early stopping mechanism and dynamic learning rate adjustment for model training.
It improves the accuracy and generalization ability of lithium-ion battery temperature prediction, and can better capture complex fluctuations in battery temperature. It maintains high accuracy under different environments and operating conditions, with RMSE not exceeding 0.13 and R-squared above 98%.
Smart Images

Figure CN120671562B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application provides a lithium ion battery temperature prediction method based on a hybrid model ConvLSTM-NARX, which is based on a classic convolutional neural network (CNN) and a long short-term memory neural network (LSTM), and combines the delay mechanism and feedback loop mechanism of a nonlinear autoregressive network with external input (NARX) with external input, so that the overall performance of the model is better. BACKGROUND
[0002] In the past few decades, most of the research on battery temperature is based on numerical models, for example, a thermoelectric model can determine the heat generation and accurate internal temperature distribution of the battery. However, the physical model has its limitations in application, and in the face of various battery types, use environments and load conditions, since the physical model is not universal, the simulation method must calculate each case, which will result in a lot of work. In addition, the creation of the physical model considers many factors, and a large number of formulas need to be calculated, which increases the complexity of the prediction process and thus limits its practicality.
[0003] Secondly, the temperature of the battery will fluctuate sharply during operation, increasing the difficulty of prediction, in addition, different load conditions and environmental conditions will cause the temperature of the battery to change, so the temperature prediction of the battery has always been a technical difficulty.
[0004] In recent years, with the rise of machine learning, it has achieved widespread success in various fields. Artificial neural network (ANN) as a very important machine learning tool, with its unique advantage in solving highly nonlinear problems, has been widely used by researchers in many related fields of lithium ion batteries, such as state of charge estimation, remaining useful life prediction and battery temperature prediction, etc. This method can capture the complex nonlinear relationship between input and output parameters through a relatively simple structure and algorithm, thus producing good performance.
[0005] Currently, in the field of lithium-ion battery temperature prediction, Shan Zhu et al. proposed using a long short-term memory (LSTM) model to predict battery temperature changes, and showed that temperature changes during battery operation can be regarded as time series data, so LSTM is suitable for battery temperature prediction; Dong Wang et al. proposed a hybrid model of ConvLSTM to predict the capacity and temperature of lithium-ion batteries, and achieved good results; Jan Kleiner et al. compared the nonlinear autoregressive network (NARX) with exogenous input with the ordinary feedforward network, and proved that NARX has better accuracy, but is more suitable for simple systems.
[0006] Problem 1: During the operation of the battery, the temperature will fluctuate sharply, so it is difficult to capture its change trend in detail, and as time grows, the prediction performance of most models will decline.
[0007] Problem 2: Many machine learning models today rely heavily on data for training, so generalization is often seen as a problem. SUMMARY
[0008] Based on the fact that neural networks have important significance and development potential in the field of battery temperature prediction, this technology can learn the complex nonlinear relationship between input and output data well, complete the prediction of battery temperature, but there are problems of low accuracy and generalization. In order to solve the above problems, the present application proposes a lithium-ion battery temperature prediction method based on a hybrid model ConvLSTM-NARX, which is based on the classic CNN and LSTM model, combines the delay mechanism and feedback loop mechanism of NARX, including:
[0009] S1: data preprocessing, unified denoising and normalization of the experimental data set;
[0010] S2: using the delay mechanism and feedback loop mechanism in NARX to reconstruct the data set;
[0011] S3: input the reconstructed data into the CNN and LSTM model, learn the historical feature data and predict the next temperature data;
[0012] S4: finally train the model, and get the temperature prediction result by iterative calculation of each time step.
[0013] Further, the preprocessing operation in step S1 includes:
[0014] S1-1: use multivariate input, extract temperature, voltage and current to construct a multivariate data set, where temperature is the target variable, and voltage and current are exogenous variables;
[0015] S1-2: Use the wavelet threshold denoising method to denoise the data set, by decomposing the data in different frequency spaces, get the detailed part containing high frequency signals and the approximate part containing low frequency signals, this approximation can be further decomposed to obtain more details and approximations, and use the base function sym8 to retain more mutation details of temperature data;
[0016] S1-3: In order to better train the data, use the method of MinMaxScaler to normalize all features to the interval [0, 1].
[0017] Further, the specific content of the step S2 includes:
[0018] S2-1: Reconstruct the preprocessed data, first initialize the parameters, define the history window size as look_back=20, that is, use the data of the first 20 time steps to predict the data of the next time step, and continuously update the window through sliding, the prediction step pre_step=1 indicates single step prediction, feedback_delay=1 indicates feedback delay, that is, use the temperature at 1 time step before the current time as the feedback feature, and initialize empty lists x, y for storing features and labels respectively;
[0019] S2-2: Loop through the data set, starting from "look_back + feedback_delay" to "len(data) - pred_step". At each time point i, we extract the temperature, current and voltage data from "i-look_back" to "i", and the feedback feature is extracted from "i-look_back-feedback_delay" to "i-feedback_delay". Combine the four parts into a matrix with shape (look_back, 4), where each row corresponds to a time step, and the columns are temperature (input), current, voltage, and temperature (feedback) respectively;
[0020] S2-3: Add the combined matrix to x for subsequent input to CNN and LSTM for learning and prediction. The reconstructed data provides rich temporal features and context information for subsequent steps, enabling the model to more accurately predict battery temperature changes.
[0021] Further, the specific content of the step S3 includes:
[0022] S3-1: The CNN module includes one one-dimensional convolution layer and one Flatten layer, and each layer in the CNN is wrapped in a Time Distributed layer, which enables the CNN to better process time series data by performing convolution processing on each time step in the data, and the dimension of the output data is reduced after the Flatten layer, so that the shape of the data can better adapt to the LSTM layer;
[0023] S3-2: The LSTM module is formed by linking two LSTM layers and two Dense layers, the first layer has 128 LSTM units and returns the output of each time step, preserving the time series structure (return_sequences=True), the second layer has 128 LSTM units and only returns the output of the last time step (return_sequences=False), then the data enters the fully connected layer, the dimension is reduced from 128 to 1, and finally a prediction value is output, which is the temperature prediction value of the next time step.
[0024] Further, the specific content of step S4 includes:
[0025] S4-1: Use early stopping mechanism and dynamic learning rate adjustment to improve the convergence speed and training efficiency of the model, set patience=10 in the early stopping mechanism, i.e. if the validation loss does not improve for 10 consecutive epochs, stop training and restore the best weights to prevent model overfitting, in the dynamic learning rate adjustment, set factor=0.5, patience=5, i.e. if the validation loss does not improve for 5 consecutive epochs, multiply the learning rate by 0.5 (half), to avoid the model falling into local optimum;
[0026] S4-2: Update the temperature, voltage, current and feedback temperature through a sliding window, and repeat the above steps to input the mixed model to iteratively predict the temperature value of each time step in the data set.
[0027] Further, the specific content of step S3-1 includes:
[0028] In the CNN module, convolution calculation is performed by the following formula:
[0029]
[0030] wherein, represents the feature j of the k+1 layer, represents the number of features in the k layer, represents a convolution kernel on the feature map f from the k-th layer to the (k+1)-th layer, in this method, the size of the convolution kernel is 2x4, the shape of the input data is (20, 4), and through the convolution operation, the local time pattern of the 20 time steps, that is, the relationship between adjacent two time steps, can be extracted, the feature representation capability is enhanced, and the calculation complexity of the subsequent LSTM is reduced.
[0031] Further, the specific content of the step S3-2 includes:
[0032] The specific calculation formula of the LSTM module processing the time sequence data is as follows:
[0033]
[0034] wherein, represents the input data of the current time t, represents the output of the previous time step, , and are the calculation formulas of the input gate, the forgetting gate and the output gate respectively, represents the long-term state of the unit, and the calculation method is to perform the forgetting gate calculation on the long-term state of the previous time step, and add the current unit state through the input gate, so that the historical data can be well learned, and finally the vector generated through the activation function is output to the next unit, in this method, the LSTM module uses a two-LSTM layer linked manner to construct the module, so that the time sequence structure is not only retained, but also the time feature can be extracted, and the long-term time pattern can be learned. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the technical solutions.
[0036] Figure 1 The general architecture of the hybrid model ConvLSTM-NARX proposed in the present application, the model includes 1D-CNN, Flatten, LSTM, Dense and other key components; wherein the arrows in the blue part represent the feedback loop mechanism in the NARX model, the tapped delay line (TDL) represents the delay mechanism in the NARX model, and through the use of TDL, the output of any number of previous time steps can be stored and fed back to the input layer.
[0037] Figure 2The visualization results of the LSTM model and the ConvLSTM-NARX of the application tested on the long-term static cycle temperature data set, wherein the upper graph is the visualization result of the LSTM model, the lower graph is the visualization result of the model proposed by the application, the orange represents the true value curve, and the green represents the predicted value curve. By comparison, we can clearly observe that, compared with the LSTM, the hybrid model proposed by the application can better capture the complex fluctuations of the temperature in the battery operation process, and its accuracy does not decrease with time.
[0038] Figure 3 The visualization results of the ConvLSTM-NARX of the application tested on the 10 DEG C data in the Panasonic data set, wherein the data of different driving conditions at this temperature are tested, the blue is the true value curve, and the orange is the predicted value curve. It can be observed that the ConvLSTM-NARX can accurately capture the change of the temperature.
[0039] Figure 4 The visualization results of the ConvLSTM-NARX of the application tested on the 25 DEG C data in the Panasonic data set, wherein the data of different driving conditions at this temperature are tested, and we can also observe the accuracy of the model prediction.
[0040] Figure 5 The visualization results of the RMSE and R square in the experiment in the Panasonic data set, and we can see that under different environmental temperatures and different driving conditions, the ConvLSTM-NARX performs well, the RMSE is not more than 0.13, and the R square is more than 98%. DETAILED DESCRIPTION
[0041] The application proposes a lithium ion battery temperature prediction method based on a hybrid model ConvLSTM-NARX, and performs long-term temperature prediction experiments and dynamic driving temperature prediction experiments, and uses the hybrid model to train and test the data to verify the accuracy and generalization.
[0042] Firstly, the data is preprocessed to better adapt to the time series prediction model. In the long-term temperature prediction experiment, the average value of the temperature of each cycle is taken, so that the temperature data can be approximately regarded as time series data; in the dynamic driving temperature prediction experiment, the non-uniform data is resampled for 30 seconds to unify the frequency of the data. Then the data set is denoised, normalized and divided.
[0043] Secondly, the delay mechanism and feedback loop mechanism of the NARX are used to reconstruct the data set.
[0044] Third step, the processed data enters the CNN module, which includes a one-dimensional convolution layer and an unfolding layer. The one-dimensional convolution layer extracts patterns or features in the data through convolution operation, and then unfolds the data for input to the next module. In order to better learn the historical data to make the next prediction, the data is input to the LSTM module, which uses two LSTM layers and two fully connected layers, and finally outputs one data, which is the temperature prediction value of the next time step.
[0045] Fourth step, each sample data in the training and test data set is trained and tested using a loop iteration, and the predicted value and the true value are compared to calculate the evaluation criteria RMSE and R square, and the performance of the model is evaluated.
[0046] In summary, the present application proposes a lithium ion battery temperature prediction method based on a hybrid model ConvLSTM-NARX, and carries out in-depth comparative analysis. The innovation of the hybrid model lies in that it combines the strong feature extraction capability of CNN and the feedback loop mechanism and delay mechanism in NARX, which can better process and learn time series data.
[0047] Further, the method proposed in the present application is tested on public data sets, and the experimental results show that the hybrid model ConvLSTM-NARX performs outstandingly on multiple public data sets, has generalization, and compared with the traditional LSTM model, the method can better capture the temperature change trend and has higher precision.
[0048] Target data set: 1. Public data set, which uses lithium phosphate ion (LFP) / graphite batteries in a 30-channel Arbin LBT potentiostat in a horizontal cylindrical clamp set to 48°C forced convection temperature chamber, where the nominal capacity of these batteries is 1.1 Ah and the nominal voltage is 3.3 V. All battery charging times are fixed at 10 minutes, and a 20-second rest is placed after charging and discharging, and finally stopped cycling when reaching 80% of the nominal capacity of the battery. 2. Panasonic 18650PF lithium ion battery data set, which contains data measured at different temperatures, each temperature performs nine driving cycles, i.e. cycle1-4, US06, HWFET, UDDS, LA92, Neural Network (NN). Among them, cycle1-4 is formed by random combination of US06, HWFET, UDDS, LA92 driving cycles, and NN cycle is a combination of US06 and LA92 driving cycle parts with some additional dynamics test neural network generalization.
[0049] To sum up, the present application proposes a lithium-ion battery temperature prediction method based on a hybrid model ConvLSTM-NARX, and conducts in-depth comparative analysis on the method. The innovation of the hybrid model lies in that it combines the powerful feature extraction capability of CNN and the feedback loop mechanism and delay mechanism in NARX, which can better process and learn time series data. Experimental results show that the hybrid model ConvLSTM-NARX performs outstanding performance on multiple public datasets, and compared with the traditional LSTM model, it has a significant improvement in accuracy. In the dataset obtained under the condition of long-term static operation of the battery, compared with the LSTM model, the model can better capture the trend of battery temperature change, and the performance does not show obvious decay with the growth of time; in the battery temperature dataset under the condition of dynamic driving cycle, the model shows good performance in different working conditions and environmental temperature datasets, and the obtained R square is more than 98%. These experimental results show that the combination of LSTM, CNN and NARX can achieve higher accuracy, and provide an accurate and generalizable solution for battery temperature prediction. In addition, we also analyze the decision-making process of the model by visualizing the interpretation results, and the results show that ConvLSTM-NARX can well capture the complex temperature fluctuations in the battery operation process under different conditions.
Claims
1. A method for predicting the temperature of lithium-ion batteries based on the hybrid model ConvLSTM-NARX, characterized in that, This hybrid model uses an LSTM network as its core, employs a CNN for feature extraction, and combines the delay and recurrent feedback mechanisms of NARX to improve the overall performance of the hybrid model. Specifically, the method includes the following: S1: Data preprocessing, which involves uniformly denoising and normalizing the experimental dataset; S2: Reconstruct the dataset using the delay and feedback loop mechanisms in NARX; S2-1 first initializes the parameters, defines the history window size as look_back=20, that is, uses the data of the previous 20 time steps to predict the data of the next time step, and continuously updates the window by sliding. The prediction step size pre_step=1 indicates single-step prediction, and feedback_delay=1 indicates feedback delay, that is, uses the temperature of the previous time step as the feedback feature, and initializes empty lists x and y to store features and labels respectively. S2-2 iterates through the dataset, starting from "look_back + feedback_delay" and ending at "len(data) -pred_step". At each time point i, it extracts the temperature, current, and voltage data from "i-look_back" to "i". The feedback feature extracts the temperature data from "i-look_back-feedback_delay" to "i-feedback_delay". These four parts are combined into a matrix of shape (look_back, 4), where each row corresponds to a time step and the columns are: temperature, current, voltage, and temperature. S2-3 adds the merged matrix to x, which is then used as input to CNN and LSTM for learning and prediction. S3: Input the reconstructed data into CNN and LSTM models to learn from historical feature data and predict the next temperature data; S4: Train the model, using early stopping and dynamic learning rate adjustment to improve the model's convergence speed and training efficiency. In the early stopping mechanism, set patience=10, meaning that if the loss does not improve after 10 consecutive epochs, stop training and restore the optimal weights to prevent the model from overfitting. In the dynamic learning rate adjustment, set factor=0.5 and patience=5, meaning that if the loss does not improve after 5 consecutive epochs, multiply the learning rate by 0.5 to avoid the model getting stuck in local optima. Update temperature, voltage, current, and feedback temperature through a sliding window, and repeat the above steps to input the hybrid model to iteratively predict the temperature value of the dataset at each time step.
2. The lithium-ion battery temperature prediction method based on the hybrid model ConvLSTM-NARX according to claim 1, characterized in that, The specific operations of step S1 include: S1-1 uses multivariate input to extract temperature, voltage and current to construct a multivariate dataset, where temperature is the target variable and voltage and current are exogenous variables. S1-2 uses wavelet thresholding to denoise the dataset. By decomposing the data into different frequency spaces, it obtains a detailed part containing high-frequency signals and an approximate part containing low-frequency signals. This approximation is further decomposed to obtain more details and approximations. The basis function sym8 is used to preserve more abrupt changes in temperature data. To better train the data, S1-3 uses the MinMaxScaler method to normalize all features to the [0, 1] interval.
3. The lithium-ion battery temperature prediction method based on the hybrid model ConvLSTM-NARX according to claim 1, characterized in that, The specific operations of step S3 include: The S3-1 CNN module contains one one-dimensional convolutional layer and one Flatten layer, and wraps each layer in the CNN in a temporal distribution layer. The temporal distribution layer enables the CNN to better process temporal data, performs convolution processing on each time step in the data, and reduces the dimensionality of the output data after passing through the Flatten layer, so that the shape of the data can better adapt to the LSTM layer. The S3-2 LSTM module consists of two LSTM layers and two Dense layers linked together. The first LSTM layer has 128 units and returns the output of each time step, preserving the time series structure. The second LSTM layer has 128 units and only returns the output of the last time step. The data then enters the fully connected layer, reducing the dimension from 128 to 1. Finally, a predicted value is output, which is the temperature prediction value for the next time step.
4. The lithium-ion battery temperature prediction method based on the hybrid model ConvLSTM-NARX according to claim 3, characterized in that, In the CNN module of step S3-1, the specific calculation formula for feature extraction by the convolution kernel is as follows: ; in, , Let j represent the features of the (k+1)th layer and the kth layer. This represents the activation function. This represents the bias term of feature j at the k-th layer. This represents the feature number in the k-th layer. The convolution kernel represents the feature map f from layer k to layer (k+1). In this method, the size of the convolution kernel is 2×4, and the shape of the input data is (20, 4). Through convolution operation, the local time pattern of these 20 time steps can be extracted, that is, the relationship between two adjacent time steps, which enhances the feature representation capability and reduces the computational complexity of subsequent LSTM.
5. The lithium-ion battery temperature prediction method based on the hybrid model ConvLSTM-NARX according to claim 3, characterized in that, In step S3-2, the specific calculation formula for the LSTM module to process time series data is as follows: ; ; ; ; ; ; in, The input data represents the current time t. This indicates the output of the previous time step. This represents the sgmoid activation function. , and The calculation formulas are for the input gate, forget gate, and output gate, respectively. , , and This represents the corresponding bias value. , This represents the corresponding weight matrix. This represents the cell state at the current time t. This represents the long-term state of a cell. It is calculated by performing a forget gate on the long-term state from the previous time step and adding the current cell state obtained through the input gate. Finally A vector is generated by an activation function, and the output value is output through an output gate. The data is then fed into the next unit. In this method, the LSTM module is constructed by linking two LSTM layers. This not only preserves the time series structure but also extracts time features and learns long-term time patterns.
Citation Information
Patent Citations
Lithium ion battery remaining service life prediction method based on deep learning fusion model
CN120064993A
Lithium ion battery state-of-charge estimation method and system based on improved NARX neural network
CN120370177A