This application claims the priority benefit of China design patent application serial no. 202011501757.0 filed Dec. 18, 2020. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of the specification.
The disclosure relates to the technical field of battery management, in particular, relates to a method and a system of lithium battery state of charge (SOC) estimation based on second-order difference particle filtering, and specifically, relates to model parameterization by building a second-order RC equivalent circuit model and adopting a least squares algorithm with a forgetting factor and improvement of a particle filtering algorithm to obtain a second-order difference particle filtering algorithm to estimate the SOC of a battery.
Regarding electric vehicles, reduced noise, energy saving, environmental protection, and no emission of harmful gases are some of the advantages that electric vehicles can offer. However, electric vehicles also exhibit several disadvantages such as high battery costs, short recharge mileage, long recharging time, and insufficient popularity of charging piles. As a result, at present, actual applications and promotion of electric vehicles have encountered difficulties. It can be said that the development of electric vehicles is limited by the development of related technologies for power battery systems, and therefore, related research on the battery management systems (BMS) has become a core issue in the development of electric vehicles. The accurate estimation of the state of charge (SOC), used for evaluating the remaining available power of a battery, is one of the core technologies of BMS. The SOC of the battery cannot be directly measured when a vehicle is running, and it needs to be calculated indirectly through data such as battery voltage, current, and temperature. Through the SOC estimation of the battery, real-time prediction of the remaining available power of the battery may be achieved, and in this way, a reasonable traveling plan may be conveniently formulated, and normal operation of an electric vehicle is ensured.
The PF algorithm is a recursive nonlinear non-Gaussian filtering algorithm based on Bayesian estimation. The probability distribution of the system state is approximated by the Monte Carlo method, that is, the probability density function may be approximated and obtained by a large number of sample points (particles) with weights. Through continuous iteration between particles, the weight of the particles is adjusted, and the state and observation output of the system are calculated through the weighted average value of the particles. The PF algorithm provides a good estimation effect. However, in Monte Carlo sampling, when the prior probability density is selected to act as the importance density function to approximate the unknown posterior probability density, this approximation has errors. With the increase of the number of iterations, the diversity of particles may disappear, and the phenomenon of particle degradation may appear, which will lead to the failure of the filtering algorithm.
In view of the above defects or improvement requirements of the related art, the disclosure provides a method and system of lithium battery state of charge (SOC) estimation based on second-order difference particle filtering capable of performing SOC estimation on a lithium battery.
To realize the above purpose, according to one aspect of the disclosure, the disclosure provides a method of lithium battery SOC estimation based on second-order difference particle filtering. The method includes the following steps.
(1) A second-order RC battery model of a lithium battery is built.
(2) According to the second-order RC battery model of the lithium battery, model parameterization is performed by using a least squares algorithm with a forgetting factor.
(3) An importance density function is generated through a second-order central difference Kalman filtering (SCDKF) algorithm.
(4) A particle filtering algorithm is improved according to the importance density function to obtain a second-order difference particle filtering (SCDPF) algorithm, and SOC estimation is performed on a lithium battery by using the SCDPF.
In some optional embodiments, step (1) further includes the following.
A state formula of the discretized battery second-order RC model is:
where T is a sampling time interval, k is sampling time, Rac is ohmic resistance, Rct is charge transfer resistance, Rwb is diffusion resistance, Cct is charge transfer capacitance, Cwb is diffusion capacitance, Uocv, is a circuit open circuit voltage, Uct is a voltage at both terminals of a RctCct network, Uwb is a voltage at both terminals of a RwbCwb network, Ut is a voltage at a model output terminal, I is a current at present, τct is a time constant of the RctCct network, τwb is a time constant of the RwbCwb network, τct=RctCct, Twb=RwbCwb, and C is battery capacitance.
A predicted terminal voltage of a battery after discretization is:
where y(k+1) is the predicted terminal voltage of the battery at time k+1.
In some optional embodiments, step (2) further includes the following step.
A terminal voltage of the second-order RC battery model of the lithium battery is written in a least squares form: y(k)=φ(k)θT+e(k), where φ(k)=[y(k−1)y(k−2)I(k)I(k−1)I(k−2)], e(k) is a sampling error of a sensor at time k, and a parameter matrix of the second-order RC battery model of the lithium battery is identified as θ=[θ1θ2θ3θ4θ5], where y(k)=θ1y(k−1)+θ2y(k−2)+θ3I(k)+θ4I(k−1)+θ5I(k−2).
Parameter identification is performed on the parameter θ through the least squares algorithm with a forgetting factor
λ is the forgetting factor, and {circumflex over (θ)} is an estimated value of θ.
In some optional embodiments, the model parameters Rac, Rct, Rwb, τct, and τwb are obtained through
In some optional embodiments, step (3) further includes the following step.
A state estimated value {circumflex over (x)}k(i) of particles xk is determined by {circumflex over (x)}k(i)=
In some optional embodiments, step (3) further includes the following steps.
Four square root decomposition operators are obtained through Cholesky decomposition, where the four square root decomposition operators are a system process noise covariance matrix, a system observation noise covariance matrix, a system prediction covariance, and a system estimation covariance.
A first-order difference matrix and a second-order difference matrix of each particle are obtained through the square root decomposition operators.
The one-step predicted value, the composite matrix of the predicted state error mean square matrix, and a composite matrix of a predicted mean square error matrix of each particle are obtained through the first-order difference matrix and the second-order difference matrix of each particle.
A rectangular matrix obtained from the composite matrix of the predicted state error mean square matrix is converted into a Cholesky factor-square matrix of the predicted state error mean square matrix by using QR decomposition, and a predicted error covariance matrix is updated from the Cholesky factor-square matrix of the predicted state error mean square matrix.
The QR decomposition of composite matrix is performed on the composite matrix of the predicted mean square error matrix to obtain a Cholesky factor-square matrix of the predicted mean square error matrix.
A mutual prediction error mean square matrix of a system is obtained from the Cholesky factor-square matrix of the predicted state error mean square matrix and the first-order difference matrix, the Kalman gain is obtained from the mutual prediction error mean square matrix of the system, and the estimated value of the particles is updated by the Kalman gain.
A Cholesky factor of an estimated error covariance matrix is obtained by using the QR decomposition, and the covariance estimation is updated by the Cholesky factor of the estimated error covariance matrix.
In some optional embodiments, step (4) further includes the following steps.
Importance sampling xk(i)˜N({circumflex over (x)}k(i); {circumflex over (P)}k(i)) is performed on the particles by using {circumflex over (x)}k(i) and {circumflex over (P)}k(i) to obtain the second-order difference particle filtering (SCDPF) algorithm.
Standardized importance weight distribution is performed by
State estimation is performed by {circumflex over (x)}k=Σi=1NWkixki, where ŷki is an observation value of each particle at the time k, {circumflex over (x)}k is the state estimated value of the particles at the time k, xki is a state value of each particle at the time k, and N represents a maximum number of particles.
According to another aspect of the disclosure, the disclosure further provides a system of lithium battery SOC estimation based on second-order difference particle filtering. The system includes a second-order model building module, a model parameterization module, a density function generation module, and an SOC estimation module.
The second-order model building module is configured to build a second-order RC battery model of the lithium battery.
The model parameterization module is configured to perform model parameterization by using a least squares algorithm with a forgetting factor according to the second-order RC battery model of the lithium battery.
The density function generation module is configured to generate an importance density function through a second-order central difference Kalman filtering (SCDKF) algorithm.
The SOC estimation module is configured to improve a particle filtering algorithm according to the importance density function to obtain a second-order difference particle filtering (SCDPF) algorithm and perform SOC estimation on a lithium battery by using the SCDPF.
According to another aspect of the disclosure, the disclosure further provides a computer readable storage medium storing a computer program. The computer program performs any step of the method when being executed by a processor.
In general, the above technical solutions provided by the disclosure have the following beneficial effects compared with the related art.
(1) The importance density function is generated through the second-order central difference Kalman filtering (SCDKF) algorithm, and in this way, the particle degradation problem of the PF algorithm may be solved and filtering accuracy may be improved.
(2) SCDKF uses the Stirling interpolation formula to extend the nonlinear model in the form of central difference, so that the Jacobian matrix of the system function does not need to be calculated, and that the calculation complexity is low. Even if the system is discontinuous and non-linear, and there are singularities, the state may still be estimated. In the filtering process, the square root form of the covariance matrix is used to ensure the positive definiteness of the covariance matrix, so good numerical characteristics are provided, and filtering accuracy greater than that of the unscented filtering algorithm.
To better illustrate the goal, technical solutions, and advantages of the disclosure, the following embodiments accompanied with drawings are provided so that the disclosure are further described in detail. It should be understood that the specific embodiments described herein serve to explain the disclosure merely and are not used to limit the disclosure. In addition, the technical features involved in the various embodiments of the disclosure described below can be combined with each other as long as the technical features do not conflict with each other.
In S1, a second-order RC battery model of the lithium battery is built.
where T is a sampling interval, k is sampling time, Rac is ohmic resistance, Rct is charge transfer resistance, Rwb is diffusion resistance, Cct is charge transfer capacitance, Cwb is diffusion capacitance, Uocv is a circuit open circuit voltage, Uct is a voltage at both terminals of a RctCct network, Uwb is a voltage at both terminals of a RwbCwb network, Ut is a voltage at a model output terminal, I is a current at present, τct is a time constant of the RctCct network, τwb is a time constant of the RwbCwb network, τct=RctCct, τwb=RwbCwb, and C is battery capacitance.
A predicted terminal voltage of a battery after discretization is:
where y(k+1) is the predicted terminal voltage of the battery at time k+1.
Formula (1) may be written in the form of the following formula:
T is the sampling time interval, and k is the sampling time. τct and τwb are time constants, τct=RctCct, and τwb=RwbCwb.
A formula for predicting the terminal voltage of the battery model is written in the form of the following formula.
y(k+1)=h(x)=C·xk+D·I(k),
where
D=−Rac, and y(k) is the terminal voltage of the battery model.
In S2, Model parameterization is performed by using a least squares algorithm with a forgetting factor.
To obtain parameters of the battery model, first, the terminal voltage of the battery is written in a least squares form:
y(k)=φ(k)θT+e(k) (3),
where φ(k)=[y(k−1)y(k−2)I(k)I(k−1)I(k−2)], e(k) is a sampling error of a sensor at time k, and a parameter matrix of the battery model is identified as θ=[θ1θ2θ3θ4θ5],
y(k)=UOCV(k)−Ut=θ1y(k−1)+θ2y(k−2)+θ3I(k)+θ4I(k−1)+θ5I(k−2).
The parameter identification is performed on the parameter θ by using the least squares algorithm with a forgetting factor, and the formula is provided as follows:
where λ is the forgetting factor, and {circumflex over (θ)} is the estimated value of θ.
The model parameters Rac, Rct, Rwb, τct, and τwb may be obtained through the following formula:
An MATLAB program is written, the data of the HPPC operating condition obtained through experimental testing is substituted into formula (4) and formula (5), and the parameter identification is performed on a second-order RC equivalent circuit model to obtain the model parameters shown in
In S3, an importance density function is generated through a second-order central difference Kalman filtering (SCDKF) algorithm.
Specific implementation of step S3 is provided as follows.
In S3.1, a first-order difference matrix and a second-order difference matrix are generated: four square root decomposition operators are obtained through Cholesky decomposition:
Q═S
v
×S
v
T
,R=S
w
×S
w
T
,
x
×
x
T
,{circumflex over (P)}=Ŝ
x
T (6),
where Q is a system process noise covariance matrix, R is a system observation noise covariance matrix,
The first-order difference matrix and the second-order difference matrix of each particle (i.e., each state variable x) are obtained through the square root decomposition operators:
where ŝx,j,
In S3.2, state prediction is performed.
The one-step predicted value of the particles is:
where ŝx,p represents a pth column of Ŝx, and sv,p represents the pth column of Sv.
The composite matrix
x
(i)(k)=[(Sx{circumflex over (x)}(1)(k))(i)(Sxv(1)(k))(i)(Sy
A rectangular matrix
A predicted error covariance matrix is updated through the following formula:
k
(i)
=
x
(i)(k)
A composite matrix
y
(i)(k)=[(Sy
Similar to the acquisition of the predicted state error mean square matrix, the QR decomposition of the composite matrix is performed by using formula (13), and the Cholesky factor-square matrix
A predicted output voltage value is:
where nw is a dimension of a process noise vector of the system, k is the sampling time, h(
A mutual prediction error mean square matrix Pxy(i)(k) of the system is:
P
xy
(i)(k)=
The Kalman gain Kk is:
K
k
(i)
=P
xy
(i)(k)[Sy(i)(k)Sy(i)(k)T]−1 (17).
State estimated value {circumflex over (x)}k(i) of the particles is updated as:
{circumflex over (x)}
k
(i)
=
k
(i)
+K
k
(1)(yk−
where yk is the actual terminal voltage value.
Similar to the manner of calculating the square matrices
Ŝ
x
(i)(k)=[
[Q,R]=gr(Ŝx(1)(k)T);Ŝx(i)(k)=R (19).
A covariance estimation {circumflex over (P)}k(i) is updated as:
{circumflex over (P)}
k
(i)
=Ŝ
x
(i)(k)Ŝx(i)(k)T (20).
In S4, a particle filtering algorithm is improved to obtain a second-order difference particle filtering (SCDPF) algorithm, and SOC estimation is performed on a lithium battery by using the SCDPF.
As shown in
In step S4, importance sampling is performed on the particles by using {circumflex over (x)}k(i) and {circumflex over (P)}k(i) obtained in step S3 to obtain the second-order difference particle filtering (SCDPF) algorithm. Importance sampling is performed through formula (21):
x
k
(i)
˜N({circumflex over (x)}k(i);{circumflex over (P)}k(i)) (21).
The importance weights are then standardized through formula (22):
W
k
i=(1/√{square root over (2π)})·e−(y
State estimation is performed through formula (23):
{circumflex over (x)}
k=Σi=1NWkixki (23),
where ŷki is an observation value of each particle at the time k, {circumflex over (x)}k is the state estimated value of the particles at the time k, xki is a state value of each particle at the time k, and N represents a maximum number of particles.
The final SOC value of the battery is:
and if xk is obtained, the SOC is obtained.
The data of the NEDC operating condition is substituted into the SCDPF algorithm for SOC estimation, and comparison graphs of an SOC estimation algorithm at 25° and 0° are obtained. With reference to
With reference to Table 1 and Table 2, Table 1 is the error comparison of the SOC estimation algorithm at 25°. Table 2 is the error comparison of the SOC estimation algorithm at 0°. It can be seen from Table 1 that the SOC estimation error obtained by the EKF algorithm is the largest at 25°, and the maximum error, MAE, RMSE, and MAPE respectively are 0.0458, 0.0202, 0.0237, and 3.478%. The four SOC errors obtained by the UKF algorithm correspond to 0.0277, 0.0162, 0.0176, and 2.779%. The SOC errors obtained by the UPF algorithm correspond to 0.0160, 0.0109, 0.0117, and 1.80%. The SOC errors calculated and obtained by the proposed SCDPF algorithm correspond to 0.0109, 0.0083, 0.0084, and 1.25%. The estimation accuracy of the proposed SCDPF algorithm is significantly improved. It can be seen from Table 2 that the SOC estimation error at 0° is similar to that at 25°. The SOC error obtained by the EKF algorithm is the largest, the accuracy of the UKF algorithm is higher than that of the EKF algorithm, the accuracy of the UPF algorithm is greater than that of the UKF algorithm, and the SOC error obtained by the proposed SCDPF algorithm is the smallest, so the accuracy is significantly improved. However, the SOC estimation error values of all algorithms at 0° are slightly greater than the corresponding SOC error values at 25°.
The method of lithium battery SOC estimation based on second-order difference particle filtering provided by the disclosure not only provides battery SOC estimation but also achieves improved accuracy compared to the EKF algorithm, the UKF algorithm, and the UPF algorithm.
The disclosure further provides a system of lithium battery state of charge (SOC) estimation based on second-order difference particle filtering, the system including:
a second-order model building module, configured to build a second-order RC battery model of the lithium battery;
a model parameterization module, configured to perform model parameterization by using a least squares algorithm with a forgetting factor according to the second-order RC battery model of the lithium battery;
a density function generation module, configured to generate an importance density function through a second-order central difference Kalman filtering (SCDKF) algorithm; and
an SOC estimation module, configured to improve a particle filtering algorithm according to the importance density function to obtain a second-order difference particle filtering (SCDPF) algorithm and perform SOC estimation on a lithium battery by using the SCDPF.
Herein, specific implementation of each of the modules may be found with reference to the description of the method embodiments, and description thereof is not repeated in the embodiments of the disclosure.
The disclosure further provides a computer-readable storage medium provided with a computer program, and the computer program executes the method of lithium battery SOC estimation based on second-order difference particle filtering in the method claims when being executed by a processor.
Note that according to implementation requirements, each step/part described in the disclosure may be further divided into more steps/parts, or two or more steps/parts or partial operations of a step/part may be combined into a new step/part to accomplish the goal of the disclosure.
A person having ordinary skill in the art should be able to easily understand that the above description is only preferred embodiments of the disclosure and is not intended to limit the disclosure. Any modifications, equivalent replacements, and modifications made without departing from the spirit and principles of the disclosure should fall within the protection scope of the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
202011501757.0 | Dec 2020 | CN | national |