State of Charge Estimation for Lithium-Ion Battery via MILS Algorithm Based on Ensemble Kalman Filter

Accurate state of charge (SOC) is great significant for lithium-ion battery to maximize its performance and prevent it from overcharging or overdischarging. This paper presents an ensemble Kalman filter(EnKF-) based SOC estimation algorithm for lithium-ion battery. Firstly, the lithium-ion battery is modeled by the first-order RC equivalent circuit, and the multi-innovation least square (MILS) algorithm is used to perform online parameter identification of the model parameters. Then, the ensemble Kalman filter (EnKF) is introduced to estimate the state of charge. Finally, two typical experiments including constant current discharge experiment and cycling dynamic stress test are applied to evaluate the performance of the joint algorithm of MILS and EnKF. The experimental results show that the joint algorithm-based ensemble Kalman filter can achieve fast tracking and higher estimation accuracy for lithium-ion battery SOC.


Introduction
Nowadays, the rapid development of electric vehicles, renewable energy power output, and user-side energy storage system has brought a heavy demand for the energy storage batteries as a key link. Compared with traditional lead-acid and nickel-cadmium battery, etc., lithium-ion battery features high energy density, high power density, low selfdischarge rate, and long cycling life [1][2][3]. With the continuous cost reduction, lithium-ion battery core has been most widely used for battery energy storage. The state of charge (SOC) reflects the current remaining capacity of the battery. However, SOC estimation accuracy of lithium-ion batteries might be limited due to the nonlinear operating, aging, and the working environment effects. Therefore, it is very necessary to improve the estimation accuracy of SOC of lithiumion batteries through further research [4,5].
The model-based SOC estimation method is the most applicable method for SOC estimation. It starts with parameter identification of the lithium-ion battery model and con-tinues with the proper filter for SOC estimation. Parameter identification is the foundation of SOC estimation, and its accuracy will affect the final estimation. [6] employ the offline least squares algorithm for lithium-ion battery parameter identification, which is simple, feasible, and entails less calculation. However, it is not applicable as online parameter update cannot be possible. [7,8] choose recursive least squares algorithm for the identification of the equivalent circuit parameters of lithium-ion batteries, which succeeds in online parameter update. But with the problems brought by data saturation and noises unsolved, estimation cannot be unbiased. In this regard, [9] compensate the error caused by noise and use the deviation compensation least squares method for online lithium-ion battery parameter identification, which makes unbiased estimation possible if the noise type can be decided.
Proper filter matters in the model-based SOC estimation as it affects the estimation accuracy directly. Standard Kalman filter is applied for SOC in [10] based on the Thevenin Equivalent Circuit of the lithium-ion battery. However, as the lithium-ion battery is a nonlinear system, the error is big. [11] introduce the concept of linearization of nonlinear models, which linearizes the model of the lithium-ion battery state, and realize SOC estimation through extended Kalman filter. Linearization errors are inevitable in this regard. [12,13] introduce unscented Kalman filter for SOC estimation which uses unscented transform to obtain the prediction mean of the state and the covariance. Because the covariance is not necessarily positive semidefinite, the estimation results may be unstable.
In view of the problems in the abovementioned lithiumion battery estimation methods, a first-order RC equivalent circuit model of lithium-ion batteries is established in this paper, and the multi-innovation least square (MILS) algorithm is used for parameter identification while SOC estimation is based on ensemble Kalman filter (EnKF). These approaches have made it possible for online estimation of SOC and parameter identification. This paper investigates the rate of convergence and accuracy of combined estimation method for SOC estimation of lithium-ion batteries under both the constant current discharge experiment and dynamic stress test (DST).

Parameter Identification of Lithium-Ion Batteries
2.1. Equivalent Circuit Model of Lithium-Ion Batteries. The first-order RC equivalent circuit model of lithium-ion battery ( Figure 1) can accurately reflect the transition process from the charging to discharging of the battery, which entails high accuracy and low computational complexity [14,15]. In Figure 1, R 1 represents the ohmic resistance, R 2 is the polarization resistance, and C is the polarization capacitance. R 1 , R 2 , and C are to be identified. i refers to the working current of the lithium-ion battery, and its direction is shown in Figure 1. V C ðtÞ means the polarization capacitance voltage, V OC ðtÞ indicates the terminal voltage, and EðtÞ is the electromotive force. According to Kirchhoff's laws, the following equation can be obtained from Figure 1:

State Equation for
Lithium-Ion Battery. The abovementioned electrical relation for lithium-ion battery presents a continuous-time model, and a discrete model of the battery system is obtained through discretizing the time model. In this way, online parameter identification based on the discrete model is possible. Through Laplace transform of the electrical relation for the lithium-ion battery, the transfer function can be obtained. where Transform Equation (2) using the impulse-invariant method, and we have the discrete transfer function as follows: With Equation (4), the system's difference equation can be written as follows: where a 1 = e −T/CR 2 , and T is the sampling period of the discrete system. Based on the difference equation, the ARX model of the lithium-ion battery can be expressed as follows: The ARX model applies to online parameter identification for lithium-ion batteries. The output is identified as yð kÞ = UðkÞ, the input is IðkÞ, and the parameters to be identified are a 1 , a 2 , and a 3 . Following the step to solve a 1 , a 2 , a 3 , R 1 , R 2 , and C can be decided according to Equation (6).
The SOC reference value applied in this paper is obtained using the Ampere-Hour method. With the Kirchhoff's laws, we combine the first-order RC circuit model and the SOC Ampere-Hour model and present the state space model for the lithium-ion battery as follows: Figure 1: The first-order RC circuit model.

2
International Journal of Photoenergy where EðSOC k Þ represents the electromotive force to the SOC value at time k. The E-SOC curve can also be drawn out through experiments with Q 0 as the capacity of the Liion battery.

MILS Algorithm-Based Parameter Identification of
Lithium-Ion Battery. Based on the traditional recursive least squares algorithm, the multi-innovation least square (MILS) algorithm expands the scalar innovation into vector innovation and uses information matrices in the place of data vectors, which fully applies the limited measurement data. Moreover, the influence of noise on the identification accuracy is also taken into consideration, and the parameters of the system are identified through online iteration, which enhances the innovation use efficiency as well as the convergence speed and identification accuracy [16,17].
Supposing that there exists an autoregressive exogenous model (ARX): where y k is the output, u k is the input, v k is the zero-mean, Gaussian white noise, and A(z) and B(z) represent the delay operators, so Take θ as the parameter vector of the mode: The system innovation is where φ T represents the data vector. Then, we expand the scalar innovation to vector innovation: so the MILS algorithm model can be presented as where p is the innovation length and ϕ T refers to the information matrix. Through derivation, the recursive process of the identification algorithm can be detailed as follows: Update the parameters Update the gain matrix Update the covariance matrix To start the algorithm, the initial values of b θðkÞ and PðkÞ need to be set.

Principle of EnKF-Based SOC Estimation
In ensemble Kalman filter (EnKF), the Monte Carlo method is used to generate the initial set of samples of the state variables where the estimation of all the samples is carried out through the state transition function in view of the state space. Then, we calculate the average of the sample set after state transition and obtain the current state estimation result [18][19][20]. Supposing that there exists a discrete nonlinear system, the EnKF process can be represented as follows: where x k is the state vector, z k is the measurement vector, f ð⋅Þ represents the state transition function, hð⋅Þ indicates the measurement function, w k refers to the process noise, and v k is the measurement noise.
(1) Initialization Generate the ensemble of the initial SOCs of the system fx i 0 g q i=1 using the Monte Carlo method where q is the size of the SOC samples in the set, and the initial state and initial covariance are as follows: (2) State prediction 3 International Journal of Photoenergy At step k − 1 of the system, the set of SOC samples will be fx i k−1 g q i=1 , and the set of state variable prediction will be fx i k|k−1 g q i=1 , which satisfy the following equation: so the one-step ahead prediction iŝ and the one-step ahead prediction covariance will be (3) State correction According to the measurement function of the system, the one-step ahead prediction can be obtained.
which can be rewritten aŝ so the cross-covariance of the state error of the system and the measurement error can be represented as while the system measurement covariance is The Kalman gain matrix is obtained by combing Equation (25) and Equation (26).
Therefore, the estimated value of Kalman filter for the SOC sample will be Obtain U(k) and i(k) Building innovation e(k) and data vector T (k)

Update parameter vector (k) and covaraiance
Update the state space model of Lithium-ion battery Thus, the SOC estimation for Li-ion batteries at k is concluded.
The integrated strategy of MILS algorithm and EnKF algorithm for SOC estimation is mapped in Figure 2.
The terminal voltage UðkÞ and working current iðkÞ data of lithium battery during charging and discharging are tested through experiments, where k is time. In the MILS section, UðkÞ and iðkÞ are read at time k. The MILS algorithm is used to calculate the parameter identification results of R 1 , R 2 , and C in the first-order RC equivalent circuit model of lithium battery at the current moment. The lithium battery state space model is updated according to the current R 1 , R 2 , and C, namely, Equation (8). In the EnKF section, according to the initial SOC value at time k, the initial state set is obtained through Monte Carlo sampling. The predicted value of each element in the state set is calculated by the state space model, and the predicted value of the state set is obtained. The cur-rent Kalman filter gain K k is calculated by the state space model, and the predicted value of the state quantity is modified to obtain the current state estimation result. The above two steps are cycled until all times are traversed to obtain the SOC estimation results of the full-time period.

Experimental Verification
4.1. Experimental Platform. The experimental platform in this paper constitutes the test equipment, thermostat, computer, and the data collection and processing system. The voltage detection error is within the range of ±0.1%, the charge/discharge current detection error is ±0.1%, and the accuracy of temperature measurement is about ±1°C, whereas the data sampling frequency is set at 1 Hz. All the experiments in this paper are carried out at constant temperature, e.g., 25°C, to ensure the consistency of the tests.
The battery selected in this paper is LiFePO 4 battery with a rated terminal voltage of 3.5 V and a rated capacity of 20 Ah. Real-time monitoring and data collection of the battery are performed on the experimental platform. This paper investigates the feasibility of EnKF for SOC estimation of lithium-ion batteries under both the constant current discharge experiment and dynamic stress test (DST).
Experiment 1 (constant current discharge experiment): take a fully charged (SOC value at 100%) LiFePO 4 battery, let it rest for 2 hours, and then discharge the battery at a The current waveform is shown in Figure 3(a). Experiment 2 (cycling dynamic stress test): take a fully charged LiFePO 4 battery (SOC value at 100%), let it rest for 2 hours, and perform a cycling dynamic stress test (DST) according to the Electric Vehicle Battery Test Procedures Manual [21]. When the terminal voltage drops to the cut-off voltage (2.5 V), the experiment ends, and the current waveform is shown in Figure 3(b).

Parameter Identification
Test. This paper first validates the parameter identification method based on the MILS algorithm for lithium-ion batteries. Considering that the parameters of lithium-ion batteries cannot be captured directly, we compare the corresponding terminal voltage of lithium-ion   International Journal of Photoenergy batteries obtained based on the parameter identification results with the measured terminal voltage of lithium-ion batteries, and prove the accuracy of the parameter identification results through the terminal voltage errors mapped in Figure 4. Figure 4 shows that the terminal voltage error remains below 50 mV when the parameter identification results are stable under the two conditions, which indicates a high accuracy with the average error is within 2%.

Speed and Accuracy
Test. In order to verify the tracking performance of the integrated algorithm on the actual SOC value, SOC estimation experiments are carried out with the initial SOC value featuring a certain deviation from the actual value and the initial covariance matrix as the unit matrix. The integrated algorithm is launched with the initial value, and the comparison of the SOC estimation results is shown in Figure 5.
It can be seen from Figure 5 that under the two operating conditions, it takes the UKF algorithm 300 crosssections to return to the true value whereas only 50 are needed for the EnKF algorithm, up to 80% from the UKF algorithm, indicating an improved tracking performance on SOC. Simulation results in the constant current discharge experiment demonstrate that the average error of the SOC estimated value by the UKF algorithm is 1.6966% while the average error remains basically within 1% for 1000 SOC estimations with the EnKF algorithm. The error distribution is mapped in Figure 6(a). Under DST conditions, simulation results present the average error of SOC estimated value with UKF algorithm at 2.0229% whereas the average error remains basically within 1.5% for 1000 SOC estimations with EnKF algorithm. The error distribution is mapped in Figure 6(b).

Conclusions
In view of the strong nonlinear characteristics of lithiumion batteries, the EnKF algorithm integrated with online parameter identification is adopted in this paper to estimate the SOC of lithium-ion batteries under the conditions of constant current discharge experiment and cycling dynamic stress test. The verification results are as follows: (1) For the parameter identification of lithium-ion batteries using MILS algorithm, the identification error is within 2% (2) For the EnKF algorithm, the Monte Carlo method can capture the SOC distribution characteristics more accurately. In this case that there is an error in the given SOC value, its SOC estimated value can quickly return to the true value, thus ensuring fast and accurate tracking of the SOC (3) Calculation results under the two operating conditions demonstrate that the accuracy of the SOC estimation using the EnKF algorithm remains high, which provides solid support for the operation strategy of the battery management system In the subsequent research, it will be of great significance to combine the healthy state of the battery based on SOC and track the charged state of the lithium-ion battery [22][23][24].

Data Availability
The data used to support the findings of this study are included within the article.

Conflicts of Interest
The authors declare that they have no conflicts of interest.