SOC estimation of lithium-ion batteries based on the improved Kalman filter

Nowadays, the environmental crisis and energy crisis have been known by people around the world as issues that have to be taken seriously. It is recognized that electric vehicles are more environmentally friendly than traditional fuel cars, but there are still many immature aspects of electric vehicle technology. Battery technology is one of them, and lithium battery is a common power storage tool for electric vehicles. Therefore, it is very important to monitor the status of the battery pack in real-time. Improving the practical capacity, safety, and service life of lithium batteries all have an important impact on the development of electric vehicles. In battery management systems (BMS), the accurate prediction of the battery state of charge (SOC) is particularly important. In this paper, the 18650 lithium battery was selected for the research experiment, and the circuit model of second-order RC was selected. Modeling by MATLAB, the SOC-OCV curve of the battery was determined through the data obtained from the charging and discharging experiment (HPPC), the original least squares method was improved, the forgetting factor was introduced, and the model was identified by the parameters based on the experimental data. The traditional SOC prediction method added noise adaptive rules and iterative theory in the extended Kalman filter(EKF), formed the adaptive Kalman filter (AIEKF) to estimate the SOC of lithium battery, and estimated the SOC using the American urban road cycle (UDDS) data. The results show that the AIEKF algorithm has fewer errors and advantages than the traditional EKF algorithm.


Introduction
As the goal of carbon neutrality in our country, lithium-ion battery as clean energy has been widely used.In recent years, the electric vehicle industry has undergone rapid development, in which the research on batteries and the development of lithium-ion batteries has advanced by leaps and bounds, and their performance has been well improved and their cost has rapidly decreased.Lithium-ion batteries are characterized by their small size, light weight, and long life.The foreign power battery level is more advanced, which has reached the advanced level in the middle of the last century, while the domestic power battery started relatively late.However, with the rapid development of new energy in recent years, China's power battery industry is also developing rapidly.So the power battery management system is increasingly important [1], including the battery SOC and health status (SOH) and a series of parameters.Hence, accurate estimation of the battery SOC is very important, and an accurate battery SOC can provide the driver with accurate power surplus information and estimate the remaining distance of the vehicle.In view of this situation and background, this paper proposes the estimation of SOC for improving the extended Kalman (EKF) algorithm, establishes the battery model, and carries out the experimental data simulation with MATLAB / SIMULINK.

Definition and algorithm of the SOC
The SOC of a lithium battery generally refers to the ratio of remaining power and calibrated power.SOC usually cannot be measured, and the estimate of SOC can only be calculated indirectly by measuring other quantities in the battery.During this period, it will be affected by the battery temperature, the number of charge and discharge cycles, and various other internal and external factors.The chemical changes inside the lithium battery are complex, so the accurate measurement of the battery state SOC has been the focus of related technology research and development.Currently, the mainstream methods of battery SOC estimation are the open-circuit voltage method, ampere-hour integral method, neural network method, Kalman filter method, internal resistance method, and a series of improved derivative algorithms [2].
The principle of the ampere-hour integral method is to integrate the current when the battery releases the current, but the current accuracy requirement is relatively high, which is prone to error accumulation.
The open circuit voltage method is based on the unique function of the open circuit voltage and the battery soc, which is a monotonous mapping relationship.The open circuit voltage method needs to static the battery for a long time and is generally only corrected in the startup state.
The neural network method is an artificial intelligence algorithm that imitates the memory process of the human brain [3].The process of learning and processing data requires a large amount of data stack, which is a non-linear system.The neural network method requires a large amount of data accumulation to obtain accurate calculation ability.The neural network method can cope well when calculating the SOC value of batteries with many factors.
The current mainstream algorithm is the Kalman filter algorithm and a series of derivatives and algorithms, its accuracy is relatively high.

Second-order RC model of lithium battery
Lithium-ion battery always has complex chemical reaction changes, and the SOC of the battery cannot be estimated by value.In order to realize the SOC measurement of the battery, it is necessary to establish a physical model of the battery.At present, the more mainstream models are the electrochemical model and the equivalent circuit model.The equivalent circuit model realizes the simulation of battery characteristics through the connection and construction of circuit elements.This method is simple in parameter identification and is a widely used battery model at present.In this paper, second-order RC links are used to simulate the polarization reaction inside the battery [4] As shown in Figure 1.

4.1Open-circuit voltage SOC-OCV
Although the open circuit voltage method has many defects, it is a very reliable method to obtain open circuit voltage in battery experiments [5].The charging-discharging HPPC experiments on the battery are usually used to fit the SOC-OCV parameter table.In this experiment, the 18650 ternary lithium battery was used, with a rated capacity of 3300 mAh, a voltage of 3.65V, and an experimental temperature of 25 ± 2 pairs of lithium-ion battery to cycle every 10% SOC until the end of discharge.The experimental data are as follows.As can be seen from Figure 2, the final fitted curves mostly agree with the HPPC data.

The battery-space equation of state is established
The equations of state and the observed equation are: The discrete spatial equation of the state of the battery model is: They are the transmission matrix, the input matrix, the output matrix, and the feedforward matrix, respectively.

The RC parameter identification is realized by the least squares method with the forgetting factor
In order to mitigate the larger accumulation error of old data, the forgetting factor λ can be introduced into RLS to achieve the least squares method (FFRLS) [6].
λ is the forgetting factor, the values range from 0 to 1, and λ is usually taken as 0.95 <λ <1.The end-voltage formula of the battery model is The formula was transformed to obtain the expression of the model's least square The model parameters were calculated as follows:

Identification results of least squares parameters with forgetting factor
Taking the forgetting factor λ =0.99, the parameter results based on HPPC discharge identification are the best.

Estimate battery SOC based on AIEKF
Kalman filter algorithm is a linear filter algorithm [7], only suitable for linear systems, with high accuracy, which can be used in the field of tracking prediction.For the lithium battery, both the observation equation and the output equation are nonlinear systems, so it is necessary to apply the extended Kalman filter .whoseequation of state and the observation equation is The traditional extended Kalman filtering algorithm is to keep only linearization for the nonlinear part of the Taylor extension [8].A certain value of measurement noise and observation noise is selected to track and predict the nonlinear system.The accuracy is not accurate enough since the noise is fixed, and to solve this problem, a noise adaptive update process is introduced to improve the extended Kalman filter.
The AIEKF algorithm process is specified as follows.
We make the algorithm more stable and ensure its convergence.The method uses a damping parameter γ to adjust the covariance matrix each time as follows [9], for i=1:c.
(13) The iteration process is withdrawn when the number of iterations within a single step period reaches a set threshold c or when the vector norm of the difference between the estimated value of continuous iterations is smaller than the preset threshold.Adaptive update of the noise [10].
Figure 5 Comparison between EKF and AIEKF Figure 6 Comparison of errors between EKF and AIEKF and the time integration method In the experiment, the ampere-hour integral method represents the real state of the battery.As can be seen from Figure 5 in the US road cycle condition (UDDS) data.It can be seen that the AIEKF algorithm is closer to the real state, and the tracking ability of the AIEKF algorithm is also higher than that of EKF.As can be seen from Figure 6, the error of AIEKF is much smaller than that of EKF and is relatively stable.The error of AIEKF is always kept around-0.3%,and the error of EKF floats back and forth at 1% -3.8% and is unstable.It can be concluded that AIEKF estimates battery SOC better than EKF.

Conclusion
This paper selects the estimation of SOC in the battery management system as the research direction, and EKF is widely used in estimating SOC.However, there is the problem of error accumulation such as noise cannot be updated in time.Then we added noise adaptive rule and iterative theory to the extended Kalman (EKF), formed an Adaptive iterative Kalman filter (AIEKF) to estimate SOC for lithium batteries, established a second-order RC lithium battery model through MATLAB, and performed HPPC experiments to obtain charge-discharge current-voltage data.The fitted curve for the lithium battery SOC-OCV was obtained by MATLAB fitting.The parameter estimation of the battery model by least squares with the forgetting factor brings American road cycle condition (UDDS) data into AIEKF for comparison with EKF.It can be seen from the simulation diagram that AIEKF has better tracking and smaller error, far below the EKF.The experiment can also increase the temperature, charge, discharge rate, and working conditions to further verify the accuracy of SOC.

Figure 1 .
Figure 1.Second-order RC equivalent model of lithium battery.

Table 1 .
A simple table.Place the caption above the