Estimation of state-of-charge of Li-ion batteries in EV using the genetic particle filter

Estimating the state of charge (SOC) of electric vehicle (EV) batteries accurately and timely is of great significance to the safe trip of pure EV. Based on the nonlinear properties of the battery, and the standard particle filter (PF) has certain adaptability for this feature, so it can be used to accurately estimate the SOC of the batteries. However, the standard PF has particle degeneracy phenomenon, which will make the accuracy of prediction lower. Therefore, in this paper, the genetic algorithm is applied to the standard PF, and the estimation of SOC is optimized, which makes the improved filter algorithm more accurate. Based on the measured data of Beijing pure electric sanitation vehicle, an experiment is defined to verify the algorithm. The experimental results show that the genetic particle filter (GPF) can increase the diversity of particles and has better prediction accuracy and timeliness than the PF.


State equation
The state equation is determined by the SOC definition in the paper. In general, the expression of SOC uses Amper-Hour integral method, the specific calculation formula: Where, SOC(t) is the value of SOC at time , SOC 0 is the initial value of SOC, ( ) is the instantaneous current at time t ( ( ) > 0 for discharge, ( ) < 0 for charge). C n is the rated capacity, is the Columbic efficiency ( = 1 for discharge and ≤ 1 for charge). The state equation is derived as Eq. (2): Where, is the value of SOC at time , −1 is the instantaneous current at time − 1, is the sampling interval.

Observation equation
The paper selects the simplified electrochemical model [4] applying to Li-ion battery as the observation equation which is an analytical model and easy to estimate voltage or SOC.
Where, is the battery terminal voltage at time , is the battery resistance and 0, 1, 2, 3, 4 are a set of parameters to fit. Above all, the structure of battery model consisting of Eq. (2) and Eq. (3) is overall described in Eq. (4).
The model has the advantages of simple operation, small computation, easy to be realized in the micro controller, and easy to identify the parameters of the model. As long as battery data obtained, it can be obtained by the least squares identification model parameters.

The rationale for genetic particle filter
Compared with PF and genetic algorithm, their similarities are as follows: firstly, both algorithms have an initialized group, and each individual in the population represents a feasible solution of the system; secondly, each individual changes according to certain criteria and copy the individual with high fitness. Therefore, this paper attempts to apply the adaptive genetic algorithm to the PF, and use the genetic algorithm to optimize the traditional resampling process, so as to achieve the purpose of inhibiting particle degradation and increasing particle diversity. In this algorithm, we consider the particle swarm as a group, each particle is regarded as a chromosome, the importance of the weight of the particles as a personal fitness value. The unique search ability of the genetic algorithm greatly improves the utilization of the particles, so that the number of particles required to approximate the true posterior probability density function is greatly decreased, which not only reduces the computational complexity of the algorithm, but also improves the algorithm real-time.

The steps of genetic particle filter
Step1: Initialization Step2: Particle Sample Sample from the initial probability density function and yield a set of particles containing particles with an initial weight of Step5: Resampling According to the Eq. (7) to determine whether the particles need to genetic resampling. If yes, go to Step6. If not, go to Step10.
Step6: Crossover and mutation The weight ( ) is taken as the fitness of the individual. = { = 1,2, … , } According to adaptive genetic algorithm [9], the corresponding crossover probability ( ) and mutation probability ( ) are calculated by Eq. (8) and Eq. (9).  Where f max is the maximum fitness value of the individual, is the larger fitness value in the two intersecting individuals, is the fitness value of the variant individual, and f avg is the average of the individual fitness in the population.
Using Eq. (10) and Eq. (11) to perform the crossover and mutation operations.
Where is a random number evenly distributed over intervals 0 to 1, The roulette method is used to optimize the particle to obtain a new set {( , ),i=1,…,N} of particles.
Step9: State estimation The estimated state is given as Step10: Determine whether the algorithm is over. If it is out of the algorithm, otherwise, back to Step3.

Experimental Results Of Soc Estimation
In this experiment, the discharge data of two different periods of the same sanitation electric vehicle was collected from 8:13 am to 10:21 am on May 19, 2014 and from 14:23 pm to 16:30 pm on May 20, 2014.The particles are encoded using real numbers, and the parameters required for the experiment are shown in Table 1. The formula of the weight of the particle is used as the fitness function. The parameters of the battery model are identified by the recursive least squares method of forgetting factor. The input and output data of the model are the measured data of the pure electric sanitation vehicle. The battery model parameters are shown in Table 2.  The process noise and measurement noise are subject to the normal distribution of Q = 0.005 and P = 5, respectively. The variance of the measured noise is R = 5.
According to the specific steps of the GPF and PF, through the Matlab software to achieve the estimation process of the SOC, after repeated debugging and running, the final prediction results and error curves are as follows: Based on the above experimental data, this paper uses the root-mean-square error (RMSE) and root-mean-square-relative error (RMSRE) to further evaluate the estimation results. The mathematical expressions are as follows.
In the above equation, i y is the true value and i y is the predicted value. Table 3 and table 4 show the results of the comparison.  The experimental results show that the SOC estimation curve of the GPF is closer to the real curve than the PF. A further comparison shows that the RMSE and RMSRE of the GPF are reduced by about 40% relative to the standard PF. Therefore, the GPF is more effective than the PF in the estimation of the SOC of the electric vehicle batteries.

Conclusion
In this paper, a new PF optimization method, the genetic particle filter, is proposed to predict the SOC of the batteries, which effectively suppresses the degradation of particles in the standard PF. The statistical results of the battery discharge experiment based on the data of the actual operation of EV show that the genetic particle filter can effectively increase the diversity of the particles and own higher accuracy of the prediction than the standard PF, and has better SOC estimated characteristics.