Online State-of-Charge Estimation Based on the Gas–Liquid Dynamics Model for Li(NiMnCo)O 2 Battery

: Accurately estimating the online state-of-charge (SOC) of the battery is one of the crucial issues of the battery management system. In this paper, the gas–liquid dynamics (GLD) battery model with direct temperature input is selected to model Li(NiMnCo)O2 battery. The extended Kalman Filter (EKF) algorithm is elaborated to couple the ofﬂine model and online model to achieve the goal of quickly eliminating initial errors in the online SOC estimation. An implementation of the hybrid pulse power characterization test is performed to identify the ofﬂine parameters and determine the open-circuit voltage vs. SOC curve. Apart from the standard cycles including Constant Current cycle, Federal Urban Driving Schedule cycle, Urban Dynamometer Driving Schedule cycle and Dynamic Stress Test cycle, a combined cycle is constructed for experimental validation. Furthermore, the study of the effect of sampling time on estimation accuracy and the robustness analysis of the initial value are carried out. The results demonstrate that the proposed method realizes the accurate estimation of SOC with a maximum mean absolute error at 0.50% in ﬁve working conditions and shows strong robustness against the sparse sampling and input error.


Introduction
With the intensification of the energy crisis and environmental pollution, the research of electric vehicles (EVs) has become a strategic project to hasten progress toward sustainable development throughout the world [1]. Battery management system (BMS) is an important part of EVs and a core issue in the current research field of new energy vehicles. The functions of BMS include battery parameter detection, battery state estimation, online fault diagnosis, battery thermal control, etc. Among them, the real-time estimation of the state-of-charge (SOC) is one of the fundamental issues of BMS [2].
For EVs, SOC reflects the remaining capacity of the battery, which is the basis of the remaining mileage calculation. The correct estimation of SOC can not only improve the efficiency of EVs but also protect the battery and increase the battery's service life, thereby generating economic benefits [3,4]. The charge and discharge process of the battery is a quite complicated nonlinear electrochemical reaction process [5]. As a result, different from offline SOC which is relatively easy to be obtained by discharging experiment in the laboratory, online SOC is difficult to obtain from the internal chemical characteristics of the battery and can only be estimated indirectly by some measurable parameters, such as terminal voltage, current and temperature [6].
At present, scholars have proposed a great variety of methods for accurately estimating SOC. The model-based method is one of the most commonly used approaches in practical applications [7]. The model-based SOC estimation methods are usually divided For the experimental verification of battery SOC estimation, normally a single working condition such as Constant Current (CC), Dynamic Stress Test (DST), Federal Urban Driving Schedule (FUDS) and Urban Dynamometer Driving Schedule (UDDS) is used in most of the above-mentioned studies. However, many operating conditions in the actual operation of vehicles are often changing. For instance, different drivers have different driving styles [29]. People who are accustomed to driving in an aggressive and almost bullying manner tend to speed and weave in and out of traffic, making the EVs' battery often discharge at a high C-rate. On the contrary, defensive drives prefer to follow and obey posted signs and speed limits to avoid rapid acceleration and deceleration, making the battery discharge and charge C-rate more stable. Apart from that, people often drive on different roads and switch driving scenes, such as highways, suburbs and cities. The above facts mean that there may be a variety of working conditions in one discharge cycle corresponding to the battery of an electric vehicle in real situations. To address this issue, Du et al. [30] collected the data from the actual driving condition to verify their SOC estimation. There is little research on the combination of the driving cycles and to simulate the actual driving condition, most of the studies refer to the standard single cycle (DST, UDDS, etc.) [31][32][33], perhaps because different working conditions are already included in a single cycle, such as DST cycle which uses a 360 s sequence of power steps with seven discrete power levels to represent different driving conditions. Despite this, the combination of the different cycles could be a good complement to simulating the real driving condition more realistically. Additionally, the sampling interval is also crucial in the SOC estimation process, especially for the coulomb counting approach [34]. To make the SOC estimation more accurate, it is necessary to use a higher sampling frequency for the Coulomb counting method to obtain more accurate current information [34]. For the studies on online parameters identification and estimation of SOC, many methods combined with RC model use Coulomb counting as the part of the state equation [35][36][37]. Therefore, it is difficult to implement sparse sampling for these methods. The sampling frequency in the above-mentioned research is often 1-10 HZ, which lacks exploration of algorithm performance under sparse sampling conditions. High sampling frequency can make the estimation more accurate, but the compensation for this improvement is that the cost of hardware is also greatly increased due to the demand for extra storage space and massive computing power [38]. Therefore, it is important to ensure the accurate estimation of SOC under the condition of sparse sampling, that is, increasing the sampling period to reduce costs and thus achieve practical applications.

Contribution of This Paper
In this article, from the perspective of the multiscenario, a SOC estimation method is proposed to eliminate initial errors rapidly and achieve high-precision SOC estimation under a wide sampling period and a combined condition.
First of all, the result of the offline model is transformed into the input of the online model, so the offline model and online model are coupled and the estimation error is transformed into the input error, which could achieve the goal of quickly eliminating initial errors.
Moreover, to more realistically simulate the actual charge and discharge process of electric vehicle batteries, a combined scenario including Constant Current (CC) cycle, Federal Urban Driving Schedule (FUDS) cycle, Urban Dynamometer Driving Schedule cycle (UDDS) and Dynamic Stress Test (DST) cycle is constructed. The proposed algorithm realizes the accurate estimation of SOC in a single cycle coupled with multiple operating conditions.
Additionally, a systematic study on the effect of sampling time and initial error on estimation accuracy is done in this article. The high precise estimation is still achieved under the sparse sampling and large initial error through this algorithm.

Organization of This Paper
The structure of this paper is organized as follows: In Section 2, the GLD battery model is introduced and based on that, we present offline and online parameter identification methods and they are combined to estimate the battery SOC. The experiment details including the construction of combined load profiles are presented in Section 3. Then, results and discussion of the proposed approach are demonstrated in Section 4. Section 5 summarizes the conclusions in this work.

Battery Modelling
This paper uses the GLD battery model derived from a series of Gas Equation and Bernoulli Equation in the equivalent gas-liquid system [17]. Partly different from GLD battery model, the temperature is introduced to be a direct input.
The inflation and deflation process of the gas-liquid dynamics model can be equivalent to the corresponding charge and discharge process of the battery. The schematic of the GLD model is shown in Figure 1a. Additionally, a systematic study on the effect of sampling time and initial error on estimation accuracy is done in this article. The high precise estimation is still achieved under the sparse sampling and large initial error through this algorithm.

Organization of This Paper
The structure of this paper is organized as follows: In Section 2, the GLD battery model is introduced and based on that, we present offline and online parameter identification methods and they are combined to estimate the battery SOC. The experiment details including the construction of combined load profiles are presented in Section 3. Then, results and discussion of the proposed approach are demonstrated in Section 4. Section 5 summarizes the conclusions in this work.

Battery Modelling
This paper uses the GLD battery model derived from a series of Gas Equation and Bernoulli Equation in the equivalent gas-liquid system [17]. Partly different from GLD battery model, the temperature is introduced to be a direct input.
The inflation and deflation process of the gas-liquid dynamics model can be equivalent to the corresponding charge and discharge process of the battery. The schematic of the GLD model is shown in Figure 1a. Taking the discharge process of the battery as an example, at time , it can be assumed that the GLD battery model is in a steady state, and at this time the gas pressure, the amount of substance of gas, and the amount of gas dissolved in liquid are , and , respectively; The amount of gas substance dissolved in a liquid can be calculated according to the modified ideal gas law.
where represents thermodynamic temperature; and are effective clearance and Van der Wal volume of gas molecules, respectively; is the thermodynamic constant ( = 8.314 / • ). The valve of the container is opened for a while ∆ so that the gas in the container is released outwards (Figure 1b). During this deflation process, the flow velocity, the resistance coefficient of gas flow, and the pressure of the external nozzle are , , and , Taking the discharge process of the battery as an example, at time t 1 , it can be assumed that the GLD battery model is in a steady state, and at this time the gas pressure, the amount of substance of gas, and the amount of gas dissolved in liquid are P 1 , n 1 and n j1 , respectively; The amount of gas substance dissolved in a liquid can be calculated according to the modified ideal gas law.
where T represents thermodynamic temperature; ϕ m and b m are effective clearance and Van der Wal volume of gas molecules, respectively; R is the thermodynamic constant (R = 8.314 J/mol·K). The valve of the container is opened for a while ∆t so that the gas in the container is released outwards (Figure 1b). During this deflation process, the flow velocity, the resistance coefficient of gas flow, and the pressure of the external nozzle are v, µ, and P 0 , respectively. The valve is closed at t 2 = ∆t + t 1 , when the gas pressure is P 2 and the amount of substance of gas is n 2 ; the ideal gas state equation and Bernoulli equation of gas flow during gas exhausting can be written as: (2) After a long enough time until t 3 , the GLD battery model reaches a steady state again. At this time, the gas pressure in the container, the amount of substance of gas and the amount of substance of gas dissolved in the liquid are P 3 , n 3 and n j3 , respectively; the ideal gas state equation and solubility equation of gas after rebalancing can be written as: At the moment when the valve is closed, the amount of gaseous substance in the vessel is n 2 ; After closing the valve, the amount of gas substance of gas precipitated from the liquid is n j1 − n j3 ; Therefore, the relationship among the amount of substance can be given by: The Equations (1)-(6) are introduced to Equation (7) The Equation (7) could be simplified to the following two Equations: Because all the parameters have physical meanings, k 2 T + P 3 > 0 and k 2 T + P 1 > 0. Equation (8) can also be written as: Assuming a = 1, b = (k 2 − P 2 + k 1 k 2 +P 1 ), c = −( k 1 P 1 k 2 +P 1 + P 2 k 2 ) and ac< 0, b 2 − 4ac >0, according to the Veda theorem, the equation has only one positive real root, which is given by: The above derivation takes the process of opening the valve to release gas as an example. The derivation result of opening the valve to pump gas from the outside into the vessel is consistent with the above result.
During the air inflation process, the Bernoulli equation for pumping gas into the vessel: Therefore, the Bernoulli equation of the inflation process and the deflation process can be unified into the following formula: where v > 0 when charging, v < 0 when discharging. Simplifying the derived gas-liquid dynamic battery model: Therefore, according to the correspondence of parameters between the GLD model and battery (Table 1), the final GLD open-circuit voltage battery model is derived:

GLD Battery Model Parameters Actual Battery Parameters
Pressure of gas at the nozzle P 0 Terminal voltage U 0_measured Gas flow velocity v Electron flow I Pressure of gas P 1 before opening the valve Initial open-circuit voltage U OCV_initial Pressure of gas P 3 after rebalance Estimated open-circuit voltage U OCV_estimated Temperature in cans T Temperature of the battery T

Offline Parameters Identification
To use the GLD model to estimate the open-circuit voltage of the battery, it is important to identify the corresponding parameters k 1 , k 2 , k 3 , k 4 . An offline identification method using the optimizing objective function based on GA is introduced in Reference [17]. In this article, the same method is applied to determine the first series of offline parameters, noted as parameters_offline. When the battery works under different scenarios including UDDS, DST, FUDS, CC and combined driving cycle, this set of offline parameters remains unchanged.

Online Parameters Identification by Extended Kalman Filter (EKF)
The battery model parameters are not constant but are related to the battery's temperature, SOC, age, etc. As a result, the model parameters identified offline will cause unavoidable calculation errors during BMS working process and may even increase the error of the offline parameter model as the working time increases [6]. Moreover, offline parameters identification lack generalization ability, which means that the parameters identified under certain working conditions may not be applicable for other working conditions and lead to inherent error [23]. The advantage of the online parameter identification method is that it could simultaneously update the model parameters as the parameters change during the battery operation, thereby eliminating the parameter's deviation [26]. However, when the initial input of the online model is incorrect, in addition to identifying online parameters, it is also necessary to eliminate the interference of initial errors. It is difficult for an online model to obtain good estimation performance quickly in the initial stage and this is likely to lead to an increase in the cumulative error of the estimation and eventually divergence of the result. The offline parameters could compensate for this disadvantage by the revision of the input due to its strong anti-interference ability. Therefore, the solution in this article is to refer to estimated OCV obtained from the offline model as the input of online estimation model, which makes the estimation error transform into input error and takes advantage of the strong anti-interference ability of the offline model to quickly eliminate the initial error.
The proposed parameter identification method is based on the EKF theorem and the derivation process is shown as follows.
Equations (15) and (16) can be written as the following functional expression: Replacing the parameters for the gas-liquid model with the parameters for the GLD battery model, Equation (8) could be transformed as: Then, based on Equation (18), P 2 can be expressed by: Substituting P 2 in Equation (15) by Equation (19), the terminal voltage could be expressed by k 1 , k 2 , k 3 , k 4 , I, U OCV_estimated , , U OCV_initial , T: For the convenience of expression, Equation (20) could also be expressed as: Equations (17) and (21) require 7 input parameters, respectively. The meaning of each parameter is as follows: For Equation (17), k 1 , k 2 , k 3 , k 4 are identified by offline method and remain unchanged during the whole working period; which can be noted as k 1_offline , k 2_offline , k 3_offline , k 4_offline , I represents the battery electron flow; U 0_measured , T, U OCV_initial , are battery terminal voltage and ambient temperature measured by corresponding sensors and initial open-circuit voltage, respectively; U OCV_estimated represents the estimated current OCV. For Equation (21), k 1 , k 2 , k 3 , k 4 are online identified parameters and change in real-time during the whole working period; which can be noted as k 1_online , k 2_online , k 3_online , k 4_online . I represents the battery electron flow; U OCV_initial , T, U ocv_estimated are initial open-circuit voltage, ambient temperature and estimated current open-circuit voltage by Equation (17), respectively, where the U ocv_estimated is an output of Equation (17) with systematic error caused by the offline GLD model error.
In order to use EKF to update the parameters in real-time, the state vector is set as: It can be assumed that since the sampling time of the system is several seconds, which is quite short, the system parameters will only change slightly between two sampling intervals t k , t k+1 . Therefore, the discrete state transition matrix for parameters is given by: where w k represents the process noise and its covariance is Q, noted as w k ∈ N(0, Q). The discrete state observation matrix is expressed as: where the state observation matrix H is partial derivative matrix of k 1 , k 2 , k 3 , k 4 in Equation (20).
. u k+1 is the measurement noise which represents the deviation caused by measurement noise and the observation deviation of the observation matrix itself, and its covariance is R, noted as u k+1 ∈ N(0, R).
Assuming that para k , para k+1 represent the true value matrixes of the parameter at time t k , t k+1 , and para k+1 , para k+1 represent a prior state estimate and a posteriori state estimate, respectively.
The prior state estimate can be obtained from the state prediction equation: The posteriori state estimate can be obtained from the state update equation: where H· para k+1 = U 0_estimated_k+1 ; K is a Kalman gain matrix. Therefore Equation (26) could be written as: To derive Kalman gain matrix, one can note: where e k+1 represents prior state estimate error; e k+1 represents posteriori state estimate error; P k+1 is the covariance between the true value and the predicted value; P k+1 is the covariance between the true value and the best estimation. Combining Equations (24) and (26) to eliminate U 0_measured_k+1 : Transformation of Equation (28): Replacing para k+1 − Para k+1 and para k+1 − Para k+1 in Equation (33) by Equations (28) and (29): Therefore, the estimated error variance matrix can be known from Equation (31): The estimation principle of Kalman filter is to minimize the covariance P of the optimal state estimation and make it closer and closer to the true value. Therefore, its objective function is: Calculating the partial derivative of the Kalman gain matrix K in Equation (35): Therefore, Kalman gain matrix K could be expressed as: Replacing R in Equation (35) by Equation (38): Combing Equations (23), (25) and (28) to eliminate para k+1 , para k+1 : According to Equation (30): Therefore, all the unknowns are determined in Equation (26) and the online parameter identification at one step is finished.

Combination of Offline Parameters and Online Parameters for SOC Estimation
The joint algorithm can be summarized as follows: (1) Initialization The covariance between the true value and the best estimate at the initial time: All parameters in physical equations have actual physical meaning, so all parameters are non-negative including k 1 , k 2 , k 3 , k 4 .and they cannot be initialized to be zero. Therefore, the initial parameters for online identification are set to close to zero which is (0.001,0.001,0.001,0.001). Additionally, step k is set as 1.
The current electron flow, terminal voltage and ambient temperature could be obtained by corresponding sensors at step k, noted as, U, I, T. These three variables are assigned to corresponding variables U 0 (k) I(k) and T(k), respectively.
(3) Calculation 1 According to Equation (17) and offline parameters in Section 4.1, the estimated opencircuit voltage U OCV_estimated_k : Then, U OCV_estimated (k) is set as one of the inputs to obtain estimated terminal voltage U 0_estimated (k): Afterwards, the Jacobian matrix H could be given by: (4) Prediction The discrete Kalman filter predictions for the online parameters and covariance between the true value and the predicted value: According to the prior state estimate and estimated covariance calculated in (4), the updates for the Kalman gain K(k), posteriori state estimate para(k), the covariance between the true value and the best estimate P(k) are given by: Using the best estimate of the parameters para(k) as one of the inputs of Equation (16), the best estimate of the open-circuit voltage U OCV_final (k) could be obtained: (7) Look-up table According to the relationship between the SOC and OCV, the SOC at a specific OCV can be obtained by looking up the table. The flowchart of the joint SOC estimation algorithm is shown in Figure 2.
(7) Look-up table According to the relationship between the SOC and OCV, the SOC at a specific OCV can be obtained by looking up the table.
The flowchart of the joint SOC estimation algorithm is shown in Figure 2.

Experimental Setup
For the validation of the proposed algorithm in this paper, a test bench is established, as shown in Figure 3a. NiCoMn(NCM) LIB produced by Panasonic (Figure 3b) is used as

Experimental Setup
For the validation of the proposed algorithm in this paper, a test bench is established, as shown in Figure 3a. NiCoMn(NCM) LIB produced by Panasonic (Figure 3b)

Hybrid Pulse Power Characterization
The hybrid pulse power characterization (HPPC) is the battery parameter test in the "Freedom CAR Power Assisted Battery Test Manual". The details for the HPPC test in this paper are as follows: According to the USA Freedom CAR test manual, the terminal voltage, current, temperature and the corresponding OCV under the different SOC could be obtained through the HPPC experiments. The experimental protocol is implemented as follows.  (3) Step 2 is repeated N times under the charge or discharge process. These experimental data are used to identify the offline parameters of the model and determined the SOC vs. OCV curve. Figure 4 shows the test results of HPPC when N and l are equal to 50 and 2 C, respectively. The OCV vs. SOC curves under the charge and discharge almost coincide. However, the large deviation between these two curves occurs at approximately SOC = 14-35% corresponding to the phase transition areas (LixCoO2, 0.75 < × < 0.93 is the mixed α + β phase) [39]. Although the extension of the standing time might reduce the deviation, this method is time-consuming. Alternatively, the more accurate OCV can be obtained by calculating their average values under the same SOC, as shown in the black curve ( Figure 4).

Hybrid Pulse Power Characterization
The hybrid pulse power characterization (HPPC) is the battery parameter test in the "Freedom CAR Power Assisted Battery Test Manual". The details for the HPPC test in this paper are as follows: According to the USA Freedom CAR test manual, the terminal voltage, current, temperature and the corresponding OCV under the different SOC could be obtained through the HPPC experiments. The experimental protocol is implemented as follows. 50 and 2 C, respectively. The OCV vs. SOC curves under the charge and discharge almost coincide. However, the large deviation between these two curves occurs at approximately SOC = 14-35% corresponding to the phase transition areas (Li x CoO 2 , 0.75 < × < 0.93 is the mixed α + β phase) [39]. Although the extension of the standing time might reduce the deviation, this method is time-consuming. Alternatively, the more accurate OCV can be obtained by calculating their average values under the same SOC, as shown in the black curve ( Figure 4).

Standard Tests and Combined Test
To verify that the estimation algorithm in the article has good performance under different working conditions, four of the highly dynamic standard driving cycles with the maximum discharge 2.5 C, namely, CC load profile (Figure 5a  The specific composition of the combined driving cycle is shown in Figure 6.

Standard Tests and Combined Test
To verify that the estimation algorithm in the article has good performance under different working conditions, four of the highly dynamic standard driving cycles with the maximum discharge 2.5 C, namely, CC load profile (Figure 5a,b), DST load profile (Figure 5c,d), FUDS load profile (Figure 5e,f) and UDDS load profile (Figure 5g,h), are applied. Moreover, there are a great variety of operating conditions in the actual operation of vehicles, which are constantly changing, so it is necessary to construct a combined driving cycle to verify the performance of the proposed SOC estimation algorithm.

Standard Tests and Combined Test
To verify that the estimation algorithm in the article has good performance under different working conditions, four of the highly dynamic standard driving cycles with the maximum discharge 2.5 C, namely, CC load profile (Figure 5a  The specific composition of the combined driving cycle is shown in Figure 6.  The specific composition of the combined driving cycle is shown in Figure 6.

Model Offline Parameters Identification
The model offline parameters identification is really important for the accurate SOC estimation of the corresponding control algorithm. In this article, a GA algorithm proposed by Chen is applied for offline parameter identification [17]. The offline parameters _ , _ , _ , _ are 0.40001, 0.02950, 0.00280, 1.2291 × 10 −5 , respectively.  Table 2. Compared with the result of the CC discharge scenario, the estimation results are significantly different under the other four discharge scenarios. The maximum error (ME) under CC (1.59%) is much smaller than the MEs under DST (2.50%), FUDS (2.02%), UDDS (2.42%) and combined condition (2.51%), while the mean absolute errors (MAEs) for all five cycles are roughly close, between 0.35% and 0.50%. Because of the sudden change of the current under DST, UDDS, FUDS and combined condition, the errors all strikingly fluctuate almost during the whole range except for the end of the discharge process. As opposed to the above four conditions, the error curve under CC cycle is remarkably different and it sees a smooth trend during the whole discharge process. For the FUDS and UDDS scenarios, the shapes of their error curves are similar even though their time dimensions are different and their MEs both occur near the end of the discharge process. By contrast, the MEs under CC and DST appear at a relatively high SOC period.

Model Offline Parameters Identification
The model offline parameters identification is really important for the accurate SOC estimation of the corresponding control algorithm. In this article, a GA algorithm proposed by Chen is applied for offline parameter identification [17]. The offline param-   (Figure 7e). To make the form of the figure consistent, the timescales of the x-axis are replaced with the discharged battery capacity whose unit is Ah and the reference lines in Figure 7a-e represent the theoretical SOC value under the corresponding capacity. The maximum errors (MEs) under five cycles are all below 2.55%, which are shown in Table 2. Compared with the result of the CC discharge scenario, the estimation results are significantly different under the other four discharge scenarios. The maximum error (ME) under CC (1.59%) is much smaller than the MEs under DST (2.50%), FUDS (2.02%), UDDS (2.42%) and combined condition (2.51%), while the mean absolute errors (MAEs) for all five cycles are roughly close, between 0.35% and 0.50%. Because of the sudden change of the current under DST, UDDS, FUDS and combined condition, the errors all strikingly fluctuate almost during the whole range except for the end of the discharge process. As opposed to the above four conditions, the error curve under CC cycle is remarkably different and it sees a smooth trend during the whole discharge process. For the FUDS and UDDS scenarios, the shapes of their error curves are similar even though their time dimensions are different and their MEs both occur near the end of the discharge process. By contrast, the MEs under CC and DST appear at a relatively high SOC period.  Noticeably, for the combined condition, the combination of the four standard discharge cycles hardly increases the estimation errors and even MAE (0.49%) under this scenario is a bit smaller than that under CC (0.50%) and ME (2.51%) is similar to that (2.50%) under DST. These results show that the proposed estimation algorithm achieves good performance under four different standard cycles and this algorithm still maintains high estimation accuracy even under a more complicated scenario, which reflects the applicability of the proposed method to the actual operating condition.

Online SOC Estimation Based on Combined Online and Offline Parameter Identification
To make a comparison for the estimation accuracy between the existing methods, a summary of some typical KF-based estimation techniques and battery modelling method such as Partnership for a New Generation of Vehicles (PNGV), RC model is shown in Table 3.  Noticeably, for the combined condition, the combination of the four standard discharge cycles hardly increases the estimation errors and even MAE (0.49%) under this scenario is a bit smaller than that under CC (0.50%) and ME (2.51%) is similar to that (2.50%) under DST. These results show that the proposed estimation algorithm achieves good performance under four different standard cycles and this algorithm still maintains high estimation accuracy even under a more complicated scenario, which reflects the applicability of the proposed method to the actual operating condition.
To make a comparison for the estimation accuracy between the existing methods, a summary of some typical KF-based estimation techniques and battery modelling method such as Partnership for a New Generation of Vehicles (PNGV), RC model is shown in Table 3.

Analysis of the Sampling Time
The sampling time of the sensor often has a certain error during actual work condition. Although the error value is small, the accumulation of the error over a long period will still have a negative impact on the performance of the system. Furthermore, sparse sampling helps to reduce the hardware costs due to the decrease in data storage and computational power, so it is necessary to analyze the effect of sampling time on the SOC estimation accuracy. For the traditional online parameter identification methods combining the Coulomb counting method, the sampling frequency in the above-mentioned research is often 110 H Z [25,46], which lacks exploration of algorithm performance under sparse sampling conditions because the accuracy of coulomb counting method strongly depends on the high-frequency sampling. In this article, the relationship between estimation error and sampling time is studied in CC FUDS, UDDS and combined condition except for DST, because DST is composed of several segmented constant current condition which shows strong periodicity and its period is only 360 s. When the sampling time of DST condition is increased, the characteristics of DST condition is difficult to be reflected.
From the point distribution in Figure 8, the error does not strictly increase monotonically with the sampling time, but overall, the trends of average error are upward except for CC cycle. Therefore, for the convenience of the qualitative analysis, the piecewise linear curve-fitting of two sections is performed on CC, FUDS and UDDS. Different from CC,  1-20 s). These results reflect that the proposed algorithm could still achieve good performance in SOC estimation when the sampling time is within the 20 s. Furthermore, the reason why the algorithm could realize the sparse sampling is that the Coulomb counting method is not combined with the proposed EKF algorithm as part of the state equation and the state vector consists of only the parameters that need to be identified.

Robustness Analysis of the Initial Value
_ By the above verification, the accurate estimation of SOC could be realized under different cycles and sparse sampling condition. Otherwise, the analysis of the robustness of the algorithm against the initial OCV value is crucial for the practical application, because the correct initial OCV value is unable to be obtained by the sensors. A common solution is to assign the terminal voltage to the initial OCV value at the beginning, which is used in the above experiments. However, only when the battery is left standing for a long time, the terminal voltage measured for the first time is approximately equal to the open-circuit voltage [47]. Apart from the analysis of the initial OCV value at the beginning, the analysis of the correction ability of input error during operation is also conducted. The combined scenario which is more complicated can better reflect the working conditions of electric vehicles in actual operation than the single standard scenario, so the combined scenario is used for this study.
To cover as many cases for initial value as possible, the inputs at the beginning are chosen as 3.968 V, 3.780 V, 3.668 V and 3.530 V corresponding to 80%, 60%, 40% and 20% SOC, respectively. Besides, the effect of input errors on estimation accuracy is studied during whole discharge range so at 80% (267 s) 60% (2283 s) 40% (3630 s) of the actual battery SOC, 20% input error is introduced. The results are shown in Figure 9.

Robustness Analysis of the Initial Value
By the above verification, the accurate estimation of SOC could be realized under different cycles and sparse sampling condition. Otherwise, the analysis of the robustness of the algorithm against the initial OCV value is crucial for the practical application, because the correct initial OCV value is unable to be obtained by the sensors. A common solution is to assign the terminal voltage to the initial OCV value at the beginning, which is used in the above experiments. However, only when the battery is left standing for a long time, the terminal voltage measured for the first time is approximately equal to the open-circuit voltage [47]. Apart from the analysis of the initial OCV value at the beginning, the analysis of the correction ability of input error during operation is also conducted. The combined scenario which is more complicated can better reflect the working conditions of electric vehicles in actual operation than the single standard scenario, so the combined scenario is used for this study.
To cover as many cases for initial value as possible, the inputs at the beginning are chosen as 3.968 V, 3.780 V, 3.668 V and 3.530 V corresponding to 80%, 60%, 40% and 20% SOC, respectively. Besides, the effect of input errors on estimation accuracy is studied during whole discharge range so at 80% (267 s) 60% (2283 s) 40% (3630 s) of the actual battery SOC, 20% input error is introduced. The results are shown in Figure 9.

Robustness Analysis of the Initial Value
_ By the above verification, the accurate estimation of SOC could be realized under different cycles and sparse sampling condition. Otherwise, the analysis of the robustness of the algorithm against the initial OCV value is crucial for the practical application, because the correct initial OCV value is unable to be obtained by the sensors. A common solution is to assign the terminal voltage to the initial OCV value at the beginning, which is used in the above experiments. However, only when the battery is left standing for a long time, the terminal voltage measured for the first time is approximately equal to the open-circuit voltage [47]. Apart from the analysis of the initial OCV value at the beginning, the analysis of the correction ability of input error during operation is also conducted. The combined scenario which is more complicated can better reflect the working conditions of electric vehicles in actual operation than the single standard scenario, so the combined scenario is used for this study.
To cover as many cases for initial value as possible, the inputs at the beginning are chosen as 3.968 V, 3.780 V, 3.668 V and 3.530 V corresponding to 80%, 60%, 40% and 20% SOC, respectively. Besides, the effect of input errors on estimation accuracy is studied during whole discharge range so at 80% (267 s) 60% (2283 s) 40% (3630 s) of the actual battery SOC, 20% input error is introduced. The results are shown in Figure 9.  For the initial inputs at the beginning, all the estimation curves quickly converge to the experimental curve within five seconds and the details for this process is illustrated in the left enlarged image. Taking the purple line (20% input SOC) as an example, the SOC is corrected from the initial 20% to 96% after the first iteration, and the estimated curve coincides with the experimental curve after the following 3 s. Moreover, a random initial value of OCV could be assigned in practical application. For the input errors at 20%, 40%, 60%, 80% SOC, they are all rapidly corrected by one step self-iteration and the subsequent estimating results are not affected.

Conclusions
In this paper, the EKF algorithm combined with gas-liquid dynamics model has been proposed for online estimation of the parameters and SOC for lithium-ion batteries. The estimation equations are strictly derived by a corresponding mathematical formula and the offline parameters are determined by genetic algorithm (GA) to avoid the filter divergence caused by the initial input error. A combined scenario is constructed to more realistically simulate the actual charge and discharge conditions of electric vehicle batteries. The validity of the proposed approach has been carried out with maximum error of 2.51% (sampling time 1 s) and maximum mean absolute error of 0.50% under four standard discharge cycles, namely CC, DST, FUDS and UDDS and a combined condition. Furthermore, the analysis of the sampling time proves that this algorithm still achieves good performance in SOC estimation when the sampling time is within 20 s, which could avoid the use of high-frequency sampling to achieve accurate estimation, which might lead to an increase in the demand for storage space and computing power and ultimately increase the cost of hardware. Meanwhile, the robustness analysis of the initial value indicates the proposed algorithm could quickly eliminate the initial error and even the input error during working.
In our future work, the process of battery ageing can be simulated by changing the combination of gas and liquid to introduce a small amount of irreversible reaction. Furthermore, the SOC estimation of a battery considering the state-of-health is worth investigating. Institutional Review Board Statement: "Not applicable" for studies not involving human or animals.
Informed Consent Statement: "Not applicable" for studies not involving human.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to privacy.