A lithium-ion battery life prediction method and system based on a state space model

By combining a state-space model with grouped feature attention and Mamba temporal modeling, aggregated features are generated and the loss function is constrained. This solves the problems of physical interpretability and long-term time-series modeling accuracy in lithium-ion battery lifetime prediction, and achieves high-precision prediction of remaining lifespan.

CN122017609BActive Publication Date: 2026-06-16SHANGHAI UNIVERSITY OF ELECTRIC POWER

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI UNIVERSITY OF ELECTRIC POWER
Filing Date
2026-04-15
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing lithium-ion battery lifetime prediction methods have shortcomings in terms of physical interpretability, long-term modeling accuracy, and feature utilization, making it difficult to achieve high-precision prediction of remaining lifespan.

Method used

A lithium-ion battery lifetime prediction method based on a state-space model is adopted. By integrating grouped feature attention mechanism, Mamba time series modeling and physical information constraints, aggregated features are generated to capture the dependencies in the battery degradation process. The model is updated through a loss function to ensure that the prediction results conform to the battery aging law.

🎯Benefits of technology

It achieves high-precision and physically reliable prediction of the remaining lifespan of lithium-ion batteries, improving the accuracy and interpretability of the prediction, and solving the shortcomings of traditional models in terms of feature heterogeneity and physical constraints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122017609B_ABST
    Figure CN122017609B_ABST
Patent Text Reader

Abstract

The application relates to a lithium ion battery life prediction method and system based on a state space model, which comprises the following steps: obtaining characteristic parameters of a battery to be predicted and preprocessing; inputting the preprocessed characteristic parameters into a prediction model constructed in advance to obtain a capacity loss prediction sequence; the training process of the prediction model is as follows: collecting lithium ion battery charging and discharging cycle data and preprocessing to obtain multi-dimensional input features; performing feature conversion to obtain embedding vectors, and dividing the embedding vectors into current groups and voltage groups; based on the weight of variables in the groups and the weight of variables between the groups, generating aggregated features and battery internal capacity state variables; based on the battery internal capacity state variables, generating time sequence feature signals; performing element-by-element multiplication fusion on the time sequence feature signals and original gating signals to obtain time sequence feature vectors and use the time sequence feature vectors for prediction; and updating the prediction model based on the capacity loss prediction result. Compared with the prior art, the application has the advantage that the prediction result conforms to physical laws.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of lithium battery technology, and in particular to a method and system for predicting the lifetime of lithium-ion batteries based on a state-space model. Background Technology

[0002] In the current pursuit of green and environmentally friendly goals, lithium-ion batteries (LIBs) have become core components of electric vehicles and energy storage systems due to their high energy density and long cycle life. However, during long-term cycling, battery capacity gradually declines due to complex internal electrochemical side reactions (such as SEI film growth and loss of active materials). Accurately predicting the remaining useful life (RUL) of a battery is crucial for ensuring safe system operation, optimizing maintenance strategies, and preventing catastrophic failures. Because battery degradation processes are highly nonlinear, have long-term temporal correlations, and are significantly affected by external conditions such as temperature and operating time, achieving high-precision and physically interpretable RUL predictions remains a major challenge.

[0003] Currently, RUL prediction methods are mainly divided into mechanistic model-based methods and data-driven methods. While mechanistic models offer strong interpretability, parameter identification is difficult, making them unsuitable for complex operating conditions and limiting their generalization ability. Data-driven methods rely on historical operating data to train the model, without requiring in-depth understanding of the internal mechanisms. Deep learning methods such as LSTM and Transformer excel in time-series data modeling. Chinese patent CN119829956A discloses a lithium battery life prediction method based on graph neural networks, capturing feature correlations through mode decomposition and graph attention mechanisms; Chinese patent CN119247194A proposes a prediction method based on the Mamba model, leveraging the advantages of sequence modeling to improve computational efficiency. However, existing data-driven methods still have shortcomings: most models ignore the physical heterogeneity between features, making it difficult to effectively distinguish the dynamic contributions of different physical properties such as voltage and current; some models lack physical constraints, and the prediction results may violate the basic laws of battery degradation, resulting in poor physical interpretability; traditional time-series modeling architectures struggle to balance long-sequence dependency capture with computational efficiency.

[0004] Accurate and reliable LIBs RUL prediction technology can provide decision support for battery lifecycle management, helping the new energy industry reduce operating costs and improve safety levels. By addressing the pain points of existing methods in areas such as physical interpretability, long-term modeling accuracy, and feature utilization, it can promote the engineering application of battery health management technology, which has significant practical implications and industrial value for promoting the high-quality development of the new energy industry. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a method and system for predicting the lifespan of lithium-ion batteries based on a state-space model.

[0006] The objective of this invention can be achieved through the following technical solutions:

[0007] A state-space model-based method for predicting the lifetime of lithium-ion batteries achieves high-precision and physically reliable RUL prediction by fusing a grouped feature attention mechanism, Mamba time-series modeling, and physical information constraints. The method includes:

[0008] The characteristic parameters of the battery to be predicted, including the number of cycles, capacity and temperature, are obtained and preprocessed; the preprocessed characteristic parameters are input into the pre-built prediction model to obtain the capacity loss prediction sequence.

[0009] The training process of the prediction model is as follows: lithium-ion battery charge-discharge cycle data are collected and preprocessed to obtain multi-dimensional input features; feature transformation is performed on the multi-dimensional input features to obtain embedding vectors; the embedding vectors are divided into current and voltage groups based on the physical properties of the input features; nonlinear transformations are performed on the feature variables within the voltage and current groups respectively to generate intra-group variable weights; voltage and current group features are extracted through global average pooling to further generate voltage and current group weights.

[0010] Based on the weights of the variables within the group, the weights of the voltage group, and the weights of the current group, aggregated features are generated; based on the aggregated features, the dependencies in the battery degradation process are captured to obtain the battery's internal capacity state variables; based on the battery's internal capacity state variables and the aggregated features, a time-series feature signal is generated.

[0011] Based on the aggregated features, an original gated signal is generated; the time-series feature signal and the original gated signal are fused by element-wise multiplication to obtain a time-series feature vector; capacity loss is predicted based on the time-series feature vector to obtain a capacity loss prediction result; based on the capacity loss prediction result, a loss function including data fitting residuals and physical residuals is calculated, and the prediction model is updated until training converges to obtain a trained prediction model.

[0012] Furthermore, the physical residuals include degradation rate residuals and capacity loss residuals; the loss function is expressed as:

[0013]

[0014]

[0015]

[0016]

[0017]

[0018]

[0019]

[0020]

[0021]

[0022] in, For loss function, , and For balance coefficient, This represents the mean square error of capacity loss prediction. The mean square error of the degradation rate residuals. The mean square error of the capacity loss residual. For the sample size, To predict capacity loss, The actual capacity loss is represented by A, the physical model parameters are T, the temperature is n, and the number of cycles is n. For the degradation rate residual, For capacity loss residual, Due to battery capacity loss, As the pre-exponential factor, For activation energy, The molar gas constant, The decay exponent, This is the final predicted capacity loss value. For embedding vectors, These are the parameters of the neural network.

[0023] Furthermore, the process of generating aggregated features includes: multiplying the feature variables within the voltage group and the current group by the weights of the variables within the group to obtain feature vectors within the voltage group and the current group, respectively; and then, based on the weights of the voltage group and the current group, performing weighted fusion on the feature vectors within the voltage group and the feature vectors within the current group to obtain the aggregated features.

[0024] Based on the aggregated features, the dependencies in the battery degradation process are captured, and the internal capacity state variables of the battery are calculated iteratively. The corresponding calculation expression is:

[0025]

[0026] in, This is the updated battery internal capacity state variable. This refers to the internal capacity state variable of the battery. The weighting parameters for determining the proportion of historical trajectory retention are as follows: To control the instantaneous impact of the current input on the weight parameters, This is an aggregation feature.

[0027] Furthermore, the internal capacity state variables and aggregated features of the battery are linearly weighted and fused to obtain a time-series feature signal. The corresponding weighted fusion expression is as follows:

[0028]

[0029] in, For time-series characteristic signals, The projection matrix that affects the state to the output. It is the output bias term.

[0030] Furthermore, the voltage group features and current group features are input into a gated residual network to learn the dynamic contributions of the voltage group and current group to capacity decay, thereby obtaining the voltage group weights and current group weights. The corresponding expressions for obtaining these weights are as follows:

[0031]

[0032] in, For inter-group feature weights, For voltage group weights, For the current group weights, Characteristics of voltage groups, This is a characteristic of the current group.

[0033] Furthermore, the multidimensional input features are subjected to feature transformation to obtain the embedding vector, and the corresponding transformation expression is:

[0034]

[0035] in, For embedding vectors, It is a multidimensional input feature.

[0036] Furthermore, nonlinear transformations are performed on the characteristic variables within the voltage and current groups respectively to generate weights for the variables within each group. The corresponding transformation formulas are as follows:

[0037]

[0038]

[0039] in, For the weights of variables within the group, The vector formed by flattening all features within the group. Let be the embedding vector of the i-th feature in the j-th group. Let represent the embedding vector of the j-th feature group.

[0040] Furthermore, after obtaining the capacity loss prediction sequence, the termination capacity is calculated based on the preset rated capacity; the capacity loss threshold is further calculated based on the termination capacity; the prediction cycle number corresponding to the prediction sequence that first satisfies a value greater than or equal to the capacity loss threshold is found in the capacity loss prediction sequence; the remaining service life of the battery is obtained by subtracting the cycle number from the prediction cycle number.

[0041] Furthermore, the multidimensional input features specifically include charging time, cumulative charge, and charging current and voltage parameters;

[0042] The charging current and voltage parameters specifically include the mean, standard deviation, kurtosis, skewness, curve slope, and curve entropy of the charging current and voltage.

[0043] The present invention also provides a system for predicting the lifespan of lithium-ion batteries based on a state-space model, comprising a memory and a processor, wherein the memory stores a computer program, and the processor calls the computer program to execute the steps of any of the methods described above.

[0044] Compared with the prior art, the present invention has the following advantages:

[0045] (1) This invention generates aggregated features based on intra-group variable weights, voltage group weights, and current group weights, and constructs a complete intra-group and inter-group two-layer attention mechanism. This mechanism first selects key variables within each type of feature at the intra-group level, and then dynamically balances the overall contribution of different types of features at the inter-group level, ultimately generating a high-quality aggregated feature that includes both fine intra-group feature selection and dynamic inter-group weight allocation. This aggregated feature fully integrates the complementary information of the voltage and current groups of features, while taking into account both the local and global importance of the features, providing information-rich and key-point input for subsequent time series modeling, and fundamentally solving the problem of inaccurate capture of degradation information caused by neglecting the physical heterogeneity of features in traditional models.

[0046] (2) By embedding the degradation rate deviation, which reflects the predicted degradation rate and the degradation rate of the physical model, and the capacity loss deviation, which reflects the predicted capacity loss and the theoretical value of the physical model, into the loss function, this invention not only ensures the dynamic trend prediction of battery capacity loss, but also truly reflects the deviation between the current predicted capacity loss and the actual capacity loss. This ensures that the prediction conforms to the aging law and can reflect the deviation between the predicted capacity loss and the actual capacity loss, thereby enhancing the short-term and long-term accuracy of the prediction. Ultimately, this invention achieves efficient, accurate, and interpretable prediction of the health status of lithium batteries.

[0047] The degradation rate residual ensures, from a dynamic trend perspective, that the model's prediction process is consistent with the actual aging dynamics of the battery. By embedding the physical laws of battery aging into the loss function in the form of residuals, the model's predicted aging rate is constrained to conform to the physical laws described by the Arrhenius equation and the power-law model, thus avoiding the problem that although the model may make accurate predictions at some points, the trend of change may not conform to the physical laws at all. The model's predicted capacity loss value is also constrained to conform to the theoretical value of the semi-empirical physical model, thus ensuring, from a static numerical perspective, that the model's prediction results fall within a physically reasonable range, thus avoiding the purely data-driven model from producing physically absurd predictions in areas where data is lacking.

[0048] (3) This invention captures the dependencies in the battery degradation process based on aggregated features, obtains the internal capacity state variables of the battery, and introduces a state-space model as the core engine for time-series modeling. The state-space model models the battery degradation process as a dynamic system with memory capabilities through discrete state update equations: the hidden state variables are the internal capacity states of the battery, the historical degradation trajectory is preserved through matrix A, and the influence of the current input is absorbed through matrix B. This recursive structure enables the model to efficiently capture the long-term dependencies in the battery degradation process, compressing the historical information of hundreds of iterations into a low-dimensional state vector, which not only preserves the key degradation patterns, but also avoids the gradient vanishing problem of traditional RNNs and the quadratic complexity problem of Transformers.

[0049] (4) This invention achieves deep interaction between the SSM main path and the gated branch by fusing the time-series feature signal and the original gated signal through element-wise multiplication to obtain the time-series feature vector. The element-wise multiplication fusion allows the gated signal to act as a dynamic weight to adjust each dimension of the time-series feature signal: when the gate value is close to 1, the time-series feature of the corresponding dimension is completely preserved; when the gate value is close to 0, the time-series feature of the corresponding dimension is effectively suppressed; when the gate value is between 0 and 1, the time-series feature of the corresponding dimension is partially preserved. This fusion mechanism is equivalent to achieving adaptive information filtering at the feature level: allowing important degenerate features to pass smoothly, suppressing irrelevant noise interference, and retaining the flexibility of soft adjustment. The fused time-series feature vector contains both the long-term dependency information mined by the SSM main path and has undergone dynamic calibration by the gated branch, resulting in a significant improvement in feature quality. Attached Figure Description

[0050] Figure 1 This is a flowchart of a lithium-ion battery lifetime prediction method based on a state-space model provided in an embodiment of the present invention.

[0051] Figure 2 This is a flowchart of the core method of a lithium-ion battery lifetime prediction method based on a state-space model provided in an embodiment of the present invention.

[0052] Figure 3 This is a schematic diagram of a two-layer attention architecture for a lithium-ion battery lifetime prediction method based on a state-space model provided in an embodiment of the present invention.

[0053] Figure 4 This is a diagram illustrating the model training steps of a lithium-ion battery lifetime prediction method based on a state-space model provided in an embodiment of the present invention.

[0054] Figure 5 This is a comparison chart of model prediction results for a lithium-ion battery lifetime prediction method based on a state-space model provided in an embodiment of the present invention. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0056] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0057] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0058] Definitions:

[0059] The XJTU open dataset contains charge-discharge cycle test data for various lithium-ion battery models under different operating conditions, specifically recording the changes in key parameters such as voltage, current, temperature, and capacity over the number of cycles. As one of the authoritative open datasets in the field of battery health state prediction research, the XJTU dataset covers the complete degradation process from initial battery use to the end of its lifespan, providing researchers with a standardized data foundation. It is widely used in research areas such as lithium-ion battery remaining life prediction, capacity estimation, and aging mechanism analysis. The openness of this dataset allows for fair comparison of algorithm performance from different research teams on the same data benchmark, promoting technological advancements in the field of battery health management.

[0060] Max-Min scaling is a commonly used data normalization technique that maps the original data to a specified numerical range (usually [0, 1]) through a linear transformation.

[0061] The Arrhenius equation is a classic physicochemical formula describing the relationship between chemical reaction rate and temperature. It was proposed by the Swedish scientist Svante-Auguste Arrhenius in 1889.

[0062] Power-law model: A mathematical model that describes the power function relationship between two variables.

[0063] Adaptive weight adjustment algorithm: It is a machine learning technique that can dynamically adjust the weights of features, modules or loss functions based on the characteristics of input data or the state of the model. Its core idea is to allow the weights to be automatically optimized as the data or task requirements change, rather than using fixed prior weights.

[0064] Example 1

[0065] like Figure 1 and Figure 2 As shown, this embodiment provides a lithium-ion battery lifetime prediction method based on a state-space model. The core process of this method includes three core stages: data preprocessing and feature extraction, Mamba-PINN model construction, and model training and RUL prediction. The data preprocessing stage completes feature extraction, standardization, and dataset partitioning. The model construction stage sequentially forms a complete model through feature embedding, GFAM feature enhancement, Mamba temporal modeling, nonlinear mapping, physical constraint construction, and PINN fusion. The training and prediction stage trains the model using a composite loss function and finally outputs the RUL prediction result.

[0066] The method includes the following steps:

[0067] S1: Obtain the characteristic parameters of the battery to be predicted, including the number of cycles, capacity and temperature, and preprocess them; input the preprocessed characteristic parameters into the pre-built prediction model to obtain the capacity loss prediction sequence;

[0068] S101: Data Acquisition and Cleaning: Collect LIBs charge-discharge cycle data, using publicly available datasets from XJTU. The data must include key parameters such as voltage, current, temperature, and capacity at different cycle counts. Filter valid cycle data, remove outliers, and retain complete charge-discharge cycle samples.

[0069] S102: Feature Extraction: Based on the regularity of the constant current-constant voltage (CC-CV) charging strategy, define the charging cutoff voltage. Select voltage at Voltage data within a given range and current data during the constant voltage phase, decreasing from 0.5A to 0.1A. From these data, 16 statistical features (mean, standard deviation, kurtosis, skewness, charging time, cumulative charge, curve slope, and curve entropy) are extracted to form an initial feature set.

[0070] S103: Data Standardization: The 16-dimensional features are normalized to the [0,1] interval using the Max-Min scaling method to eliminate dimensional differences. The standardization formula is:

[0071]

[0072] in, The normalized value. These are the original eigenvalues. and These are the minimum and maximum values ​​of the feature, respectively.

[0073] S104: Dataset Partitioning: All charge-discharge cycle data of batteries 2C-1 and 2C-2 in the XJTU dataset were selected as the core training data and divided into training and validation sets in an 8:2 ratio; the test set consisted of all cycle data of battery 2C-3. The partitioning process maintained the temporal continuity of the data and ensured the consistency of the distribution between the training and test sets.

[0074] S2: The training process of the prediction model is as follows: Collect lithium-ion battery charge and discharge cycle data and preprocess them to obtain multi-dimensional input features; perform feature transformation on the multi-dimensional input features to obtain embedding vectors; divide the embedding vectors into current groups and voltage groups according to the physical properties of the input features; perform nonlinear transformation on the feature variables in the voltage group and current group respectively to generate intra-group variable weights; extract voltage group features and current group features through global average pooling, and further generate voltage group weights and current group weights.

[0075] S201: Feature embedding work. A linear mapping layer transforms 16-dimensional standardized features into high-dimensional embedding vectors, enhancing the model's ability to represent the nonlinear degradation of battery capacity. The embedding vector dimension is set to 32 dimensions, and the mapping process expression is as follows:

[0076]

[0077] in The input feature sequence (L is the number of iterations, M=16 is the feature dimension). This represents the corresponding embedding vector (D is the embedding dimension).

[0078] S202: Construct a Grouped Feature Attention (GFAM) module, which divides the embedded features into voltage and current groups based on the physical properties of the input features, and constructs a two-layer attention mechanism of "intra-group and inter-group" attention, including:

[0079] Intra-group attention: For each feature group, the feature variables are processed non-linearly through a gated residual network (GRN) to generate intra-group variable weights, as shown in the formula:

[0080] ;

[0081]

[0082] in, Let be the embedding vector of the i-th feature in the j-th group. The vector formed by flattening all features within the group. These are the weights of variables within the group.

[0083] Inter-group attention: After obtaining the weighted representation within groups, GFAM extracts the voltage group representation through global average pooling. Characterization with current group The input to the GRN learns the dynamic contribution weights of the voltage and current groups to capacity decay, and the specific formula is as follows:

[0084]

[0085] in, and These are the weights for the voltage group and the current group, respectively.

[0086] Feature aggregation: Combines the weights of variables within groups and the weights of features between groups to output a multidimensional representation after aggregation.

[0087] S3: Generate aggregated features based on the weights of variables within the group, the weights of the voltage group, and the weights of the current group; capture the dependencies in the battery degradation process based on the aggregated features to obtain the battery's internal capacity state variables; generate time-series feature signals based on the battery's internal capacity state variables and aggregated features.

[0088] S301: The Mamba time-series modeling process uses the aggregated features output by GFAM as input to construct Mamba blocks as the backbone of time-series modeling, capturing long-term dependencies in the battery degradation process.

[0089] First, preprocessing is performed, using linear projection and convolution operations to smooth and reduce the dimensionality of local temporal features, and then applying the SiLU activation function to enhance the nonlinear representation.

[0090] Secondly, selective state-space updating is performed: based on the discretized equations of the state-space model (SSM), the memory and forgetting of historical degradation information are adaptively adjusted. The discrete state update equation is as follows:

[0091]

[0092]

[0093] in, This refers to the internal capacity state variable of the battery. Determines the proportion of historical traces that are preserved. Controlling the instantaneous impact of the current input, The aggregated features are the output of GFAM. This is an intermediate output.

[0094] Finally, the output fusion operation is performed. The signal processed by SSM is fused with the gated signal of the original branch through element-wise multiplication, and then mapped back to the hidden space dimension through the output linear layer.

[0095] S302: Uses GRN to implement nonlinear mapping, and improves the model's ability to fit complex degradation relationships through residual connections and activation functions. The structure includes layer normalization, linear transformation, ELU activation function and residual connections, and the output dimension is consistent with the hidden dimension of the Mamba layer.

[0096] Specifically,

[0097] The process of generating aggregated features includes: multiplying the feature variables in the voltage group and the current group by the weights of the variables in the group to obtain the feature vectors in the voltage group and the current group respectively; then, based on the weights of the voltage group and the current group, weighted fusion of the feature vectors in the voltage group and the current group is performed to obtain aggregated features.

[0098] S4: Generate the original gated signal based on the aggregated features; fuse the time-series feature signal and the original gated signal by element-wise multiplication to obtain the time-series feature vector; predict the capacity loss based on the time-series feature vector to obtain the capacity loss prediction result; calculate the loss function including the data fitting residual and the physical residual based on the capacity loss prediction result, and update the prediction model until the training converges to obtain the trained prediction model.

[0099] S401: PINN Framework Construction: Semi-empirical Physical Degradation Model: Based on the Arrhenius equation, the accelerating effect of temperature on battery aging rate is characterized. Combined with a power-law model, the cumulative effect of cycle number on capacity decay is quantified. A semi-empirical physical degradation model coupling temperature and cycle number is constructed. The core expression is:

[0100]

[0101] in, This refers to battery capacity loss (i.e., the difference between the rated capacity and the actual capacity). As the pre-exponential factor, For activation energy, It is the molar gas constant (8.314 J / (mol・K)). Temperature is the thermodynamic temperature (in K). The number of loops. This is the decay exponent. For the above model with respect to the number of cycles... Taking the first-order partial derivative yields the capacity degradation rate equation, which is used to characterize the kinetics of battery aging:

[0102]

[0103] Physical residual calculation: In the PINN framework, the neural network is responsible for approximating the implicit solution of capacity loss.

[0104]

[0105] in, These are the parameters of the neural network. Using automatic differentiation, the predicted values ​​are directly solved without manually deriving the gradient. Partial derivative with respect to the number of iterations n Define two types of physical residuals:

[0106] Degradation rate residual: reflects the deviation between the predicted degradation rate and the degradation rate of the physical model, and is expressed as:

[0107]

[0108] Capacity loss residual: reflects the deviation between the predicted capacity loss and the theoretical value of the physical model, and is expressed as:

[0109]

[0110] The two types of residuals constrain the model prediction results from different dimensions to follow physical laws. The smaller the residual, the more the model prediction conforms to the actual aging mechanism of the battery.

[0111] The PINN framework integration mechanism sets the physical model parameters A and k as learnable parameters, incorporating them into the training and optimization process along with the neural network weights and biases, achieving dynamic adaptation between data-driven approaches and physical mechanisms. In terms of network structure, a feature fusion layer concatenates the output of the nonlinear mapping layer with physical state features (temperature T, cycle number n), which are then input into a fully connected layer to obtain the final capacity loss prediction. This ensures the deep integration of physical information and data characteristics.

[0112] S402: Model Output: The final predicted battery capacity loss value is output through a single-neuron fully connected layer. The activation function uses a linear function to ensure that the output value is consistent with the physical range of capacity loss.

[0113] S403: Perform model training and RUL prediction:

[0114] S4031: Design the model loss function, which includes the following three terms: data fitting error, physical residual error, and prediction capacity degradation rate error. These three terms work together to achieve synergistic optimization of data-driven and physical constraints. The expression is as follows:

[0115]

[0116] in, The mean squared error of capacity loss prediction reflects the degree of model fit to historical data, and is expressed by the formula:

[0117]

[0118] Where N is the sample size. To predict capacity loss, This represents the actual capacity loss.

[0119] The mean square error of the degradation rate residual is given by the following formula:

[0120]

[0121] The mean square error of the capacity loss residual is given by the formula:

[0122]

[0123] in, , , The balancing coefficients are initially set to 1 and dynamically optimized during training using an adaptive weight adjustment algorithm to ensure a balanced contribution from each loss term.

[0124] S4032: Model Training Process

[0125] Using the Adam optimizer, the initial learning rate was set to 0.01;

[0126] The LinearLR learning rate scheduler is applied to linearly reduce the learning rate from its initial value to half during training.

[0127] The model batch size was set to 256, the maximum training epochs were set to 200, and a dropout mechanism was introduced (dropout rate set to 0.02) to prevent overfitting. An early stopping strategy was adopted (training was stopped if the loss did not decrease after 15 consecutive epochs).

[0128] During training, the neural network weights, biases, and physical model parameters A and k are optimized simultaneously. All parameters are updated through the backpropagation algorithm to ensure that the model meets both data fitting accuracy and physical constraint requirements.

[0129] S4033: Model Validation and Tuning: Model performance is evaluated using the validation set, employing Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and Coefficient of Determination (R²) as evaluation metrics. The calculation formulas are as follows:

[0130]

[0131]

[0132]

[0133] in, This represents the average of the actual capacity loss. If the validation set performance does not reach optimal performance, adjust the GFAM attention mechanism parameters, the hidden dimension of the Mamba layer, or the physical constraint balance coefficient, and retrain until the performance meets the target.

[0134] S4034: RUL Prediction Process:

[0135] Input the standardized features (16-dimensional statistical features) of the battery to be predicted. ), current loop count Current actual capacity and the ambient temperature T;

[0136] The model outputs a capacity loss prediction sequence starting from the current loop number. ;

[0137] Set the end-of-life (EOL) threshold to the rated capacity. Calculate the termination capacity using 80% (XJTU dataset standard). ;

[0138] Determine the capacity loss threshold ;

[0139] Find the first time that the predicted sequence satisfies Number of loops Then the remaining service life .

[0140] This method combines a long-term modeling approach based on a state-space model with physical priors about battery degradation, proposing a physical information neural network framework, Mamba-PINN, for predicting the RUL of batteries (LIBs). This framework enables accurate prediction of LIBs' RUL and provides technical support for electric vehicle battery management.

[0141] Example 2

[0142] This embodiment provides a system for predicting the lifespan of lithium-ion batteries based on a state-space model, including a memory and a processor. The memory stores a computer program, and the processor calls the computer program to execute the steps of the method as described in Embodiment 1.

[0143] The beneficial effects of this invention include:

[0144] (1) This invention discloses a Mamba-PINN prediction framework that integrates physical priors and state space modeling, which realizes the deep integration of feature processing, temporal modeling and physical constraints. While having the advantage of linear time complexity modeling, it also has rigorous physical interpretability, effectively avoiding the physical distortion phenomenon of pure data-driven "black box" models in long lifetime prediction.

[0145] (2) By adaptively balancing the dynamic contribution of voltage and current features to capacity decay through the “intra-group-inter-group” two-layer mechanism of the group feature attention module, the problem of inaccurate capture of degradation information caused by neglecting the physical heterogeneity of features in traditional models is solved.

[0146] like Figure 3 As shown in the figure, this diagram illustrates the "within-group-between-group" two-layer attention architecture of GFAM. The input features are divided into voltage and current groups according to their physical properties. Within-group and between-group features, variable weights are generated and feature group weights are learned through GRN, respectively. Finally, the weighted features within the groups and the group weights are fused through a feature recombination layer to output aggregated features.

[0147] like Figure 4 As shown, the detailed steps of model training in this invention include training set loading, feature embedding, GFAM feature enhancement, Mamba temporal modeling, nonlinear mapping, composite loss function calculation, gradient backpropagation, and parameter updating (synchronously updating neural network parameters). (This is related to the physical model parameters A and k). During training, an early stopping strategy and dropout regularization are introduced, and the learning rate is adjusted by monitoring the performance on the validation set to ensure that the model converges to the optimal state.

[0148] like Figure 5As shown, the prediction results generated by this method on the XJTU dataset are plotted, with the horizontal axis representing the number of battery cycles and the vertical axis representing battery capacity. The figure includes the actual capacity curve and the Mamba-PINN prediction curve, visually demonstrating the performance of the model of this invention in tracking the actual degradation trend and capturing details of capacity decay.

[0149] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.

Claims

1. A method for predicting the lifetime of lithium-ion batteries based on a state-space model, characterized in that, include: The characteristic parameters of the battery to be predicted, including the number of cycles, capacity and temperature, are obtained and preprocessed. The preprocessed feature parameters are input into the pre-built prediction model to obtain the capacity loss prediction sequence; The training process of the prediction model is as follows: lithium-ion battery charge-discharge cycle data are collected and preprocessed to obtain multi-dimensional input features; feature transformation is performed on the multi-dimensional input features to obtain embedding vectors; the embedding vectors are divided into current and voltage groups based on the physical properties of the input features; nonlinear transformations are performed on the feature variables within the voltage and current groups respectively to generate intra-group variable weights; voltage and current group features are extracted through global average pooling to further generate voltage and current group weights. Based on the weights of the variables within the group, the weights of the voltage group, and the weights of the current group, aggregate features are generated; Based on the aggregated features, the dependencies in the battery degradation process are captured to obtain the battery's internal capacity state variables; based on the battery's internal capacity state variables and aggregated features, a time-series feature signal is generated. Based on the aggregated features, an original gated signal is generated; the time-series feature signal and the original gated signal are fused by element-wise multiplication to obtain a time-series feature vector; capacity loss is predicted based on the time-series feature vector to obtain the capacity loss prediction result. Based on the capacity loss prediction results, a loss function including data fitting residuals and physical residuals is calculated, and the prediction model is updated until training converges to obtain a trained prediction model.

2. The lithium-ion battery lifetime prediction method based on a state-space model according to claim 1, characterized in that, The physical residuals include degradation rate residuals and capacity loss residuals; the loss function is expressed as: in, For loss function, , and For balance coefficient, This represents the mean square error of the capacity loss prediction. The mean square error of the degradation rate residuals. The mean square error of the capacity loss residual. For the sample size, To predict capacity loss, The actual capacity loss is represented by A, the physical model parameters are T, the temperature is n, and the number of cycles is n. For the degradation rate residual, For capacity loss residual, Due to battery capacity loss, As the pre-exponential factor, For activation energy, The molar gas constant, The decay exponent, This is the final predicted capacity loss value. For embedding vectors, These are the parameters of the neural network.

3. The lithium-ion battery lifetime prediction method based on a state-space model according to claim 1, characterized in that, The process of generating the aggregated feature includes: multiplying the feature variables in the voltage group and the current group by the weights of the variables in the group to obtain the feature vectors in the voltage group and the feature vectors in the current group, respectively; and then, based on the weights of the voltage group and the current group, weightedly fusing the feature vectors in the voltage group and the feature vectors in the current group to obtain the aggregated feature. Based on the aggregated features, the dependencies in the battery degradation process are captured, and the internal capacity state variables of the battery are calculated iteratively. The corresponding calculation expression is: in, This is the updated battery internal capacity state variable. This refers to the internal capacity state variable of the battery. The weighting parameters for determining the proportion of historical trajectory retention are as follows: To control the instantaneous impact of the current input on the weight parameters, This is an aggregation feature.

4. The lithium-ion battery lifetime prediction method based on a state-space model according to claim 3, characterized in that, The battery's internal capacity state variables and aggregated features are linearly weighted and fused to obtain a time-series feature signal. The corresponding weighted fusion expression is as follows: in, For time-series characteristic signals, The projection matrix that affects the state to the output. It is the output bias term.

5. The lithium-ion battery lifetime prediction method based on a state-space model according to claim 1, characterized in that, The voltage group features and current group features are input into a gated residual network to learn the dynamic contributions of the voltage group and current group to capacity decay, thereby obtaining the voltage group weights and current group weights. The corresponding expressions for obtaining these weights are as follows: in, For inter-group feature weights, For voltage group weights, For the current group weights, Characteristics of voltage groups, This is a characteristic of the current group.

6. The lithium-ion battery lifetime prediction method based on a state-space model according to claim 1, characterized in that, The multidimensional input features are transformed to obtain the embedding vector, and the corresponding transformation expression is: in, For embedding vectors, It is a multidimensional input feature.

7. The lithium-ion battery lifetime prediction method based on a state-space model according to claim 1, characterized in that, The characteristic variables within the voltage and current groups are subjected to nonlinear transformations to generate weights for the variables within each group. The corresponding transformation formulas are as follows: in, For the weights of variables within the group, The vector formed by flattening all features within the group. Let be the embedding vector of the i-th feature in the j-th group. Let represent the embedding vector of the j-th feature group.

8. The lithium-ion battery lifetime prediction method based on a state-space model according to claim 1, characterized in that, After obtaining the capacity loss prediction sequence, the termination capacity is calculated based on the preset rated capacity; further, the capacity loss threshold is calculated based on the termination capacity. Find the prediction cycle number corresponding to the prediction sequence that first satisfies a value greater than or equal to the capacity loss threshold in the capacity loss prediction sequence; subtract the cycle number from the prediction cycle number to obtain the remaining battery life.

9. The lithium-ion battery lifetime prediction method based on a state-space model according to claim 1, characterized in that, The multidimensional input features specifically include charging time, cumulative charge, and charging current and voltage parameters; The charging current and voltage parameters specifically include the mean, standard deviation, kurtosis, skewness, curve slope, and curve entropy of the charging current and voltage.

10. A system for predicting the lifetime of lithium-ion batteries based on a state-space model, characterized in that, It includes a memory and a processor, the memory storing a computer program, the processor invoking the computer program to perform the steps of the method as described in any one of claims 1 to 9.