Online Parameter Identification and State of Charge Estimation of Lithium-Ion Batteries Based on Forgetting Factor Recursive Least Squares and Nonlinear Kalman Filter

State of charge (SOC) estimation is the core of any battery management system. Most closed-loop SOC estimation algorithms are based on the equivalent circuit model with fixed parameters. However, the parameters of the equivalent circuit model will change as temperature or SOC changes, resulting in reduced SOC estimation accuracy. In this paper, two SOC estimation algorithms with online parameter identification are proposed to solve this problem based on forgetting factor recursive least squares (FFRLS) and nonlinear Kalman filter. The parameters of a Thevenin model are constantly updated by FFRLS. The nonlinear Kalman filter is used to perform the recursive operation to estimate SOC. Experiments in variable temperature environments verify the effectiveness of the proposed algorithms. A combination of four driving cycles is loaded on lithium-ion batteries to test the adaptability of the approaches to different working conditions. Under certain conditions, the average error of the SOC estimation dropped from 5.6% to 1.1% after adding the online parameters identification, showing that the estimation accuracy of proposed algorithms is greatly improved. Besides, simulated measurement noise is added to the test data to prove the robustness of the algorithms.


Introduction
Due to environmental pollution and the energy crisis, electric vehicles are being increasingly and widely used throughout the world [1].The battery management system (BMS) is one of the most important components of an electric car.The functions of the BMS include state of charge (SOC) estimation, state of health (SOH) estimation, battery equalization control, thermal control, etc.Among them, SOC estimation, which indicates how much capacity the battery can provide, is the core function of BMS, but also the basis of other functions [2].
For electric vehicles, SOC represents the distance the car can travel.SOC cannot be measured directly, and can only be estimated indirectly from some of the physical quantities that can be measured.These physical quantities include voltage, current, temperature and so on.Due to the working Energies 2018, 11, 3 2 of 23 characteristics of electric vehicles, SOC estimation accuracy is limited by the sensor accuracy and real-time requirements of the BMS.
The SOC estimation methods can be roughly divided into model-based and non-model-based approaches [3].Generally, model-based approaches usually have higher estimation accuracy than non-model-based approaches, but they also require a greater amount of computation.In practice, the model-based approaches are applied more [4].When a BMS starts working, battery modeling needs to be implemented first.Common battery models include the electrochemical model and equivalent circuit model.The equivalent circuit model can accurately simulate the dynamic characteristics of the battery.Parameter identification is based on the measured data, such as voltage, current and temperature, to obtain the parameters of the equivalent circuit model.The parameters of the equivalent circuit model can not only describe the characteristics of the battery, but also are the basis of SOC estimation.Considering the variation of parameters in the equivalent circuit model, online parameters identification is necessary to be considered in the design of a BMS.

Review of the SOC Estimation Approaches
A variety of algorithms have been proposed for SOC estimation in recent years [5,6].The ampere-hour integral method [7] is based on the definition of capacity.The accuracy depends primarily on the accuracy of the current measurement.The open-circuit voltage method [8] is used to estimate SOC based on the relationship between open circuit voltage and SOC.The open-circuit voltage is difficult to measure in actual conditions.The above two methods do not need a battery model.As the most common methods of SOC estimation, they are often used in combination.
According to the equivalent circuit model, the working process of the battery can be expressed in the form of discrete equations.Based on the equivalent circuit model, a variety of nonlinear observers can be used for SOC estimation, such as the extended Kalman filter (EKF) [9][10][11], unscented Kalman filter (UKF) [12,13], cubature Kalman filter (CKF) [14], sliding mode observer (SMO) [15,16], H ∞ filter [17,18], particle filter [19] and so on.Considering that the Kalman filter can handle the measured data with the noise, which is appropriate to the actual demand of electric vehicles, many other algorithms based on Kalman filters have been proposed to achieve good results of SOC estimation [20][21][22][23].Other algorithms also apply to SOC estimation [24][25][26][27][28].
As the parameters of the equivalent circuit model will change during the operation of the battery, the accuracy of the above methods will be gradually reduced in a variable temperature environment or after working for a long time.Several algorithms with online parameter identification are proposed to accommodate temperature changes or long-term conditions.Guo et al. proposed an estimation method based on Least Squares Method and Kalman Filter Algorithm [29].A multiple adaptive forgetting factors recursive least-squares method is used to capture the real-time parameters accurately by Duong et al. [30].The estimation technique proposed by Chaoui and Gualous can be used for parameters identification under temperature effects whose stability is guaranteed by Lyapunov's direct method [31].Li used a UKF for SOC estimation.Parameter estimation is achieved by the recursive least squares method with fuzzy adaptive forgetting factor [32].The least squares method was also studied by Liu for parameter identification, which is combined with the extended fractional Kalman filter for SOC estimation [33].In the study of Feng, the recursive extended least squares (RELS) algorithm is applied to the online parameters identification of the equivalent circuit model [34].Wei et al. proposed a novel multi-timescale estimator to achieve parameters identification and SOC estimation [35].Genetic algorithms (GA) can also be used for parameter identification of battery equivalent circuit models which is proposed by Chen [36].These works take into account the changes of the equivalent circuit model (ECM) parameters, but do not propose a simple enough algorithm to combine the online parameters identification and SOC estimation.For the actual application of BMS in electric vehicles, it is necessary to propose a more suitable algorithm for the temperature changes or long hours of work.

Contribution of the Paper
In this article, two joint algorithms with online parameters identification are proposed for SOC estimation.The Thevenin model is selected as equivalent circuit model to describe the dynamic characteristics of batteries.The parameters of battery are identified by forgetting factor recursive least squares (FFRLS) algorithm.Then EKF (or UKF) is introduced to estimate the SOC value.Taking into account the changes of battery model parameters, FFRLS algorithm can be used to update the battery parameters in real time.Compared to the general SOC estimation algorithms without parameters identification, joint algorithms can be more suitable for situations where the temperature changes drastically or the battery is working for a long time.

Organization of the Paper
The structure of this paper is organized as follows.Section 2 introduces the Thevenin model and FFRLS algorithm for battery parameter identification.In Section 3, EKF and UKF are introduced.Based on Thevenin model, state space equations are established.Then, the FFRLS-EKF algorithm and FFRLS-UKF algorithm are proposed.Section 4 illustrates the experiment results and detailed analysis.The conclusions are summarized in Section 5.

Building the Battery Modelion
In order to simulate the power battery in an electric vehicle, the electrochemical model and equivalent circuit model are commonly used as battery models.The electrochemical model simulates a battery according to real electrochemical reactions.As a result, the electrochemical model is accurate but complex.It is computationally large and difficult to discretize.The electrochemical model is not a common model for practical BMS applications.The equivalent circuit model uses the basic circuit components, including resistors, capacitors and so on, to simulate a battery.A high degree of accuracy can be achieved if the parameters of the equivalent circuit model are appropriate.In the practical application of BMS in electric vehicles, equivalent circuit models are applied more often.
Common equivalent circuit models include the Rint model, partnership for a new generation of vehicle (PNGV) model, general nonlinear (GNL) model, Thevenin model and so on [37].The Thevenin model, which is also called first-order resistor-capacitor (RC) equivalent circuit model, is often used for lithium-ion battery modeling and analysis [38,39].In this article, the Thevenin model is used as battery model.As shown in Figure 1, the Thevenin model consists of voltage source, ohmic resistance and a RC loop circuit.The voltage of the voltage source is considered equal to the open circuit voltage u oc , which is determined by current SOC value.The resistor R 0 represents the ohmic resistance, which increases with battery aging or decrease of temperature.The link of polarization resistor R p and polarization capacitor C p is used to simulate the dynamic characteristics of the lithium-ion battery.

Contribution of the Paper
In this article, two joint algorithms with online parameters identification are proposed for SOC estimation.The Thevenin model is selected as equivalent circuit model to describe the dynamic characteristics of batteries.The parameters of battery are identified by forgetting factor recursive least squares (FFRLS) algorithm.Then EKF (or UKF) is introduced to estimate the SOC value.Taking into account the changes of battery model parameters, FFRLS algorithm can be used to update the battery parameters in real time.Compared to the general SOC estimation algorithms without parameters identification, joint algorithms can be more suitable for situations where the temperature changes drastically or the battery is working for a long time.

Organization of the Paper
The structure of this paper is organized as follows.Section 2 introduces the Thevenin model and FFRLS algorithm for battery parameter identification.In Section 3, EKF and UKF are introduced.Based on Thevenin model, state space equations are established.Then, the FFRLS-EKF algorithm and FFRLS-UKF algorithm are proposed.Section 4 illustrates the experiment results and detailed analysis.The conclusions are summarized in Section 5.

Building the Battery Modelion
In order to simulate the power battery in an electric vehicle, the electrochemical model and equivalent circuit model are commonly used as battery models.The electrochemical model simulates a battery according to real electrochemical reactions.As a result, the electrochemical model is accurate but complex.It is computationally large and difficult to discretize.The electrochemical model is not a common model for practical BMS applications.The equivalent circuit model uses the basic circuit components, including resistors, capacitors and so on, to simulate a battery.A high degree of accuracy can be achieved if the parameters of the equivalent circuit model are appropriate.In the practical application of BMS in electric vehicles, equivalent circuit models are applied more often.
Common equivalent circuit models include the Rint model, partnership for a new generation of vehicle (PNGV) model, general nonlinear (GNL) model, Thevenin model and so on [37].The Thevenin model, which is also called first-order resistor-capacitor (RC) equivalent circuit model, is often used for lithium-ion battery modeling and analysis [38,39].In this article, the Thevenin model is used as battery model.As shown in Figure 1   Based on Kirchhoff's law and capacitance characteristics, equations can be deduced as:

Offline Parameters Identification
In order to use the equivalent circuit model to describe the battery characteristics, it is necessary to identify the model parameters R 0 , R p and C p .In some of the commonly used methods, several battery tests are done to identify the model parameters.While the BMS works, the parameters remain unchanged.This method is called offline identification in this article.A commonly used offline identification method will be introduced [40].
Discharge the battery with constant current (i = I in Figure 1) and then rest for a long time.When the current i changes from I to 0, the terminal voltage has a step change in ∆u because of the ohmic resistance R 0 .R 0 can be obtained by Equation (3): In rest period, terminal voltage u t can be measured and recorded.According to Equation (1) and Equation (2), u t can be deduced as: That is, the terminal voltage u t can be expressed by the following exponential function: Based on the measured voltage data, the values of b 1 , b 2 and b 3 in Equation ( 4) can be obtained by nonlinear fit of exponential function.In this article, it is calculated by Function nlinfit in MATLAB (R2016b, MathWorks, Natick, MA, USA).Compare Equations ( 4) and (5), we can get model parameters R p and C p by: R p = b 2

Online Parameters Identification by Forgetting Factor Recursive Least Squares
The battery model parameters are not actually constant but rather they related to the temperature, SOC, SOH and so on.As a result, offline identification of model parameters will cause some calculation error in the BMS work process.A better way is to update the model parameters constantly during the operation of the battery.This method is called online identification in this article.The forgetting factor recursive least squares (FFRLS) algorithm can be used to identify the parameters of a single input single output system.It applies to systems with variable parameters.Next, the principle of FFRLS algorithm is introduced.Consider the following system: Energies 2018, 11, 3 5 of 23 where ξ(k) represents the white noise, n a , n b and d are known and: The purpose of online parameters identification is to determine the following parameters based on the measurable inputs and outputs: 7) can be written as the least squares form: where ϕ(k) is the data vector, θ is the parameter vector to be evaluated, and: Take performance indicator as: where θ is the estimate of θ, λ denotes the forgetting factor (0 < λ ≤ 1).Calculate the following formulas to obtain the parameter θ so that the value of the objective function J reaches the minimum: In order to identify the parameters of Thevenin model with FFRLS algorithm, it is necessary to convert Equations ( 1) and ( 2) into the corresponding form.

of 23
Replace the coefficients in Equation ( 16) with k 1 , k 2 and k 3 : Equations ( 9) and ( 17) are in the same form.FFRLS algorithm can be used to identify k 1 , k 2 and k 3 .Then R 0 , R p and C p can be derived by: As the ambient temperature and SOC changes, the model parameters of the battery will be constantly changing during battery operation.FFRLS continues to obtain the current parameters.

Application of Nonlinear Kalman Filter in Nonlinear System
Consider a nonlinear discrete-time dynamic system that is represented by a process equation as Equation ( 19) that describes the state vector and a measurement equation as Equation ( 20) that describes the measurement vector: where the state vector x k ∈ R n is unobservable and z k ∈ R m is an observable measure vector.f and h are known nonlinear functions.The process noise w k−1 ∈ R n and the measurement noise v k ∈ R m are independent Gaussian white noise.The mean of w k−1 is zero and the covariance matrix of The mean of v k is zero and the covariance matrix of v k is R k .The Kalman filter is only applicable to linear systems, but in practice, most systems are nonlinear.The extended Kalman filter and unscented Kalman filter are improved versions of the Kalman filter that can be applied to nonlinear systems.
In the EKF algorithm, the nonlinear functions in Equations ( 19) and ( 20) are approximated to first-order Taylor polynomials: where F k−1 and H k are Jacobian matrices: The nonlinear system can be transformed into a linear state space model approximated by first order Taylor polynomials as: The EKF algorithm can be summarized as follows: ( (2) Prediction module where (3) Error correction module where Next, UKF will be introduced.Consider any known nonlinear function z = g(x).The mean x and covariance P x of the random variable x ∈ R n are known.UKF uses the following sampling points to approximate the statistical properties of z: where (n + λ)P x i represents the i-th column vector of the square root of (n + λ)P x .λ = α 2 (n + κ) − n is a scalar parameter.The constant parameter 0.0001 ≤ α ≤ 1 determines the degree of diffusion of the sampling points near x.κ is another constant parameter, which is usually set to zero when the state is estimated and set to 3 − n when the parameter is estimated.
The mean and covariance of z are calculated by means of weighted averaging: represents the weight required to calculate the covariance.They are derived as: β is a parameter that considers the prior information of the random variable x.When x is a Gaussian distribution, β = 2.
The UKF algorithm can be summarized as follows: ( (2) Prediction module (3) Error correction module

Establishment of State Space Model of Thevenin Model
In order to use EKF algorithm or UKF algorithm for SOC estimation, it is necessary to discretize Thevenin model and create the state space model.
Set the state vector as: SOC(k) is the unknown to be estimated.u p (k) is the voltage of the RC loop circuit.The terminal voltage u t (k) can be measured, so we set u t (k) as the measurement vector.
Energies 2018, 11, 3 9 of 23 SOC has a variety of definitions, representing the remaining battery capacity.In this paper, SOC is defined as: where C n denotes the nominal capacity of the battery.
According to Equations ( 1), ( 2) and ( 51), the state space model of Thevenin model can be derived as: Equation ( 52) is the process equation describing the state vector.Equation ( 53) is the measurement equation describing the measurement vector.In the BMS work process, the instantaneous value of SOC can be estimated based on EKF algorithm or UKF algorithm by measuring the values of the current and terminal voltage constantly.

Joint Algorithms Based on FFRLS and Nonlinear Kalman Filter
According to the above discussion, the FFRLS algorithm can be used for battery model online parameter identification and the EKF algorithm (or UKF algorithm) can be used to estimate SOC in the BMS work process.
FFRLS-EKF algorithm is proposed based on FFRLS and EKF to estimate SOC with online parameter identification.In the calculation of FFRLS-EKF algorithm, the FFRLS algorithm updates the battery parameters and the EKF algorithm estimates the SOC value.The FFRLS-EKF algorithm can be divided into two parts: initialization and loop operations.In the initialization part, the correspondence between OCV and SOC needs to be obtained from battery tests.The Thevenin model is chosen as the equivalent circuit model.The FFRLS algorithm and EKF algorithm require initial values before starting the loop operations.In every cycle, voltage and current are measured.The FFRLS algorithm runs one step, followed by prediction module and error correction module of EKF.Next, the current SOC value is output.Finally, increase cycle index k by 1.The loop operations will continue to go on.
For strong nonlinear systems, the UKF algorithm works better than the EKF algorithm.In a similar way, FFRLS-UKF algorithm is proposed based on FFRLS algorithm and UKF algorithm.
Figure 2 illustrates the steps of FFRLS-EKF algorithm and FFRLS-UKF algorithm.The green background steps are related to FFRLS algorithm, while the blue background steps are related to EKF algorithm (or UKF algorithm).
The effect of ambient temperature and SOC is to change the model parameters.Based on the data of current and terminal voltage, the joint algorithms update the model parameters constantly without requiring ambient temperature.As a result, there are no variables related to the environmental temperature in the equations.In addition, the ambient temperature does not need to be measured in actual use.The effect of ambient temperature and SOC is to change the model parameters.Based on the data of current and terminal voltage, the joint algorithms update the model parameters constantly without requiring ambient temperature.As a result, there are no variables related to the environmental temperature in the equations.In addition, the ambient temperature does not need to be measured in actual use.

Experiments
As shown in Figure 3, a test bench is established to verify the effectiveness of the proposed algorithms.ICR18650-22P batteries (Samsung, Seoul, South Korea) are used as the experimental subjects.The specifications of test batteries are as follows: nominal capacity 2150 mAh, nominal voltage 3.6 V, charging end voltage 4.2 V, discharging end voltage 2.75 V and maximum continuous discharging current 10 A. When charging or discharging, C-rate represents constant current 2.15 A for these experimental subjects.For example, charge the battery with constant current 1 C means charge the battery with constant current 2.15 A. A temperature chamber (SC-80-CC-2, Sanwood,

Experiments
As shown in Figure 3   As a basis for other experiments, the actual battery capacity of 25 • C was measured.First of all, the testing battery was rested at 25 • C constant temperature for 1 h.The battery is fully charged with constant current and constant voltage (CC-CV) mode.Specific methods are as follows: charge the battery with a constant current 0.5 C (i.e., 1.075 A) until the battery terminal voltage is 4.2 V and then charge the battery with constant voltage 4.2 V until the current is less than 0.02 C. At this point the battery is fully charged.Rest for 1 h and discharge the battery with 0.2 C constant current until the terminal voltage reaches 2.75 V.The amount of electricity released is considered the actual capacity of the battery.The average of three measurements is taken as the actual battery capacity obtained experimentally.
The relationship of open circuit voltage (OCV) and SOC is one of the basic characteristics of lithium-ion batteries which is also measured in the experiments.The experimental method is to rest a battery of specific SOC for long enough time (1 h in this experiment), then the terminal voltage is considered equal to the open circuit voltage.In this experiment, OCV-SOC curve was obtained by selecting 13 SOC values for measuring OCV and polynomial fitting of the obtained points, as shown in the Figure 4.

Verification of Online Parameters Identification
Taking into account the ohmic resistance of the battery will be affected by temperature and SOC, joint algorithm should reflect this change.In order to verify the feasibility of the algorithm, a series of experiments were done.The battery used in the experiment can work at −20 °C~60 °C.However, according to the actual test, the battery cannot provide enough current at low temperature (approximately below 0 °C).Therefore, the experimental temperature of the four groups were: 0 °C, 20 °C, 40 °C and 60 °C.
The parameters of the battery are related to the temperature and the SOC, so the battery under a specific temperature and SOC is pulsed to estimate the corresponding offline parameters.Experimental processes are as follows: (1) Set the ambient temperature to constant 60 °C, rest for 2 h.
(3) Discharge at 3 C for 10 s and then rest for 1 h.(4) 1 C current discharge until SOC = 0.9 and then rest for 1 min.
(5) Discharge at 3 C for 10 s and then rest for 1 h.(6) Loop through steps 4 and 5. (7) Adjust the temperature to constant 40 °C, 20 °C and 0 °C, Repeat the above experiment.
The ohmic resistances are estimated when SOC = 1, 0.9, 0.8, ..., 0.1 and 0. The method is similar to offline parameters identification as proposed in Section 2.2.The results are shown in Table 1.

Verification of Online Parameters Identification
Taking into account the ohmic resistance of the battery will be affected by temperature and SOC, joint algorithm should reflect this change.In order to verify the feasibility of the algorithm, a series of experiments were done.The battery used in the experiment can work at −20 • C~60 • C.However, according to the actual test, the battery cannot provide enough current at low temperature (approximately below 0 • C).Therefore, the experimental temperature of the four groups were: 0 The parameters of the battery are related to the temperature and the SOC, so the battery under a specific temperature and SOC is pulsed to estimate the corresponding offline parameters.Experimental processes are as follows: (1) Set the ambient temperature to constant 60 • C, rest for 2 h.
(3) Discharge at 3 C for 10 s and then rest for 1 h.(4) 1 C current discharge until SOC = 0.9 and then rest for 1 min.The ohmic resistances are estimated when SOC = 1, 0.9, 0.8, ..., 0.1 and 0. The method is similar to offline parameters identification as proposed in Section 2.2.The results are shown in Table 1.As can be seen, on the one hand, the ohmic resistance clearly shows an increasing trend as the temperature decreases.On the other hand, ohmic resistance tends to stabilize during battery operation with high SOC.However, when the SOC is close to 0, the ohmic resistance increases significantly.
As the battery capacity is measured at 25 • C, the battery will reach the discharging end voltage without releasing the full capacity, when the temperature is below 25 • C.So some of the data in the table is empty.
In order to get the results of online parameters identification with certain temperature and SOC, a series of working conditions tests were done.Under 0 • C, 20 • C, 40 • C and 60 • C, the New European Driving Cycle (NEDC) driving cycle was tested to discharge the battery from full charge to discharging end voltage.The experimental data are processed by the FFRLS-UKF algorithm to obtain the ohmic resistances by online parameters identification.
In the Figure 5, the curves represent the ohmic resistances identified by online parameters identification of NEDC driving cycles at different temperatures.Discrete point represents the ohmic resistances of corresponding temperatures and SOCs identified by offline parameters identification.
Energies 2018, 11, 3 13 of 23 As can be seen, on the one hand, the ohmic resistance clearly shows an increasing trend as the temperature decreases.On the other hand, ohmic resistance tends to stabilize during battery operation with high SOC.However, when the SOC is close to 0, the ohmic resistance increases significantly.
As the battery capacity is measured at 25 °C, the battery will reach the discharging end voltage without releasing the full capacity, when the temperature is below 25 °C.So some of the data in the table is empty.
In order to get the results of online parameters identification with certain temperature and SOC, a series of working conditions tests were done.Under 0 °C, 20 °C, 40 °C and 60 °C, the New European Driving Cycle (NEDC) driving cycle was tested to discharge the battery from full charge to discharging end voltage.The experimental data are processed by the FFRLS-UKF algorithm to obtain the ohmic resistances by online parameters identification.
In the Figure 5, the curves represent the ohmic resistances identified by online parameters identification of NEDC driving cycles at different temperatures.Discrete point represents the ohmic resistances of corresponding temperatures and SOCs identified by offline parameters identification.It can be seen from the figure that the results of online parameters identification and the results of offline parameters identification are consistent.In other words, joint algorithm for online parameters identification is feasible.

Estimation Results without Measurement Noise
The joint algorithms above can be used to estimate SOC in case the battery model parameters change.Generally, the change of the battery model parameters is related to temperature, SOC, SOH, etc.The battery experiment is done in a variable temperature environment, which makes the change of battery model parameters more obvious.Taking into account the actual working environment of electric vehicles, the temperature range is 5 °C~45 °C in this article.The test temperature starts at 25 °C, drops to 5 °C and then rises to 45 °C until the end.
In order to prove the adaptability of the algorithms, a combination of four driving cycles is designed as the input current profile of the battery experiment, including Urban Dynamometer Driving Schedule (UDDS), Dynamic Stress Test (DST), New European Driving Cycle (NEDC) and Federal Urban Driving Schedule (FUDS).As shown in Figure 6, a combined driving cycle takes 4288 s.It can be seen from the figure that the results of online parameters identification and the results of offline parameters identification are consistent.In other words, joint algorithm for online parameters identification is feasible.

Estimation Results without Measurement Noise
The joint algorithms above can be used to estimate SOC in case the battery model parameters change.Generally, the change of the battery model parameters is related to temperature, SOC, SOH, etc.The battery experiment is done in a variable temperature environment, which makes the change of battery model parameters more obvious.Taking into account the actual working environment of electric vehicles, the temperature range is 5 • C~45 • C in this article.The test temperature starts at 25 • C, drops to 5 • C and then rises to 45 • C until the end.
In order to prove the adaptability of the algorithms, a combination of four driving cycles is designed as the input current profile of the battery experiment, including Urban Dynamometer Driving Schedule (UDDS), Dynamic Stress Test (DST), New European Driving Cycle (NEDC) and Federal Urban Driving Schedule (FUDS).As shown in Figure 6, a combined driving cycle takes 4288 s.In the abovementioned experiment, the voltage and current data are recorded to verify the joint algorithms.The estimation results of the FFRLS-EKF algorithm are compared with that of the standard EKF algorithm.And the estimation results of the FFRLS-UKF algorithm are compared with that of the standard UKF algorithm.
When using the nonlinear Kalman filter algorithm, considering the large deviation of SOC estimation in the initial measurement, it is not conducive to the convergence of FFRLS method, so at the beginning of the working conditions, we use only the EKF algorithm or UKF algorithm to estimate SOC.After 100 s, the SOC estimate tends to be stable and we can then begin to use the joint algorithm.
In order to test the estimation effect of the algorithms, it is necessary to compare with the SOC reference value.The experimental environment uses a high-precision sensor, so the SOC obtained from the Ampere-hour integral method can be regarded as a SOC reference value.In the abovementioned experiment, the voltage and current data are recorded to verify the joint algorithms.The estimation results of the FFRLS-EKF algorithm are compared with that of the standard EKF algorithm.And the estimation results of the FFRLS-UKF algorithm are compared with that of the standard UKF algorithm.
When using the nonlinear Kalman filter algorithm, considering the large deviation of SOC estimation in the initial measurement, it is not conducive to the convergence of FFRLS method, so at the beginning of the working conditions, we use only the EKF algorithm or UKF algorithm to estimate SOC.After 100 s, the SOC estimate tends to be stable and we can then begin to use the joint algorithm.
In order to test the estimation effect of the algorithms, it is necessary to compare with the SOC reference value.The experimental environment uses a high-precision sensor, so the SOC obtained from the Ampere-hour integral method can be regarded as a SOC reference value.In the abovementioned experiment, the voltage and current data are recorded to verify the joint algorithms.The estimation results of the FFRLS-EKF algorithm are compared with that of the standard EKF algorithm.And the estimation results of the FFRLS-UKF algorithm are compared with that of the standard UKF algorithm.
When using the nonlinear Kalman filter algorithm, considering the large deviation of SOC estimation in the initial measurement, it is not conducive to the convergence of FFRLS method, so at the beginning of the working conditions, we use only the EKF algorithm or UKF algorithm to estimate SOC.After 100 s, the SOC estimate tends to be stable and we can then begin to use the joint algorithm.
In order to test the estimation effect of the algorithms, it is necessary to compare with the SOC reference value.The experimental environment uses a high-precision sensor, so the SOC obtained from the Ampere-hour integral method can be regarded as a SOC reference value.The results obtained by processing the condition data with the FFRLS-EKF algorithm are shown in the Figure 8.The online identification results of parameters k 1 , k 2 and k 3 are shown in Figure 8a.It can be seen that the changes of parameters k 2 and k 3 are significantly related to temperature, while the value of k 1 is nearly fixed.After conversion, the online identification results of parameters R 0 , R p and C p are shown in Figure 8b.As the temperature increases, the ohmic resistance of the battery decreases, which is consistent with the common view.The results obtained by processing the condition data with the FFRLS-EKF algorithm are shown in the Figure 8.The online identification results of parameters k1, k2 and k3 are shown in Figure 8a.It can be seen that the changes of parameters k2 and k3 are significantly related to temperature, while the value of k1 is nearly fixed.After conversion, the online identification results of parameters R0, Rp and Cp are shown in Figure 8b.As the temperature increases, the ohmic resistance of the battery decreases, which is consistent with the common view.In Figure 8c, the red dotted line represents the SOC estimation of FFRLS-EKF algorithm and the blue dotted line represents the SOC estimation of EKF algorithm.The SOC reference value is indicated by the black solid line.Similarly, the red solid line and the blue solid line represent the SOC estimation errors of FFRLS-EKF algorithm and EKF algorithm respectively.It can be seen that the accuracy of the FFRLS-EKF algorithm is significantly better than that of the EKF algorithm.Similarly, the data are processed with FFRLS-UKF algorithm and UKF algorithm respectively.The results are shown in Figure 9. Figure 9a illustrates the online identification results of parameters k 1 , k 2 and k 3 .Figure 9b illustrates the online identification results of parameters R 0 , R p and C p .The comparison of SOC estimation value of FFRLS-UKF algorithm and UKF algorithm is shown in Figure 9c.In Figure 8c, the red dotted line represents the SOC estimation of FFRLS-EKF algorithm and the blue dotted line represents the SOC estimation of EKF algorithm.The SOC reference value is indicated by the black solid line.Similarly, the red solid line and the blue solid line represent the SOC estimation errors of FFRLS-EKF algorithm and EKF algorithm respectively.It can be seen that the accuracy of the FFRLS-EKF algorithm is significantly better than that of the EKF algorithm.Similarly, the data are processed with FFRLS-UKF algorithm and UKF algorithm respectively.The results are shown in Figure 9. Figure 9a illustrates the online identification results of parameters k1, k2 and k3. Figure 9b illustrates the online identification results of parameters R0, Rp and Cp.The comparison of SOC estimation value of FFRLS-UKF algorithm and UKF algorithm is shown in Figure 9c.It can be seen that in Figures 8 and 9, the trends of these curves are similar.These algorithms can meet the requirements of SOC estimation.In order to contrast the characteristics of the algorithms above, the four indicators are listed in Table 2, namely: average error, max error, RMSE and time.When plotting Figures 8c and 9c, the errors between the SOC estimate and the SOC reference at each sampling instant have been calculated.The average error in the table represents the mean of the SOC errors.The max error in the table represents the maximum value of the SOC errors.The average error and the max error represent the estimation accuracy of the algorithm.RMSE is an abbreviation for root mean square error.It is used to measure the deviation between the observed value and the true value.In this paper, RMSE can represent the stability of the SOC estimate value compared with the SOC reference value.It can be considered that the smaller the RMSE value, the closer the SOC estimate value is to the SOC reference value.The time spent in the loop operations of the algorithm is represented by the time in the table.All arithmetic calculations are done by the same computer.So the calculation can be evaluated by the computation time.The smaller the amount of calculation, the more convenient for practical applications.First, we compare the results of the EKF algorithm and the FFRLS-EKF algorithm.The SOC estimation methods of the EKF algorithm and FFRLS-EKF algorithm are similar.The difference is that model parameters in the EKF algorithm are fixed, while in the FFRLS-EKF algorithm, the model parameters change, that is, the so-called online parameter identification.The average error, max error and RMSE of the SOC estimates obtained by the FFRLS-EKF algorithm are significantly smaller than those of the SOC estimates obtained by the EKF algorithm.Among them, the average error is reduced from 5.7% to 1.3% after adding the online parameter identification.The computation time of the FFRLS-EKF algorithm is significantly longer than that of the EKF algorithm, increasing from 0.201 s to 4.085 s.It can be seen that the FFRLS-EKF algorithm has higher estimation accuracy, but the computation is increased, compared with the EKF algorithm.
Then, SOC estimation results of the FFRLS-UKF algorithm and the UKF algorithm have a similar relationship, as can be seen from Table 2.The average error, max error and RMSE of the SOC estimates obtained by the FFRLS-UKF algorithm are significantly smaller than those of the SOC estimates obtained by the UKF algorithm.The time of the SOC estimates obtained by the FFRLS-UKF algorithm is slightly longer than that of the SOC estimates obtained by the UKF algorithm.Finally, from the table can also be drawn that the UKF algorithm is more accurate than the EKF algorithm and the FFRLS-UKF algorithm is more accurate than the FFRLS-EKF algorithm.

Estimation Results with Measurement Noise
Due to the working environment of the power battery, the accuracy of the sensor and other reasons, the measured value of the current and voltage is not accurate, compared with the true values.In order to verify the robustness of the algorithm, noise is added to the data to simulate the actual working environment.Generate Gaussian white noise sequences as measurement noises, which can simulate actual measurement noises.In this paper, a normal distribution random number series with mean 0 and variance 10 −4 is added to measured current data as current noise and a normal distribution random number series with mean 0 and variance 10 −6 is added to measured voltage data as voltage noise.The voltage and current data obtained by the battery test in Section 4.1 are added with the noise to obtain a set of voltage and current data with measurement noise.
The EKF algorithm and FFRLS-EKF algorithm are used to process the data with measurement noise respectively.The results are shown in Figure 10. Figure 10a illustrates the online identification results of parameters k 1 , k 2 and k 3 by the FFRLS-EKF algorithm.Figure 10b illustrates the online identification results of parameters R 0 , R p and C p by the FFRLS-EKF algorithm.The SOC estimation values of the EKF algorithm and FFRLS-EKF algorithm are shown in Figure 10c.It can be seen that the above algorithms can still get a good estimate from the noisy data.A further analysis of the data is shown in Table 3.It can be seen that the above algorithms can still get a good estimate from the noisy data.A further analysis of the data is shown in Table 3.In the case of measurement noise, the algorithms with online parameter identification (FFRLS-EKF algorithm and FFRLS-UKF algorithm) have a higher estimation accuracy and a larger amount of computation than algorithms with offline parameter identification (EKF algorithm and UKF algorithm).Comparing Tables 2 and 3, we can evaluate the robustness of several algorithms in noisy environment.The SOC estimation accuracy of the EKF algorithm is almost uniform in both a noiseless environment or a noisy environment.The UKF algorithm also has the same characteristics.For the FFRLS-EKF algorithm, the error in the noisy environment is greater than that in the noiseless environment.The FFRLS-UKF algorithm is similar to the FFRLS-EKF algorithm and is also sensitive to noise.

Conclusions
In this paper, two joint algorithms are proposed for SOC estimation with online parameter identification.The Thevenin model is utilized as the equivalent circuit model to derive a state space model for joint algorithms.The FFRLS-EKF algorithm is based on the FFRLS algorithm for updating model parameters and the EKF algorithm for updating the state vector and measurement vector.The FFRLS-UKF algorithm is proposed similarly.By comparing the ohmic resistances of various temperatures and SOCs obtained by online parameter identification and offline parameter identification, respectively, the feasibility of the joint algorithms is verified.A combined driving cycle is designed for battery testing, including UDDS, DST, NEDC and FUDS.The test is performed in a variable temperature environment between 5 • C~45 • C. Compared with the nonlinear Kalman filter, the average error, the maximum error and the RMSE of the estimation results obtained by the joint algorithms are obviously improved, while the computation time of the joint algorithms is increased.The accuracy of the joint algorithms is reduced after adding Gaussian white noise as measurement noise, indicating that joint algorithms are sensitive to measurement noise.Besides, other more complex but more accurate equivalent circuit models have been tried in the research process, but no good results have been obtained.When using more complex models, the calculations more easily diverge.This phenomenon may be due to the forgetting factor being selected as a fixed value.In future studies, we will continue to examine the optimization of forgetting factors and improve the robustness of the algorithm.In addition, the working environment in practice for electric vehicles is harsher, including temperatures below 0 • C. In our future work, batteries with better performance at low temperature will be used as the experimental objects to meet the needs of actual electric vehicles according to the automotive manufacturers.

Nomenclature
, the Thevenin model consists of voltage source, ohmic resistance and a RC loop circuit.The voltage of the voltage source is considered equal to the open circuit voltage uoc, which is determined by current SOC value.The resistor R0 represents the ohmic resistance, which increases with battery aging or decrease of temperature.The link of polarization resistor Rp and polarization capacitor Cp is used to simulate the dynamic characteristics of the lithiumion battery.
i represents the weight required to calculate the mean, and w (c) i
, a test bench is established to verify the effectiveness of the proposed algorithms.ICR18650-22P batteries (Samsung, Seoul, South Korea) are used as the experimental subjects.The specifications of test batteries are as follows: nominal capacity 2150 mAh, nominal voltage 3.6 V, charging end voltage 4.2 V, discharging end voltage 2.75 V and maximum continuous discharging current 10 A. When charging or discharging, C-rate represents constant current 2.15 A for these experimental subjects.For example, charge the battery with constant current 1 C means charge the battery with constant current 2.15 A. A temperature chamber (SC-80-CC-2, Sanwood, Dongguan, China) provides a variable temperature working environment for batteries.The maximum temperature range is −40 • C~150 • C and the accuracy of temperature is ±0.1 • C. A battery testing system (BT-5HC, Arbin, College Station, TX, USA) is used to charge/discharge the batteries within the range of 0 A~30 A and current voltage 0 V~5 V.The control and measurement accuracies of current and voltage are both ±0.02% full scale range.A host computer with MITS Pro (v7.0, Arbin, College Station, TX, USA) installed controls the battery testing system to load the programmed current profiles on the batteries and record the data.The algorithms are validated by experimental data in the environment of MATLAB (R2016b, MathWorks, Natick, MA, USA).In the experiments, the sampling frequency of current and voltage is once per second.Dongguan, China) provides a variable temperature working environment for batteries.The maximum temperature range is −40 °C~150 °C and the accuracy of temperature is ±0.1 °C.A battery testing system (BT-5HC, Arbin, College Station, TX, USA) is used to charge/discharge the batteries within the range of 0 A~30 A and current voltage 0 V~5 V.The control and measurement accuracies of current and voltage are both ±0.02% full scale range.A host computer with MITS Pro (v7.0, Arbin, College Station, TX, USA) installed controls the battery testing system to load the programmed current profiles on the batteries and record the data.The algorithms are validated by experimental data in the environment of MATLAB (R2016b, MathWorks, Natick, MA, USA).In the experiments, the sampling frequency of current and voltage is once per second.

Figure 3 .
Figure 3. Configuration of the battery test bench.

Figure 3 .
Figure 3. Configuration of the battery test bench.

( 5 )
Discharge at 3 C for 10 s and then rest for 1 h.(6) Loop through steps 4 and 5. (7) Adjust the temperature to constant 40 • C, 20 • C and 0 • C, Repeat the above experiment.

Figure 5 .
Figure 5.Comparison of online and offline parameters identification.

Figure 5 .
Figure 5.Comparison of online and offline parameters identification.

Figure 6 .
Figure 6.Current profile in a cycle.The results of the battery working condition test are shown in Figure 7.The operating current, terminal voltage and temperature are illustrated by curves respectively.

Figure 8 .
Figure 8. Calculation results of EKF and FFRLS-EKF without measurement noise: (a) Identification of k 1 , k 2 and k 3 ; (b) Identification of R 0 , R p and C p ; (c) SOC estimation results of EKF and FFRLS-EKF.

Figure 9 .
Figure 9. Calculation results of UKF and FFRLS-UKF without measurement noise: (a) Identification of k 1 , k 2 and k 3 ; (b) Identification of R 0 , R p and C p ; (c) SOC estimation results of UKF and FFRLS-UKF.
k1, k2 and k3 by the FFRLS-EKF algorithm.Figure10billustrates the online identification results of parameters R0, Rp and Cp by the FFRLS-EKF algorithm.The SOC estimation values of the EKF algorithm and FFRLS-EKF algorithm are shown in Figure10c.

Figure 10 .
Figure 10.Calculation results of EKF and FFRLS-EKF with measurement noise: (a) Identification of k1, k2 and k3; (b) Identification of R0, Rp and Cp; (c) SOC estimation results of EKF and FFRLS-EKF.Figure 10.Calculation results of EKF and FFRLS-EKF with measurement noise: (a) Identification of k 1 , k 2 and k 3 ; (b) Identification of R 0 , R p and C p ; (c) SOC estimation results of EKF and FFRLS-EKF.

Figure 11 .
Figure 11.Calculation results of UKF and FFRLS-UKF with measurement noise: (a) Identification of k 1 , k 2 and k 3 ; (b) Identification of R 0 , R p and C p ; (c) SOC estimation results of UKF and FFRLS-UKF.

Table 1 .
Ohmic resistances by offline parameters identification.
1The unit of ohmic resistance is Ω.

Table 1 .
Ohmic resistances by offline parameters identification.

Table 2 .
Comparison of Algorithms without measurement noise.

Table 3 .
Comparison of Algorithms with measurement noise.