A lithium battery state of health estimation method based on CNN-Bagging model and EIS data
By constructing a lithium battery state of health estimation method based on a CNN-Bagging model, and using EIS data to extract features and combining them with Bagging ensemble learning, the accuracy and reliability issues of lithium battery state of health estimation in existing technologies are solved, and high-precision and stable SOH estimation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTHWEST JIAOTONG UNIV
- Filing Date
- 2026-03-11
- Publication Date
- 2026-05-29
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the field of battery management system optimization and safe operation and maintenance, and proposes a method for estimating the health status of lithium batteries based on CNN-Bagging model and EIS data. Background Technology
[0002] With the rapid development of new energy technologies, lithium batteries have been widely used in electric vehicles, portable electronic devices, and energy storage systems. The State of Health (SOH) of a lithium battery plays a decisive role in its overall performance, safety, and long-term efficiency. Accurately estimating the SOH of a lithium battery is crucial for optimizing the Battery Management System (BMS), extending battery life, and improving system safety. In recent years, research on lithium battery SOH estimation has mainly focused on data-driven methods and physical model-based methods. Data-driven methods analyze data such as voltage, current, and temperature collected during battery charging and discharging, and use machine learning algorithms to build estimation models. However, while these external operating data can macroscopically reflect the battery degradation trend, they neglect internal microscopic electrochemical changes, leading to significant errors in the initial activation stage and the later rapid degradation stage, making accurate and reliable SOH estimation difficult.
[0003] Furthermore, while physical model-based methods can provide a deep understanding of the physicochemical processes inside batteries, the models are complex and computationally expensive. In practical applications, battery management systems require a State of Health (SOH) estimation method that can accurately reflect changes in the battery's internal state while also possessing high accuracy and robustness. Therefore, further improving the accuracy, interpretability, and generalization ability of SOH estimation models is a key focus and challenge in current research. Summary of the Invention
[0004] The purpose of this invention is to address the technical problem that current SOH estimation methods rely heavily on external operating data such as voltage, current, and temperature. While these methods can macroscopically reflect the battery degradation trend, they neglect internal microscopic electrochemical changes, making it difficult to achieve accurate and reliable SOH estimation.
[0005] To achieve its objective, the present invention employs the following technical solution:
[0006] This invention provides a method for estimating the health status of lithium batteries based on a CNN-Bagging model and EIS data, comprising the following steps:
[0007] Step 1: Read EIS data from the open-source dataset and preprocess it, filtering impedance data and target values as feature columns. The target value is the ratio of discharge capacity to original capacity.
[0008] Step 2: Standardize the preprocessed EIS data to ensure that each feature dimension has zero mean and unit variance, and divide the standardized dataset into training and test sets;
[0009] Step 3: Construct the CNN base learner network structure, which includes convolutional layers, activation function layers, pooling layers and fully connected layers connected in sequence. The standardized EIS data is used as input. Local features related to battery health status are extracted from the EIS data through learnable filters. Non-linearity is introduced by the activation function. The data is downsampled by the pooling layer and then integrated by the fully connected layer to map the features to the battery health status value.
[0010] Step 4: Train the CNN base learner using an adaptive learning rate strategy. If the validation loss does not improve after a preset number of consecutive iterations, adjust the learning rate.
[0011] Step 5: Using the Bagging ensemble learning method, N subset training sets are generated by sampling with replacement using Bootstrap, where N is an integer from 5 to 15. N CNN base learners are trained on each subset, and the health status estimation results of each base learner are integrated to form the final lithium battery health status estimation model.
[0012] Step 6: Input the EIS data of the lithium battery under test into the lithium battery health state estimation model, and output the battery health state estimate. .
[0013] In the above scheme, the preprocessing step includes:
[0014] Read all electrochemical impedance spectroscopy (EIS) data from an open-source dataset;
[0015] Invalid data is removed. The invalid data is the frequency point where valid=0, where valid is a data validity identifier used to mark the validity status of a specific frequency point in the EIS measurement data.
[0016] Extreme outliers are removed, defined as data points whose amplitude / phase differs from adjacent points by more than three standard deviations.
[0017] For low-frequency data in the 0.5-5kHz range, a moving average filter with a window size of 3 is used to balance noise suppression and signal fidelity.
[0018] The impedance data and target value obtained from the screening are used as feature columns, where the target value is the ratio of discharge capacity to original capacity.
[0019] In the above scheme, in step 2:
[0020] The StandardScaler function is used to standardize the features obtained in step 1, so that the standardized data has a mean of 0 and a standard deviation of 1, thus eliminating the difference in units between features and the bias in data distribution.
[0021] The obtained standardized EIS dataset is split into a training set and a test set in a ratio of 8:2;
[0022] The split training and test sets are converted into PyTorch tensor format for use in subsequent model training and estimation.
[0023] The above scheme involves constructing a CNN base learner network structure, including the following steps:
[0024] Step 3.1: Set the CNN model to contain two convolutional layers. After receiving EIS data from the input layer, apply a learnable filter to extract local features of the EIS data, and reduce the complexity of the model through parameter sharing and local connections.
[0025] Introducing nonlinearity by using the ReLU linear correction unit as the activation function in convolutional layers:
[0026]
[0027] This function sets all negative input values to zero while keeping positive input values unchanged, thus ensuring computational efficiency and effectively mitigating the gradient vanishing problem.
[0028] Therefore, the network structure can learn features closely related to SOH in EIS data at multiple frequencies, and the output formula of the convolutional layer is:
[0029]
[0030] in, This represents the convolution operation. Indicates a filter. Indicates the deviation value. This represents the feature values extracted from the EIS data. This represents the activation function. Indicates the number of layers in the network. Representing the The first in the layer One characteristic, Representing the In the current layer Features that are connected together;
[0031] Step 3.2: Downsample the EIS data feature values output by the convolutional layer using max pooling to retain key features while reducing redundant information. The formula for max pooling is:
[0032]
[0033] Where x represents the activation parameter value of the corresponding neuron, and p represents the EIS feature value most relevant to the SOH of the lithium battery after processing. This represents the activation parameter value corresponding to the i-th feature in the l-th layer at the t-th position within the pooling window. This represents the pooling window of the i-th feature map in the l-th layer. The index identifier of each position;
[0034] Step 3.3: Integrate the features extracted from the pooling layer through the fully connected layer, and map the extracted impedance features to the battery health status value.
[0035] In the above scheme, step 4 uses the Adam optimizer and a scheduling strategy with an initial learning rate of 0.001 to train the CNN model; when the validation loss does not improve within 5 consecutive estimation lithium battery SOH iterations, the learning rate is multiplied by 0.5 to optimize the model training process.
[0036] The above scheme employs the Bagging ensemble learning method, which includes the following sub-steps:
[0037] Step 5.1: Apply the Bootstrap sampling method with replacement to the training set obtained in Step 2, and repeat the sampling N times to obtain N independent sub-training sets, where N is an integer from 5 to 15.
[0038] Step 5.2: Input each sub-training set into the CNN base learner constructed in Step 3, and train in parallel to obtain N independent CNN base learner models. During the training process, optimize the model hyperparameters through 5-fold cross-validation.
[0039] Step 5.3: Construct the Bagging ensemble framework. Integrate the results of the N trained CNN base learner models using a weighted average method to form a CNN-Bagging lithium battery health status estimation model.
[0040] In the above scheme, between step 2 and step 3, a random seed of 42 is set to ensure that the data can be randomly divided in each experiment and that the model initialization and the optimizer operation are consistent.
[0041] In the above scheme, the estimation results of the lithium battery health state estimation model are evaluated using the mean absolute error (MAE) and the coefficient of determination (R²). 2 As an evaluation indicator, its calculation formula is as follows:
[0042]
[0043]
[0044] Where n represents the number of samples. This represents the SOH estimate of the i-th sample output by the CNN-Bagging model. This represents the true value of SOH. This represents the mean of the true values of SOH;
[0045] The smaller MAE and R 2 The closer the value is to 1, the higher the model estimation accuracy and the better the fitting effect.
[0046] Next, a graph is plotted showing the number of iterations versus the estimated / actual SOH. By comparing the trends of the estimated and actual SOH, the estimation performance and stability of the model can be evaluated intuitively.
[0047] In summary, compared with the prior art, the beneficial effects of the present invention are:
[0048] 1. This invention solves the technical problems of difficulty in effectively extracting multi-frequency associated features and the limitation of estimation accuracy caused by insufficient single feature dimension in EIS data by using the technical means in step 4, namely, "constructing a CNN base learner with two convolutional layers, extracting local features of EIS data using learnable filters, introducing nonlinearity by combining the ReLU activation function, and then downsampling through max pooling and integrating features through a fully connected layer". It achieves comprehensive capture of multi-scale, deep-level features closely related to SOH in EIS data, enabling the model to explore the mapping relationship between hidden electrochemical changes and health status in the data, and significantly improving the completeness of feature representation.
[0049] 2. This invention solves the technical problems of overfitting, weak generalization ability, and insufficient estimation stability of a single CNN model under different temperature conditions and during rapid battery degradation by using the technical means in step 6, which involves "using Bootstrap sampling to obtain 10 independent sub-training sets, training multiple CNN base learners in parallel, and then integrating the model results using a weighted average method". This effectively reduces the prediction variance of a single model, enabling the model to maintain stable performance in a wide temperature range of 10℃ to 45℃ and during the rapid degradation stage when SOH < 0.8, thus significantly improving robustness.
[0050] 3. This invention solves the technical problems of low model training efficiency caused by differences in data dimensions and distribution shifts, as well as the impact of random factors on experimental reproducibility and the fairness of performance comparison, by using the "standardScaler function to standardize features, split the dataset in an 8:2 ratio and convert it to PyTorch tensor format" in step 2 and the "fixed random seed of 42" in step 3. This makes the data features have the uniform characteristics of a mean of 0 and a standard deviation of 1, improves the convergence speed of model training, and ensures that the performance comparison under different experimental settings is more objective and reliable, avoiding estimation errors caused by improper data preprocessing or random interference.
[0051] 4. This invention combines the following techniques: precise EIS data preprocessing (step 1), deep CNN feature extraction (step 4), Bagging ensemble learning (step 6), standardized and fixed random seed data optimization (steps 2 and 3), and adaptive learning rate model training (step 5). This combination produces a synergistic effect: EIS data preprocessing provides high-quality, highly relevant core input for the subsequent model; the CNN model fully mines the deep features in the data; Bagging ensemble learning compensates for the generalization defects of a single model; and data optimization and adaptive training strategies ensure the efficiency and stability of model training. This multi-pronged approach not only solves the single-method problems of existing technologies, such as difficulty in capturing internal states, insufficient model robustness, or imbalance between accuracy and stability, but also achieves end-to-end optimization of data quality, feature extraction, model stability, and training efficiency. Ultimately, the model achieves high accuracy levels of MAE ≤ 0.01 and R² ≥ 0.9 across different battery types (LCO, NMC), wide temperature conditions, and the entire life cycle, meeting the core requirements of battery management systems for SOH estimation: "accurate, reliable, and stable." Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. The above and other objects, features, and advantages of the present invention will become clearer through the drawings. In all the drawings, the same reference numerals indicate the same parts, and the drawings are not intentionally drawn to scale with actual dimensions; the focus is on illustrating the main points of the present invention.
[0053] Figure 1 This is a flowchart of the method of the present invention;
[0054] Figure 2The above describes the SOH estimation results of the method of this invention on a lithium cobalt oxide (LCO) battery dataset in a simulation experiment.
[0055] Figure 3 The above describes the SOH estimation results of the nickel-manganese-cobalt (NMC) lithium battery dataset using the method of this invention in a simulation experiment.
[0056] Figure 4 The results of the simulation experiment show the comparison between the method of this invention and the method of using external running data for SOH estimation.
[0057] Figure 5 The results show the comparison between the method of this invention and other algorithms for SOH estimation in simulation experiments. Detailed Implementation
[0058] 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, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0059] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0060] This invention provides a method for estimating the state of health (SOH) of lithium batteries based on a CNN-Bagging model and EIS data, comprising the following steps:
[0061] Step 1: Read all EIS data from the open-source dataset. Since EIS (electrochemical impedance spectroscopy) data are derived from actual electrochemical testing processes, invalid data (frequency points with valid=0) and extreme outliers (amplitude / phase differences exceeding 3 standard deviations from adjacent points) need to be removed. A moving average filter (window size 3) is applied to the low-frequency (0.5–5kHz) data to balance noise suppression and signal fidelity. Then, the filtered impedance data and target value (the ratio of discharge capacity to original capacity) are used as feature columns.
[0062] Step 2: To eliminate dimensional differences between features and data distribution biases, the features obtained in Step 1 are standardized using the StandardScaler function. Standardized data has a mean of 0 and a standard deviation of 1, which helps improve model training efficiency and estimation performance. The resulting standardized EIS dataset is then split into training and test sets in an 8:2 ratio (using data from Lithium Battery 1 in this example), and converted to PyTorch tensor format for use in subsequent model training and estimation.
[0063] Step 3: To ensure the reproducibility of experimental results and eliminate the impact of random initialization and sample resampling on model performance evaluation, a fixed random seed is used throughout the training process of the CNN-Bagging model. This paper uses the same random seed (seed = 42) in all experiments to ensure that different experimental settings and comparison models are trained and tested under the same random conditions, thus guaranteeing the fairness and reliability of performance comparisons. (The specific value of the random seed itself does not affect the statistical properties of the model; its role is to ensure the reproducibility of the experiment. The most commonly used random seed value in machine learning algorithms is chosen to ensure that all subsequent experiments are conducted under consistent random conditions, making it more reproducible and convincing.)
[0064] Step 4: Construct the CNN base learner network structure. The CNN model contains two convolutional layers. After receiving the raw EIS data from the input layer, learnable filters (or convolutional kernels) are applied to extract local features from the raw EIS data. Parameter sharing and local connections reduce the model's complexity. The convolutional layers also include activation functions, such as the Rectified Linear Unit (ReLU), which introduces non-linearity, enabling the network structure to learn features closely related to SOH in EIS data at multiple frequencies. The output formula of the convolutional layer is as follows:
[0065]
[0066] In the formula: This represents the convolution operation. Indicates a filter. Indicates the deviation value. This represents the feature values extracted from the EIS data. Let represent the activation function, l represent the number of layers in the network, i represent the i-th feature in the l-th layer, and j represent the feature in the (l-1)-th layer that is connected to the i-th feature of the current layer.
[0067] After the convolutional layer outputs the feature values of the EIS data, it is downsampled using max pooling to retain key features while reducing redundant information. The formula for max pooling is as follows:
[0068]
[0069] In the formula: This represents the activation parameter value of the corresponding neuron. This represents the EIS eigenvalue most relevant to the SOH of the lithium battery after processing, where This represents the activation parameter value corresponding to the i-th feature in the l-th layer at the t-th position within the pooling window. This represents the index of the t-th position within the pooling window of the i-th feature map in layer l (used to locate elements within the pooling window).
[0070] Finally, the features extracted by the pooling layer are integrated through a fully connected layer, and the extracted impedance features are mapped to the health state of the battery for the final estimation output.
[0071] Step 5: Train the CNN model using the defined function. Apply the Adam optimizer and a scheduling strategy with a learning rate of 0.001 to improve training performance. Comparing the learning rate of 0.01 and the scheduling strategy of 0.0001, it was found that the model achieves a better balance between convergence speed and estimation accuracy when the learning rate is 0.001. Therefore, this algorithm adopts this learning rate setting. Simultaneously, a scheduler is used. If the validation loss does not improve within 5 consecutive iterations of estimating the SOH of the lithium battery, the learning rate is multiplied by 0.5, thereby further optimizing the model training process.
[0072] Step 6: To further improve the robustness and generalization ability of the model, the Bagging ensemble learning method is adopted. This algorithm trains multiple CNN models and integrates the SOH estimates of these models through a defined function, using the average of all model estimates as the final estimate, effectively reducing the risk of overfitting of individual models.
[0073] Bagging ensemble learning method includes the following steps:
[0074] Step 6.1: Apply the bootstrap sampling method to the training set obtained in Step 2, repeating the sampling N times to obtain N independent sub-training sets. Verification shows that when N is 10 times, the model performance quickly converges to the optimal range. Increasing N further results in a performance improvement of <0.5%. Therefore, this algorithm sets N to 10 times.
[0075] Step 6.2: Input the sub-training sets obtained in Step 6.1 into the CNN base learners constructed in Step 4, and train them in parallel to obtain N independent CNN base learner models. During the training process, the model hyperparameters are optimized by 5-fold cross-validation.
[0076] Step 6.3: Construct the Bagging ensemble framework. The N CNN base learner models trained in Step 6.2 are integrated using a weighted average method to form a CNN-Bagging lithium battery SOH estimation model.
[0077] Step 6.4: Input the test set obtained in Step 2 into the CNN-Bagging lithium battery SOH estimation model constructed in Step 6.3 to verify the model performance and obtain the lithium battery SOH estimation results;
[0078] Step 7: Evaluate the SOH estimation results obtained in Step 6 by using the mean absolute error (MAE) and the coefficient of determination (R²). 2 As an evaluation indicator, its calculation formula is as follows:
[0079]
[0080]
[0081] Where n represents the number of samples. This represents the estimated SOH value for the i-th sample. This represents the true value of SOH. This represents the mean of the true values of SOH.
[0082] The smaller MAE and R 2 The closer the value is to 1, the higher the model estimation accuracy and the better the fit. Next, a curve is plotted as the number of iterations versus the estimated / actual SOH. By comparing the trends of the estimated and actual SOH, the estimation performance and stability of the model can be evaluated more intuitively.
[0083] Simulation experiment:
[0084] 1. SOH estimation on a lithium cobalt oxide (LCO) battery dataset.
[0085] We used an open-source dataset provided by Zhang et al., which records in detail the EIS measurement results of lithium batteries at different charge-discharge cycles, including information such as the real part of impedance, the imaginary part of impedance, the impedance mode, the phase angle, and the capacity. It covers a wide frequency range from low frequency to high frequency (0.02 Hz to 20,000 Hz) and can reflect the electrochemical characteristics of the battery at different stages of use.
[0086] Eight 45mAh Eunicell LR2032 lithium-ion batteries with a LiCoO2 / graphite chemistry were subjected to continuous charge-discharge cycle experiments at room temperature (25°C). Each cycle consisted of charging to 4.2V using a CC-CV (constant current-constant voltage) method at a rate of 45 mA and discharging to 3V using a CC (constant current) method at a rate of 90 mA.
[0087] according to Figure 2As can be seen, in all four battery samples, the predicted SOH value (blue curve) and the actual SOH value (orange dashed line) are highly consistent, indicating that the CNN-Bagging model of this invention can accurately estimate the SOH of lithium batteries. Even in the stage where the battery has a large number of cycles and the SOH decreases rapidly, the predicted value can still closely follow the actual value, showing the good robustness of the model. Especially in the later stage of cycling of LR04 battery, although the SOH decreases faster, the model can still make accurate predictions, which shows that the model has good adaptability to the rapid degradation stage of the battery.
[0088] 2. Perform SOH estimation on the nickel-manganese-cobalt (NMC) lithium battery dataset.
[0089] LCO batteries use layered LiCoO2 as the positive electrode, resulting in relatively stable reaction kinetics. Their EIS characteristics are mainly dominated by the evolution of the SEI film on the graphite negative electrode and the ion diffusion process. In contrast, NMC batteries have more complex internal electrochemical processes (such as changes in charge transfer resistance and evolution of ion diffusion paths) due to the multi-electron reaction characteristics of the nickel-manganese-cobalt positive electrode and the lithium intercalation expansion effect of the silicon oxide negative electrode. The mapping relationship between the corresponding EIS frequency band characteristics and SOH may differ from that of LCO batteries.
[0090] Using the NMC lithium-ion battery dataset provided by Luh M et al., this study focuses on the LG INR18650HG2 lithium battery. The EIS data was obtained through testing the lithium battery under different temperature conditions for over a year, making the data sample more representative. The corresponding SOH estimation results are as follows: Figure 3 As shown.
[0091] Figure 3 The estimated SOH curves of NMC lithium batteries at temperatures of 10℃, 25℃, 35℃, and 45℃ are presented. It is evident that the model-predicted curves highly match the actual SOH curve trends. Quantitative evaluation indicators further validate this: the mean absolute error (MAE) of the 10C01 battery is 0.0021, and R0... 2 The MAE of the 25C02 battery is 0.9965; the MAE of the 25C02 battery is 0.0020, and R... 2 The MAE of the 35C03 battery is 0.9980; the MAE of the 35C03 battery is 0.0023, R 2 The MAE of the 25C02 battery is 0.9983; the MAE of the 25C02 battery is 0.0026, and R... 2 The value was 0.9979. The MAE for all test groups was in the range of 0.0020 to 0.0026, and R... 2 The result is close to 1, indicating that the algorithm has high accuracy and excellent fitting effect in estimating the health status of NMC lithium batteries.
[0092] When the State of Health (SOH) drops below 0.8, the health of the lithium battery decreases sharply with the number of cycles (the slope of the curve increases significantly). However, the model's predicted curve still accurately matches the actual degradation trend, verifying the robustness of the algorithm during the rapid degradation phase of battery performance. Combined with cycle life analysis under different temperature conditions: at 10℃, the battery cycle life can reach over 600 cycles; at 25℃ and 35℃, it stabilizes at around 550 cycles; and at 45℃, it decreases to less than 500 cycles. This trend indicates that increased temperature accelerates lithium battery performance degradation (reduced cycle life), highlighting the necessity of accurate SOH estimation for full-lifecycle battery health management—by monitoring SOH in real time, early warnings of battery performance degradation can be provided, charging and discharging strategies can be optimized, and irreversible damage caused by factors such as temperature can be avoided.
[0093] 3. Comparison with SOH estimation using external operational data
[0094] In lithium battery state assessment studies, EIS data can directly and quantitatively correlate internal state changes such as electrode microstructure evolution, electrolyte interface reactions, and ion transport characteristics through parameters such as ohmic impedance, charge transfer impedance, and double-layer capacitance in characteristic frequency bands of the impedance spectrum. External operating data, on the other hand, refers to macroscopic parameters such as voltage, current, and temperature that can be directly collected during battery charge-discharge cycles. This type of data is easily affected by external operating conditions such as charge-discharge rate and ambient temperature, and can only indirectly reflect changes in the macroscopic performance of the battery, making it difficult to capture the subtle internal electrochemical mechanism evolution.
[0095] Based on the fundamental differences between the two types of data in characterizing battery state, this simulation experiment takes nickel-manganese-cobalt lithium batteries as the research object. The battery's EIS data and external operating data are used as input features of the model, respectively. By comparing the SOH estimation accuracy, stability and generalization ability of the two data-driven models, the advantages of EIS data in reflecting the true internal state of the battery and improving SOH estimation performance are intuitively revealed. This provides a theoretical basis for the selection of data sources and model optimization of lithium battery health management systems (BMS).
[0096] Figure 4 In the early stages of all subplots (such as the first 100 cycles), the green curve corresponding to the external running data deviates significantly from the actual SOH value (blue curve), and the early estimation error is significantly higher than that of the EIS data (the red curve fluctuates less and fits the actual value more closely).
[0097] The estimation bias of external operating data becomes more pronounced in the later stages of the cycle and can lead to two types of engineering problems: such as Figure 4(1) For the 10C01 battery, when the SOH drops to 0.8, the green curve corresponding to the external operating data only corresponds to about 520 cycles, while the actual number of cycles with SOH reaching 0.8 is about 590. This deviation will underestimate the battery's "remaining health" and may lead to the premature retirement of the battery when it still has remaining value, resulting in an unreasonable waste of lithium battery resources; when the rate of decrease of the battery's SOH accelerates (such as... Figure 4 (4) In the later stage of the cycle of the 45C04 battery, the estimation deviation of the external operating data goes to the other extreme. When the SOH drops to 0.65, the green curve corresponds to about 400 cycles, but the actual number of cycles is only 310. This deviation will overestimate the health status of the battery, which may lead to the overuse of the lithium battery and cause the battery to cause thermal runaway and other safety accidents in the later stage of the cycle due to internal lithium plating, membrane damage and other risks.
[0098] In contrast, the red curve corresponding to the EIS data closely matches the actual value (blue curve) throughout the entire lifecycle (from the initial cycling stage to the rapid SOH decay phase). Even in the later stages of cycling (such as after 600 cycles for a 10C01 battery), the red curve can still accurately track the rapid decline trend of SOH. Furthermore, in scenarios with a high rate of SOH change (such as the later stages of a 45C04 battery), the synchronization between the red curve and the actual value is still significantly better than that of external operating data. This comparative result clarifies the core advantages of EIS data in lithium battery SOH estimation and provides a crucial reference for the selection of data sources for battery management systems—prioritizing the use of EIS data can significantly improve the reliability of SOH estimation and lay a data foundation for battery lifecycle health management and safe operation and maintenance.
[0099] 4. Comparison with other algorithms for SOH estimation
[0100] To verify the superiority of the proposed method, two algorithms—EIS-Gaussian Process Regression Machine Learning (EIS-GPRML) and EIS-CNN—compared with the proposed method on the NMC lithium battery dataset were selected and compared. The SOH estimation results of the three algorithms are visualized as follows: Figure 5 As shown.
[0101] from Figure 5As can be seen from the SOH estimation curves, the estimation trends of the three algorithms generally match the actual curves, verifying the algorithms' ability to capture the changing trends of battery health status. However, a comparison of details reveals significant differences: some estimates from the EIS-GPRML and EIS-CNN algorithms deviate significantly (e.g., the estimated curve for the 35C03 battery shows a more dispersed distribution of discrete points); the estimated values from the CNN-Bagging algorithm in this paper have a significantly higher fit to the actual values, especially in the later stages of battery cycling (the rapid decay stage of SOH), where the discrete points almost perfectly match the actual curve, demonstrating stronger stability.
[0102] In summary, the above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for estimating the state of health of lithium batteries based on a CNN-Bagging model and EIS data, characterized in that, Includes the following steps: Step 1: Read EIS data from the open-source dataset and preprocess it, filtering impedance data and target values as feature columns. The target value is the ratio of discharge capacity to original capacity. Step 2: Standardize the preprocessed EIS data to ensure that each feature dimension has zero mean and unit variance, and divide the standardized dataset into training and test sets; Step 3: Construct the CNN base learner network structure, which includes convolutional layers, activation function layers, pooling layers and fully connected layers connected in sequence. The standardized EIS data is used as input. Local features related to battery health status are extracted from the EIS data through learnable filters. Non-linearity is introduced by the activation function. The data is downsampled by the pooling layer and then integrated by the fully connected layer to map the features to the battery health status value. Step 4: Train the CNN base learner using an adaptive learning rate strategy. If the validation loss does not improve after a preset number of consecutive iterations, adjust the learning rate. Step 5: Using the Bagging ensemble learning method, N subset training sets are generated by sampling with replacement using Bootstrap, where N is an integer from 5 to 15. N CNN base learners are trained on each subset, and the health status estimation results of each base learner are integrated to form the final lithium battery health status estimation model. Step 6: Input the EIS data of the lithium battery under test into the lithium battery health state estimation model, and output the battery health state estimate. .
2. The method according to claim 1, characterized in that, The preprocessing steps include: Read all electrochemical impedance spectroscopy (EIS) data from an open-source dataset; Invalid data is removed. The invalid data is the frequency point where valid=0, where valid is a data validity identifier used to mark the validity status of a specific frequency point in the EIS measurement data. Extreme outliers are removed, defined as data points whose amplitude / phase differs from adjacent points by more than three standard deviations. For low-frequency data in the 0.5-5kHz range, a moving average filter with a window size of 3 is used to balance noise suppression and signal fidelity. The impedance data and target value obtained from the screening are used as feature columns, where the target value is the ratio of discharge capacity to original capacity.
3. The method according to claim 1, characterized in that, In step 2: The StandardScaler function is used to standardize the features obtained in step 1, so that the standardized data has a mean of 0 and a standard deviation of 1, thus eliminating the difference in units between features and the bias in data distribution. The obtained standardized EIS dataset is split into a training set and a test set in a ratio of 8:2; The split training and test sets are converted into PyTorch tensor format for use in subsequent model training and estimation.
4. The method according to claim 1, characterized in that, Constructing a CNN base learner network structure includes the following steps: Step 3.1: Set the CNN model to contain two convolutional layers. After receiving EIS data from the input layer, apply a learnable filter to extract local features of the EIS data, and reduce the complexity of the model through parameter sharing and local connections. Introducing nonlinearity by using the ReLU linear correction unit as the activation function in convolutional layers: This function sets all negative input values to zero while keeping positive input values unchanged, thus ensuring computational efficiency and effectively mitigating the gradient vanishing problem. Therefore, the network structure can learn features closely related to SOH in EIS data at multiple frequencies, and the output formula of the convolutional layer is: in, This represents the convolution operation. Indicates a filter. Indicates the deviation value. This represents the feature values extracted from the EIS data. This represents the activation function. Indicates the number of layers in the network. Representing the The first in the layer One characteristic, Representing the In the current layer Features that are connected together; Step 3.2: Downsample the EIS data feature values output by the convolutional layer using max pooling to retain key features while reducing redundant information. The formula for max pooling is: Where x represents the activation parameter value of the corresponding neuron, and p represents the EIS feature value most relevant to the SOH of the lithium battery after processing. This represents the activation parameter value corresponding to the i-th feature in the l-th layer at the t-th position within the pooling window. This represents the pooling window of the i-th feature map in the l-th layer. The index identifier of each position; Step 3.3: Integrate the features extracted from the pooling layer through the fully connected layer, and map the extracted impedance features to the battery health status value.
5. The method according to claim 1, characterized in that, In step 4, the Adam optimizer and a scheduling strategy with an initial learning rate of 0.001 are used to train the CNN model. When the validation loss does not improve within 5 consecutive estimation of lithium battery SOH iterations, the learning rate is multiplied by 0.5 to optimize the training process of the model.
6. The method according to claim 1, characterized in that, The Bagging ensemble learning method includes the following sub-steps: Step 5.1: Apply the Bootstrap sampling method with replacement to the training set obtained in Step 2, and repeat the sampling N times to obtain N independent sub-training sets, where N is an integer from 5 to 15. Step 5.2: Input each sub-training set into the CNN base learner constructed in Step 3, and train in parallel to obtain N independent CNN base learner models. During the training process, optimize the model hyperparameters through 5-fold cross-validation. Step 5.3: Construct the Bagging ensemble framework. Integrate the results of the N trained CNN base learner models using a weighted average method to form a CNN-Bagging lithium battery health status estimation model.
7. The method according to claim 1, characterized in that, Between steps 2 and 3, a random seed of 42 is set to ensure that the data can be randomly divided in each experiment run and that the model initialization and optimizer operation remain consistent.
8. The method according to claim 1, characterized in that, The estimation results of the lithium battery health status estimation model will be evaluated using the mean absolute error (MAE) and the coefficient of determination (R²). 2 As an evaluation indicator, its calculation formula is as follows: Where n represents the number of samples. This represents the SOH estimate of the i-th sample output by the CNN-Bagging model. This represents the true value of SOH. This represents the mean of the true values of SOH; The smaller MAE and R 2 The closer the value is to 1, the higher the model estimation accuracy and the better the fitting effect. Next, a graph is plotted showing the number of iterations versus the estimated / actual SOH. By comparing the trends of the estimated and actual SOH, the estimation performance and stability of the model can be evaluated intuitively.