Lithium battery capacity prediction method based on short-term charging data and enhanced whale optimization algorithm
Through a lithium battery capacity prediction method based on short-term charging data and an enhanced whale optimization algorithm, the problems of large training data requirements and insufficient applicability in existing technologies are solved, and accurate battery capacity prediction and a reduction in the amount of training data are achieved.
Patent Information
- Application Number
- CN202411279141.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-09-12
AI Technical Summary
Existing machine learning methods have a large demand for training data and insufficient applicability in lithium battery capacity prediction, and are unable to adapt to changes in battery types, resulting in the need to remodel and retrain the prediction model.
A lithium battery capacity prediction method based on short-term charging data and an enhanced whale optimization algorithm is adopted. By collecting charging and discharging data in real time, the enhanced whale optimization algorithm is used to extract battery aging characteristics, and the Gaussian process regression model is combined for prediction, reducing the amount of training data and improving the universal applicability of the prediction model.
It achieves accurate prediction of battery capacity for different types of batteries, improves prediction accuracy, and reduces the amount of training data, making it suitable for capacity prediction of different types of batteries.
Smart Images

Figure CN119147972B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of lithium battery technology, and in particular to a lithium battery capacity prediction method based on charging data and an enhanced whale algorithm. Background Art
[0002] Lithium batteries, as a clean and efficient energy storage solution, are widely used in electric vehicles (EVs). However, over time and frequency of use, lithium batteries experience capacity degradation, impacting their reliability. Therefore, accurately estimating battery capacity is crucial for improving EV safety and maximizing performance.
[0003] Machine learning algorithms are also increasingly being used for battery capacity prediction. However, current machine learning methods rely on building prediction models based on battery type, using large amounts of training data to predict battery capacity. This approach not only requires a large amount of training data and high requirements for its characteristic parameters, but also becomes unusable when the battery type changes, requiring re-modeling and retraining. Therefore, in battery capacity prediction solutions, improving the universal applicability of prediction models and reducing the amount of training data while accurately predicting battery capacity are key issues that need to be addressed. Summary of the Invention
[0004] In order to overcome the above technical defects, an embodiment of the present invention provides a lithium battery capacity prediction method based on short-term charging data and an enhanced whale optimization algorithm, which can accurately predict the battery capacity of different types of batteries, improve the accuracy of capacity prediction, and reduce the amount of training data.
[0005] An embodiment of the present invention provides a lithium battery capacity prediction method based on short-term charging data and an enhanced whale optimization algorithm, comprising:
[0006] During the cyclic charge and discharge test of different types of batteries, the battery charge and discharge data are collected and recorded in real time, and short-term charging data are extracted. The charge and discharge data includes charging time, voltage, current and capacity data. The short-term charging data is obtained by spline interpolation of the charging voltage and current data within the preset short-term charging time.
[0007] The enhanced whale optimization algorithm is used to extract battery aging characteristics from short-term charging data through iterative optimization. The enhanced whale optimization algorithm is an improvement on the classic whale optimization algorithm by introducing a pooling mechanism, a migration search strategy, a priority selection search strategy, and a prey encirclement search strategy. The battery aging characteristics are the voltage increments in the voltage interval corresponding to the charging time interval with the strongest correlation with the battery capacity.
[0008] For different types of batteries or batteries of the same type, the charge and discharge data and aging characteristics are input into the Gaussian process regression model to predict the battery capacity prediction value, where the Gaussian process regression model is constructed based on the Gaussian process regression algorithm.
[0009] Optionally, in a possible implementation of the above-mentioned lithium battery capacity prediction method, the specific steps of setting the parameters of the enhanced whale optimization algorithm include: taking the Spearman correlation coefficient of the voltage increment and the battery capacity as the objective function, and defining the optimization target as minimizing the Spearman correlation coefficient of the voltage increment and the battery capacity; setting the optimization object as the upper and lower limits of the charging time interval; setting the enhanced whale optimization algorithm parameters: the number of search agents, the number of decision variables, the maximum number of iterations, the number of executions, and the upper and lower limits of the optimization object.
[0010] Optionally, in a possible implementation of the above-mentioned lithium battery capacity prediction method, the specific steps of iterative optimization include: based on the enhanced whale optimization algorithm, randomly initializing a group of whales in the hyperparameter space, that is, the candidate solutions of the algorithm; extracting the voltage increment corresponding to the upper and lower limits of the charging time interval represented by each whale, and calculating the Spearman correlation coefficient between the voltage increment and the battery capacity, and evaluating the algorithm performance with the fitness function; updating the position of the whale, that is, the upper and lower limits of the charging time interval according to the rules of the enhanced whale optimization algorithm; continuously updating the position of the whale until the maximum number of iterations is reached, obtaining the global optimal solution of the charging time interval with the strongest correlation with the battery capacity, finding the voltage increment of the corresponding voltage interval and using it as the aging feature.
[0011] Optionally, in a possible implementation of the above lithium battery capacity prediction method, the pooling mechanism is defined as: given a matrix of size k, Pool = (p1, p2, ..., p k ), at the end of each iteration, the element P in the matrix Pool is generated i =(p i,1 ,p i,2 ,...,p i,D ), element P i The resulting formula is as follows:
[0012]
[0013] Where, P i t represents the element of the t-th iteration, is the binary random vector in the tth iteration, is its inverse vector, is the worst solution in the tth iteration, It represents the optimal solution generated in the tth iteration A random location nearby the corresponding whale.
[0014] Optionally, in a possible implementation of the above lithium battery capacity prediction method, the working principle of the migration search strategy can be summarized as follows:
[0015]
[0016] Where: represents the position of the i-th whale in the t+1th iteration; represents the random position of the whale in the search space at the tth iteration; rand is a random number between [0,1) and it obeys a uniform distribution; δ max and δ min They correspond to the upper and lower bounds of the problem respectively; δ best-max and δ best-min Then they correspond to the optimal solutions The upper and lower bounds of .
[0017] Optionally, in a possible implementation of the above lithium battery capacity prediction method, the working principle of the priority search strategy can be summarized as follows:
[0018]
[0019] Where: represents the position of the i-th whale in the t-th iteration; and are positions 1 and 2 randomly selected from the matrix Pool in the tth iteration; MaxIt represents the maximum number of iterations set in the enhanced whale optimization algorithm.
[0020] Optionally, in a possible implementation of the above-mentioned lithium battery capacity prediction method, the working principle of the encirclement prey search strategy can be summarized as the following equation:
[0021]
[0022] Where: is the position 3 randomly selected from the matrix Pool in the tth iteration.
[0023] Optionally, in a possible implementation of the above-mentioned lithium battery capacity prediction method, the specific steps of training the Gaussian process regression model include: using the extracted first 15% aging characteristics of a battery and the battery capacity data as a model training set, using the training set to run the Gaussian process regression model to find correlations, and saving the resulting model.
[0024] Optionally, in a possible implementation of the above-mentioned lithium battery capacity prediction method, it is characterized in that for different batteries of different types, the specific steps of battery capacity prediction include: inputting the first 15% battery capacity data and aging characteristics collected from a certain battery into a Gaussian process regression model for model training, and inputting the last 85% battery capacity data and aging characteristics collected from the battery into the trained Gaussian process regression model for model verification, and inputting all characteristics of other batteries of the same type into the trained Gaussian process regression model to obtain the battery capacity prediction value of the battery.
[0025] Optionally, in a possible implementation of the above-mentioned lithium battery capacity prediction method, for batteries of the same type, the specific steps of battery capacity prediction include: for different batteries of the same type, the last 85% of the battery capacity data obtained during the battery cycle charge and discharge test and the aging characteristics of the battery are directly input into the trained Gaussian process regression model to obtain the battery capacity prediction value of the corresponding battery.
[0026] The above technical solution can achieve the following technical effects in the embodiments of the present invention:
[0027] In the lithium battery capacity prediction method based on short-term charging data and the enhanced whale optimization algorithm in an embodiment of the present invention, short-term charging data is first obtained by interpolating the charging voltage and current data within the short-term charging time. Secondly, the classic whale optimization algorithm is improved by introducing a pooling mechanism, a migration search strategy, a priority search strategy, and a surround-prey search strategy, so that the algorithm's search ability and the ability to escape the local optimum are improved, and the algorithm's local search ability and global search ability are balanced. Therefore, when the enhanced whale optimization algorithm is used to extract battery aging features from short-term charging data, the extracted battery aging features can be made more correlated with the battery capacity. The battery aging features extracted using this method can improve the prediction accuracy of battery capacity prediction. At the same time, since the features are extracted from the charging current and voltage data within the short-term charging time of different similar batteries, the prediction method can also predict the battery capacity of different types of batteries, and at the same time reduce the amount of training data required for prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings illustrate exemplary embodiments and constitute a part of the specification. Together with the description of the specification, they serve to explain exemplary implementation of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals designate similar, but not necessarily identical, elements.
[0029] Figure 1 A schematic flow chart of a lithium battery capacity prediction method based on short-term charging data and an enhanced whale optimization algorithm in Example 1;
[0030] Figure 2 A flow chart showing the parameter setting of the enhanced whale optimization algorithm in Example 2;
[0031] Figure 3 A schematic diagram of a process for iterative optimization in Example 3;
[0032] Figure 4 A graph showing the relationship between selected characteristics and capacity aging at different cycle times in Example 5;
[0033] Figure 5 Graph showing the prediction results of the test set after training with the first 15% of the data of cell 1 in Example 5;
[0034] Figure 6 This figure shows the prediction results of similar batteries after training using the first 15% data of cells 2 and 3 in Example 5;
[0035] Figure 7 A diagram showing prediction results of applying the method in Example 5 to different types of batteries;
[0036] Figure 8 This is a schematic diagram of the architecture of the lithium battery capacity prediction system in Example 6;
[0037] Figure 9 This is a hardware structure diagram of a computer device suitable for implementing the lithium battery capacity prediction method in Example 7. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0039] It should be noted that the descriptions of "first", "second", etc. in the embodiments of the present invention are for descriptive purposes only and should not be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0040] To facilitate understanding of the technical solutions of the embodiments of the present invention, the technical solutions of the embodiments of the present invention will be described below with reference to the accompanying drawings, as follows:
[0041] Example 1
[0042] See Figure 1 The lithium battery capacity prediction method based on short-term charging data and the enhanced whale optimization algorithm in the embodiment of the present invention is described as follows:
[0043] S1. During the cyclic charge and discharge test of different types of batteries, the battery charge and discharge data is collected and recorded in real time, and short-term charging data is extracted.
[0044] Specifically, charge and discharge data includes charging time, voltage, current, and capacity. For example, different models of lithium-ion batteries are subjected to cyclic charge and discharge tests until the discharge capacity of each battery model falls below 80% of the nominal capacity, and the battery charge and discharge data is recorded in real time. Short-term charging data is obtained by performing spline interpolation on the charging voltage and current data within a preset short-term charging time. For example, the number of spline interpolations can be three, such as performing cubic spline interpolation on the recorded voltage and current data with a sampling interval of 30 seconds, so that the interval between each two data points is 1 second.
[0045] S2. Based on the enhanced whale optimization algorithm, battery aging characteristics are extracted from short-term charging data through iterative optimization.
[0046] Specifically, the enhanced whale optimization algorithm is obtained by introducing a pooling mechanism, a migration search strategy, a priority search strategy, and a prey encirclement search strategy into the classic whale optimization algorithm. The battery aging characteristic is the voltage increment of the voltage interval corresponding to the charging time interval with the strongest correlation with the battery capacity.
[0047] The above battery aging characteristics can be extracted from the charge and discharge data interpolated 30 minutes before the start of charge and discharge, where the battery capacity can be recorded as Q, and the charging time interval with the strongest correlation with the battery capacity, the corresponding voltage interval and the voltage increment are recorded as [X best1 X best2 ]s,[Y best1 Y best2 ]V and ΔY best .
[0048] S3. For different types of batteries or batteries of the same type, the charge and discharge data and aging characteristics are input into the Gaussian process regression model to predict the battery capacity.
[0049] Specifically, the Gaussian process regression model is constructed based on the Gaussian process regression algorithm.
[0050] The training process of the Gaussian process regression model in embodiment S3 of the present invention specifically includes the following steps: using the extracted first 15% aging characteristics of a battery and the battery capacity data as a model training set, using the training set to run the Gaussian process regression model to find correlations, and saving the resulting model.
[0051] Further optionally, the specific technical solution for battery capacity prediction in embodiment S3 of the present invention is as follows:
[0052] On the one hand, for different types of different batteries, the specific steps of battery capacity prediction include: inputting the first 15% battery capacity data and aging characteristics collected from a certain battery into the Gaussian process regression model for model training, and inputting the remaining 85% battery capacity data and aging characteristics collected from the battery into the trained Gaussian process regression model for model verification, and inputting all characteristics of other batteries of the same type into the trained Gaussian process regression model to obtain the battery capacity prediction value of the battery.
[0053] On the other hand, for batteries of the same type, the specific steps for predicting battery capacity include: for different batteries of the same type, the last 85% of the battery capacity data obtained during the battery cycle charge and discharge test and the aging characteristics of the battery are directly input into the trained Gaussian process regression model to obtain the battery capacity prediction value of the corresponding battery.
[0054] In the lithium battery capacity prediction method based on short-term charging data and the enhanced whale optimization algorithm in an embodiment of the present invention, short-term charging data is first obtained by interpolating the charging voltage and current data within the short-term charging time. Secondly, the classic whale optimization algorithm is improved by introducing a pooling mechanism, a migration search strategy, a priority search strategy, and a surround-prey search strategy, so that the algorithm's search ability and the ability to escape the local optimum are improved, and the algorithm's local search ability and global search ability are balanced. Therefore, when the enhanced whale optimization algorithm is used to extract battery aging features from short-term charging data, the extracted battery aging features can be made more correlated with the battery capacity. The battery aging features extracted using this method can improve the prediction accuracy of battery capacity prediction. At the same time, since the features are extracted from the charging current and voltage data within the short-term charging time of different similar batteries, the prediction method can also predict the battery capacity of different types of batteries, and at the same time reduce the amount of training data required for prediction.
[0055] Example 2
[0056] See Figure 2 The parameter setting of the enhanced whale optimization algorithm in S2 in the embodiment of the present invention is described, which specifically includes the following steps:
[0057] S2.1. Taking the Spearman correlation coefficient between the voltage increment and the battery capacity as the objective function, the optimization objective is defined as minimizing the Spearman correlation coefficient between the voltage increment and the battery capacity.
[0058] That is, the Spearman correlation coefficient between ΔY and Q is used as the objective function, and the optimization goal is defined as minimizing the Spearman correlation coefficient between ΔY and Q.
[0059] S2.2. Set the optimization object to the upper and lower limits of the charging time interval, where the upper and lower limits can be denoted as X1 and X2 respectively.
[0060] S2.3. Set the parameters of the enhanced whale optimization algorithm: the number of search agents, the number of decision variables, the maximum number of iterations, the number of executions, and the upper and lower limits of the optimization object.
[0061] First, the key point involved in this step is how to effectively predict the capacity of lithium batteries through specific numerical indicators, which is completed based on an objective function and corresponding parameter settings. The core of using the Spearman correlation coefficient between voltage increment and battery capacity as the objective function is to define the best result desired in the optimization process. In this case, the goal is to minimize this relationship to reduce the correlation between them. This means seeking the independence of voltage increment from the prediction of battery capacity under given conditions. To achieve this, we set the optimization goal to minimize the Spearman correlation coefficient between voltage increment and battery capacity.
[0062] Next, considering the various possible interval distribution characteristics of the battery charging process and selecting an appropriate range to constrain is crucial; this constitutes the second important step: determining the optimization object. In this step, we focus on defining the charging time range for lithium batteries, viewing the setting of upper and lower limits as a means to adjust the efficiency of the entire system to avoid ineffective or overcharging.
[0063] In the specific optimization parameter design phase (such as the parameter setting for the enhanced whale optimization algorithm), these values directly influence the algorithm's behavior and whether it can ultimately converge to the ideal solution set. These include the number of search agents, which determines the size of the search space; the number of decision variables that define the dimensions of the search space; and the number of loops, which ensures the search process is long enough for effective iteration. Furthermore, operations may be repeated repeatedly during the algorithm's execution to more carefully explore the global optimal solution. Furthermore, boundary conditions for the optimization variables are set to ensure that the problem can be solved within a physically feasible and effective search range.
[0064] Example 3
[0065] See Figure 3The specific steps of iterative optimization in S2 in the embodiment of the present invention are described as follows, which specifically include the following steps:
[0066] S2.4. Based on the enhanced whale optimization algorithm, a group of whales are randomly initialized in the hyperparameter space, i.e., candidate solutions of the algorithm.
[0067] S2.5. Extract the voltage increments corresponding to the upper and lower limits of the charging time interval represented by each whale, calculate the Spearman correlation coefficient between the voltage increment and the battery capacity, and use the fitness function to evaluate the algorithm performance.
[0068] S2.6. Update the whale's position, i.e., the upper and lower limits of the charging time interval, according to the rules of the enhanced whale optimization algorithm;
[0069] S2.7. Continuously update the whale's position until the maximum number of iterations is reached, and obtain the global optimal solution for the charging time interval that is most correlated with the battery capacity. Find the voltage increment in the corresponding voltage interval and use it as the aging feature.
[0070] First, before starting the iterative optimization, it is necessary to randomly generate a group of initial candidate solutions within a pre-given lithium battery hyperparameter space—that is, randomly initialize a group of whales. Specifically, each whale is a location point in a coordinate representation within a specific search space; these coordinates may represent the charging voltage or other related optimization hyperparameters for a certain time interval or time intervals during the battery charging process. In one embodiment, in a prediction scheme for an electric vehicle battery management system, these hyperparameters may refer to different stages of the charging process, and their value ranges can be limited based on the maximum charging power and voltage limits of the lithium battery.
[0071] Next, the voltage increments of these initialized whales are calculated during the charging time intervals corresponding to them, and this increment is used to determine the Spearman correlation coefficient between the battery voltage changes and the estimated capacity. The Spearman rank correlation coefficient is a non-parametric method for measuring the statistical correlation between two variables. It is applicable when the data is sequential or has been transformed into a ranking format. In this case, the purpose is to determine whether there is a linear relationship between the voltage change sequence and the estimated battery capacity sequence.
[0072] After completing the fitness value evaluation, the next step is to update the position or direction of each current virtual whale's position or state - this refers to the hyperparameter value - according to the rules of the enhanced whale optimization algorithm. This means that those positions that do not have good performance or have low fitness values (such as the Spearman coefficient) will be gradually discarded or moved to areas that are more likely to contain good solutions to seek improved solutions, thereby approaching the algorithm convergence conditions. A specific example can be seen when a set of experiments shows that the actual available energy level of the battery under a specific time partition charging strategy is lower than expected, the corresponding parameters will be corrected according to a certain mechanism, and subsequent searches will be more focused on those control schemes that can theoretically produce larger battery capacity or at least will not reduce the original energy storage.
[0073] The above calculations and parameter adjustments are repeated throughout the entire process until a predefined termination condition is met. For example, when the fitness value converges to a sufficiently stable value or the number of iterations reaches the upper limit, this indicates that the entire search optimization process is basically completed and the final recommended optimal charging solution can be obtained, which serves as the basis for improving the accuracy of the lithium battery capacity prediction method.
[0074] Example 4
[0075] The following further describes the enhanced whale optimization algorithm after introducing the pooling mechanism, migration search strategy, optimization selection search strategy and surrounding prey search strategy in Example S2 of the present invention, as follows:
[0076] First: Improvement of the whale optimization algorithm based on the pooling mechanism
[0077] The pooling mechanism crosses the worst solution from the current iteration with a randomly generated promising solution at the end of each iteration to increase population diversity. This mechanism improves the algorithm's search capability by mixing the worst solutions with promising solutions, avoiding premature convergence and local optimality traps.
[0078] In the embodiment of the present invention, the pooling mechanism is defined as:
[0079] Given a matrix of size k, Pool = (p1, p2, ..., p k ), at the end of each iteration, the element P in the matrix Pool is generated i =(p i,1 ,p i,2 ,...,p i,D ), element P i The resulting formula is as follows:
[0080]
[0081] Where, Pi t represents the element of the t-th iteration, is the binary random vector in the tth iteration, is its inverse vector, is the worst solution in the tth iteration, It represents the optimal solution generated in the tth iteration A random location nearby the corresponding whale.
[0082] Second: Improvement of the Whale Optimization Algorithm Based on Migration Search Strategy
[0083] The migration search strategy increases exploration capability and population diversity by randomly separating a portion of whales to cover unvisited areas. This strategy improves the algorithm's ability to escape local optima by introducing randomness.
[0084] In the embodiment of the present invention, the working principle of the migration search strategy can be summarized as follows:
[0085]
[0086] Where: represents the position of the i-th whale in the t+1th iteration; represents the random position of the whale in the search space at the tth iteration; rand is a random number between [0,1) and it obeys a uniform distribution; δ max and δ min They correspond to the upper and lower bounds of the problem respectively; δ best-max and δ best-min Then they correspond to the optimal solutions The upper and lower bounds of .
[0087] This step ensures that the search scope is not limited to the positive direction exploration at each update, increasing the search flexibility.
[0088] Next, the worst solution, that is, the inferior individual in the current search space, is determined. The purpose is to avoid wasting resources in subsequent iterations to repeatedly search directions that have been proven to be poor. This helps the algorithm focus on the improvement space more intelligently. Finally, a random position adjacent to the optimal solution is generated, which means that the search individual conducts further random exploration based on the existing successful cases.
[0089] Specifically, in one embodiment, suppose we are attempting to use the enhanced whale optimization algorithm to improve the capacity prediction accuracy of lithium batteries; and suppose we have already accumulated a large amount of battery short-term charging data as a reference sample through previous generation searches. Then, before we are ready to start a new iteration, we select the most unsuccessful solution and the best solution based on the solutions from the previous round of evaluation. The most unsuccessful position represents the least credible solution among all the tested lithium battery capacity estimates; we then select a random position around the most successful prediction as the new starting point for the next solution update.
[0090] Third: Improvement of the Whale Optimization Algorithm Based on Optimized Selection Search Strategy
[0091] To improve the exploration capabilities of the classic whale optimization algorithm's search for prey, the enhanced whale optimization algorithm uses a preferential search strategy. This preferential search strategy discovers diverse solutions by dispersing whales across different regions of the search space, thus requiring a larger step size. This strategy uses a heavy-tailed Cauchy distribution, which has a very high probability of producing large values.
[0092] In the embodiment of the present invention, the working principle of the priority selection search strategy can be summarized as follows:
[0093]
[0094] Where: represents the position of the i-th whale in the t-th iteration; and are positions 1 and 2 randomly selected from the matrix Pool in the tth iteration; MaxIt represents the maximum number of iterations set in the enhanced whale optimization algorithm.
[0095] First, the current iteration number i and the position vectors Xi of all whales are determined, which need to be updated at each iteration during the algorithm. Two random position vectors Xr1 and Xr2 (i.e., position 1 and position 2) are selected randomly from the elements of the matrix M generated in the search space containing all possible solutions. In addition, the maximum number of iterations of the algorithm, MaxIt, is set.
[0096] During this process, each individual (i.e., a virtual whale) corresponds to a potential solution and attempts to gradually approach the global optimal point through iteration. After each cycle update, the individual will evaluate its own fitness and compare it with the current best position to make an update.
[0097] In a specific implementation, for example, in order to optimize the parameters in the lithium battery capacity estimation model, we can assume that in the initial state, there are 100 virtual whales representing 100 sets of candidate parameters. The combination of these parameters determines the accuracy of the battery charging mode prediction. Each iteration means simulating a real environment to perform a prediction operation on a batch of newly arrived charge and discharge experimental data sets and adjusting the corresponding whale group layout according to the model output until the predetermined maximum iteration limit (such as MaxIt = 50) is met. At this time, if Xi is taken as the position vector of an individual selected for analysis at a specific moment, it will change during the entire solution phase due to the influence of two completely random samples, Xr1 and Xr2; this selection strategy allows some of the better but not absolutely top options to have the opportunity to be inherited and carried forward instead of just blindly following the strongest.
[0098] The motivation for adopting this approach is to prevent the search process from becoming trapped in local optima early and missing out on more efficient global configurations. The formula is designed to better balance the conflict between leveraging historically accumulated information and exploring unfamiliar territory. Building on traditional experience, it further enhances adaptability to uncertain scenarios while also strengthening the system's overall learning efficiency. Therefore, the rules presented here are essentially a mathematical representation of real-life hunting habits in the animal kingdom (such as the coordinated hunting methods of killer whale groups). The optimal value in this setting varies dynamically depending on factors such as the nature of the task and the corresponding accuracy target.
[0099] Fourth: Improvement of whale optimization algorithm based on surrounding prey search strategy
[0100] The rich surrounding prey search strategy improves the surrounding prey method in the classic whale optimization algorithm by adding a randomly selected pool matrix member to balance the local search capability and the global search capability.
[0101] In the embodiment of the present invention, the working principle of the encircling prey search strategy can be summarized as the following equation:
[0102]
[0103] Where: is the position 3 randomly selected from the matrix Pool in the tth iteration.
[0104] This method is designed to improve the exploration ability of individuals in the whale optimization algorithm by increasing the algorithm diversity and improving the algorithm convergence. The core equation in this step represents a model of how the encirclement strategy randomly selects new positions in the search space. In this step, each iteration of the algorithm will evaluate the position of the existing predator or solution, and then select a new position in the search space based on the principles of algorithm design. For example, in one embodiment, consider a lithium battery capacity prediction method based on short-term charging data and an enhanced whale optimization algorithm. Our matrix may contain the measured values of the battery capacity at different periods and the related charge state, and the randomly selected position represents a feasible battery capacity prediction value or a parameter combination that the algorithm considers as a new approximation to the solution to the prediction problem at a given iteration.
[0105] Example 5
[0106] See next Figure 4-7 The specific implementation methods and technical effects corresponding to the technical solutions of the present invention are described as follows:
[0107] In an embodiment of the present invention, three nickel-cobalt-manganese batteries with a rated capacity of 4Ah and four soft-pack batteries with a rated capacity of 0.74Ah are used as test objects. The above seven lithium batteries are named cell 1-7 respectively. The method specifically includes the following steps:
[0108] 1) Data collection:
[0109] Conduct cyclic charge and discharge tests on different types of lithium-ion batteries until the discharge capacity of each type of battery is less than 80% of the nominal capacity, and record the charge and discharge data in real time.
[0110] 2) Data processing:
[0111] The charging voltage and current data obtained in 1) are processed, and the voltage and current data recorded with a sampling interval of 30 seconds are interpolated by cubic spline, so that the interval between every two data points is 1 second.
[0112] 3) Aging feature extraction based on enhanced whale optimization algorithm:
[0113] The relationship between charging voltage and battery aging is analyzed. The voltage increment corresponding to a certain charging time interval is used as the aging feature. The feature with the strongest correlation with capacity is extracted from the charging data after interpolation of the first 30 minutes.
[0114] Figure 4Figure 2 shows the relationship between the selected features and capacity aging under different cycle numbers, where X1 and X2 correspond to the upper and lower limits of the optimal charging time interval, respectively, and the voltage increment corresponding to the charging time interval is characterized by ΔY. The voltage increment corresponding to the charging time interval [X1X2] in the first cycle is ΔY1, with a value of 174.4mV; the voltage increment corresponding to the charging time interval [X1X2] in the 301st cycle is ΔY1, with a value of 216.8mV; and the voltage increment corresponding to the charging time interval [X1X2] in the 6011th cycle is ΔY1, with a value of 278.2mV. It can be observed that as the number of battery cycles increases, the voltage increment corresponding to the charging time interval [X1X2] continues to increase.
[0115] 4) Enhanced whale optimization algorithm parameter settings:
[0116] The enhanced whale optimization algorithm is applied to the aging feature optimization. The Spearman correlation coefficient between the voltage increment and battery capacity corresponding to a certain charging time interval is used as the objective function. The population size and initialization parameters are set, and the starting and ending points of the charging time interval are specified as the optimization target. The parameter settings of the enhanced whale optimization algorithm are shown in Table 1:
[0117] Table 1 Grey correlation coefficient of cell 1-7
[0118] Parameter name Search agent number Number of decision variables Maximum number of iterations Execution times Upper bound Nether Setting value 100 2 200 5 [0,1] [1799,1800]
[0119] 5) Iterative optimization and optimal feature output:
[0120] Calculate the corresponding fitness value. The minimum fitness value is the optimal solution for this iteration. Compare the calculated result with the global optimal solution. If the calculated result is better than the global optimal solution, the global optimal solution is replaced by the current calculation result. The optimization stops when the maximum number of iterations is reached. Calculate the starting and ending points of the optimal charging time interval and use the voltage increment corresponding to this charging time interval as the aging characteristic of the model. The results of the 5 calculations are: [X best1 X best2 ]s=[1425,1789]s, and the corresponding fitness is -0.995097. It can be seen that the correlation between the solved features and the capacity is very high.
[0121] 6) Single cell battery capacity prediction:
[0122] The capacity data obtained in 2) and the optimal aging characteristics obtained in 5) are used for model training. The training set is the first 15% feature data of cell 1, that is, the feature data of the 1st to 103rd cycles. The trained model is saved and the last 85% feature data, that is, the 104th to 689th cycles, are input into the model to obtain the capacity prediction value of the corresponding battery. The results are as follows Figure 5As shown in the figure, the solid line represents the measured capacity value, and the dotted line represents the predicted capacity value. The training data is the solved features and battery capacity values of the first 15% of cycles, the predicted data is the solved features of the last 85% of cycles, and the solved result is the battery capacity. From the results, it can be seen that the maximum error of the predicted value of the present invention is less than 2.5%, and the maximum error of more than 93.5% of the predicted values is controlled within 1%.
[0123] 7) Model generalization verification:
[0124] For different batteries of the same type, the optimal features of cell2-3 obtained in 5) are directly input into the model saved in 6) to obtain the capacity prediction value of the corresponding battery; the result is as follows Figure 6 As shown in Table 2, Figure 6 The solid line represents the capacity measurement value, and the dotted line represents the capacity prediction value. From the results, we can see that the R-squared (R 2 ), maximum absolute error (MAE), mean absolute error (MSE), root mean square error (RMSE) and maximum error (Max) are within 0.992, 1.513%, 0.462%, 1.904% and 2.49% respectively, which verifies that the proposed method only requires short-term low-precision charging data of the power battery and only needs to train on 15% of the data of a certain battery to accurately and stably predict the capacity of this type of battery, indicating the high efficiency and strong prediction performance of the method, which makes it have broad application prospects in the field of battery health status prediction.
[0125] For different types of batteries, the capacity data obtained in 2) and the optimal aging characteristics obtained in 5) are used for model training. The training set is the first 15% feature data of cell 4. The trained model is saved and the last 85% feature data of cell 4 and all feature data of cells 5-7 are input into the model to obtain the capacity prediction value of the corresponding battery. The results are as follows: Figure 7 As shown in Table 2, Figure 7 The solid line in the middle represents the capacity measurement value, and the dotted line represents the capacity prediction value. From the results, it can be seen that the maximum error of the present invention is less than 1% and the R-squared is 0.999, which shows that the proposed method has good prediction accuracy and generalization.
[0126] Table 2 Prediction error of cell 2-5
[0127] cell <![CDATA[R 2 ]]> MAE (%) AAE (%) RMSE (%) Max(%) 2 0.993 1.342 0.416 1.766 2.49 3 0.992 1.513 0.462 1.904 2.21 4 0.999 0.126 0.216 0.141 -0.46 5 0.999 0.145 0.230 0.187 -0.99 6 0.999 0.119 0.191 0.144 -0.63 7 0.999 0.128 0.209 0.166 -0.89
[0128] In an embodiment of the present invention, the voltage increment of a specific charging time interval is extracted from the charging voltage curve of the first 30 minutes as a feature. The enhanced whale optimization algorithm is used to achieve the strongest correlation feature extraction, and the Gaussian process regression algorithm is used to build a battery capacity prediction model. Only the first 15% of the data of a certain battery is used for training, and the relative error of the capacity prediction result of this type of battery can be controlled within 2.5%, which greatly reduces the number of training sets while ensuring the prediction accuracy. On this basis, the method is used to obtain the capacity prediction values of different types of batteries, and the relative error of the capacity prediction results of this type of battery is controlled within 1%, verifying that the constructed model has good prediction accuracy and generalization ability.
[0129] Example 6
[0130] See Figure 8 The lithium battery capacity prediction system in the embodiment of the present invention is described as follows:
[0131] Figure 8 A block diagram of a lithium battery capacity prediction system according to an embodiment of the present invention is schematically shown. The system can be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors to implement the embodiment of the present invention. A program module as referred to in the embodiment of the present invention refers to a series of computer program instruction segments that can perform specific functions. The following description will specifically introduce the functions of each program module in this embodiment.
[0132] like Figure 8 As shown, the lithium battery capacity prediction system 80 may include: a data acquisition module 801, a feature extraction module 802 and a battery capacity prediction module 803, wherein:
[0133] The data acquisition module 801 is used to collect and record battery charge and discharge data in real time and extract short-term charging data during cyclic charge and discharge tests of different types of batteries. The charge and discharge data includes charging time, voltage, current, and capacity data. The short-term charging data is obtained by performing spline interpolation processing on the charging voltage and current data within a preset short-term charging time.
[0134] The feature extraction module 802 is used to extract battery aging features from short-term charging data through iterative optimization based on the enhanced whale optimization algorithm. The enhanced whale optimization algorithm is an improvement of the classic whale optimization algorithm by introducing a pooling mechanism, a migration search strategy, a priority selection search strategy, and a prey encirclement search strategy. The battery aging feature is the voltage increment of the voltage interval corresponding to the charging time interval with the strongest correlation with the battery capacity.
[0135] The battery capacity prediction module 803 is used to: for different types of batteries or batteries of the same type, input the charge and discharge data and aging characteristics into a Gaussian process regression model to predict the battery capacity prediction value, wherein the Gaussian process regression model is constructed based on the Gaussian process regression algorithm.
[0136] As an optional embodiment, the data acquisition module 801, feature extraction module 802 and battery capacity prediction module 803 may also be used to execute the steps described in the method embodiments of the second to sixth embodiments.
[0137] Example 7
[0138] Figure 9 The hardware architecture diagram of the computer device 10000 suitable for implementing the lithium battery capacity prediction method according to embodiments 1 to 5 of the present invention is schematically shown. In some embodiments, the computer device 10000 can be a terminal device such as a smart phone, a wearable device, a tablet computer, a personal computer, a vehicle terminal, a game console, a virtual device, a workbench, a digital assistant, a set-top box, a robot, etc. In other embodiments, the computer device 10000 can be a rack server, a blade server, a tower server or a cabinet server (including an independent server, or a server cluster composed of multiple servers), etc. Figure 9 As shown, the computer device 10000 includes but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other via a system bus.
[0139] The memory 10010 includes at least one type of computer-readable storage medium, including flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10010 may be an internal storage module of the computer device 10000, such as a hard disk or memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk equipped on the computer device 10000, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Of course, the memory 10010 may also include both the internal storage module of the computer device 10000 and its external storage device. In this embodiment, the memory 10010 is generally used to store the operating system and various application software installed on the computer device 10000, such as the program code of the lithium battery capacity prediction method, etc. In addition, the memory 10010 can also be used to temporarily store various data that has been output or will be output.
[0140] In some embodiments, the processor 10020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips. The processor 10020 is generally used to control the overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is used to execute program code stored in the memory 10010 or process data.
[0141] The network interface 10030 may include a wireless network interface or a wired network interface. The network interface 10030 is generally used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal via a network, and to establish a data transmission channel and a communication link between the computer device 10000 and the external terminal. The network can be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth, or Wi-Fi.
[0142] It should be pointed out that Figure 9 Only a computer device having components 10010 - 10030 is shown, but it should be understood that implementing all of the shown components is not a requirement, and more or fewer components may alternatively be implemented.
[0143] In this embodiment, the lithium battery capacity prediction method stored in the memory 10010 can also be divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiment of the present invention.
[0144] Example 8
[0145] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the lithium battery capacity prediction method in the embodiment are implemented.
[0146] In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the computer-readable storage medium may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk equipped with the computer device, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, etc. Of course, the computer-readable storage medium may also include both an internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store an operating system and various application software installed on the computer device, such as the program code of the lithium battery capacity prediction method in the embodiment. In addition, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are about to be output.
[0147] Embodiment 9
[0148] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the method in the above embodiment when executed by a processor.
[0149] Obviously, those skilled in the art should understand that the various modules or steps of the above-mentioned embodiments of the present invention can be implemented using general-purpose computer devices, they can be concentrated on a single computer device, or distributed on a network composed of multiple computer devices. Alternatively, they can be implemented using program codes executable by the computer device, so that they can be stored in a storage device and executed by the computer device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into individual integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present invention are not limited to any specific combination of hardware and software.
[0150] It should be noted that the above are only preferred embodiments of the present invention and do not limit the scope of patent protection of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields, are also included in the scope of patent protection of the present invention.
Claims
1. A lithium battery capacity prediction method based on short-term charging data and enhanced whale optimization algorithm, characterized in that: include: During the cyclic charge and discharge test of different types of batteries, the battery charge and discharge data is collected and recorded in real time, and short-term charging data is extracted. The charge and discharge data includes charging time, voltage, current and capacity data. The short-term charging data is obtained by spline interpolation of the charging voltage and current data within a preset short-term charging time. Battery aging characteristics are extracted from short-term charging data through iterative optimization based on the enhanced whale optimization algorithm, which is an improvement of the classic whale optimization algorithm by introducing a pooling mechanism, a migration search strategy, a priority selection search strategy, and a prey encirclement search strategy. The battery aging characteristics are the voltage increments in the voltage interval corresponding to the charging time interval with the strongest correlation with the battery capacity. For batteries of different types or the same type, the charge and discharge data and the aging characteristics are input into a Gaussian process regression model to predict the battery capacity prediction value, wherein the Gaussian process regression model is constructed based on a Gaussian process regression algorithm.
2. The method according to claim 1, characterized in that The specific steps of parameter setting of the enhanced whale optimization algorithm include: The Spearman correlation coefficient between voltage increment and battery capacity is used as the objective function, and the optimization goal is defined as minimizing the Spearman correlation coefficient between voltage increment and battery capacity; Set the optimization object to the upper and lower limits of the charging time interval; Set the enhanced whale optimization algorithm parameters: number of search agents, number of decision variables, maximum number of iterations, number of executions, and upper and lower bounds on the optimization object.
3. The method according to claim 2, characterized in that The specific steps of the iterative optimization include: Based on the enhanced whale optimization algorithm, a group of whales are randomly initialized in the hyperparameter space, which are the candidate solutions of the algorithm; The voltage increments corresponding to the upper and lower limits of the charging time interval represented by each whale are extracted, and the Spearman correlation coefficient between the voltage increment and the battery capacity is calculated. The algorithm performance is evaluated using the fitness function. Update the whale's position according to the rules of the enhanced whale optimization algorithm, that is, the upper and lower limits of the charging time interval; The position of the whale is continuously updated until the maximum number of iterations is reached, and the global optimal solution for the charging time interval with the strongest correlation with the battery capacity is obtained. The voltage increment of the corresponding voltage interval is found and used as the aging feature.
4. The method according to claim 3, characterized in that The pooling mechanism is defined as: given a matrix of size k, Pool = (p1, p2, ..., p k ), at the end of each iteration, the element P in the matrix Pool is generated i =(p i,1 ,p i,2 ,...,p i,D ), element P i The resulting formula is as follows: Where, represents the element of the t-th iteration, is the binary random vector in the tth iteration, is its inverse vector, is the worst solution in the tth iteration, It represents the optimal solution generated in the tth iteration A random location nearby the corresponding whale.
5. The method according to claim 4, characterized in that The working principle of the migration search strategy can be summarized as follows: Where: represents the position of the i-th whale in the t+1th iteration; represents the random position of the whale in the search space at the tth iteration; rand is a random number between [0,1) and it obeys a uniform distribution; δ max and δ min They correspond to the upper and lower bounds of the problem respectively; δ best-max and δ best-min Then they correspond to the optimal solutions The upper and lower bounds of .
6. The method according to claim 5, characterized in that The working principle of the priority search strategy can be summarized as follows: Where: represents the position of the i-th whale in the t-th iteration; and are positions 1 and 2 randomly selected from the matrix Pool in the tth iteration; MaxIt represents the maximum number of iterations set in the enhanced whale optimization algorithm.
7. The method according to claim 6, characterized in that The working principle of the encircling prey search strategy can be summarized in the following equation: Where: is the position 3 randomly selected from the matrix Pool in the tth iteration.
8. The method according to claim 7, characterized in that The specific steps of training the Gaussian process regression model include: The extracted first 15% aging characteristics of a battery and the battery capacity data are used as a model training set, the training set is used to run a Gaussian process regression model to find correlations, and the resulting model is saved.
9. The method according to claim 8, characterized in that For different types of batteries, the specific steps for battery capacity prediction include: The first 15% of the battery capacity data and aging characteristics collected from a certain battery are input into the Gaussian process regression model for model training, and the remaining 85% of the battery capacity data and aging characteristics collected from the battery are input into the trained Gaussian process regression model for model verification. All characteristics of other batteries of the same type are input into the trained Gaussian process regression model to obtain the battery capacity prediction value of the battery.
10. The method according to claim 8, characterized in that For batteries of the same type, the specific steps for battery capacity prediction include: For different batteries of the same type, the last 85% of the battery capacity data obtained during the battery cycle charge and discharge test and the aging characteristics of the battery are directly input into the trained Gaussian process regression model to obtain the battery capacity prediction value of the corresponding battery.
Citation Information
Patent Citations
Battery SOC estimation method based on enhanced whale optimization algorithm and deep learning
CN118311436A
Lithium battery health state assessment method based on improved Harlisia eagle optimization and SVR algorithm
CN118535876A