Reduce state of charge estimation errors with an extended Kalman filter algorithm

ABSTRACT


INTRODUCTION
Lithium-ion battery (LiB) applications in electric vehicles (EVs) have been growing rapidly [1], and the need for high security and long life is more important than ever before.In aiming to overcome these challenges, considerable effort has been put into providing an advanced battery management system (BMS), which strongly relies upon battery state estimation [2].Of the four states, the state of charge (SOC) remains critical.However, it is not possible to directly measure the internal SOC.Only measurable signals, such as the battery voltage and the load current, can be used to estimate this value.Therefore, to obtain a precise and stable estimation of SOC, there is a need to set up a formal solution approach to reduce the negative impact of uncertain measurements, such as both current and voltage noise.Any of these common problems can directly impact the effectiveness and efficiency of estimating the SOC.There are three categories of SOC estimation methods: open-circuit voltage (OCV) method, ampere-hour (Ah) method, and model-based methods [3], [4].As a result of the lack of an adjustment mechanism, the first two approaches are highly prone to uncertainty in the measurements and will unavoidably fail as the measurement errors increase.Conversely, model-based methods generally exhibit improved performance due to the use of a mechanism allowing closed-loop feedback.The main approaches to model the dynamic behaviors of LIBs are the electrochemical model (EM) [5], the equivalent circuit model (ECM) [6], and the data-driven model [7], [8].
The electrochemical model is very precise and capable of describing detailed transport and reaction mechanisms; however, it is challenging to implement in real-time due to the high computation expense.Instead, data-driven models, which include both artificial neural networks and fuzzy logic, tend to be very efficient and do not require consideration of the mechanisms inherent in the process.However, they both demand massive learning inputs, and the overall performance of generalization might not be tuned for the unseen regions of operation.As opposed to the two, the ECM may provide a decent balance of model accuracy and complexity, and as a result, it became the widest-applied model in the BMS.
Several approaches have been proposed to embed into the ECM in order to be able to accurately estimate the SOC.Among them are the extended Kalman filter (EKF) [9], [10], sigma-point Kalman filter (UKF) [11], [12], and cubature Kalman filter (CKF) [13], [14].Out of these methods, the EKF method is the most widely used due to its high accuracy and efficiency.However, the EKF algorithm's popularity for SOC estimation doesn't negate the fact that its accuracy depends on both the battery model and system noise variable priors [15].Like other Kalman filters, the EKF relies on statistical models to represent uncertainties in the system.One critical aspect is the specification of noise parameters in the prediction step of the filter.If these noise parameters are not properly estimated or set, the EKF may not accurately account for the uncertainties in the battery behavior, leading to inaccurate SOC predictions [16].
Several research studies have attempted to address the problem of measurement noise by improving the precision of SOC estimations.Sun et al. proposed the use of smart adaptative extended Kalman filter (AEKF) [17] and adaptative unscented Kalman filter (AUKF) [18] to estimate battery SOC by considering noise.Maheshwari and Nageswari [19] combined the sunflower optimization algorithm (SFO) with a machine learning model to improve SOC estimation performance using an adaptive Kalman filter, as evidenced by the analysis of the error metric in the estimation results.
This paper first proposes an EKF algorithm that uses an equivalent circuit model, specifically a second-order RC model.The methodology is focused on providing mathematical modeling of the given lithium-ion battery (LiB) and The EKF algorithm.Afterward, these mathematical models are implemented into the developed MATLAB program and then verified in the estimation procedure.Lastly, we set the noise covariance parameters for the SOC estimation algorithm.
An organization for the remaining part of this paper is as outlined here: Section 2 provides an introductory overview of the battery model, parameter identification, and a brief explanation of the EKF algorithm EKF.Section 3 outlines the proposed model's implementation in a MATLAB program.Section 4 validates the proposed model through various simulation results related to the noise covariance parameters.Section 5 summarizes the overall paper.

MATHEMATICAL MODELLING OF LIB 2.1. Battery model
A precise assessment of a battery's state of charge requires the use of an appropriate battery model.The ECM [20], [21] is a commonly used model for assessing battery polarization phenomena due to its consideration of electrochemical concentration and polarization.This makes it a convenient method for determining these parameters.
The foundation shown in Figure 1 uses a second-order RC model to represent a battery's dynamic behavior.This model is critical for understanding the battery's responses to different conditions and inputs.It enables precise study and prediction of battery performance, aiding optimization in various applications.
In this model, a schematic diagram represents internal components, including resistances and capacitors.Internal resistance is marked as R0, reflecting inherent resistance within.RP1 and RP2 denote resistances due to electrochemical and concentration polarizations, depicting how interactions occur with the environment.Lastly, fractional capacitors, CP1 and CP2, correspond to electrochemical and concentration polarizations respectively, illustrating energy storage components.
UOC is one of the SOC functions that indicates the voltage across the open circuit in an application.I denotes the total current in a battery pack, essential for assessing its operational state.UL, UP1, and UP2 represent the terminal voltage of the battery pack and the voltages across CP1 and CP2 respectively, offering insight into the voltage levels in various system components.
It can be shown that Kirchhoff's law is the basis of the circuit equations for this model, and the state space equations that describe this model can be summarized as (1): Reduce state of charge estimation errors with an extended Kalman filter algorithm (Anas El Maliki) as a result, the state-space equations can be viewed as a matrix which can be summarized in ( 2  The new European driving cycle (NEDC) [22] is utilized in the proposed model to simulate standard driving conditions.It comprises various driving cycles to mimic typical urban and extra-urban environments in Europe.This standard allows for the consistent comparison of emission levels and fuel consumption between different vehicles.

Simulation inputs
In accordance with the hybrid pulse power characteristics (HPPC) methodology outlined in 2019 [23], it is established that the relationship between open circuit voltage (OCV) and SOC can be accurately represented using a sixth-order polynomial curve.This polynomial curve serves as a comprehensive model to describe the intricate connection between OCV and SOC, providing a valuable tool for predicting and understanding the battery's behavior across its charge and discharge cycles.Such mathematical representations are crucial in the field of battery management and energy storage system analysis.
=  0 +  1  +  2  2 +  3  3 +  4  4 +  5  5 +  6  6  (3) where,  0~6 parameters can be found in Table 1 [24].The proposed model's parameters can be ascertained utilizing the forgetting factor recursive least squares (FFRLS) technique, as illustrated in Table 2 [25].This method provides an efficient approach to estimate the model parameters iteratively.The FFRLS approach ensures a continuous update of the parameters, making it a robust choice for dynamic systems.The 2RC battery model's simulation, using the NEDC as the current profile, is illustrated in Figure 3. Figure 4 presents the terminal voltage estimation based on the key parameters provided in Table 2. Lastly, Figure 5 displays the state of charge estimation, as determined by the empirical model.
The EKF algorithm is applied to our model to estimate the SOC, utilizing the initial covariance matrix defined as (4) as an input parameter.The outcomes of this estimation are illustrated in Figure 6. Figure 7 then portrays the corresponding errors in the SOC, providing a visual representation of the discrepancies in the estimations.Figure 6 illustrates the progression of the state of charge estimation using the EKF compared to the ampere-hour (AH) method.Meanwhile, Figure 7 displays the error over the course of a cycle.From 2,000 seconds onwards, a significant error can be measured in the EKF estimation.Nevertheless, it is important to point out that the maximum drift of the EKF algorithm is 2.3% in comparison to the actual state of charge, which represents a substantial improvement over the AH algorithm.

RESULTS AND DISCUSSION
To simulate the responses to various input noises related to SOC and process noise (Q) and measurement noise (R), we utilize the EKF algorithm for SOC estimation.Figures 8(a) to (d) illustrate the results of SOC estimation under the new European driving cycle (NEDC) profile, considering varying input noises Qa, Qb, Qc, R, and using the EKF algorithm.The root mean squared errors (RMSEs) of the EKF method are presented in Table 3.As shown in Table 3, SOC errors have different scales due to large covariance noise inputs.The proposed approach improves parametric filtering.In this case, the RMSE value for Qa max is 0.0244, and for Qa min, it is 0.0117, respectively.The SOC curve for these variables as shown in Figure 8(a).Additionally, the RMSE value for Qb max is 0.0119, and for Qb min, it is 0.0041, respectively.The corresponding SOC curve can be seen in Figure 8(b).The RMSE value for Qc max is 0.0118, and for Qc min, it is 0.0055, respectively.The SOC curve for these variables can be shown in Figure 8(c).Finally, the RMSE value of Rmax is 0.0117, and for Rmin, it is 0.0067, respectively.The corresponding SOC curve can be illustrated in Figure 8(d).
Figure 8 and Table 3 reveal a maximum RMSE error of about 2.44% and a minimum of roughly 0.4%.This aligns with Table 3 findings, highlighting the extended Kalman filter's accuracy in estimating the SOC.This accuracy is mainly due to the appropriate input values for its noise covariance.Examining Table 4, we observe that the EKF used in the proposed model falls within the range of the min and max values of Q a , Q b , Q c , and R. Based on the subfigure shown in Figure 9, it appears that the optimal EKF estimation error lies between the values of EKF Min and EKF Max.When applying the input noise parameter from Table 4, the curves for SoC EKF, SoC EKF Min, and SoC EKF Max follow the same pattern as shown in Figure 9. Additionally, the RMSE of the SOC estimation varies between 2.47% and 0.30% within the EKF boundaries.The EKF algorithm's optimal key noise values are Q a min = 2e −8 , Q b min = 5e −1 , Q c min = 3e −1 , R min = 2e −8 , resulting in 0.30% errors during SOC estimation.Meanwhile, Figure 10 displays the error over the course of a cycle.

CONCLUSION
This study proposes an EKF method for estimating the SOC of lithium-ion batteries (LiBs) using a second-order RC network.The EKF algorithm is implemented in a MATLAB program developed as part of the project.The mathematical model for the specific LiB is selected and integrated into the program.Subsequently, the battery's behavior is represented using the second-order RC model.
Using different noise covariance matrix values, we simulated and verified our model to ensure its accuracy and robustness.The proposed EKF algorithm demonstrated both accuracy and robustness in the results.The RMSE of the estimated SOC ranged between 2.47% and 0.30%, depending on the studied input noise values.Based on the aforementioned results, we can conclude that the optimal noise covariance matrix values for our algorithm are as follows:    = 2 −8 ,    = 5 −1 ,    = 3 −1 ,   = 2 −8 .Implementing these values will result in an estimation error of 0.30% when using the given algorithm.

Figure 2 .
Figure 2. The proposed method flowchart

Figure 6 .
Figure 6.SOC estimated by EKF algorithm Figure 7. SOC estimated by EKF algorithm

Figure 9 .Figure 10 .
Figure 9. SOC estimation results under maximum and minimum estimation

Table 2 .
Model parameters at 25°C

Table 3 .
Estimation of SOC with different noise inputs

Table 4
details the EKF estimation boundaries from the parametric study.The RMSE of SOC estimation varies between 2.47% and 0.30% due to different input noise values.Analyzing these variations is crucial for improving SOC estimation accuracy.
Reduce state of charge estimation errors with an extended Kalman filter algorithm (Anas El Maliki) 63

Table 4 .
RMSE of SOC estimation under max and min input noise