A State of Charge Estimation Method for Lithium-Ion Battery Using PID Compensator-Based Adaptive Extended Kalman Filter

With the widespread application of electric vehicles, the study of the power lithium-ion battery (LIB) has broad prospects and great academic significance. +e state of charge (SOC) is one of the key parts in battery management system (BMS), which is used to provide guarantee for the safe and efficient operation of LIB. To obtain the reliable SOC estimation result under the influence of simple model and measurement noise, a novel estimation method with adaptive feedback compensator is presented in this paper. +e simplified dynamic external electrical characteristic of LIB is represented by the one-order+evenin equivalent circuit model (ECM) and then the ECM parameters are identified by the forgetting factor recursive least squares method (FFRLS). Fully taking into account the feedback effect of terminal voltage innovation, the combination of adaptive extended Kalman filter (AEKF) and innovation vector-based proportional-integral-derivative (PID) feedback is proposed to estimate the LIB SOC. +e common single proportional feedback of Kalman filter (KF) is replaced by the innovation vector-based PID feedback, which means that the multiple prior terminal voltage innovation is used in the measurement correction step of KF.+e results reveal that the AEKFwith PID feedback compensation strategy can improve the SOC estimation performance compared with the common AEKF, and it reveals good robust capability and rapid convergence speed for initial SOC errors. +e maximum absolute error and average absolute error for SOC estimation are close to 4% and 2.6%, respectively.


Introduction
Since the urgent demand for a decrease in global petroleum consumption and environmental depredation, the exploration of renewable energy has become a global consensus. Over the past decade, the application of new energy electric vehicles (EVs) has become a hotspot of the motor industry because of its merit of zero emission, energy source diversification, and clean energy [1]. Due to the significant advantage of high energy density, low self-discharge, high voltage, long cyclic life, and desirable safety, the lithium-ion battery (LIB) has become the main energy source of EVs. In order to ensure the safe and effective charging or discharging of LIB in EVs, the battery management system (BMS) is well designed to manage the LIB [2,3]. e state of charge (SOC) which used residual capacity to qualify LIB performance is one of the most core functionalities that need to be strictly managed by the BMS under the actual complicated conditions. Due to the negative impact of imprecise measurement and open-loop control, the SOC cannot be observed directly by vehicle-mounted transducer and Ampere-hour counting method. e SOC of LIB is essentially dependent on various SOC estimation methods based on its relevant characteristics, such as charge-discharge current, temperature, and terminal voltage [4,5].
In the past years, numerous researchers have put forward relevant methods to increase the performance of SOC estimation. In general, these methods can be classified into three categories: open-loop based method, model-free based method, and closed-loop model-based method. e openloop based method includes Ampere-hour counting (Ahcounting) [6] and open-circuit voltage (OCV) lookup table [7]. e Ah-counting is the most widely used method with summation of current, which is simple and easy for implementation but it is subjected to relevant errors, such as initial error, cumulative error, and truncation error. e OCV method uses nonlinear fitting function to represent the relationship between OCV and SOC directly [8]. However, until the long rest time, the OCV cannot completely equal the terminal voltage and the error sensitivity of OCV easily causes an increase of SOC estimation error due to the local flat platform effect of the OCV-SOC fitting curve [9]. Beyond that, the model-free-based method is developed as a black box, and the nonlinear relationship between parameters and state is established by learning the train data such as terminal voltage, charge-discharge current, temperature, and cycles. Several model-free-based methods including neural network (NN) [10,11] and fuzzy logic [12,13] are developed for SOC estimation with positive results. Although these methods can reduce BMS's dependency on the accuracy of measurement data, the BMS is subjected to its processing power, storage capacity, and operational cost. According to the above methods' drawbacks, the closed-loop model-based method is proposed to address this concern [14]. In the model-based methods, the appropriate model choice is the precondition of SOC estimation in BMS. Compared with the complex electrochemical model [15], the equivalent circuit model (ECM) only needs a simple circuit network to represent the external characteristics of LIB [16,17]. In [18], the first-order ECM is used to model the dynamic response of LIB, and the ECM parameters are identified by recursive least squares (RLS) with bias compensation.
Various forms of Kalman filters (KF) are widely applied for ECM-based state estimation by regarding the SOC as one of the state observers [19,20]. Since the basic KF is essentially unsuitable for LIB with a strong nonlinear feature, some general improved KF are used for SOC estimation, such as extended Kalman filter (EKF) [21], unscented Kalman filter (UKF) [22], cubature Kalman filter (CKF) [23], and H-Infinite filter (HIF) [17]. e EKF with proportional-integral regulation is used for SOC estimation based on ECM with a resistance-capacitance network [24]. e major disadvantage of EKF is that only one-order Taylor series expansion is used to approximate the nonlinear state of LIB, and the higher-order expansion terms are ignored, which inevitably brings about linearization error [25]. e UKF is developed for SOC estimation of LIB by using the unscented transformation (UT) to replace the multiorder Taylor series expansion [26]. Because the UT is used for approximating the SOC distribution characteristic without the Jacobian matrix, the SOC estimation result shows that the UKF has better performance than the EKF in robustness and precision.
e CKF with radial-spherical cubature rule is adopted to estimate LIB SOC, and the estimation results show that the CKF is better than EKF and UKF in terms of accuracy and stability [23,27]. Although the EKF is weaker than UKF and CKF in estimation precision and filter convergence, the symmetric nonnegative definition of prior information matrix in UKF and CKF is not guaranteed all the time. In addition, several hybrid methods such as NN based adaptive CKF [33] and EKF [34] are proposed to estimate battery SOC. For the potential impact of inaccuracy or unknown noise, the KF with adaptive strategy are proposed to improve the SOC estimation accuracy and robustness [28,29]. In summary, the basic idea of the KF based SOC estimation methods is to use prior data, such as charge-discharge current and terminal voltage, to obtain the optimal KF gain and thus get the estimation of SOC. e KF gain multiplying the single innovation can be considered as a single feedback unit of which the input and output are the terminal voltage error and measurement correction, respectively. us, the single feedback unit could be considered as a feedback controller of KF, which contains only a proportional regulating function. e purpose of such a controller is to force the estimated terminal voltage to approach the measured terminal voltage, which eventually forces the state of the ECM convergence to the true state of the LIB. e main contribution of this paper includes the following: on the basis of the original KF, the integral and differential terms of voltage deviation are introduced into the single feedback unit of KF to describe the richer historical data and trends of voltage deviation. e single proportional feedback in KF is replaced by the proportionalintegral-differential feedback, which can be referred to as a PID feedback controller in KF.
at is, for the battery system, the differential and integral item of terminal voltage error deduced from the innovation vector is added to the measurement correction step of posterior estimation which is only a proportional term in the original KF. e simulation result validates that the proposed SOC estimator established by the combination of AEKF-PID and one-order evenin battery model could adapt itself to the nonlinear characteristics of the LIB system. Compared with the AEKF, the proposed AEKF-PID method has better performance in robustness and precision. e rest of the paper is arranged as follows. e simple one-order ECM is used to describe the LIB model and the RLS method with forgetting factor is used for parameters identification in Section 2. e combination of PID feedback unit based on innovation vector theory and AEKF based on noise covariance matching is introduced in Section 3. Section 4 shows the simulation and experimental results under various conditions. Finally, the main conclusions and subsequent plan are listed in Section 5.

Basic ECM.
Compared with the electrochemical model, the ECM intuitively reflects the relationship between LIB's input and output, which is conducive to battery characteristics analysis and model parameter identification [30]. e higher the order of the RC network in the ECM is, the closer the battery characteristics described by the ECM are to the actual battery characteristics. However, the complexity of the model also increases with the increase of order, which is not suitable for the real-time calculation of electric vehicle BMS. Taking into account the complexity of the ECM, engineering application, and other factors, the paper takes the first-order evenin ECM as the simplified battery mathematical model, as shown in Figure 1.

Complexity
According to the one-order ECM, its mathematical model can be expressed as where V oc shows the OCV, R 0 is the ohmic resistance, R P C p includes the polarization resistance R P and polarization capacitance C p , V p represents the polarization voltage on R P C p , I is the charge/discharge current, and V out represents the terminal voltage.
Rewrite equation (1) as frequency domain expression using Laplace transform; the symbol V p of polarization voltage can be eliminated: e corresponding transfer function G(s) of ECM can be formulated as e sdomain can be mapped to the z domain by bilinear transformation method: e discrete form of equation (1) can be represented as Since the OCV has a correlation with SOC and temperature, the OCV is usually expressed as V oc,k � f(soc, temp). SOC can be considered as constant under certain conditions including one second sampling time and constant temperature.
at is, ΔV oc,k � V oc,k − V oc,k− 1 � 0. en, equation (4) can be rewritten as e model parameters R 0 , R p , and C p can be obtained from a 1 , a 2 , and a 3 .

Model Parameters Identification.
e LIB modeling method based on ECM can provide concise and effective support for subsequent state estimation. An effective parameter identification method is a necessary condition for achieving this goal. As the LIB model parameters are not constant when it is charged or discharged, the offline identification of model parameters may mismatch the real parameters. According to this problem, the model parameters are updated online under discharge operation of LIB.
RLS algorithm based on minimum sum-squared error theory is a commonly used model parameter identification method widely applied in tracking of time-varying parameters [31]. To suppress the effect of data saturation in the identification of time-varying parameters with the RLS method, the RLS with forgetting factor (FFRLS) algorithm can be used in battery time-varying parameter identification [32]. e battery parameter identification is to determine coefficient a 1 , a 2 , and a 3 values based on the current and voltage measurements. e form of least squares can be expressed as where φ k is the current and voltage measurements and θ k is the parameters to be identified. Set the objective function, where θ is the identification value of θ, λ is forgetting factor 0 < λ ≤ 1, and the FFRLS degenerates to RLS when λ � 1. e objective function is close to the minimum value through the recursive calculation. Complexity e corresponding measurements and parameters of LIB are as follows: e coefficients a 1 , a 2 , a 3 , and OCV are identified recursively by the FFRLS method in equation (11); then the parameters R 0 , R P , and C p can be solved reversely from coefficients a 1 , a 2 , and a 3 .

SOC Estimation Using PID-Based AEKF
3.1. Basic AEKF. As a linear stochastic system with white noises, the corresponding state estimation can be calculated by the EKF.
where x k represents the system state matrix; A k , B k , C k , and D k are the dynamic coefficients of the state function and observation function, respectively; y k is the output matrix; u k is the input vector; w k and v k are the state Gaussian white noise and measurement Gaussian white noise, respectively. e iterative process of EKF is as follows: (i) Initialization: (ii) Prior estimation: Since the noise statistics of the dynamic model are timevarying, it is necessary to construct an adaptive EKF to adapt to the noise statistics. In this paper, the state noise variance Q k and the measurement noise variance R k based on the maximum likelihood (ML) criterion can be online updated to reflect the changes of the state noise characteristics and measurement noise characteristics [33], so as to ensure that the KF can better adapt to the changes of the noise statistical characteristics.
e variance matrix of the innovation sequence e k can be calculated from equation (16): e equivalent value of the innovation sequence e k based on the moving window method with size L is used to substitute Q k , and R k can be obtained as From the definition of KF, Similarly, we can get K k C k P k|k− 1 from equation (16).
Ignore the variation of the state variance matrix.

Basic PID Controller.
e PID controller is composed of proportional coefficient, integral coefficient, and differential coefficient. Its relationship between input and output in continuous time domain is Adopt the digital PID in computer control system.
One of the most common digital PID is incremental PID by suppressing integral saturation.

PID Feedback Unit in Improved KF.
To obtain the reliable SOC estimation result on the basis of uncertainty of model and measurement noise, many estimation methods with KF are presented. Since the loss of correction data in KF may be due to the fact that only single proportional innovation feedback is used in KF, the innovation vector-based PID feedback controller is introduced into measurement correction step of KF in this paper. is paper puts forward an improved AEKF based on PID controller with self-tuning PID parameters k P , k I , and k D . Due to the fact that more terminal voltage innovation can be described by the PID unit in measurement correction step of improved AEKF, the battery state can be predicted more accurately by the improved AEKF. e PID feedback unit deduced from innovation vector is first introduced. e single feedback unit in KF is substituted by the PID unit, which referred to the PID feedback strategy in the KF structure, as shown in Figure 2.
e state measurement update x k|k from common KF can be expressed by letting e k to be single innovation in equation (16).
In order to get the equivalent form of the incremental PID in equation (25), the measurement correction by single innovation e k in equation (16) can be transformed as e structure diagram of the improved method by combined KF and PID feedback unit is demonstrated in Figure 3. e core idea is to expand the single innovation to an innovation vector.
at is, e k is extended into e k e k− 1 e k− 2 T . To ensure the consistency of data dimension, the following improvements are made: gain k k is extended into k k k k− 1 k k− 2 and measurement output z k is extended into z k z k− 1 z k− 2 T . Meanwhile, a posteriori estimation x k|k in the measurement correction step needs to be rewritten with modified parameters including k k k k− 1 k k− 2 , z k z k− 1 z k− 2 T , and e k e k− 1 e k− 2 T .
Consequently, the regulation parameters k P , k I , and k D of PID unit in the measurement correction step can be solved by equations (26) and (27).
From equations (26) and (28), we can get the PID feedback unit by setting innovation vector, and the PID coefficients k P , k I , and k D can be solved by the expressions of gains k k , k k− 1 , and k k− 2 in three sampling points. ree innovation data at times k, k-1, and k-2 are used when updating the state at time k. e main reason for increasing the robustness of the improved algorithm is to reuse innovative data to update the state at adjacent times. In order to improve the performance of SOC estimation, the combination of PID feedback and AEKF is introduced in Section 3.4. In addition, the covariance of noise w k and v k is updated based on the principle of covariance matching, respectively. e PID-based KF introduces more than one prior innovation, which greatly enhances the effect of feedback compensation in KF. Experiments show that the innovation vector-based KF has better robustness than single-innovation-based KF in strong nonlinear systems [9]. Although the calculation load of PID-based KF is more than that of the single-innovation-based KF, the increased amount of calculation is acceptable relative to the improvement in accuracy.

SOC Estimation Based on AEKF-PID.
e discrete equation of the LIB model in equation (1) can be rewritten as follows: By selecting x � [SOC, U p ] T as the state vector, choosing I k and U k as the input current and output terminal voltage, respectively, the state equation and measurement equation of ECM in a discrete-time representation are as follows: where , and D k � − R 0 ; we assume that η � 1 under arbitrary charge-discharge condition. e detailed process of the AEKF-PID method is as follows.
Step 2. State prediction (a) State prior estimation: Complexity 5 (b) State error covariance prior estimation: Step 3. Measurement correction (a) Gain matrix update: (b) State measurement update by PID feedback unit: x k|k � x k|k− 1 + k P,k e k − e k− 1 (c) State error covariance update: (d) Adaptive noise covariance matching: In summary, according to the state equation and measurement equation of ECM in equations (29)-(30) and the detailed process in equations (31)-(38), the flowchart of the proposed SOC estimation by AEKF-PID algorithm is shown in Figure 4.

Experimental Configurations.
A LIB test platform shown in Figure 5 is established to verify the effect of the ECM and method. It consists of several major components: (1) a lithium-ion ferrous phosphate battery is used as the experimental objects of which the nominal capacity is 20 Ah and nominal voltage is 24 V; (2) a power battery test system (Arbin EVTS) with control accuracy which is less than ±0.1% FSR is used for LIB charging/discharging under various working condition; (3) a programmable temperature chamber is applied to control ambient temperature; (4) a host computer with MITS Pro v7.0 and a computer workstation with MATLAB R2012a are used for data acquisition and data simulation in the experiments, respectively. e LIB is fully charged by constant current-constant voltage (CC-CV) procedure, after standing for two hours; then, three working conditions including 10A constant current, dynamic stress test (DST), and federal urban driving schedule (FUDS) are used to test the proposed method.
ree working conditions mentioned in this paper are carried out at 25 degrees Celsius. e discharge current and terminal voltage of DST and FUDS are shown in Figure 6. In addition, the evaluation indicator such as maximum absolute error (MAE) and average absolute error (AAE) is applied to the assessment of estimation algorithms. e OCV-SOC function describing the relationship between the open-circuit voltage and SOC can be fitted by OCV feature test data. e LIB is fully charged by the CC-CV procedure; after standing for two hours, the measured terminal voltage can be used as the OCV of 100% SOC. e test steps are as follows: the LIB is discharged to 98% SOC with 10A (0.5 C) constant current; after standing for two hours, the measured terminal voltage can be used as the OCV of 98% SOC. Repeating the above steps 50 times, each measured terminal voltage can be obtained as the OCV of every 2% SOC. e eighth-order polynomial fitting function to describe the mathematical relationship of OCV-SOC can be shown in Figure 7

Parameters Identification.
e ECM parameters identification results are shown in Figures 8 and 9; the identification result of ohmic resistance R 0 , polarization resistance R p , and polarization capacitance C p can converge to a steady state quickly from the unreliable initialization value under two cycles.
R 0 , R p , and C p always have a small range of fluctuation in Figures 8(a) and 9(a), which is directly related to the fluctuations of the coefficients a 1 , b 1 , and b 2 . eoretically, the dynamic changes of R 0 , R p , and C p are inconsistent, but the fixed forgetting factors of FFRLS have the same weight on the three parameters, which has a certain effect on the fluctuation of identification results. e terminal voltage is identified in each sampling period based on R 0 , R p , and C p . As we can see from

Analysis of SOC Estimation under 10 A Discharge.
Based on the identified ECM parameters, the SOC estimation under the 10 A discharge cycle is presented in Figure 10. As observed, the SOC reference with Arbin EVTS is formed with a black line; the red line and blue line represent the SOC Measurement data and model parameters Initial conditions equations (31) and (32) State prior estimation equation (33) Gain matrix update equation (35) State error covariance prior estimation equation (34) PID coefficient update with gain equation (28) State estimation measurement update by PID unit equation (36) State error covariance update equation (37) Complexity 7 estimation with single AEKF and AEKF-PID, respectively. From the estimation results of two methods shown in Figure 10(a), these two SOC estimations can both track the SOC reference in a short period of time, no matter AEKF or AEKF-PID. Although the two SOC estimation results both converge to the SOC reference, the SOC estimation error by AEKF-PID is less than that by AEKF, as shown in Figure 10(b). e errors of the two methods slowly increase with an increase in time. e AAE and MAE of AEKF-PID are 0.2266% and 0.5119%, respectively, and the AAE and MAE of AEKF are 0.8606% and 1.2478%, respectively. It follows that the improved AEKF-PID method shows better results in SOC estimation than single AEKF.   Table 1. According to the above analysis, the combination of the PID feedback unit with AEKF has advantage over single AEKF for SOC estimation.

Analysis on Robustness of SOC Estimation
. e high precise SOC estimation results can be obtained by the proposed method on the assumption that the sampled experimental data by Arbin EVTS is reliable. However, the experiment data from the laboratory is not completely equal to actual data in EV operating mode. Since the measurement data by universal transducer is hard to avoid noise interference from such as drift current and diffusion current, the SOC estimation method with certain anti-interference quality is important for BMS. To further verify the antiinterference performance of the AEKF-PID, a sequence of noise with feature of random normal distribution is added to the operation current under DST and FUDS cycles, respectively. e mean value of the noise is set as 0 and its standard deviation is set as 2. e SOC estimation results with Gaussian noise of current under two conditions are displayed in Figures 13 and 14. e two colored lines with blue and red are used to represent the SOC estimation by AEKF-PID and AEKF, respectively. e MAE and AAE of SOC estimation with Gaussian noise under two cycles are Complexity listed in Table 2. As we can see from Figures 13 and 14, due to the introduction of current noise in two cycles, the fluctuation of two corresponding SOC estimation errors increased. We can see that the SOC estimation error by the AEKF method is larger than that of the AEKF-PID method. e results show that the maximum SOC error of AEKF is greater than 2.8% under the FUDS cycle; meanwhile, the maximum SOC error by AEKF-PID is close to 2%. e MAE and AAE of two methods under two cycles are listed in Table 2. According to the analysis above, the combination of PID feedback unit with AEKF has advantage over single AEKF in robustness of SOC estimation.
To further verify the anti-interference performance of the AEKF-PID, a sequence of noise with feature of random non-Gaussian distribution is added to the operation current.
e SOC estimation result with non-Gaussian noise is displayed in Figure 15. We can see that the two SOC estimation errors with non-Gaussian noise increase compared to that with Gaussian noise. e results in Table 3 show that the MAE of AEKF is greater than 5.5%, and the MAE of AEKF-PID is close to 4%. At the end of discharge, the SOC error of AEKF increases gradually; meanwhile, the SOC error of AEKF-PID reaches 3%. e results show that the basic AEKF-based SOC estimation method has better performance in Gaussian noise than       Complexity that in non-Gaussian noise, whether or not the PID feedback is used.

Conclusion
Based on the simple one-order ECM, a novel method of combination of AEKF and PID feedback strategy is proposed for LIB SOC estimation. e parameters of the ECM are updated online using the FFRLS method to ensure LIB ECM reliability and parameters integrity. An improved AEKF-PID technique is introduced to alleviate the negative effects resulting from the ECM error and the measurement error via replacing the single innovation in feedback loop of AEKF with an innovation vector-based PID module. To evaluate the performance of the proposed algorithm, experiment, and simulation results under 10A discharge, DST and FUDS cycles are adopted to validate the SOC estimation. e simulation results show that the maximum estimation error of AEKF-PID is below 0.6%, 1.3%, and 1.8% under 10A discharge, DST, and FUDS cycles, respectively. e SOC estimation error of AEKF-PID is still below 2% even in a Gaussian noise situation.
ese results suggest that the proposed AEKF-PID method can provide reliable SOC estimation with high precision and robustness. Due to the fact that the local flat region in OCV-SOC fitted curve is susceptible to interference from measurement error, our future studies will concentrate on the optimization of OCV estimation.

Data Availability
Data are available upon request to the corresponding author.

Conflicts of Interest
e authors declare no conflicts of interest.