A lithium battery capacity online evaluation method and device based on double-layer incremental learning
By employing a two-layer incremental learning approach, a long-term trend and local deviation model is constructed. Combined with static voltage and incremental capacity characteristics, online capacity assessment of lithium batteries is performed, solving the problem of accuracy degradation of existing methods under changing operating conditions and achieving adaptive and efficient capacity estimation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-08
- Publication Date
- 2026-07-07
AI Technical Summary
Existing lithium battery capacity estimation methods struggle to balance long-term stability and short-term adaptability in practical applications, especially as model accuracy declines under changing operating conditions, and their reliance on offline training with large amounts of historical data leads to inflexibility.
A two-layer incremental learning approach is adopted to construct an outer long-term trend model and an inner local deviation model. Online prediction is performed using the static voltage recovery curve and incremental capacity features, and the final capacity estimation result is obtained through dynamic weight fusion, which supports online incremental updates of the model.
It enables adaptive capacity estimation to adapt to battery aging and changes in operating conditions without relying on the full training data, thereby improving the accuracy and robustness of capacity estimation and reducing computational and storage burden.
Smart Images

Figure CN122150892B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery capacity evaluation technology, and in particular to an online lithium battery capacity evaluation method and apparatus based on two-layer incremental learning. Background Technology
[0002] With the rapid development of new energy technologies, the application scale of electrochemical energy storage systems in power systems is constantly expanding. Lithium-ion batteries, due to their high energy density, long cycle life, and fast response speed, have become the mainstream technology for current energy storage systems. Accurate capacity assessment is not only related to determining the remaining usable energy of lithium batteries, but also directly affects the energy scheduling, lifespan prediction, and safety management of the battery management system.
[0003] Existing battery capacity estimation methods mainly include mechanistic model-based methods and data-driven methods. Mechanism-based methods typically rely on the battery's equivalent circuit model or electrochemical model, estimating battery capacity through parameter identification and state estimation. However, due to the complexity of the internal chemical reaction mechanism of the battery and its significant nonlinear characteristics under different operating conditions, these methods often suffer from problems such as high modeling difficulty, limited parameter identification accuracy, and sensitivity to environmental changes, thus limiting their practical engineering applications.
[0004] Data-driven approaches utilize battery operating data to establish a mapping relationship between capacity and characteristic parameters, which can, to some extent, avoid complex mechanistic modeling processes and have been widely used in recent years. For example, machine learning methods such as neural networks have been used to build capacity prediction models and have achieved high estimation accuracy under experimental data or specific operating conditions. However, these methods typically rely on offline training with a large number of historical samples. After the model is trained, the parameters are basically fixed. When the actual operating conditions are inconsistent with the training conditions, the input distribution is prone to drift, which leads to a decrease in capacity estimation accuracy.
[0005] Especially in practical applications, the training phase often uses standard charge-discharge or relatively ideal experimental conditions, while the actual operation phase often exhibits the following characteristics: large temperature fluctuations, inconsistent SOC working windows, frequent changes in charge-discharge rates, inconsistent resting times, and the inability to obtain a complete charge-discharge process. These differences lead to a significant distributional offset between training samples and actual operating samples, making it difficult for traditional offline models to maintain high accuracy over a long period.
[0006] Furthermore, battery capacity changes exhibit both long-term degradation and short-term volatility. Long-term degradation is primarily determined by cycle aging and calendar aging, with a relatively slow and continuous trend; short-term volatility is more caused by factors such as temperature changes, rate disturbances, differences in SOC range, and changes in resting conditions. Existing single models often struggle to simultaneously ensure both long-term stability and short-term adaptability.
[0007] Therefore, there is an urgent need for an online battery capacity assessment method that can update the capacity estimation model online without relying on the original full training data, using only features that are easily obtained during operation and a small number of new labeled samples, while taking into account both long-term trend learning and short-term perturbation adaptation capabilities. Summary of the Invention
[0008] To address the shortcomings of existing technologies, this invention provides a method and apparatus for online evaluation of lithium battery capacity based on two-layer incremental learning.
[0009] The technical solution of the present invention to solve the above-mentioned technical problems is as follows:
[0010] In a first aspect, the present invention provides an online capacity evaluation method for lithium batteries based on two-layer incremental learning, comprising the following steps:
[0011] Data acquisition and feature extraction: Collect battery operation data and extract statistical features and incremental capacity features of the static voltage recovery curve to construct a multi-dimensional feature vector for capacity estimation;
[0012] Model Construction and Initialization Training: A two-layer incremental learning architecture is constructed, which includes an outer long-term trend model and an inner local deviation model. The outer long-term trend model is used to characterize the long-term decay law of battery capacity, and a local deviation label is constructed based on the difference between the actual capacity and the long-term trend capacity. Then, the inner local deviation model is trained to characterize the local nonlinear fluctuation law of battery capacity based on the long-term decay trend.
[0013] Online prediction: For new samples acquired online, the trained outer long-term trend model and inner local bias model are called respectively to make predictions, and the corresponding long-term trend prediction value and local bias prediction value of capacity are obtained. The final capacity estimation result is obtained by dynamic weight fusion.
[0014] Online incremental update of the model: If the true capacity feedback value corresponding to the new sample can be obtained during the online operation, the model is updated using the true capacity feedback value; wherein, the parameters of the outer long-term trend model are corrected with a preset update step size, and the inner bias label is constructed using the output of the corrected outer long-term trend model, and the support vector set update based on incremental learning is performed on the inner local bias model.
[0015] Furthermore, the statistical characteristics of the stationary voltage recovery curve include one or more of the following: stationary voltage recovery amplitude, stationary average recovery slope, voltage recovery time constant, stationary voltage mean, and stationary voltage standard deviation; the incremental capacity characteristics include one or more of the following: peak value, peak voltage position, and peak area of the incremental capacity curve.
[0016] Furthermore, the outer long-term trend model adopts a recursive least squares model with a forgetting factor.
[0017] Furthermore, a forgetting factor is introduced into the recursive least squares model, so that the influence of historical samples on the current parameter estimation gradually decays over time, thereby enabling the model to continuously correct for new samples.
[0018] Furthermore, the inner local bias model adopts an incremental support vector regression model, which learns the nonlinear mapping relationship between short-term capacity bias and local features by dynamically maintaining the support vector set.
[0019] Furthermore, the process of obtaining the final capacity estimation result through dynamic weight fusion specifically involves:
[0020] The long-term trend predictions from the outer long-term trend model are superimposed with the local bias predictions from the inner local bias model. The expression for this superposition is as follows:
[0021] ;
[0022] in, This represents the final capacity forecast. This represents a long-term trend forecast. This represents the predicted value of the local deviation; This indicates the adjusted weight.
[0023] Furthermore, the update method for adjusting the parameters of the outer long-term trend model with a preset update step size is as follows:
[0024] ;
[0025] in, This represents the parameter vector of the outer long-term trend model after the t-th sample update; This represents the parameter vector of the outer long-term trend model before the update; This indicates the online update step size of the outer long-term trend model; This represents the capacity prediction error corresponding to the t-th sample; This represents the outer trend feature vector corresponding to the t-th sample.
[0026] Furthermore, the inner local bias model is updated with support vector sets based on incremental learning, specifically including:
[0027] Calculate the deviation between the inner layer bias label and the inner layer model prediction value of the current sample;
[0028] If the absolute value of the deviation exceeds the inner layer update error threshold, the current sample and its inner layer deviation label are added to the support vector set, and the parameters of the inner layer local deviation model are updated; otherwise, the inner layer local deviation model is not updated.
[0029] Secondly, the present invention also provides an online lithium battery capacity evaluation device based on two-layer incremental learning, comprising:
[0030] The data acquisition module is used to collect battery operating data;
[0031] The feature extraction module is used to extract static voltage statistical features and incremental capacity features from the operating data and construct a multi-dimensional feature vector.
[0032] The storage module is used to store historical sample sets, parameters of the outer long-term trend model, and support vector sets of the inner local bias model.
[0033] The two-layer prediction module includes an outer long-term trend model and an inner local deviation model. The outer long-term trend model receives the outer trend feature vector and outputs the long-term capacity trend prediction value. The inner local deviation model receives the inner local feature vector and outputs the local capacity deviation prediction value. The two-layer prediction module fuses the long-term capacity trend prediction value and the local capacity deviation prediction value to output the final capacity estimation result.
[0034] The incremental update module is used to correct the parameters of the outer long-term trend model and perform support vector set update based on incremental learning on the inner local bias model when the true capacity feedback value of the new sample is obtained and the prediction error exceeds the preset threshold.
[0035] Thirdly, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned online lithium battery capacity evaluation method based on two-layer incremental learning.
[0036] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned online lithium battery capacity evaluation method based on two-layer incremental learning.
[0037] In summary, compared with the prior art, the beneficial effects of the above technical solution are:
[0038] (1) This invention estimates capacity based on multi-source features that are readily available during actual operation, avoiding over-reliance on idealized standard operating conditions and thus exhibiting better engineering adaptability. By constructing a two-layer incremental learning structure consisting of a long-term trend layer and a local deviation layer, the long-term patterns during battery aging and the short-term changes caused by operating condition disturbances are modeled respectively, thereby balancing the stability and flexibility of the estimation results. At the same time, this invention supports online model updates, enabling adaptive adjustments as the battery aging process and operating conditions change, reducing reliance on repeated training with large-scale historical data, lowering computational and storage burdens, and demonstrating promising engineering application prospects.
[0039] (2) When new labeled samples appear during operation, a hierarchical update criterion is constructed based on the prediction error, and incremental update decisions are made for the outer long-term trend model and the inner local deviation model respectively. That is, by directly updating the support vector, it is not necessary to retrain all the data. Thus, the battery capacity model can be continuously adaptively optimized without relying on the original full training data. This invention can effectively improve the accuracy, robustness and engineering applicability of online capacity assessment under complex working conditions. Attached Figure Description
[0040] Figure 1 This is a flowchart of an online lithium battery capacity evaluation method based on two-layer incremental learning in an embodiment of the present invention;
[0041] Figure 2 This is a flowchart illustrating the model update judgment process in an embodiment of the present invention;
[0042] Figure 3 This is a schematic diagram of the static voltage recovery curve in an embodiment of the present invention;
[0043] Figure 4 This is a schematic diagram of the incremental capacity curve in an embodiment of the present invention;
[0044] Figure 5 This is a schematic diagram showing the results of an online lithium battery capacity evaluation method based on two-layer incremental learning in an embodiment of the present invention. Detailed Implementation
[0045] The principles and features of the present invention are described below with reference to all the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0046] This invention discloses an online capacity evaluation method and apparatus for lithium batteries based on two-layer incremental learning.
[0047] Reference Figures 1-5 In one specific embodiment of the present invention, an online capacity evaluation method for lithium batteries based on two-layer incremental learning is provided, comprising the following steps:
[0048] Data acquisition and feature extraction: Collect battery operation data and extract statistical features and incremental capacity features from the resting voltage recovery curve. Construct a multidimensional feature vector for capacity estimation. The multidimensional feature vector refers to the combination of multiple features extracted from the battery operation data for capacity estimation, specifically including the resting voltage statistical features and incremental capacity features.
[0049] Model Construction and Initialization Training: A two-layer incremental learning architecture is constructed, which includes an outer long-term trend model and an inner local deviation model. The outer long-term trend model is used to characterize the long-term decay law of battery capacity, and a local deviation label is constructed based on the difference between the actual capacity and the long-term trend capacity. Then, the inner local deviation model is trained to characterize the local nonlinear fluctuation law of battery capacity based on the long-term decay trend.
[0050] Online prediction: For the feature vector of a new sample acquired online, the trained outer long-term trend model and inner local bias model are called respectively to make predictions, so as to obtain the long-term trend prediction value and local bias prediction value of the capacity corresponding to the sample. The final capacity estimation result is obtained by dynamic weight fusion.
[0051] Online incremental model update: If the true capacity feedback value corresponding to the new sample can be obtained during online operation, the model is updated using this value; wherein, the parameters of the outer long-term trend model are corrected with a preset update step size, and the inner bias label is constructed using the output of the corrected outer long-term trend model, and the support vector set update based on incremental learning is performed on the inner local bias model.
[0052] This invention estimates capacity based on readily available multi-source features from actual operation, avoiding over-reliance on idealized standard operating conditions and thus exhibiting better engineering adaptability. By constructing a two-layer incremental learning structure consisting of a long-term trend layer and a local deviation layer, it models the long-term patterns during battery aging and the short-term changes caused by operational disturbances, thereby balancing the stability and flexibility of the estimation results. Simultaneously, this invention supports online model updates, enabling adaptive adjustments as the battery aging process and operating conditions change, reducing reliance on repeated training with large-scale historical data, lowering computational and storage burdens, and demonstrating promising engineering application prospects.
[0053] The above content will be explained in detail below:
[0054] S1: Collect the operating data of the target battery.
[0055] Specifically, the collected operational data includes battery terminal voltage, current, temperature, and battery state of charge (SOC). This operational data is collected and stored online by the battery management system.
[0056] S2: Extract features from the collected running data to construct the model input feature vector and training sample set.
[0057] Specifically, since it is difficult to obtain standardized charging and discharging conditions in actual operation, this embodiment focuses on selecting features that are easier to obtain in engineering scenarios and are strongly correlated with capacity decay, including the statistical characteristics of the static voltage recovery curve and the incremental capacity characteristics.
[0058] like Figure 2 As shown, when a battery enters a resting phase after charging or discharging, its terminal voltage recovers to a certain extent. This recovery curve is related to battery polarization, internal resistance, and aging state, and therefore can reflect information about capacity changes.
[0059] The statistical characteristics of the resting voltage recovery curve include at least one of the following: resting voltage recovery amplitude, resting average recovery slope, voltage recovery time constant, resting voltage mean, and resting voltage standard deviation.
[0060] Suppose that the voltage sequence recorded during a certain static segment is The initial time of settling is The time for the settling period to end is .
[0061] The static voltage recovery amplitude is defined as:
[0062] ;
[0063] in, Indicates the recovery amplitude of the static voltage; The voltage at the end of the settling period; This indicates the voltage at the initial moment of rest.
[0064] The static mean recovery slope is defined as:
[0065] ;
[0066] in, Indicates the average recovery slope after resting; Indicates the duration of stillness.
[0067] The static voltage recovery curve can be approximated as an exponential process:
[0068] ;
[0069] in, This represents the voltage sequence during the resting process; This represents the steady-state voltage after being left to stand still and tending to stabilize. Indicates the recovery amplitude coefficient; This represents the voltage recovery time constant.
[0070] The voltage recovery time constant can be obtained through fitting. A larger voltage recovery time constant usually indicates slower polarization decay, which may correspond to a more pronounced aging state. In addition to the static voltage recovery amplitude coefficient and voltage recovery time constant, statistical characteristics such as the mean and standard deviation of the static voltage curve can also be extracted.
[0071] The mean static voltage is expressed as:
[0072] ;
[0073] in, This represents the average static voltage. This indicates the total number of sampling points during the settling phase; Indicates the first n Voltage values at each stationary sampling point.
[0074] The standard deviation of the resting voltage is expressed as:
[0075] ;
[0076] in, This represents the standard deviation of the resting voltage.
[0077] The rate of change of a battery's capacity with respect to voltage during charging and discharging is called the incremental capacity curve. Incremental capacity characteristics include at least one or more of the following: the peak value of the main peak, the location of the peak voltage, and the peak area.
[0078] Incremental capacity curves are typically defined as:
[0079] ;
[0080] in, Indicates the first The incremental capacity value of each sampling interval; Indicates the first The capacity increment corresponding to each sampling interval; Indicates the first The voltage increment corresponding to each sampling interval.
[0081] To reduce the noise impact caused by differential operations, the incremental capacity curve can be smoothed first in practical processing, such as by Kalman filtering, moving average filtering, or Gaussian filtering. Then, the peak value, peak voltage location, and peak area can be extracted from the smoothed incremental capacity curve.
[0082] The peak value can be expressed as:
[0083] ;
[0084] Where P represents the peak value; This represents the incremental capacity curve.
[0085] The voltage position corresponding to the peak value can be represented as:
[0086] ;
[0087] in, Indicates the voltage position corresponding to the characteristic peak; Represents the incremental capacity curve; This represents the voltage value that maximizes the incremental capacity.
[0088] The peak area can be expressed as:
[0089] ;
[0090] in, Indicates the area of the characteristic peak; Indicates the left boundary voltage of the characteristic peak; Indicates the right boundary voltage of the characteristic peak; This represents the incremental capacity curve.
[0091] The final eigenvector can be represented as, where the final eigenvector is a multidimensional eigenvector:
[0092] ;
[0093] in, This represents the feature vector corresponding to the t-th sample; Let m represent the first to mth features of the t-th sample; m represents the total dimension of the features.
[0094] To eliminate the influence of different dimensions and magnitudes, the features are normalized. Preferably, a min-max normalization method is used.
[0095] ;
[0096] in, Represents the normalized i-th m One feature; Represents the first digit before normalization. m One feature; Indicates the first m The minimum value of each feature in the sample set; Indicates the first mThe maximum value of each feature in the sample set.
[0097] After feature extraction is completed, an initial training sample set is constructed. This initial training sample set contains multiple samples with known capacity and labels, which can be represented as:
[0098] ;
[0099] in, This represents the initial training sample set; Indicates the first t Feature vectors of each sample; represents the true capacity label of the t-th sample; N represents the total number of training samples.
[0100] S3: Training is performed using a two-layer model architecture.
[0101] The two-layer model consists of an outer layer model and an inner layer model. The outer layer model is a long-term trend model, i.e., the outer long-term trend model; the inner layer model is a local deviation model, i.e., the inner local deviation model.
[0102] Specifically, the outer model is mainly responsible for learning the long-term capacity decay trend, while the inner model is mainly responsible for learning the capacity deviation under the current local operating conditions.
[0103] The outer model is used to learn the long-term trend function of the capacity, which can be expressed as:
[0104] ;
[0105] in: This represents the long-term trend capacity prediction value output by the outer model; This represents the outer model mapping function; Let represent the feature vector of the t-th sample.
[0106] The outer layer model is used to characterize the long-term trend of battery capacity under the combined effects of cycle aging, calendar aging, and slowly changing operating conditions. Since the outer layer model fits the low-frequency, slowly varying part of capacity, it is required that the model has the following characteristics: first, it should be able to continuously correct model parameters using a small number of new samples, making it suitable for online updates; second, it should be able to avoid recalling all historical samples with each update, thereby reducing storage and computational overhead; and third, it should be able to retain historical trend information while being more sensitive to newer capacity changes, in order to adapt to the slow drift during the long-term aging process of the battery.
[0107] Based on the above considerations, the embodiments of the present invention preferably use a recursive least squares model with a forgetting factor as the outer long-term trend model.
[0108] Recursive least squares (RFS) is an online parameter identification method. Its core idea is that, upon receiving a new sample, instead of re-performing batch least squares on all historical data, it recursively calculates new parameter estimates using the parameter estimates from the previous time step and the current new sample. This significantly improves online update efficiency.
[0109] Furthermore, a forgetting factor is introduced into the recursive least squares model, so that the influence of historical samples on the current parameter estimation gradually decays over time, thereby enabling the model to continuously correct for new samples while representing the long-term trend of capacity.
[0110] The output of the outer model can be represented as:
[0111] ;
[0112] in, This represents the long-term trend capacity prediction value output by the outer model; Represents the parameter vector of the outer model; express transpose, superscript Indicates the transpose operation; Let represent the feature vector of the t-th sample.
[0113] To ensure the model can account for both historical capacity decay patterns and the aging state reflected in later training samples, a least squares criterion with a forgetting factor is used to solve for the model parameters. The objective function is:
[0114] ;
[0115] Where J represents the training objective function; N represents the total number of training samples; The label represents the true capacity of the t-th sample; This represents the feature vector of the t-th sample; This represents the forgetting factor, with a value between 0 and 1.
[0116] Specifically, during the training of the outer long-term trend model, the prediction error is calculated first:
[0117] ;
[0118] in, This represents the model prediction error for the t-th sample; The label represents the true capacity of the t-th sample; This represents the model parameter vector obtained from training the first t-1 samples; express transpose, superscript This indicates the transpose operation.
[0119] Then calculate the recursive gain:
[0120] ;
[0121] in, This represents the recursive gain vector corresponding to the t-th training sample; This represents the covariance matrix before the input of the t-th training sample (the (t-1)-th training sample); This represents the feature vector of the t-th sample; express The transpose of .
[0122] Then, the model parameters are updated based on the prediction error and the recursive gain vector:
[0123] ;
[0124] in, This represents the model parameter vector after inputting the t-th training sample; This represents the model parameter vector obtained from training the first t-1 samples.
[0125] Finally, update the covariance matrix:
[0126] ;
[0127] in, This represents the covariance matrix after inputting the t-th training sample.
[0128] After traversing all training samples according to the above recursive process, the parameter vector of the trained outer long-term trend model is obtained. This allows us to obtain the long-term trend model of the outer layer.
[0129] The outer model is used to predict the long-term trend of the training samples. Then, the difference between the actual capacity and the long-term trend capacity is used to construct a local bias label. Finally, the inner local bias model is trained to characterize the local nonlinear fluctuation law of battery capacity based on the long-term decay trend.
[0130] The inner model is used to learn the deviations caused by short-term local conditions, and can be represented as:
[0131] ;
[0132] in, This represents the local bias prediction value of the t-th sample output by the inner model; This represents the inner model mapping function; The feature vector of the t-th sample to be predicted.
[0133] The inner local bias model employs an incremental support vector regression (ISVR) model to establish the mapping relationship between inner local features and capacity bias values. The ISVR model output is expressed as:
[0134] ;
[0135] In the formula, This represents the local bias prediction value of the t-th sample output by the inner model; This represents the incremental support vector regression function; Indicates the number of support vectors; and Let represent the upper bound Lagrange multiplier and the lower bound Lagrange multiplier corresponding to the i-th support vector, respectively; Represents the kernel function; This represents the feature vector of the i-th support vector; denoted as , b represents the feature vector of the t-th sample to be predicted; b represents the regression bias term.
[0136] The optimization objective of the incremental support vector regression model can be expressed as:
[0137] ;
[0138] in, represents the weight vector of the regression hyperplane; c represents the penalty factor; M represents the total number of training samples; and Let represent the upper bias relaxation variable and the lower bias relaxation variable corresponding to the t-th training sample, respectively; This indicates the error threshold for updating the inner model; This represents a nonlinear mapping function that maps input features to a high-dimensional feature space. The weight vector representing the regression hyperplane transpose; superscript This indicates the transpose operation.
[0139] Radial basis kernel function is preferred:
[0140] ;
[0141] in, This represents the L2 norm between two sample feature vectors; These are the parameters for the kernel function.
[0142] During training, the inner training samples are sequentially input into the incremental support vector regression model. The new samples are used to adjust the support vector set and model parameters, so that the model gradually learns the nonlinear correspondence between the local bias of the capacity and the local features of the inner layer.
[0143] As training samples are continuously input, the model retains only the support vectors that contribute to the regression function, and determines the Lagrange multipliers and regression bias terms corresponding to each support vector, thereby completing the training of the inner local bias model.
[0144] S4: Obtain new samples, perform two-layer prediction on the new samples, and output capacity values.
[0145] When a new sample is obtained during online operation, the outer and inner models that have been trained are first called to make predictions, and the long-term trend prediction value and local deviation prediction value of the capacity corresponding to the sample are obtained. Then, the two prediction results are superimposed to output the final capacity value.
[0146] Specifically, for the t-th new sample obtained during online operation, the corresponding outer-layer trend features and inner-layer local features are first generated according to the same feature construction method described above, and then input into the already trained outer-layer model and inner-layer model respectively to obtain the long-term trend prediction value of the capacity. and local deviation prediction value Based on this, the final capacity prediction value for the t-th new sample is... It can be represented as:
[0147] ;
[0148] in, This represents the final predicted capacity value for the t-th sample; This represents the capacity prediction value of the outer long-term trend model for the t-th sample; This represents the predicted value of local deviation in the inner layer; This indicates the adjusted weight, which can be set to 1.
[0149] By using the above method, the overall capacity decay trend is estimated using the outer layer model, and the local deviation is compensated using the inner layer model, thereby obtaining the final capacity value and realizing online prediction of battery capacity.
[0150] S5: If the true capacity value of new samples is obtained during online operation, then perform online incremental updates of the model.
[0151] After obtaining sample labels with true capacity values, the error between the final capacity value of the previous model and the true capacity value is first calculated. If the error does not exceed a threshold, no update is performed. If it exceeds the threshold, it is then determined whether the outer model needs to be updated. The error between the outer model's predicted value and the true capacity is compared with the outer model update error threshold. If it exceeds the threshold, the outer model is updated; otherwise, no update is performed. Then, the local bias is calculated. If the outer model has been updated, the difference between the updated outer model's predicted value and the true capacity value is compared with the preset inner model update error threshold. If the outer model has not been updated, it means that the outer model's prediction effect is good, and the predicted value of the unupdated outer model is directly compared with the true capacity value.
[0152] Specifically, after completing the two-layer prediction and outputting the capacity value for a new sample, if the actual capacity value corresponding to that sample can be obtained during online operation, the model is further updated using that sample. This allows the model to adapt to capacity degradation drift caused by individual battery differences, changes in operating conditions, and changes in aging stages. The online update process does not retrain all historical samples; instead, it incrementally corrects the outer layer model parameters and the inner layer incremental support vector regression model based on the newly obtained samples. This reduces the online computational load and improves the predictive stability of the model during long-term operation.
[0153] More specifically, for the t-th new sample during the online operation, the final capacity prediction value has already been obtained in step S4. In actual operation, the true capacity of a battery needs to be obtained by integrating the current over a complete full charge or full discharge cycle. A full charge or full discharge refers to the depth of discharge (100% state of charge) or the complete charge-discharge cycle from a fully discharged state to a fully charged state. Under full charge and discharge conditions, the battery's state of charge changes cover the entire usable capacity range. Therefore, the charge obtained by integrating the charge and discharge current over time accurately reflects the battery's current true capacity. In actual operation scenarios, full charge and discharge conditions may occur, including but not limited to: standardized capacity tests performed according to prescribed charge and discharge procedures during regular maintenance; manual correction charge and discharge tests triggered by maintenance personnel after discovering capacity prediction deviations; and complete charge and discharge cycles that naturally occur during daily operation (such as when an electric vehicle user uses the vehicle from a fully charged state to a low charge and then recharges it). Regardless of the reason for triggering a full charge and discharge cycle, as long as the charge and discharge process covers the entire usable capacity range of the battery, the battery management system can integrate the current over time during the entire discharge process to obtain the true capacity. .
[0154] Obtain the true size corresponding to the sample. When calculating the prediction error for that sample... Its expression is:
[0155] ;
[0156] in, This represents the capacity prediction error corresponding to the t-th online sample; This represents the true capacity value corresponding to the t-th online sample, also known as the true capacity label; This represents the final capacity prediction value corresponding to the t-th online sample.
[0157] To avoid frequent model updates caused by accidental measurement noise or short-term operating condition disturbances, a model update error threshold is set. This value is the default value. When The absolute value does not exceed When the current model is considered to still meet the capacity estimation accuracy requirements, no model update is performed; when The absolute value exceeds At this point, it is determined that the current model's fit to the online sample is insufficient, and an online incremental update needs to be initiated. Specifically:
[0158] ;
[0159] in, This represents the absolute value of the prediction error corresponding to the t-th online sample; This indicates the preset model update error threshold, used to determine whether to initiate online model updates.
[0160] When the update conditions are met, first determine whether the outer long-term trend model needs to be updated.
[0161] Specifically:
[0162] Calculate the prediction bias of the outer long-term trend model for the t-th new sample. :
[0163] ;
[0164] in, Let t be the true capacity value of the t-th sample. This is the capacity value predicted by the outer long-term trend model for the t-th sample.
[0165] if If the outer trend prediction is within a reasonable range and the deviation is within the normal local fluctuation range, then there is no need to update the outer model, and we can directly proceed to judge whether the inner model needs to be updated.
[0166] if If the outer long-term trend has shifted significantly, then an update to the outer model is required.
[0167] in, Let s be the prediction bias of the outer long-term trend model for the t-th new sample, and s be the outer model update error threshold.
[0168] When satisfied At that time, update the parameters of the outer layer model:
[0169] ;
[0170] in, Let be the feature vector corresponding to the t-th sample; The capacity value predicted by the outer long-term trend model for the t-th sample; This represents the outer model parameter vector after the t-th sample update; This represents the outer model parameter vector before the update; This represents the online update step size of the outer model. A larger value indicates a stronger influence of the current sample on the parameter updates of the outer model; a smaller value indicates a weaker influence of the current sample on the parameter updates. Preferably, the online update step size can be set to a small positive number, satisfying... This is to ensure that the parameter updates of the outer model are gradual and smooth.
[0171] After correcting the outer model parameters, the long-term trend capacity estimate for the sample is recalculated using the updated outer model, and the bias label of the inner model is calculated accordingly. The updated outer model output is... Then the inner layer bias label corresponding to the t-th sample Represented as:
[0172] ;
[0173] in, This indicates that the t-th sample is used to update the capacity bias label of the inner model; This represents the actual capacity value corresponding to the t-th sample; This represents the long-term trend capacity prediction value of the outer model output for the t-th sample after online updating.
[0174] Subsequently, the feature vector of the t-th sample... and its capacity deviation label The new training samples are input into the inner incremental support vector regression model. Compared with the current regression function predicted value The deviation relationship between the samples determines whether the newly added sample should be retained as a new support vector.
[0175] Specifically, if The newly added sample is considered to have a small contribution to the correction of the current inner regression function, and therefore will not be added to the support vector set.
[0176] if The sample is then added to the support vector set and an incremental update is performed.
[0177] in, This represents the error threshold for updating the inner model.
[0178] It should be noted that if the outer model is not updated (i.e. Then, the inner layer bias label is calculated directly based on the unupdated outer layer model output capacity value (i.e., ).
[0179] After correcting the outer model parameters and updating the inner incremental support vector regression model, the updated model parameters are used as the model parameters for capacity prediction at the next time step. Thus, the model can adaptively correct itself as new samples are continuously input during battery operation, achieving online updates to the capacity prediction model. This online update method can continuously absorb new capacity feedback information without fully retraining the model, improving the model's adaptability to changes in battery aging status, operating condition shifts, and individual differences.
[0180] The following specific examples further illustrate this point:
[0181] Taking a single battery cell with a rated capacity of 1.4Ah as the object, battery voltage, current, temperature, and SOC data were collected according to step S1. Following step S2, 120 historical samples with capacity labels were selected to construct an initial sample set. The two-layer model was trained according to step S3, where the outer long-term trend model was a recursive least squares model with a forgetting factor. Subsequently, according to step S3, the trained outer model output long-term trend capacity values for each of the 120 samples, and the local bias label for each sample was calculated. Incremental support vector regression was then used to train the inner local bias model. According to step S4, after obtaining a new sample, inputting the sample into the outer model yielded a long-term trend capacity prediction value of 1.360Ah; inputting the sample's features into the inner local bias model yielded a local bias prediction value of -0.021Ah. Therefore, the final capacity prediction value obtained from step S4 is: 1.360Ah + (-0.021Ah) = 1.339Ah. The new sample obtained a true capacity of 1.370 Ah during the full-fill process. Model update error threshold. The outer model update error threshold s is set to 0.028Ah, and the inner model error threshold is set to 0.012Ah. Set to 0.008Ah. The final capacity prediction error is... Ah is greater than the model update error threshold of 0.028Ah, indicating that the current model's fit to this sample is insufficient and a model update is needed. Then, the prediction error of the outer model is calculated as follows: Ah is less than the set outer model update error threshold of 0.012Ah, so the outer model parameters are not updated. The error of the inner model prediction is calculated as follows: Ah is greater than the set inner layer model update error threshold of 0.008Ah, indicating that the local bias model of the inner layer causes a large deviation in the final capacity prediction value, so the inner layer model is updated.
[0182] Forty samples were subjected to capacity assessment testing according to the method of this invention, and attached... Figure 4 The figure shows a comparison between the actual capacity curve and the estimated capacity curve. As can be seen from the figure, the two curves generally show a high degree of agreement, and the estimated capacity value can effectively track the changing trend of the actual capacity value, verifying the effectiveness of the method of this invention.
[0183] Secondly, based on the same inventive concept, embodiments of the present invention also disclose an online lithium battery capacity evaluation device based on two-layer incremental learning.
[0184] An online capacity evaluation device for lithium batteries based on two-layer incremental learning includes:
[0185] The data acquisition module is used to collect battery operating data;
[0186] The feature extraction module is used to extract static voltage statistical features and incremental capacity features from the operating data and construct a multi-dimensional feature vector.
[0187] The storage module is used to store historical sample sets, parameters of the outer long-term trend model, and support vector sets of the inner local bias model.
[0188] The two-layer prediction module includes an outer long-term trend model and an inner local deviation model. The outer long-term trend model receives the outer trend feature vector and outputs the long-term capacity trend prediction value. The inner local deviation model receives the inner local feature vector and outputs the local capacity deviation prediction value. The two-layer prediction module fuses the long-term capacity trend prediction value and the local capacity deviation prediction value to output the final capacity estimation result.
[0189] The incremental update module is used to correct the parameters of the outer long-term trend model and perform support vector set update based on incremental learning on the inner local bias model when the true capacity label of the new sample is obtained and the prediction error exceeds the preset threshold.
[0190] Thirdly, embodiments of the present invention also disclose a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned online lithium battery capacity evaluation method based on two-layer incremental learning.
[0191] Fourthly, embodiments of the present invention also disclose a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned online lithium battery capacity evaluation method based on two-layer incremental learning.
[0192] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for online evaluation of lithium battery capacity based on two-layer incremental learning, characterized in that, Includes the following steps: Data acquisition and feature extraction: Collect battery operation data and extract statistical features and incremental capacity features of the static voltage recovery curve to construct a multi-dimensional feature vector for capacity estimation; Model Construction and Initialization Training: A two-layer incremental learning architecture is constructed, which includes an outer long-term trend model and an inner local deviation model. The outer long-term trend model is used to characterize the long-term degradation law of battery capacity, and a local deviation label is constructed based on the difference between the actual capacity and the long-term trend capacity. Then, the inner local deviation model is trained. The inner local deviation model is used to characterize the local nonlinear fluctuation law of battery capacity based on the long-term degradation trend. Online prediction: For new samples acquired online, the trained outer long-term trend model and inner local bias model are called respectively to make predictions, and the corresponding long-term trend prediction value and local bias prediction value of capacity are obtained. The final capacity estimation result is obtained by dynamic weight fusion. The specific steps for obtaining the final capacity estimation result through dynamic weight fusion are as follows: The long-term trend predictions from the outer long-term trend model are superimposed with the local bias predictions from the inner local bias model. The expression for this superposition is as follows: ; in, This represents the final capacity forecast. This represents a long-term trend forecast. This represents the predicted value of the local deviation; Indicates the adjusted weights; Online incremental model update: If the true capacity feedback value corresponding to the new sample can be obtained during online operation, the model is updated using the true capacity feedback value. Specifically, the parameters of the outer long-term trend model are corrected with a preset update step size, and the inner bias labels are constructed using the output of the corrected outer long-term trend model. The inner local bias model is then updated using support vector sets based on incremental learning. When updating the model, after obtaining sample labels with true capacity values, the error between the final capacity value and the true capacity value of the previous model is first calculated. If the error does not exceed a threshold, no update is performed. If it exceeds the threshold, it is then determined whether the outer model needs to be updated. That is, the error between the outer predicted value and the true capacity is compared with the outer update error threshold. If it exceeds the threshold, an outer update is performed; otherwise, no update is performed. Then, the local bias is calculated. If the outer model has been updated, the difference between the updated outer model predicted value and the true capacity value is compared with the preset inner update error threshold. If the outer model has not been updated, the predicted value of the outer model before the update is directly compared with the true capacity value. The update method for adjusting the parameters of the outer long-term trend model with a preset update step size is as follows: ; in, This represents the outer long-term trend model parameter vector after the t-th sample update; This represents the parameter vector of the outer long-term trend model before the update; This indicates the online update step size of the outer long-term trend model; This represents the capacity prediction error corresponding to the t-th sample; This represents the outer trend feature vector corresponding to the t-th sample; The inner local bias model is updated using support vector set updates based on incremental learning, specifically including: Calculate the deviation between the inner layer bias label and the inner layer model prediction value of the current sample; If the absolute value of the deviation exceeds the inner layer update error threshold, the current sample is added to the support vector set, and the parameters of the inner layer local bias model are updated; otherwise, the inner layer local bias model is not updated.
2. The online capacity evaluation method for lithium batteries based on two-layer incremental learning according to claim 1, characterized in that: The statistical characteristics of the static voltage recovery curve include one or more of the following: static voltage recovery amplitude, static average recovery slope, voltage recovery time constant, static voltage mean, and static voltage standard deviation. The incremental capacity characteristics include one or more of the following: the peak value of the main peak, the peak voltage position, and the peak area of the incremental capacity curve.
3. The online capacity evaluation method for lithium batteries based on two-layer incremental learning according to claim 1, characterized in that: The outer long-term trend model adopts a recursive least squares model with a forgetting factor.
4. The online capacity evaluation method for lithium batteries based on two-layer incremental learning according to claim 1, characterized in that: The inner-layer local deviation model employs an incremental support vector regression model.
5. A lithium battery capacity online evaluation device based on two-layer incremental learning, characterized in that, The method for online evaluation of lithium battery capacity based on bilayer incremental learning as described in any one of claims 1-4 includes: The data acquisition module is used to collect battery operating data; The feature extraction module is used to extract static voltage statistical features and incremental capacity features from the operating data and construct a multi-dimensional feature vector. The storage module is used to store historical sample sets, parameters of the outer long-term trend model, and support vector sets of the inner local bias model. The two-layer prediction module includes an outer long-term trend model and an inner local deviation model. The outer long-term trend model receives the outer trend feature vector and outputs the long-term capacity trend prediction value. The inner local deviation model receives the inner local feature vector and outputs the local capacity deviation prediction value. The two-layer prediction module fuses the long-term capacity trend prediction value and the local capacity deviation prediction value to output the final capacity estimation result. The incremental update module is used to correct the parameters of the outer long-term trend model and perform support vector set update based on incremental learning on the inner local bias model when the true capacity feedback value of the new sample is obtained and the prediction error exceeds the preset threshold.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements an online lithium battery capacity evaluation method based on two-layer incremental learning as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements an online lithium battery capacity evaluation method based on two-layer incremental learning as described in any one of claims 1-4.
Citation Information
Patent Citations
Method, apparatus and system for estimating SOC of lifepo4 battery based on section-specific SOC calibration
KR102839219B1
Battery model construction method and battery degradation prediction device
US20230023044A1