Disclosure of Invention
Aiming at the problems, the invention provides a new energy automobile lithium battery service life prediction method based on an optimization algorithm, which is characterized in that local characteristics and global degradation trend in battery health indexes are subjected to self-adaptive separation through optimization of lithium battery parameters, so that the problem of severe fluctuation caused by regeneration of battery energy indexes is solved; and constructing a deep neural network temperature model, and establishing a temperature compensation model to obtain a reliable lithium battery service life prediction result.
In order to realize the purpose, the invention is realized by the following technical scheme:
a new energy automobile lithium battery life prediction method based on an optimization algorithm comprises the following steps:
step 1, collecting the temperature T, the depth of discharge C and the charging rate V of the lithium battery, the ambient temperature T of the lithium battery and the ambient temperature change rate delta T of the lithium battery in a period of time, recording the temperature T and the ambient temperature change rate delta T as health state data of a first group of lithium batteries, searching health state data of a plurality of groups of lithium batteries in different periods of time, and finding out the health state data of n groups of lithium batteries in total;
step 2, according to the discharge curve rule of the lithium battery, sending the health state data of the n groups of lithium batteries obtained in the step 1 into an improved particle swarm algorithm based on a gray wolf algorithm, and outputting the temperature T ', the discharge depth C ', the charging rate V ', the environment temperature T ' of the lithium battery, and the environment temperature change rate delta T ' of the lithium battery in an optimal solution;
and 3, sending the temperature T ', the discharge depth C ', the charging rate V ', the environment temperature T ' of the lithium battery, and the environment temperature change rate delta T ' of the lithium battery of the optimal solution output in the step 2 into an LSTM prediction algorithm, establishing a service life prediction model, predicting the actual service life of the lithium battery according to the target service life of the lithium battery, and finally outputting the predicted service life of the lithium battery.
Further, in the step 2, the improved particle swarm optimization based on the grayish wolf algorithm comprises the following specific processes:
9) Initializing an optimizing population of the algorithm, randomly scattering the optimizing population into the whole solution space, and setting alpha, beta and delta individuals for the wolf algorithm;
10 The optimizing population optimizes the whole solution space according to the optimizing process of the wolf algorithm;
11 Record the optimal solution V of the Grey wolf algorithm in each iteration beat-g ;
12 Judging according to a self-adaptive replacement mechanism, if the optimization algorithm is replaced by the particle swarm optimization algorithm, entering 5), and if not, returning to 2) to continue searching;
13 The optimization population excavates the position where the optimal solution possibly exists according to the optimization process of the particle swarm optimization;
14 Record the optimal solution V of the particle swarm optimization in each iteration process best-p ;
15 Judging according to an adaptive escape mechanism, returning to 1) if the optimizing population is trapped into local optimum, and otherwise, entering 8) and continuing searching;
16 Judging whether the algorithm meets the condition of ending, if not, returning to 5) continuing searching, otherwise, outputting the related information of the optimal solution.
Further, in step 5) of the improved particle swarm optimization based on the grayling algorithm, when a position where an optimal solution may exist is mined, the inertia coefficient w is subjected to nonlinear decrement processing, so that the searching and optimizing capability of the improved particle swarm optimization is improved.
Further on toAnd 3. The LSTM prediction algorithm in step 3 is a recurrent neural network structure, the basic structure of the LSTM network comprises a series of repeated units of each time step, and in each unit, at the time step t, an information storage part c t And three gate functions, i.e. input gate i t Output gate o t And forget door f t To regulate the flow of information for managing each unit in the LSTM network, and to decide how to update the current storage unit c t The current hidden state h of the unit and the information stored in t The correlation calculation function for each cell in the LSTM network module is shown in the following formula.
i t =σ(W i· [h t-1 +b i ]) (1)
f t =σ(W f· [h t-1 ,x t ]+b f ) (2)
q t =tanh(W q· [h t-1 ,x t ]+b q ) (3)
o t =σ(W o· [h t-1, x t ]+b o ) (4)
c t =f t ⊙c t-1 +i t ⊙q t (5)
h t =o t ⊙tanh(c t ) (6)
Wherein x t Is an input characteristic in LSTM network unit, σ represents Sigmod function, and "<" represents characteristic vector element by element multiplication, and W and b represent weight matrix and offset vector during training, respectively, the LSTM network uses an LSTM module directly placed behind a MaxPooling layer, including 64 LSTM units, in which a 0.2 Dropout layer is used as a regularization parameter to prevent over-fitting of the model, and a sense layer is the last layer of the entire model, i.e., a fully connected layer in the neural network for outputting a result, for classifying the lithium battery life-related parameters according to the output of the LSTM layer.
Has the advantages that:
1. according to the new energy automobile lithium battery life prediction method based on the optimization algorithm, the local characteristics and the global degradation trend in the battery health index are subjected to self-adaptive separation, and the problem of severe fluctuation caused by regeneration of the battery energy index is solved; and (3) constructing a deep neural network temperature model, and establishing a temperature compensation model to obtain a reliable lithium battery service life prediction result. In the research, the inventor finds that the optimization effect of the particle swarm optimization is very dependent on the initialization of the optimization population, and if the particles are mainly distributed near the local extreme points during the initialization, the whole optimization population is trapped into local optimization, so that the final optimization effect is influenced. Therefore, the gray wolf algorithm is introduced for improvement, the influence degree of the optimization process of the gray wolf algorithm on the population initialization effect is small, the whole population can be searched in the whole solution space after initialization, and therefore the algorithm can be effectively prevented from falling into local optimization. In the subsequent mining process, because the updated calculation formula of the wolf algorithm is more complex, more time is consumed in the process, and the optimal value is not easy to find. Therefore, in the subsequent mining of the possible region of the global optimum value, the particle swarm algorithm is adopted, and the speed and the effect of optimum value searching can be improved.
The problem to be solved in this respect is how to determine the opportunity to replace the optimization algorithm. Therefore, a self-adaptive replacement mechanism is provided, and when the gray wolf algorithm is used for optimizing, whether the optimization algorithm is replaced is judged according to the value of the found optimal solution and two thresholds. Firstly, recording the difference V between the adaptive value of the current optimal solution and the adaptive value of the previous generation optimal solution in the iterative process of the algorithm gwo When it is less than the fluctuation threshold V 1 Recording at any time, recording V gwo Number of times N of being successively smaller than fluctuation threshold V a . When N is present a Greater than a threshold N of the number of iterations 1 And replacing the particle swarm optimization for local optimization.
In addition, in the later stage of the optimization, along with the increase of the number of iterations, the optimization individuals of the whole population can be accumulated around the currently found optimal value, so that the optimization speed can continuously decrease, and the whole optimization process is adversely affected. To solve this problem, we calculate the wholeAn adaptive escape mechanism is added in the method. Similar to the adaptive alternative mechanism above, by two thresholds-the fluctuation threshold V 2 And N 2 A determination is made whether to re-disperse the particles. When the number of times of fluctuation N b Greater than N 2 And judging that the optimizing population is about to fall into local optimization. At this point, the particles need to be redistributed for global searching. By the aid of the mechanism, whether the particle swarm algorithm is trapped in a local optimal point can be judged in advance, the capability of the particles to get rid of the local optimal point can be enhanced, and the optimization level of the algorithm is improved.
Specifically, in the optimization process by using a GWOL algorithm, the optimization is firstly performed by using a wolf algorithm to search the whole solution space, and the position where the optimal solution possibly exists is obtained; after the judgment of the self-adaptive replacement mechanism, local excavation of a solution space is performed by using a particle swarm algorithm; if the self-adaptive escape mechanism judges that the population individuals fall into the local optimum, the optimized population is redistributed, and then optimization iteration is continued. And finally, ending the optimizing process according to the termination condition and outputting the optimal solution.
Detailed Description
The method comprises the following steps:
step 1, collecting the temperature T, the depth of discharge C and the charging rate V of the lithium battery, the ambient temperature T of the lithium battery and the ambient temperature change rate delta T of the lithium battery in a period of time, recording the temperature T and the ambient temperature change rate delta T as health state data of a first group of lithium batteries, searching multiple groups of lithium battery health state data in different periods of time, and finding n groups of lithium battery health state data in total;
step 2, according to the discharge curve rule of the lithium battery, sending the health state data of the n groups of lithium batteries obtained in the step 1 into an improved particle swarm algorithm based on a gray wolf algorithm, and outputting the temperature T ', the discharge depth C ', the charging rate V ', the environment temperature T ' of the lithium battery, and the environment temperature change rate delta T ' of the lithium battery in an optimal solution;
and 3, sending the temperature T ', the discharge depth C ', the charging rate V ', the environment temperature T ' of the lithium battery, and the environment temperature change rate delta T ' of the lithium battery of the optimal solution output in the step 2 into an LSTM prediction algorithm, establishing a service life prediction model, predicting the actual service life of the lithium battery according to the target service life of the lithium battery, and finally outputting the predicted service life of the lithium battery.
Further, in the step 2, the improved particle swarm algorithm based on the grayish wolf algorithm comprises the following specific processes:
17 Initializing an optimized population of the algorithm, randomly scattering the optimized population into the whole solution space, and setting alpha, beta and delta individuals for the wolf algorithm;
18 The optimizing population optimizes the whole solution space according to the optimizing process of the wolf algorithm;
19 Record the optimal solution V of the Grey wolf algorithm in each iteration best-g ;
20 Judging according to a self-adaptive replacement mechanism, if the optimization algorithm is replaced by the particle swarm optimization algorithm, entering 5), and if not, returning to 2) to continue searching;
21 The optimization population excavates the position where the optimal solution possibly exists according to the optimization process of the particle swarm optimization;
22 Record the optimal solution V of the particle swarm optimization in each iteration process best-p ;
23 Judging according to an adaptive escape mechanism, returning to 1) if the optimizing population is trapped into local optimum, and otherwise, entering 8) and continuing searching;
24 Judging whether the algorithm meets the condition of ending, if not, returning to 5) continuing searching, otherwise, outputting the related information of the optimal solution.
Further, in step 5) of the improved particle swarm optimization based on the grayling algorithm, when a position where an optimal solution may exist is mined, the inertia coefficient w is subjected to nonlinear decrement processing, so that the searching and optimizing capability of the improved particle swarm optimization is improved.
Further, in step 3The LSTM prediction algorithm is a recurrent neural network architecture, the basic structure of the LSTM network comprises a series of repeated units of each time step, and in each unit, at the time step t, an information storage part c t And three gate functions, i.e. input gate i t Output gate o t And forget door f t To regulate the flow of information for managing each element of the LSTM network, and to decide how to update the current storage unit c t The current hidden state h of the unit and the information stored in t The correlation calculation function for each cell in the LSTM network module is shown in the following formula.
i t =σ(W i· [h t-1 +b i ]) (1)
f t =σ(W f· [h t-1 ,x t ]+b f ) (2)
q t =tanh(W q· [h t-1 ,x t ]+b q ) (3)
o t =σ(W o· [h t-1 ,x t ]+b o ) (4)
c t =f t ⊙c t-1 +i t ⊙q t (5)
h t =o t ⊙tanh(c t ) (6)
Wherein x t Is an input characteristic in LSTM network unit, σ represents Sigmod function, and "<" represents characteristic vector element by element multiplication, and W and b represent weight matrix and offset vector during training, respectively, the LSTM network uses an LSTM module directly placed behind a MaxPooling layer, including 64 LSTM units, in which a 0.2 Dropout layer is used as a regularization parameter to prevent over-fitting of the model, and a sense layer is the last layer of the entire model, i.e., a fully connected layer in the neural network for outputting a result, for classifying the lithium battery life-related parameters according to the output of the LSTM layer.
In order to verify whether the improved algorithm is effectively applied to the service life prediction of the new energy automobile battery, 31 groups of feature data of the new energy automobile battery are selected to predict the service life, the traditional prediction method is compared, the details are shown in fig. 3, and as can be seen from fig. 3, the algorithm provided by the patent can be used for better predicting the service life of the new energy automobile battery, and compared with other algorithms, the accuracy and precision are greatly improved.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.