State of charge estimation based on a modified extended Kalman filter

ABSTRACT


INTRODUCTION
In recent years there has been an increasing application of lithium-ion batteries (LiBs) in on-board energy storage systems, power backups and electronics [1] due to their inherent properties of superior energy density, lower self-discharge, and higher cycle lifetime [2] vis-a-vis conventional lead-acid and other rechargeable batteries. LiBs serve as the primary energy storage system for electrical vehicles [3] as well as smart grids systems; hence the need for a battery management system (BMS). The BMS closely monitors the battery state which includes the state of charge (SOC), state of health (SOH) and cell capacity for the purpose of ensuring a safe and efficient operation [4], [5].
The SOC of a LiB is defined as the percentage of the remaining capacity left in its maximum available capacity [6], [7]. The SOC is one of the core components that need to be properly managed by the BMS since it uses the residual capacity function to qualify the performance of LiBs [8]. However, the SOC cannot be directly measured, and this implies that models that accurately represent the battery dynamics are required to develop optimum observers for gaining insight into in the internal state of the LiB based on information from measurable quantities. The models used in describing LiBs are the electrochemical models (EMs), data-driven models (DDMs) and equivalent circuit models (ECMs). The EM model uses complex partial derivative equations and boundary conditions in describing the electrochemical process that takes place within the cell by giving a detailed insight on the chemical reaction responsible for the internal parameter generation and dynamic behavior during different operating conditions [9]. These models are known to be highly accurate [10], but for them to be used efficiently, thorough knowledge of the battery chemicals structure as well as characteristics must be precisely determined [11]. In DDMs, the battery model is derived by training large set of measured data without requiring information on the cell characteristics [12]. Equivalent circuit models consist largely of voltage sources, resistors and capacitors that are used for describing the behavior of the LiB [13]. Mohammed [9] argued, though ECMs do not provide information into the electrochemical reactions that takes place within the battery, they should be adopted due to easy implementation, low number of parameters to tune, and low complexity in setting up their state equations [14], [15].
The extended Kalman filter (EKF) is a well-known and established optimum state observer applied in nonlinear dynamic systems and has certain merits. In Odry et al. [16], a key merit of the EKF identified was its variants nature-able to be augmented with stochastic and deterministic approaches tested to be reliable in the robust estimation of mobile robot's attitudes. Due to characteristics of having a second order information embedded in its covariance matrix, the EKF can achieve a faster convergence rate in applications such as wind speed predictions [17], vehicle position tracking [18] and LiB capacity estimation [19]. In addition, because of having its posterior and a prior probability estimated, systems with multi-objectives requirements can be easily designed with higher accuracy than other benchmark functions having similar requirements [20].
Much research has been carried out on the SOC estimation subject. Dong et al. [2] proposed an onboard SOC estimation method based on Kalman filter (KF). The maximum absolute estimation errors of estimated SOC under four experiment scenarios, namely, open-circuit voltage (OCV), constant power, maximum discharge capability and dynamic current tests fell in the range of 4 to 5%. However, the algorithms for SOC were often too heavy to be used for on-board implementation of systems such as a microcontroller. In [12], an EKF for SOC estimation of a LiB with hysteresis was implemented. Experimental results derived from 90 cells connected in series and partitioned into four modules showed the method achieved a maximum error of 1% and good stability in contrast to a roughly tuned EKF which had a maximum error of 4% and poor stability. The drawback was the method was highly sensitive to the process noise, and hence extreme care was required for tuning the EKF parameters. Improved extended Kalman filter (IEKF) was proposed for SOC estimation in [4] by incorporating noise adaptation, fading filter and a linearnonlinear filtering based on the traditional EKF method. Results obtained revealed the IEKF maximum error was roughly 3% under dynamic stress (DST) conditions and 1% under a subjected temperature disturbance, giving the method a superior advantage over a coulomb counting (CC) method whose results were above 16% for each case. However, the proposed modeling framework and experiment was carried out only on a single cell battery; hence the accuracy of the method may not be guaranteed for more than one cell.
Due to inaccuracies associated with the EKF when applied in large scale battery energy storage systems (BESS) with high process and measurement noise, Peng et al. [14] developed an adaptive unscented Kalman filter (AUKF) having the functionality of noise statistics estimation for accurate estimation of SOC. The AUKF had the least root-mean-square-error (RMSE), mean absolute error (MAE) and faster SOC convergence of about 20 s. However, the proposed work did not consider the influence of cell inconsistency on the variation of battery system model parameters which could affect SOC estimation accuracy. Further work by [7] looked at combining dual Kalman filter (DKF) and dual extended Kalman filter (DEKF) algorithms for the purpose of improving the SOC estimation. In the presence of system errors, the DKF was able to correct SOC automatically and error results were significantly less than single DKF and DEKF algorithms. However, the predictability of the battery dynamics in both time and frequency over the entire operating range of the LiB battery was not considered.
The aim of this paper is to design an extended Kalman filter for determining accurate estimation of the state of charge of a lithium-ion battery useful in providing the available energy left that is not only suitable for electrical vehicles energy indication but would also have further applications in electronics, grid power infrastructures as well as drone system's performance. The proposed method can provide three (3) decimal places of SOC accuracy even in presence of measurement and process noise based on model accuracy and assignment of noise co-variance matrices. Furthermore, a contribution was made by improving the performance of the existing estimator by proposing better priori estimate as well as modification of the Kalman gain. This study focuses on state of charge of a single cell lithium-ion battery with improvements that can ensure multi cell level SOC estimation accuracy.
Following this introductory section, this paper is structured as: description of the secondary data is presented in section 2. The battery model in form of state space equations is derived in section 3. Section 4 explains the offline model parameter identification method used for estimating LiB internal parameters. In section 5, the EKF algorithm implemented for the SOC estimation is given. Section 6 presents the contribution of an improved EKF estimator. The various results as well as interpretations are presented and compared in section 7. This paper concludes with section 8 which summarizes the work done and establishes future research direction.

DATA COLLECTION
The data set used in this research is a five (5) pulse hybrid pulse power characterization (HPPC) discharge. The results consist of voltage, current, temperature and ampere-hour readings of a 2.9 Ah Panasonic 18650PF lithium-ion cell obtained from tests carried out at the university of Wisconsin-Madison and was provided as a reference for researchers to use to compare their algorithms and model response for the Kalman filter and neural network state of charge algorithms [21]. The battery cell was tested in an eight (8)

BATTERY MODELLING
Due to reasons of balancing complexity and accuracy the ECMs are applied in modelling the LiB [22]. ECMs consist of internal resistance, resistor-capacitor (RC) pairs also known as polarization parameters, OCV and in some conditions a hysteresis element [12]. To determine the order of the ECM a curve fitting tool in MATLAB has been used to fit an N number of exponentials (where N corresponds to the order of ECM) to the voltage measurement relaxation profile as shown in Figure 1 for the case of 25 °C. To avoid over parameterization while maintaining reasonable level of fidelity a 2 nd order ECM (R-RC-RC) model has been chosen for the LiB modeling task.

Equivalent circuit model
A second order ECM is shown in Figure 2.
Taking Kirchhoff's voltage law across the full loop gives: where V1, V2, V0 are the voltages across R1 C1 pair, R2 C2 pair polarization elements and R0 (Ω), respectively, with: The (4) represents the SOC equation with the following sign convention for the current.
The coulombic efficiency, describes the efficiency of a charging process due to number of electrons transferred into the cell. It can be estimated from OCV charge and discharge curves [24] and has the following expression.
Discretizing (1), (2), (3), (4) using t as sample time, k as present value and k-1 as previous value, the battery model is derived in the state space form below [25].

MODEL PARAMETER IDENTIFICATION
A global pattern search algorithm (GPSA) is used to estimate values of the LiB model internal parameters, { , 0 , 1 , 2 , 1 , 2 }. To generate the parameters, sequence of points is computed that best minimizes the objective function ∑ (̂− ) [9]. The algorithm works by generating vectors, vi used to find which points to search at an iteration count. The search is carried out at set of points around the current pointwhich is defined as the previous point that had the best objective function value. The set of points is called a mesh (m) and is obtained by adding a set of vectors di to the current point. The set of vectors is generated by taking the scalar multiplication of the mesh size, Δ and the pattern vector, vi. Finally, a process called polling is carried out by the algorithm such that the improved objective function value is computed based on when complete poll option is set off or on.

Parameter initialization
The accuracy and convergent speed of the estimation process relies on good parameter initialization. To obtain the initial parameters, this work compared the fitting function described by the transient shown by the voltage relaxation profile to the transient terminal voltage of the LiB expressed as (9).
The (9) Comparing (9) and (10), the initial parameters is computed from the following.

Look-up tables-OCV curve
After the optimization of the battery parameters is carried out, a look-up table can be created. The look-up table determines the value of a parameter at different SOC which is crucial for a successful EKF implementation from which an OCV curve is implemented as shown in Figure 3 using piecewise linear fitting function [26]. The OCV discharge measurement is carried out by pulse discharging the battery from a fully charged condition (SOC=100%) in small amperage steps and then allowed to rest for some time called the resting phase [12]. At this phase, the voltage can be measured to obtain the OCV (SOC) relationship. The process is continued till the battery is fully discharged and afterwards the steps are performed similarly for a charging process to yield the charge OCV curve.

THE EXTENDED FILTER ALGORITHM
The OCV in practice varies nonlinearly with SOC, hence, the LiB dynamic state in (7), (8) is represented in the following discrete state space form, +1 = ( , ) + (11) where ( , ) is the process nonlinear function ( , ), is the measurement nonlinear function, yk is the observable function, wk and vk are the system and measurement noise signals respectively. The system noise has an error co-variance = ( ) = ( 2 0 , 2 1 , 2 2 , 2 1 , 2 2 ) [12] and measurement noise has an error co-variance = ( ) = 2 = 1 ∑ (̂− ) 2 = =0 [9] which are both assumed as Gaussian distribution. The EKF algorithm is presented as follows using the hat (^) notation to represent state estimates Step Step 2: calculating the priori estimates as extension of the Kalman filter [27].
Step 3: The system model is linearized [28] about +1| such that where Ak, Bk, and Ck are Jacobean matrices derived from first order Taylor series approximation [28] of, V0 the OCV, Zk the SOC and the state vector = [ 1,
Step 4: calculation of the Kalman gain +1 Step 5: calculation of a posteriori [12] estimates Step 6: calculation of the system state error.

CONTRIBUTION-AN IMPROVED ESTIMATOR
To improve the performance of the EKF, this research made two crucial changes to the state dynamic estimate matrices (A, B) which have battery parameters represented as functions of SOC and a modification of the Kalman gain, K. The state and input matrices are expressed as (18), So that the improved priori state estimate is now.
Next a denominator constant L is introduced in the Kalman gain equation such that ≫ (‖ ( )‖ 2 + ‖ ( )‖ 2 ) where w, v are the process and measurement noise respectively. Hence, the modified Kalman gain is expressed as (20).
An overview of the modified EKF implementation procedure is shown in Figure 4.  Figure 7 shows the model performance of the voltage curve fitting estimation via curve fitting. A tolerance value of 0.001 was set for the GPSA implemented in Simulink which resulted in optimum estimated parameter values as seen in the battery's voltage estimation shown in Figure 8. This reveal estimating the LiB parameters via software offers better cost function minimization and improved fit than conventional approach.

Extended Kalman filter performance
A standard EKF without no state modification and disturbance is first implemented and its response is shown in Figure 9. Performance response from a commonly used SOC based curve fitting and look up table approach is further shown in Figure 10. The real SOC used as a benchmark for testing the performance of estimators is the conventional coulomb counting technique [29]. Comparing both responses, it is clear the EKF estimation far outperforms the curve fitting technique. However, it is worthy to note, the SOC based curve fitting technique showed an acceptable performance starting at t=0.4×10 4 s and reached asymptotic stability from t=2×10 4 s.
To test for the filtering properties of the EKF, random white gaussian noise [30] was added to the measurement and process equations. Figure 11 shows the insensitivity of the estimator to these noises and as it converges to ideal value at various initial SOCs. Furthermore, test analysis shows the state estimation performance was not affected by the initial values of the SOC when set within a stable range.
The error response in Figure 12 resulted in estimation errors bound of ±12.9%, ±9.18%, ±22.6%, ±32.9% for initial SOC of 100%, 95%, 85%, and 75% respectively. It is observed that from t=1.4 s the error bound for the initial SOC of 100% dropped by 5.64% which suggests that at the beginning of estimation, the fluctuations were caused by the less accurate parameters of the system. Likewise, similar error bound reductions were observed for other initial states. Overall, the EKF implemented setting the initial SOC to 100% demonstrates higher accurateness as performance metrics in Table 3 reveals. This is because the set initial SOC reflects the real initial SOC of the battery before being discharged.  The result of this research contribution described in the previous section is shown in Figure 13 compared against the conventional curve fitting, ampere hour SOC estimation techniques. It can be seen the modification made to the standard EKF algorithm only varied little from the conventional coulomb counting technique [29] used as the real SOC. Performance metrics in Table 4 shows the proposed algorithm outperformed the other estimators with lesser RMSE and MAE values, roughly adding two (2) decimal places of accuracy to the standard EKF. The error bound of the modified EKF lies at ±2.05% which clearly shows the quality of the estimator. However, the choice of the added denominator gain L could cause instability if chosen so large in magnitudes above 10 3 as shown in Figure 14. This is because the Kalman gain becomes so small that the a priori estimate diverges from the a posteriori estimate. After various tuning, L is required to lie in the range [400; 1,000] to achieve high estimation accuracy.

CONCLUSION
This paper has covered extensively a single cell LiB SOC estimation process based on the EKF estimator using a second order ECM. The findings of this work show how significant an added denominator constant to the Kalman gain and predictor accuracy is essential for improving the estimator's accuracy and stability for noisy sensors. Practically, this improvement can be incorporated in existing EKF design embedded in BMS to offer higher accuracy level of SOC indication for EVs. Further research activity in this area will consider the impact that robust higher-order sliding mode observers have in reliably counteracting the effect of large disturbances and unknown noise signals.