Algorithm based on power battery SOC and SOH joint estimation

文档序号:1427838 发布日期:2020-03-17 浏览:10次 中文

阅读说明:本技术 一种基于动力电池soc和soh联合估计的算法 (Algorithm based on power battery SOC and SOH joint estimation ) 是由 寇发荣 王思俊 王甜甜 洪峰 张海亮 于 2019-12-02 设计创作,主要内容包括:本发明涉及电动汽车动力电池系统电池电荷状态估计技术领域,具体为一种基于动力电池SOC和SOH联合估计的算法,该方法通过含有TSBSO算法优化RF算法的参数,以达到对算法剪枝阈值、预测试样本数、决策树数量最优化处理,优化后的算法能够快速找到全局最优解,提升算法效率;通过RBM估计动力电池SOH,用WOA优化RBM,避免模型参数陷入局部最优,以达到修正电池最大可用容量,提高全时工况动力电池SOC估计的精度的目的;通过TSBSO-RF算H<Sub>∞</Sub>法和滤波联合估计动力电池荷电状态,采用线性融合算法发挥两种算法的优点,避免两者的缺点,使动力电池SOC估计精度更高。(The invention relates to the technical field of battery state of charge estimation of a power battery system of an electric vehicle, in particular to an algorithm based on combined estimation of SOC and SOH of a power battery, which optimizes parameters of an RF algorithm by including a TSBSO algorithm so as to optimize a pruning threshold value, a pretest sample number and a decision tree number of the algorithm, and the optimized algorithm can quickly find a global optimal solution and improve the efficiency of the algorithm; estimating SOH of the power battery through RBM, optimizing the RBM by WOA, avoiding model parameters from falling into local optimum, so as to achieve the purposes of correcting the maximum available capacity of the battery and improving the accuracy of SOC estimation of the power battery under full-time working conditionsThe purpose of the degree; h by TSBSO-RF ∞ The method and the filter are combined to estimate the state of charge of the power battery, the advantages of the two algorithms are exerted by adopting a linear fusion algorithm, the defects of the two algorithms are avoided, and the SOC estimation precision of the power battery is higher.)

1. An algorithm based on the combined estimation of the SOC and the SOH of a power battery is characterized by comprising two parts of off-line data extraction and on-line data acquisition.

2. The algorithm for joint estimation of SOC and SOH of power battery according to claim 1, wherein the off-line data extraction comprises the following steps:

2.1, performing data offline acquisition on the power lithium ion battery under the working condition of a cycle test, and training a TSBSO-RF model by applying offline data to complete the construction of an offline SOC estimation part model;

2.2, performing data offline acquisition on the power lithium ion battery under the working condition of a cycle test, and training a WOA-RBM by using offline data to complete the construction of an offline SOH estimation part model.

3. The algorithm for joint estimation of SOC and SOH of power battery as claimed in claim 2, wherein the TSBSO-RF model is a random forest algorithm (RF) optimized by fusing tabu search algorithm (TS) and partical longicorn whisker search algorithm (BSO), and comprises the following specific steps:

3.1 initializing according to empirical parameters;

3.2 selecting a training set and a test set according to a resampling method, generating all decision trees, testing the result of each tree, and calculating the corresponding weight;

3.3 calculating a regression result under the initial parameter, taking the regression result as a fitness value, performing iterative optimization on the initial parameter by adopting a TSBSO algorithm, and comparing the initial parameter with a historical result to select an optimal model parameter;

3.4 initializing algorithm parameters of BSO to obtain initial parameters of each longicorn individual;

3.5 determining the left and right beard positions of the longicorn individuals, calculating corresponding fitness values, updating the increment through an increment function, updating the speed of the longicorn individuals through a speed function, then updating the positions of the longicorn, calculating the fitness value of each longicorn, and updating and recording the optimal related parameter values of the individual population;

3.6, judging whether the termination condition is met, if not, returning to the step (3.5), and if so, ending the iteration;

3.7 entering a TS stage, judging whether the convergence criterion is met, and if so, outputting a result; if not, generating a candidate solution;

3.8 judging whether the candidate solution meets the scofflaw criterion, if so, taking the solution of the scofflaw criterion as the current solution, otherwise, taking the optimal solution of the non-taboo object as the current solution, and judging whether the scofflaw criterion is met;

3.9 if the termination condition is reached, outputting the optimal individual, namely the optimal solution found by the algorithm, and outputting the position and the fitness value of the optimal individual;

3.10 building an optimal RF model using the optimal parameters and using the model to make predictions.

4. The algorithm for joint estimation of SOC and SOH of power battery as claimed in claim 2, wherein the WOA-RBM optimizes RBM by WOA by the following steps:

4.1, inputting a data sample set, preprocessing the data, determining RBM parameters and a topological structure, coding the parameter set, and calculating a regression result under an initial parameter;

and 4.2, taking the regression result as a fitness value, performing iterative optimization on the initial parameters by adopting WOA, and comparing the initial parameters with historical results to select optimal model parameters.

4.3 initialization parameters: i.e. the size SN of the whale population and the maximum iteration number TmaxMaximum value w ', minimum value w' of inertial weight, logarithmic spiral shape constant b, random number rand1rand2rand3Initial iteration times;

4.4 calculating the corresponding fitness value of each whale, sorting according to the fitness value, and selecting SN as initial populations;

4.5 calculating the size of the individual fitness value of SN, and finding out the individual position with the minimum fitness value as the optimal position;

4.6 when A is more than or equal to 1, updating the position of the next generation, and when A is less than 1, updating the position of the next generation by adopting the improved position vector;

4.7 if the termination condition is reached, outputting the optimal individual, namely the optimal solution found by the algorithm, and outputting the position and the fitness value of the optimal individual;

4.8, establishing an optimal RBM by using the optimal parameters, and calculating a target function value;

4.9 learning the RBM from bottom to top, learning the RBM from top to bottom, and calculating the maximum value of the target function by using a k-step contrast divergence CD-k algorithm;

and 4.10, judging whether the termination condition is met, restarting training if the termination condition is not met, and obtaining a prediction result of the optimal restricted Boltzmann machine model if the termination condition is met.

5. The algorithm based on the joint estimation of the SOC and the SOH of the power battery as claimed in claim 1, wherein the specific steps of the online data acquisition are as follows:

5.1, realizing the prediction of the SOH of the battery through the WOA-RBM; inputting parameters including SOH, current, voltage and temperature into a TSBSO-RF model to realize real-time estimation of the SOC of the power battery under the compensation of the SOH of the power battery in real time;

5.2, completing parameter online identification through FFRLS and completing H by combining with an equivalent circuit modelUpdating the time series of SOC estimation under filtering;

5.3, predicting SOH of the battery by using WOA-RBM, and further obtaining the maximum available capacity through a corresponding formula for HCorrecting the prior estimation of the filtering SOC;

5.4, on the basis of time series updating, using H under the principle of minimum maximum error estimationThe filter estimates the SOC of the power battery a posteriori;

5.5, use of HThe information of the filtering algorithm is used as a judgment standard, the two algorithms are fused, and more accurate SOC estimation is realized through linear fusion.

Technical Field

The invention relates to the technical field of battery state of charge estimation of a power battery system of an electric automobile, in particular to an algorithm based on the combined estimation of the SOC and the SOH of a power battery.

Background

The lithium ion power battery has the advantages of high energy density, high power density, long service life, high safety, high reliability, low self-discharge rate, light weight, no memory and the like. Because the lithium ion power battery has the defects of irreversible overcharge and overdischarge processes, severe characteristic change along with temperature change and the like, a complete Battery Management System (BMS) is required to be equipped so as to feed back and control the real-time state of the battery pack and ensure the safety and reliability of the power battery pack.

State of charge (SOC) is the most important parameter in BMS, and is also the most important part of the battery state detection function, and can only be estimated according to models in combination with corresponding algorithms. However, due to the fact that the interior of the chemical battery is complex and uncontrollable, the quantity of internal measurable parameters is very limited, the characteristics are mutually coupled, namely the parameters are attenuated when being used, strong time variation and high nonlinearity are achieved, in addition, the parameters such as current and temperature under the working condition of the actual vehicle are wide in variation range and high in variation rate, and the research of an estimation algorithm with high precision and high robustness is the key point of the SOC estimation of the power battery.

State of health (SOH) is also a crucial parameter in BMS, characterizing the aging of batteries during long-term charging and discharging. Because the rapid charging and discharging capacity and the storage capacity of the power battery are reduced along with the continuous aging of the battery, the SOH is estimated in real time, the current maximum available capacity can be accurately calculated, and the estimated value of the SOC is corrected.

The electrochemical reaction process inside the power lithium ion battery is complex, the actual working condition is complex and severe, and various methods exist as the estimation method of the charge state of the invisible state quantity, but all the single methods have the advantages and the defects.

Disclosure of Invention

In order to overcome the above-mentioned problems,the invention provides an algorithm based on the joint estimation of SOC and SOH of a power battery, which combines a TSBSO-RF algorithm and HEstimating the SOC of the power battery by using a filtering algorithm, estimating the SOH of the power battery by using WOA-RBM to achieve the correction of SOC estimation, and performing the TSBSO-RF algorithm and the H by using a linear fusion algorithmThe advantages of the filtering algorithm and the shortcomings of the filtering algorithm and the power battery are avoided, and the SOC estimation precision of the power battery is higher.

In order to achieve the purpose, the invention adopts the technical scheme that:

an algorithm based on the combined estimation of the SOC and the SOH of a power battery is characterized by comprising two parts of off-line data extraction and on-line data acquisition.

The specific steps of the off-line data extraction are as follows:

2.1, performing data offline acquisition on the power lithium ion battery under the working condition of a cycle test, and training a TSBSO-RF model by applying offline data to complete the construction of an offline SOC estimation part model;

2.2, performing data offline acquisition on the power lithium ion battery under the working condition of a cycle test, and training a WOA-RBM by using offline data to complete the construction of an offline SOH estimation part model.

The TSBSO-RF model is characterized in that a tabu search algorithm (TS) and a particle skynet whisker search algorithm (BSO) are fused to optimize a random forest algorithm (RF), and the TSBSO-RF model specifically comprises the following steps:

3.1 initializing according to empirical parameters;

3.2 selecting a training set and a test set according to a resampling method, generating all decision trees, testing the result of each tree, and calculating the corresponding weight;

3.3 calculating a regression result under the initial parameter, taking the regression result as a fitness value, performing iterative optimization on the initial parameter by adopting a TSBSO algorithm, and comparing the initial parameter with a historical result to select an optimal model parameter;

3.4 initializing algorithm parameters of BSO to obtain initial parameters of each longicorn individual;

3.5 determining the left and right beard positions of the longicorn individuals, calculating corresponding fitness values, updating the increment through an increment function, updating the speed of the longicorn individuals through a speed function, then updating the positions of the longicorn, calculating the fitness value of each longicorn, and updating and recording the optimal related parameter values of the individual population;

3.6, judging whether the termination condition is met, if not, returning to the step (3.5), and if so, ending the iteration;

3.7 entering a TS stage, judging whether the convergence criterion is met, and if so, outputting a result; if not, generating a candidate solution;

3.8 judging whether the candidate solution meets the scofflaw criterion, if so, taking the solution of the scofflaw criterion as the current solution, otherwise, taking the optimal solution of the non-taboo object as the current solution, and judging whether the scofflaw criterion is met;

3.9 if the termination condition is reached, outputting the optimal individual, namely the optimal solution found by the algorithm, and outputting the position and the fitness value of the optimal individual;

3.10 building an optimal RF model using the optimal parameters and using the model to make predictions.

The WOA-RBM optimizes the RBM through WOA, and comprises the following specific steps:

4.1, inputting a data sample set, preprocessing the data, determining RBM parameters and a topological structure, coding the parameter set, and calculating a regression result under an initial parameter;

and 4.2, taking the regression result as a fitness value, performing iterative optimization on the initial parameters by adopting WOA, and comparing the initial parameters with historical results to select optimal model parameters.

4.3 initialization parameters: i.e. the size SN of the whale population and the maximum iteration number TmaxMaximum value w ', minimum value w' of inertial weight, logarithmic spiral shape constant b, random number rand1rand2rand3Initial iteration times;

4.4 calculating the corresponding fitness value of each whale, sorting according to the fitness value, and selecting SN as initial populations;

4.5 calculating the size of the individual fitness value of SN, and finding out the individual position with the minimum fitness value as the optimal position;

4.6 when A is more than or equal to 1, updating the position of the next generation, and when A is less than 1, updating the position of the next generation by adopting the improved position vector;

4.7 if the termination condition is reached, outputting the optimal individual, namely the optimal solution found by the algorithm, and outputting the position and the fitness value of the optimal individual;

4.8, establishing an optimal RBM by using the optimal parameters, and calculating a target function value;

4.9 learning the RBM from bottom to top, learning the RBM from top to bottom, and calculating the maximum value of the target function by using a k-step contrast divergence CD-k algorithm;

and 4.10, judging whether the termination condition is met, restarting training if the termination condition is not met, and obtaining a prediction result of the optimal restricted Boltzmann machine model if the termination condition is met.

The online data acquisition comprises the following specific steps:

5.1, realizing the prediction of the SOH of the battery through the WOA-RBM; inputting parameters including SOH, current, voltage and temperature into a TSBSO-RF model to realize real-time estimation of the SOC of the power battery under the compensation of the SOH of the power battery in real time;

5.2, completing parameter online identification through FFRLS and completing H by combining with an equivalent circuit modelUpdating the time series of SOC estimation under filtering;

5.3, predicting SOH of the battery by using WOA-RBM, and further obtaining the maximum available capacity through a corresponding formula for HCorrecting the prior estimation of the filtering SOC;

5.4, on the basis of time series updating, using H under the principle of minimum maximum error estimationThe filter estimates the SOC of the power battery a posteriori;

5.5, use of HThe information of the filtering algorithm is used as a judgment standard, the two algorithms are fused, and more accurate SOC estimation is realized through linear fusion.

Compared with the prior art, the invention has the following beneficial effects:

the RF algorithm is used as a part of machine learning, can perform regression prediction on SOC based on a large amount of power battery data, and has the advantages of high convergence rate, high prediction precision, good robustness, few adjusting parameters and the like.

The BSO optimization algorithm has the advantages of high optimization speed and high convergence speed, can avoid trapping in searching local optimal solutions by introducing the BSO optimization algorithm with a tabu search idea, and has the advantages of few setting parameters, high prediction precision, high convergence speed and the like.

3. The RF algorithm is optimized by using the TSBSO algorithm, so that the optimization processing of the pruning threshold, the pretest sample number and the decision tree number of the algorithm can be realized, the optimization algorithm can quickly find the optimal solution, the random selection of parameters is avoided, and the algorithm efficiency is improved.

RBM is easy to fall into local optimum in the iterative process and also easy to generate overfitting in the training process. The RBM is improved by introducing a WOA optimization algorithm, so that the repeatability stability of the algorithm is greatly improved, the model is prevented from falling into a local optimal solution, and the estimation precision of the algorithm is improved.

5. Under the data-driven model, the TSBSO-RF algorithm and the WOA-RBM algorithm are used for realizing the joint estimation of the SOC and the SOH, so that the SOC is more accurate at each stage under the correction of the SOH.

6. By means of HThe filter algorithm overcomes the conservatism that the Kalman filter algorithm assumes that noise is white noise, admits that the statistical characteristic of the noise is unknown in the actual process, adopts the principle of minimum maximum error estimation, improves the precision and robustness of state estimation, obviously improves the state prediction precision and shortens the operation time of the algorithm.

7. Because the accurate estimation of the SOC depends on the accurate estimation of the SOH, the WOA-RBM algorithm is adopted to accurately estimate the SOH of the power battery, so that the maximum available capacity is restored, and H is realizedThe online adjustment of the capacity when the filtering algorithm estimates the SOC a priori, so that the SOC estimation is more accurate.

8. To avoid HThe filtering algorithm has large estimation error due to inaccurate battery modeling and current measurement, and H is usedThe information of the filtering algorithm is used as a judgment standard, and the SOC is estimated by adopting a linear fusion of two algorithms, so that the prediction of the SOC is more accurate.

Drawings

FIG. 1 is a flow chart of the TSBSO algorithm of the present invention;

FIG. 2 is a TSBSO-RF flow chart of the present invention;

FIG. 3 is a flow chart of the WOA-RBM algorithm of the present invention;

FIG. 4 shows an algorithm based on the joint estimation of SOC and SOH of the power battery.

Detailed Description

To further explain the technical means and effects of the present invention adopted to achieve the predetermined object, the following detailed description of the embodiments, structures, features and effects according to the present invention will be given with reference to the accompanying drawings and preferred embodiments.

An algorithm based on the combined estimation of the SOC and the SOH of a power battery is characterized by comprising two parts of off-line data extraction and on-line data acquisition.

The specific steps of the off-line data extraction are as follows:

2.1, performing data offline acquisition on the power lithium ion battery under the working condition of a cycle test, and training a TSBSO-RF model by applying offline data to complete the construction of an offline SOC estimation part model;

2.2, performing data offline acquisition on the power lithium ion battery under the working condition of a cycle test, and training a WOA-RBM by using offline data to complete the construction of an offline SOH estimation part model.

The TSBSO-RF model is characterized in that a tabu search algorithm (TS) and a particle skynet whisker search algorithm (BSO) are fused to optimize a random forest algorithm (RF) so as to optimize an algorithm pruning threshold, a pretest sample number and a decision tree number.

Further, random forest algorithm (RF): the specific algorithm flow is as follows:

1) resampling by using a Bootstrap method, and randomly generating T training S1,S2,…,ST

2) Using each training set, a corresponding decision tree C is generated1,C2,…,CT(ii) a Before selecting attributes on each non-leaf node (internal node, randomly extracting M attributes from M attributes as a split attribute set of the current node, and using the split attribute setSplitting the node in the best splitting mode in the attributes (generally speaking, the value of m is kept unchanged in the whole forest growth process);

3) each tree grows intact without pruning;

4) for the test set sample X, each decision tree is used for testing to obtain the corresponding class C1(X),C2(X),…,CT(X);

5) And adopting a voting method to take the category with the most output in the T decision trees as the category to which the test set sample X belongs.

As shown in fig. 1, it is a flow chart of the TSBSO algorithm formed by fusing the tabu search algorithm (TS) and the particle skyhook search algorithm (BSO).

A tabu search algorithm (TS) comprising the steps of:

1) giving a search algorithm parameter, randomly generating an initial solution X, and setting a tabu table to be null;

2) judging whether the algorithm termination condition is met: if yes, finishing the algorithm and outputting an optimization result; otherwise, continuing the following steps;

3) generating a plurality of other neighborhood solutions by using the current neighborhood solution, and determining a plurality of candidate solutions from the other neighborhood solutions;

4) judging whether scofflaw criteria are met for the candidate solution: if yes, replacing the current optimal solution with the optimal state meeting the scofflaw criterion, namely the optimal candidate solution is larger than the 'best so far' state, and then turning to the step 6); otherwise, continuing the following steps;

5) judging the taboo attribute of each object corresponding to the candidate solution, selecting the optimal state corresponding to the non-taboo object in the candidate solution set as a new current solution, and simultaneously replacing the taboo object which enters the taboo table earliest by the taboo object corresponding to the current solution;

6) judging whether the algorithm termination condition is met: if yes, finishing the algorithm and outputting an optimization result; otherwise, turning to the step 3);

particle longicorn whisker search algorithm (BSO): since BAS (longicorn whisker search algorithm) is likely to fall into local optima when performing multi-extreme optimization, in order to jump out the local optima, a Particle Swarm Optimization (PSO) is combined with a longicorn whisker search algorithm to form a particle longicorn whisker optimization algorithm (BSO).

Setting the number of individuals of the longicorn group as m, updating the position of the ith longicorn in the group:

Figure BDA0002298008350000091

wherein k is the current iteration number; viIs the speed function of the ith longicorn;

the velocity formula can be expressed as:

Figure BDA0002298008350000092

wherein, c1、c2、c3Is a learning factor for velocity update, ξ is an incremental function, λ is a constant, ω is an inertial weight whose magnitude can be adjusted by an iterative process, P is a function of the velocity of the objectbAnd PgRespectively representing the individual optimal solution and the population optimal solution of the Tianniu population.

Incremental function

Figure BDA0002298008350000093

Wherein, deltakIs the step size at the kth iteration;

Figure BDA0002298008350000094

and

Figure BDA0002298008350000095

the fitness values of the right beard and the left beard of the ith longicorn during the iteration are respectively;

the positions of the left and right whiskers:

Figure BDA0002298008350000096

in each iteration update, the longicorn improves the position of itself in two ways: one is that the position is improved through group learning, each longicorn improves the position according to the position of the current globally optimal longicorn, and the longicorn approaches to the current globally optimal longicorn, so that the searching speed is high; another way is to find according to the longicornThe feeding behavior improves the self position, if the odor concentration received by the left beard is greater than that received by the right beard, the left beard moves leftwards, otherwise, the left beard moves rightwards, and therefore each longicorn can also improve the self position by judging the odor concentration of the left beard and the right beard while the longicorn learns in a group, and therefore BSO optimization can more effectively jump out the local maximum value.

Further, as shown in fig. 2, a flow chart for optimizing a random forest algorithm (RF) by a TSBSO-RF algorithm formed by fusion is provided.

In the TSBSO-RF process, RF has a large number of parameters, and for different training sample sets without determined parameter selection rules, a TSBSO optimization RF algorithm is adopted to achieve optimization processing of an algorithm pruning threshold, a pretest sample number and a decision tree number, the optimization algorithm can quickly find an optimal solution, random selection of the parameters is avoided, and algorithm efficiency is improved, and the specific steps are as follows:

3.1 initializing according to empirical parameters;

3.2 selecting a training set and a test set according to a resampling method, generating all decision trees, testing the result of each tree, and calculating the corresponding weight;

3.3 calculating a regression result under the initial parameter, taking the regression result as a fitness value, performing iterative optimization on the initial parameter by adopting a TSBSO algorithm, and comparing the initial parameter with a historical result to select an optimal model parameter;

3.4 initializing algorithm parameters of BSO to obtain initial parameters of each longicorn individual;

3.5 determining the left and right beard positions of the longicorn individuals, calculating corresponding fitness values, updating the increment through an increment function, updating the speed of the longicorn individuals through a speed function, then updating the positions of the longicorn, calculating the fitness value of each longicorn, and updating and recording the optimal related parameter values of the individual population;

3.6, judging whether the termination condition is met, if not, returning to the step (3.5), and if so, ending the iteration;

3.7 entering a TS stage, judging whether the convergence criterion is met, and if so, outputting a result; if not, generating a candidate solution;

3.8 judging whether the candidate solution meets the scofflaw criterion, if so, taking the solution of the scofflaw criterion as the current solution, otherwise, taking the optimal solution of the non-taboo object as the current solution, and judging whether the scofflaw criterion is met;

3.9 if the termination condition is reached, outputting the optimal individual, namely the optimal solution found by the algorithm, and outputting the position and the fitness value of the optimal individual;

3.10 building an optimal RF model using the optimal parameters and using the model to make predictions.

The WOA-RBM optimizes a Restricted Boltzmann Machine (RBM) through a Whale Optimization Algorithm (WOA) to avoid the model parameters from falling into local optimization.

A constrained boltzmann machine (RBM) is a randomly generated neural network that can learn a probability distribution from an input data set. Which comprises 2 layers, a visible layer and a hidden layer. The connection between the neurons is characterized by no connection in the layer and full connection between the layers.

In the prediction process of the RBM, when the input is v, an output vector h of a hidden layer is calculated through a conditional probability P (v/h), a visible layer vector v is calculated according to the vector h and the conditional probability P (v/h), the newly obtained visible layer vector v is compared with an original input vector v, parameters are continuously corrected, and finally the newly obtained visible layer vector v is continuously close to the original input vector v to meet the error requirement.

The model of the RBM is an energy-based model, and given a state (v, h), a definable energy function:

Figure BDA0002298008350000111

wherein, ω isj,iThe connection weight between the visible unit and the hidden unit; a isiIs the bias of the visible cell i; bjIs the bias of hidden unit j;

using the energy function, a joint probability distribution of states (v, h) is derived:

Figure BDA0002298008350000112

wherein Z isθIs a normalization factor expressed in the form of

Figure BDA0002298008350000113

Probability distribution Pθ(v) And Pθ(h) Functional form of (c):

Figure BDA0002298008350000114

and after the visible layer is given, the probability that the jth node of the hidden layer takes a value of 1:

Figure BDA0002298008350000121

sigmoid(x)=1/(1+e-x)

and because the relationship between hidden layer nodes is conditional independent, the conditional probability distribution:

similarly, after the hidden layer h is determined, its conditional probability distribution can be obtained:

Figure BDA0002298008350000123

Figure BDA0002298008350000124

after a training set is given, an RBM is trained to adjust the parameter theta to fit a given training sample.

Assuming a set of training samples as

Figure BDA0002298008350000128

Wherein the content of the first and second substances,

Figure BDA0002298008350000125

training the target of the RBM, i.e. maximizing the likelihood function:

after log processing, the training targets may be converted to:

Figure BDA0002298008350000127

in addition, for an RBM model being learned, because the calculation of the likelihood function is complex, the likelihood function is difficult to be directly used as the evaluation function of the RBM, and an approximation method is often adopted to reconstruct errors to replace the likelihood function as the evaluation function of the RBM. And the reconstruction error is the difference value between the original data and the training sample as an initial state after one Gibbs sampling is carried out on the training sample through RBM distribution.

When the error meets the requirement, the output value of the hidden layer is the system output value, and at the moment, the probability distribution P of the model can be obtainedθ(v) And Pθ(h)。

Meanwhile, in order to calculate the maximum value of the objective function, a k-step contrast divergence CD-k algorithm is adopted in the text, and the specific process is as follows:

Figure BDA0002298008350000129

taking an initial value v(0)V, then k steps of Gibbs sampling are performed. First, P (h | v) is utilized(t-1)) Sampling out data h(t-1)(ii) a Then, P (v | h) is utilized(t-1)) Sampling out data v(t)(ii) a Finally, v obtained after sampling in the k step is utilized(k)The above-mentioned calculation formula of the 3 partial derivatives is approximated.

Figure BDA0002298008350000131

Figure BDA0002298008350000133

The purpose of the CD-k algorithm is to get an approximation of these partial derivatives and update the variables:

Figure BDA0002298008350000134

wherein η is the learning rate, the setting of the learning rate and the weight omega(k)Is related to the magnitude of (1), generally, according to η Δ ω ≈ 10-3ω sets the learning rate.

Whale Optimization Algorithm (WOA) is a new heuristic optimization algorithm proposed by simulating hunting behavior of whales with standing heads, wherein the position of each whale with standing heads represents a feasible solution.

The first step is as follows: surrounding a prey: for describing the behavior of the whale, which is to surround a prey when hunting, the following mathematical model is proposed:

D=|CX'(t)-X(t)| X(t+1)=X'(t)-AD

wherein t represents the current iteration number; a and C represent coefficients; x' (t) represents the hitherto best whale position vector; x (t) represents the position vector of the current whale;

A=2a·rand1-a C=2·rand2

Figure BDA0002298008350000135

wherein the value of a decreases linearly from 2 to 0; t represents the current number of iterations; t ismaxIs the maximum iteration number;

the second step is that: hunting behavior, which is a spiral movement toward a prey according to the hunting behavior of whale, so the mathematical model of hunting behavior is as follows:

wherein D isp| X' (t) -X (t) | denotes the distance between whale and prey; x' (t) represents the best position vector so far;

the whale swims to the prey in a spiral shape and shrinks the surrounding ring at the same time. Therefore, in this synchronous behavior model, P is assumed to be presentiProbability selection shrink wrap mechanism and 1-PiThe spiral model is selected to update the whale position, and the mathematical model is as follows:

Figure BDA0002298008350000142

when the prey is attacked, a value for decreasing a is set close to the prey on the mathematical model, so that the fluctuation range of A also decreases with a. In an iterative process when the value of a falls from 2 to 0, A is a random value within [ -a, a ], when the value of A is within [ -1,1], the next position of the whale can be any position between its present position and the position of the prey, and the algorithm sets that when A < 1, the whale makes an attack on the prey.

The third step: searching prey, wherein the mathematical model of the prey is as follows:

D=|CXrand-X(t)| X(t+1)=Xrand-AD

wherein, XrandIs a randomly selected whale position vector;

the algorithm is set to randomly select a search agent when A is larger than or equal to 1, the positions of other whales are updated according to the randomly selected whale positions, the whales are forced to deviate from the prey, and therefore a more appropriate prey is found, so that the exploration capacity of the algorithm can be enhanced, and the WOA algorithm can conduct global search.

Further, the search in the WOA algorithm completely depends on randomness, so that the convergence accuracy of the algorithm is low, and the convergence speed is low. In order to enhance the local search capability, improve the convergence accuracy and accelerate the convergence speed, the invention introduces inertial weight to improve the algorithm, and the added inertial weight expression is expressed as follows:

Figure BDA0002298008350000151

wherein w' is the maximum value of the inertial weight; w "is the minimum value of the inertial weight;

the improved position vector update formula is as follows:

w is decreased gradually along with the increase of the iteration times, so that the global search is facilitated in the early stage of the iteration, the local optimization is facilitated in the later stage of the iteration, and the local optimization is facilitated in the algorithm due to the large reduction amplitude of the introduced w, so that the convergence precision is improved, and the convergence speed is accelerated.

Furthermore, the RBM has the advantages of high optimization speed and high convergence, is easy to fall into local optimum in the iteration process, and is easy to generate overfitting in the training process. In order to enable the algorithm to jump out of the local optimum, a WOA optimization algorithm is introduced to improve the RBM, so that the repeatability stability of the algorithm is greatly improved, the model is prevented from falling into the local optimum solution, and the estimation precision of the algorithm is improved. As shown in FIG. 3, the specific process of the WOA-RBM model construction is as follows:

4.1, inputting a data sample set, preprocessing the data, determining RBM parameters and a topological structure, coding the parameter set, and calculating a regression result under an initial parameter;

and 4.2, taking the regression result as a fitness value, performing iterative optimization on the initial parameters by adopting WOA, and comparing the initial parameters with historical results to select optimal model parameters.

4.3 initialization parameters: i.e. the size SN of the whale population and the maximum iteration number TmaxMaximum value w ', minimum value w' of inertial weight, logarithmic spiral shape constant b, random number rand1rand2rand3Initial iteration times;

4.4 calculating the corresponding fitness value of each whale, sorting according to the fitness value, and selecting SN as initial populations;

4.5 calculating the size of the individual fitness value of SN, and finding out the individual position with the minimum fitness value as the optimal position;

4.6 when A is more than or equal to 1, updating the position of the next generation, and when A is less than 1, updating the position of the next generation by adopting the improved position vector;

4.7 if the termination condition is reached, outputting the optimal individual, namely the optimal solution found by the algorithm, and outputting the position and the fitness value of the optimal individual;

4.8, establishing an optimal RBM by using the optimal parameters, and calculating a target function value;

4.9 learning the RBM from bottom to top, learning the RBM from top to bottom, and calculating the maximum value of the target function by using a k-step contrast divergence CD-k algorithm;

and 4.10, judging whether the termination condition is met, restarting training if the termination condition is not met, and obtaining a prediction result of the optimal restricted Boltzmann machine model if the termination condition is met.

The online data acquisition comprises the following specific steps:

step one, realizing the prediction of the SOH of the battery through a WOA-RBM; inputting parameters including SOH, current, voltage and temperature into a TSBSO-RF model to realize real-time estimation of the SOC of the power battery under the compensation of the SOH of the power battery in real time;

further, based on data-driven online estimation: in the using process of the actual algorithm, polarization internal resistance, ohmic internal resistance, temperature, cycle number and continuous charging and discharging time in a real-time state are used as input quantities of a WOA-RBM, and the SOH of the power battery is used as an output quantity to realize the online estimation of the SOH of the power battery; and taking the current, the voltage, the temperature, the cycle number and the SOH of the battery in a real-time state as input quantities of the TSBSO-RF, and taking the SOC of the power battery as an output quantity so as to achieve online estimation of the SOC of the power battery under SOH compensation.

SOH=f1(R1,R2,T,N.t) SOC=f2(Ut,I,T,N,SOH)

Step two, power battery parameter online acquisition under real vehicle working conditions, parameter online identification is completed through FFRLS, and H is completed by combining with an equivalent circuit modelTime series update of SOC estimation under filtering.

HUpdating the filtering estimation SOC time sequence: the state of charge of the power battery is used as an important parameter for measuring a battery system, has serious hysteresis, strong time variation and nonlinearity, and has a strong relationship with the charge and discharge historical data of the battery. The traditional Kalman filtering is an efficient means for solving state estimation, but the accuracy of a Kalman Filter (KF) is based on the premise that a system model is accurate and external input statistical characteristics are determined, so that a KF algorithm has a conservative form to a large extent.First, under objective conditions, knowledge of the statistical properties of noise and accurate modeling of objective facts is impractical. In order to overcome the conservatism of a KF algorithm and improve the robustness of state estimation, H is providedAnd (4) estimating the state of charge of the power battery by using a filtering algorithm.

The cost function is:

Figure BDA0002298008350000171

wherein x is0Is the initial value of the state quantity;

Figure BDA0002298008350000172

is an initial state estimate; p0Is an initial state error covariance matrix; qkIs a state equation noise covariance matrix; rkIs a measurement equation noise covariance matrix; skIs a weight matrix of each state quantity;

assuming the natural world as an opponent, our goal is to find an xkIs estimated by

Figure BDA0002298008350000173

Make it

Figure BDA0002298008350000174

At a minimum, a performance boundary λ is selected

Therefore, the temperature of the molten metal is controlled,

Figure BDA0002298008350000181

the problem thus becomes: when x is0、ωk、υkSo that J2At maximum, selecting the appropriate one

Figure BDA0002298008350000182

So that J2And minimum. Solving the above problem can obtain a loss functionRecurrence relation of numbers:

Figure BDA0002298008350000183

Figure BDA0002298008350000184

Figure BDA0002298008350000185

wherein, KkIs HAn algorithm gain matrix; pkIs to select a positive definite matrix P0A state error covariance matrix is obtained by recursion; then HThe filter algorithm comprises the following steps:

by using

Figure BDA0002298008350000186

And

Figure BDA0002298008350000187

x representing a priori estimateskAnd Pk(ii) a By usingAnd

Figure BDA0002298008350000189

x representing a posteriori estimatekAnd Pk

Initializing parameters of an algorithm: hThe filtering algorithm needs to set initial values including initial state error covariance, initial state quantity, state equation noise covariance, measurement equation noise covariance, weight matrix, and performance boundary.

HThe specific steps of updating the time series of the filtered estimated SOC comprise:

1) DP equivalent circuit model

The equivalent circuit model uses traditional elements such as resistance, capacitance, constant voltage source and the like to express the external characteristics of the battery. A voltage source is used for expressing the thermodynamic equilibrium potential of the battery, and an RC network is used for expressing dynamic characteristics of the power battery, including polarization characteristics and diffusion effects. The invention discloses a dual-polarization model, which uses 2 RC networks to respectively express electrochemical polarization and concentration polarization effects of chemical reactions, and according to kirchhoff voltage law, kirchhoff current law and DP equivalent circuit model working equation:

Figure BDA0002298008350000191

in the formula of UtIs the battery model terminal voltage; u shapeocIs the cell model open circuit voltage; r0Is the ohmic internal resistance; u shape1、R1、C1Respectively representing electrochemical polarization voltage, internal resistance and capacitance; u shape2、R2、C2Respectively showing concentration polarization voltage, internal resistance and capacitance.

Discretizing the state equation to obtain a system discretization equation:

in the formula, τ1And τ2Is the time constant of the two RC networks; Δ t is a unit sampling interval.

2) Parameter identification

The method adopts a recursive least square method containing forgetting factors to realize the parameter identification of the DP equivalent circuit model, and accurately captures the real-time characteristics of the model parameters through regular parameter correction and updating according to the parameters of current, voltage, temperature and the like measured in real time.

Discretizing a DP model:

Figure BDA0002298008350000193

since discrete data is processed using a computer, a bilinear transformation is required to make the system complete the mapping from the s-domain to the z-domain. Difference equation in discretized time domain:

E(k)=k1E(k-1)+k2E(k-2)+k3I(k)+k4I(k-1)+k5I(k-2)

the method is simplified as follows:

Figure BDA0002298008350000201

wherein y (k) is the system input; Φ (k) is a data matrix; θ (k) is a parameter matrix.

RLS is based on the error between the estimation result and the expectation at the last moment and new observation data to make recursive algorithm correction, so as to obtain the estimation result at the moment. The RLS overcomes the uncertainty of the model parameters through regular parameter correction and alternation, and realizes the capture of the online characteristics of the system. The late RLS adaptive correction capability is poor due to the attenuation of the covariance matrix and the gain matrix caused by the accumulation saturation of long-time memory, so that a forgetting factor is introduced to solve the problem.

Figure BDA0002298008350000204

In the formula, mu is a forgetting factor, and the number of the mu is 0.97; k algorithm gain matrix; e, error matrix; a theta parameter matrix estimator; a P state estimation error covariance matrix;

substituting the above formula into FRLS identification method, using θ (k) as direct identification parameter, and deriving circuit model parameter R from the identification result of these parameters1、R2、C1、C2、R0

R0=k5/k2

R1=(τ1c+τ2R0-d)/(τ12) R2=c-R1-Ro

C1=τ1/R1C2=τ2/R2

Wherein k is0=Δt2/(k1+k2+1) a=k0·k2

b=-k0(k1+2k2)/Δt c=k0(k3+k4+k5)/Δt2

d=-k0(k4+2k5)/Δt

3)HFilter system a priori estimation

The system state equations and system observation equations may be described as follows:

Figure BDA0002298008350000211

wherein x is an n-dimensional system state vector; u is an r-dimensional system input vector;yis an m-dimensional system observation vector; omegak-1Is system white noise with mean of zero and covariance of Qk;υkIs a white noise measurement with a mean of zero, covariance Rk(ii) a ω and υ are independent of each other.

Taking the SOC, the electrochemical polarization voltage and the ohmic polarization voltage of the ternary lithium ion power battery as three-dimensional state vectors; taking current as a control input; and taking a terminal voltage change equation as a one-dimensional observation vector. x ═ SOC U1U2]T;u=i;y=Ut

Discretizing the jacobian matrix by the DP cell model is shown below:

Figure BDA0002298008350000212

Figure BDA0002298008350000213

Figure BDA0002298008350000214

Figure BDA0002298008350000215

initialization HInitial value of the state observer: x is the number of0、P0、Q、R、λ、S

Completion System State matrix and HA priori estimation of the eigen-state matrix, i.e. estimation of the state and covariance from the previous moment (k-1)+Estimate the current time (k)-

The system state is prior:

Hthe characteristic state matrix prior:

Figure BDA0002298008350000222

step three, predicting SOH of the battery by using WOA-RBM, and further obtaining maximum available capacity through a corresponding formula for HAnd correcting the prior estimation of the filtering SOC.

Further, online WOA-RBM capacity correction: the storage capacity and the rapid charging and discharging capacity of the power battery are continuously reduced along with the aging of the battery, and at the moment, SOH is used as an index for measuring the aging degree of the power battery and provides real-time battery health information for a user so that the user can judge the performance of the battery. Moreover, the change of SOH may cause the change of ohmic internal resistance and capacity, thereby affecting the estimation of real-time SOC. Therefore, accurate estimation of SOC depends on accurate estimation of SOH.

According to the SOH output by the model in the step one, the real-time maximum available capacity of the power battery can be obtained: c is SOH CmaxWherein, CmaxIs the maximum available capacity of the power battery.

Step four, on the basis of updating the time sequence, using H under the principle of minimum maximum error estimationThe filter estimates the SOC of the power battery a posteriori;

further, HAnd (3) filtering estimation SOC measurement updating: updating the gain matrix by using the measured value y at time kkCorrected state posterior estimation

Figure BDA0002298008350000223

Sum covariance posterior estimation

Figure BDA0002298008350000224

An innovation matrix:

Hgain matrix:

Figure BDA0002298008350000226

the method comprises the following steps of (1) carrying out system state posterior estimation, namely realizing the posterior estimation of the state error covariance through the prior estimation of the state error covariance, a performance boundary coefficient, a weight matrix, a system observation matrix and a measurement equation noise covariance matrix; by a priori estimation of the system state, HThe posterior estimation of the gain matrix and the innovation matrix realize the posterior estimation of the system state.

The posterior of the system state:

Figure BDA0002298008350000231

Ha posterior of the characteristic state matrix:

Figure BDA0002298008350000232

step five, using HThe information of the filtering algorithm is used as a judgment standard, the two algorithms are fused, and more accurate SOC estimation is realized through linear fusion.

Further, the algorithm fuses the estimated SOC: using HThe information of the filtering algorithm is used as a judgment standard, the two algorithms are fused, and more accurate SOC estimation is realized through linear fusion.

Because the terminal voltage and the terminal current of the battery inevitably have measurement errors, and the established model cannot completely and accurately express a complex dynamic battery system, the method adoptsUsing model-based methods HThe filtering algorithm has inherent deficiency in estimating the SOC. The data driving method for estimating the SOC of the power battery can effectively compensate the defect time period based on the model method, and the two algorithms are jointly estimated to realize more accurate SOC estimation.

1) According to HFiltering the prior estimates to compute innovation:

Figure BDA0002298008350000233

2) if the innovation is less than 0.005V, H is continuously usedThe filtering algorithm realizes the posterior estimation of the SOC, and uses a WOA-RBM algorithm to estimate the SOH to compensate the maximum available capacity;

3) and if the innovation is more than 0.005V and less than 0.05V, estimating the SOC by adopting a linear fusion algorithm.

Figure BDA0002298008350000234

4) And if the innovation is more than 0.05V, estimating the SOC under the SOH compensation by adopting a data-driven model, namely a TSBSO-RF algorithm and a WOA-RBM algorithm.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于改进随机森林联合容积卡尔曼动力电池荷电状态估计的算法

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类