Lithium battery SOH online estimation method based on deep neural network

文档序号:6505 发布日期:2021-09-17 浏览:39次 中文

1. The lithium battery SOH online estimation method based on the deep neural network is characterized by comprising the following steps of:

1) and establishing the lithium battery SOH estimation model based on the deep neural network.

2) Training the lithium battery SOH estimation model based on the deep neural network to obtain a lithium battery SOH estimation optimization model;

3) and acquiring data of a nearly full-charge segment of the lithium battery to be evaluated, preprocessing the data, and inputting the data into a lithium battery SOH estimation optimization model to finish the estimation of the SOH of the lithium battery.

2. The lithium battery SOH online estimation method based on the deep neural network of claim 1, wherein: the lithium battery charging fragment data X in the nearly full-charging process is the lithium battery secondary battery capacity I1Charging to electric quantity I2Charging segment data of; (I)2-I1)/Imax100% greater than a specific gravity threshold p; i ismaxThe maximum electric quantity of the lithium battery.

3. The lithium battery SOH online estimation method based on the deep neural network of claim 1, wherein: the lithium battery charging segment data comprises battery charge state, monomer voltage, total current, temperature and charging duration.

4. The lithium battery SOH online estimation method based on the deep neural network as claimed in claim 1, wherein the lithium battery SOH estimation model based on the deep neural network comprises an input layer, a plurality of hidden layers and an output layer.

5. The lithium battery SOH online estimation method based on the deep neural network of claim 4, wherein the output y of the hidden layer is as follows:

in the formula, WjRepresenting weight matrixes from the j-1 th layer to the j layer; bjRepresenting the bias vectors of the j-1 th layer to the j-th layer; sigmajAn activation function representing a j-th layer; upper labelRepresenting a transpose;

the output Y of the output layer is as follows:

in the formula, the upper labelIndicating transposition.

6. The lithium battery SOH online estimation method based on the deep neural network as claimed in claim 4, wherein the activation function of the hidden layer is as follows:

σj(x)=max(x,0) (3)

the activation function of the output layer is as follows:

σh+1(x)=x (4)

7. the lithium battery SOH online estimation method based on the deep neural network as claimed in claim 1, wherein the step of training the lithium battery SOH estimation model based on the deep neural network comprises:

1) acquiring lithium battery charging fragment data and corresponding lithium battery SOH in a nearly full charging process in a T period, and writing the lithium battery charging fragment data and the corresponding lithium battery SOH into a training set and a verification set respectively;

2) inputting the training set into a lithium battery SOH estimation model based on a deep neural network to obtain a current weight matrix W and a bias vector b;

3) setting an iteration parameter thetat={Wt,bt}; t is the number of iterations; the initial value of t is 0;

4) updating the iteration times t to t +1 and calculating the objective function ftt-1) For the iteration parameter thetat-1Gradient g oftNamely:

wherein the objective function f is as follows:

where MSE (Y, Y') represents the mean square error loss function; y is an actual value; y' is an estimated value; n is the number of training samples;

5) the gradient g is calculated separatelytFirst and second order moments of (a), i.e.:

mt←β1·mt-1+(1-β1)·gt (8)

in the formula, mtIs the first moment of the gradient; v. oftIs a gradient second moment;is the square of the gradient; beta is a1Is the first moment attenuation coefficient; beta is a2Is a second moment attenuation coefficient;

6) For gradient first moment mtAnd the second moment v of the gradienttAnd (3) correcting to obtain:

in the formula (I), the compound is shown in the specification,respectively representing the bias correction of the first moment of the gradient and the second moment of the gradient;

7) updating an iteration parameter θt

Wherein the iteration parameter thetatThe update is as follows:

wherein α is a learning rate for controlling the stride; ε is a constant.

8) Judging the current iteration parameter thetatWhether convergence is achieved, if yes, based on the current iteration parameter thetatEstablishing a lithium battery SOH estimation optimization model, and skipping to the step 9), or else, entering the step 3);

9) inputting the verification set into a lithium battery SOH estimation optimization model, and verifying whether the output result accuracy of the lithium battery SOH estimation optimization model is greater than an accuracy threshold value PmaxIf yes, training is finished, otherwise, the step 1) is returned to.

8. The lithium battery SOH on-line estimation method based on the deep neural network as claimed in claim 7, wherein the current iteration parameter θ is judgedtThe convergence method comprises the following steps: judging the difference value delta theta of the two adjacent iteration parameters to be thetatt-1≤ΔθmaxIf yes, convergence is carried out, otherwise, convergence is not carried out; delta thetamaxIs the difference threshold.

9. The lithium battery SOH online estimation method based on the deep neural network as claimed in claim 1 or 7, wherein the lithium battery charging segment data in the near-full charging process is standardized data with consistent dimensions.

Background

Automobiles become an indispensable transportation tool in people's daily life, but with the vigorous development of the automobile industry, the problems of large consumption of petroleum resources, increasingly severe environmental pollution and the like follow. In the face of the serious problems of resource shortage and environmental pollution, new energy technology is becoming the focus of the industry. Under the strong support of national policies, the development of the pure electric vehicle is particularly rapid, however, the battery still has many technical problems to be solved as a core component of the pure electric vehicle, and technical bottlenecks still exist on accurate estimation of battery state of health (SOH), battery state of charge (SOC), and the like. In recent years, the quantity of electric vehicles increases year by year, and a large number of retired lithium ion batteries need to be treated correspondingly in the future. In order to respond to the relevant policy of the national lithium ion battery echelon utilization and enable the lithium ion battery to still play a role in other aspects after the electric automobile is retired, the high-precision estimation of the SOH value of the battery needs to be realized. In addition, the online estimation of the service life of the battery can also discover the potential safety hazard of the battery in time. Therefore, the task of breaking the technical barrier of the high-precision estimation of the SOH is not easy.

Currently, the methods commonly used for estimating the SOH of a lithium battery are roughly classified into the following three methods: 1. a constant current discharge method; 2. a model-based approach; 3. a data-driven based method. The method 1 is to fully charge the battery under laboratory conditions to accurately measure and calculate the actual capacity of the battery, and although the method has high precision and high cost, the SOH estimation is usually performed by adopting a model-based or data-driven mode.

Disclosure of Invention

The invention aims to provide an SOH (state of health) online estimation method for a lithium battery based on a deep neural network, which comprises the following steps of:

1) and establishing a lithium battery SOH estimation model based on a deep neural network.

The lithium battery SOH estimation model based on the deep neural network comprises an input layer, a plurality of hidden layers and an output layer.

The output y of the hidden layer is as follows:

in the formula, WjRepresenting the weight matrix from layer j-1 to layer j. bjRepresenting the bias vectors for layer j-1 through layer j. SigmajRepresenting the activation function of the j-th layer.

The output Y of the output layer is as follows:

in the formula, the upper labelIndicating transposition.

The activation function of the hidden layer is as follows:

σj(x)=max(x,0) (3)

the activation function of the output layer is as follows:

σh+1(x)=x (4)

2) and training the lithium battery SOH estimation model based on the deep neural network to obtain a lithium battery SOH estimation optimization model.

The step of training the lithium battery SOH estimation model based on the deep neural network comprises the following steps:

and 2.1) acquiring lithium battery charging fragment data and corresponding lithium battery SOH in the nearly full charging process in the T period, and respectively writing the lithium battery charging fragment data and the corresponding lithium battery SOH into a training set and a verification set.

2.2) inputting the training set into a lithium battery SOH estimation model based on a deep neural network to obtain a current weight matrix W and a bias vector b.

2.3) setting an iteration parameter thetat={Wt,bt}. And t is the iteration number. the initial value of t is 0.

2.4) updating the iteration times t ═ t +1, and calculating the objective function ftt-1) For the iteration parameter thetat-1Gradient g oftNamely:

wherein the objective function f is as follows:

in the formula, MSE (Y, Y') represents a mean square error loss function. Y is the actual value. Y' is an estimated value. n is the number of training samples.

2.5) calculating the gradient g separatelytFirst and second order moments of (a), i.e.:

mt←β1·mt-1+(1-β1)·gt (8)

in the formula, mtIs the first moment of the gradient. v. oftIs a gradient second moment.Is the square of the gradient. Beta is a1Is the first moment attenuation coefficient. Beta is a2The second moment attenuation coefficient.

2.6) first moment m of gradienttAnd the second moment v of the gradienttAnd (3) correcting to obtain:

in the formula (I), the compound is shown in the specification,respectively, the bias correction of the first moment of gradient and the second moment of gradient.

2.7) updating the iteration parameter θtAnd returns to step 2.2).

Wherein the iteration parameter thetatThe update is as follows:

where α is a learning rate for controlling the stride. ε is a constant.

2.8) judging the current iteration parameter thetatWhether convergence is achieved, if yes, based on the current iteration parameter thetatAnd (4) establishing a lithium battery SOH estimation optimization model, and skipping to the step 2.9), or else, entering the step 2.3).

2.9) inputting the verification set into a lithium battery SOH estimation optimization model, and verifying whether the accuracy of the output result of the lithium battery SOH estimation optimization model is greater than an accuracy threshold value PmaxIf yes, training is finished, otherwise, the step 2.1) is returned.

Judging the current iteration parameter thetatThe convergence method comprises the following steps: judging the difference value delta theta of the two adjacent iteration parameters to be thetatt-1≤ΔθmaxAnd if so, converging, and otherwise, not converging. Delta thetamaxIs the difference threshold.

3) And acquiring data of a nearly full-charge segment of the lithium battery to be evaluated, preprocessing the data, and inputting the data into a lithium battery SOH estimation optimization model to finish the estimation of the SOH of the lithium battery.

The lithium battery charging fragment data X in the nearly full-charging process is the lithium battery secondary battery capacity I1Charging to electric quantity I2Charging segment data of (1). (I)2-I1)/Imax100% is greater than the specific gravity threshold p. I ismaxThe maximum electric quantity of the lithium battery.

The lithium battery charging segment data comprises battery charge state, monomer voltage, total current, temperature and charging duration.

The lithium battery charging fragment data in the nearly full-charging process is standardized data with consistent dimensions.

It is worth explaining that the method firstly utilizes the characteristic that the deep neural network has strong nonlinear q-type fitting capability to establish a lithium battery SOH estimation model based on the deep neural network; and then, an improved training method based on the adaptive learning rate is introduced to train the model so as to solve the optimal weight matrix and offset vector value. By the method, the data-driven SOH model is trained, and the SOH of the lithium battery can be estimated with high precision. And finally, using the near-full charge segment which does not participate in training as a verification set, obtaining a corresponding SOH value through model estimation, and comparing the SOH value with a true value to obtain a series of errors so as to verify the effectiveness of the model.

The technical effects of the present invention are undoubted, and the present invention has the following effects:

1) the invention provides an SOH estimation model and a training method based on a deep neural network, which introduces a deep learning algorithm based on an adaptive learning rate to update network parameters, avoids the problem that the learning rate is set artificially, and sets different adaptive learning rates for different parameters; the data is preprocessed in a standardized way; and introduces a mean square error loss function as the objective function.

2) The invention provides an SOH on-line estimation method based on a deep neural network, which is characterized in that input and output data are processed in data preprocessing modes such as random sampling and standardization, a final SOH estimation model is obtained through training, and the final SOH estimation model is substituted into a verification set for input, so that a corresponding SOH value can be obtained, the SOH on-line estimation of a lithium battery is realized, the estimation precision is improved by about 10% compared with that of a model-based method, and the estimation precision required by the practical application of a vehicle enterprise is met.

3) The invention has strong industrial application potential. Because the SOH influence factors of the lithium battery are more and the mechanism is more complex, the estimation of the SOH from the mechanical angle is relatively difficult, so the method is considered to be used, the SOH of the lithium battery can be estimated with high precision by directly mapping through a neural network without considering the internal mechanism of the battery.

Drawings

FIG. 1 is a diagram of a SOH estimation model of a deep neural network;

FIG. 2 is a verification set verification effect.

Detailed Description

The present invention is further illustrated by the following examples, but it should not be construed that the scope of the above-described subject matter is limited to the following examples. Various substitutions and alterations can be made without departing from the technical idea of the invention and the scope of the invention is covered by the present invention according to the common technical knowledge and the conventional means in the field.

Example 1:

referring to fig. 1, the lithium battery SOH online estimation method based on the deep neural network includes the following steps:

1) and establishing a lithium battery SOH estimation model based on a deep neural network.

The lithium battery SOH estimation model based on the deep neural network comprises an input layer, a plurality of hidden layers and an output layer.

The output y of the hidden layer is as follows:

in the formula, WjRepresenting the weight matrix from layer j-1 to layer j. bjRepresenting the bias vectors for layer j-1 through layer j. SigmajRepresenting the activation function of the j-th layer.

The output Y of the output layer is as follows:

in the formula, the upper labelIndicating transposition.

The activation function of the hidden layer is as follows:

σj(x)=max(x,0) (3)

the activation function of the output layer is as follows:

σh+1(x)=x (4)

2) and training the lithium battery SOH estimation model based on the deep neural network to obtain a lithium battery SOH estimation optimization model.

The step of training the lithium battery SOH estimation model based on the deep neural network comprises the following steps:

and 2.1) acquiring lithium battery charging fragment data and corresponding lithium battery SOH in the nearly full charging process in the T period, and respectively writing the lithium battery charging fragment data and the corresponding lithium battery SOH into a training set and a verification set.

2.2) inputting the training set into a lithium battery SOH estimation model based on a deep neural network to obtain a current weight matrix W and a bias vector b.

2.3) setting an iteration parameter thetat={Wt,bt}. And t is the iteration number. the initial value of t is 0.

2.4) updating the iteration times t ═ t +1, and calculating the objective function ftt-1) For the iteration parameter thetat-1Gradient g oftNamely:

wherein the objective function f is as follows:

in the formula, MSE (Y, Y') represents a mean square error loss function. Y is the actual value. Y' is an estimated value. n is

2.5) calculating the gradient g separatelytFirst and second order moments of (a), i.e.:

mt←β1·mt-1+(1-β1)·gt (8)

in the formula, mtIs the first moment of the gradient. v. oftIs a gradient second moment.Is the square of the gradient. Beta is a1Is the first moment attenuation coefficient. Beta is a2The second moment attenuation coefficient. And ← represents the updating of the left symbol with the right expression.

2.6) first moment m of gradienttAnd the second moment v of the gradienttAnd (3) correcting to obtain:

in the formula (I), the compound is shown in the specification,respectively, the bias correction of the first moment of gradient and the second moment of gradient.

2.7) updating the iteration parameter θtAnd returns to step 2.2).

Wherein the iteration parameter thetatThe update is as follows:

where α is a learning rate for controlling the stride. ε is a constant.

2.8) judging the current iteration parameter thetatWhether convergence is achieved, if yes, based on the current iteration parameter thetatAnd (4) establishing a lithium battery SOH estimation optimization model, and skipping to the step 2.9), or else, entering the step 2.3).

2.9) inputting the verification set into the lithium battery SOH estimation optimization model to verify the lithium battery SOH estimation optimization modelWhether the accuracy of the output result is greater than the accuracy threshold PmaxIf yes, training is finished, otherwise, the step 2.1) is returned.

Judging the current iteration parameter thetatThe convergence method comprises the following steps: judging the difference value delta theta of the two adjacent iteration parameters to be thetatt-1≤ΔθmaxAnd if so, converging, and otherwise, not converging. Delta thetamaxIs the difference threshold.

3) And acquiring lithium battery charging fragment data of the lithium battery to be evaluated in the nearly full charging process, and inputting the lithium battery charging fragment data into a lithium battery SOH estimation optimization model to complete estimation of the SOH (state of health) of the lithium battery.

The lithium battery charging fragment data X in the nearly full-charging process is the lithium battery secondary battery capacity I1Charging to electric quantity I2Charging segment data of (1). (I)2-I1)/Imax100% is greater than the specific gravity threshold p. In this example, p is 80%. I ismaxThe maximum electric quantity of the lithium battery.

The lithium battery charging segment data comprises battery charge state, monomer voltage, total current, temperature and charging duration.

The lithium battery charging fragment data in the nearly full-charging process is standardized data with consistent dimensions.

Example 2:

the lithium battery SOH online estimation method based on the deep neural network comprises the following steps:

1) acquisition of a full charge fragment sample: selecting data of a near-full-charge segment with an SOC value from below 10 to above 90 as sample input X, wherein the characteristics comprise SOC, monomer voltage, total current, temperature and charging time; the SOH value at the corresponding fully charged segment is taken as the sample output Y.

2) Data preprocessing: firstly, unifying the data line number of all full-charge segments by adopting a random sampling method to ensure that the input dimensionality is consistent; converting all data of SOC, monomer voltage, total current, temperature and charging time length in each full charging process into one line of data; this data is then normalized.

3) Training a deep neural network SOH estimation model: firstly, randomly dividing all sample data into a training set and a verification set according to a certain proportion; secondly, constructing a mean square error loss function; and finally, iteratively solving all optimal weight matrixes and bias vector values theta of the model by introducing parameter updating modes (5) - (12) based on the adaptive learning rate.

4) Solving an online SOH value: and inputting the verification sample divided in the third step into the trained model, and calculating the SOH value corresponding to each full charging section on line.

5) Index statistics: the input of the calculation verification set is the average relative error, the maximum relative error, the average absolute error and the maximum absolute error between the output calculated by the model and the true value.

Example 3:

the lithium battery SOH online estimation method based on the deep neural network comprises the following steps:

1) lithium battery SOH estimation model based on deep neural network

The SOH estimation model based on the deep neural network is built by utilizing the advantage that the deep neural network has stronger fitting capability to the complex nonlinear function, and the model structure is shown in figure 1 in detail. The model takes the battery data X of the nearly fully charged segment after corresponding preprocessing as input, and obtains output Y which is the SOH value of the battery after model operation. The calculation process is as follows:

firstly, taking the processed charging data as input X, calculating by formula (1) to obtain output Y of X after passing through two hidden layers, and secondly, taking Y as the input of an output layer, obtaining output Y of the output layer by formula (2), namely the SOH value of the lithium battery at the moment.

Wherein, W1、b1、W2、b2、W3、b3Respectively indicating a weight matrix and a bias vector from an input layer to a first layer hidden layer, a weight matrix and a bias vector from the first layer hidden layer to a second layer hidden layer, and a weight matrix and a bias vector from the second layer hidden layer to an output layer; sigma1、σ2、σ3Respectively, the activation functions of two hidden layers and an output layer. Sigma1、σ2The expression (c) is shown in formula (3), σ3Expression of (4)

σ1(x),σ2(x)=max(x,0) (3)

σ3(x)=x (4)

By the method, the model is built, then the model is trained by an improved training method, and the optimal weight matrix and the optimal bias vector value are obtained.

2) Training method for SOH estimation model of deep neural network lithium battery

The invention adopts adaptive motion estimation (Adam) based on an improved training algorithm of adaptive learning rate, the method replaces the traditional random gradient descent method, the traditional random gradient descent only keeps single learning rate to update the weight matrix in the training process, and Adam selects different adaptive learning rates for different parameters by calculating the first moment and the second moment of the gradient, and the Adam has high calculation efficiency and small memory requirement.

Therefore, the method is adopted as an optimization algorithm, and the specific implementation steps are as follows:

when the parameter thetatWhen the convergence is not reached, the step number is updated by the formula (5), and then the gradient of the original objective function f (theta) to the parameter theta is calculated by the formula (6).

t←t+1 (5)

Where t is the number of updated steps, the initial value is 0, θtFor the parameters to be solved, f (theta) is the objective function with the parameter theta, i.e. g, with the least mean square error loss function (7)tThe resulting gradient is derived from θ for the objective function f (θ). Y is the true value and Y' is the estimated value.

After the gradient value is obtained, the first moment of the gradient, namely the average value of the past gradient and the current gradient, is obtained through the calculation of the formula (8), so that the gradient can be smoothly and stably transited. Furthermore, in order to be able to set different adaptive learning rates for different parameters, the second moment of the gradient, i.e. the average of the square of the past gradient and the square of the current gradient, is introduced by equation (9).

mt←β1·mt-1+(1-β1)·gt (8)

Wherein m istIs the first moment of the gradient with an initial value of 0, vtIs a gradient second moment, the initial value is 0,is the square of the gradient, beta1A first-order moment attenuation coefficient of 0.9, beta2The second-order moment attenuation coefficient is 0.999 by default.

However, becauseSince the initial value is 0, the gradient is biased toward 0, and therefore, it is necessary to correct the first order moment and the second order moment of the gradient by equations (10) and (11), respectively, to reduce the influence of the bias.

WhereinThe first order moment and the second order moment are respectively used for offset correction.

Finally, the parameters are updated using equation (12). Iterating the steps until the parameter thetatAnd (6) converging.

Where α is the learning rate to control stride, default is 0.01, and ε is default is 10-8

3) And acquiring lithium battery charging fragment data of the lithium battery to be evaluated in the nearly full charging process, and inputting the lithium battery charging fragment data into a lithium battery SOH estimation optimization model to complete lithium battery SOH estimation.

Example 4:

the verification experiment of the lithium battery SOH on-line estimation method based on the deep neural network comprises the following steps:

1) sample acquisition

The battery data used in this embodiment is from a certain car-enterprise company.

Firstly, writing a corresponding algorithm aiming at data in the service period of a battery and intercepting charging segment data which is approximately in a full charging process, namely battery data with SOC from below 10 to above 90 is taken as input, and the specific characteristics comprise: SOC, monomer voltage v, total current i, temperature T and charging time T. Subsequently, the SOH value at the charged segment is obtained as an output by the ampere-hour integration method (1) to (3).

ocv→soc (2)

SOH=(S/(Δsoc·C0×0.01))×100 (3)

Wherein k isThe number of rows of sub-charge data; i.e. ik、tkRespectively representing the current at the k-th row and the time for which the current lasts, and the units are ampere (A) and hour (h); ocv is the cell voltage value at the resting point; Δ soc is the difference between soc at the rest point after charging (i.e. the point where the first current is 0 half an hour after the end of charging) and soc at the rest point before charging (i.e. the point where the first current is 0 before the start of charging), wherein the soc value is obtained by the cell voltage ocv through the ocv → soc curve table; c0The nominal capacity of the battery is expressed in ampere-hours (A.h).

2) Data pre-processing

Firstly, because input samples are data in the whole process of single full charge and the number of data lines in each charge is inconsistent, the number of data lines of all the input samples is required to be the same by a random sampling method to ensure the consistency of input dimensions, after the number of lines of all full charge data fragments is counted, the number of lines is determined to be uniformly divided into 300 lines according to the counting result; secondly, deforming the data structure, and changing two-dimensional matrix input into one-dimensional vector input; and finally, standardizing the input data.

3) Deep neural network SOH estimation model training

After data preprocessing, a deep neural network SOH estimation model is set up, wherein 50 neurons of an input layer, 100 neurons of a first hidden layer, 100 neurons of a second hidden layer and 1 neuron of an output layer are input. The training set and the validation set were then randomly divided in a 4:1 ratio for all sample inputs and sample outputs (2000 groups of data in total). And after the division is finished, training the built model, and iteratively solving all optimal weight matrixes and bias vector parameters of the model by using a parameter updating mode of the self-adaptive learning rate to finish the training of the model.

4) Online SOH value solution

And (4) inputting the verification set divided in the step (3) into the trained model in the step (3), and estimating the SOH value on line through model calculation.

5 index statistics

And (4) calculating the average relative error A, the maximum relative error B, the average absolute error C and the maximum absolute error D of the verification set, wherein the formulas are shown in (4) - (7), and the specific numerical values are detailed in table 1. Figure 2 shows the effect graph of the verification set

Wherein y isiIn the true value, the value of,is the model estimate.

Table 1 shows the indexes

Average relative error Maximum relative error Mean absolute error Maximum absolute error
1.67% 8.89% 1.49 7.35

The invention discloses a lithium battery SOH online estimation method based on a deep neural network, which updates model parameters by introducing a deep learning algorithm based on a self-adaptive learning rate so as to realize SOH online estimation. Finally, the validity and correctness of the obtained model are tested through the verification set. The method does not need to consider the internal mechanism of the battery, can directly map the corresponding SOH value according to the trained neural network, and has high speed and high precision.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种高功率锂离子蓄电池一致性筛选方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类