1. Introduction
With the increasing global energy crisis and environmental pollution, pollution-free and zero-emission electric vehicles have been developing rapidly [
1]. Lithium-ion batteries are extensively used in power systems of electric vehicles due to their high energy density, low self-discharge rate, and long cycle life. State of charge (SOC) of the lithium-ion battery is an indicator that describes the remaining power of the battery [
2]. It can be used to prevent the battery from being overcharged or overdischarged, predict the driving range of electric vehicles, and reduce the inconsistency of different cells. It is one of the most important parameters of the electric vehicle battery management system (BMS) [
3]. However, the SOC cannot be directly measured, and various factors such as ambient temperature, battery aging levels, and charging/discharging current rate will affect the accuracy of SOC estimation [
4]. Therefore, estimating SOC precisely is a difficult subject that restricts the rapid development of electric vehicles.
Roughly, SOC estimation methods can be divided into three categories: experiment-based method, data-based method, and model-based method. The SOC estimation method based on experiments such as the discharge test method [
5], open-circuit voltage method [
6], and electrochemical impedance spectroscopy method [
7] can obtain accurate SOC estimation. However, these kinds of methods are rarely used on large scale in BMS because of the long test time, high costs, etc. The data-based SOC estimation methods mainly include artificial neural network method [
8], support vector machine method [
9], Gaussian regression method [
10], etc. Through a large amount of data training, these methods obtain the relationship between SOC and battery external measurement variables such as battery terminal voltage, working current, and ambient temperature and then realize the estimation of battery SOC. However, the SOC estimation accuracy of this kind of method is highly dependent on the training data. The model-based SOC estimation method has been tremendously studied because it can realize the closed-loop self-correction of the SOC estimation. The typical representatives of this method are Kalman filter (KF) and particle filter (PF). Compared with KF, PF [
11] does not require the system noise statistics to satisfy Gaussian distribution, but the calculation of this method is complex, which affects its practicability. In order to solve the nonlinear of the battery model, an extended Kalman filter [
12] (EKF) is used for SOC estimation. EKF realizes the linearization of the battery model through Taylor series expansion, which inevitably introduces the unnecessary linearization error. Through the unscented transformation, the unscented Kalman filter (UKF) [
13] directly transmits the mean value and covariance of the state vector nonlinearly, thereby solving the problem of linearization error of the EKF. Moreover, the UKF does not need to calculate the Jacobian matrix, and the computational burden is much lower than EKF. However, when UKF is used to estimate the battery SOC, the filtering failure is often caused by the non-positive error covariance. Reference [
14] uses the square root of the UKF to improve the stability of the SOC estimation. However, due to the roundoff error of the computer, it still cannot guarantee the positive definiteness of the error covariance.
At present, most of the battery SOC estimation methods based on UKF assume that the system process and measurement noise are known and fixed. However, the actual working environment of the battery is relatively complex, and the system noise statistical characteristics are usually difficult to accurately obtain. When existing unknown or inaccurate noise statistics of the system, the traditional unscented Kalman filter may fail to estimate SOC due to the non-positive error covariance of the state vector, and the SOC estimation accuracy is low. Therefore, a new SOC estimation algorithm for lithium-ion batteries based on an improved adaptive unscented Kalman filter is proposed in this paper. In order to realize the adaptive estimation of SOC by the improved adaptive unscented Kalman filter (IAUKF), firstly, the second-order resistor–capacitor (RC) equivalent circuit is selected to characterize the dynamic behaviors of the battery, and the model parameters are identified to obtain the state–space equation and output equation required by the IAUKF to estimate SOC. Secondly, singular value decomposition (SVD) is used to replace the Cholesky decomposition in the traditional UKF, and an improved unscented Kalman filter (IUKF) that can suppress the non-positive definiteness of the error covariance is proposed. Thirdly, IAUKF is proposed by combining IUKF with Sage–Husa adaptive filter. Finally, IAUKF is applied to SOC estimation based on the battery state–space equation and output equation. The IAUKF method is verified by experimental data under the federal urban driving schedule (FUDS) test [
15]. The SOC estimation results are compared with IUKF and traditional UKF.
3. State of Charge Estimation
When the UKF is used to estimate the SOC of the battery, the Cholesky decomposition is employed to factorize the error covariance of the state vector to obtain Sigma sampling points for nonlinear transmission. The Cholesky decomposition requires the error covariance matrix must be positive definite. However, the operating conditions of electric vehicles are complicated and the calculation rounding errors of the computer are unavoidable. As a matter of fact, the error covariance cannot always be guaranteed to be positive definite. If the error covariance is non-positive, the UKF will estimate SOC unsuccessfully. In addition, the process noise and measurement noise of the system should be set in advance when using UKF to estimate battery SOC. Usually, the system process noise and measurement noise are set to a constant value. If the system noise characteristics are known before the SOC estimation and the preset values of process noise and measurement noise are consistent with the actual noise statistical characteristics, UKF can estimate SOC accurately. However, in practical applications, the system noise statistics are usually unknown or inaccurate, sometimes even time varying. Additionally, if the operating mode and working environment of electric vehicles have changed, then the preset values of the system noise will no longer match the actual noise statistics. It will cause large SOC estimation errors and even lead to filtering failure. Therefore, for the sake of reducing the influence of system noise on SOC estimation accuracy, it is necessary to adaptively estimate system noise statistics in the process of SOC estimation. In order to address the two problems mentioned above when estimating SOC, the IAUKF is proposed in this paper. Additionally, based on the state–space equation and output equation of the lithium-ion battery obtained from
Section 2.1,
Section 2.2 and
Section 2.3, the IAUKF is applied for battery SOC estimation.
3.1. Singular Value Decomposition
The singular value decomposition (SVD), proposed by Beltrami and Jordan, is a matrix orthogonalization decomposition method with good stability and accuracy used on a computer. Compared with Cholesky factorization, when the matrix to be factorized is positive definite, the two have the same decomposition results. When the matrix to be factorized is non-positive definite, the numerical stability of SVD is better than Cholesky factorization.
Providing P is an m × n matrix to be factorized over the real number field, where m ≥ n, then the SVD of P is
where U denotes a square matrix of degree m and its column vector is a left singular vector of matrix P;
is an m × n semidefinite diagonal matrix; G is a square matrix of degree n, and its column vector is the right singular vector of matrix P; S = diag (s
1, s
2, … , s
r) is a diagonal matrix, which is composed of singular values of matrix P; and r is the rank of matrix P, and s
1 ≥ s
2 ≥ … ≥ s
r > 0.
3.2. Description of the IUKF
The numerical stability of SVD is much better than Cholesky factor decomposition. Therefore, in order to improve the stability of the UKF for SOC estimation, the Cholesky factor decomposition in traditional UKF is replaced by SVD in this paper, and then the IUKF is proposed.
For a discrete-time nonlinear system
where f and g are the nonlinear process and measurement models, respectively.
The detailed steps of IUKF can be summarized as follows:
- (1)
Initialize the mean value
of the system state variable x
0, the error covariance P
0, and the weighted coefficient.
where E(·) denotes the expectation mean value.
where
and
are mean weighted factor and covariance weighted factor, respectively; n is the dimension of the state vector; β is a non-negative weighted coefficient, which restrains the error caused by the higher-order term, and it is set to 2 for Gaussian random variables; α is a scaling parameter, which determines the distribution of Sigma sampling points around the state variable, its range is 1 × 10
−4~1; λ is a composite coefficient, which can be expressed as
where κ is another scaling parameter that is usually set to 3 − n.
- (2)
Calculate Sigma sampling points of the state variable at time step k − 1 using SVD.
where x
i,k−1 denotes the Sigma sampling point; the symbol “^” denotes the estimated value and
is the optimal estimate of the state variable at time step k − 1;
is the error covariance at time step k − 1; and (·)
i denotes the ith column of the matrix.
- (3)
Time update for the mean and covariance of the state variable: use 2n + 1 Sigma sampling points obtained in step (2) to calculate the predicted mean and error covariance of the state variable in time step k.
where k|k − 1 denotes the predicted value of the variable at time step k calculated based on the data at time step k − 1, and the intermediate variable
is defined as follows:
- (4)
Use SVD again to obtain new Sigma sampling points based on the predicted mean and error covariance of the state variable obtained in step (3).
where
denotes the regained Sigma sampling point, and the symbol “-” is used to distinguish the Sigma points obtained here from those obtained in step (2).
- (5)
Time update for the mean of the measurement variable: calculate the predicted values of the measurement variable at time step k based on regained Sigma points in step (4).
- (6)
Calculate the IUKF gain matrix K
k.
where
where the intermediate variable
is defined as follows:
- (7)
Measurement correction of the state variable: calculate the corrected state variable estimated value and the optimal covariance matrix at time step k.
3.3. Description of Sage–Husa Adaptive Filter
The Sage–Husa adaptive filter is widely used in noise estimation due to the quality of simple principles and good practicability. Through the time-varying noise estimator, the Sage–Husa adaptive filter uses the measured data to realize the real-time estimation and correction of the system process and measurement noise statistics. Therefore, it can decrease the system model error, suppress the filter divergence and improve the filtering accuracy [
24]. The estimation steps of the system process and measurement noise using a Sage–Husa adaptive filter can be summarized as follows [
25,
26]:
- (1)
Calculate the estimated mean value of the system process noise.
where d
k can be expressed as
where b is the forgetting factor, and its range is usually 0.95~1.
- (2)
Calculate the estimated covariance value of the system process noise.
where e
k is a residual, which can be expressed as
- (3)
Calculate the estimated mean value of the system measurement noise.
- (4)
Calculate the estimated covariance value of the system measurement noise.
For a stable system, when using the Sage–Husa adaptive filter for noise estimation, the estimated state and measurement covariance will converge to a very small value or even zero when the filtering process begins to converge [
27]. Therefore, we can attain
Then, the Sage–Husa adaptive filter can be further simplified as follows:
3.4. Estimate SOC Using IAUKF
As a matter of fact, the adaptive unscented Kalman filter (AUKF) can be formed by directly combining the traditional UKF with the Sage–Husa adaptive filter [
28]. When the AUKF is applied to estimate SOC, the system noise statistics can be adaptively estimated through the Sage–Husa adaptive filter, thus reducing the influence of system noise on SOC estimation accuracy. However, due to the intrinsic characteristic of the traditional UKF, the error covariance is also required to be positive definite in the process of SOC estimation with AUKF. In addition, since the AUKF adaptively updates the system noise statistics while estimating SOC, the increase of computational complexity will further aggravate the uncertainty of error covariance in the calculation process, and it becomes more difficult to guarantee the error covariance to be positive definite. In order to overcome the shortcomings of AUKF, the IUKF is used to combine with the Sage–Husa adaptive filter, then the IAUKF is proposed in this paper. The only difference between IAUKF and AUKF is that the IAUKF replaces Cholesky factorization in AUKF with SVD. Depending on the outstanding numerical decomposition characteristic of SVD, the IAUKF can improve the stability of SOC estimation and the advantages of AUKF are retained as well. The main steps to estimate battery SOC using IAUKF are shown in
Figure 3.
Firstly, based on the second-order RC equivalent circuit model of the battery, the state–space equation and output equation required for IAUKF to estimate SOC are obtained. The fitted polynomial of the OCV–SOC relationship is obtained through OCV–SOC mapping tests. The parameters of the battery model are identified by the offline recursive least squares method. The state–space equation and output equation are transformed into the form of Equation (11). Secondly, some system parameters are initialized, including the initial value of the battery state variable, the initial value P0 of error covariance, the initial mean value and covariance value of process noise, the initial mean value , and covariance value of measurement noise. Additionally, the weighted coefficients and are also calculated. Thirdly, according to IAUKF calculation steps, the optimal estimated value of system state variable at time step k is obtained through Equations (15)–(27). The estimated SOC at time step k can be separated from the state variable optimal estimated value . It should be noted that when estimating the SOC of the battery at time step k, it is necessary to replace in Equation (17), in Equation (18), in Equation (22) and in Equation (24) with , , and , which are calculated based on the principle of Equation (35) using the relevant parameters at time step k − 1. Fourthly, based on the relevant parameters at the time step k, , , and are calculated through Equation (35) for the SOC estimation at time step k + 1; finally, determine whether the battery discharges to the lower cutoff voltage. If the battery has discharged to the lower cutoff voltage, then, end the SOC estimation. Otherwise, continue the SOC estimation.
4. Experimental Simulation and Verification
In practical applications, the operating conditions of electric vehicles are complex, and the working current of the lithium-ion battery changes dramatically. In order to verify the effectiveness of IAUKF, based on the state–space and output equations of Samsung 18,650 power lithium-ion battery obtained from
Section 2.1,
Section 2.2 and
Section 2.3, the proposed estimation method is verified under sophisticated FUDS conditions. At the same time, the SOC estimated by IAUKF is compared with that estimated by IUKF and traditional UKF. The theoretical reference value of SOC is obtained by the AH counting method. The measured working current I
c and terminal voltage U
L curves of the lithium-ion battery under the FUDS test are shown in
Figure 4 and
Figure 5. In
Figure 4, the plus value represents the discharging current, and the minus value represents the charging current.
When the traditional UKF, IUKF, and IAUKF are applied to estimate SOC, the selection of initial values of the three methods will pose a great impact on estimation results. Generally, the initial values of the UKF and its variants are tuned through a certain number of trial-and-error experiments based on experience because the noise characteristics of the system are difficult to accurately obtain. In order to compare the behaviors of different battery models effectively and avoid the interference of initial values on experimental results, particle swarm optimization is used creatively to calculate the initial values of EKF in the literature [
29]. Since the main purpose of this paper is to study how to improve the stability of SOC estimation and reduce the influence of system noise on SOC estimation accuracy, very accurate initial values are not required. Furthermore, for reducing the influence of other factors on the experimental results and realizing the effective comparison of the three algorithms for SOC estimation, the initial values of the traditional UKF, IUKF and IAUKF are set the same in this paper. In other words, the stability and accuracy of SOC estimation among the three methods are analyzed and compared under the same initial conditions. Therefore, in this paper, the traditional UKF is taken as the test object and the initial values required by the three methods are obtained through an appropriate number of trial-and-error experiments. The preset values of the three methods are
= [0.8 0 0]
T, P
0 = 10
−1 × E
3×3,
,
,
,
, where E
3×3 denotes the unit matrix of degree 3.
The SOC estimation results of different methods and the SOC theoretical reference result are shown in
Figure 6. As can be seen from
Figure 6, IAUKF, IUKF, and UKF can estimate the SOC successfully, and the trend of SOC estimation curves are all consistent with the SOC theoretical reference curve. However, compared with the other two approaches, the SOC estimation result obtained by IAUKF is much closer to the theoretical reference curve.
The error curves between the estimated SOC and reference SOC are shown in
Figure 7. At the early state of SOC estimation, the estimation error of IAUKF for SOC is higher than IUKF and UKF. The reason is that during this period, the Sage–Husa adaptive filter is dynamically estimating the actual noise statistics of the system, and the estimated system noise statistics have not matched the actual noise statistics yet. As for the IUKF and UKF, the parameters of the noise statistics are preset, and the preset values are consistent with the actual noise statistical characteristics after the battery starts to work. Therefore, these two methods can obtain accurate SOC estimation, which is superior to IAUKF. About 300 s later, as the discharge progresses, the actual noise statistics changes, and the preset noise values cannot reflect the noise statistical characteristics any longer. As a result, the SOC estimation error curves of the IUKF and UKF fluctuate up and down dramatically. However, the IAUKF can estimate and correct the actual noise statistics of the system in real time through the Sage–Husa adaptive filter; thus, IAUKF can still obtain accurate SOC estimates, and the fluctuation of the SOC estimation error curve is significantly slighter than IUKF and UKF. Additionally, it is not difficult to find that the difference in SOC estimation accuracy between IUKF and traditional UKF is very small. This indicates that replacing the Cholesky factor decomposition in traditional UKF with SVD will not decrease the SOC estimation accuracy. Furthermore, as illustrated in
Figure 7, we can also conclude that the estimation error of the three algorithms for SOC all exist with some certain offsets, namely, the estimation error curves of the three algorithms for SOC do not fluctuate around “SOC error = 0.” The reason for this phenomenon may be that when the offline least recursive squares method is used to identify the parameters of the battery model, the input noise of the system that can cause biased identification of the model parameters has not been taken into consideration. Consequently, there is a certain error between the identified battery model parameters and the real values [
30]. The existence of this error reduces the accuracy of the battery model, which, in turn, leads to a certain deviation of the SOC estimation errors of the three methods.
In order to compare the accuracy of the three algorithms for SOC estimation quantitatively, the maximum absolute error (MAE) and root-mean-square error (RMSE) are employed in this paper to evaluate the three estimation methods. The smaller the MAE and RMSE are, the higher the SOC estimation accuracy is [
31]. MAE and RMSE are calculated as follows:
where k is the step with a sample interval; S
k denotes the theoretical value of SOC;
denotes the estimated value of SOC; L is the number of samples; |·| denotes the absolute value; and max (·) represents the maximum value of all samples.
The comparisons of MAE, RMSE of IAUKF, IUKF, and UKF under the FUDS test are shown in
Table 2.
It can be inferred from
Table 2 that the MAE and RMSE of the IAUKF are smaller than IUKF and UKF, indicating that the accuracy of IAUKF for SOC estimation is better than the other two estimation methods. Considering the character length limits of the computer, the MAE and RMSE of the IUKF and traditional UKF are the same, which also suggests that the IUKF and UKF can achieve almost the same SOC estimation accuracy.
To verify the suppression ability of IAUKF on the non-positive definiteness of error covariance further, the initial value of error covariance of the IAUKF, IUKF, and UKF are set as negative definite in this paper, namely, P
0 = −10
−1 × E
3×3, and the other initial parameters are unchanged. In this case, the UKF cannot carry out the Cholesky factor decomposition due to the non-positive error covariance, which leads to the failure of SOC estimation. However, the IUKF and IAUKF can still complete the SOC estimation. When the error covariance is negative definite and positive definite, the SOC estimation error comparative curves of the IUKF are shown in
Figure 8, and the SOC estimation error comparative curves of the IAUKF are shown in
Figure 9.
As can be observed from
Figure 8 and
Figure 9, although the initial error covariance is negative definite, the IUKF can still achieve the same accurate SOC estimation since its initial error covariance is positive definite, and so does the IAUKF. It can be concluded that compared with UKF, because of the excellent numerical stability of SVD, the IUKF can suppress the non-positive definiteness of the error covariance and improve the stability of SOC estimation. Additionally, this characteristic has been effectively extended in IAUKF.
5. Conclusions
The SOC of the lithium-ion battery is the core parameter of BMS. Accurate SOC estimation is the premise to realize the functions of BMS and ensure the safe operation of electric vehicles. However, the traditional UKF fails to estimate SOC due to the non-positive error covariance of the state variable and the SOC estimation accuracy is not high because of the unknown or inaccurate system noise statistics. In this paper, a lithium-ion battery SOC estimation method based on an improved adaptive unscented Kalman filter is proposed to solve this problem. Experiments have been carried out to verify the effectiveness of the IAUKF by comparing it with traditional UKF and IUKF in terms of SOC estimation stability and accuracy. Based on the experimental results, the main concluding remarks can be made below:
- (1)
Replacing the Cholesky decomposition in traditional UKF with SVD will not decrease the SOC estimation accuracy, and the IUKF and UKF can achieve almost the same SOC estimation results. The MAE of the traditional UKF and IUKF both are 2.4%, and the RMSE of the two methods both are 0.0094 when the character length limits of the computer are taken into consideration.
- (2)
With the fantastic numerical stability of SVD, the IUKF can suppress the non-positive definiteness of the error covariance, so as to improve the stability of SOC estimation, and this characteristic can also be found in IAUKF, namely, whether the initial error covariance is positive definite or negative definite, both the IUKF and IAUKF can still complete the SOC estimation of the battery. However, when the initial error covariance is negative definite, the traditional UKF fails to estimate the SOC because the Cholesky decomposition cannot be carried out any longer.
- (3)
The IAUKF is formed by combining IUKF with the Sage–Husa adaptive filter. With the help of the Sage–Husa adaptive filter, the IAUKF can realize the adaptive estimation of the system process and measurement noise during the process of SOC estimation.
- (4)
The influence of the unknown or inaccurate system noise statistics on SOC estimation precision can be reduced by the IAUKF; thereby the SOC estimation accuracy can be improved. The MAE of the IAUKF is 1.92%, and the RMSE is 0.005; the two values are all smaller than those of IUKF and traditional UKF.
Although the IAUKF proposed in this paper improves the stability and accuracy of SOC estimation, the IAUKF still has the following limitations when applied in practical applications: firstly, in the actual operation of electric vehicles, the battery model parameters are not fixed, and complex operating conditions may lead to the changes in battery model parameters. Secondly, when the offline recursive least squares method is used to identify the battery model parameters, the identified parameters will deviate from the true values if the input noise is not compensated. Additionally, inaccurate parameters will reduce the accuracy of the battery model, which leads to an increase in SOC estimation error. Therefore, more attention will be focused on the method that can accurately identify the battery model parameters in real time by the authors, then combine the method with the IAUKF proposed in this paper to improve the estimation accuracy of SOC further.