Lithium ion battery RUL prediction method for optimizing CNN-LSTM-Attention model based on HBHTS algorithm
By optimizing the CNN-LSTM-Attention model through the HTS algorithm, the health factors and hyperparameters of the lithium battery aging process are automatically found, which solves the accuracy and stability problems caused by manual parameter selection and achieves more accurate and faster prediction of the remaining life of lithium batteries.
Patent Information
- Application Number
- CN202510686930.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-09-12
AI Technical Summary
The existing CNN-BILSTM-Attention network requires manual selection of network parameters for lithium battery remaining life prediction, resulting in insufficient model estimation accuracy and stability.
The HTS algorithm is used to optimize the CNN-LSTM-Attention model. The voltage, current, and temperature data of the lithium-ion battery during aging are extracted as health factors. The HTS algorithm is used to automatically find the optimal hyperparameters, combined with Min-Max normalization and Levy flight strategy optimization model.
The accuracy and stability of lithium battery remaining life prediction are improved, parameter selection errors are reduced, and prediction speed and model reliability are improved.
Smart Images

Figure CN120629950A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of battery remaining capacity prediction and relates to a lithium-ion battery RUL prediction method based on an optimized CNN-LSTM-Attention model using a HBHTS algorithm. Background Art
[0002] The remaining useful life (RUL) of a battery is a key indicator used in battery management systems to assess the health of a battery. Lithium batteries are widely used in electric vehicles, energy storage equipment, and other fields due to their high energy density, high operating voltage, and environmental friendliness. Accurate battery life estimation helps to establish a comprehensive battery recycling and reuse system. Understanding the remaining life and health status of a battery can better classify and process used batteries. For batteries that still have some service life left, they can be recycled and applied to energy storage systems, backup power supplies, and other fields. For completely failed batteries, materials can be recycled to extract valuable metals and materials for the production of new batteries, promoting the sustainable development of the battery industry. Currently, there are two main methods for estimating the RUL of lithium batteries. The first is a model-based approach, which is computationally intensive and makes it difficult to obtain accurate output values of model parameters in actual situations. The second is a data-driven approach that only processes historical battery data and has strong adaptability to nonlinear systems. It is gradually becoming the mainstream method for battery health status prediction. Although the deep neural network CNN-BILSTM-Attention can effectively capture long-term dependencies in battery aging data, extract key information from various noises, and automatically learn characteristic patterns in battery aging data, improving prediction accuracy and system reliability, the CNN-BILSTM-Attention network still relies on manual selection of network parameters, which limits the model's estimation accuracy and stability. Summary of the Invention
[0003] Purpose of the invention: The purpose of the present invention is to propose a lithium ion RUL prediction method based on the HTS algorithm optimized CNN-BILSTM-Attention model, which can reduce the manual selection of network parameters and increase the estimation accuracy and stability of the model.
[0004] Technical solution: The present invention provides a lithium-ion battery RUL prediction method based on the HBHTS algorithm to optimize the CNN-LSTM-Attention model, comprising the following steps:
[0005] (1) The voltage, current, and temperature variation data of lithium-ion batteries during aging are obtained through battery charge and discharge experiments, and the battery cycle number is defined as the battery RUL. The obtained variation data are preprocessed, and then the Spearman correlation coefficient method is used to extract the health factors in the data that are highly correlated with the aging characteristics;
[0006] (2) Using HTS as an optimization algorithm, chaotic initialization is introduced before population distribution to expand the population size;
[0007] (3) In the fruit scattering stage of HTS, a horizontal crossover strategy is introduced, where the growing tree is used as the parent generation and the fruit is used as the offspring generation, and the individuals with the smaller objective function value are retained;
[0008] (4) In the root expansion stage and iteration stage of HTS, the random walk model of Lévy flight is introduced;
[0009] (5) Use the optimized HBHTS-CNN-LSTM-Attention estimation model to determine the model evaluation indicators and training cycle, etc., to perform lithium battery RUL estimation and verify the effectiveness of the model.
[0010] Furthermore, the implementation process of obtaining the change data in step (1) is as follows:
[0011] (21) First, relevant data are extracted from the battery charge and discharge data of B0006 and B0007 as health factors;
[0012] (22) Then, F RUL It is defined as the total number of battery cycles, that is, the status value of the remaining healthy life of the battery. The formula is:
[0013] F RUL =F EOL -F0
[0014] Where F0 represents the initial cycle of the lithium-ion battery charge and discharge cycle, F EOL Indicates the total number of cycles of actual charge and discharge of lithium-ion batteries, F RUL Indicates that the number of cycles is used to represent the remaining service life (RUL) of lithium-ion batteries;
[0015] (23) Finally, the correlation analysis between the extracted battery health factors and the remaining battery life is performed to extract the health factor that can highly represent the degree of battery aging. The formula is as follows:
[0016]
[0017] In the formula, δ represents the Spearman correlation coefficient, Z represents RUL, T represents the health factor, R Z and RT denote the ranks of Z and T respectively, and Respectively represent R Z and R T The average value of the extracted health factor is higher, and the higher the δ coefficient is, the deeper the connection between the health factor and battery aging is. Therefore, the three health factors with high Spearman correlation coefficients are selected.
[0018] Furthermore, the data extracted in step (21) are as follows: the time it takes for the voltage to rise from 3.9V to 4.1V; the time it takes for the voltage to drop from 4.0V to 3.8V; the time of the constant current charging stage; the time of the constant voltage charging stage; the maximum temperature during each charging and discharging process; and the value of the charging current change.
[0019] Furthermore, the data obtained in step (1) is preprocessed by using the Min-Max normalization method to scale each sample of the obtained health factor to the unit norm and divide it into a training set and a test set.
[0020] Furthermore, the implementation process of the preprocessing is as follows:
[0021] (51) The health factor and capacity are combined into a new matrix Z;
[0022] (52) The Min-Max normalization method is used, and the formula is as follows:
[0023]
[0024] Where y max and y min Represent the maximum and minimum values of each column in the matrix Z respectively, and y represents the number in the matrix Z. After normalization, all numbers in the matrix Z are standardized in [0,1].
[0025] (53) Divide the training set and the test set into 50% each.
[0026] Furthermore, the implementation process of step (2) is as follows:
[0027] (61) The initial population distribution is improved by the Tent chaotic map, and the formula is as follows:
[0028]
[0029] Where x n represents the value of the nth iteration, x n+1 represents the value of the n+1th iteration, and u represents the control parameter;
[0030] (62) Population initialization: Initialize a randomly distributed tree population called a forest. Each tree H in the forest i is a real-valued 1×D vector defined as:
[0031] H i =[h i1 ,h i2 ,h i3 ,…,h iD ]
[0032] Among them, each element h ij The initialization is as follows:
[0033] h ij =U(0,1)×(ub j -lb j )+lb j
[0034] In the formula, U(0,1) represents a random number in the range [0,1], ub j and lb j Represent the upper and lower bounds of the j-th dimension respectively;
[0035] (63) Growth stage, tree H i The growth of is as follows:
[0036]
[0037] Where, Representation tree H I At the current t-th generation, g represents the tree H I The fitness function f of each tree is obtained by:
[0038] Furthermore, the implementation process of the fruit scattering stage in step (3) is:
[0039] Assuming that each tree produces only one fruit in each iteration, define the hazelnut seedlings as follows:
[0040]
[0041] A horizontal crossover strategy is introduced between trees and seedlings. The growing trees are regarded as the parent generation and the fruits are regarded as the offspring. The parent trees are randomly paired horizontally, and the two individuals after pairing are horizontally crossed. Let FM i1 and FM i2 is the parent individual after pairing, and its offspring and It is also generated by the following formula;
[0042]
[0043] Where FM i1j and FM i2j Represents FM respectively i1 and FM i2 The j-th dimension of and Represents FM respectively i1j He FM i2j A horizontal crossover is performed on the j-th dimension to generate the j-th dimension of the offspring. p1 and p2 are random numbers uniformly distributed in the range of (0,1), and o1 and o2 are random numbers uniformly distributed in the range of (-1,1). After growth and generation, the offspring tree is compared with the parent tree, and the individuals with smaller objective function values are retained for the next round of growth.
[0044] Furthermore, the implementation process of step (4) is as follows:
[0045] (81) In the root expansion phase, a local search is first performed, and the root is randomly explored by introducing the Lévy flight walk strategy. The random step size of the Lévy flight is introduced to adjust the position of the search point at the root, so that more excellent solution spaces can be found during the search process. The Lévy flight can increase the diversity of the search by adjusting the position of the individual. The step size of the Lévy flight obeys the Lévy distribution, which has a long-tail characteristic. The formula of the Lévy flight is as follows:
[0046]
[0047] Where s represents the step size, λ represents the random parameter of the Levy distribution, and λ is set to 1.5;
[0048] The iterative update formula of Levy flight is introduced in the update and iteration stage of this algorithm as follows:
[0049]
[0050] Where, Represents the current individual's position, α represents the step size scaling factor, and L(s,λ) represents the step size generated by the Levy distribution;
[0051] (82) In the current most suitable optimal solution H best The root expansion phase generates D solutions in the local search around the currently most suitable tree. Finally, the best solution is determined in the new solution and recorded as S. best ; The new optimal solution formula is as follows:
[0052]
[0053] (83) In the middle and late stages of the root expansion phase, as the number of searches and iterations increases, the convergence factor α should decrease slowly. In order to maximize the global root growth search, when the local search reaches the middle and late stages, the convergence factor α should decrease rapidly to concentrate the root search on the optimal solution. The adaptive convergence factor function is as follows:
[0054]
[0055] Where α(t) represents the adaptive convergence factor, β represents a constant that controls the convergence factor and has a value range of (0,1), and γ represents a constant that controls the degree of nonlinearity. When γ>1, the rate of decrease of the convergence factor will gradually slow down as t increases; when γ<1, the rate of decrease of the convergence factor will gradually accelerate as t increases.
[0056] (84) Select excellent saplings and fruits again to proceed to the initialization stage and growth stage until the following conditions are met for stopping iteration, as shown in the following formula:
[0057]
[0058] Furthermore, the implementation process of step (5) is as follows: the HBHTS algorithm is used to optimize the prediction rate and model training cycle of the CNN-LSTM-Attention network, to obtain the optimal parameter combination, the training set data is input to train the network, and the optimal HTS-CNN-LSTM-Attention estimation model is obtained; the implementation process is as follows: first, the residual R is selected N (t) is used as the input value of the model, and the mean absolute error E is used. MAE and the root mean square error E RMSE As an evaluation indicator, its formula is:
[0059]
[0060] Where m represents the time series length, Q(t) represents the actual battery capacity, It represents the predicted battery capacity, and t represents the number of charge and discharge cycles.
[0061] Then, the model without parameter optimization was used to compare with the optimized model HTS-CNN-LSTM-Attention to generate a comparison chart of the optimized and non-optimized battery RUL predictions.
[0062] Beneficial effects: Compared with the existing technology, the present invention has the following significant advantages: the present invention extracts the battery's point voltage, current, temperature data and RUL-related health factors from the lithium-ion charging and discharging process, which are correlated with the parameter information representing the remaining battery life; using the extracted health factors as the input data of the model not only improves the model's prediction accuracy, but also improves the model's prediction speed; compared with the traditional CNN-BILSTM-Attention model, which requires manual selection of different hyperparameter data, the use of the HTS algorithm to automatically find the optimal hyperparameter data solves the problem of high error and low accuracy caused by improper parameter selection; the estimation accuracy and stability of the constructed CNN-BILSTM-Attention model are improved, and the prediction speed of the battery's remaining life is optimized, thereby implementing a ladder-like utilization of the battery and maximizing the use of battery capacity and life. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 This is a convergence comparison diagram after HTS optimization in the present invention;
[0064] Figure 2 is a capacity degradation curve diagram of lithium-ion batteries B0005 and B006 in the present invention;
[0065] Figure 3 This is a comparison chart of the prediction results of the lithium-ion battery B0005 in the present invention;
[0066] Figure 4 This is a comparison chart of the prediction results of the lithium-ion battery B0006 in the present invention;
[0067] Figure 5 This is a flow chart for predicting the life of a lithium-ion battery in the present invention. DETAILED DESCRIPTION
[0068] The specific technical solutions of the present invention are further described in detail below with reference to specific examples.
[0069] As shown in the figure, the lithium-ion battery RUL prediction method based on the HBHTS algorithm optimized CNN-LSTM-Attention model described in the present invention has the following specific operating steps:
[0070] Step (1): The most intuitive manifestation of battery life degradation is the degradation of battery capacity. Therefore, the capacity of lithium-ion batteries is selected as a health factor for life prediction, and a battery discharge characteristic test experiment is performed to obtain a lithium-ion battery capacity degradation curve.
[0071] Step (2): The changes in voltage, current, and temperature of the lithium battery during different charge and discharge cycles can effectively reflect the degradation state of the battery. Therefore, a battery charge and discharge characteristic test experiment is performed to obtain the change data of voltage, current, and temperature during the aging process of the lithium-ion battery.
[0072] Step (3), extracting a health factor that can characterize battery degradation from the acquired data;
[0073] Step (4), data preprocessing, i.e., using the Min-Max normalization method to scale each sample of the obtained health factor to the unit norm, and dividing it into a training set and a test set;
[0074] Step (5) Optimizing the HTS algorithm using the Tent chaos mapping method. In the initial stage of the algorithm, the randomly generated trees may be unevenly distributed. Therefore, chaos initialization is used and the results are modulo-ed to make the information of the tree in each dimension more standardized and the obtained results more accurate.
[0075] Step (6), in the fruit scattering stage of HTS, a horizontal crossover strategy is introduced, where the growing tree is used as the parent generation and the fruit is used as the child generation, and individuals with smaller objective function values are retained, which is beneficial to improving the algorithm accuracy and avoiding local optimal solutions;
[0076] Step (7), in the root expansion phase and iteration phase of HTS, a special random walk model of Levy flight is introduced to enable the algorithm to better escape from the local optimal solution and make the HTS algorithm more diverse;
[0077] Step (8) Input the optimized HTS into the CNN-LSTM-Attention model, establish the HTS-CNN-LSTM-Attention prediction model, and select the residual R N (t) is used as the input value of the HTS-CNN-LSTM-Attention model to establish a mapping relationship between the early and late capacity, predict the unknown battery capacity sequence, and obtain the number of cycles when the capacity reaches the threshold through iterative prediction, and calculate the battery RUL;
[0078] Step (9) uses the optimal HTS-CNN-LSTM-Attention estimation model to perform lithium battery RUL estimation and verify the effectiveness of the model.
[0079] The specific method for selecting the lithium-ion battery capacity in step (1) to quantitatively describe the current lithium-ion RUL is:
[0080] F RUL Defined as the ratio of the actual battery capacity to the rated battery capacity, that is, the battery health status value F RUL , the formula is:
[0081] F RUL =F EOL -F0
[0082] Where F0 represents the initial cycle of the lithium-ion battery charge and discharge cycle, F EOL Indicates the cycle at the end of the battery life under actual charging and discharging conditions of lithium-ion batteries, F RUL Indicates that the life of lithium-ion batteries is represented by the number of cycles;
[0083] Then the RUL prediction equation is:
[0084]
[0085] Where, Indicates the cycle at which the lithium-ion battery reaches the end of its life under predicted conditions. It represents the predicted life of lithium-ion batteries;
[0086] The mean absolute error E MAE and the root mean square error E RMSE As an evaluation indicator, its formula is:
[0087]
[0088] Where m represents the time series length, Q(t) represents the actual battery capacity, It represents the predicted battery capacity, and t represents the number of charge and discharge cycles.
[0089] In step (1), the lithium-ion battery capacity is selected as a health factor for life prediction, and a battery discharge characteristic test experiment is performed to obtain a lithium-ion battery capacity degradation curve. The specific operation method is:
[0090] (11) Select 18650 lithium-ion batteries numbered B0006 and B0007, place the batteries in a constant temperature box, and set the temperature to 24°C;
[0091] (12) Charging: The lithium-ion battery is charged in constant current mode (current is 1.5A) until the voltage reaches 4.2V; after that, the lithium-ion battery continues to be charged in constant voltage mode until the charging current drops to 20mA, and the charging is completed;
[0092] (13) Discharge: The lithium-ion battery is discharged in constant current mode with a discharge current of 2A until the voltage reaches the set cut-off voltage of 2.5V;
[0093] (14) Cyclic charge and discharge: Repeat the above steps (12) and (13) and set the charge and discharge time interval to 0.5h-1h;
[0094] (15) When the number of cycles allowed by the battery is reached, the experiment is terminated and a capacity degradation curve of the lithium-ion battery is plotted.
[0095] In step (3), extracting a health factor that can characterize battery degradation from the voltage, current, and temperature change data obtained during the aging process of the lithium-ion battery includes:
[0096] (31) Extract the time it takes for the voltage to rise from 3.9V to 4.1V and the time it takes for the voltage to drop from 4.0V to 3.8V in each charge and discharge process from the battery charge and discharge data of B0006 and B0007, and store these time values in the HF1 and HF2 arrays respectively;
[0097] (32) Extract the time spent in the constant current charging stage and the constant voltage charging stage in each charging process from the two groups of battery charging data B0006 and B0007, and store these time values in the HF3 and HF4 arrays respectively;
[0098] (33) Extract the maximum temperature during each charge and discharge process from the two battery discharge data sets B0006 and B0007, and store these time values in the two arrays HF5 and HF6 respectively.
[0099] In step (4), the health factor and RUL are subjected to correlation analysis to select the health factor that highly characterizes battery aging. The specific method is as follows:
[0100] The Spearman correlation coefficient is used as the correlation analysis method, and its formula is:
[0101]
[0102] In the formula, δ represents the Spearman correlation coefficient, Z represents RUL, T represents the health factor, R Z and R T denote the ranks of Z and T respectively, and Respectively represent R Z and R T The average value of
[0103] Select three or four health factors with high Spearman correlation coefficients.
[0104] The data preprocessing in step (5) includes:
[0105] (51) The health factor and capacity are combined into a new matrix Z;
[0106] (52) The Min-Max normalization method is used, and the formula is:
[0107]
[0108] Where y max and y min Represent the maximum and minimum values of each column in the matrix Z respectively, y is the number in the matrix Z. After normalization, all numbers in the matrix Z are standardized in [0,1];
[0109] (53) Divide the training set into the test set.
[0110] The step (6) uses the HTS algorithm as the parameter optimization algorithm of the CNN-LSTM-Attention model, and improves the HTS algorithm to obtain the optimal CNN-LSTM-Attention estimation model. The specific operations are as follows:
[0111] (61) The initial population distribution is improved by Tent chaotic mapping, and the formula is:
[0112]
[0113] Where x n represents the value of the nth iteration, x n+1 represents the value of the n+1th iteration, and u represents the control parameter;
[0114] (62) Population initialization: Initialize a randomly distributed tree population called a forest. Each tree H in the forest i is a real-valued 1×D vector defined as:
[0115] H i =[h i1 ,h i2 ,h i3 ,…,h iD ]
[0116] Among them, each element h ij The initialization is as follows:
[0117] h ij =U(0,1)×(ub j -lb j )+lb j
[0118] Where U(0,1) represents a random number in the range [0,1], ub j and lb j Represent the upper and lower bounds of the j-th dimension respectively;
[0119] (63), growth stage, tree H i The growth of is expressed by the following formula:
[0120]
[0121] Where, Representation tree H I At the current t-th generation, g represents the tree H I The growth rate in the absence of neighboring trees, λ represents the competition index, α represents the switching probability of controlling the tree to grow in a sparse or dense area, when α is 1, it means the tree is in a sparse area, when α is 0, it means the tree is in a dense area; thus, the fitness function f of each tree is obtained;
[0122] (64) Fruit scattering stage, assuming that each tree produces only one fruit in each iteration, the hazelnut seedlings are defined as follows:
[0123]
[0124] A crossover strategy was introduced between the tree and the seedling, with the growing tree as the parent and the fruit as the offspring. The parent tree was randomly paired horizontally, and the two paired individuals were crossovered horizontally. Assuming FM i1 and FM i2 is the parent individual after pairing, and its offspring and It is also generated by the following formula;
[0125]
[0126] Where FM i1j and FM i2j Represents FM respectively i1 and FM i2 The jth dimension of and FM i1j He FM i2j A horizontal crossover is performed on the j-th dimension to generate the j-th dimension of the offspring. p1 and p2 are random numbers uniformly distributed in the range (0, 1), while o1 and o2 are random numbers uniformly distributed in the range (-1, 1). After growth, the offspring tree is compared with the parent tree, and the individuals with the smaller objective function value are retained. The individuals with better fitness are considered for the next generation. The trees and seedlings are selected based on fitness value and are selected as the parents of the next generation, which is the sub-population of the previous generation. The screening formula is as follows:
[0127]
[0128] (65) Root expansion stage: In the root expansion stage, a local search is first performed, and the root is randomly explored by introducing the Levy flight wandering strategy. The random step length of the Levy flight is introduced to adjust the position of the search point at the root, so that more excellent solution spaces can be found in the search process; Levy flight can increase the diversity of the search by adjusting the position of the individual. The step length of the Levy flight obeys the Levy distribution, which has a long tail characteristic. The formula of the Levy flight is:
[0129]
[0130] Where s is the step size, λ is the random parameter of the Levy distribution, which is usually set to 1<λ≤2. Here, λ is set to 1.5.
[0131] The iterative update formula of Levy flight introduced in the update and iteration stage of this algorithm is:
[0132]
[0133] Where, Represents the current individual's position, α represents the step size scaling factor, and L(s,λ) represents the step size generated by the Levy distribution;
[0134] (66) At the current most suitable optimal solution H best The root expansion phase generates D solutions in the local search around the current most suitable tree. Finally, the best solution is determined in the new solution and recorded as S. best ; The new optimal solution formula is as follows:
[0135]
[0136] (67) In the middle and late convergence stages of the root expansion phase, as the search and iteration increase, the convergence factor α should decrease slowly, so that the root has a larger growth range target and the global root growth search is maximized. Therefore, when the local search reaches the middle and late stages, the convergence factor α should decrease rapidly to concentrate the root search for the optimal solution target. Rapid convergence can promote the effectiveness of the HTS algorithm's optimization and faster convergence. Therefore, an adaptive convergence factor function expression is improved;
[0137]
[0138] Where α(t) represents the adaptive convergence factor, which is a function of the number of iterations t. β represents a constant that controls the convergence factor, and the value range of β is (0, 1). γ is a constant that controls the degree of nonlinearity. When γ>1, the rate of decrease of the convergence factor will gradually slow down as t increases; when γ<1, the rate of decrease of the convergence factor will gradually accelerate as t increases.
[0139] (68) Select excellent saplings and fruits again to carry out the initialization and growth stages in (62) and (63) until the conditions for stopping iteration are selected.
[0140]
[0141] (69) The HTS algorithm is used to optimize the prediction rate and model training cycle of the CNN-LSTM-Attention network, and the optimal parameter combination is obtained. The training set data is input into the training network to obtain the optimal HTS-CNN-LSTM-Attention estimation model.
[0142] The step (6) uses the optimal CNN-LSTM-Attention estimation model to perform lithium battery RUL estimation and verify the effect of the model. The specific operation is: using the HTS-CNN-LSTM-Attention model without parameter optimization and comparing it with the optimized HTS-CNN-LSTM-Attention model.
[0143] In summary, the present invention uses HTS to intelligently optimize hyperparameters such as the learning rate, number of hidden units, and maximum training cycle of the CNN-BILSTM-Attention model; constructs a mapping relationship between the lithium-ion battery health factor and RUL through the optimized HTS-CNN-BILSTM-Attention estimation model, and realizes rapid estimation of RUL; compared with the traditional CNN-BILSTM-Attention model, the accuracy is higher. For the battery health status prediction of the B0005 battery, the accuracy is improved by about 17.2% compared with the unoptimized CNN-BILSTM-Attention neural network model; for the B0006 battery, the prediction accuracy is improved by about 16.3% compared with the unoptimized CNN-BILSTM-Attention neural network model, which shows that the lithium-ion battery health status prediction method proposed in the present invention has higher prediction accuracy.
Claims
1. A lithium-ion battery RUL prediction method based on the HBHTS algorithm to optimize the CNN-LSTM-Attention model, characterized in that: The following steps are involved: (1) The voltage, current, and temperature variation data of lithium-ion batteries during aging are obtained through battery charge and discharge experiments, and the battery cycle number is defined as the battery RUL. The obtained variation data are preprocessed, and the Spearman correlation coefficient method is used to extract the health factors in the data that are highly correlated with the aging characteristics; (2) Using HTS as an optimization algorithm, chaotic initialization is introduced before population distribution to expand the population size; (3) In the fruit scattering stage of HTS, a horizontal crossover strategy is introduced, where the growing tree is used as the parent generation and the fruit is used as the offspring generation, and the individuals with the smaller objective function value are retained; (4) In the root expansion stage and iteration stage of HTS, the random walk model of Lévy flight is introduced; (5) Use the optimized HBHTS-CNN-LSTM-Attention estimation model to determine the model evaluation indicators and training cycle, etc., to perform lithium battery RUL estimation and verify the effectiveness of the model.
2. The lithium-ion battery RUL prediction method based on the HBHTS algorithm optimized CNN-LSTM-Attention model according to claim 1 is characterized in that: The implementation process of obtaining the change data in step (1) is as follows: (21) First, relevant data are extracted from the battery charge and discharge data of B0006 and B0007 as health factors; (22) Then, F RUL It is defined as the total number of battery cycles, and its formula is: F RUL =F EOL -F0 Where F0 represents the initial cycle of the lithium-ion battery charge and discharge cycle, F EOL Indicates the total number of cycles of actual charge and discharge of lithium-ion batteries, F RUL Indicates that the number of cycles is used to represent the remaining service life (RUL) of lithium-ion batteries; (23) Finally, the extracted battery health factor is correlated with the remaining battery life, and a health factor that can highly represent the degree of battery aging is extracted. The formula is as follows: In the formula, δ represents the Spearman correlation coefficient, Z represents RUL, T represents the health factor, R Z and R T denote the ranks of Z and T respectively, and Respectively represent R Z and R T The average value of .
3. The lithium-ion battery RUL prediction method based on the HBHTS algorithm optimized CNN-LSTM-Attention model according to claim 2 is characterized in that: The data extracted in step (21) are as follows: the time it takes for the voltage to rise from 3.9V to 4.1V, the time it takes for the voltage to drop from 4.0V to 3.8V, the constant current charging stage time, the constant voltage charging stage time, the maximum temperature value during each charging and discharging process, and the value of the charging current change.
4. The lithium-ion battery RUL prediction method based on the HBHTS algorithm optimized CNN-LSTM-Attention model according to claim 1 is characterized in that: In the step (1), the acquired data is preprocessed by using the Min-Max normalization method, each sample of the acquired health factor is scaled to the unit norm, and the data is divided into a training set and a test set.
5. The lithium-ion battery RUL prediction method based on the HBHTS algorithm optimized CNN-LSTM-Attention model according to claim 4 is characterized in that: The implementation process of the preprocessing is as follows: (51) The health factor and capacity are combined into a new matrix Z; (52) The Min-Max normalization method is used, and the formula is as follows: Where y max and y min Represent the maximum and minimum values of each column in the matrix Z respectively, and y represents the number in the matrix Z. After normalization, all numbers in the matrix Z are standardized in [0,1]. (53) Divide the training set and the test set into 50% each.
6. The lithium-ion battery RUL prediction method based on the HBHTS algorithm optimized CNN-LSTM-Attention model according to claim 1, characterized in that: The implementation process of step (2) is as follows: (61) The initial population distribution is improved by the Tent chaotic map, and the formula is as follows: Where x n represents the value of the nth iteration, x n+1 represents the value of the n+1th iteration, and u represents the control parameter; (62) Population initialization: Initialize a randomly distributed tree population called a forest. Each tree H in the forest i is a real-valued 1×D vector defined as: H i =[h i1 ,h i2 ,h i3 ,…,h iD ] Among them, each element h ij The initialization is as follows: h ij =U(0,1)×(ub j -lb j )+lb j In the formula, U(0,1) represents a random number in the range [0,1], ub j and lb j Represent the upper and lower bounds of the j-th dimension respectively; (63) Growth stage, tree H i The growth of is as follows: Where, Representation tree H I At the current t-th generation, g represents the tree H I The fitness function f of each tree is obtained by:
7. The lithium-ion battery RUL prediction method based on the HBHTS algorithm optimized CNN-LSTM-Attention model according to claim 1, characterized in that: The implementation process of the fruit scattering stage in step (3) is: Assuming that each tree produces only one fruit in each iteration, define the hazelnut seedlings as follows: A horizontal crossover strategy is introduced between trees and seedlings. The growing trees are regarded as the parent generation and the fruits are regarded as the offspring. The parent trees are randomly paired horizontally, and the two individuals after pairing are horizontally crossed. Let FM i1 and FM i2 is the parent individual after pairing, and its offspring and It is also generated by the following formula; Where FM i1j and FM i2j Represents FM respectively i1 and FM i2 The j-th dimension of and Represents FM respectively i1j He FM i2j A horizontal crossover is performed on the j-th dimension to generate the j-th dimension of the offspring. p1 and p2 are random numbers uniformly distributed in the range of (0,1), and o1 and o2 are random numbers uniformly distributed in the range of (-1,1). After growth and generation, the offspring tree is compared with the parent tree, and the individuals with smaller objective function values are retained for the next round of growth.
8. The lithium-ion battery RUL prediction method based on the HBHTS algorithm optimized CNN-LSTM-Attention model according to claim 1, characterized in that: The implementation process in step (4) is as follows: (81) In the root expansion stage, a local search is first performed, and the root is randomly explored by introducing the Lévy flight walk strategy. The random step size of the Lévy flight is introduced to adjust the position of the search point at the root. The formula of the Lévy flight is as follows: Where s represents the step size, λ represents the random parameter of the Levy distribution, and λ is 1.5; The iterative update formula of Levy flight is introduced in the update and iteration stage of this algorithm as follows: Where, Represents the current individual's position, α represents the step size scaling factor, and L(s,λ) represents the step size generated by the Levy distribution; (82) In the current most suitable optimal solution H best Execute around and determine the best solution among the new solutions, denoted as S best ; The new optimal solution formula is as follows: (83) In the middle and late stages of the root expansion phase, as the number of searches and iterations increases, when the local search reaches the middle and late stages, the convergence factor α decreases; the adaptive convergence factor function is as follows: Where α(t) represents the adaptive convergence factor, β represents a constant that controls the convergence factor and has a value range of (0,1), and γ represents a constant that controls the degree of nonlinearity. When γ>1, the rate of decrease of the convergence factor will slow down as t increases; when γ<1, the rate of decrease of the convergence factor will accelerate as t increases. (84) Select excellent saplings and fruits again to proceed to the initialization stage and growth stage until the following conditions for stopping iteration are found, as shown in the following formula:
9. The lithium-ion battery RUL prediction method based on the HBHTS algorithm optimized CNN-LSTM-Attention model according to claim 1, characterized in that: The implementation process of step (5) is as follows: using the HBHTS algorithm to optimize the prediction rate and model training cycle of the CNN-LSTM-Attention network, obtaining the optimal parameter combination, inputting the training set data to train the network, and obtaining the optimal HTS-CNN-LSTM-Attention estimation model.
10. The lithium-ion battery RUL prediction method based on the HBHTS algorithm optimized CNN-LSTM-Attention model according to claim 9, characterized in that: The implementation process is as follows: First, select the residual R N (t) is used as the input value of the model, and the mean absolute error E is used. MAE and the root mean square error E RMSE As an evaluation indicator, its formula is: Where m represents the time series length, Q(t) represents the actual battery capacity, represents the predicted battery capacity, and t represents the number of charge and discharge cycles; Then, the model without parameter optimization was used to compare with the optimized model HTS-CNN-LSTM-Attention to generate a comparison chart of the optimized and non-optimized battery RUL predictions.