Lithium battery health state prediction method and system
By training a model composed of Transformer, KAN network and traceless Kalman filter, the shortcomings of the existing lithium battery health status prediction methods in dealing with long-term dependencies, strong nonlinear features and smooth output are solved, and a higher level is achieved prediction accuracy and stability.
Patent Information
- Application Number
- CN202510037139.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2045-01-09
AI Technical Summary
The existing lithium battery health status prediction methods have shortcomings in dealing with long-term dependence, strong nonlinear features and smooth output, resulting in low prediction accuracy and stability.
A lithium battery health status prediction method is designed. By collecting historical battery operation data, a model composed of the transformer layer encoder, multi-layer KAN network as decoder, and traceless Kalman filter connection is trained. This model combines Transformer's global feature extraction capability, KAN layer's nonlinear feature extraction capability, and UKF's smoothing processing capability.
It significantly improves the accuracy and stability of lithium battery health status prediction, ensures the reliability of battery health status prediction, and can more effectively capture the nonlinear characteristics of battery operation and output stable prediction results.
Smart Images

Figure CN119438958A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lithium battery health status management, and more specifically to a lithium battery health status prediction method and system. Background Art
[0002] With the popularity of electric vehicles, drones, and portable electronic devices, the importance of lithium battery state of health (SoH) prediction has become increasingly prominent. SoH is usually defined as the ratio of the current capacity of the battery to the initial rated capacity, and is a key factor in optimizing the battery management system and extending the battery life. However, existing SoH prediction methods, such as equivalent circuit models and traditional machine learning algorithms, are insufficient in analyzing the characteristics of battery input and output signals, especially in combining advanced signal processing techniques and deep learning algorithms, which limits their prediction accuracy on complex battery data sets.
[0003] Traditional SoH prediction techniques can be divided into two categories: physical model-based methods and data-driven methods. The former relies on mathematical models to simulate the electrochemical behavior and aging process of batteries, but due to the complex nonlinear mechanisms inside the battery, these models are difficult to accurately capture all changes, and model parameters will drift with changes in working conditions, causing prediction errors. The latter, such as linear regression and support vector machines (SVM), although they can use a large amount of historical data for training, have limited prediction capabilities when faced with high-dimensional, nonlinear battery data, and are prone to underfitting or overfitting problems.
[0004] In recent years, the development of neural network technology has brought new opportunities for SoH prediction. Models such as recurrent neural network (RNN) and Transformer have been widely used in the field of SoH prediction due to their powerful feature extraction capabilities and advantages in processing sequence data. In particular, Transformer can effectively capture the long-term dependencies in the battery charge and discharge cycle. However, since the battery SoH is a smooth decline process, Transformer may produce large fluctuations in prediction results when processing such data with long-term dependencies and nonlinear characteristics, which poses a challenge to practical applications. The existing Chinese patent CN115032540A introduces a lithium-ion battery health state estimation scheme, which first establishes an equivalent impedance circuit model, and then identifies the model parameters by obtaining electrochemical impedance spectroscopy data and corresponding battery capacity information under different charge and discharge times. Finally, a support vector machine regression model is used for training to achieve accurate estimation of SoH. Another Chinese patent CN117007977A proposes a health state diagnosis process for energy storage batteries, which collects various parameters of the battery operating under extreme conditions and uses improved wavelet transform technology to extract features. After that, the data is labeled and differentiated subsets are generated, and the Euclidean distance is calculated as diagnostic evidence. Finally, the DS evidence theory is used to fuse the results of the online prediction model and offline diagnosis to complete the evaluation of the battery health status. There is also a Chinese patent CN118731717A that introduces an innovative SoH prediction method that combines the trend-aware attention mechanism and the Transformer encoder. Specifically, it first preprocesses the data set of lithium-ion batteries, then designs a special trend-aware attention module to capture the trend features in the data, and then passes these features to the Transformer encoder to further explore the deep-level features. After sufficient training, this model can provide more accurate and stable SoH prediction results to meet the needs of actual applications.
[0005] In summary, although there are a variety of SoH prediction technologies, the above existing technologies fail to fully combine the requirements of handling long-term dependencies, strong nonlinear characteristics and smooth output.
[0006] Therefore, it is necessary to design a new method to improve the accuracy and stability of SoH prediction. Summary of the invention
[0007] The purpose of the present invention is to overcome the defects of the prior art and provide a method and system for predicting the health status of a lithium battery.
[0008] To achieve the above object, the present invention adopts the following technical solution: a method for predicting the health status of a lithium battery, characterized in that it includes: Obtain lithium battery operation data; The lithium battery operation data is input into the lithium battery health state prediction model to perform health state prediction to obtain a prediction result; wherein the lithium battery health state prediction model is obtained by collecting historical battery operation data as a sample set to train a basic model, and the training process adopts forward propagation, back propagation algorithm and hyperparameter tuning. The basic model is a model composed of an encoder of a Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection; The prediction result is outputted.
[0009] The further technical solution is: the lithium battery health status prediction model is obtained by collecting historical battery operation data as a sample set to train the basic model. The training process adopts forward propagation, back propagation algorithm and hyperparameter tuning. The basic model is a model composed of the encoder of the Transformer layer as the encoder of the model, the multi-layer KAN network as the decoder, and the unscented Kalman filter connection, including: Collect historical battery operation data and pre-process it in combination with the corresponding time values to obtain a sample set; Construct a model consisting of a Transformer layer encoder, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection to obtain a basic model; The sample set is used to train the basis using forward propagation, back propagation algorithms and hyperparameter tuning to obtain a lithium battery health status prediction model.
[0010] Its further technical solution is: the model includes a Transformer layer encoder as the encoder of the model, a multi-layer KAN network as a decoder, and an unscented Kalman filter for smoothing the output, wherein the encoder includes multiple stacked encoding layers, each of the encoding layers includes a multi-head attention mechanism and a feedforward neural network, and residual connections and layer normalization are added after each encoding layer; the decoder includes multiple KAN decoding layers.
[0011] Its further technical solution is: the expression of the multi-head attention mechanism is: ; ;Q represents the predicted value of SoH, K represents the information related to Q, including voltage, current and temperature, values and contains the actual data corresponding to the key. By calculating each query and all keys, the Transformer layer assigns weights to the values and obtains the corresponding output value through weighted summation; is the dimension of each head, is the total model dimension; h is the number of heads in the multi-head attention mechanism.
[0012] Its further technical solution is: the mathematical expression of the KAN layer is: ;in, and is a learnable one-dimensional nonlinear function, and n is the dimension of the input variable.
[0013] A further technical solution is: the unscented Kalman filter layer directly predicts the state mean and covariance by propagating a set of weighted Sigma points to smooth the output of the lithium battery health state prediction model.
[0014] A further technical solution is that the training process of the lithium battery health status prediction model uses mean square error as a loss function, and the expression of the loss function is: ,in, is the actual value, is the predicted value, and N is the number of samples.
[0015] A further technical solution is that the performance evaluation index of the training process of the lithium battery health status prediction model adopts the root mean square percentage error, which is expressed as: ;in, is the actual value, is the predicted value, and N is the number of samples.
[0016] The present invention also provides a lithium battery health status prediction system, comprising: A data acquisition unit, used to acquire lithium battery operation data; A prediction unit, used for inputting the lithium battery operation data into a lithium battery health state prediction model to perform health state prediction to obtain a prediction result; wherein the lithium battery health state prediction model is obtained by collecting historical battery operation data as a sample set to train a basic model, the training process adopts forward propagation, back propagation algorithm and hyperparameter tuning, and the basic model is a model composed of an encoder of a Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection; An output unit is used to output the prediction result.
[0017] The present invention further provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above method when executing the computer program.
[0018] The beneficial effects of the present invention compared with the prior art are: the present invention collects historical operating data of lithium batteries and uses these data to train a health status prediction model to ensure that the model can accurately predict the health status of the battery. During the training process, forward propagation, backpropagation algorithms and hyperparameter tuning are used to optimize model performance. The basic structure of the model consists of a Transformer encoder, a multi-layer KAN network as a decoder and an unscented Kalman filter, which can more effectively capture the nonlinear characteristics of battery operation. The Transformer layer processes sequence data, the KAN layer extracts nonlinear key features, and the UKF enhances the stability of the model output and stabilizes the prediction results. Ultimately, through this combined method, the accuracy and stability of the SoH prediction are greatly improved, ensuring the reliability of the battery health status prediction.
[0019] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0021] Figure 1 A schematic diagram of an application scenario of a lithium battery health status prediction method provided by an embodiment of the present invention; Figure 2 Schematic diagram of the process of the lithium battery health status prediction method provided by the embodiment of the present invention Figure 1 ; Figure 3 Schematic diagram of the process of the lithium battery health status prediction method provided by the embodiment of the present invention Figure 2 ; Figure 4 A schematic block diagram of a lithium battery health status prediction system provided by an embodiment of the present invention; Figure 5 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] 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 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.
[0023] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0024] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0025] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0026] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of an application scenario of a lithium battery health status prediction method provided in an embodiment of the present invention. Figure 2 A schematic flow chart of a lithium battery state of health prediction method provided in an embodiment of the present invention. The lithium battery state of health prediction method is applied in a server. The server interacts with a terminal for data exchange. The method of this embodiment connects the encoder of the Transformer layer as the encoder of this model, the multi-layer KAN network as the decoder, and the unscented Kalman filter in sequence to improve the accuracy of SoH prediction. Among them, the Transformer can handle the long-term dependency of battery data, the KAN network relies on the learning of nonlinear activation functions, and can help process the strong nonlinearity of data. The unscented Kalman filter is used to smooth the output so that the output SoH is more in line with physical laws.
[0027] Figure 2 FIG. 1 is a flow chart of a lithium battery health status prediction method provided by an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S110 to S130.
[0028] S110, obtaining lithium battery operation data.
[0029] In this embodiment, the lithium battery operation data refers to various key parameters related to battery performance, specifically including the following: Average temperature: Calculate the average temperature of the battery in each discharge segment to monitor the thermal characteristics of the battery under different operating conditions, thereby ensuring that it operates within a safe operating temperature range and avoiding performance degradation or safety hazards caused by overheating.
[0030] Average voltage: Measures the average voltage within a discharge segment to assess the battery’s health status and capacity loss at different discharge stages.
[0031] Average current: Record the average current of the battery during the discharge process to understand its charging and discharging efficiency and power output, and provide data support for battery performance evaluation.
[0032] Charging time: Calculate the charging time of each charging segment to evaluate the battery charging efficiency and determine its degradation trend.
[0033] Discharge capacity: Extract the discharge capacity of the battery within a certain discharge voltage range as a key indicator for evaluating battery health and helping to predict its remaining service life.
[0034] State of Health: The health status of the battery is calculated based on each discharge cycle to comprehensively evaluate the overall performance of the battery and predict its remaining life and reliability.
[0035] By comprehensively collecting and processing this data, a reliable basis can be provided for subsequent analysis and processing, ensuring accurate evaluation and management of battery performance.
[0036] S120. Input the lithium battery operation data into the lithium battery health status prediction model to perform health status prediction to obtain a prediction result; wherein, the lithium battery health status prediction model is obtained by collecting historical battery operation data as a sample set to train a basic model. The training process adopts forward propagation, backpropagation algorithm and hyperparameter tuning. The basic model is a model composed of an encoder of the Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection.
[0037] In this embodiment, the prediction result refers to the prediction result of the SoH state of the lithium battery. Figure 3 shown.
[0038] for Figure 3 For example, prediction is performed using a model trained by connecting a Transformer layer encoder, a multi-layer KAN network as a decoder, and an unscented Kalman filter.
[0039] In one embodiment, the above-mentioned lithium battery health status prediction model is obtained by collecting historical battery operation data as a sample set to train a basic model. The training process adopts forward propagation, backpropagation algorithm and hyperparameter tuning. The basic model is a model composed of an encoder of a Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection, including steps S121~S123.
[0040] S121 . Collect historical battery operation data and perform preprocessing in combination with corresponding time values to obtain a sample set.
[0041] In this embodiment, the operating data of the battery is collected, including current, voltage, temperature and battery health status. For the original charging data fragment, the average temperature, voltage, current and charging time of the battery are calculated, and the discharge capacity of the battery within a certain discharge voltage range is extracted to form a data set. The data is divided into training set, test set and validation set according to different charging protocols. The data is then normalized to ensure the effectiveness of model training and evaluation so that data of all dimensions can be analyzed under a unified framework to form a sample set.
[0042] Specifically, for each charging cycle or segment, the average temperature, average voltage, average current and total charging time during the time period are calculated. For a specific discharge voltage range, the corresponding discharge capacity is measured and recorded as an important indicator for evaluating battery capacity decay. By calculating these statistics, the data dimension can be reduced while retaining the characteristics closely related to the battery health status for subsequent analysis.
[0043] According to different charging protocols or experimental settings, the data set is reasonably divided into training set, test set and validation set. Usually, the ratio between the three can be set according to the actual situation, for example, 70% of the data is used for training, 15% for validation, and the remaining 15% for final testing. Ensure that each subset has similar distribution characteristics, that is, maintain the consistency and representativeness of the data to avoid overfitting problems.
[0044] Since data from different sensors may be at different orders of magnitude, directly using the original values may cause some features to dominate the model training process, affecting the importance of other features. Use appropriate methods (such as minimum-maximum normalization, Z-score standardization, etc.) to adjust all features to the same scale range (such as [0, 1] interval), so that data of each dimension can be compared and analyzed under a unified standard. This not only improves the speed and stability of model training, but also enhances the model's generalization ability, ensuring that its performance on new data is more reliable.
[0045] After completing the above preprocessing steps, the processed features are combined into a structured sample set, where each row represents an observation point (or a charge / discharge cycle), and the columns correspond to the various extracted features and labels (such as SoH value). This sample set can be directly input into the machine learning model for training and evaluation, providing a solid foundation for accurate battery health status prediction.
[0046] Through such a systematic preprocessing process, not only can the battery operation data be effectively organized and prepared, but it can also ensure that the constructed model has good performance and reliability, thereby providing strong support for battery health management.
[0047] S122. Construct a model consisting of an encoder of a Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection to obtain a basic model.
[0048] In this embodiment, the model includes a Transformer layer encoder as the encoder of the model, a multi-layer KAN network as a decoder, and an unscented Kalman filter for smoothing the output, wherein the encoder includes multiple stacked encoding layers, each of the encoding layers includes a multi-head attention mechanism and a feedforward neural network, and residual connections and layer normalization are added after each encoding layer; the decoder includes multiple KAN decoding layers.
[0049] Specifically, the Transformer layer is used to process time series data, aiming to capture long-term dependencies in the battery sensor input data and extract global features. In order to enhance the model's ability to handle nonlinear inputs, the KAN layer is introduced as a decoder, and the learning ability of the activation function enables the model to more accurately fit the complex nonlinear features in the battery operation data. In addition, in order to smooth the output of the model and reduce the volatility of the prediction results, the UKF layer is applied to the model, so that the SoH (State of Health) prediction results are more in line with the physical characteristics of the battery and improve the stability of the model.
[0050] Specifically, the introduction of the Transformer layer is to more effectively capture the global dependencies in the battery time series data, thereby improving the accuracy of battery health prediction. The encoder part of the Transformer layer consists of multiple stacked encoding layers, each of which contains two core sublayers: a multi-head attention mechanism and a feedforward neural network sublayer. In order to ensure that information can flow smoothly and improve the stability of model training, residual connections and layer normalization are added after each sublayer. This design helps to retain the original features of the input data and can effectively alleviate the overfitting problem, thereby improving the generalization ability of the model on battery datasets.
[0051] The multi-head attention mechanism in the encoder is used to capture global features of the battery charging process. By dividing the input sequence into multiple subspaces, the model can extract the potential patterns of charging data from different perspectives in parallel, thereby more comprehensively understanding the dependencies in the time series. The combination of residual connection and layer normalization further ensures the stable transmission of information between layers, which helps to improve the performance of the model on high-dimensional complex battery data, especially when there are fewer samples, and can maintain the stability of the prediction results.
[0052] The decoder part of the Transformer layer consists of multiple stacked decoding layers. In addition to the multi-head attention and feedforward network sublayers, each decoding layer also adds an encoder-decoder attention sublayer. This sublayer uses the output of the encoder to enable the decoder to focus on key features in the input sequence when generating predictions. In the battery health prediction task, this mechanism enables the decoder to effectively capture important information about the charging process, thereby generating more accurate and consistent prediction results.
[0053] As the core component of the Transformer layer, the multi-head attention mechanism plays an important role in both the encoder and the decoder. By mapping the input sequence into multiple different representation spaces, the model can independently calculate the attention weights in each subspace, thereby digging deeper into the potential features of the time series.
[0054] Specifically, the expression of the multi-head attention mechanism is: ; ; Q represents the predicted value of SoH, K represents the information related to Q, including voltage, current and temperature, values and actual data corresponding to the key. By calculating each query and all keys, the Transformer layer assigns weights to the values and obtains the corresponding output value through weighted summation; d_k is the dimension of each head, d_model is the total model dimension; h is the number of heads in the multi-head attention mechanism.
[0055] In addition, in view of the strong nonlinear characteristics of the battery dataset, the KAN layer is introduced as a model decoder to improve the model's ability to model nonlinear relationships. In the battery health prediction task, charging data usually exhibits complex nonlinear patterns and long-term temporal dependencies, and the traditional Transformer decoder cannot effectively capture the deep features in the data. By introducing the KAN layer as a model decoder, the model's nonlinear fitting ability when processing battery data can be significantly enhanced, making the model more suitable for capturing the complex dynamic features in the battery health prediction task.
[0056] Specifically, the mathematical expression of the KAN layer is: ;in, and is a learnable one-dimensional nonlinear function, and n is the dimension of the input variable.
[0057] In theory, any multivariate continuous function can be approximated by a set of single-variable continuous functions and their linear combinations. Under this theoretical framework, the KAN layer is trained to generate appropriate spline functions to capture complex time series data relationships. This approach makes the KAN layer more efficient in processing high-dimensional and nonlinear battery charging data, and can better model the complex dependencies of battery health status, thereby improving the fitting ability.
[0058] The core of the KAN layer is to approximate the nonlinear characteristics of the input data by training an adaptive spline function. Its mathematical expression is: ,in represents the i-th learnable nonlinear activation function.
[0059] In actual implementation, the KAN layer will perform nonlinear transformation on the input features through multiple parallel spline basis functions, and adjust the coefficients of each spline basis function to enable the model to capture small changes in data in different regions. These spline basis functions include piecewise linear, polynomial spline, and B-spline. Through the training process, the model will automatically select the optimal basis function combination to minimize the prediction error.
[0060] Specifically, the KAN layer generates a set of spline basis functions according to the input data during training, and dynamically generates the optimal nonlinear function by adjusting the node positions and coefficients of these splines. This method can not only capture the global trend in battery data, but also finely characterize local nonlinear changes, making the results of battery health prediction more accurate and stable.
[0061] In this implementation, a multi-layer KAN network is introduced as a decoder, so that the Transformer encoding layer can further enhance the ability to capture complex nonlinear features based on the multi-head attention mechanism. Specifically, the multi-head attention mechanism is used to capture the global dependencies in the battery time series data, while the KAN layer performs nonlinear transformations on these attention outputs to extract deeper implicit features and output prediction results. This synergy ensures that the model can effectively capture long-term dependencies and highly nonlinear changes when processing charging data fragments, thereby improving the accuracy of battery health prediction.
[0062] In order to deal with the problem that the SoH results output by the Transformer layer may fluctuate violently, the Unscented Kalman Filter (UKF) is introduced. Although the Transformer layer has a strong feature extraction capability when processing time series data, its output results may fluctuate greatly, especially overreacting to small changes in the input data, resulting in oscillations in the SoH prediction results that do not conform to physical laws. Although these oscillations may offset each other in positive and negative errors, keeping the loss function (such as mean square error) low, this volatility does not conform to the physical property that SoH should change smoothly.
[0063] To solve this problem, UKF is introduced to smooth the output of the Transformer layer. UKF is a filtering algorithm based on nonlinear system state estimation. It can effectively deal with the uncertainty in nonlinear systems by directly propagating the mean and covariance of the state. Unlike traditional Kalman filters, UKF does not require linear approximation of nonlinear functions and can provide higher estimation accuracy and stability.
[0064] For the UKF, i.e., the unscented Kalman filter layer, it directly predicts the state mean and covariance by propagating a set of weighted Sigma points to smooth the output of the lithium battery health state prediction model.
[0065] First, the states are weighted summed according to the weight ω to predict the mean Next, calculate the covariance matrix , where Q is the process noise. First calculate the observed covariance matrix , and calculate the Kalman gain Then, the state is updated using the Kalman gain K to obtain the corrected state Finally, update the covariance matrix .
[0066] UKF and the KAN-based Transformer model complement each other to improve the accuracy and stability of battery state of health (SoH) prediction. The model composed of the Transformer encoder as the model encoder and the multi-layer KAN network as the model decoder is mainly responsible for extracting features from the battery operation data and performing nonlinear mapping to generate preliminary SoH prediction results. These prediction results may sometimes fluctuate greatly, especially when dealing with complex battery data. In order to ensure that the prediction results are smooth and conform to physical laws, UKF is used to post-process these preliminary prediction results. Specifically, UKF can effectively smooth the prediction curve of SoH and reduce the fluctuations caused by over-reaction of model predictions, thereby improving the stability and accuracy of the prediction.
[0067] S123. Using the sample set, forward propagation, back propagation algorithm and hyperparameter tuning are used to train the basis to obtain a lithium battery health status prediction model.
[0068] In this embodiment, the training process of the lithium battery health status prediction model uses mean square error as the loss function, and the expression of the loss function is: ,in, is the actual value, is the predicted value, and N is the number of samples.
[0069] The performance evaluation index of the training process of the lithium battery health status prediction model adopts the root mean square percentage error, which is expressed as: ;in, is the actual value, is the predicted value, and N is the number of samples.
[0070] During the training process, MAE (mean absolute error) and RMSPE (relative mean square percentage error) are used as evaluation indicators to measure model performance. The model combines the encoder module of Transformer and the KAN layer as a decoder, and is further processed by the unscented Kalman filter (UKF) to generate the final battery health status prediction value. Through hyperparameter tuning and training, the accuracy and stability of the prediction results are ensured, so that the subsequent battery management system can use these prediction results efficiently and intelligently.
[0071] The model is first trained using the training set data, and its performance is evaluated on the test set, recording the MAE and RMSPE indicators.
[0072] After the MAE and RMSPE meet the set requirements, the trained model is used to perform online prediction of the health status of the lithium battery.
[0073] The method of this embodiment significantly improves the accuracy and stability of lithium battery state of health (SoH) prediction by combining the encoder of Transformer, the KAN layer characterized by training nonlinear activation function as a decoder, and the unscented Kalman filter (UKF) model. This method has important application value for optimizing battery management systems and promoting the development of related technologies.
[0074] In summary, the training process of the model is as follows: the original battery operation data is integrated and preliminarily processed, the key feature values of each charging cycle are calculated, and the normalization alignment operation is performed. This step not only removes the noise in the data, but also ensures the scale consistency between different features, laying a solid foundation for the subsequent deep learning model training.
[0075] The preprocessed data is then fed into a multi-head attention module built on the Transformer encoder architecture. The module consists of multiple stacked encoders, each of which contains two main sublayers: a multi-head self-attention mechanism and a feed-forward neural network. In this way, the model is able to capture global dependencies in time series, especially when processing data with long time spans. The multi-head self-attention mechanism allows the model to analyze charging data from different perspectives in parallel, identify complex interactions between variables, and thus enhance the understanding of long-term dependencies.
[0076] In order to more accurately fit the complex nonlinear relationships in the battery operation data, we introduced a multi-layer KAN network as a decoder after using the encoder of the Transformer layer as the model encoder. The KAN network uses adaptive spline functions for nonlinear transformations, allowing the model to more deeply explore the potential patterns in the data. This design enhances the model's sensitivity to nonlinear changes, especially for subtle changes that reflect battery aging trends. Therefore, the output of the KAN layer as a model decoder can more accurately depict the intrinsic characteristics of the battery's health status.
[0077] Finally, in order to smooth the prediction results and reduce unnecessary fluctuations, we used the Unscented Kalman Filter (UKF) module to post-process the final SoH prediction value. The UKF module not only ensures the statistical optimality of the prediction results, but also ensures that these results conform to the actual physical behavior of the battery, making the SoH prediction smoother and more continuous. Through the smoothing of the UKF, we can effectively suppress the prediction oscillation caused by small changes in the model response data, further improving the consistency and reliability of the prediction.
[0078] The model combines the Transformer's ability to capture global dependencies, the KAN layer's powerful ability to fit nonlinear features, and the smoothing function provided by UKF. This method is particularly suitable for processing battery data sets with strong time dependencies and complex nonlinear characteristics, and has shown excellent performance in improving SoH prediction accuracy. The entire process includes multiple links such as data collection, preprocessing, model training, and hyperparameter tuning. All these efforts have contributed to significant improvements in the performance of the battery management system.
[0079] S130: Output the prediction result.
[0080] The prediction results are output to the terminal for display.
[0081] The method of this embodiment collects the operating data of lithium batteries during actual use, including but not limited to parameters such as voltage, current and temperature, as the basic information of the model input. A prediction model based on the Transformer architecture is constructed and trained. The special feature is that the KAN layer is used as a model decoder and combined with an unscented Kalman filter (UKF) to enhance the learning ability of nonlinear features and ensure that the prediction results conform to physical laws. The historical battery operation data is used as a training sample set, and the model parameters are iteratively optimized through forward propagation and back propagation algorithms, and hyperparameters are tuned so that the model can effectively capture the global dependencies and complex nonlinear changes in the data. The real-time lithium battery operation data is input into a fully trained prediction model to perform SoH prediction, thereby obtaining a prediction result reflecting the current health status of the battery; in this process, the KAN layer is responsible for the nonlinear characteristics in the deep modeling data, while the UKF is used to smooth the prediction output and reduce fluctuations. The final output of the optimized and smoothed SoH prediction result not only improves the accuracy of the prediction, but also ensures the continuity and stability of the prediction trend, providing reliable technical support for lithium battery management.
[0082] The above-mentioned lithium battery health state prediction method collects historical operating data of lithium batteries and uses these data to train the health state prediction model to ensure that the model can accurately predict the health state of the battery. During the training process, forward propagation, backpropagation algorithms and hyperparameter tuning are used to optimize model performance. The basic structure of the model consists of an encoder in the Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection model, which can more effectively capture the nonlinear characteristics of battery operation. The Transformer layer processes sequence data, the KAN layer extracts key features, and the UKF enhances the robustness of the model to noise and stabilizes the prediction results. Finally, through this combined method, the accuracy and stability of SoH prediction are greatly improved, ensuring the reliability of battery health state prediction.
[0083] Figure 4 FIG. 3 is a schematic block diagram of a lithium battery health status prediction system 300 provided in an embodiment of the present invention. Figure 4 As shown, corresponding to the above lithium battery health state prediction method, the present invention also provides a lithium battery health state prediction system. The lithium battery health state prediction system 300 includes a unit for executing the above lithium battery health state prediction method, and the system can be configured in a server. Specifically, please refer to Figure 4 The lithium battery health status prediction system 300 includes a data acquisition unit 301, a prediction unit 302 and an output unit 303.
[0084] The data acquisition unit 301 is used to acquire the lithium battery operation data; the prediction unit 302 is used to input the lithium battery operation data into the lithium battery health status prediction model to perform health status prediction to obtain a prediction result; wherein, the lithium battery health status prediction model is obtained by collecting historical battery operation data as a sample set to train a basic model, and the training process adopts forward propagation, back propagation algorithm and hyperparameter tuning. The basic model is a model composed of an encoder of the Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection; the output unit 303 is used to output the prediction result.
[0085] In one embodiment, the system also includes a model training unit, which is used to collect historical battery operation data and pre-process it in combination with corresponding time values to obtain a sample set; construct a model consisting of an encoder of a Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection to obtain a basic model; using the sample set, the basis is trained using forward propagation, back propagation algorithms and hyperparameter tuning to obtain a lithium battery health status prediction model.
[0086] It should be noted that technicians in the relevant field can clearly understand that the specific implementation process of the above-mentioned lithium battery health status prediction system 300 and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0087] The lithium battery health status prediction system 300 can be implemented in the form of a computer program. Figure 5 Runs on the computer device shown.
[0088] See also Figure 5 , Figure 5 5 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of multiple servers.
[0089] See also Figure 5 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0090] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a lithium battery health status prediction method.
[0091] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0092] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a lithium battery health status prediction method.
[0093] The network interface 505 is used to communicate with other devices over the network. Figure 5 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0094] The processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps: Obtain lithium battery operation data; input the lithium battery operation data into a lithium battery health status prediction model to perform health status prediction to obtain a prediction result; wherein the lithium battery health status prediction model is obtained by collecting historical battery operation data as a sample set to train a basic model, and the training process adopts forward propagation, backpropagation algorithm and hyperparameter tuning. The basic model is a model composed of an encoder of a Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection; output the prediction result.
[0095] In one embodiment, the processor 502 implements the lithium battery health status prediction model by collecting historical battery operation data as a sample set to train a basic model, the training process adopts forward propagation, back propagation algorithm and hyperparameter tuning, and the basic model is a model composed of an encoder of a Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection, and specifically implements the following steps: The historical battery operation data is collected and preprocessed in combination with the corresponding time values to obtain a sample set; a model consisting of an encoder of a Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter is constructed to obtain a basic model; the sample set is used to train the foundation using forward propagation, back propagation algorithms and hyperparameter tuning to obtain a lithium battery health status prediction model.
[0096] The model includes a Transformer layer encoder as the encoder of the model, a multi-layer KAN network as a decoder, and an unscented Kalman filter for smoothing the output, wherein the encoder includes multiple stacked encoding layers, each of the encoding layers includes a multi-head attention mechanism and a feedforward neural network, and residual connections and layer normalization are added after each encoding layer; the decoder includes multiple KAN decoding layers.
[0097] The expression of the multi-head attention mechanism is: ; ; Q represents the predicted value of SoH, K represents the information related to Q, including voltage, current and temperature, values and contains the actual data corresponding to the key. By calculating each query and all keys, the Transformer layer assigns weights to the values and obtains the corresponding output value through weighted summation; is the dimension of each head, is the total model dimension; h is the number of heads in the multi-head attention mechanism.
[0098] The mathematical expression of the KAN layer is: ;in, and is a learnable one-dimensional nonlinear function, and n is the dimension of the input variable.
[0099] The unscented Kalman filter layer directly predicts the state mean and covariance by propagating a set of weighted Sigma points to smooth the output of the lithium battery health state prediction model.
[0100] The training process of the lithium battery health status prediction model adopts mean square error as the loss function, and the expression of the loss function is: ,in, is the actual value, is the predicted value, and N is the number of samples.
[0101] The performance evaluation index of the training process of the lithium battery health status prediction model adopts the root mean square percentage error, which is expressed as: ;in, is the actual value, is the predicted value, and N is the number of samples.
[0102] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0103] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0104] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps: Obtain lithium battery operation data; input the lithium battery operation data into a lithium battery health status prediction model to perform health status prediction to obtain a prediction result; wherein the lithium battery health status prediction model is obtained by collecting historical battery operation data as a sample set to train a basic model, and the training process adopts forward propagation, backpropagation algorithm and hyperparameter tuning. The basic model is a model composed of an encoder of a Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection; output the prediction result.
[0105] In one embodiment, the processor implements the lithium battery health status prediction model by collecting historical battery operation data as a sample set to train a basic model when executing the computer program. The training process adopts forward propagation, back propagation algorithm and hyperparameter tuning. The basic model is a model step composed of an encoder of a Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection. Specifically implement the following steps: The historical battery operation data is collected and preprocessed in combination with the corresponding time values to obtain a sample set; a model consisting of an encoder of a Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter is constructed to obtain a basic model; the sample set is used to train the foundation using forward propagation, back propagation algorithms and hyperparameter tuning to obtain a lithium battery health status prediction model.
[0106] The model includes a Transformer layer encoder as the encoder of the model, a multi-layer KAN network as a decoder, and an unscented Kalman filter for smoothing the output, wherein the encoder includes multiple stacked encoding layers, each of the encoding layers includes a multi-head attention mechanism and a feedforward neural network, and residual connections and layer normalization are added after each encoding layer; the decoder includes multiple KAN decoding layers.
[0107] The expression of the multi-head attention mechanism is: ; ; Q represents the predicted value of SoH, K represents the information related to Q, including voltage, current and temperature, values and contains the actual data corresponding to the key. By calculating each query and all keys, the Transformer layer assigns weights to the values and obtains the corresponding output value through weighted summation; is the dimension of each head, is the total model dimension; h is the number of heads in the multi-head attention mechanism.
[0108] The mathematical expression of the KAN layer is: ;in, and is a learnable one-dimensional nonlinear function, and n is the dimension of the input variable.
[0109] The unscented Kalman filter layer directly predicts the state mean and covariance by propagating a set of weighted Sigma points to smooth the output of the lithium battery health state prediction model.
[0110] The training process of the lithium battery health status prediction model adopts mean square error as the loss function, and the expression of the loss function is: ,in, is the actual value, is the predicted value, and N is the number of samples.
[0111] The performance evaluation index of the training process of the lithium battery health status prediction model adopts the root mean square percentage error, which is expressed as: ;in, is the actual value, is the predicted value, and N is the number of samples.
[0112] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0113] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0114] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0115] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the system of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0116] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0117] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for predicting the health status of a lithium battery, characterized in that: include: Obtain lithium battery operation data; The lithium battery operation data is input into the lithium battery health state prediction model to perform health state prediction to obtain a prediction result; wherein the lithium battery health state prediction model is obtained by collecting historical battery operation data as a sample set to train a basic model, and the training process adopts forward propagation, back propagation algorithm and hyperparameter tuning. The basic model is a model composed of an encoder of a Transformer layer, a multi-KAN network as a decoder, and an unscented Kalman filter connection; The prediction result is output.
2. A lithium battery health status prediction method according to claim 1, characterized in that: The lithium battery health status prediction model is obtained by collecting historical battery operation data as a sample set to train the basic model. The training process uses forward propagation, backpropagation algorithms and hyperparameter tuning. The basic model is composed of a Transformer layer encoder, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection model, including: Collect historical battery operation data and pre-process it in combination with the corresponding time values to obtain a sample set; Construct a model consisting of a Transformer layer encoder, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection to obtain a basic model; The sample set is used to train the basis using forward propagation, back propagation algorithms and hyperparameter tuning to obtain a lithium battery health status prediction model.
3. According to a lithium battery health status prediction method according to claim 2, the model includes a Transformer layer encoder as the encoder of the model, a multi-layer KAN network as a decoder, and an unscented Kalman filter for smoothing the output, wherein: The encoder includes multiple stacked encoding layers, each of which includes a multi-head attention mechanism and a feedforward neural network, and residual connections and layer normalization are added after each encoding layer; the decoder includes multiple KAN decoding layers.
4. A lithium battery health status prediction method according to claim 3, characterized in that: The expression of the multi-head attention mechanism is: ; ; Q represents the predicted value of SoH, K represents the information related to Q, including voltage, current and temperature, values and contains the actual data corresponding to the key. By calculating each query and all keys, the Transformer layer assigns weights to the values and obtains the corresponding output value through weighted summation; is the dimension of each head, is the total model dimension; is the number of heads in the multi-head attention mechanism.
5. A lithium battery health status prediction method according to claim 4, characterized in that: The mathematical expression of the KAN layer is: ;in, and is a learnable one-dimensional nonlinear function, and n is the dimension of the input variable.
6. A lithium battery health status prediction method according to claim 5, characterized in that: The unscented Kalman filter layer directly predicts the state mean and covariance by propagating a set of weighted Sigma points to smooth the output of the lithium battery health state prediction model.
7. A lithium battery health status prediction method according to claim 6, characterized in that: The training process of the lithium battery health status prediction model adopts mean square error as the loss function, and the expression of the loss function is: ,in, is the actual value, is the predicted value, and N is the number of samples.
8. A lithium battery health status prediction method according to claim 7, characterized in that: The performance evaluation index of the training process of the lithium battery health status prediction model adopts the root mean square percentage error, which is expressed as: ;in, is the actual value, is the predicted value, and N is the number of samples.
9. A lithium battery health status prediction system, characterized in that: include: A data acquisition unit, used to acquire lithium battery operation data; A prediction unit, used for inputting the lithium battery operation data into a lithium battery health state prediction model to perform health state prediction to obtain a prediction result; wherein the lithium battery health state prediction model is obtained by collecting historical battery operation data as a sample set to train a basic model, the training process adopts forward propagation, back propagation algorithm and hyperparameter tuning, and the basic model is a model composed of an encoder of a Transformer layer, a multi-layer KAN network as a decoder, and an unscented Kalman filter connection; An output unit is used to output the prediction result.
10. A computer device, characterized in that: The computer device comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the method according to any one of claims 1 to 8 when executing the computer program.
Citation Information
Patent Citations
Lithium ion battery health state estimation method, apparatus and device, and medium
CN115032540A
Energy storage battery health state diagnosis method
CN117007977A
Online prediction method and system for health state of lithium battery of electric vehicle
CN115407211A
Lithium battery health state prediction method
CN116679211A
Deep learning lithium battery SOH prediction method based on transformer architecture
CN118131044A
Cited By
Error calibration method and device of inertial measurement unit, equipment and medium
CN120063331A
Error Calibration Method, Device, Equipment and Medium of Inertial Measurement Unit
CN120063331B
Battery pack health state prediction method and device
CN120122018A
Aviation power battery digital twinborn fusion deep learning health prediction method
CN120233240A
A health prediction method for aviation power battery digital twins integrated with deep learning
CN120233240B