{'fraction_non_alphanumeric': 0.03403124392299216, 'fraction_numerical': 0.009528748298437804, 'mean_word_length': 4.863930064614215, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Estimation of lithium-ion battery state-of-charge using an extended kalman filter

Received Oct 27, 2020 Revised Feb 19, 2021 Accepted May 28, 2021 The main goal of a battery management system (BMS) is to estimate parameters descriptive of the battery pack operating conditions in real-time. One of the most critical aspects of BMS systems is estimating the battery's state of charge (SOC). However, in the case of a lithium-ion battery, it is not easy to provide an accurate estimate of the state of charge. In the present paper we propose a mechanism based on an extended kalman filter (EKF) to improve the state-of-charge estimation accuracy on lithium-ion cells. The paper covers the cell modeling and the system parameters identification requirements, the experimental tests, and results analysis. We first established a mathematical model representing the dynamics of a cell. We adopted a model that comprehends terms that describe the dynamic parameters like SOC, open-circuit voltage, transfer resistance, ohmic loss, diffusion capacitance, and resistance. Then, we performed the appropriate battery discharge tests to identify the parameters of the model. Finally, the EKF filter applied to the cell test data has shown high precision in SOC estimation, even in a noisy system.


INTRODUCTION
Batteries have become the essential limiting factor for several applications, including portable electronic devices and electric/hybrid vehicles, to mention but a few. Furthermore, Batteries have shown many drawbacks in various aspects. They have smaller energy and power densities compared to fossil fuels, their lifetime is uncertain, and their behavior and characteristics are changing over time [1], [2]. In recent years, lithium-ion batteries (Li-ion) have risen as the preferred technology for portable devices and transportation applications because of their excellent chemical composition, good lifetime, and better efficiency compared to other battery types. However, a Li-ion battery requires a battery management system (BMS) assuring power control and general enhanced stability. A battery management system is mandatory to maintain optimal battery performance. The key part of a BMS is that it permits the battery state of charge (SOC) estimation in real-time; hence, the available capacity can be determined. With the estimated SOC, BMS can optimize battery energy efficiency, predict the state variables, and protect batteries from overcharging and over-discharging. We define the SOC as the amount of energy left in a battery compared to the initial energy when it was fully charged. "Obviously, from a practical point of view, we cannot measure SOC directly according to its definition without varying it dramatically" [3]. Multiple studies have proposed many different SOC estimation methods. The simplest and most used method is coulomb counting (counting amp-hours) [4], [5]. Nevertheless, this strategy is based on an open-loop algorithm that has the disadvantage of a significant measurement error accumulation due, especially to uncertain disturbances and the difficulty of accurately determining the SOC initial value [3]. The open-circuit battery voltage (OCV) measurement method is also used. However, it requires a sufficient rest period to ensure a stable battery voltage.
A couple of new methods based on neural networks and fuzzy logic [6]- [9] were discussed in the literature. They depend on intelligence-based and computational algorithms, involve many training sample data, and are rarely realized in real-time applications. Hybrid simplified kalman filter [10], linear kalman filter (KF), extended kalman filter (EKF) [11]- [18], and the unscented kalman filter [19]- [21] were also proposed. The state of charge (SOC) model-free tuning method is mainly used in the hybrid electric vehicle system. "The methodology focuses on the variable SOC target governed by a linear equation of the actual vehicle speed" [22]. The KF is a recursive algorithm for SOC estimation. It has the advantage of assuring an optimal estimate of the state of charge even in the presence of noisy disturbances. Besides, KF based methods do not require accurate knowledge of the SOC initial value [23]. EKF algorithm is used not only for the battery model parameters identification but also for SOC estimation in real-time operation [17], [24]. It is primarily suitable for dynamic systems. Moreover, good precision in battery SOC estimate depends heavily on the battery model precision, parameters initial values, and predetermined variables, even in case of system noise such as covariance matrix relevance and average value.
In this paper, a lithium-ion battery (nominal capacity of 1.8 Ah) is selected as the object of our research investigation. EKF is applied to our Thevenin model to estimate SOC. It allows the SOC value to be continuously corrected and adjusted in real-time. Based on the analysis of many experiments on SOC (as detailed in the following sections), one could conclude that EKF produces a good and accurate estimate of SOC, even for a noisy system.

BATTERY MODELING AND PARAMETERS IDENTIFICATION
Different modeling methods are mentioned in several papers. Recently, equivalent circuits and electrochemical models are the most cited and most widely used in battery modeling. So far, many models based on various assumptions have been proposed for the dynamic modelling of lead-acid batteries. The following works can be referred to:-Battery modeling using the Thevenin model [12], where the temperature is assumed to be constant; -"Dynamic modeling of afuel cell by Bruno Francois [25]. In the later model, all parameters are supposed to be constant; -Nonlinear time series models using neural network systems have also been used to enhance the existing nonlinear dynamic models" [26].
A SOC estimation process is based on a model that replicates internal battery state variables such as open-circuit voltage (OCV) and SOC, among other parameters. The lithium-ion battery system's SOC prediction model is developed using support vector machine modeling (SVM) [27]. The cell is considered as a nonlinear dynamic system that can be represented by a state-space as: "Where X is the state vector defining the system states. U represents the current I, and Y is the output of the measuring system. W is the unmeasured "process noise" that affects the state of the system. V is the measurement noise not affecting the state of the system but results in the output. Moreover, W and V are assumed to be Gaussian white noise with zero mean and zero covariance. F(X,U) and G(X,U) are functions specified by the model" [28]. The equivalent circuit model for a lithium battery [18] is shown in Figure 1.
Vocv is the open-circuit voltage; the surface capacitance C1 represents battery diffusion effects. The resistors Rin and R1 are (respectively) the internal resistance and transfer resistance. V1 is the voltage across the surface capacitor; VT and I are, respectively, the battery terminal voltage and current. From Figure 1, the battery terminal voltage can be written as : Experimental discharge results on the Li-ion battery see Figure 2 helped define a relationship between the open-circuit voltage and battery charge (OCV-SOC). In fact, this function plays a central role in terms of accuracy in estimating the load state. As a result, we can say that this relationship is the added value

1761
of the method developed in our current work. The SOC (Vocv) curve is built from the experimental discharge results carried out on the Li-ion battery see Figure 2. The SOC is related to Vocv as: With 1 = 3.56, 2 = 0.356 3 = 0.2827 In this regard, it should be noted that the values of the above parameters depend on the chosen cell. After a rest period, Vocv can be easily measured while the battery is in an open-circuit state. Therefore, SOC can be estimated using (3). However, this case is not always feasible, especially in real-time operation. In effect, while the battery is connected to the system, it will be very difficult to obtain information on SOC since the battery's internal impedance can't be measured during the discharge process (presence of the current I). Therefore, To make the SOC estimate easier, the open-circuit voltage must also be measured in real-time conditions. (as illustrated in (3)). In (4) represents the voltage V1 across the capacitor C1: One of the most critical pieces of information in a BMS is the state of charge, a cell's internal state [14] that we cannot explicitly measure during battery operation. As a result, estimating the SOC value is the only option.
where: I: the battery terminal current Ah:the battery capacity in A.h SOCinitial: the initial state of charge SOCbatt: the battery SOC The model parameters are extracted from the Lithium-ion battery voltage response, resulting from the constant current pulse discharge test. Figure 3 and Figure 4 illustrate cell voltage response and current pulse, respectively.
The cell diffusion resistance R1 is determined on the voltage curve from the initial instant of the immediate rise in voltage and the moment it reaches a pseudo-stable value during the established regime. We divide ∆U voltage by discharge test constant current (I=1.799A). Accordingly, R1 is determined as: The ratio of the battery model time constant to the diffusion resistance is used to determine the diffusion capacity C1. From the Figure 4, the C1 discharge time constant is determined as: is the time required to reach (1 − 1 / e) ≈ 63.2% of ∆ see Figure 4. Therefore, the diffusion capacity is: The Table 1 shows the battery model parameters:

1763
R1 and C1 are dynamic parameters, but for the sake of simplicity, they have been kept constant in the following, as their variation is not significant during battery charging and discharging. To validate the calculated parameters, we compared the voltage measured value and the estimated one, as illustrated in Figure 5. The discharge tests performed on the cell included a series of constant current discharge pulses followed by rest intervals. The current profile of the experiment is shown in Figure 5 (a). We can see, according to Figure 5 (b-c), that the estimated voltage curve perfectly follows the measured voltage one with a small maximum error of 0.04V. These results confirm that the estimated SOC curve converges towards the real one. This validates the accurateness of the adopted model.

USING EXTENDED KALMAN FILTER FOR SOC ESTIMATION
The kalman filter is the most widely used method in tracking technologies. It is also applied as an estimation algorithm in linear systems. Under the designation of EKF, it has been adapted for nonlinear systems [29]. The EKF is especially used for prediction in dynamic systems, like tracking, navigation, and global positioning. The EKF has recently entered the battery field. The kalman filter concept is based on recursive mathematical equations that allow the repetition of calculations at every step. The system's output relies on the prior input so that the state vector depends on the current output as a function of its input.
Moreover, the battery is intrinsically a nonlinear system because of its dynamic behavior, on the one hand, and the current and voltage sensors, on the other. In the battery model, the voltage is the output and the current is the input. Each sampling period's state is calculated and assessed by an observer. Furthermore, the observer is tuned to track all system parameters. In this regard, a specific state variable represents a parameter. Battery systems are inherently nonlinear. Therefore, in this chapter, the EKF, with a linearization process, is investigated. The equations system represents our nonlinear system: ( , ) and ( , ) functions are linearized using a first-order Taylor series expansion around the point =̂− 1 for the process model, and =̂− for the measurement model. We assume that both functions are differentiable at all operating points, as shown in (12)- (13).
By substituting (12) and (13), in (10) and (11), the linearized process and measurement models become: We define ̂ and ̂ as: Recursive steps of the extended kalman filter algorithm can be summarized as: a. Initialize the original parameters.
b. Estimate the predicted state c. Update estimate covariance d. Determine near-optimal kalman gain e. Update state estimate f. Predict estimate covariance g. Repeat the recursive filter calculation from step 2 to step 6 The discrete extended kalman estimator for the lithium-ion cell is derived from the previously constructed model. The states used to model the behavior of the battery are: The battery current is the process control variable = .
Both the current integration process expression and the Thevenin model mathematical relations are discretized and linearized to define the state transition as: With = 1 1 and ∆ : sampling period. The measured (observable) parameters are limited to the cell terminals voltage. Thus, the measurement vector is = . The observation is given: We must determine the two Jacobians in order to use this model in the EKF. As a result, the state transition equations' derivative with respect to state variables is: According to the state variables, the observation derivative is: After computing, we obtain: Figure 6 illustrates the test bench used for discharge tests. It includes a 1.8Ah Li-ion cell and a programmable DC electronic loads. Discharge tests are carried out on a fully charged battery cell. The aim is to compare the experimental results of SOC estimate with the reference values. Figure 7 (a-b) shows results for the case in which the SOC estimate and its reference have the same initial value, while Figure 8   Results detailed below show that the SOC estimate has a maximum error of 1%. This error is inherent to modeling errors. The results show that the calculated cell model parameters produce high accuracy in open-circuit voltage estimation. While the function between VOCV and SOC leads to good accuracy in SOC estimation. We notice, as well, that the extended kalman filter observer algorithm quickly converges to the SOC reference with high accuracy, despite the fact that the reference initial value differs from SOC's initial value.

CONCLUSION
In the present paper, we determined the main three parameters of the battery Thevenin model (ohmic resistance, polarization resistance, polarization capacitance) through experimental discharge tests. Moreover, tests were conducted to establish a connection between the cell open-circuit voltage and the stateof-charge. This relationship plays a key role in accurately estimating the state of charge of the battery. This relationship varies from cell to cell, depending on the cell's constituent materials. Then, an EKF algorithm based on the Thevenin model was established. EKF performances were assessed by carrying out constant current discharge experimental tests. According to the comparison analysis between experimental results and reference values, EKF based on the Thevenin model has shown a good accuracy performance in SOC estimate. Furthermore, the results met the precision and rapid convergence requirements in SOC estimate, with an error of less than 1%, independently of the initial value. SOC estimation combined with a real-time parameters identification approach for the dynamic battery model will be the subject of future research.