A training method and system of a CNN-BiLSTM model for lithium battery SOC and SOH estimation

By combining a CNN-BiLSTM model with multi-source sensing sequences and SOH sequences, the problem of coupling effects in the estimation of SOC and SOH of lithium batteries is solved, improving the estimation accuracy and the ability to adapt to complex working conditions.

CN122154850APending Publication Date: 2026-06-05WUHAN UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN UNIV OF TECH
Filing Date
2026-01-17
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing methods for estimating SOC and SOH of lithium batteries suffer from estimation bias due to neglecting the inherent coupling effect between SOC and SOH. Model-based methods are affected by changes in operating conditions and aging, resulting in decreased accuracy. Data-driven methods cannot adapt to complex discharge conditions.

Method used

A CNN-BiLSTM model is used in conjunction with multi-source sensor sequences and SOH sequences. Low-contribution features are screened out through correlation analysis, and hyperparameters are optimized using the COA algorithm to construct a dynamic coupling relationship model that can adapt to complex working conditions.

Benefits of technology

It improves the accuracy and robustness of lithium battery state estimation, enhances adaptability under complex operating conditions, and improves estimation accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122154850A_ABST
    Figure CN122154850A_ABST
Patent Text Reader

Abstract

The application discloses a kind of training methods for CNN-BiLSTM model of lithium battery SOC and SOH estimation, which utilizes basic parameters such as voltage, current and temperature, constructs CNN-BiLSTM model, adjusts hyperparameter by intelligent optimization algorithm to improve precision and generalization ability;Considering that SOH is a long-term quantity that slowly decays with cycles, and SOC is a short-term quantity that changes within a single cycle, the application uses a multiscale updating method in joint estimation: SOH is updated regularly according to the number of cycles, and is considered constant in the single charge-discharge process to participate in SOC estimation.The application can solve the technical problems of existing independent estimation methods, which completely ignore the internal coupling between SOC and SOH, cannot reflect the physical characteristics of mutual influence between the two in actual operation, and therefore easily lead to estimation deviation or even distortion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of deep learning and lithium battery state prediction technology, and more specifically, relates to a training method and system for a convolutional neural network (CNN)-bidirectional long-short-term memory (BiLSTM) model for estimating the state of charge (SOC) and state of health (SOH) of lithium batteries. Background Technology

[0002] With the continuous advancement of lithium-ion battery technology, it has been widely adopted as a highly efficient energy storage medium in electric vehicles, electric ships, and numerous other systems requiring energy storage, leading to its increasing application. Battery management systems (BMS) play a crucial role in ensuring the safe and stable operation of batteries, with battery state assessment being particularly critical. State of Charge (SOC) and State of Health (SOH) are two core indicators for evaluating lithium-ion battery performance, playing a decisive role in operational efficiency, safety, and lifespan prediction. Estimating the SOC and SOH of lithium batteries has become a research hotspot both domestically and internationally.

[0003] Currently, there are two main methods for estimating the State of Charge (SOC) and State of Health (SOH) of lithium batteries: independent estimation and joint estimation. Independent estimation decouples the SOC and SOH estimation processes, meaning that the influence of one state variable is not introduced when solving for the other. This method allows for the inference of one variable only after obtaining a reliable estimate of the other, thus reducing modeling complexity and improving process controllability. Joint estimation considers the coupling relationship between SOC and SOH in the modeling process, achieving synchronous inference of both through alternating iterations: SOC updates incorporate SOH, while SOH updates consider the influence of SOC, thereby reflecting the battery's operating state and improving estimation accuracy. Existing joint estimation methods mainly include model-based joint estimation methods and data-driven joint estimation methods. The former relies on an electrochemical model or equivalent circuit model to construct a dual-observer framework, inferring SOC and SOH separately and exchanging information through iteration. The latter does not rely on an electrochemical or equivalent circuit model but directly learns the dynamic laws of SOC and SOH from operating data, avoiding the influence of model errors and exhibiting stronger adaptability and robustness in complex operating conditions and aging stages.

[0004] However, the aforementioned existing methods for estimating SOC and SOH all have some significant drawbacks: 1. Existing independent estimation methods completely ignore the inherent coupling between SOC and SOH, and cannot reflect the physical characteristics of their mutual influence in actual operation, thus easily leading to estimation bias or even distortion; 2. For model-based joint estimation methods, model bias directly affects the SOC and SOH estimation results, while changes in operating conditions and battery aging further exacerbate the uncertainty of model parameters, all of which lead to a decrease in estimation accuracy. 3. Most data-driven joint estimation methods are only applicable to estimation under stable discharge conditions of lithium batteries (such as constant current discharge in laboratory environment), but cannot be applied to real complex discharge conditions. Summary of the Invention

[0005] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a training method and system for a CNN-BiLSTM model for estimating the State of Charge (SOC) and State of Hypothesis (SOH) of lithium batteries. The aim is to resolve the technical problems of existing independent estimation methods, which completely ignore the inherent coupling between SOC and SOH, failing to reflect the physical characteristics of their mutual influence in actual operation, thus easily leading to estimation bias or even distortion; existing model-based joint estimation methods, where model bias directly affects the SOC and SOH estimation results, and changes in operating conditions and battery aging further exacerbate the uncertainty of model parameters, leading to decreased estimation accuracy; and existing data-driven joint estimation methods, which are mostly applicable only to estimation under stable discharge conditions of lithium batteries, but not to real-world complex discharge conditions.

[0006] To achieve the above objectives, according to one aspect of the present invention, a training method for a CNN-BiLSTM model for estimating the SOC and SOH of lithium batteries is provided, comprising the following steps: (1) Obtain multiple initial feature sequences and multiple SOH values ​​of the lithium battery to form an SOH sequence. Normalize each initial feature sequence and the SOH sequence to obtain normalized feature sequences and normalized SOH sequences. All normalized feature sequences constitute a feature sequence set, where the length of each initial feature sequence is equal to the number of charge-discharge cycles N of the lithium battery. (2) Use the correlation analysis method to calculate the correlation degree between each feature sequence in the feature sequence set obtained in step (1) and the normalized SOH sequence, and remove the feature sequences with a correlation degree lower than the preset threshold from the feature sequence set to obtain multiple updated feature sequences; (3) Combine the multiple updated feature sequences obtained in step (2) and the normalized SOH sequences obtained in step (1) into a dataset, and divide the dataset into a training set, a validation set and a test set according to a predetermined setting, such as a ratio of 4:1:5; (4) Use all feature sequences and normalized SOH sequences in the training set to train the CNN-BiLSTM model to obtain a pre-trained CNN-BiLSTM model; (5) Input all feature sequences in the validation set into the CNN-BiLSTM model that has been preliminarily trained in step (4) to obtain an SOH sequence composed of multiple SOH values, the length of which is equal to the length of each feature sequence in the validation set. (6) Calculate the loss function based on the SOH sequence obtained in step (5) and the normalized SOH sequence in the validation set obtained in step (3); (7) Set the initial learning rate range, hidden layer node range, and L2 regularization coefficient range of the CNN-BiLSTM model, set the internal parameters of the Long-nosed Raccoon Optimization Algorithm (COA), and generate the initial population based on the set initial learning rate range, hidden layer node range, L2 regularization coefficient range, and COA algorithm internal parameters. (8) The initial learning rate, number of hidden layer nodes and L2 regularization coefficient in the initial population obtained in step (7) are used as the search starting point of the COA algorithm. The loss function in step (6) is used as the objective function of the COA algorithm for iterative processing. Finally, the initial learning rate, number of hidden layer nodes and L2 regularization coefficient that minimize the loss function are obtained as the optimal solution. The CNN-BiLSTM model corresponding to the optimal solution is used as the pre-trained CNN-BiLSTM model for estimating the SOC and SOH of lithium batteries. (9) Obtain the voltage sequence, current sequence, temperature sequence and SOC sequence of the lithium battery. Normalize the obtained voltage sequence, current sequence, temperature sequence and SOC sequence respectively. All normalized voltage sequences, normalized current sequences, normalized temperature sequences and SOH sequences normalized in step (1) constitute a set of feature sequences. (10) Combine the feature sequence set obtained in step (9) and the normalized SOC sequence into a dataset, and divide the dataset into training set, validation set and test set according to a predetermined setting, such as a ratio of 4:1:5; (11) Use all feature sequences and normalized SOC sequences in the training set of step (10) to train the CNN-BiLSTM model to obtain a pre-trained CNN-BiLSTM model. (12) Input all feature sequences in the validation set into the CNN-BiLSTM model that was initially trained in step (11) to obtain a SOC sequence composed of multiple SOC values, the length of which is equal to the length of each feature sequence in the validation set. (13) Calculate the loss function based on the SOC sequence obtained in step (12) and the normalized SOC sequence in the validation set obtained in step (10); (14) The initial learning rate, number of hidden layer nodes and L2 regularization coefficient in the initial population obtained in step (7) are used as the search starting point of the COA algorithm. The loss function obtained in step (13) is used as the objective function of the COA algorithm for iterative processing of the COA algorithm. Finally, the initial learning rate, number of hidden layer nodes and L2 regularization coefficient that minimize the loss function are obtained as the optimal solution. The CNN-BiLSTM model corresponding to the optimal solution is used as the final trained CNN-BiLSTM model for estimating SOC and SOH of lithium battery.

[0007] Preferably, the process of obtaining multiple initial feature sequences of the lithium battery in step (1) and normalizing all initial feature sequences includes the following sub-steps: (1-1) Obtain the integral of the charging voltage during the charging process of the lithium battery in the 1st, 2nd, ..., Nth charge and discharge processes to form the first feature sequence; (1-2) Obtain the constant current charging time of the lithium battery during the charging process of the 1st, 2nd, ..., Nth charge-discharge processes to form the second characteristic sequence; (1-3) Obtain the discharge voltage integral of the lithium battery during the discharge process of the 1st, 2nd, ..., Nth charge and discharge processes to form the third feature sequence; (1-4) Obtain the discharge voltage drop amplitude of the lithium battery during the discharge process of the 1st, 2nd, ..., Nth charge and discharge processes to form the fourth feature sequence; (1-5) Obtain the average value of the discharge voltage troughs during the discharge process of the lithium battery in the 1st, 2nd, ..., Nth charge and discharge processes to form the fifth feature sequence; (1-6) Normalize the first to fifth feature sequences obtained in steps (1-1) to (1-5), and all normalized results constitute a feature sequence set.

[0008] Preferably, the voltage drop amplitude during each discharge process refers to the maximum voltage drop of the lithium battery during the discharge process, that is, the difference between the maximum and minimum voltage values ​​in the voltage curve formed by the discharge process; the average of the multiple valley values ​​of the discharge voltage during each discharge process refers to the average of the local valley values ​​of the lithium battery voltage during the discharge process, that is, the arithmetic mean of the voltages corresponding to all local minimum points formed by the temporary voltage drop in the voltage curve formed by the discharge process.

[0009] Preferably, the normalization process in steps (1-6) uses the following formula: ; Where x represents any element in the feature sequence. This represents the normalized value of element x. Let x represent the minimum value of all elements in the characteristic sequence containing element x. It represents the maximum value of all elements in the characteristic sequence containing element x.

[0010] Preferably, the correlation analysis method in step (2) is the grey relational degree method, and the result range of grey relational degree is 0 to 1. The feature sequences corresponding to grey relational degree of 0.8 to 1.0 are strongly correlated, the feature sequences corresponding to grey relational degree of 0.7 to 0.8 are relatively strongly correlated, and the feature sequences with grey relational degree below 0.7 are removed.

[0011] Preferably, step (2) includes the following sub-steps: (2-1) Obtain the grey correlation coefficient between the i-th feature sequence in the feature sequence set and the k-th element in the normalized SOH sequence: ; Where k∈[1,N], This represents the normalized SOH sequence. This represents the k-th feature sequence in the set of feature sequences. It is the distinguishing factor; (2-2) Based on the grey correlation coefficient calculation results in step (2-1), the grey correlation degree between the i-th feature sequence and the SOH sequence in the feature sequence set is calculated using the following formula. : ; (2-3) Remove feature sequences with a gray correlation degree lower than the preset threshold from the feature sequence set to obtain multiple updated feature sequences.

[0012] Preferably, the loss function used in step (6) is the Mean Absolute Percentage Error (MAPE) function, which is calculated using the following formula: ; Where n is the length of the normalized SOH sequence in the validation set. and Let represent the i-th true value and the i-th estimated value in the normalized SOH sequence of the validation set, respectively.

[0013] Preferably, the parameter range in step (7) is set as follows: The initial learning rate is in the range of 10.-4 -10 -2 The number of hidden layer nodes ranges from 16 to 256, and the L2 regularization coefficient ranges from 10. -6 -10 -2 .

[0014] Preferably, the internal parameters of the COA algorithm in step (8) are set as follows: Population size p=100; Maximum number of iterations T=100; Optimization dimension d=3; The exploration-development equilibrium coefficients are αmax = 2.0 and αmin = 0.5. Impact factor β = 1.0.

[0015] According to another aspect of the present invention, a training system for a CNN-BiLSTM model for estimating the SOC and SOH of lithium batteries is provided, comprising the following modules: The first module is used to obtain multiple initial feature sequences and multiple SOH values ​​of the lithium battery to form an SOH sequence. Each initial feature sequence and the SOH sequence are normalized to obtain normalized feature sequences and normalized SOH sequences. All normalized feature sequences constitute a feature sequence set, where the length of each initial feature sequence is equal to the number of charge-discharge cycles N of the lithium battery. The second module is used to calculate the correlation degree between each feature sequence in the feature sequence set obtained by the first module and the normalized SOH sequence using the correlation analysis method, and to remove feature sequences with a correlation degree lower than a preset threshold from the feature sequence set, thereby obtaining multiple updated feature sequences; The third module is used to combine the multiple updated feature sequences obtained from the second module and the normalized SOH sequences obtained from the first module into a dataset, and divide the dataset into a training set, a validation set and a test set according to a predetermined setting, such as a ratio of 4:1:5. The fourth module is used to train the CNN-BiLSTM model using all feature sequences and normalized SOH sequences obtained from the training set in the third module, so as to obtain a pre-trained CNN-BiLSTM model. The fifth module is used to input all feature sequences from the validation set obtained in the third module into the CNN-BiLSTM model that has been pre-trained in the fourth module, so as to obtain an SOH sequence composed of multiple SOH values, the length of which is equal to the length of each feature sequence in the validation set. The sixth module is used to calculate the loss function based on the SOH sequence obtained from the fifth module and the normalized SOH sequence in the validation set obtained from the third module. The seventh module is used to set the initial learning rate range, hidden layer node number range, and L2 regularization coefficient range of the CNN-BiLSTM model, set the internal parameters of the Cobra Optimization Algorithm (COA), and generate the initial population based on the set initial learning rate range, hidden layer node number range, L2 regularization coefficient range, and COA algorithm internal parameters. The eighth module is used to take the initial learning rate, number of hidden layer nodes, and L2 regularization coefficient in the initial population obtained in the seventh module as the search starting point of the COA algorithm, and to use the loss function of the sixth module as the objective function of the COA algorithm for iterative processing. Finally, the initial learning rate, number of hidden layer nodes, and L2 regularization coefficient that minimize the loss function are obtained as the optimal solution, and the CNN-BiLSTM model corresponding to the optimal solution is used as the pre-trained CNN-BiLSTM model for estimating the SOC and SOH of lithium batteries. The ninth module is used to acquire the voltage sequence, current sequence, temperature sequence, and SOC sequence of the lithium battery. The acquired voltage sequence, current sequence, temperature sequence, and SOC sequence are normalized respectively. All normalized voltage sequences, normalized current sequences, normalized temperature sequences, and SOH sequences normalized by the first module constitute a feature sequence set. The tenth module is used to combine the feature sequence set obtained from the ninth module and the normalized SOC sequence into a dataset, and divide the dataset into training set, validation set and test set according to a predetermined setting, such as a ratio of 4:1:5. The eleventh module is used to train the CNN-BiLSTM model using all feature sequences and normalized SOC sequences obtained from the training set in the tenth module, so as to obtain a pre-trained CNN-BiLSTM model. The twelfth module is used to input all the feature sequences in the validation set obtained from the tenth module into the CNN-BiLSTM model that has been pre-trained in the eleventh module, so as to obtain a SOC sequence composed of multiple SOC values, the length of which is equal to the length of each feature sequence in the validation set. The thirteenth module is used to calculate the loss function based on the SOC sequence obtained from the twelfth module and the normalized SOC sequence in the validation set obtained from the tenth module. The fourteenth module is used to take the initial learning rate, number of hidden layer nodes, and L2 regularization coefficient in the initial population obtained in the seventh module as the search starting point of the COA algorithm, and the loss function obtained in the thirteenth module as the objective function of the COA algorithm for iterative processing of the COA algorithm. Finally, the initial learning rate, number of hidden layer nodes, and L2 regularization coefficient that minimize the loss function are obtained as the optimal solution, and the CNN-BiLSTM model corresponding to the optimal solution is used as the final trained CNN-BiLSTM model for estimating the SOC and SOH of lithium batteries.

[0016] In summary, compared with existing technical solutions, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: (1) Since the present invention adopts steps (9) to (10), when constructing the SOC estimation model, it not only introduces multi-source sensing sequences such as voltage, current, and temperature, but also integrates the SOH sequence closely related to the battery aging state as input features, fully exploring the inherent coupling relationship between SOC and SOH in the time evolution. Therefore, it can effectively solve the technical problem of estimation deviation or even distortion caused by the neglect of the physical mechanism of mutual influence between SOC and SOH in the existing independent estimation method, and significantly enhance the accuracy and robustness of lithium battery state estimation. (2) This invention employs steps (4) to (8) and steps (11) to (14) to jointly model the dynamic coupling relationship between SOC and SOH in the time-series evolution through CNN-BiLSTM network; at the same time, it uses the COA algorithm to optimize the three hyperparameters of the model, so that the model can further improve its accuracy. Therefore, it can solve the technical problem that the model bias of the existing model-based joint estimation method directly affects the estimation results of SOC and SOH, and the uncertainty of model parameters will be further aggravated by changes in operating conditions, battery aging, etc., leading to a decrease in estimation accuracy. (3) Since the present invention adopts steps (1-3) to (1-5) and step (2), it extracts relevant health features for discharge data under real complex discharge conditions, and filters out low contribution features by calculating the correlation between feature sequences and SOH sequences, thereby reducing the interference of noise features under complex conditions. Therefore, it can solve the technical problem that most of the existing data-driven joint estimation methods can only be applied to the estimation under stable discharge conditions of lithium batteries, but cannot be applied to real complex discharge conditions. Attached Figure Description

[0017] Figure 1 This is a flowchart of the training method of the CNN-BiLSTM model for estimating SOC and SOH of lithium batteries according to the present invention; Figure 2 This is a comparison chart of the test results between the method of this invention and existing mainstream SOH estimation methods; Figure 3 This is a comparison chart of the SOC test results and their absolute errors of the method of the present invention and the estimation method alone when the SOH is about 100%. Figure 4 This is a comparison chart of the SOC test results and absolute errors of the method of the present invention and the individual estimation method when the SOH is about 90%. Figure 5 This is a comparison chart of the SOC test results and absolute errors of the method of this invention and the method of individual estimation when the SOH is about 80%. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0019] The basic idea of ​​this invention is to provide a training method for a CNN-BiLSTM model, which uses basic parameters such as voltage, current and temperature to construct a CNN-BiLSTM model and adjusts hyperparameters through intelligent optimization algorithms to improve accuracy and generalization ability. Considering that SOH is a long-term quantity that decays slowly with cycles, while SOC is a short-term quantity that changes within a single cycle, this invention adopts a scaled update method in joint estimation: SOH is updated periodically according to the number of cycles, while it is treated as a constant during a single charge and discharge process and participates in SOC estimation.

[0020] like Figure 1 As shown, this invention discloses a training method for a CNN-BiLSTM model for estimating the SOC and SOH of lithium batteries, comprising the following steps: (1) Obtain multiple initial feature sequences and multiple SOH values ​​of the lithium battery to form an SOH sequence. Normalize each initial feature sequence and the SOH sequence to obtain normalized feature sequences and normalized SOH sequences. All normalized feature sequences constitute a feature sequence set, where the length of each initial feature sequence is equal to the number of charge-discharge cycles N of the lithium battery. Step (1) involves obtaining multiple initial feature sequences of the lithium battery and normalizing all initial feature sequences. This process includes the following sub-steps: (1-1) Obtain the integral of the charging voltage during the charging process of the lithium battery in the 1st, 2nd, ..., Nth charge and discharge processes to form the first feature sequence; (1-2) Obtain the constant current charging time of the lithium battery during the charging process of the 1st, 2nd, ..., Nth charge-discharge processes to form the second characteristic sequence; (1-3) Obtain the discharge voltage integral of the lithium battery during the discharge process of the 1st, 2nd, ..., Nth charge and discharge processes to form the third feature sequence; (1-4) Obtain the discharge voltage drop amplitude of the lithium battery during the discharge process of the 1st, 2nd, ..., Nth charge and discharge process (which refers to the maximum voltage drop of the lithium battery in each discharge process, that is, the difference between the maximum and minimum voltage values ​​in the voltage curve formed in each discharge process) to form the fourth feature sequence. Specifically, the fourth feature sequence obtained in this step is targeted at SOH estimation under dynamic discharge conditions, which can improve the adaptability of the present invention under complex discharge conditions. (1-5) Obtain the average value of the discharge voltage troughs during the discharge process of the lithium battery in the 1st, 2nd, ..., Nth charge and discharge processes (which refers to the average value of the local troughs of the lithium battery voltage in each discharge process, that is, the arithmetic mean of the voltages corresponding to all local minimum points formed by the temporary voltage drop in the voltage curve formed in each discharge process) to form the fifth feature sequence. Specifically, the fifth feature sequence obtained in this step is targeted at SOH estimation under dynamic discharge conditions, which can improve the adaptability of the present invention under complex discharge conditions. (1-6) Normalize the first to fifth feature sequences obtained in steps (1-1) to (1-5), and all normalized results constitute a feature sequence set.

[0021] The normalization process in steps (1-6) uses the following formula: ; Where x represents any element in the feature sequence. This represents the normalized value of element x. Let x represent the minimum value of all elements in the characteristic sequence containing element x. It represents the maximum value of all elements in the characteristic sequence containing element x.

[0022] (2) Use the correlation analysis method to calculate the correlation degree between each feature sequence in the feature sequence set obtained in step (1) and the normalized SOH sequence, and remove the feature sequences with a correlation degree lower than the preset threshold from the feature sequence set to obtain multiple updated feature sequences; Specifically, in step (2), the correlation analysis method is the grey relational degree method. The result range of grey relational degree is 0 to 1. The feature sequences corresponding to grey relational degree of 0.8 to 1.0 are strongly correlated, and the feature sequences corresponding to grey relational degree of 0.7 to 0.8 are relatively strongly correlated. Feature sequences with grey relational degree below 0.7 are removed.

[0023] This step (2) includes the following sub-steps: (2-1) Calculate the grey correlation coefficient between the i-th feature sequence in the feature sequence set and the k-th element in the normalized SOH sequence using the following formula: ; Where k∈[1,N], This represents the normalized SOH sequence. This represents the k-th feature sequence in the set of feature sequences. It is the distinguishing factor, and its value is 0.5; (2-2) Based on the grey correlation coefficient calculation results in step (2-1), the grey correlation degree between the i-th feature sequence and the SOH sequence in the feature sequence set is calculated using the following formula. : ; (2-3) Remove gray relational sequences with a gray correlation degree lower than a preset threshold (which is equal to 0.7 in this invention) from the feature sequence set to obtain multiple updated feature sequences; (3) Combine the multiple updated feature sequences obtained in step (2) and the normalized SOH sequences obtained in step (1) into a dataset, and divide the dataset into a training set, a validation set and a test set according to a predetermined setting, such as a ratio of 4:1:5; (4) Use all feature sequences and normalized SOH sequences in the training set to train the CNN-BiLSTM model to obtain a pre-trained CNN-BiLSTM model; (5) Input all feature sequences in the validation set into the CNN-BiLSTM model that has been preliminarily trained in step (4) to obtain an SOH sequence composed of multiple SOH values, the length of which is equal to the length of each feature sequence in the validation set. (6) Calculate the loss function based on the SOH sequence obtained in step (5) and the normalized SOH sequence in the validation set obtained in step (3); Specifically, the loss function used in this step is the Mean Absolute Percentage Error (MAPE) function, which is calculated using the following formula: ; Where n is the length of the normalized SOH sequence in the validation set. and Let represent the i-th true value and the i-th estimated value in the normalized SOH sequence of the validation set, respectively.

[0024] (7) Set the initial learning rate range, hidden layer node range, and L2 regularization coefficient range of the CNN-BiLSTM model, set the internal parameters of the Coati Optimization Algorithm (COA), and generate the initial population based on the set initial learning rate range, hidden layer node range, L2 regularization coefficient range, and internal parameters of the COA algorithm. Specifically, the initial learning rate is in the range of 10. -4 -10 -2 The number of hidden layer nodes ranges from 16 to 256, and the L2 regularization coefficient ranges from 10. -6 -10 -2 .

[0025] (8) The initial learning rate, number of hidden layer nodes and L2 regularization coefficient in the initial population obtained in step (7) are used as the search starting point of the COA algorithm. The loss function in step (6) is used as the objective function of the COA algorithm for iterative processing. Finally, the initial learning rate, number of hidden layer nodes and L2 regularization coefficient that minimize the loss function are obtained as the optimal solution. The CNN-BiLSTM model corresponding to the optimal solution is used as the pre-trained CNN-BiLSTM model for estimating the SOC and SOH of lithium batteries. In this invention, the internal parameters of the COA algorithm are set as follows: Population size p=100; Maximum number of iterations T=100; Optimization dimension d=3; The exploration-development equilibrium coefficients are αmax = 2.0 and αmin = 0.5. Impact factor β = 1.0.

[0026] (9) Obtain the voltage sequence, current sequence, temperature sequence and SOC sequence of the lithium battery. Normalize the obtained voltage sequence, current sequence, temperature sequence and SOC sequence respectively. All normalized voltage sequences, normalized current sequences, normalized temperature sequences and SOH sequences normalized in step (1) constitute a set of feature sequences. Specifically, the normalization method in this step is the same as in steps (1-6); the length of each feature sequence in this step is the ratio of the monitoring time to the sampling interval time.

[0027] It is worth noting that SOH is updated in units of cycle count, and the SOH value remains unchanged before entering the next cycle.

[0028] (10) Combine the feature sequence set obtained in step (9) and the normalized SOC sequence into a dataset, and divide the dataset into training set, validation set and test set according to a predetermined setting, such as a ratio of 4:1:5; (11) Use all feature sequences and normalized SOC sequences in the training set of step (10) to train the CNN-BiLSTM model to obtain a pre-trained CNN-BiLSTM model. (12) Input all feature sequences in the validation set into the CNN-BiLSTM model that was initially trained in step (11) to obtain a SOC sequence composed of multiple SOC values, the length of which is equal to the length of each feature sequence in the validation set. (13) Calculate the loss function based on the SOC sequence obtained in step (12) and the normalized SOC sequence in the validation set obtained in step (10); Specifically, the calculation method and step (6) of the loss function are exactly the same, and will not be repeated here; (14) The initial learning rate, number of hidden layer nodes and L2 regularization coefficient in the initial population obtained in step (7) are used as the search starting point of the COA algorithm. The loss function obtained in step (13) is used as the objective function of the COA algorithm for iterative processing of the COA algorithm. Finally, the initial learning rate, number of hidden layer nodes and L2 regularization coefficient that minimize the loss function are obtained as the optimal solution. The CNN-BiLSTM model corresponding to the optimal solution is used as the final trained CNN-BiLSTM model for estimating SOC and SOH of lithium battery.

[0029] Test Results 1. Comparison of SOH estimation indices: The following section tests and compares the performance of this invention with existing mainstream methods (i.e., existing CNN models, existing BiLSTM models, and existing CNN-BiLSTM models). For example, the SOH estimation results of this invention are compared with those of the aforementioned mainstream methods. Figure 2 As shown, the following comparison results were obtained: Mean Absolute Error (MAE) and Root Mean Square Error (RMSE) were obtained based on the predicted SOH sequence and the normalized SOH sequence in the test set obtained in step (3). These two indicators provide an objective measure of the estimation accuracy, allowing for comparison and analysis of the accuracy of different estimation methods. The formulas for calculating MAE and RMSE are as follows: In the formula, and ...

[0030] The performance comparison of the final model on the above metrics is shown in Table 1 below: Table 1. Calculation results of evaluation indicators for SOH estimation using different methods. method MAE (%) RMSE (%) This invention 0.571 0.752 CNN 0.962 1.376 BiLSTM 1.085 1.596 CNN-BiLSTM 0.933 1.194 As can be seen from Table 1 above, the SOH estimation results of this invention are superior to the existing mainstream models in terms of both MAE and RMSE.

[0031] 2. Comparison of SOC estimation indicators: The following tests and comparisons are made between the SOC estimation results of this invention and the performance of standalone estimation (SOC estimation model training excludes SOH sequences). The SOC estimation results of the two estimation methods are compared for example... Figures 3 to 5 As shown. Among them. Figure 3 This is a comparison chart of the SOC test results and their absolute errors of the method of the present invention (left side) and the individual estimation method (right side) when SOH is approximately 100%. Figure 4 This is a comparison chart of the SOC test results and their absolute errors of the method of the present invention (left side) and the individual estimation method (right side) when the SOH is about 90%. Figure 5 This is a comparison chart of the SOC test results and absolute errors of the method of this invention (left side) and the individual estimation method (right side) when the SOH is about 80%. The following comparison results were obtained: Based on the obtained predicted SOC sequence and the normalized SOC sequence in the test set obtained in step (10), the maximum absolute error, mean absolute error (MAE), and root mean square error (RMSE) were obtained. The performance comparison on the above indicators is shown in Table 2 below: Table 2 SOC estimation results indicators estimation form Maximum absolute error (%) MAE (%) RMSE (%) Individual estimation 8.086 1.117 1.658 Joint estimation 3.186 0.560 0.879 Based on Table 2 above Figures 3 to 5 It can be seen that the SOC estimation results of this invention are superior to individual estimations in terms of maximum absolute error, MAE, and RMSE.

[0032] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A training method for a CNN-BiLSTM model for estimating SOC and SOH of lithium batteries, characterized in that, Includes the following steps: (1) Obtain multiple initial feature sequences and multiple SOH values ​​of the lithium battery to form an SOH sequence. Normalize each initial feature sequence and the SOH sequence to obtain normalized feature sequences and normalized SOH sequences. All normalized feature sequences constitute a feature sequence set, where the length of each initial feature sequence is equal to the number of charge-discharge cycles N of the lithium battery. (2) Use the correlation analysis method to calculate the correlation degree between each feature sequence in the feature sequence set obtained in step (1) and the normalized SOH sequence, and remove the feature sequences with a correlation degree lower than the preset threshold from the feature sequence set to obtain multiple updated feature sequences; (3) Combine the multiple updated feature sequences obtained in step (2) and the normalized SOH sequences obtained in step (1) into a dataset, and divide the dataset into a training set, a validation set and a test set according to a predetermined setting, such as a ratio of 4:1:5; (4) Use all feature sequences and normalized SOH sequences in the training set to train the CNN-BiLSTM model to obtain a pre-trained CNN-BiLSTM model; (5) Input all feature sequences in the validation set into the CNN-BiLSTM model that has been preliminarily trained in step (4) to obtain an SOH sequence composed of multiple SOH values, the length of which is equal to the length of each feature sequence in the validation set. (6) Calculate the loss function based on the SOH sequence obtained in step (5) and the normalized SOH sequence in the validation set obtained in step (3); (7) Set the initial learning rate range, hidden layer node range, and L2 regularization coefficient range of the CNN-BiLSTM model, set the internal parameters of the Long-nosed Raccoon Optimization Algorithm (COA), and generate the initial population based on the set initial learning rate range, hidden layer node range, L2 regularization coefficient range, and COA algorithm internal parameters. (8) The initial learning rate, number of hidden layer nodes and L2 regularization coefficient in the initial population obtained in step (7) are used as the search starting point of the COA algorithm. The loss function in step (6) is used as the objective function of the COA algorithm for iterative processing. Finally, the initial learning rate, number of hidden layer nodes and L2 regularization coefficient that minimize the loss function are obtained as the optimal solution. The CNN-BiLSTM model corresponding to the optimal solution is used as the pre-trained CNN-BiLSTM model for estimating the SOC and SOH of lithium batteries. (9) Obtain the voltage sequence, current sequence, temperature sequence and SOC sequence of the lithium battery. Normalize the obtained voltage sequence, current sequence, temperature sequence and SOC sequence respectively. All normalized voltage sequences, normalized current sequences, normalized temperature sequences and SOH sequences normalized in step (1) constitute a set of feature sequences. (10) Combine the feature sequence set obtained in step (9) and the normalized SOC sequence into a dataset, and divide the dataset into training set, validation set and test set according to a predetermined setting, such as a ratio of 4:1:5; (11) Use all feature sequences and normalized SOC sequences in the training set of step (10) to train the CNN-BiLSTM model to obtain a pre-trained CNN-BiLSTM model. (12) Input all feature sequences in the validation set into the CNN-BiLSTM model that was initially trained in step (11) to obtain a SOC sequence composed of multiple SOC values, the length of which is equal to the length of each feature sequence in the validation set. (13) Calculate the loss function based on the SOC sequence obtained in step (12) and the normalized SOC sequence in the validation set obtained in step (10); (14) The initial learning rate, number of hidden layer nodes and L2 regularization coefficient in the initial population obtained in step (7) are used as the search starting point of the COA algorithm. The loss function obtained in step (13) is used as the objective function of the COA algorithm for iterative processing of the COA algorithm. Finally, the initial learning rate, number of hidden layer nodes and L2 regularization coefficient that minimize the loss function are obtained as the optimal solution. The CNN-BiLSTM model corresponding to the optimal solution is used as the final trained CNN-BiLSTM model for estimating SOC and SOH of lithium battery.

2. The training method for the CNN-BiLSTM model for estimating SOC and SOH of lithium batteries according to claim 1, characterized in that, Step (1) involves obtaining multiple initial feature sequences of the lithium battery and normalizing all initial feature sequences. This process includes the following sub-steps: (1-1) Obtain the integral of the charging voltage during the charging process of the lithium battery in the 1st, 2nd, ..., Nth charge and discharge processes to form the first feature sequence; (1-2) Obtain the constant current charging time of the lithium battery during the charging process of the 1st, 2nd, ..., Nth charge-discharge processes to form the second characteristic sequence; (1-3) Obtain the discharge voltage integral of the lithium battery during the discharge process of the 1st, 2nd, ..., Nth charge and discharge processes to form the third feature sequence; (1-4) Obtain the discharge voltage drop amplitude of the lithium battery during the discharge process of the 1st, 2nd, ..., Nth charge and discharge processes to form the fourth feature sequence; (1-5) Obtain the average value of the discharge voltage troughs during the discharge process of the lithium battery in the 1st, 2nd, ..., Nth charge and discharge processes to form the fifth feature sequence; (1-6) Normalize the first to fifth feature sequences obtained in steps (1-1) to (1-5), and all normalized results constitute a feature sequence set.

3. The training method for the CNN-BiLSTM model for estimating SOC and SOH of lithium batteries according to claim 2, characterized in that, The voltage drop during each discharge process refers to the maximum voltage drop of the lithium battery during the discharge process, which is the difference between the maximum and minimum voltage values ​​in the voltage curve formed during the discharge process. The average of the discharge voltage troughs in each discharge process refers to the average of the local troughs of the lithium battery voltage during that discharge process. In other words, it is the arithmetic mean of the voltages corresponding to all local minimum points formed by the temporary voltage drop in the voltage curve formed during that discharge process.

4. The training method for the CNN-BiLSTM model for estimating SOC and SOH of lithium batteries according to any one of claims 1 to 3, characterized in that, The normalization process in steps (1-6) uses the following formula: ; Where x represents any element in the feature sequence. This represents the normalized value of element x. Let x represent the minimum value of all elements in the characteristic sequence containing element x. It represents the maximum value of all elements in the characteristic sequence containing element x.

5. The training method for the CNN-BiLSTM model for estimating SOC and SOH of lithium batteries according to claim 4, characterized in that, In step (2), the correlation analysis method is the grey relational degree method. The result range of grey relational degree is 0 to 1. The feature sequences corresponding to grey relational degree of 0.8 to 1.0 are strongly correlated, the feature sequences corresponding to grey relational degree of 0.7 to 0.8 are relatively strongly correlated, and the feature sequences with grey relational degree below 0.7 are removed.

6. The training method for the CNN-BiLSTM model for estimating SOC and SOH of lithium batteries according to claim 5, characterized in that, Step (2) includes the following sub-steps: (2-1) Obtain the grey correlation coefficient between the i-th feature sequence in the feature sequence set and the k-th element in the normalized SOH sequence: ; Where k∈[1,N], This represents the normalized SOH sequence. This represents the k-th feature sequence in the set of feature sequences. It is the distinguishing factor; (2-2) Based on the grey correlation coefficient calculation results in step (2-1), the grey correlation degree between the i-th feature sequence and the SOH sequence in the feature sequence set is calculated using the following formula. : ; (2-3) Remove feature sequences with a gray correlation degree lower than the preset threshold from the feature sequence set to obtain multiple updated feature sequences.

7. The training method for the CNN-BiLSTM model for estimating SOC and SOH of lithium batteries according to claim 6, characterized in that, The loss function used in step (6) is the Mean Absolute Percentage Error (MAPE) function, which is calculated using the following formula: ; Where n is the length of the normalized SOH sequence in the validation set. and Let represent the i-th true value and the i-th estimated value in the normalized SOH sequence of the validation set, respectively.

8. The training method for the CNN-BiLSTM model for estimating SOC and SOH of lithium batteries according to claim 7, characterized in that, The parameter range in step (7) is set as follows: The initial learning rate is in the range of 10. -4 -10 -2 The number of hidden layer nodes ranges from 16 to 256, and the L2 regularization coefficient ranges from 10. -6 -10 -2 .

9. The training method for the CNN-BiLSTM model for estimating SOC and SOH of lithium batteries according to claim 8, characterized in that, The internal parameter settings for the COA algorithm in step (8) are as follows: Population size p=100; Maximum number of iterations T=100; Optimization dimension d=3; The exploration-development equilibrium coefficients are αmax = 2.0 and αmin = 0.

5. Impact factor β = 1.

0.

10. A training system for a CNN-BiLSTM model for estimating SOC and SOH of lithium batteries, characterized in that, Includes the following modules: The first module is used to obtain multiple initial feature sequences and multiple SOH values ​​of the lithium battery to form an SOH sequence. Each initial feature sequence and the SOH sequence are normalized to obtain normalized feature sequences and normalized SOH sequences. All normalized feature sequences constitute a feature sequence set, where the length of each initial feature sequence is equal to the number of charge-discharge cycles N of the lithium battery. The second module is used to calculate the correlation degree between each feature sequence in the feature sequence set obtained by the first module and the normalized SOH sequence using the correlation analysis method, and to remove feature sequences with a correlation degree lower than a preset threshold from the feature sequence set, thereby obtaining multiple updated feature sequences; The third module is used to combine the multiple updated feature sequences obtained from the second module and the normalized SOH sequences obtained from the first module into a dataset, and divide the dataset into a training set, a validation set and a test set according to a predetermined setting, such as a ratio of 4:1:

5. The fourth module is used to train the CNN-BiLSTM model using all feature sequences and normalized SOH sequences obtained from the training set in the third module, so as to obtain a pre-trained CNN-BiLSTM model. The fifth module is used to input all feature sequences from the validation set obtained in the third module into the CNN-BiLSTM model that has been pre-trained in the fourth module, so as to obtain an SOH sequence composed of multiple SOH values, the length of which is equal to the length of each feature sequence in the validation set. The sixth module is used to calculate the loss function based on the SOH sequence obtained from the fifth module and the normalized SOH sequence in the validation set obtained from the third module. The seventh module is used to set the initial learning rate range, hidden layer node number range, and L2 regularization coefficient range of the CNN-BiLSTM model, set the internal parameters of the Cobra Optimization Algorithm (COA), and generate the initial population based on the set initial learning rate range, hidden layer node number range, L2 regularization coefficient range, and COA algorithm internal parameters. The eighth module is used to take the initial learning rate, number of hidden layer nodes, and L2 regularization coefficient in the initial population obtained in the seventh module as the search starting point of the COA algorithm, and to use the loss function of the sixth module as the objective function of the COA algorithm for iterative processing. Finally, the initial learning rate, number of hidden layer nodes, and L2 regularization coefficient that minimize the loss function are obtained as the optimal solution, and the CNN-BiLSTM model corresponding to the optimal solution is used as the pre-trained CNN-BiLSTM model for estimating the SOC and SOH of lithium batteries. The ninth module is used to acquire the voltage sequence, current sequence, temperature sequence, and SOC sequence of the lithium battery. The acquired voltage sequence, current sequence, temperature sequence, and SOC sequence are normalized respectively. All normalized voltage sequences, normalized current sequences, normalized temperature sequences, and SOH sequences normalized by the first module constitute a feature sequence set. The tenth module is used to combine the feature sequence set obtained from the ninth module and the normalized SOC sequence into a dataset, and divide the dataset into training set, validation set and test set according to a predetermined setting, such as a ratio of 4:1:

5. The eleventh module is used to train the CNN-BiLSTM model using all feature sequences and normalized SOC sequences obtained from the training set in the tenth module, so as to obtain a pre-trained CNN-BiLSTM model. The twelfth module is used to input all the feature sequences in the validation set obtained from the tenth module into the CNN-BiLSTM model that has been pre-trained in the eleventh module, so as to obtain a SOC sequence composed of multiple SOC values, the length of which is equal to the length of each feature sequence in the validation set. The thirteenth module is used to calculate the loss function based on the SOC sequence obtained from the twelfth module and the normalized SOC sequence in the validation set obtained from the tenth module. The fourteenth module uses the initial learning rate, number of hidden layer nodes, and L2 regularization coefficient obtained from the initial population in the seventh module as the starting point for the COA algorithm search. It uses the loss function obtained from the thirteenth module as the objective function of the COA algorithm and performs iterative processing to obtain the initial learning rate, number of hidden layer nodes, and L2 regularization coefficient that minimize the loss function as the optimal solution. The CNN-BiLSTM model corresponding to this optimal solution is then used as the final trained CNN-BiLSTM model for estimating the SOC and SOH of lithium batteries.