Next Article in Journal
Design of Hierarchical Nickel-Cobalt Phosphide/Nickel Oxide with Tunable Electronic Structure and Strong Chemical Interface for Advanced Supercapacitors
Next Article in Special Issue
Lithium-Ion Supercapacitors and Batteries for Off-Grid PV Applications: Lifetime and Sizing
Previous Article in Journal
Aging and Homogenized Mechanical Character of Quasi-Statically Charged Gr-Si and NMC Based Electrodes Using Damage Material Modeling
Previous Article in Special Issue
Assessment of Health Indicators to Detect the Aging State of Commercial Second-Life Lithium-Ion Battery Cells through Basic Electrochemical Cycling
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Extended Kalman Filter Design for State-of-Charge Estimation Based on Variational Approach

College of Intelligent Science and Control Engineering, Jinling Institute of Technology, Nanjing 211169, China
*
Authors to whom correspondence should be addressed.
Batteries 2023, 9(12), 583; https://doi.org/10.3390/batteries9120583
Submission received: 30 October 2023 / Revised: 24 November 2023 / Accepted: 25 November 2023 / Published: 12 December 2023
(This article belongs to the Special Issue Advances in Battery Status Estimation and Prediction)

Abstract

:
State of charge (SOC) is a very important variable for using batteries safely and reliably. To improve the accuracy of SOC estimation, a novel variational extended Kalman filter (EKF) technique based on least square error method is herein provided by establishing a second-order equivalent circuit model for the battery. It was found that when SOC decreased, resistance polarization occurred in the electrochemical model, and the parameters in the equivalent RC model varied. To decrease the modeling error in the equivalent circuit model, the system parameters were identified online depending on the SOC’s estimated result. Through the SOC-estimation process, the variation theorem was introduced, which enabled the system parameters to track the real situations based on the output measured. The experiment results reveal the comparison of the SOC-estimation results of the variational EKF algorithm, the traditional EKF algorithm, the recursive least square (RLS) EKF algorithm, and the forgotten factor recursive least square (FFRLS) EKF algorithm based on different indices, including the mean square error (MSE) and the mean absolute error (MAE). The variational EKF algorithm provided in this paper has higher estimation accuracy and robustness than the traditional EKF, which verifies the superiority and effectiveness of the proposed method.

1. Introduction

In recent decades, with continuous climate change and extreme weather occurrences, environmental deterioration and the energy crisis have become some of the key problems to overcome [1]. To deal with such problems, strict policies for regulations of fuel consumption and CO2 emission have been released throughout the world [2]. Therefore, developing sustainable clean energy is a global strategic policy. Moreover, the goal of carbon neutrality has become more and more popular as well [3,4]. Automotive manufacturers are focusing on developing electric vehicles due to their energy savings and pollution reduction for the environment, which offers great advantages and is a potential development trend compared to traditional cars [5,6]. As a conclusion, electric vehicles constitute a major development direction for automotive technology in the future [7,8]. To ensure that electric vehicles are utilized safely and reliably, a battery management system (BMS) is required for real-time battery-state monitoring. In the BMS, state of charge (SOC) is one of the core parameters to monitor [9]. Thus, obtaining an accurate real-time estimation value of the SOC is a significant goal for the future development of electric vehicles.
The SOC denotes the remaining capacity percentage of the battery, which is a key parameter in battery-state-estimation process. Many approaches have been studied by researchers to estimate the SOC, such as the open-circuit voltage (OCV) approach [10], the Coulomb counting approach [11], the model-based approach [12,13], and the data-driven approach [14]. The fundamental principle of the OCV approach depends on the nonlinear correlation between OCV and SOC, in which OCV is able to be established by a high-order function of SOC [10]. However, the drawback of this approach is that the lithium-ion battery must rest for a period of time before OCV measurements can be taken. Compared to the OCV approach, the Coulomb counting method is simple in implementation due to the convenient execution: Researchers only need to integrate the charging and discharging current of the battery [11]. Nevertheless, the measurement error is difficult to eliminate in the current integration process. The model-driven method is based on the establishment of the electrochemical model (EM) and the equivalent circuit model (ECM). It is capable of describing the internal principle of lithium-ion batteries based on the electrochemical characteristics in the EM [12]. For the ECM, the model is combined with the resistance, capacitance, and voltage source so that the dynamic process inside the lithium-ion batteries is simulated within different forms of the circuit [13]. The model-driven methods are based on basic theorems of the circuit, and the robustness is exhibited even with imprecise SOC initialization values and possible measurement noise. However, the model accuracy largely depends on the underlying battery model. The data-driven method is regarded as a “black box” mathematical model rather than a practical model [14]. Its results depend greatly on the quality of the input history data, whether the data are optimally trained, and whether the hyperparameters are suitably selected.
Considering the robustness of the model-driven methods, the Kalman filter (KF), which is known as the most common state-estimation technique, is utilized to estimate the optimal posterior SOC based on ECM [15,16]. Based on the KF framework, the extended Kalman filter (EKF) linearizes the evolution function and measurement function with first-order Taylor expansion to estimate the state for a nonlinear system [17]. Sun et al. proposed a new variational Bayesian (VB)-based adaptive extended Kalman filter (VBAEKF) for master–slave autonomous underwater vehicles (AUV) to deal with the unknown state noises and uncertain measurement noises encountered during underwater cooperative navigation [18]. Duan et al. utilized an improved EKF method with correlated entropy loss to improve the SOC-estimation accuracy for non-Gaussian cases [19]. Zhu et al. proposed a fractional-order adaptive extended Kalman filter (FO-AEKF) for SOC estimation, which can recursively update the noise covariance [20]. In reference [21], Paul et al. provided an optimized long short-term memory–weighted fading extended Kalman filtering (LSTM-WFEKF) model with the consideration of a temperature-adaptation model for SOC estimation, which introduced adaptive weighing and fading factors to correct and optimize the SOC value for different temperature variations under complex working conditions. Moreover, the unscented Kalman filter (UKF) based on unscented transform introduced sigma points that have same mean and variance as the state for nonlinear estimation [22]. With the help of radial basis function (RBF) networks and square-root UKF technique, Gholizade-Narm et al. provided a method for estimating the SOC of lithium-ion batteries [23]. When the nonlinear system is complex, the particle filter (PF) utilizes a large amount of particles to approximate the probability density function (PDF) of the state with the aim of estimating the updated state [24]. Accordingly, the UKF and PF have a more accurate estimation performance, but the implementation is more complex; the EKF is one of the simplest estimation techniques to be realized in many of the studies mentioned above, although the estimation is not as precise as other estimation methods in the Kalman framework. When the modelling parameters are accurate enough, the estimation performance of EKF and improved EKF algorithms are precise as well. Accordingly, the variation idea is proposed to solve the coupling problem of the state’s and system’s uncertainty for compensation. When the system is more certain, the estimated state is more accurate, and vice versa. The variation idea is employed in the variational Bayesian estimation, by which the state and the system parameters are estimated simultaneously by fixing a portion of the variables within the state and the system parameters [25]. As a consequence, the variation idea is an iteration process with heavy computational pressure to arrive at an accurate estimation performance within the Bayesian framework.
In this study, the model was established as a second-order RC model, and the parameters were identified based on the least square error technique. After the parameters were determined, the variational EKF algorithm was utilized, which optimizes the model accuracy and the estimation performance with simultaneous iterations. The main contribution of this study is the variational EKF algorithm in the SOC estimation for batteries. With the determination of the unique characteristics of the RC model in SOC estimation, the feasibility of the combination for the variation idea and the EKF algorithm is proposed. The variational EKF algorithm takes the model system parameters’ variations into consideration and estimates the SOC reasonably. The robustness and non-fragility of the algorithm is stronger than the traditional EKF algorithm due to the variational iteration.
The remaining sections of this paper are organized as following: Section 2 introduces the mathematical analysis for the architecture of the equivalent circuit model and the working principle of the traditional EKF algorithm in the SOC-estimation process. Section 3 proposes the flowchart for SOC estimation and provides the descriptions of the variational EKF algorithm. Section 4 describes the experimental validation of the study, including the experimental test platform, the experimental test procedure, the SOC-estimation results, and the performance comparison for the variational EKF, the traditional EKF, the RLS-EKF, the FFRLS-EKF algorithms based on the second-order RC models. Section 5 gives the conclusion of this paper.

2. Mathematical Analysis

2.1. Battery Modelling

In general, the battery can be equivalently modeled as RC combinations. Considering that the battery-equivalent model is more accurate with more RC and results in heavier computational pressure, a suitable RC selection can balance the computational efficiency and estimation accuracy. In Figure 1, the second-order RC model as utilized is shown [26].
In Figure 1, the battery state of charge (SOC) is defined as the ratio of the residual capacity to the nominal capacity. In practical applications, the most commonly used method to estimate SOC is the Coulomb counting technique, which accumulates the charge transferred in or out of the battery to determine the change of the SOC. Thus, the initial SOC must be precise for SOC estimation in this method. In Equation (1), the SOC at time t is denoted as follows [27]:
S O C ( t ) = S O C ( t 0 ) 1 Q 0 t 0 t η I ( t ) d t
where S O C ( t 0 ) is the SOC value at time t 0 , Q 0 is the nominal capacity, η is the Coulomb efficiency, and I ( t ) denotes the time-varying current. Then, with the help of Kirchhoff’s law of the circuit, the second-order RC model can be obtained by the following Equations (2)–(4):
U ˙ 1 ( t ) = 1 R 1 C 1 U 1 ( t ) + 1 C 1 I ( t )
U ˙ 2 ( t ) = 1 R 2 C 2 U 2 ( t ) + 1 C 2 I ( t )
U L ( t ) = U O C ( t ) U 1 ( t ) U 2 ( t ) R 0 I ( t )
In Equations (2) and (3), U 1 ( t ) and U 2 ( t ) denote the terminal voltages of two RC circuit loops, respectively. U O C ( t ) is the measured OCV, which establishes the relationship with SOC by the polynomial of the OCV-SOC fitting curve, as in Figure 2.
According to the differential Equations (2) and (3), U 1 ( t ) and U 2 ( t ) are solved. Then, the discrete state space based on Equations (2)–(4) is proposed as the state space model system (5).
{ x ( k + 1 ) = A x ( k ) + B u ( k ) + w ( k ) y ( k ) = C x ( k ) + D u ( k ) + U O C ( k ) + v ( k )
In system (5), the state variable x ( k ) = [ S O C ( k ) U 1 ( k ) U 2 ( k ) ] T , the input u ( k ) = I ( k ) , and the outputs y ( k ) = U L ( k ) . w ( k ) and v ( k ) are the Gaussian system noise, and measurement noise with zero mean and the variance are Q and R , respectively. U O C ( k ) is the discrete form of U O C ( t ) . The state space parameters are given as follows:
A = [ 1 0 0 0 e Δ t R 1 C 1 0 0 0 e Δ t R 2 C 2 ] ,   B = [ η Q 0 R 1 ( 1 e Δ t R 1 C 1 ) R 2 ( 1 e Δ t R 2 C 2 ) ] T , C = [ 0 1 1 ]   and   D = R 0
where Δ t = 1 is the sampling rate of the discrete system.
In the system (5), the parameters are written as the function of the second-order RC model parameters R 1 , C 1 , R 2 , C 2 , and R 0 given in Figure 1. These parameters are identified based on the hybrid pulse power characteristic (HPPC) test of the battery. The time-varying battery discharge voltage in the HPPC test is given in Figure 3 [26]. In the HPPC test procedure, the voltage of the battery is 4.2 V in the beginning, which means the battery SOC is 100% and at full charge. During the HPPC process, the battery is discharged by a 1 C current for 6 min at 25 °C in the discharging step; then, the battery is preserved for 60 min in the preserving step. Therefore, the time range of the measured voltage curve of the battery is 66 min. The discharging and preserving step in the HPPC test process needs to be repeated ten times. The battery SOC is reduced by 10% after each repetition. In the end, the battery SOC is reduced to 0, which means the battery runs out of power.
To explain in detail, Figure 4 provides a pulse of the HPPC test in Figure 3. In Figure 4 [26], time A is the beginning of discharging, and time C is the end of discharging. In the figure, the voltage decreases sharply from time A to time B and the voltage decreasing speed significantly slows down from time B to time C. Simultaneously, it can be found that the voltage decreases at time A and increases at time C; time C to time E denotes the battery preserving time after discharging with zero current I ( 0 ) = 0 . The voltage increases rapidly from time C to time D and voltage increasing speed significantly slows down from time D to time E. Consequently, the internal resistance R 0 can be determined by the voltage variation as follows:
R 0 = ( U A U B ) + ( U D U C ) 2 I
where U A , U B , U C , and U D are the voltages at times A, B, C, and D in Figure 4, respectively. The dynamic characteristics of U 1 ( t ) and U 2 ( t ) of the battery are given as follows:
U 1 ( t ) = U 1 ( 0 ) e t R 1 C 1 + I R 1 ( 1 e t R 1 C 1 )
U 2 ( t ) = U 2 ( 0 ) e t R 2 C 2 + I R 2 ( 1 e t R 2 C 2 )
Then, the output based on zero input I ( t ) = 0 can be written by substituting Equations (7) and (8) in the state space model (5) through the stabilization process in Figure 4 from time C to time D as follows:
U L ( t ) = U O C U 1 ( t ) U 2 ( t )   = U O C U 1 ( 0 ) e t R 1 C 1 U 2 ( 0 ) e t R 2 C 2
The curve fitting tool in MATLAB2022a software was utilized to perform custom equation fitting of the polarization voltage based on the following equation:
f ( t ) = a 0 a 1 e b 1 t a 2 e b 2 t
Referring to Equations (8) and (9), the parameters can be obtained as follows:
U O C = a 0 ,   U 1 ( 0 ) = a 1 ,   R 1 C 1 = 1 b 1 ,   U 2 ( 0 ) = a 2   and   R 2 C 2 = 1 b 2
Before time A in Figure 4, the battery has been preserved enough times so that the polarization and concentration effect is nearly zero. From time A to time C in Figure 4, the battery is discharging with invariable current. With the substitution t = 0 into Equations (7) and (8), it is easy to find U 1 ( 0 ) = I R 1 and U 2 ( 0 ) = I R 2 . Then, the parameters in the second-order RC model can be identified as follows:
R 1 = a 1 I ,   C 1 = I a 1 b 1 ,   R 2 = a 2 I   and   C 2 = I a 2 b 2
To determine the relationship between U O C ( t ) and SOC shown in Figure 2, which are obtained by the measurement of the battery discharge voltage in the HPPC test from Figure 3, the MATLAB curve fitting tool was utilized, and its fitting polynomial is given as follows:
U O C = 12.6667 S O C 6 38.7423 S O C 5 + 40.1910 S O C 4   12.2887 S O C 3 4.1345 S O C 2 + 3.3490 S O C + 3.0330
From Figure 3, it is obvious that the parameters in the second-order RC model are variables with different SOCs based on Equations (6) and (12). Similarly, the fitting polynomial for the second-order RC model parameters can be derived as follows:
R 0 = 5.5499 S O C 6 24.4678 S O C 5 + 38.0322 S O C 4   25.2196 S O C 3 + 5.6661 S O C 2 + 0.9635 S O C 0.3488
R 1 = 24.1999 S O C 6 87.3629 S O C 5 + 125.7313 S O C 4   91.9119 S O C 3 + 35.8142 S O C 2 7.0041 S O C + 0.5513
C 1 = 7.1098 × 10 5 S O C 6 2.6085 × 10 6 S O C 5 + 3.7925 × 10 6 S O C 4   2.7592 × 10 6 S O C 3 + 1.0443 × 10 6 S O C 2 1.9416 × 10 5 S O C + 1.5661 × 10 4
R 2 = 26.6129 S O C 6 + 104.0744 S O C 5 158.7476 S O C 4   + 118.6184 S O C 3 43.8665 S O C 2 + 7.0261 S O C 0.2359
C 2 = 5.6107 × 10 5 S O C 6 + 1.5432 × 10 6 S O C 5 1.5337 × 10 6 S O C 4   + 7.0519 × 10 5 S O C 3 2.0315 × 10 5 S O C 2 + 5.4359 × 10 4 S O C + 640.8538
According to Equations (13)–(18), it is obvious that the parameters A , B , C , and D in the state space model (5) vary depending on the state variable SOC, which results in the deficiency of the traditional recursive state-estimation algorithms.

2.2. Extended Kalman Filter

Previously, in Section 2.1, the system parameters in the state space model (5) were shown varying depending on the state variable SOC. In this way, it is clear that the system (5) is nonlinear, and the estimation error of the traditional Kalman filter is unneglectable because the Kalman filter only determines the best expectation for the estimation based on the linear system and white Gaussian noise [15]. When it comes to nonlinear systems, the Kalman filter is unable to provide the optimal estimation result.
In this way, the extended Kalman filter (EKF) is proposed to deal with such estimation problems in a nonlinear system, which is an improvement of the traditional Kalman filter algorithm. The EKF algorithm for a discrete system is given as follows:
{ x ( k + 1 ) = f ( x ( k ) , u ( k ) ) + w ( k ) y ( k ) = g ( x ( k ) , u ( k ) ) + v ( k )
where f ( x ( k ) , u ( k ) ) and g ( x ( k ) , u ( k ) ) are continuously differentiable nonlinear functions in Equation (19).
The EKF introduces the first-order Taylor expansion for the nonlinearities of x ( k ) , which is given as follows:
{ x ( k + 1 ) = A ˜ ( x ( k | k ) ) x ( k ) + B ˜ ( x ( k | k ) ) u ( k ) + w ( k ) y ( k ) = C ˜ ( x ( k | k ) ) x ( k ) + D ˜ ( x ( k | k ) ) u ( k ) + v ( k )
where x ( k | k ) is the posterior estimation of state x at time k , and the system parameters are differentiated as A ˜ ( x ( k | k ) ) = d f d x | x = x ( k | k ) , B ˜ ( x ( k | k ) ) = d f d u | x = x ( k | k ) , C ˜ ( x ( k | k ) ) = d g d x | x = x ( k | k ) , and D ˜ ( x ( k | k ) ) = d g d u | x = x ( k | k ) .
Then, the process of the recursive Traditional EKF algorithm is provided as Algorithm 1 in the following:
Algorithm 1 Traditional EKF Algorithm
Step   1 :   Initializing   the   initial   state   x ( 0 )   and   the   variance   P ( 0 ) .
Step 2: Predicting the one step prior state prediction and variance.
x ( k + 1 | k ) = f ( x ( k | k ) , u ( k ) )
P ( k + 1 | k ) = A ˜ ( k | k ) P ( k | k ) A ˜ ( k | k ) + Q
Step 3: Computing the filter gain.
K ( k + 1 ) = P ( k + 1 | k ) C ˜ T ( x ( k + 1 | k ) )   × [ C ˜ ( x ( k + 1 | k ) ) P ( k + 1 | k ) C ˜ ( x ( k + 1 | k ) ) + R ] 1
Step 4: Calculating the one step posterior state estimation and variance
x ( k + 1 | k + 1 ) = x ( k + 1 | k ) + K ( k + 1 ) [ y ( k ) g ( x ( k ) , u ( k ) ) ]
P ( k + 1 | k + 1 ) = [ I K ( k + 1 ) C ˜ ( x ( k + 1 | k ) ) ] P ( k + 1 | k )
Step 5: Repeating Step 2 to Step 4.
The traditional EKF algorithm may cause divergence in the filtering process mainly due to the unreasonable mathematical model. The linearized parameters are derived based on the Jacobian of the nonlinear function. In this way, it is clear that the model only satisfies first-order accuracy, which means that once the system’s nonlinearity come to the higher order, the approximated linearized system is unable to follow the original nonlinear system well. Therefore, when the estimation result of the EKF algorithm is inaccurate, and the approximated linearized system is unable to approximate the original nonlinear system, especially with strong nonlinearity.

3. SOC Estimation Based on Variational Extended Kalman Filter Algorithm

To compensate the drawbacks of EKF as mentioned above, the idea of parameter variation was introduced. With the introduction of such an idea, the traditional EKF was improved by recursive iteration for the linearized parameters depending on the posterior estimation of SOC, with estimation of the SOC depending on the parameters obtained in the previous iteration.
In the variational EKF algorithm, the posterior estimation result of the SOC is obtained based on the EKF algorithm depending on the system parameters determined by the estimated SOC in the previous iteration. Then, the parameters are determined based on the updated estimation result of the SOC obtained by Equations (14)–(18). It is clear that the approximated linearized system is able to arrive at the estimation result, which is close to the original nonlinear function based on the accurate estimated SOC. With this confirmation, the system parameters and the SOC estimation result are closer to the true value in every iteration simultaneously. The variational EKF algorithm is given as Algorithm 2 in the following.
Algorithm 2 Variational EKF Algorithm
Step 1: Initializing the initial state x ( 0 ) and the variance P ( 0 ) .
Step 2: Figuring out the one step prior to state prediction x ( k + 1 | k ) and variance P ( k + 1 | k ) , the filter gain K ( k + 1 ) , and the posterior state estimation x ( k + 1 | k + 1 ) and variance P ( k + 1 | k + 1 ) based on traditional EKF algorithm mentioned in Algorithm 1.
Step 3: Computing the system parameters A ˜ ( x ( k + 1 | k + 1 ) ) , B ˜ ( x ( k + 1 | k + 1 ) ) , C ˜ ( x ( k + 1 | k + 1 ) ) , D ˜ ( x ( k + 1 | k + 1 ) ) based on Equations (13)–(18) with the introduction of the posterior state estimation x ( k + 1 | k + 1 ) .
Step 4: Comparing the difference between the posterior state estimated by step 2 and step 3; if the difference is small enough, then go to next step; if the difference is large, then send the posterior state estimation in step 3 to step 2, and repeat step 3;
Step 5: Replacing moment k by moment k + 1 and repeating step 2–4.
With the variational EKF algorithm proposed, the most important highlight is the variation cycle in each time moment. The variation cycle recursively estimates the posterior state based on traditional EKF and improves the linearized system parameters depending on the estimated posterior state. With more accurate linearized system parameters, the estimation result is closer to the true value, and with an estimation result closer to the true value, the linearized system parameters provide a more accurate estimation result. Therefore, the variation cycle is able to help the traditional EKF algorithm to estimate the posterior state more accurately. For better understanding, a flow chart of this process is provided in Figure 5 to show the logical order and algorithm flow.
Furthermore, the most common drawback of traditional EKF is the heavy computational pressure for the Jacobian matrix computation. As mentioned in [27], the number of floating operations (flops) required to implement the EKF equations from step 2 to step 4 in Algorithm 1 at each recursion is given approximately as follows:
C o u n t E K F = 3 n x 3 + ( 3 n y + 5 2 ) n x 2 + 3 ( n y 2 + n y ) n x + 2 3 n y 3 + 3 2 n y 2 + 5 6 n y
From Equation (21), it can be inferred that when the state dimension n x is very large, direct implementation of the EKF is not possible because of the cubic term 3 n x 3 due to the computation of the Jacobian matrix, the prior variance P ( k | k 1 ) , and the inverse matrix in Kalman gain. Nevertheless, when it comes to the SOC estimation, the Jacobian matrix computation is not as heavy as other EKF circumstance because all the differentials in the linearized system parameters are only for the component SOC in the state vector and have no relationship with other components in the state vector. Simultaneously, the parameter in the linearized system is a diagonal matrix obtained by the Kirchhoff’s law circuit, which indicates that the computational pressure of solving the inverse matrix for the Kalman gain in the EKF algorithm is not as heavy as traditional EKF applications but is approximately of n x 2 order of magnitude. In this way, the computation pressure is tolerable, and the introduction of the variation idea is possible.
In Section 4, the experiment’s validation results are shown to prove the reliability and superiority of the variational EKF algorithm. The traditional EKF, the RLS-EKF, and the FFRLS-EKF are compared for the SOC-estimation process based on five batteries of the same type.

4. Experimental Validation

The effectiveness of the variational EKF algorithm in SOC estimation was revealed through the comparative experiments explained in this section. This study utilized the 18650 lithium-ion battery test with a rated capacity of 2.5 Ah as the research object, and the experimental platform was utilized to set the working conditions by the charge–discharge instrument in Figure 6 and battery manage system in Figure 7. As shown in Figure 6, the battery measurement system includes a battery testing system (BTS) and a thermal chamber from Neware manufacturer (Shenzhen, China). The type of BTS is Neware BTS-4000, which is carried out battery aging experiments at different charging rates. The type of the thermal chamber is Neware MHW-200, which is used to control the battery temperatures. Figure 7 shows that the battery aging data are measured by a battery management system in the Industrial Personal Computer (IPC). The green, red, and orange color blocks in the figure denote the charging, discharging, and temporary waiting of batteries. In the charging and discharging process, the hybrid pulse power characteristic (HPPC) test of the battery was performed to obtain the discharge data and was conducted with a NEWARE BTS-4000 in a 5 V 20 A working condition and at 25 °C working temperature. The detailed parameters of the 18650 battery are given in Table 1.
Five batteries of the same type were tested in the experiment. The tested batteries have different RC model parameters; nevertheless, the estimation result based on variational EKF is always better than that based on traditional EKF, the RLS-EKF, and the FFRLS-EKF, which shows the robustness of the variational EKF algorithm compared to the other methods. In the RLS-EKF algorithm, the RLS technique is able to derive the real-time characteristics by recursively updating the system parameters [28]. Compared to the RLS-EKF, the FFRLS-EKF introduces the forgotten factor to decrease the early date weights, which makes the updated parameters of the system more reasonable. The initialization of the tested batteries is given as follows. The true value of SOC at the beginning is 100%, and the initial parameters of the variational EKF and the comparison EKF algorithms are x ( 0 ) = 95 % and P ( 0 ) = 10 4 . The variance of the system noise and the measurement noise is Q = 10 4 and R = 10 4 , respectively. In the experiment, the SOC is estimated based on the RC model and the measured OCV in the HPPC test according to the OCV-SOC fitting curve obtained in Figure 2.
The experimental results for battery No. 1 are provided in Figure 8 and Figure 9. The estimation comparison of the traditional EKF algorithm, the variational EKF algorithm, the RLS-EKF, and the FFRLS-EKF is given in Figure 8. From this figure, it is obvious that the variational EKF estimation result is closer to the true value of SOC compared to the other EKF estimation results. With the introduction of the variation technique, the linearized system parameters are approximated to the nonlinear system parameters. Therefore, the estimation result is accurate, demonstrating the algorithm’s ability to determine the true SOC value well even when a signal mutation or measurement error exists. The estimation error comparison between the EKF algorithms is given in Figure 8. Similarly, the experimental results for batteries No. 2 through No. 5 are given in Figure 10 and Figure 11. Obviously, the estimation result comparison and the estimation error have a similar tendency with battery No. 1, and the variational EKF performs better than the other EKF algorithms. The reason is that the RC model parameters are determined depending on the estimated SOC but not the true value, and the estimation result gives an inaccurate performance when the initialization is far from the true SOC or when sudden extreme cases occur in the estimation process. In these circumstances, the other EKF algorithms’ performance is not as good as that of the variational EKF due to the parameters’ correction from the variation part. The detailed experimental testing data are shown in Table 2. The SOC estimation based on variational EKF algorithm are other EKF algorithms depends on these test data.
To make the experimental results more persuasive, the estimation results were tested based on simulations with different random noise sequences with the help of a Monte Carlo (MC) simulation algorithm. Each battery was simulated 100 times for the random noise in different sequences. In this way, the estimation error of the variational EKF was proven to still be significantly less than that of the other EKF algorithms. To demonstrate the superiority of the variational EKF algorithm, the mean absolute error (MAE) and the mean square error (MSE) of several EKF algorithms for batteries No. 1 through No. 5 during 100 simulations are given in Table 3 to prove the effectiveness and the reliability of the variational EKF algorithm.
In detail, it is easily observed that the estimation error of all the EKF algorithms has a spike at the end of every discharge step. This phenomenon occurs mainly owing to the mismatch between the model prediction and OCV measurement results. If the model is accurate enough, the estimation results of EKF algorithm will be accurate as well. All the EKF algorithms gradually converge to the true value of SOC in the preserving step. At the high-SOC part, the traditional EKF algorithm performs better than the variational EKF, which is shown in Table 3. However, when it comes to low-SOC part, the performance of the traditional EKF algorithm decreases sharply. The reason is that the modeling error is unable to be ignored during the RC model parameter identification process. When the model parameters are not accurate at low-SOC part, the EKF is unable to determine an accurate posterior estimation result. Nevertheless, the variational EKF algorithm has better performance at the low-SOC part, which results from the recursive parameter and estimation result iteration by the variational theorem. In Figure 8 and Figure 10, the variational EKF algorithm performs much better than other EKF algorithms. The performance indices provided in Table 3 show that the variational EKF has the lowest MSE for all the batteries and the lowest MAE for batteries No. 3 through No. 5. The traditional EKF algorithm has a lower MAE than the variational EKF algorithm in batteries No. 1 and No. 2. This result depends on the RC model accuracy by which the traditional EKF is able to track the SOC well at the high-SOC part. At the low-SOC part, the model’s accuracy reduction is not significant enough, and the SOC-estimation error is averaged by the good performance at the high-SOC part. The MSE magnifies the estimation error comparison, especially at the low-SOC part. Therefore, even though the traditional EKF algorithm has a lower MAE in some cases, the variational EKF algorithm is robust for most battery cases, and the superiority and the effectiveness are extremely obvious.

5. Conclusions

In this paper, a variational EKF algorithm is provided to estimate the SOC of lithium-ion batteries. Firstly, the input battery datasets were modeled as a second-order RC model based on the least square error curve fitting technique. Secondly, the SOC estimation was obtained by the variational EKF and other EKF algorithms based on the second-order RC model, respectively. With the introduction of the variational theorem, the estimation result of the improved EKF algorithm was more accurate than that of the other EKF algorithms. The result provides low noise and good error-correction ability. The variational EKF algorithm estimated the SOC for battery No. 1 with the overall best MAE, with MSE values of 0.0355 and 0.0019 under the HPPC working condition, respectively, which manifests the superiority and reliability of the variational EKF algorithm. However, the initialization value of the variational EKF algorithm still affects the estimation accuracy. Therefore, in future work, we will focus on reducing the effectiveness of the imprecise initialization value.

Author Contributions

Methodology, Z.Z.; Validation, Z.Z.; Resources, C.Z.; Writing—original draft, Z.Z.; Writing—review & editing, C.Z.; Funding acquisition, C.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Talent Introduction Project of Jinling Institute of Technology (jit-b-202214) and the major project of basic science (natural science) research in colleges and universities of Jiangsu Province (23KJA480002).

Data Availability Statement

The data and materials used to support the findings of this study are available from the corresponding author upon reasonable request. The data are not publicly available due to privacy.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References

  1. Kampa, M.; Castanas, E. Human health effects of air pollution. Environ. Pollut. 2008, 151, 362–367. [Google Scholar] [CrossRef]
  2. Ge, S.; Xu, L.; Liu, H.; Fang, J. Low-carbon benefit analysis on DG penetration distribution system. J. Mod. Power Syst. Clean Energy 2015, 3, 139–148. [Google Scholar] [CrossRef]
  3. Biswas, P. Adapting SUV AWD powertrain to P0/P2/P4 hybrid EV architecture: Integrative packaging and capability study. In Proceedings of the IEEE Transportation Electrification Conference, Pune, India, 13–15 December 2017. [Google Scholar]
  4. Sun, F.C. Green Energy and Intelligent Transportation-promoting green and intelligent mobility. Green Energy Intell. Transp. 2022, 1, 100017. [Google Scholar] [CrossRef]
  5. Lane, B.; Shaffer, B.; Samuelsen, S. A comparison of alternative vehicle fueling infrastructure scenarios. Appl. Energy 2020, 259, 114128. [Google Scholar] [CrossRef]
  6. Hannan, M.A.; Lipu, M.S.H.; Hussain, A.; Mohamed, A. A review of lithium-ion battery state of charge estimation and management system in electric vehicle applications: Challenges and recommendations. Renew. Sustain. Energy Rev. 2017, 78, 834–854. [Google Scholar] [CrossRef]
  7. Kiaee, M.; Cruden, A.; Sharkh, S. Estimation of cost savings from participation of electric vehicles in vehicle to grid (V2G) schemes. J. Mod. Power Syst. Clean Energy 2015, 3, 249–258. [Google Scholar] [CrossRef]
  8. He, H.W.; Sun, F.C.; Wang, Z.P.; Lin, C.; Zhang, C.; Xiong, R.; Deng, J.; Zhu, X.; Xie, P.; Zhang, S.; et al. China’s battery electric vehicles lead the world: Achievements in technology system architecture and technological breakthroughs. Green Energy Intell. Transp. 2022, 1, 100020. [Google Scholar] [CrossRef]
  9. Xiong, R.; Kim, J.; Shen, W.X.; Lv, C.; Li, H.; Zhu, X.; Zhao, W.; Gao, B.; Guo, H.; Zhang, C.; et al. Key technologies for electric vehicles. Green Energy Intell. Transp. 2022, 1, 100041. [Google Scholar] [CrossRef]
  10. Chen, Y.; Yang, G.; Liu, X.; He, Z. A time-efficient and accurate open circuit voltage estimation method for lithium-ion batteries. Energies 2019, 12, 1803. [Google Scholar] [CrossRef]
  11. Movassagh, K.; Raihan, A.; Balasingam, B.; Pattipati, K. A critical look at coulomb counting approach for state of charge estimation in batteries. Energies 2021, 14, 4074. [Google Scholar] [CrossRef]
  12. Shao, Y.; Liu, H.; Shao, X.D.; Sang, L.; Chen, Z.T. An all coupled electrochemical-mechanical model for all-solid-state Li-ion batteries considering the effect of contact area loss and compressive pressure. Energy 2022, 239, 121929. [Google Scholar] [CrossRef]
  13. Nejad, S.; Gladwin, D.T.; Stone, D.A. A systematic review of lumped-parameter equivalent circuit models for real-time estimation of lithium-ion battery states. J. Power Sources 2016, 316, 183–196. [Google Scholar] [CrossRef]
  14. Dong, G.; Yang, F.; Wei, Z.; Wei, J.; Tsui, K.L. Data-driven battery health prognosis using adaptive Brownian motion model. IEEE Trans. Ind. Inform. 2019, 16, 4736–4746. [Google Scholar] [CrossRef]
  15. Meng, J.H.; Ricco, M.; Luo, G.Z.; Swierczynski, M.; Stroe, D.; Stroe, A.; Teodorescu, R. An overview and comparison of online implementable SOC estimation methods for lithium-ion battery. IEEE Trans. Ind. Appl. 2017, 54, 1583–1591. [Google Scholar] [CrossRef]
  16. Xiong, R.; Sun, F.C.; He, H.W. Data-driven State-of-Charge estimator for electric vehicles battery using robust extended Kalman filter. Int. J. Automot. Technol. 2014, 15, 89–96. [Google Scholar] [CrossRef]
  17. Sun, D.; Yu, X.; Wang, C.; Zhang, C.; Bhagat, R. State of charge estimation for lithium-ion battery based on an Intelligent Adaptive Extended Kalman Filter with improved noise estimator. Energy 2021, 214, 119025. [Google Scholar] [CrossRef]
  18. Sun, C.J.; Zhang, Y.G.; Wang, G.Q.; Gao, W. A New Variational Bayesian Adaptive Extended Kalman Filter for Cooperative Navigation. Sensors 2018, 18, 2538. [Google Scholar] [CrossRef]
  19. Duan, J.; Wang, P.; Ma, W.; Qiu, X.; Fang, S. State of charge estimation of lithium battery based on improved correntropy extended Kalman filter. Energies 2020, 13, 4197. [Google Scholar] [CrossRef]
  20. Zhu, Q.; Xu, M.; Liu, W.; Zheng, M.Q. A state of charge estimation method for lithium-ion batteries based on fractional order adaptive extended kalman filter. Energy 2019, 187, 115880. [Google Scholar] [CrossRef]
  21. Takyi-Aninakwa, P.; Wang, S.; Zhang, H.; Yang, X.Y.; Fernandez, C. An optimized long short-term memory-weighted fading extended Kalman filtering model with wide temperature adaptation for the state of charge estimation of lithium-ion batteries. Appl. Energy 2022, 326, 120043. [Google Scholar] [CrossRef]
  22. He, W.; Williard, N.; Chen, C.; Pecht, M. State of charge estimation for Li-ion batteries using neural network modeling and unscented Kalman filter-based error cancellation. Int. J. Electr. Power Energy Syst. 2014, 62, 783–791. [Google Scholar] [CrossRef]
  23. Gholizade-Narm, H.; Charkhgard, M. Lithium-ion battery state of charge estimation based on square-root unscented Kalman filter. IET Power Electron. 2013, 6, 1833–1841. [Google Scholar] [CrossRef]
  24. Wang, S.; Fernandez, C.; Fan, Y.C.; Feng, J.Q.; Yu, C.M.; Huang, K.F.; Xie, W. A novel safety assurance method based on the compound equivalent modeling and iterate reduce particle-adaptive Kalman filtering for the unmanned aerial vehicle lithium ion batteries. Energy Sci. Eng. 2020, 8, 1484–1500. [Google Scholar] [CrossRef]
  25. Yun, Z.; Qin, W.; Shi, W. State of charge estimation of lithium-ion battery under time-varying noise based on Variational Bayesian Estimation Methods. J. Energy Storage 2022, 52, 104916. [Google Scholar] [CrossRef]
  26. Liu, R.; Zhang, C. An Active Balancing Method Based on SOC and Capacitance for Lithium-Ion Batteries in Electric Vehicles. Front. Energy Res. 2021, 9, 773838. [Google Scholar] [CrossRef]
  27. Ait-El-Fquih, B.; Hoteit, I. Fast Kalman-like filtering for large-dimensional linear and Gaussian state-space models. IEEE Trans. Signal Process. 2015, 63, 5853–5867. [Google Scholar] [CrossRef]
  28. Ren, B.; Xie, C.; Sun, X.D.; Zhang, Q.; Yan, D. Parameter identification of a lithium-ion battery based on the improved recursive least square algorithm. IET Power Electron. 2020, 13, 2531–2537. [Google Scholar] [CrossRef]
Figure 1. The Second-Order RC Model [26].
Figure 1. The Second-Order RC Model [26].
Batteries 09 00583 g001
Figure 2. OCV-SOC fitting curve.
Figure 2. OCV-SOC fitting curve.
Batteries 09 00583 g002
Figure 3. Battery discharge voltage in the HPPC test [26].
Figure 3. Battery discharge voltage in the HPPC test [26].
Batteries 09 00583 g003
Figure 4. Battery discharge voltage in a pulse of the HPPC test [26].
Figure 4. Battery discharge voltage in a pulse of the HPPC test [26].
Batteries 09 00583 g004
Figure 5. The EKF.
Figure 5. The EKF.
Batteries 09 00583 g005
Figure 6. The charge–discharge instrument for lithium-ion battery test.
Figure 6. The charge–discharge instrument for lithium-ion battery test.
Batteries 09 00583 g006
Figure 7. The IPC of the charge–discharge instrument.
Figure 7. The IPC of the charge–discharge instrument.
Batteries 09 00583 g007
Figure 8. Estimation result comparison between the variational EKF and other EKF algorithms.
Figure 8. Estimation result comparison between the variational EKF and other EKF algorithms.
Batteries 09 00583 g008
Figure 9. Estimation error comparison between the variational EKF and other EKF algorithms.
Figure 9. Estimation error comparison between the variational EKF and other EKF algorithms.
Batteries 09 00583 g009
Figure 10. Estimation result comparison for batteries No. 2 through No. 5.
Figure 10. Estimation result comparison for batteries No. 2 through No. 5.
Batteries 09 00583 g010
Figure 11. Estimation error comparison for batteries No. 2 through No. 5.
Figure 11. Estimation error comparison for batteries No. 2 through No. 5.
Batteries 09 00583 g011
Table 1. The parameters of the 18650 battery.
Table 1. The parameters of the 18650 battery.
Battery ModelLR1865SZ
Nominal capacity2.5 Ah
Minimum capacity2.4 Ah
Charging voltage4.2 V
Nominal voltage3.0 V
Maximum charging current1 C (2.4 A)
Maximum discharging current1 C (2.4 A)
Table 2. The Experimental Testing Data of Batteries.
Table 2. The Experimental Testing Data of Batteries.
Battery No.Initial Voltage (V)Discharge Current (mA)Discharge Capacity (mAh)Discharge Energy (mWh)
No. 14.12382352.42337.6149083.854
No. 24.13192379.72362.7269173.627
No. 34.12822367.32361.8389174.183
No. 44.13782328.82317.3669001.016
No. 54.13072346.22336.8909065.465
Table 3. Performance index comparison between the variational EKF and other EKF algorithms.
Table 3. Performance index comparison between the variational EKF and other EKF algorithms.
Battery No.AlgorithmMAEMSE
No. 1Variational EKF0.03570.0021
Traditional EKF0.02620.0037
RLS-EKF0.07790.0081
FFRLS-EKF0.04820.0047
No. 2Variational EKF0.04480.0025
Traditional EKF0.04250.0097
RLS-EKF0.07020.0075
FFRLS-EKF0.04550.0047
No. 3Variational EKF0.03430.0019
Traditional EKF0.04210.0062
RLS-EKF0.05050.0038
FFRLS-EKF0.04670.0032
No. 4Variational EKF0.04530.0057
Traditional EKF0.07200.0237
RLS-EKF0.06830.0079
FFRLS-EKF0.04550.0062
No. 5Variational EKF0.02980.0012
Traditional EKF0.07330.0263
RLS-EKF0.09900.0128
FFRLS-EKF0.04540.0042
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhou, Z.; Zhang, C. An Extended Kalman Filter Design for State-of-Charge Estimation Based on Variational Approach. Batteries 2023, 9, 583. https://doi.org/10.3390/batteries9120583

AMA Style

Zhou Z, Zhang C. An Extended Kalman Filter Design for State-of-Charge Estimation Based on Variational Approach. Batteries. 2023; 9(12):583. https://doi.org/10.3390/batteries9120583

Chicago/Turabian Style

Zhou, Ziheng, and Chaolong Zhang. 2023. "An Extended Kalman Filter Design for State-of-Charge Estimation Based on Variational Approach" Batteries 9, no. 12: 583. https://doi.org/10.3390/batteries9120583

APA Style

Zhou, Z., & Zhang, C. (2023). An Extended Kalman Filter Design for State-of-Charge Estimation Based on Variational Approach. Batteries, 9(12), 583. https://doi.org/10.3390/batteries9120583

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop