Lithium battery SOC estimation method based on transformation coding LSTM
By combining the hybrid neural network architecture of Transformer Encoder and LSTM, the Loess smoothing algorithm and sliding window technology are used to preprocess the historical voltage and current sequence data of lithium-ion batteries, which solves the problem of low prediction accuracy in complex operating environments, and achieves higher SOC prediction accuracy and stability.
Patent Information
- Application Number
- CN202510323488.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing lithium-ion battery SOC estimation method has low prediction accuracy in complex working conditions, and a single machine learning algorithm has data leakage problems when preprocessing sequence data.
The lithium battery SOC estimation method based on transformer encoded LSTM is adopted. Through a hybrid neural network architecture combined with Transformer Encoder and LSTM, combined with Loess smoothing algorithm and sliding window technology, the historical voltage and current sequence data are preprocessed and feature extracted, thereby enhancing the model's time-dependent capture ability.
It improves the accuracy and stability of SOC prediction of lithium-ion batteries, enhances the robustness and adaptability of the model, and can perform more stably and reliably under complex operating conditions.
Smart Images

Figure CN119846482A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lithium batteries, and in particular to a lithium battery SOC estimation method based on variable voltage coding LSTM. Background Art
[0002] At present, the SOC estimation methods of lithium-ion batteries are mainly divided into three categories: experimental-based SOC estimation methods, model-based methods, and machine learning-based methods. The experimental-based estimation method mainly relies on the current, voltage and other parameters obtained by experimental measurement. The SOC estimation is achieved by using the ampere-hour integration method, open circuit voltage method and internal resistance estimation method. Such methods are simple to implement, but the prediction accuracy is not high because they do not consider the internal electrochemical reactions during the battery charging and discharging process. The model-based method is mainly based on the equivalent circuit model of the battery, and uses the Kalman filter algorithm and its related extension algorithms, particle filter algorithm, sliding film observer and other methods to estimate the SOC. However, it is difficult to establish an accurate mathematical model in a complex working environment and the calculation is difficult. The machine learning-based method is currently a hot field. The machine learning algorithm can establish a nonlinear relationship between the data and the SOC of the lithium-ion battery by learning a large amount of battery-related feature data without establishing a corresponding battery equivalent model. Therefore, the regression model constructed by the machine learning method can infinitely approach the true value, which is very suitable for the SOC estimation of lithium-ion batteries. For example, back propagation neural network (BP), support vector machine (SVM), convolutional neural network (CNN) and long short-term memory neural network (LSTM). Due to the diversity and high precision of machine learning methods, the integration of multiple machine learning algorithms for SOC estimation has attracted widespread attention from researchers. By combining the advantages of different machine learning algorithms, it not only makes up for the limitations of a single algorithm, but also significantly improves the accuracy of estimation, while enhancing the robustness and adaptability of the algorithm, making it more stable and reliable under complex working conditions.
[0003] The fusion of multiple machine learning algorithms provides an efficient and feasible solution for battery SOC estimation, laying the foundation for the further development of BMS. However, in a large number of studies and literatures, when using machine learning methods to predict the SOC of lithium-ion batteries, the input data of the network structure are all sequence data. In the data preprocessing stage, most of them adopt a sequence-to-sequence approach, that is, a multi-feature input time series is used to estimate the SOC value of the same period. In this type of sequence-to-sequence time series prediction task, some network structures will not perform data masking operations, which will cause the data in the future moments of the input sequence to affect the current output. Therefore, the present invention proposes a lithium battery SOC estimation method based on transformer-coded LSTM. Summary of the invention
[0004] The purpose of the present invention is to provide a lithium battery SOC estimation method based on variable voltage coded LSTM, which improves the SOC estimation of lithium-ion batteries by enhancing historical information data and combining a high-precision neural network model.
[0005] To achieve the above object, the present invention provides the following solutions:
[0006] A lithium battery SOC estimation method based on variable voltage coded LSTM, comprising:
[0007] Obtain voltage and current sequence data of the target lithium battery;
[0008] The voltage and current sequence data are input into a preset SOC estimation model, and the SOC estimation result of the target lithium battery is output, wherein the SOC estimation model is trained based on a training set and integrated using a 5-fold cross-validation, the training set includes historical voltage and current sequence data of several lithium batteries, and the SOC estimation model is constructed using a Transformer network combined with an LSTM network.
[0009] Optionally, before training the SOC estimation model based on the training set, the step further includes preprocessing the training set, and the preprocessing includes:
[0010] The historical voltage and current sequence data are processed by setting a sliding window to obtain short sequence data;
[0011] Normalizing the short sequence data, and smoothing the normalized short sequence data using a Loess smoothing algorithm to obtain short sequence smoothed data;
[0012] The short sequence smoothed data is combined with the lithium battery voltage and current sequence data to obtain final training data.
[0013] Optionally, when sliding through the sliding window, the first data of the historical voltage and current sequence data is used as the last data of the first sliding window, and during the sliding process, when there is not enough historical data, a 1-filling operation is adopted.
[0014] Optionally, the SOC estimation model includes: a Transformer Encoder module, an LSTM module and a fully connected layer, wherein the Transformer Encoder module is used to extract global information from the input sequence data to obtain global features; the LSTM module is used to perform dynamic information processing on the global features to obtain enhanced global features; the fully connected layer is used to integrate the global features and the enhanced global features, and perform regression prediction based on the integrated features to output the SOC estimation results.
[0015] Optionally, training is performed based on a training set, and integration is performed using a 5-fold cross-validation to obtain the SOC estimation model, including:
[0016] Dividing the training set into 5 training subsets;
[0017] Based on the training subset, the SOC estimation model is trained using a 5-fold cross-validation to obtain 5 weak learners;
[0018] Calculating a mean square error of the weak learner, and calculating a weight of each weak learner based on the mean square error;
[0019] Combine the weights with the corresponding weak learners to obtain the final SOC estimation model.
[0020] Optionally, combining the weights with corresponding weak learners to obtain a final SOC estimation model includes:
[0021] The weight is multiplied by the output result of the corresponding weak learner to obtain a final SOC estimation result, that is, an output result of the final SOC estimation model.
[0022] Optionally, the weight is multiplied by the output result of the corresponding weak learner to obtain the final SOC estimation result:
[0023] ;
[0024] in, is the final SOC estimation result, For the The normalized weight vector of weak learners, For the The SOC estimation result output by the weak learner is: is the number of weak learners.
[0025] The beneficial effects of the present invention are:
[0026] The present invention segments time series data by adopting a fixed-length sliding window and combines the Loess smoothing algorithm to improve the feature expression of historical information, thereby enhancing the model's ability to capture time dependency. Furthermore, a hybrid neural network architecture combining Transformer Encoder and LSTM is designed and trained, which can effectively improve the accuracy and stability of SOC prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 A flow chart of a method for constructing an SOC estimation model according to an embodiment of the present invention;
[0029] Figure 2 Schematic diagram of the LSTM neuron structure and workflow of an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0032] This embodiment provides a lithium battery SOC estimation method based on variable voltage coded LSTM, including:
[0033] Obtain voltage and current sequence data of the target lithium battery;
[0034] The voltage and current sequence data are input into a preset SOC estimation model, and the SOC estimation result of the target lithium battery is output, wherein the SOC estimation model is trained based on a training set and integrated using a 5-fold cross-validation, the training set includes historical voltage and current sequence data of several lithium batteries, and the SOC estimation model is constructed using a Transformer network combined with an LSTM network.
[0035] Specifically, this embodiment uses a fixed-length sliding window to segment the time series data, and combines the Loess smoothing algorithm to improve the feature expression of historical information, thereby enhancing the model's ability to capture time dependence. Then, a hybrid neural network architecture that combines Transformer Encoder with LSTM is designed and trained, which can effectively improve the accuracy and stability of SOC prediction.
[0036] Furthermore, before training the SOC estimation model based on the training set, the training set is also preprocessed, and the preprocessing includes:
[0037] The historical voltage and current sequence data are processed by setting a sliding window to obtain short sequence data;
[0038] Normalizing the short sequence data, and smoothing the normalized short sequence data using a Loess smoothing algorithm to obtain short sequence smoothed data;
[0039] The short sequence smoothed data is combined with the lithium battery voltage and current sequence data to obtain final training data.
[0040] When sliding through the sliding window, the first data of the historical voltage and current sequence data is used as the last data of the first sliding window, and during the sliding process, when there is not enough historical data, a 1-filling operation is adopted.
[0041] Specifically, this embodiment first constructs a sliding window for obtaining a short input sequence, and the first data of the current and voltage long sequence is the last data of the first sliding window. The window size is set to 100 and the step size is 1. After the sliding starts, when there is not enough historical data, the 1-filling operation will be used. Through the sliding window method, the model can obtain longer historical information, effectively avoid the risk of data leakage, and enhance the model's understanding and use of historical information. The 1-filling operation ensures that predictions can still be made when there is insufficient data.
[0042] After the short sequence data is formed, it will be normalized as shown in formula (1). Within the range, the influence of singular samples on the training of hybrid neural networks is eliminated.
[0043] (1);
[0044] in, is the output value after mapping, Enter the value for the map, is the minimum value of the input value in the original range, is the maximum value of the input value in the original range, is the minimum value of the target range, is the maximum value of the target range.
[0045] After normalization, in order to eliminate noise and extract the main trend of the data, this embodiment uses the Loess smoothing algorithm to smooth the short sequence data. The Loess curve smoothing algorithm is a non-parametric method for local regression analysis. By fitting a local regression model, it smoothes the fluctuations and noise in the data, making the model more robust and easy to capture the main trend of the data.
[0046] First, select the proportion of data points covered by each small interval fitting , and then calculate the weights, as shown in formula (2):
[0047] (2);
[0048] in, is the weight function, is the current fitting point, is the neighboring data point of the current fitting point, and the bandwidth is , if the distance between the current fitting point and the adjacent data point exceeds the bandwidth , the weight is 0.
[0049] The quadratic term model is obtained by using the weighted least squares method, as shown in formula (3):
[0050] (3);
[0051] here are the parameters of the local quadratic model, For neighboring data points The observed value at .
[0052] The weighted sum of squared errors of the quadratic model is minimized, as shown in formula (4):
[0053] (4);
[0054] here According to the current fitting point The reliability of the , that is, the weight set by formula (2).
[0055] Solving the parameters using normal equations of weighted least squares , as shown in formula (5);
[0056] (5);
[0057] Available at Smoothing value at , as shown in formula (6):
[0058] (6).
[0059] After obtaining the short sequence smoothed data after Loess curve smoothing, it will be merged with the original data to obtain the final network training input. This series of operations constitutes the process of historical information enhancement. The processed data retains the trend information and local changes in the time series and enhances the robustness to short-term fluctuations and noise.
[0060] Furthermore, the SOC estimation model includes: a Transformer Encoder module, an LSTM module and a fully connected layer, wherein the Transformer Encoder module is used to extract global information from the input sequence data to obtain global features; the LSTM module is used to perform dynamic information processing on the global features to obtain enhanced global features; the fully connected layer is used to integrate the global features and the enhanced global features, and perform regression prediction based on the integrated features to output the SOC estimation results.
[0061] The Transformer Encoder module includes an input layer, a multi-head attention mechanism, a first summation and normalization layer, a feedforward network, and a second summation and normalization layer connected in sequence. The LSTM module includes a memory unit, an input gate, a forget gate, and an output gate connected in sequence.
[0062] Transformer is an architecture based on the self-attention mechanism. It was originally used for natural language processing tasks (such as machine translation), but it also shows strong capabilities in dealing with time series problems. Its advantage is mainly reflected in the ability to process the entire input sequence at the same time, not relying on the step-by-step processing of the sequence, so it can better capture long-term dependencies. Transformer can be divided into two parts: Encoder and Decoder. Encoder is responsible for encoding the input sequence and capturing the global information in the input data. Decoder is responsible for generating the output sequence, combining the encoded information and part of the generated output to generate the complete sequence. In the standard Transformer, the Decoder part is more used for generative tasks (such as text generation, translation, etc.), and usually cooperates with the Encoder. For regression tasks, the predicted target value is a continuous value rather than a sequence, and the use of the Decoder is not necessary. Therefore, this embodiment will only use the Transformer Encoder part. LSTM is a special recurrent neural network (RNN) designed specifically to overcome the long-term dependency problem of traditional RNN. LSTM can effectively capture short-term dynamic changes in time series through its memory unit and gating mechanism, and is particularly suitable for time series data with complex nonlinear relationships.
[0063] like Figure 1, this embodiment integrates the Transformer Encoder and LSTM networks, making full use of the advantages of both to process sequence data and prediction tasks. In the Transformer Encoder-LSTM neural network, the Transformer Encoder acts as a global information extractor and the LSTM acts as a dynamic information processor. The time series data is first input into the Transformer Encoder module, which uses its powerful global dependency capture capability to extract the global feature representation of the input sequence. Through the self-attention mechanism, the Transformer Encoder can fully exploit the correlation in the sequence, especially when long sequences are input. The global features extracted by the Transformer Encoder are then passed to the LSTM module, which further processes these features and pays attention to the short-term dynamic changes of the time series. LSTM performs well in processing local information between time steps, so it can effectively enhance the global information provided by the Transformer Encoder. Finally, the features extracted by the Transformer Encoder and LSTM modules are integrated through a fully connected layer to produce the prediction output of the regression task.
[0064] In the Transformer, since there are no recursive layers and convolutional layers in the recurrent neural network, the order information of the input sequence cannot be obtained by using only the self-attention mechanism. Therefore, the Transformer neural network uses a method combining sine and cosine functions to determine the position information of the input sequence. The calculation method is shown in formula (7):
[0065] (7);
[0066] in, is the position of the current sequence, For the dimension, is the dimension of the input features.
[0067] The core of the Transformer neural network is the multi-head attention mechanism, which performs operations in parallel through multiple attention mechanisms and then uses linear transformation to splice the operation results. The multi-head attention mechanism can effectively extract the dependency features between data, capture the correlation between data and establish a context prediction model.
[0068] Input sequence data into the multi-head attention mechanism , where n is the sequence length, d is the dimension of each input vector, and the input data undergoes three different linear transformations to generate query, key, and value matrices, as shown in formula (8):
[0069] (8);
[0070] in, is a trainable weight matrix.
[0071] Then the self-attention mechanism is calculated, and the relationship between each input element and other elements is calculated through the input Q, K and V, and the input sequence is reweighted according to these relationships, as shown in formula (9):
[0072] (9);
[0073] in, is the matrix dimension.
[0074] Formula (10) shows the calculation process of a single attention head. Each head uses different weights to project the input sequence and calculates attention in different subspaces, thereby capturing feature information of more dimensions. After a single attention head is calculated, the multi-attention mechanism is calculated by formula (11). The multi-attention mechanism combines the attention outputs of multiple heads. Each head can focus on different features and dependencies in the input sequence, and finally splice them into a richer representation.
[0075] (10);
[0076] (11);
[0077] in, is the learnable parameter matrix.
[0078] In the Transformer model, the Encoder part also includes a feedforward network, summation, and normalization. The feedforward network calculation is shown in formula (12), and the summation and normalization are shown in formula (13).
[0079] (12);
[0080] (13);
[0081] in, For input, are the parameters obtained after training, The result after module processing.
[0082] LSTM is an efficient RNN network for processing sequence data. It aims to solve the gradient vanishing or gradient exploding problems faced by standard recurrent neural networks when processing long sequences. LSTM is mainly composed of memory cells, input gates, forget gates, and output gates. The LSTM neuron structure and workflow are as follows: Figure 2As shown, the LSTM neural network formula is as follows:
[0083] Memory Unit It is the core of LSTM and mainly maintains long-term state. is the input memory for the next time step, is the hidden state of the next time step, is the weight matrix input to the candidate cell state, is the weight matrix from hidden state to candidate cell state, as shown in formula (14):
[0084] (14).
[0085] Input Gate Decide what new information will be stored in the cell state, as shown in formula (15):
[0086] (15).
[0087] Forget Gate The role of is to decide which information should be forgotten or discarded from the cell state, as shown in formula (16):
[0088] (16).
[0089] Output Gate Determines the next hidden state, that is, the output of the next time step and which parts of the current cell state, as shown in formula (17):
[0090] (17).
[0091] in, represents the weight parameter, represents the bias parameter, is the hidden state of the previous time step, for Activation function, is the Hadamard product (element-wise product) operator.
[0092] Finally, the Transformer Encoder-LSTM hybrid neural network is passed through a fully connected layer for regression prediction.
[0093] Furthermore, training is performed based on the training set, and integration is performed using a 5-fold cross-validation to obtain the SOC estimation model, including:
[0094] Dividing the training set into 5 training subsets;
[0095] Based on the training subset, the SOC estimation model is trained using a 5-fold cross-validation to obtain 5 weak learners;
[0096] Calculating a mean square error of the weak learner, and calculating a weight of each weak learner based on the mean square error;
[0097] Combine the weights with the corresponding weak learners to obtain the final SOC estimation model.
[0098] Wherein, combining the weights with the corresponding weak learners to obtain the final SOC estimation model includes:
[0099] The weight is multiplied by the output result of the corresponding weak learner to obtain a final SOC estimation result, that is, an output result of the final SOC estimation model.
[0100] Specifically, this embodiment uses a 5-fold cross-validation in training and records the mean square error of the five weak learners. The weight of each weak learner is calculated using the mean square error, as shown in formula (18):
[0101] (18);
[0102] in, is the weight vector, Representative The mean square error obtained by the weak learners in cross validation is is the number of weak learners.
[0103] In order to ensure that the sum of the weights is 1, the weight vector is normalized so that the weights are adjusted to a probability distribution and the sum of all weights is 1. As shown in formula (19):
[0104] (19);
[0105] in, is the normalized weight vector, For the The original weights of the weak learners, represents the number of weak learners, which is 5 in this embodiment. is the sum of the original weights of all weak learners, is the normalized sum of weights.
[0106] Multiplying the corresponding weights with the results of multiple weak learners gives the final lithium-ion battery SOC output, as shown in formula (20):
[0107] (20);
[0108] in, is the final SOC estimation result, For the The normalized weight vector of weak learners, For the The SOC estimation result output by the weak learner is: is the number of weak learners.
[0109] This embodiment adopts a neural network model hybrid and integration strategy, uses Transformer Encoder to fully explore the correlation in the input sequence, uses LSTM to focus on the short-term dynamic changes of the time series, and improves the modeling ability of complex sequence data. Introduces 5-fold cross-validation to build multiple networks, adopts ensemble learning ideas, regards multiple networks as weak learners, and performs weighted adjustment calculations on multiple prediction results to obtain the final lithium-ion battery SOC estimation value, which further improves the robustness and generalization ability of the model.
[0110] Experimental verification:
[0111] (1) Experimental platform:
[0112] A lithium-ion battery operating condition test platform was built to verify the effectiveness of the proposed algorithm. The core equipment of the platform is a lithium-ion battery power cell tester (NEWARE-CT-4016), whose constant voltage control range is 0.025V to 5V, and the current output range of each channel is 0.5A to 100A. The constant temperature control device (DGBELL-BTT–331C) is used to provide a stable ambient temperature to ensure that the lithium-ion battery remains within the set temperature range during the charge and discharge test. Both devices are connected to the control computer, and the TCP / IP protocol is used for parameter setting, data monitoring and experimental data recording to ensure the smooth testing of lithium-ion batteries under specific working conditions.
[0113] (2) Experimental test conditions:
[0114] The experimental test selected a 3.7V / 75Ah lithium-ion battery as the working condition test object. Its parameters are shown in Table 1. The Beijing Bus Dynamic Test Condition (BBDST) and Dynamic Stress Test (DST) conditions were tested. The Beijing Bus Dynamic Test Condition (BBDST) is a condition test specially designed to simulate the operation of urban buses. This condition is mainly used to evaluate the working conditions and performance of electric vehicles and their power batteries that may be encountered in actual urban operations. The dynamic stress test (DST) is a general battery test condition designed to evaluate the performance of batteries under varying load conditions.
[0115] Table 1
[0116]
[0117] (3) Performance analysis:
[0118] On the constructed experimental platform, the 3.7V / 75Ah lithium-ion battery was tested under BBDST and DST conditions at multiple temperatures. The experiment obtained the voltage and current data of the battery and formed a data set. In the algorithm verification analysis, the algorithm used the holdout method to divide the data set, where 70% of the data samples were used as training data and 30% of the data were used as test data. The SOC estimation model proposed in this embodiment was experimentally compared with the common baseline model at -5°C, 10°C, 25°C, and 35°C temperatures and under BBDST and DST conditions to verify the effectiveness and robustness of the algorithm. The results show that this model can effectively predict SOC. Compared with common CNN and LSTM neural networks, this model has a better prediction trend and lower output fluctuations, and has better performance. In order to quantitatively evaluate the performance of this model under BBDST conditions, MAE, MSE, RMSE, and R 2 The prediction effects of the two models were analyzed using four evaluation criteria. It can be seen that at different temperatures, the model has better performance indicators, with MAE less than 0.781%, and the difference between the model's predicted value and the actual value is small. MSE is less than 0.093%, and RMSE is less than 0.962%, which are significantly smaller than CNN and LSTM neural networks, indicating that the model performs well in fitting data and can more accurately reflect the actual situation. 2 They are all greater than 0.99858, which is greater than other baseline models, indicating that the model has a strong ability to explain the data.
[0119] The detailed performance indicators under the BBDST condition are shown in Table 2. The average MAE, average MSE, average RMSE, and average R 2 The average MAE at multiple temperatures was reduced by 1.8855%, the average MSE was reduced by 0.1075%, the average RMSE was reduced by 2.4068%, and the average R 2 Compared with the LSTM model, the average MAE, average MAPE, and average RMSE decreased by 0.6900%, 0.0279%, and 0.9230%, respectively, and the average R 2 The improvement is 0.3875%. Under the multi-temperature BBDST conditions, the performance indicators of this model are better than those of the baseline model, showing excellent high-precision performance and high robustness.
[0120] Table 2
[0121]
[0122] Similarly, the performance of this model under multi-temperature DST conditions is consistent with that under BBDST conditions, and both are better than the baseline model. At different temperatures, the MAE is less than 0.716%, the MSE is less than 0.081%, and the RMSE is less than 0.898%, which are significantly lower than the baseline model. 2 They are all greater than 0.9992, which is greater than the network models in other comparison groups, showing good robustness.
[0123] The detailed performance indicators under DST conditions are shown in Table 3. The performance of this model under multi-temperature DST conditions is excellent, with an average MAE of 0.5848%, an average MSE of 0.0056%, an average RMSE of 0.7393%, and an average R 2 Compared with the CNN neural network model, the average MAE decreased by 1.6518%, the average MSE decreased by 0.0884%, the average RMSE decreased by 2.2645%, and the average R 2 Compared with the LSTM network model, the average MAE, average MAPE, and average RMSE decreased by 1.1515%, 0.0426%, and 1.4203%, respectively. 2 An increase of 0.68%.
[0124] Table 3
[0125]
[0126] In summary, the verification results under four temperatures and two working conditions show that this model can still maintain a strong state prediction and tracking capability under variable temperatures and complex working conditions, and can effectively improve the generalization and robustness.
[0127] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A lithium battery SOC estimation method based on variable voltage coded LSTM, characterized in that: include: Obtain voltage and current sequence data of the target lithium battery; The voltage and current sequence data are input into a preset SOC estimation model, and the SOC estimation result of the target lithium battery is output, wherein the SOC estimation model is trained based on a training set and integrated using a 5-fold cross-validation, the training set includes historical voltage and current sequence data of several lithium batteries, and the SOC estimation model is constructed using a Transformer network combined with an LSTM network.
2. The lithium battery SOC estimation method based on variable voltage coded LSTM according to claim 1 is characterized in that: Before training the SOC estimation model based on the training set, the training set is also preprocessed, and the preprocessing includes: The historical voltage and current sequence data are processed by setting a sliding window to obtain short sequence data; Normalizing the short sequence data, and smoothing the normalized short sequence data using a Loess smoothing algorithm to obtain short sequence smoothed data; The short sequence smoothed data is combined with the lithium battery voltage and current sequence data to obtain final training data.
3. The lithium battery SOC estimation method based on variable voltage coded LSTM according to claim 2 is characterized in that: When sliding through the sliding window, the first data of the historical voltage and current sequence data is used as the last data of the first sliding window, and during the sliding process, when there is no preset number of historical data, a 1-filling operation is adopted.
4. The lithium battery SOC estimation method based on variable voltage coded LSTM according to claim 1 is characterized in that: The SOC estimation model includes: a Transformer Encoder module, an LSTM module and a fully connected layer, wherein the Transformer Encoder module is used to extract global information from the input sequence data to obtain global features; the LSTM module is used to perform dynamic information processing on the global features to obtain enhanced global features; the fully connected layer is used to integrate the global features and the enhanced global features, and perform regression prediction based on the integrated features to output the SOC estimation results.
5. The lithium battery SOC estimation method based on variable voltage coded LSTM according to claim 1 is characterized in that: The SOC estimation model is obtained by training based on the training set and integrating using a 5-fold cross-validation, including: Dividing the training set into 5 training subsets; Based on the training subset, the SOC estimation model is trained using a 5-fold cross-validation to obtain 5 weak learners; Calculating a mean square error of the weak learner, and calculating a weight of each weak learner based on the mean square error; Combine the weights with the corresponding weak learners to obtain the final SOC estimation model.
6. The lithium battery SOC estimation method based on variable voltage coded LSTM according to claim 5 is characterized in that: Combining the weights with the corresponding weak learners, obtaining the final SOC estimation model includes: The weight is multiplied by the output result of the corresponding weak learner to obtain a final SOC estimation result, that is, an output result of the final SOC estimation model.
7. The lithium battery SOC estimation method based on variable voltage coded LSTM according to claim 6 is characterized in that: The weight is multiplied by the output result of the corresponding weak learner to obtain the final SOC estimation result: ; in, is the final SOC estimation result, For the The normalized weight vector of weak learners, For the The SOC estimation result output by the weak learner is: is the number of weak learners.
Citation Information
Patent Citations
Lithium ion battery state-of-charge estimation method and storage medium
CN113253116A
Nickel-cadmium storage battery health state prediction method, apparatus and device, and storage medium
CN117930055A
Lithium ion battery SOC estimation method based on improved transformer
CN118858958A
Deep learning prediction method and device for voltage range of battery system
CN119337751A
Method and Apparatus for Predictive Diagnosis of a Device Battery of a Technical Device Using a Multivariate Transformer Model
US20240168095A1