A Novel State of Charge Estimation Algorithm for Lithium-Ion Battery Packs of Electric Vehicles

This paper focuses on state of charge (SOC) estimation for the battery packs of electric vehicles (EVs). By modeling a battery based on the equivalent circuit model (ECM), the adaptive extended Kalman filter (AEKF) method can be applied to estimate the battery cell SOC. By adaptively setting different weighed coefficients, a battery pack SOC estimation algorithm is established based on the single cell estimation. The proposed method can not only precisely estimate the battery pack SOC, but also effectively prevent the battery pack from overcharge and over-discharge, thus providing safe operation. Experiment results verify the feasibility of the proposed algorithm.


Introduction
Due to energy crisis and environmental issues, energy storage systems have been applied more and more widely in electric vehicles (EVs), power grids, consumer electronics equipment, etc. Lithium-ion batteries dominate a considerable percentage of these applications in view of their high energy density, low life cycle, and lack of memory effect [1].In EVs or plug-in hybrid electric vehicles (PHEVs), a battery pack is usually comprised of tens to thousands of battery cells connected in series, parallel, or an even more complex topology.Hence, it is imperative to employ a so-called battery management system (BMS) to safeguard, manage, and oversee the pack to ensure its proper operation.An important task for the BMS is to estimate the battery's current statuses, which usually include state of charge (SOC) and state of health (SOH) [2].This paper focuses on SOC estimation for the battery packs of EVs.
Battery SOC, according to its definition, represents the ratio of available battery capacity compared with the current battery rated capacity [3].The available battery capacity can influence and even determine how long a battery can be fully charged, and consequently how far a vehicle can drive.Thus, it is imperative to estimate the battery SOC precisely.An accurate SOC can present the battery available capacity status, prevent a battery pack from overcharge or over-discharge, and can effectively protect the battery, thereby potentially prolonging the battery life.The most direct and easiest method of estimating SOC is the coulomb counting method, which is also called the ampere-hour (Ah) integration method.Currently, most vehicle original equipment manufacturers (OEMs) and BMS manufacturers adopt this method, along with a variety of look-up tables and threshold protections [4]; however, there exist three obvious defects with this method.First, it needs precise estimation of the initial SOC values, which usually relies on memorial values of the last operation or the help of the initially built relationship with battery open circuit voltage (OCV).Second, it may bring the drift of SOC measurement due to the offset of the current sensors.Third, it requires accurate battery current capacity estimation, which may vary with the current, temperature, and operation cycles [5,6].As a result, various research innovations have been spurred to overcome these estimation defects and to improve SOC precision [7].
Currently, there is an abundance of intelligent methods developed for battery cell SOC estimation, leading to a rich pool of publications.The purpose of all these methods is to compensate for error accumulation and initial SOC error induced by the coulomb counting method.Of these methods, the most widely employed include: neural networks [8][9][10], supported vector machines [11][12][13], fuzzy logic [14][15][16], and miscellaneous filters [8,10,13,[17][18][19][20][21][22][23].Among all the candidates, the most popular method is the Kalman filter and its variously extended formats, which mainly include the extended Kalman filter (EKF) [24,25], sigma-point Kalman filter [26], unscented Kalman filter (UKF) [17,27], adaptive extended Kalman filter (AEKF) [28], etc.The first three methods declare the advances of improving estimation precision and dispensing the initial SOC values; however, they need the estimation of covariance for state and measured variables, which may be unfeasible and vary with the operation conditions.Some methods even require a considerable quantity of computations.On the other hand, the AEKF can estimate the covariance of noises recursively and regressively, which varies with the external conditions, thus reducing the critical covariance estimation [29].In view of these merits, the AEKF has attracted vast attention due to its enclosed solution for the whole SOC estimation.
The definition of SOC of a battery pack is much more complex than that of a single battery cell.This is because in a battery pack, there exists a variety of cells, of which the voltage and capacity cannot be guaranteed to be consistent due to differences in production engineering, materials, as well as the electric connection and internal temperature field distribution.Hence it is not accurate to regard a battery pack as some simple connection of battery cells when calculating SOC.In [30], the highest and lowest cell SOC values are quantified to calibrate the cell capacity.The final battery pack SOC can be determined based on the weighted average values with respect to all the SOC values and their rated capacities.This method relies on calculating each cell's SOC based on the AEKF method.This amount of computation cannot be accepted, however, due to the abundance of matrix transformation for each cell's AEKF-based estimation.In [31,32], a battery pack model is built to be regarded as an integrated cell; however, this method is not universal and needs substantial training based on a variety of measured data.The most popular method is to calculate the average value of all cells and then treat it as the pack value.In [15], the SOC of each cell is calculated based on EKF, and adaptive neuro-fuzzy inference system (ANFIS) is employed to calculate the pack value.This process is time-consuming and calculation-heavy.Another popular method for determining battery pack SOC is firstly calculating each cell's SOC, and then selecting the maximum cell SOC value when the battery is being charged and the minimum cell SOC value when the battery is being discharged as the pack SOC.However, this method has a few obvious disadvantages.First, it relies on each cell's SOC calculation, which requires considerable labor and storage memory, especially when hundreds of cells constitute a battery pack.Second, it can induce oscillations when the battery is transitioned between the charge process and discharge process, leading to an unsatisfactory user experience.When the battery is under discharge process, the lowest cell SOC should represent the battery pack to escape from over-discharge.When the EV operation transfers from driving mode to regeneration mode, the battery pack begins to charge, and now the highest cell SOC should become the pack SOC instead, thus preventing overcharge.During this process, the battery pack SOC transfers from the lowest SOC value to the highest cell SOC value.Supposing their difference is 5%, obviously, then the pack SOC's oscillation is 5%.This is not acceptable during real optimization, even some OEMs usually adopt filters to decrease the oscillation to some extent.Third, it needs an arrangement algorithm to queue all the SOC values, which can also contribute to the calculation labor.Based on these considerations, this method is not applicable to estimate battery pack SOC in real applications of EVs.
From this point, it is imperative to build a battery pack SOC estimation algorithm which can firstly determine the overall battery pack SOC value, and secondly achieve a satisfactory user experience.Based on the authors' understanding, the user experience should include these four typical criteria.First, when one cell of the battery pack is fully charged, the pack SOC should be equal to 100%.Second, when one cell is discharged to the lowest voltage threshold, the pack SOC should reach 0%.In addition, the pack SOC should not decrease when the battery is charged, and should not increase when the battery is discharged.Moreover, the battery pack SOC should not oscillate frequently.These demands motivate authors to conduct research in this area.In order to properly evaluate the SOC estimation, a powerful and effective battery model, which has a fast calculation speed, enough precision, and limited storage size, is necessary to quantify the battery electrochemical reaction.Currently, the electrochemical model can precisely estimate battery SOC based on calculating a variety of differential equations [33,34].Usually, these kinds of models can be finished by some particular finite element analysis software, such as Ansys.The black box model, just like its name implies, employs some artificial intelligence tools, such as neural networks [22], supported vector machines [13], etc. to construct an invisible model to simulate battery performance.Obviously, this kind of model relies on a huge amount of experimental data to train the model output, i.e., battery SOC with inputs of the battery's measured voltage, current, as well as temperature.Therefore, it is not feasible to apply the black box model in a real-time operating BMS.The equivalent circuit model (ECM) usually consists of one or two resistance-capacitance (RC) networks, an OCV source, and a resistor, which are connected in series [5,35].Due to its simple structure and relatively acceptable precision, the ECM has been widely used in BMSs for all kinds of lithium-ion batteries.In this paper, the ECM is employed to model a single cell, from which the battery pack model is built and validated.Based on the ECM, genetic algorithm (GA) is applied to optimally identify the model parameters.Then, AEKF is applied to estimate the single cell SOC.By setting a series of rules and threshold values, the pack SOC is determined based on the highest cell SOC and the lowest cell SOC.Finally, experiments examine and justify the effectiveness of the proposed method.

Battery Modeling
In a battery pack, there exist tens to thousands of cells connected in series or in parallel.The production engineering, the material performance and the thermal distribution lead to inconsistency of the battery cell performance.Balancing technologies are implemented to compensate for these difference to some extent.In order to determine the battery pack SOC, it is imperative to first model the cell with an acceptable precision.Then, the cell SOC can be estimated, thereby paving the road for the pack SOC estimation.

Battery Cell Modeling
An effective battery model should not only reflect a battery's dynamic and static characteristics, but also should be of simple structure and require easy calculations.In this paper, a lithium iron phosphate battery pack is considered as the research object, of which each cells' capacity is 5 Ah and the rated voltage is 3.3 V.By analyzing the electrochemical impedance map, a one-order ECM is adopted to characterize battery performance, which is suitable to be implemented in a BMS.As shown in Figure 1, the proposed model mainly encompasses four elements, i.e., an OCV source, one RC network, and two resistors.[33,34].Usually, these kinds of models can be finished by some particular finite element analysis software, such as Ansys.The black box model, just like its name implies, employs some artificial intelligence tools, such as neural networks [22], supported vector machines [13], etc. to construct an invisible model to simulate battery performance.Obviously, this kind of model relies on a huge amount of experimental data to train the model output, i.e., battery SOC with inputs of the battery's measured voltage, current, as well as temperature.Therefore, it is not feasible to apply the black box model in a real-time operating BMS.The equivalent circuit model (ECM) usually consists of one or two resistance-capacitance (RC) networks, an OCV source, and a resistor, which are connected in series [5,35].Due to its simple structure and relatively acceptable precision, the ECM has been widely used in BMSs for all kinds of lithium-ion batteries.In this paper, the ECM is employed to model a single cell, from which the battery pack model is built and validated.
Based on the ECM, genetic algorithm (GA) is applied to optimally identify the model parameters.
Then, AEKF is applied to estimate the single cell SOC.By setting a series of rules and threshold values, the pack SOC is determined based on the highest cell SOC and the lowest cell SOC.Finally, experiments examine and justify the effectiveness of the proposed method.

Battery Modeling
In a battery pack, there exist tens to thousands of cells connected in series or in parallel.The production engineering, the material performance and the thermal distribution lead to inconsistency of the battery cell performance.Balancing technologies are implemented to compensate for these difference to some extent.In order to determine the battery pack SOC, it is imperative to first model the cell with an acceptable precision.Then, the cell SOC can be estimated, thereby paving the road for the pack SOC estimation.

Battery Cell Modeling
An effective battery model should not only reflect a battery's dynamic and static characteristics, but also should be of simple structure and require easy calculations.In this paper, a lithium iron phosphate battery pack is considered as the research object, of which each cells' capacity is 5 Ah and the rated voltage is 3.3 V.By analyzing the electrochemical impedance map, a one-order ECM is adopted to characterize battery performance, which is suitable to be implemented in a BMS.As shown in Figure 1, the proposed model mainly encompasses four elements, i.e., an OCV source, one RC network, and two resistors.The main function of an OCV is to quantify the relationship between the open circuit terminal voltage and the battery SOC.The RC network can simulate the diffusion reaction when the battery is excited with different currents.The resistors can capture the immediate voltage drop when a discharge or charge operation occurs.It is necessary to mention that a series-connected resistor shows different values when transferring between charge and discharge operations, hence we employ two resistors connected in series with a diode, and parallel them to describe this phenomenon in the model.
According to Figure 1, the following equations can be formulated based on Kirchhoff's voltage law: where I denotes the battery current, and U OCV , U t , and U p are, respectively, the voltage drops of the open circuit, battery terminal, and R p .In Equation ( 2), R 0 equals R discharge0 and R charge0 when the battery is discharged and charged, respectively.For ease of calculation, a discrete form of Equation ( 1) can be expressed as: where T represents the sampling interval and is set to be 1 s in this paper, and τ = R p C p .Correspondingly, the cell SOC can be calculated according to the definition: where SOC 0 indicates the initial value of SOC and should be determined in advance with help of the preset relationship with the OCV.C b is the battery rated capacity, and η is the integral coefficient varying with temperature, current rate, and battery degradation.
Based on Equations (3) and ( 5), and the definitions x(t) = x 1 (t) x 2 (t) and y(t) = U t (t), the following state space function can be obtained: . where Next, the model parameters need to be identified with accepted precision, and the model precision should be verified simultaneously.

Parameters Identification Based on Genetic Algorithm
Currently, the least square method is widely employed to identify the model parameters [36][37][38][39].This method is easy to implement and has acceptable local identification performance, though the overall identification precision will be compromised as the identified data quantity becomes large [40].In this paper, GA is applied to estimate the battery parameters to gain the global optimal solution.GA is a stochastic method simulating the revolution of biology [41].By a series of actions, including elitism selection, crossover and mutation, GA can find the optimal solution with numerous iterations.The main objective of elitism selection is to pick the optimal offspring; the purpose of crossover is to generate new offspring by combing the performances of the current populations.The goal of mutation is to stochastically change some populations to prevent them from sinking into locally optimal solutions [25,41].Currently, GA has been widely implemented in industry applications [42], such as automatic control, robotics, image processing, and machine learning.For these highly nonlinear systems with variable model parameters and multiple objects, GA can find optimal or suboptimal solutions conveniently with acceptable calculation speed.
The detailed identification schematic is shown in Figure 2.During the process of parameters identification, the voltage and current data are initially identified, and the identified model parameters are considered as the initial population.GA is then applied to identify the model parameters by a series of actions including crossover, mutation, and elitism selection.During the process of parameters identification, the measured current and battery terminal voltage are set as the input and output of the model, respectively.The absolute value of differences between voltage measurement and the model output is considered as the fitness value, as shown in Equation (7).By iteration, the model parameters can be eventually determined until the fitness value reaches a preset low threshold.In this paper, the low threshold is set as 0.01.Finally, the algorithm terminates and outputs the model parameters.
Energies 2016, 9, 710 5 of 15 iterations.The main objective of elitism selection is to pick the optimal offspring; the purpose of crossover is to generate new offspring by combing the performances of the current populations.The goal of mutation is to stochastically change some populations to prevent them from sinking into locally optimal solutions [25,41].Currently, GA has been widely implemented in industry applications [42], such as automatic control, robotics, image processing, and machine learning.For these highly nonlinear systems with variable model parameters and multiple objects, GA can find optimal or suboptimal solutions conveniently with acceptable calculation speed.
The detailed identification schematic is shown in Figure 2.During the process of parameters identification, the voltage and current data are initially identified, and the identified model parameters are considered as the initial population.GA is then applied to identify the model parameters by a series of actions including crossover, mutation, and elitism selection.During the process of parameters identification, the measured current and battery terminal voltage are set as the input and output of the model, respectively.The absolute value of differences between voltage measurement and the model output is considered as the fitness value, as shown in Equation (7).By iteration, the model parameters can be eventually determined until the fitness value reaches a preset low threshold.In this paper, the low threshold is set as 0.01.Finally, the algorithm terminates and outputs the model parameters.In order to identify the model parameters, a hybrid pulse power characterization (HPPC) experiment is carried out to supply an extreme voltage response by exciting high current charge and discharge pulses, followed by a constant current discharge and a certain time rest.By this way, the battery dynamic performances can be determined, and subsequently the OCV response with respect to different SOC values can be quantified.By this experiment, the battery parameters can then be effectively identified by GA.As shown in Figure 3, the HPPC current profiles can be divided into 10 cycles, each of which contains a 5C current pulse charge, a 5C current pulse discharge, 1C current discharge, and 1 h rest, where C denotes the battery rated capacity with unit Ah.The battery rated capacity is 5 Ah, and thus C equals 5.The voltage thresholds for avoiding overcharge and overdischarge are 3.8 V and 2.6 V, respectively.The voltage response curve is also depicted in Figure 3.It can be observed that the OCV and the battery voltage reaction can be determined, thereby paving the road for fully identifying the battery parameters.
The OCV curve can be fitted using poly numerical equations, as displayed in Equation ( 8), of which the coefficients, i.e.,  In order to identify the model parameters, a hybrid pulse power characterization (HPPC) experiment is carried out to supply an extreme voltage response by exciting high current charge and discharge pulses, followed by a constant current discharge and a certain time rest.By this way, the battery dynamic performances can be determined, and subsequently the OCV response with respect to different SOC values can be quantified.By this experiment, the battery parameters can then be effectively identified by GA.As shown in Figure 3, the HPPC current profiles can be divided into 10 cycles, each of which contains a 5C current pulse charge, a 5C current pulse discharge, 1C current discharge, and 1 h rest, where C denotes the battery rated capacity with unit Ah.The battery rated capacity is 5 Ah, and thus C equals 5.The voltage thresholds for avoiding overcharge and over-discharge are 3.8 V and 2.6 V, respectively.The voltage response curve is also depicted in Figure 3.It can be observed that the OCV and the battery voltage reaction can be determined, thereby paving the road for fully identifying the battery parameters.
The OCV curve can be fitted using poly numerical equations, as displayed in Equation ( 8), of which the coefficients, i.e., P 1 , P 2 , P 3 , P 4 , P 5 , P 6 , P 7 and P 8 are equal to 70.9239, −280.5262,453.0390, −386.2610,188.2906, −53.2899, 8.5636 and 2.6, respectively.Figure 4 proves that the polynomial equations can effectively describe the nonlinear relationship between the OCV and SOC.y = P 1 × SOC 7 + P 2 × SOC 6 + P 3 × SOC 5 + P 4 × SOC 4 + P 5 × SOC 3 + P 6 × SOC 2 + P 7 × SOC + P 8 (8)  Based on the identification results, the battery model parameters, including charge0 R , discharge0 R , p R , and p C , are 0.0144 ohm, 0.0146 ohm, 0.0092 ohm and 3073.4F, respectively.Figure 5 shows the model fitting error, which states that the maximum error between the measured voltage and the model output is 0.067 V, thereby proving that the constructed model and the corresponding parameters can accurately simulate the battery characterization.
With the built model and the identified model parameters, the AEKF algorithm is then applied to estimate the single cell SOC, and correspondingly the battery pack SOC is determined.

State of Charge Estimation Algorithm Design
In this paper, the AEKF algorithm is applied to estimate the cell SOC first, and then a novel pack SOC algorithm is proposed based on the cell estimation.Based on the identification results, the battery model parameters, including charge0 R , discharge0 R , p R , and p C , are 0.0144 ohm, 0.0146 ohm, 0.0092 ohm and 3073.4F, respectively.Figure 5 shows the model fitting error, which states that the maximum error between the measured voltage and the model output is 0.067 V, thereby proving that the constructed model and the corresponding parameters can accurately simulate the battery characterization.
With the built model and the identified model parameters, the AEKF algorithm is then applied to estimate the single cell SOC, and correspondingly the battery pack SOC is determined.

State of Charge Estimation Algorithm Design
In this paper, the AEKF algorithm is applied to estimate the cell SOC first, and then a novel pack SOC algorithm is proposed based on the cell estimation.Based on the identification results, the battery model parameters, including R charge0 , R discharge0 , R p , and C p , are 0.0144 ohm, 0.0146 ohm, 0.0092 ohm and 3073.4F, respectively.Figure 5 shows the model fitting error, which states that the maximum error between the measured voltage and the model output is 0.067 V, thereby proving that the constructed model and the corresponding parameters can accurately simulate the battery characterization.
With the built model and the identified model parameters, the AEKF algorithm is then applied to estimate the single cell SOC, and correspondingly the battery pack SOC is determined.Based on the identification results, the battery model parameters, including charge0 R , discharge0 R , p R , and p C , are 0.0144 ohm, 0.0146 ohm, 0.0092 ohm and 3073.4F, respectively.Figure 5 shows the model fitting error, which states that the maximum error between the measured voltage and the model output is 0.067 V, thereby proving that the constructed model and the corresponding parameters can accurately simulate the battery characterization.
With the built model and the identified model parameters, the AEKF algorithm is then applied to estimate the single cell SOC, and correspondingly the battery pack SOC is determined.

State of Charge Estimation Algorithm Design
In this paper, the AEKF algorithm is applied to estimate the cell SOC first, and then a novel pack SOC algorithm is proposed based on the cell estimation.

State of Charge Estimation Algorithm Design
In this paper, the AEKF algorithm is applied to estimate the cell SOC first, and then a novel pack SOC algorithm is proposed based on the cell estimation.

The Cell State of Charge Estimation Based on Adaptive Extended Kalman Filter
Compared with coulomb counting method, the main principle of applying the AEKF to estimate the cell SOC is that the AEKF can combine the output of coulomb counting method and the model output with Kalman gain as the weighed coefficient, thereby improving the estimation precision.In addition, it can adaptively regulate the Kalman gain automatically based on the difference between the measured voltage and the model output.In order to apply AEKF to estimate the cell SOC, the space state equation of the battery cell model is established based on Equation (6), and the discrete form can be formulated as: Here, A k , B k , C k , and D k are discrete forms of A, B, C, and D presented in Equation ( 6), as shown in Equation (10): where T is the sampling rate with 1 s as an interval and k denotes the steps.w k and v k are process noise and measurement noise, respectively, both of which are supposed to be Gauss white noise with zero average values.Their corresponding covariance values are Q k and R k , respectively.In this paper, by observation, the battery current varies from 0C to 1C ampere most of time.Only 3C current occurs when the vehicle is accelerated or decelerated sharply, while the duration is usually within several seconds.When the battery current is less than 1C ampere, the integral coefficient varies within 3%, and therefore can be regarded as unchanged.Based on these considerations, the integral coefficient, i.e., C b , is supposed to be a constant.It is necessary to mention that when applying the SOC estimation method based on AEKF, it does not rely on a precise initial SOC value estimation, unlike the coulomb counting method.The SOC can gradually converge to the true value by iteration.It can be set to any arbitrary value between 0 and 1.In this paper, we set the initial value as 0.5.
Essentially, AEKF is based on the principle of minimizing the mean square error estimation to seek a recursive estimation algorithm, which is comprised of initialization, time update, and measurement update.The detailed process is listed as follows.
(a) Initialization of filtering equation: where E and var are the mean value of the state variable and the covariance of the system, respectively.(b) Time update, which includes state space update and covariance of error update: where x− k+1 is a prior estimation of state x at step k + 1, x+ k denotes the poster estimation at step k, and u k is the current input at step k.(c) Measurement update, which involves Kalman gain calculation, state estimation measurement update, and error covariance update: where R k can be determined by the voltage sensors during operation, y k is the acquired measured voltage at step k, and I states a two-order unit matrix employed to update the error covariance.
According to Equations ( 12) and ( 13), the calculation of EKF requires the accurate estimation of Q k and R k , which cannot be estimated accurately during the EKF calculation process.The advantage of AEKF is that it can automatically and adaptively regulate Q k and R k during the actual calculation process [28].In this manner, it can dispense the need of Q k and R k estimation, which may change stochastically with operating conditions.The adaptive estimation process is formulated as follows: where e j is the remaining error.In order to recursively calculate Q k and R k , first the model remaining error e j is calculated, and then d k is the calculation which states covariance of e j with a moving estimation window of size N. Based on the movingly updated d k , Q k and R k can be recursively estimated based on the model errors and their covariance.By this manner, Q k and R k can adaptively vary with the error magnitude, thereby realizing the online estimation.

Battery Pack State of Charge Estimation
For all the cell voltages in a battery pack, there exists a maximum value V max and a minimum value V min .Suppose their corresponding SOC values are SOC max and SOC min , respectively, which are calculated based on the above AEKF method.In this paper, we only consider SOC max and SOC min to determine the final pack SOC.Thus, it can be said that only two iterations of AEKF are applied, independent of battery cells connected in series.Consequently, the calculation labor can be substantially reduced compared with what is required when calculating each cell's SOC.In this paper, two weighed coefficients, w 1 and w 2 , are considered, which change within SOC max and SOC min .The final battery pack SOC output can be formulated as, where w 1 (k) and w 2 (k) range from 0 to 1.In order to properly determine w 1 (k) and w 2 (k), the vehicle operation status and the customer experience should be analyzed in detail.During the battery operation, customers usually pay attention to two extreme statuses including the status when the battery is almost fully charged and the status when the battery is almost fully discharged.When the battery is almost fully charged, the battery pack SOC needs to converge to the highest SOC gradually, thus ensuring an acceptable user experience and simultaneously preventing overcharge.When the battery is near empty, similarly, the battery pack SOC should be close to the lowest cell SOC with fast speed.Thus, it can effectively avoid over-discharge.In addition, when the battery status is in between, two weighed coefficients are employed to smoothly transfer the SOC estimation between the highest cell SOC and the lowest cell SOC.Therefore, three classifications are made based on SOC max (k), SOC min (k), and their differences.By this manner, the pack SOC output will not oscillate greatly while ensuring the safe operation.The detailed calculation process is shown in Figure 6.It is necessary to mention that only when the difference between SOC max (k) and SOC min (k) is more than 0.5 will a BMS consider a fault to have occurred, at which point it will then stop the algorithm calculation and send out alarms.
Energies 2016, 9, 710 9 of 15 than 0.5 will a BMS consider a fault to have occurred, at which point it will then stop the algorithm calculation and send out alarms.(a) Case 1:

Initialization
Condition: Determination: In this case, This case considers the situation where the battery is being discharged with relatively large cell SOC difference.Now the algorithm becomes a tracking system, where pack ( ) SOC k tries to catch min ( ) SOC k . 1 ( ) w k equals 0, and 2 ( ) w k can reflect the tracking time and the tracking rate.Here 2 ( ) w k is supposed to be a constant and equals its initial values when the estimation transfers from Case 1 to Case 2.

(b) Case 2:
Condition: This case considers the situation where the battery is being discharged with relatively large cell SOC difference.Now the algorithm becomes a tracking system, where SOC pack (k) tries to catc SOC min (k) .w 1 (k) equals 0, and w 2 (k) can reflect the tracking time and the tracking rate.Here w 2 (k) is supposed to be a constant and equals its initial values when the estimation transfers from Case 1 to Case 2.
(c) Case 3: Similar to Case 2, when the battery is being charged, SOC pack (k) begins to catch SOC max (k) .Hence, w 1 (k) becomes the transferring rate and w 2 (k) equals 0.
It can be observed that these three boundaries dynamically change with SOC max (k) and SOC min (k), and are correlated with their differences.The main reason why we classify the SOC estimation process into three cases is that during the end process of both charging and discharging, the weighed coefficients change more obviously than the average threshold values shown in Equation (19).Thus, the pack SOC can converge to SOC min (k) and SOC max (k) at a faster speed, compared to the calculation that considers only Case 1.
Next step, experiment validation, is performed to verify the effectiveness of the proposed algorithm.

Experiment Validation
In this paper, the experiment validation is divided into two steps.First, the experiment is carried out in the laboratory, which uses a two-parallel and twelve-series connected battery pack as the test platform.The voltage and current values of each cell and battery pack can be measured based on the BMS module.During the validation, each cell's SOC is estimated and the pack SOC is determined based on these estimations.Second, the program is verified using an electric logistics vehicle, shown in Figure 7, which consists of a battery pack with 150 modules connected in series and 28 cells connected in parallel as a module.The rated capacity of the battery pack is 140 Ah, and the rated voltage is 540 V.When the vehicle is operated, the related measurements of the battery pack can be obtained through a monitoring platform.It can be observed that these three boundaries dynamically change with max ( ) SOC k and min ( ) SOC k , and are correlated with their differences.The main reason why we classify the SOC estimation process into three cases is that during the end process of both charging and discharging, the weighed coefficients change more obviously than the average threshold values shown in Equation (19).Thus, the pack SOC can converge to min ( ) SOC k and max ( ) SOC k at a faster speed, compared to the calculation that considers only Case 1.
Next step, experiment validation, is performed to verify the effectiveness of the proposed algorithm.

Experiment Validation
In this paper, the experiment validation is divided into two steps.First, the experiment is carried out in the laboratory, which uses a two-parallel and twelve-series connected battery pack as the test platform.The voltage and current values of each cell and battery pack can be measured based on the BMS module.During the validation, each cell's SOC is estimated and the pack SOC is determined based on these estimations.Second, the program is verified using an electric logistics vehicle, shown in Figure 7, which consists of a battery pack with 150 modules connected in series and 28 cells connected in parallel as a module.The rated capacity of the battery pack is 140 Ah, and the rated voltage is 540 V.When the vehicle is operated, the related measurements of the battery pack can be obtained through a monitoring platform.

Laboratory Validation
As shown in Figure 8, a battery test system NEWARE BTS-400 (NEWARE, Shenzhen, China) is employed to charge and discharge the battery pack in the laboratory.A BMS along with a monitoring unit is responsible for measuring the cell and pack voltage and current, calculating the SOC and communicating with the host computer with controller area network (CAN) bus.

Laboratory Validation
As shown in Figure 8, a battery test system NEWARE BTS-400 (NEWARE, Shenzhen, China) is employed to charge and discharge the battery pack in the laboratory.A BMS along with a monitoring unit is responsible for measuring the cell and pack voltage and current, calculating the SOC and communicating with the host computer with controller area network (CAN) bus.Hence, 1 ( ) w k becomes the transferring rate and 2 ( ) w k equals 0.
It can be observed that these three boundaries dynamically change with max ( ) SOC k and min ( ) SOC k , and are correlated with their differences.The main reason why we classify the SOC estimation process into three cases is that during the end process of both charging and discharging, the weighed coefficients change more obviously than the average threshold values shown in Equation (19).Thus, the pack SOC can converge to min ( ) SOC k and max ( ) SOC k at a faster speed, compared to the calculation that considers only Case 1.
Next step, experiment validation, is performed to verify the effectiveness of the proposed algorithm.

Experiment Validation
In this paper, the experiment validation is divided into two steps.First, the experiment is carried out in the laboratory, which uses a two-parallel and twelve-series connected battery pack as the test platform.The voltage and current values of each cell and battery pack can be measured based on the BMS module.During the validation, each cell's SOC is estimated and the pack SOC is determined based on these estimations.Second, the program is verified using an electric logistics vehicle, shown in Figure 7, which consists of a battery pack with 150 modules connected in series and 28 cells connected in parallel as a module.The rated capacity of the battery pack is 140 Ah, and the rated voltage is 540 V.When the vehicle is operated, the related measurements of the battery pack can be obtained through a monitoring platform.

Laboratory Validation
As shown in Figure 8, a battery test system NEWARE BTS-400 (NEWARE, Shenzhen, China) is employed to charge and discharge the battery pack in the laboratory.A BMS along with a monitoring unit is responsible for measuring the cell and pack voltage and current, calculating the SOC and communicating with the host computer with controller area network (CAN) bus.  Figure 9 shows the cell SOC estimation based on the AEKF method.It can be observed that the proposed method can converge to the reference value effectively.The difference between the highest SOC and lowest SOC is around 0.1.The analysis of the error for the lowest SOC is also shown in Figure 9, which states that the maximum error is 0.65%.Thus, our experiment proves that the AEKF can estimate cell SOC precisely.
Figure 9 shows the cell SOC estimation based on the AEKF method.It can be observed that the proposed method can converge to the reference value effectively.The difference between the highest SOC and lowest SOC is around 0.1.The analysis of the error for the lowest SOC is also shown in Figure 9, which states that the maximum error is 0.65%.Thus, our experiment proves that the AEKF can estimate cell SOC precisely.Figure 10 shows k R variation when estimating the lowest cell SOC, and it can be seen that k R varies from 0 to 0.00126 dynamically.After sorting all the voltage values, and calculating one SOC for every two voltage measurements, six cells' SOC values in total are obtained, as shown in Figure 11.Based on the proposed algorithm, the final battery pack SOC can be determined.In order to feature the performance of the proposed algorithm, the pack SOC is also calculated by averaging all the cell SOC values.Figure 11  Figure 10 shows R k variation when estimating the lowest cell SOC, and it can be seen that R k varies from 0 to 0.00126 dynamically.After sorting all the voltage values, and calculating one SOC for every two voltage measurements, six cells' SOC values in total are obtained, as shown in Figure 11.
Energies 2016, 9, 710 11 of 15 Figure 9 shows the cell SOC estimation based on the AEKF method.It can be observed that the proposed method can converge to the reference value effectively.The difference between the highest SOC and lowest SOC is around 0.1.The analysis of the error for the lowest SOC is also shown in Figure 9, which states that the maximum error is 0.65%.Thus, our experiment proves that the AEKF can estimate cell SOC precisely.Based on the proposed algorithm, the final battery pack SOC can be determined.In order to feature the performance of the proposed algorithm, the pack SOC is also calculated by averaging all the cell SOC values.Figure 11   Figure 9 shows the cell SOC estimation based on the AEKF method.It can be observed that the proposed method can converge to the reference value effectively.The difference between the highest SOC and lowest SOC is around 0.1.The analysis of the error for the lowest SOC is also shown in Figure 9, which states that the maximum error is 0.65%.Thus, our experiment proves that the AEKF can estimate cell SOC precisely.Based on the proposed algorithm, the final battery pack SOC can be determined.In order to feature the performance of the proposed algorithm, the pack SOC is also calculated by averaging all the cell SOC values.Figure 11   Based on the proposed algorithm, the final battery pack SOC can be determined.In order to feature the performance of the proposed algorithm, the pack SOC is also calculated by averaging all the cell SOC values.Figure 11 also shows their differences.It can be found that based on the proposed method, the battery pack SOC smoothly transfers between SOC max and SOC min .When SOC pack is relatively high, it is near SOC max ; when SOC pack is relatively low, it decreases faster and becomes nearer to SOC min .Compared with the average cell SOC method, the pack SOC based on the proposed method is higher when the battery begins to be discharged.The difference becomes smaller as the SOC decreases.It can be observed that the pack SOC based on the proposed method varies more obviously than that based on the average method.To sum up, the experiment proves that the pack SOC can effectively transfer between SOC max and SOC min .In this way, the proposed algorithm not only can safeguard the safety of the battery pack both when running and charging, but also can produce a satisfactory user experience.

Electric Vehicle Validation
During the vehicle validation, only the cell current, the highest and lowest voltages, the corresponding cell SOC, and the pack SOC are broadcast due to the limited calculation capability.The highest voltage and lowest voltage are obtained, as presented in Figure 12.It can be found that the difference between the maximum voltage and minimum voltage is more than 0.05 V.Meanwhile, the battery current is collected and the pack current is translated into the cell current based on the average distribution, also shown in Figure 12.
nearer to min SOC .Compared with the average cell SOC method, the pack SOC based on the proposed method is higher when the battery begins to be discharged.The difference becomes smaller as the SOC decreases.It can be observed that the pack SOC based on the proposed method varies more obviously than that based on the average method.To sum up, the experiment proves that the pack SOC can effectively transfer between max SOC and min SOC .In this way, the proposed algorithm not only can safeguard the safety of the battery pack both when running and charging, but also can produce a satisfactory user experience.

Electric Vehicle Validation
During the vehicle validation, only the cell current, the highest and lowest voltages, the corresponding cell SOC, and the pack SOC are broadcast due to the limited calculation capability.The highest voltage and lowest voltage are obtained, as presented in Figure 12.It can be found that the difference between the maximum voltage and minimum voltage is more than 0.05 V.Meanwhile, the battery current is collected and the pack current is translated into the cell current based on the average distribution, also shown in Figure 12.According to the current profile, the working condition consists of acceleration, deceleration, and idle operating mode, which cover most of the operating conditions of vehicles.Based on the proposed algorithm and the average cell SOC method, max SOC , min SOC , and two pack

SOC
values are calculated according to the collection voltage and current, as shown in Figure 13. Figure 13 also shows the pack SOC differences when two different methods are applied.It can be clearly observed that the pack SOC based on the proposed method varies more obviously compared with that based on the average cell SOC method.According to the current profile, the working condition consists of acceleration, deceleration, and idle operating mode, which cover most of the operating conditions of vehicles.Based on the proposed algorithm and the average cell SOC method, SOC max , SOC min , and two SOC pack values are calculated according to the collection voltage and current, as shown in Figure 13. Figure 13 also shows the pack SOC differences when two different methods are applied.It can be clearly observed that the pack SOC based on the proposed method varies more obviously compared with that based on the average cell SOC method.
Energies 2016, 9, 710 12 of 15 nearer to min SOC .Compared with the average cell SOC method, the pack SOC based on the proposed method is higher when the battery begins to be discharged.The difference becomes smaller as the SOC decreases.It can be observed that the pack SOC based on the proposed method varies more obviously than that based on the average method.To sum up, the experiment proves that the pack SOC can effectively transfer between max SOC and min SOC .In this way, the proposed algorithm not only can safeguard the safety of the battery pack both when running and charging, but also can produce a satisfactory user experience.

Electric Vehicle Validation
During the vehicle validation, only the cell current, the highest and lowest voltages, the corresponding cell SOC, and the pack SOC are broadcast due to the limited calculation capability.The highest voltage and lowest voltage are obtained, as presented in Figure 12.It can be found that the difference between the maximum voltage and minimum voltage is more than 0.05 V.Meanwhile, the battery current is collected and the pack current is translated into the cell current based on the average distribution, also shown in Figure 12.According to the current profile, the working condition consists of acceleration, deceleration, and idle operating mode, which cover most of the operating conditions of vehicles.Based on the proposed algorithm and the average cell SOC method,   Figure 14 shows the calculation case transitions.It can be observed than SOC pack transfers from SOC max to SOC min when the battery is discharged, and the calculation process alters from Case 1 to Case 2. When the battery is being discharged, SOC max is 97% and SOC pack is 96%, while when the discharge process ends, SOC min is 9% and the pack value is 15%.When the algorithm reaches Case 2, w 2 is taken into account and w 1 becomes zero.This transition can make SOC pack converge to SOC min more quickly to protect the battery cell from over-discharge using gain adjustment.Therefore, the experiment proves that the proposed algorithm can estimate the pack SOC more reasonably by only calculating two cells' SOC, compared with the average cell SOC method.In addition, it can transit from the highest SOC to the lowest SOC smoothly, and can thus provide a friendly user experience.more quickly to protect the battery cell from over-discharge using gain adjustment.
Therefore, the experiment proves that the proposed algorithm can estimate the pack SOC more reasonably by only calculating two cells' SOC, compared with the average cell SOC method.In addition, it can transit from the highest SOC to the lowest SOC smoothly, and can thus provide a friendly user experience.

Conclusions
In this paper, a novel battery SOC estimation algorithm is proposed based on cell SOC estimation and adaptive classification.GA is applied to optimally identify the cell model parameters, and the overall identification error is less than 1%.Two adaptively changed coefficients are introduced to recursively calculate the pack SOC value based on the maximum and minimum cell SOC values.Experiment results prove the feasibility of the proposed algorithm.To sum up, the proposed algorithm can not only decrease the operation labor, but is also easy to implement in a BMS with the premise of ensuring precision and a satisfactory user experience.
Future work will focus on considering SOH influence in battery packs to further improve the algorithm's robustness across the whole life cycle.In addition, the influences to the pack SOC induced by the internal temperature distribution of the battery pack can also be our next step work direction.

Conclusions
In this paper, a novel battery SOC estimation algorithm is proposed based on cell SOC estimation and adaptive classification.GA is applied to optimally identify the cell model parameters, and the overall identification error is less than 1%.Two adaptively changed coefficients are introduced to recursively calculate the pack SOC value based on the maximum and minimum cell SOC values.Experiment results prove the feasibility of the proposed algorithm.To sum up, the proposed algorithm can not only decrease the operation labor, but is also easy to implement in a BMS with the premise of ensuring precision and a satisfactory user experience.
Future work will focus on considering SOH influence in battery packs to further improve the algorithm's robustness across the whole life cycle.In addition, the influences to the pack SOC induced by the internal temperature distribution of the battery pack can also be our next step work direction.

Figure 1 .
Figure 1.The equivalent circuit model (ECM) of the lithium-ion battery.

Figure 1 .
Figure 1.The equivalent circuit model (ECM) of the lithium-ion battery.

Figure 4 .
Figure 4. Open circuit voltage (OCV) curve with respect to state of charge (SOC).

Figure 4 .
Figure 4. Open circuit voltage (OCV) curve with respect to state of charge (SOC).

Figure 4 .
Figure 4. Open circuit voltage (OCV) curve with respect to state of charge (SOC).

Figure 4 .
Figure 4. Open circuit voltage (OCV) curve with respect to state of charge (SOC).

FaultFigure 6 .
Figure 6.The calculation flowchart for the pack SOC estimation.

Figure 6 .
Figure 6.The calculation flowchart for the pack SOC estimation.

Figure 9 .
Figure 9. Battery cell SOC estimation and lowest SOC estimation error.

Figure 10 .Figure 11 .
Figure 10.The Rk variation when calculating the lowest cell SOC.

Figure 9 .
Figure 9. Battery cell SOC estimation and lowest SOC estimation error.

Figure 9 .
Figure 9. Battery cell SOC estimation and lowest SOC estimation error.

Figure 10
Figure10shows k R variation when estimating the lowest cell SOC, and it can be seen that k R varies from 0 to 0.00126 dynamically.After sorting all the voltage values, and calculating one SOC for every two voltage measurements, six cells' SOC values in total are obtained, as shown in Figure11.

Figure 10 .Figure 11 .
Figure 10.The Rk variation when calculating the lowest cell SOC.

Figure 10 .
Figure 10.The R k variation when calculating the lowest cell SOC.

Figure 9 .
Figure 9. Battery cell SOC estimation and lowest SOC estimation error.

Figure 10
Figure10shows k R variation when estimating the lowest cell SOC, and it can be seen that k R varies from 0 to 0.00126 dynamically.After sorting all the voltage values, and calculating one SOC for every two voltage measurements, six cells' SOC values in total are obtained, as shown in Figure11.

Figure 10 .Figure 11 .
Figure 10.The Rk variation when calculating the lowest cell SOC.

Figure 11 .
Figure 11.The SOC output comparison based on different methods: (a) The cell SOC estimation and the pack SOC estimation based on different methods; and (b) the pack SOC difference.

Figure 12 .
Figure 12.The highest and lowest cell voltages as well as the cell current.

Figure 13 .
Figure 13.SOC comparison based on different methods.

Figure 14 Figure 12 .
Figure14shows the calculation case transitions.It can be observed than

Figure 12 .
Figure 12.The highest and lowest cell voltages as well as the cell current.
the collection voltage and current, as shown in Figure13.Figure13also shows the pack SOC differences when two different methods are applied.It can be clearly observed that the pack SOC based on the proposed method varies more obviously compared with that based on the average cell SOC method.

Figure 13 .
Figure 13.SOC comparison based on different methods.

Figure 14 showsFigure 13 .
Figure14shows the calculation case transitions.It can be observed than

Figure 14 .
Figure 14.The variation of weighed coefficients.

Figure 14 .
Figure 14.The variation of weighed coefficients.
Second, when one cell is discharged to the lowest voltage threshold, the pack SOC should reach 0%.In addition, the pack SOC should not decrease when the battery is charged, and should not increase when the battery is discharged.Moreover, the battery pack SOC should not oscillate frequently.These demands motivate authors to conduct research in this area.In order to properly evaluate the SOC estimation, a powerful and effective battery model, which has a fast calculation speed, enough precision, and limited storage size, is necessary to quantify the battery electrochemical reaction.Currently, the electrochemical model can precisely estimate battery SOC based on calculating a variety of differential equations also shows their differences.It can be found that based on the proposed method, the battery pack SOC smoothly transfers between max SOC and min SOC .When also shows their differences.It can be found that based on the proposed method, the battery pack SOC smoothly transfers between max SOC and min SOC .When SOCis 9% and the pack value is 15%.When the algorithm reaches Case 2, 2 w is taken into account and 1 w becomes zero.This transition can make min pack SOC converge to min SOC