An Adaptive Gain Nonlinear Observer for State of Charge Estimation of Lithium-ion Batteries in Electric Vehicles

The state of charge (SOC) is important for the safety and reliability of battery operation since it indicates the remaining capacity of a battery. However, it is difficult to get an accurate value of SOC, because the SOC cannot be directly measured by a sensor. In this paper, an adaptive gain nonlinear observer (AGNO) for SOC estimation of lithium-ion batteries (LIBs) in electric vehicles (EVs) is proposed. The second-order resistor–capacitor (2RC) equivalent circuit model is used to simulate the dynamic behaviors of a LIB, based on which the state equations are derived to design the AGNO for SOC estimation. The model parameters are identified using the exponential-function fitting method. The sixth-order polynomial function is used to describe the highly nonlinear relationship between the open circuit voltage (OCV) and the SOC. The convergence of the proposed AGNO is proved using the Lyapunov stability theory. Two typical driving cycles, including the New European Driving Cycle (NEDC) and Federal Urban Driving Schedule (FUDS) are adopted to evaluate the performance of the AGNO by comparing with the unscented Kalman filter (UKF) algorithm. The experimental results show that the AGNO has better performance than the UKF algorithm in terms of reducing the computation cost, improving the estimation accuracy and enhancing the convergence ability.


Introduction
With the soaring energy crisis and environmental concerns on exhaust emission from traditional internal combustion engine vehicles (ICEVs), electric vehicles (EVs) have gained increased attention in recent years.An excellent traction battery system is helpful to improve the EVs' performance.Comparing with other battery types, such as lead-acid battery, nickel-cadmium battery, and nickel-metal hydride battery, lithium-ion battery (LIB) has been widely used in EVs due to its merits in terms of high energy and power density, rapid charge and discharge capability, low self-discharge rate and long cycle life [1][2][3].A battery management system (BMS) is important for the safety and reliability of battery operation.The state of charge (SOC) is used to indicate the remaining capacity of a battery, and SOC estimation is one of the most key techniques in the design of BMS.An accurate SOC estimation approach can ease the range anxiety by predicting a reliable driving range, extend the battery cycle life and prevent the battery from over-charging or over-discharging.Unfortunately, the SOC cannot be directly measured, but need be estimated by a mathematical algorithm based on the measured signals such as the voltage, current and temperature.
To get an accurate value of SOC, a number of estimation methods have been proposed, such as the ampere-hour (A•h) counting, artificial neural networks (ANNs), support vector machine (SVM), particle filter (PF), sliding mode observer (SMO), and Kalman filter (e.g., extend Kalman filter (EKF) and unscented Kalman filter (UKF)).The A•h method [4] is simple and can be easily implemented in hardware.However, it suffers accumulated errors caused by current measurement drift and cannot deal with the initial SOC error problem.The ANNs [5][6][7] and SVM [8,9] methods can be used to estimate the SOC for all kinds of batteries because they do not require the details of batteries.However, they require a large number of sample data to train the networks.Additionally, they demand more powerful data processing chips to handle the massive computation, leading to the increase of hardware cost.The PF [10][11][12] uses weighted random samples called particles that are sampled by the Monte Carlo method to approximate the post priority density of the system.It can be used for SOC estimation of nonlinear battery systems with a non-Gaussian distribution and is not sensitive to the dimension of the system.However, this method requires a massive number of particles and numerous matrix operations, so it has high requirements for hardware.The SMO [13][14][15][16] is a reliable and robust method for SOC estimation in terms of model uncertainties and external disturbances.However, it is difficult to design the optimal SMO parameters, such as uncertainty boundaries and switching gains.Besides, the SMO requires the observation equation of the battery model to be linear, which leads to the increase of SOC estimation error.
The EKF [17][18][19][20][21][22][23][24][25][26][27] transforms a nonlinear system into a linear system by linearizing the nonlinear function based on the first-order Taylor series expansion, which results in large linearization error and the instability of the filter for highly nonlinear battery systems in EVs.Furthermore, the EKF has to compute the complicated Jacobian matrix, leading to the increase of computation cost and the instability of the filter [16].Although the Jacobian matrix can be easily computed analytically and calculate online [17][18][19] when the battery equivalent circuit models (BECMs) are used, the computation of the high-order Jacobian matrix increases the computational burden of the hardware.In addition to this, the case will be severer when more complicated open circuit voltage (OCV)-SOC relationships are used.Instead of the local linearization in the EKF, the UKF [28][29][30][31][32][33] uses an unscented transformation to approximate the state distribution with a set of sample points called as sigma points, which capture the mean and covariance of the state distribution.Comparing with the EKF, the UKF offers better SOC estimation results in terms of accuracy and robustness [34,35].Unfortunately, the UKF also has high requirements for hardware due to the large number of complicated matrix operations.
In summary, each one of the existed methods has its own advantages and disadvantages in certain aspects.In this paper, a novel approach for SOC estimation using an adaptive gain nonlinear observer (AGNO) is proposed.This method does not demand complicated matrix operations, so it can reduce the computation cost.Additionally, the observer gain is adaptively updated according to the estimation error, so it is robust against the measurement error and parameter uncertainties.Comparing with the UKF method, the proposed method can reduce the computation cost, improve the estimation accuracy and expedite the convergence rate.
The remaining parts of this paper are organized as follows: in Section 2, the state equations based on the second-order resistor-capacitor (2RC) BECM are derived, and the model parameters are identified; in Section 3, the AGNO for SOC estimation is designed, and the convergence of the observer is proved using the Lyapunov stability theory; experimental results and discussion are presented in Section 4; finally, the key points of the paper are concluded in Section 5.

Battery Equivalent Circuit Model
A precise battery model is essential to improve the accuracy of SOC estimation.The equivalent circuit model that consists of resistors, capacitors and inductors, performs well in describing the dynamic characteristics of a LIB [27,36].It has been demonstrated that adding resistor-capacitor (RC) networks can improve the model accuracy, however adding more complexity beyond two RC networks is not helpful [36].Therefore, in this paper the 2RC BECM with two RC networks is used to ensure the model accuracy.The schematic diagram of the 2RC BECM is shown in Figure 1, where Ro is the ohmic resistance; Rp1 and Cp1 respectively are the activation polarization resistance and capacitance; Rp2 and Cp2 respectively are the concentration polarization resistance and capacitance.
The electrical behavior of the 2RC BECM shown in Figure 1 can be expressed as follows: where Up1 and Up2 respectively are the terminal voltage of Cp1 and Cp2; Ub and Ib respectively are the battery's terminal voltage and current; and Uoc represents the OCV which is related with the value of SOC.

Model Parameters Determination
To acquire data to determine the relationship of OCV versus SOC, a test was performed on a LIB.The test procedure is listed as follows: (1) the battery is firstly charged to the fully charged state with the standard charging method at the room temperature, and then it is left in the open-circuit condition for 5 h; In this paper, the exponential-function fitting method is employed to obtain the circuit parameters (e.g., Ro, Rp1, Cp1, Rp2 and Cp2) of the BECM in Figure 1 from the transient response of terminal voltage by executing a pulse-current discharging process at the room temperature.The pulse-current consists of a 300-s constant pulse period, in which the amplitude of the current is 2.15 A (about 1C), and a 1700-s rest period.The corresponding transient response of terminal voltage is shown in Figure 3.According to Figure 3, the variation of terminal voltage during the relaxation period can be formulated as: On the other hand, based on Figure 1, the terminal voltage can be expressed as: where τ1 = Rp1Cp1 and τ2 = Rp2Cp2.
Comparing Equation (4) with Equation ( 5), the parameters Rp1, Cp1, Rp2 and Cp2 can be obtained as: Since the step-variation of terminal voltage is consistent with the pure resistance characteristic at the instant of current disappearance, the ohmic resistance can be regarded as the unique factor, causing the voltage drop at this moment [37].Thus, the ohmic resistance can be obtained by: where ΔU stands for the step-variation of terminal voltage at the moment of discharge stopping, and in this paper, its value is selected as the voltage variation in 4 s since the discharge current stops, because the voltage rapidly changes during this time.
The identified parameters of the 2RC BECM are listed as follows: 0077 Ω, and Cp2 = 15,428 F.

Design of Adaptive Gain Nonlinear Observer for State of Charge Estimation
Observers are widely used to solve the state estimation problems.For example, the SMO was used to estimate the SOC of LIBs [13][14][15][16].However, it requires a linear function of OCV versus SOC, leading to large model error because of the highly nonlinear relationship between the OCV and the SOC shown in Figure 2.An adaptive Luenberger observer [38] was designed to be valid and suitable for state estimation of nonlinear stochastic dynamical systems.Unfortunately, it has to calculate the complicated Jacobian matrix, resulting in the increase of computation cost and the complexity of implementation.Several nonlinear observers were developed to solve conventional nonlinear problems [39,40], but they can only applied in the systems with nonlinear state equations and linear output equations.For a battery system, a linear output equation will lead to the increase of SOC estimation error because of the enlarged model error.Besides, one of the most key and difficult aspects in the design of observers for state estimation is to select the appropriate gains to reduce the deviation.To resolve these problems, an AGNO for SOC estimation is proposed in this paper.It is suitable for nonlinear stochastic dynamical systems with nonlinear output equations.Besides, it need not calculate the Jacobian matrix.Furthermore, the observer gain is adaptively updated with the observation error.The proposed AGNO is introduced as follows: Based on Equation ( 1), the state equation can be derived as: where T p1 p2 x U U SOC      is the state vector; u = Ib,  ; and x  represents the derivative of x.
Based on Equation (2), the output equation can be derived as: where The derivative of h(x) can be obtained as: where: According to Equation ( 9), it can be seen that the output equation is nonlinear.The nonlinear observer for state equation in Equation ( 7) is designed as [41]: where K is the gain matrix; and x is the observation value of x.
Based on Equation ( 8), the observation value of y can be obtained as: Then, the observation error can be expressed as: where x e x x   , and ξ is an intermediate variable to obtain ey.
Then, Equation ( 10) can be rewritten as: ˆˆˆ( ) ( ) Subtracting Equation ( 13) from Equation (7) gives the dynamical reconstruction error system as: The gain matrix K is a symmetric and positive definite solution to the Lyapunov equation shown in Equation ( 15) [41]: where the rank of matrix Q is equal to that of A; and the eigenvalues of Q are always bigger than zero.Therefore, K −1 and K are positive definite matrixes.By selecting matrix Q as: Then, by substituting the value of matrix A into Equation ( 15), the value of K can be obtained as: where k 1 , k 2 and k 3 are positive constants.The Lyapunov stability theory is used to prove the convergence of the nonlinear observer and the corresponding function is selected as: Then, the derivative of V(ex) is derived as: ( 2 )

V e e K e e K e A Kh h e K e e K A Kh h e e A K e e K Ae e h hK K e e h hKK e e Q e e h h e e Q h h e
Based on Equations ( 9) and ( 16), it can be obtained that: The principal submatrices of 2 T Q h h    can be derived as: As mentioned above, k1, k2 and k3 are positive, hence: According to the Sylvester Criterion, Therefore: Thus, ( ) x V e  is negative definite and the error system in Equation ( 14) is asymptotically stable.
The dynamical system in Equations ( 10) and ( 11) can be regarded as an observer for the system in Equations ( 7) and ( 8).In this paper, the gain matrix K is updated by the following adaptive law:   where parameter α is a scale factor used to adaptively adjust the convergence rate of the nonlinear observer based on the voltage error, which will be verified in Section 4.

Experimental Setup
The configuration of battery test bench is shown in Figure 4.It consists of: (1) a LIB; (2) a switcher; (3) a BMS module; (4) a power supply; (5) a programmable electric load; (6) a controller area network (CAN) communication unit; and (7) a host computer.The battery used in this test is a Samsung ICR18650-22F-typed LIB (Seoul, Korea), whose nominal voltage and nominal capacity are 3.62 V and 2.2 A•h, respectively.The switcher is used to charge the battery with the power supply or discharge the battery with the programmable electric load.The BMS module is adopted to sample the battery's voltage and current, transmit them to the host computer and send the control command to the switcher through the CAN communication unit.The host computer is used to calculate the model parameters and estimate the battery's SOC.A key aspect in the design of SOC estimation algorithms is setting reference values to which the estimated results are compared.In this paper, the reference SOC is acquired with the A•h method.In order to overcome the two critical shortcomings of A•h method: depending on initial SOC value and suffering accumulated error, two methods are used as follows: (1) The battery is fully charged before it is discharged, thus, the initial SOC value can be accurately determined to be 100%; (2) A high precise current sensor is adopted to measure the battery current, so it is regarded that the measured current is accurate enough to eliminate the accumulated error.
To evaluate the performance of various SOC estimation algorithms under the typical loading conditions when the EVs are on road, kinds of dynamic driving cycles have been developed.In this paper, the common two driving cycles, the 1184-s New European Driving Cycle (NEDC) [27,35] and 1372-s Federal Urban Driving Schedule (FUDS) [26,42] are used to verify and evaluate the performance of the proposed SOC estimation method.The current profiles of NEDC and FUDS are shown in Figure 5, and the corresponding terminal voltage profiles are shown in Figure 6.

Results and Discussion
To evaluate the performance of the proposed AGNO, it is compared with one of the well-established and recently common used algorithm, namely, UKF in terms of estimation accuracy, computation cost and convergence rate.The reason of comparing with UKF algorithm is that it has been demonstrated to be a good method for SOC estimation of LIBs [34,35].More details about the UKF algorithm can be found in references [28][29][30][31][32][33]. Figure 7 shows the comparison results of SOC estimation with accurate initial SOC value under the NEDC test, while Figure 8 shows that under the FUDS test.The comparison results of maximum error, root mean square error (RMSE) and computation cost are shown in Table 1.It can be found that the RMSEs are bounded in ±5% with the UKF algorithm under the NEDC test, while the value is ±4% under the FUDS test.Comparing with the UKF, the AGNO can track the reference SOC with smaller chattering ripples, and the estimation errors are bounded in ±4% and ±3%, respectively.Additionally, the AGNO can greatly reduce the computation cost as compared with the UKF algorithm.To further evaluate the robustness of the proposed AGNO against the initial SOC error, the RMSEs of SOC estimation with different initial SOCs from 0% to 100% in the step of 10% under the NEDC and FUDS tests are summarized in Tables 2 and 3, respectively.It can be seen that the RMSEs with the proposed AGNO are always lower than that with the UKF under both tests.In addition to this, the smaller the initial SOC, the bigger difference of the RMSE is going to be.This further proves that the proposed AGNO can improve the SOC estimation accuracy as compared with the UKF method.A faster convergence rate is helpful to improve the capability to track the reference SOC under the condition that the initial SOC is inaccurate.The proposed AGNO performs different convergence ability with different values of the scale factor (α), as shown in Figures 9 and 10.It should be pointed out that the selection of parameter α is based on the boundaries of voltage error and gain matrix (K). Figure 9a shows the SOC estimation results with different scale factors under the NEDC test, while Figure 9b shows the results under the FUDS test.Figure 10 shows the corresponding SOC estimation error.Additionally, the comparison results of convergence rate and SOC estimation error are summarized in Table 4.It can be seen that a bigger scale factor leads to a faster convergence rate and a smaller RMSE.The reason is that the observer gain increases with the increase of scale factor.Furthermore, the convergence rate slightly increases when the scale factor exceeds three.It should be pointed out that the SOC estimation error slightly fluctuates with the increase of scale factor, as shown in Figure 10.Therefore, an appropriate scale factor should be selected to make a trade-off between the convergence rate and the fluctuation of estimation error.
The UKF algorithm has been demonstrated to have a better convergence ability than the EKF algorithm [34,35].Therefore, the condition with a scale factor of 1 and an initial SOC of 50% under the NEDC test is taken as an example to further evaluate the convergence performance of the proposed AGNO by comparing with the UKF algorithm.The comparison results are shown in Figure 11.It is indicated that the proposed AGNO can track the reference SOC within 165 s with an absolute error of 5% and within in 200 s with an absolute error of 3%, while it, respectively, takes about 380 s and 500 s to converge to the same error bounds with the UKF algorithm.Therefore, the proposed AGNO can improve the convergence ability compared with the UKF.A well-known fact is that the characteristic of the battery is affected by various factors, such as the operating temperature, current rate, and battery aging [43,44].In this paper, different OCV-SOC relationships are taken as an example to study the influence of battery characteristic variation on the SOC estimation accuracy.As an example, the SOC estimation results with the UKF algorithm based on different OCV-SOC relationships under the NEDC test are shown in Figure 12, and the results with the AGNO algorithms under the same conditions are shown in Figure 13.It can be seen that both UKF and AGNO approaches are sensitive to the OCV errors, but the AGNO performs better with a lower fluctuation.Therefore, an accurate OCV-SOC function is crucial to battery SOC estimation.Such an issue can be ensured with two potential methods, including: (1) correction on OCV-SOC function based on experimental data that covers the life cycle of cells; and (2) real-time updating technique of OCV.The former is time consuming, laborious, and error-prone.Therefore, the latter may be a better choice.

Conclusions
In this paper, an AGNO has been proposed to estimate the SOC of LIBs in EVs.The 2RC BECM is adopted to simulate the dynamic behaviors of a LIB, based on which the state equations are derived to design the observer.The parameters of the battery model are identified using the exponential-function fitting method.The highly nonlinear relationship between the OCV and the SOC is described with a sixth-order polynomial function.The convergence of the proposed observer is proved by the Lyapunov stability theory.One important characteristic of the proposed method is that the observer gain is adaptively updated according to the observation error.Experiments based on the NEDC and the FUDS are carried out to evaluate the performance of the proposed observer by comparing with the UKF algorithm.The experimental results show that the proposed AGNO can reduce the computation cost, improve the SOC estimation accuracy and enhance the convergence ability as compared with the UKF algorithm.Therefore, the proposed AGNO can be used to estimate the SOC of LIBs in EVs online.In addition, both UKF and AGNO approaches are sensitive to the OCV errors, but the AGNO performs better with a lower fluctuation.Therefore, a precise OCV-SOC relationship is crucial to improve the accuracy of battery SOC estimation.
It is noted that the SOC estimation error slightly fluctuates with the increase of scale factor, so an appropriate scale factor should be selected to make a trade-off between the convergence rate and the fluctuation of estimation error.Therefore, selecting an optimal scale factor will be studied in the future work.In addition, future research will also focus on the robustness of the AGNO algorithm against parameter uncertainties of the battery model by using parameters at different conditions.

Figure 4 .
Figure 4. Configuration of battery test bench.CAN: controller area network; and BMS: battery management system.

Figure 9 .
Figure 9. Convergence rate of AGNO with different scale factors: (a) NEDC test; and (b) FUDS test.

Figure 10 .
Figure 10.SOC estimation error of AGNO with different scale factors: (a) NEDC test; and (b) FUDS test.

Figure 11 .
Figure 11.Comparison of convergence rate under NEDC test: (a) SOC; and (b) SOC error.

Figure 12 .
Figure 12.SOC estimation with UKF based on different OCV-SOC relationships under NEDC test: (a) SOC; and (b) SOC error.

Figure 13 .
Figure 13.SOC estimation with AGNO based on different OCV-SOC relationships under NEDC test: (a) SOC; and (b) SOC error.

Table 1 .
Comparison of SOC estimation and computation cost.RMSE: root mean square error.

Table 4 .
Comparison of convergnece rate and SOC estimation error.