Lithium battery state of health estimation method and system based on physical information and mamba
By combining the PINN-Mamba neural network with dilated causal convolutional layers and a Transformer encoder, the shortcomings of lithium-ion battery state of health estimation methods in terms of generalization ability and physical interpretability are addressed, achieving high-precision SOH estimation and adapting to changes in battery characteristic distribution under different operating conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-29
- Publication Date
- 2026-06-23
AI Technical Summary
Existing methods for estimating the health status of lithium-ion batteries have shortcomings in terms of generalization ability, physical interpretability, and dynamic modeling ability. Traditional deep learning models cannot adapt to the uneven distribution of features at different aging stages of the battery and lack effective constraints on partial differential equations, resulting in inaccurate prediction results.
By employing a PINN-Mamba neural network combined with dilated causal convolutional layers and a Transformer encoder, high-precision SOH estimation is achieved by extracting features from battery charging data, fitting the model using an improved Mamba module and partial differential equations, and optimizing the model using an adaptive loss function.
It improves the estimation accuracy and stability of the model, is applicable to batteries under different operating conditions, maintains high-precision prediction, and has strong practical application value.
Smart Images

Figure CN122260138A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lithium-ion battery prediction and health management technology, specifically to a method and system for estimating the health status of lithium batteries based on physical information and Mamba. Background Technology
[0002] With the rapid development of electric vehicles and energy storage systems, the accurate estimation of the State of Health (SOH) of lithium-ion batteries, as the core energy carrier, has become a key technical bottleneck in battery management systems (BMS). SOH reflects the degree of degradation of the battery relative to its initial capacity, directly affecting range prediction, safety warnings, and lifespan management. In recent years, data-driven SOH estimation algorithms have made significant progress, but existing methods still have shortcomings in generalization ability, physical interpretability, and dynamic modeling capabilities, making it difficult to meet the comprehensive requirements of high robustness, interpretability, and high accuracy in practical engineering.
[0003] Traditional deep learning models (such as LSTM, GRU, and Transformer) can learn complex nonlinear degradation patterns from historical charge-discharge data, but they are essentially "black box" fittings, heavily reliant on large amounts of high-quality labeled data. When faced with scenarios involving different battery types, temperature conditions, or sparse data, model performance often drops sharply, limiting generalization ability. Secondly, these methods generally ignore the inherent physical laws of battery degradation, leading to potential non-physical oscillations and unreasonable plateaus in prediction results, severely weakening transfer reliability. Although Physical Information Neural Networks (PINNs) partially alleviate this problem by introducing partial differential equation (PDE) constraints, they typically only use data loss and PDE residuals as loss functions, lacking constraints on the predictor variables from real data within the PDE equations.
[0004] Furthermore, traditional deep learning models suffer from a fundamental problem: their network parameters remain fixed relative to a single iteration and cannot be adjusted based on new input data. This limitation is particularly pronounced in battery SOH estimation because the degradation process is non-stationary, with significant variations in capacity decay rates and uneven feature distributions at different aging stages. Moreover, differences in operating conditions and battery types further exacerbate these variability. Therefore, static network parameters hinder the model's ability to adapt to these changes, limiting the accuracy of SOH estimation. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention proposes a lithium battery state of health estimation method and system based on physical information and Mamba. By extracting voltage and current data during the battery charging phase and inputting them into the PINN-Mamba neural network, high-precision SOH estimation is achieved, meeting the requirements of high robustness and interpretability in practical scenarios.
[0006] In one aspect, this invention provides a method for estimating the state of health of lithium batteries based on physical information and Mamba, comprising the following steps: S1: Acquire battery voltage and current data during the lithium-ion battery charging process, using the industry-standard constant current-constant voltage (CC-CV) charging protocol. Perform preprocessing such as filtering on the voltage and current data to create a preprocessed dataset, improving data quality.
[0007] S2: Based on the preprocessed dataset obtained in S1, extract two features: constant voltage charging time and constant voltage charging charge. Simultaneously, generate ICA curves based on the data from the constant current charging stage and perform noise reduction. Extract two features from the ICA curves: maximum incremental capacity and incremental capacity variance. Normalize all features and cycle times, and concatenate them into a feature vector. .
[0008] S3: The feature vector obtained in S2 The input is fed into the PINN-Mamba neural network, where a modified Mamba module extracts high-dimensional temporal features, which are then mapped to SOH predictions via a fully connected layer. Finally, the SOH predictions and their partial derivatives are compared with the feature vector. The partial differential equation is input into the Transformer encoder and fitted, and the obtained partial derivative numerical values are used to constrain the SOH prediction values.
[0009] S4: Optimize the PINN-Mamba neural network in S3 using the loss function. On the test set, calculate the mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE) for the predicted and actual SOH values to verify the model performance and further improve the model parameters.
[0010] In another aspect, the present invention also provides a lithium battery health state estimation system based on physical information and Mamba, for implementing the aforementioned lithium battery health state estimation method, comprising the following modules: The data acquisition module is used to acquire battery voltage and current data for each cycle of the lithium-ion battery charging phase, perform preprocessing, and form a preprocessed dataset.
[0011] The feature vector construction module extracts two features—constant voltage charging time and constant voltage charging capacity—based on the preprocessed dataset, and extracts two features—maximum incremental capacity and variance—based on the ICA curve, to construct the feature vector.
[0012] The SOH prediction module is used to input feature vectors into the PINN-Mamba neural network to obtain SOH prediction values.
[0013] The training and testing module optimizes the training of the PINN-Mamba neural network using a loss function and then tests and verifies it.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. To address the issues of poor interpretability and uneven feature distribution of batteries under different states in traditional neural networks, PINN and Mamba are deeply fused. The characteristics of Mamba neural network are used to improve the fitting process of partial differential equations. The hidden states in Mamba neural network are also used as variables for fitting partial differential equations. This achieves deep fusion of the two neural networks in PINN, further improving the estimation accuracy and stability of the model.
[0015] 2. The Mamba neural network was improved. To address the problem of forgetting early information in long sequences in the Mamba neural network, an inflated causal convolutional layer was introduced to expand the receptive field, alleviate the problem of information forgetting, significantly enhance the global modeling ability of the model, and help to leverage the advantages of the dynamic network parameters of the Mamba neural network in solving the problem of uneven feature distribution of the battery under different states.
[0016] 3. Three loss functions were designed, with the data-term loss function incorporating partial differential feedback to further enhance the physical constraint capability. Simultaneously, to address the issue of the partial differential loss lacking real-value supervision, a partial derivative-supervised loss function was introduced to supervise the predicted values with real values, effectively improving prediction accuracy. An adaptive weighting mechanism was introduced to dynamically adjust the contributions of the three loss functions, effectively enhancing the model's generalization ability.
[0017] With the above improvements, this method can be applied to batteries under different working conditions and can maintain high accuracy even with limited data, thus having strong practical application value. Attached Figure Description
[0018] Figure 1 This is an overall flowchart of the present invention; Figure 2 This is a specific framework diagram of the PINN network of the present invention; Figure 3 This is a detailed framework diagram of the Mamba neural network of this invention. Detailed Implementation
[0019] The invention will now be further explained in conjunction with the accompanying drawings; like Figure 1 As shown, the lithium battery health state estimation method based on physical information and Mamba includes the following steps: S1: Acquire battery voltage and current data for each cycle of the lithium-ion battery charging process, using the industry-standard constant current-constant voltage (CC-CV) charging protocol. Perform preprocessing such as filtering on the voltage and current data to create a preprocessed dataset, improving data quality.
[0020] S2: Based on the preprocessed dataset obtained in S1, extract two features: constant voltage charging time and constant voltage charging capacity. Simultaneously, generate ICA curves based on the data from the constant current charging stage and perform noise reduction. Extract two features from the ICA curves: maximum incremental capacity and incremental capacity variance. Normalize all features and cycle times, and concatenate them into a feature vector. .
[0021] S2-1: Based on the preprocessed dataset obtained in S1, a specific current segment in the constant voltage charging process is extracted, and the duration of this segment is calculated as the first feature. The calculation formula is as follows: in, End time, This is the start time.
[0022] Then, the charging capacity during this stage is calculated using the ampere-hour integration method as the second characteristic. The calculation formula is as follows: in, This refers to the charging capacity during this time period. Sampling points The charging current, for The sampling point corresponding to the time. for The sampling point corresponding to the given time.
[0023] S2-2: Based on the preprocessed dataset obtained in S1, the charging capacity at each sampling point during the constant current charging stage is calculated using the ampere-hour integration method. Then, calculate using the following formula. The value of is used to obtain the ICA curve: in, Indicates sampling point Battery voltage, This indicates the total number of sampling points.
[0024] Gaussian filtering is applied to the ICA curve to reduce noise interference, resulting in a denoised ICA curve. The formula for Gaussian filtering is as follows: in, The coefficients are Gaussian coefficients. It is the discrete position index within the Gaussian window, and the window width is... It is 3. These are the normalized weights.
[0025] S2-3: Based on the denoised ICA curve, calculate its maximum value as the third feature, using the following formula: Next, its variance is calculated as the fourth characteristic, using the following formula: S2-4: Combine the four features and the number of iterations. Normalization was performed separately to eliminate dimensional differences, resulting in four normalized features. and normalized number of iterations ; Normalized features and number of loops Concatenation yields the feature vector The formula is as follows: in, Representing four characteristics The result obtained by splicing.
[0026] S3: The feature vector obtained in S2 The input is fed into the PINN-Mamba neural network, where a modified Mamba module extracts high-dimensional temporal features, which are then mapped to SOH predictions via a fully connected layer. Finally, the SOH predictions and their partial derivatives are compared with the feature vector. The partial differential equation is fitted into the Transformer encoder, and the obtained partial derivative numerical values are used to constrain the SOH prediction values. S3-1: As Figure 2 As shown, the PINN-Mamba neural network is divided into a So-H estimation module and a partial differential equation fitting module. The input feature vector... The values will be input into the SOH estimation module and the partial differential equation fitting module, respectively. The SOH prediction value and its partial derivative obtained by the SOH estimation module will also be input into the partial differential equation fitting module.
[0027] S3-2: The SOH estimation module mainly consists of a linear layer, layer normalization, an improved Mamba module, and a fully connected layer. The output of the linear layer is added element-wise to the output of the improved Mamba module via a residual connection. The mathematical expression of this module is as follows: in, This represents the predicted value of SOH. Indicates a fully connected layer. Representation layer normalization, This indicates an improved Mamba module. This indicates a linear layer.
[0028] like Figure 3 As shown, the improved Mamba module mainly consists of linear layers, dilated causal convolution modules, a selective state-space model, and the SiLU activation function. The mathematical expression of this module is as follows: in, Indicates module input, Indicates the module output. This represents a selective state-space model. This represents the SiLU activation function. This indicates a dilated causal convolution module. This indicates element-wise multiplication.
[0029] The dilated causal convolution module consists of three dilated causal convolutional layers with dilation rates of 2, 3, and 5. These layers expand the receptive field, mitigating the information forgetting problem in Mamba neural networks and enhancing the model's ability to model long-range dependencies. The mathematical expression of this module is as follows: in, Indicates the module output. Indicates module input.
[0030] The main formulas for the selective state-space model are as follows: in Indicates the corresponding number The module input for the next loop. Indicates the corresponding number The module output of the next loop. Indicates the corresponding number The hidden state of the next loop. , , and It corresponds to the first The parameter matrix of the second loop, where , , With input related.
[0031] The parameter matrix of the selective state-space model is related to the input and is a dynamic parameter matrix that can be adjusted in real time according to the input. This adapts to the uneven feature distribution of batteries under different aging states, effectively improving the model's global modeling capability. Simultaneously, the model needs to identify the current state of the battery through historical information; the dilated causal convolution module can alleviate the problem of information forgetting, making historical information richer and more accurate, and better leveraging the advantages of the dynamic parameter matrix.
[0032] S3-3: The partial differential equation fitting module consists of a Transformer encoder. To describe the battery degradation kinetics, the decay rate of the SOH can be expressed as: The above equation is an explicit partial differential equation (PDE). This represents a nonlinear function that characterizes the degradation dynamics within the battery. However, The explicit form of is unknown and difficult to obtain, so neural networks are introduced. By utilizing the powerful nonlinear fitting ability of neural networks to approximate nonlinear functions Here, the Transformer encoder is chosen as the neural network. To balance accuracy and computational complexity, only the first-order partial derivatives are retained, while higher-order derivatives are discarded. The mathematical expression of the module is as follows: in, This represents the SOH prediction value normalized to the cycle number. The partial derivatives are obtained using an automatic differentiation mechanism. This represents the output of the partial differential equation fitting module. Represents the SOH predicted value against the eigenvector. The partial derivatives are obtained using an automatic differentiation mechanism. These are the hidden states in the selective state-space model. The five internal variables are the inputs to the partial differential equation fitting module.
[0033] Considering that function approximators composed of neural networks are more flexible, and that the selective state-space model formula contains... It can be regarded as a variable related to SOH, so it is output from the SOH estimation module and then input into the partial differential equation fitting module, thus realizing the deep fusion of the two neural networks in PINN.
[0034] Then, the loss function will be used to make Approaching This allows for the fitting of partial differential equations.
[0035] S4: Optimize the PINN-Mamba neural network in S3 using the MSE loss function. On the test set, calculate the mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE) for the predicted and actual SOH values to verify the model performance and further improve the model parameters.
[0036] S4-1: Construct a three-term loss function, the first of which is the data term loss function. The second term is the partial differential loss function. The third term is the partial derivative monitoring loss. The specific formula is as follows: in, This represents the total number of battery cycles. The first output of the SOH estimation module SOH prediction value of the cycle, Representing the The actual SOH value of the cycle, The module representing the partial differential equation fitting corresponds to the first... The output of the cycle, Representing the SOH prediction value of cycle normalized to cycle number The partial derivatives, Representing the The true SOH value of the cycle with respect to the cycle number normalized value The partial derivatives of . It is the first The weights obtained from the partial differential residuals of the round cycle can be incorporated into the data term loss to penalize predictions with low data term loss but high partial differential loss, thereby further enhancing the physical constraints of the network.
[0037] Data Item Loss Function This allows the predicted SOH value to approximate the true value; the partial differential loss function... The partial derivatives output by the differential equation fitting module and the SOH prediction values output by the SOH estimation module can be normalized with respect to the number of cycles. The partial derivatives are equal, and the partial derivative monitoring loss These two partial derivatives and the true value of SOH can be normalized with respect to the number of cycles. The partial derivatives are equal, enabling the actual value to supervise the predicted value. These three losses work together to help the model comprehensively describe the global and local features of the battery degradation process.
[0038] Final total loss function The total loss function is obtained by weighting these three loss terms. These weights are learnable parameters that automatically find the optimal solution during model training, improving the model's adaptability. The formula for the total loss function is as follows: in, , These are learnable parameters.
[0039] In another aspect, the present invention also provides a lithium battery health state estimation system based on physical information and Mamba, for implementing the aforementioned lithium battery health state estimation method, comprising the following modules: The data acquisition module is used to acquire battery voltage and current data for each cycle of the lithium-ion battery charging phase, perform preprocessing, and form a preprocessed dataset.
[0040] The feature vector construction module extracts two features—constant voltage charging time and constant voltage charging capacity—based on the preprocessed dataset, and extracts two features—maximum incremental capacity and variance—based on the ICA curve, to construct the feature vector.
[0041] The SOH prediction module is used to input feature vectors into the PINN-Mamba neural network to obtain SOH prediction values.
[0042] The training and testing module optimizes the training of the PINN-Mamba neural network using a loss function and then tests and verifies it.
[0043] experiment: To avoid overfitting during training, an early stopping technique is employed. Training stops when the validation set loss does not decrease for 20 consecutive epochs. The mean squared error (MSE) is used as the loss function for the validation set loss. Finally, the model performance is evaluated using a test set, with the evaluation metrics being mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE).
[0044] in, Indicates the first The actual SOH value of the cycle, Indicates the first SOH prediction value for cycle.
[0045] The input data was used to validate the model's performance. Both the training and test sets contained battery data under three different operating conditions, with two batteries for each condition in both sets. This was used to verify the model's performance under multiple operating conditions and with limited data. Simultaneously, key hyperparameters of the network were modified, and the average loss was observed to optimize the hyperparameter configuration. The relevant experimental results are shown in Table 1. Table 1
[0046] The results show that the number of network layers and the hidden dimension are key parameters affecting model performance. As the number of network layers increases from 3 to 5, MAE, MAPE, and RMSE gradually decrease, with average reductions of 30.9%, 29.4%, and 23.2%, respectively, indicating a gradual improvement in model performance. However, when the number of network layers increases to 6, the loss increases, indicating that excessively deep networks lead to overfitting. When the hidden dimension increases from 16 to 32, MAE, MAPE, and RMSE show a decreasing trend; however, when the hidden dimension increases from 32 to 64, the loss shows an increasing trend. Compared to the number of network layers, the hidden dimension has a smaller impact on model performance. Ultimately, the model performance reaches its optimal level with 5 network layers and 32 hidden dimensions, with MAE, MAPE, and RMSE of 0.42%, 0.47%, and 0.62%, respectively. These results verify that the model of this invention is applicable to batteries under different operating conditions and can maintain high accuracy even with limited data, demonstrating strong practical application value.
Claims
1. A lithium battery health state estimation method based on physical information and Mamba, characterized in that, Includes the following steps: S1: Obtain battery voltage and current data for each cycle of the lithium-ion battery charging phase, perform preprocessing, and form a preprocessed dataset; S2: Based on the preprocessed dataset, extract two features: constant voltage charging time and constant voltage charging capacity. Based on the ICA curve, extract two features: maximum incremental capacity and incremental capacity variance, and construct a feature vector. ; S3: Transfer the feature vector The input is fed into the PINN-Mamba neural network to obtain the SOH prediction value; S4: Optimize the training of the PINN-Mamba neural network using the loss function, and then test and verify it.
2. The lithium battery health status estimation method based on physical information and Mamba according to claim 1, characterized in that, The specific implementation process of step S2 is as follows: S2-1: Based on the preprocessed dataset, extract the current segment during the constant voltage charging process, and determine the end time. With start time The difference is calculated, and the duration of this phase is the first feature. ; Then regarding the charging current ,in The sampling point is used to calculate the charging capacity during this stage using the ampere-hour integration method, which is the second feature. ; S2-2: Based on the preprocessed dataset, the charging capacity at each sampling point during the constant current charging stage is calculated using the ampere-hour integration method. Then obtain The value of is used to obtain the ICA curve, and Gaussian filtering is applied to the ICA curve to obtain the noise-reduced ICA curve; S2-3: Based on the denoised ICA curve, calculate the maximum value as the third feature. Then calculate the variance as the fourth feature. ; S2-4: Combine the four features and the cycle number Normalization is performed separately, and the number of iterations after normalization is: The four normalized features are concatenated to obtain the feature vector. The feature vector is obtained by concatenating the five terms. .
3. The lithium battery health state estimation method based on physical information and Mamba according to claim 2, characterized in that, Step S3 is specifically implemented as follows: The feature vector... The input is fed into the PINN-Mamba neural network, where high-dimensional temporal features are extracted using an improved Mamba module, and then mapped to SOH prediction values via a fully connected layer. Finally, the SOH prediction values and their partial derivatives are compared with the feature vector. The partial differential equation is input into the Transformer encoder and fitted, and the obtained partial derivative numerical values are used to constrain the SOH prediction values.
4. The lithium battery health state estimation method based on physical information and Mamba according to claim 3, characterized in that, The PINN-Mamba neural network is divided into a SoH estimation module and a partial differential equation fitting module; the input feature vector The values will be input into the SOH estimation module and the partial differential equation fitting module, respectively. The SOH prediction value and its partial derivative obtained from the SOH estimation module will also be input into the partial differential equation fitting module. The specific process is as follows: S3-1: The SOH estimation module mainly consists of a linear layer, layer normalization, an improved Mamba module, and a fully connected layer. The output of the linear layer is added element-wise to the output of the improved Mamba module through a residual connection. in, This represents the predicted value of SOH. Indicates a fully connected layer. Representation layer normalization, This indicates an improved Mamba module. Indicates a linear layer; S3-2: The partial differential equation fitting module is provided by the Transformer encoder. The mathematical expression of the composition and modules is as follows: in, This represents the output of the partial differential equation fitting module. Represents the SOH predicted value against the eigenvector. The partial derivatives are obtained using an automatic differentiation mechanism. These are the hidden states in the selective state-space model. The five internal variables are the inputs to the partial differential equation fitting module; This represents the SOH prediction value normalized to the cycle number. The partial derivatives are obtained using an automatic differentiation mechanism, and then the loss function is applied to make... Approaching This allows for the fitting of partial differential equations.
5. The lithium battery health state estimation method based on physical information and Mamba according to claim 4, characterized in that, The improved Mamba module consists of linear layers, dilated causal convolution modules, a selective state-space model, and the SiLU activation function, and is mathematically described as follows: in, Indicates module input, Indicates the module output. This represents a selective state-space model. This represents the SiLU activation function. This indicates a dilated causal convolution module. This indicates element-wise multiplication; The dilated causal convolution module consists of three dilated causal convolutional layers with different dilation rates.
6. The lithium battery health state estimation method based on physical information and Mamba according to claim 5, characterized in that, The loss function in S4 is as follows: S4-1: Construct a three-term loss function, the first of which is the data term loss function. The second term is the partial differential loss function. The third term is the partial derivative monitoring loss. The specific formula is as follows: in, This represents the total number of battery cycles. The first output of the SOH estimation module SOH prediction value of the cycle, Representing the The actual SOH value of the cycle, The module representing the partial differential equation fitting corresponds to the first... The output of the cycle, Representing the SOH prediction value of cycle normalized to cycle number The partial derivatives, Representing the The true SOH value of the cycle with respect to the cycle number normalized value The partial derivatives; It is the first The weights are calculated from the partial differential residuals of the cycle. Final total loss function It is obtained by weighting these three losses.
7. A lithium battery health state estimation system based on physical information and Mamba, used to implement the lithium battery health state estimation method according to any one of claims 1 to 6, characterized in that, Includes the following modules: The data acquisition module is used to acquire battery voltage and current data for each cycle of the lithium-ion battery charging stage, perform preprocessing, and form a preprocessed dataset. The feature vector construction module extracts two features—constant voltage charging time and constant voltage charging capacity—based on the preprocessed dataset, and extracts two features—maximum incremental capacity and variance of incremental capacity—based on the ICA curve, and constructs the feature vector. The SOH prediction module is used to input the feature vector into the PINN-Mamba neural network to obtain the SOH prediction value; The training and testing module optimizes the training of the PINN-Mamba neural network using a loss function and then tests and verifies it.