Influence of Sampling Delay on the Estimation of Lithium-Ion Battery Parameters and an Optimized Estimation Method

The equivalent-circuit model (ECM) is widely used in online estimating the parameters and states of lithium-ion batteries. However, the sampling delay between the voltage and current of a battery is generally overlooked, which is unavoidable in a modular battery management system (BMS) and would lead to wrong results in the estimation of battery parameters and states. In this paper, with the first-order resistor–capacitor (RC) model as our battery model, we analyze the influence mechanism of sampling delay and then propose an optimized method for online estimating battery parameters. The mathematical model derived from the first-order RC model and the approximation method of first-order derivative are optimized. The recursive least squares (RLS) algorithm is used for identifying the parameters of the model. In order to verify the proposed method, a modular battery test system with high sampling frequency and high synchronization accuracy is developed. The experiment results indicate that the sampling delay would cause the estimation process to fluctuate, and the optimized method effectively improves the tolerance range of sampling delay.


Introduction
With the global problems of fossil energy exhaustion and air pollution becoming more and more serious, the automobile industry, as the major oil consumer and air pollution source, is facing a significant change. Developing new energy vehicles to replace traditional fossil-fueled vehicles has become the consensus of developed countries in the world. The electric vehicle (EV) has gained a lot of attention and has developed promptly in recent years. Lithium-ion batteries have been widely used as the power batteries of EVs due to their high energy density, high power density and long life [1]. Nevertheless, lithium-ion batteries have strict requirements for operating voltage and temperature. The states of batteries, such as state of charge (SOC) [2] and state of health (SOH) [3], are also important for EVs. In order to provide a safe and reliable operation environment, as well as to estimate the battery states online, a battery management system (BMS) is usually employed.
As the parameters of lithium-ion batteries, the internal resistance and open-circuit voltage (OCV) play important roles in estimating battery states. The OCV refers to the stable electrode potential difference of a battery at the condition of open circuit, which monotonically depends upon the Li amount of the positive and negative electrodes [2,4]. Furthermore, this relationship is weakly dependent on the changes in cycle life and environment temperature [5]. Hence, OCV-based SOC estimation can achieve high accuracy. The increase of internal resistance is an important sign of battery aging, which is caused by the structural changes in battery electrodes and the thickness increase of solid electrolyte interphase (SEI) [1]. Therefore, the internal resistance is widely used in SOH estimation [3,6]. Nonetheless, in online applications, the direct measurements of OCV and internal resistance are difficult.
In order to online estimate OCV and internal resistance, an appropriate battery model is needed. The commonly used battery models can be divided into three types, including the electrochemical model [7,8], the machine-learning-based model [9,10] and the equivalent-circuit model (ECM) [11,12]. The electrochemical models can simulate the inner chemical and physical process of a battery and the model accuracy is relatively high, but they are generally complex and require too many inputs [13]. The machine-learning-based models are all black-box models, and the identification results of model parameters strongly depend on the training dataset [9]. Hence, online collecting and online training are required, which needs a lot of memory and computing resources [14]. The ECMs use ideal electric elements, such as voltage source, resistors and capacitors to simulate the external dynamic characteristics of a battery, without considering the chemical reactions inside the battery [11,15,16]. Therefore, in the online estimation of battery states, the ECMs are more suitable due to their fewer parameters and lower computational cost.
There are two technology roadmaps to estimate battery parameters with the ECMs. The essential difference between them is that OCV is regarded as a known variable or an unknown variable. The first method combines SOC estimation and battery parameters estimation and sees OCV as a known variable derided from SOC-OCV curves. Firstly, with a predetermined SOC, the OCV is achieved and the battery terminal voltage can be estimated by the ECMs. Then, by comparing the estimated terminal voltage and the measured one, the estimated SOC is updated [2]. In this method, optimal estimation algorithms, such as adaptive extended Kalman filter (AEKF) [17], sliding-mode observer (SMO) [18] and H-infinity observer [19], are usually required. The second method views OCV as an unknown model parameter to be identified. The OCV and internal resistance are directly estimated by the identification of ECM parameters [20][21][22]. In this method, the estimation process does not require SOC-OCV curves, and the conversion of mathematical models derived by the ECMs is important. In summary, the ECM-based online estimation of battery parameters is becoming more and more developed.
However, the problem of sampling delay between battery current and voltage is generally overlooked, limiting the application of the above ECM-based methods in commercial BMSs. In a modular BMS, the voltage and current of a cell are measured by a slave controller and an electric meter, respectively, which are usually connected together by the controller area network (CAN) [23]. Because of varying network latency, the collected data in the data logger is unsynchronized, which would lead to a wrong result in the online estimation of battery parameters and states [24]. Therefore, it is of great significance to analyze how the sampling delay affects the ECM-based estimation process and propose an optimized method to reduce the influence.
In this paper, the influence of sampling delay on the ECM-based online estimation of battery parameters are analyzed, and then an optimized online estimation method is proposed. In order to avoid the effect of inaccurate SOC-OCV curves, we select the technology roadmap that regards OCV as a model parameter to be identified. Firstly, with a trade-off between accuracy and complexity, the first-order resistor-capacitor (RC) model is selected as our battery model, and the simplified mathematical model of it is derived. Then, we theoretically analyze the influence of sampling delay on the parameters' identification of the mathematical model. Secondly, to improve the tolerance of sampling delay, we propose an optimized mathematical model and an online estimation method for battery parameters based on the recursive least squares (RLS) algorithm. In the end, using commercial battery management chips, we develop a modular battery test system with high sampling frequency and high synchronization accuracy. The theoretical analysis results and the proposed estimation method are verified by processing the collected data.

Influence of Sampling Delay on Battery Parameter Estimation
In this section, a commonly used mathematical battery model derived from the first-order RC model is selected as our research object. The influence of sampling delay on the estimation of battery parameters based on this model is analyzed.

Mathematical Battery Model
The ECMs are the most commonly used battery models for the online estimation of battery parameters and states. Various ECMs have been presented in the literature, such as Rint model, Randles' model, PNGV model and RC network models. The selection of the ECM requires a trade-off between accuracy and complexity. In recent years, some studies were carried out to compare these battery models. Hu et al. [25] compared twelve ECMs in terms of model complexity and model accuracy.
The results indicate that the first-order RC model is most suitable for lithium nickel-manganese-cobalt oxide (LiNMC) batteries. Nejad et al. [12] conducted an analysis on ten ECMs with respect to the estimation accuracies of SOC and SOP. The results show that both first-and second-order RC models achieve an outstanding SOC estimation accuracy. Lai et al. [11] examined eleven ECMs, focusing on the robustness of these models. The results indicate that the first-and second-order RC models are the optimal choice for LiNMC batteries. Therefore, the first-order RC model is selected as the battery model in this paper.
The first-order RC model is also referred to as the Thevenin model. As shown in Figure 1, the model is composed of a controllable voltage source, an ohmic resistor and a parallel RC network. The voltage source U oc and the ohmic resistor R o represent the OCV and the internal resistance of a battery, respectively. The RC network is used to simulate the relaxation effect of the battery [15], and the elements R p and C p are described as equivalent polarization resistor and equivalent polarization capacitor, respectively. The I L and U t are the load current and the terminal voltage of the battery, respectively, and are the only measurable variables in the model. Generally, I L is regarded as the input variable and U t is regarded as the output variable. Through identifying the parameters U oc and R o of the model, the OCV and the internal resistance can be estimated.

Mathematical Battery Model
The ECMs are the most commonly used battery models for the online estimation of battery parameters and states. Various ECMs have been presented in the literature, such as Rint model, Randles' model, PNGV model and RC network models. The selection of the ECM requires a tradeoff between accuracy and complexity. In recent years, some studies were carried out to compare these battery models. Hu et al. [25] compared twelve ECMs in terms of model complexity and model accuracy. The results indicate that the first-order RC model is most suitable for lithium nickelmanganese-cobalt oxide (LiNMC) batteries. Nejad et al. [12] conducted an analysis on ten ECMs with respect to the estimation accuracies of SOC and SOP. The results show that both first-and secondorder RC models achieve an outstanding SOC estimation accuracy. Lai et al. [11] examined eleven ECMs, focusing on the robustness of these models. The results indicate that the first-and secondorder RC models are the optimal choice for LiNMC batteries. Therefore, the first-order RC model is selected as the battery model in this paper.
The first-order RC model is also referred to as the Thevenin model. As shown in Figure 1, the model is composed of a controllable voltage source, an ohmic resistor and a parallel RC network. The voltage source Uoc and the ohmic resistor Ro represent the OCV and the internal resistance of a battery, respectively. The RC network is used to simulate the relaxation effect of the battery [15], and the elements Rp and Cp are described as equivalent polarization resistor and equivalent polarization capacitor, respectively. The IL and Ut are the load current and the terminal voltage of the battery, respectively, and are the only measurable variables in the model. Generally, IL is regarded as the input variable and Ut is regarded as the output variable. Through identifying the parameters Uoc and Ro of the model, the OCV and the internal resistance can be estimated. Based on Kirchhoff's law, the mathematical model of the first-order RC model can be derived: where Up is the terminal voltage across the RC network in Figure 1. In Equation (1), IL and Ut can be measured by sensors, and Uoc, Ro, Rp and Cp are unknown parameters needed to be identified. However, Up in Equation (1) is neither a measurable variable nor an estimated parameter. Transforming Equation (1) is necessary. In general, Uoc is derived by SOC through OCV-SOC curves and is regarded as a known parameter. Then, the transfer function of the subsystem composed of Ro and the RC network can be derived. Using a bilinear transform, the discrete transfer function of the subsystem can be obtained. This method couples model parameters and SOC and is widely used in the combined estimation of battery parameters and states [15,16,26]. The estimation accuracy highly depends on the accuracy of the OCV-SOC curves and the battery parameters cannot be estimated independently.
In order to independently estimate the internal resistance and OCV of a lithium-ion battery with Based on Kirchhoff's law, the mathematical model of the first-order RC model can be derived: where U p is the terminal voltage across the RC network in Figure 1. In Equation (1), I L and U t can be measured by sensors, and U oc , R o , R p and C p are unknown parameters needed to be identified. However, U p in Equation (1) is neither a measurable variable nor an estimated parameter. Transforming Equation (1) is necessary. In general, U oc is derived by SOC through OCV-SOC curves and is regarded as a known parameter. Then, the transfer function of the subsystem composed of R o and the RC network can be derived. Using a bilinear transform, the discrete transfer function of the subsystem can be obtained. This method couples model parameters and SOC and is widely used in the combined estimation of battery parameters and states [15,16,26]. The estimation accuracy highly depends on the accuracy of the OCV-SOC curves and the battery parameters cannot be estimated independently.
In order to independently estimate the internal resistance and OCV of a lithium-ion battery with Equation (1), the removal of U p from Equation (1) is necessary. The derivation of U t in Equation (1) is as follows: The OCV and internal resistance of a lithium-ion battery mainly depend on SOC, operating temperature T, and usage history h, and they can be expressed as a function of SOC, T and h. In a BMS, the following assumptions are reasonable [22]: (1) Compared with the totally useable capacity, the consumed or regained energy of the battery in a short period is small. Hence, SOC changes slowly, i.e., ∂SOC/∂t ≈ 0. (2) With the cooling and heating systems of the BMS, the operation temperature of the battery is controlled at a predetermined level and changes slowly, i.e., ∂T/∂t ≈ 0. (3) The usage history h represents a long-term usage history, i.e., ∂h/∂t ≈ 0. As a result, it is also reasonable to assume that the OCV and internal resistance are constant during a short period: Thereby, Equation (2) can be rewritten as: With Equations (1) and (4), a simplified mathematical battery model can be obtained: Equation (5) makes it possible to identify model parameters without SOC-OCV curves and has been used in many studies. For example, Chiang et al. [22] successfully estimated the internal resistance and OCV of lithium-ion batteries with this mathematical battery model. He et al. [21] identified the parameters of this model based on AEKF algorithm, and then estimated SOC with the estimated OCV. Feng et al. [20] used RLS algorithm to identify the model parameters and then estimated the state-of-power (SOP) of lithium-ion batteries. However, in an actual BMS, there are time delays between the sampling instants of U t and I L [24]. The relevant research about the influence of sampling delay on the mathematical battery model shown by Equation (5) is lacking.

Influence of Sampling Delay
Generally, U t and I L are assumed to be measured at time t = kT synchronously and periodically, where T is the sampling period. Accordingly, Equation (5) is converted to: where U oc , R o , R p and C p are regarded as unknown parameters. For the convenience of expression, Equation (6) is rewritten as: where z(k) = U t (kT) (8) h(k) = [ 1 I L (kT) .  [20,22], θ is the parameter vector to be identified. With an identification algorithm, parameters in θ can be identified and then the model parameters including U oc and R o can be obtained by the following equation: However, the assumption that U t and I L are sampled synchronously may be unreasonable in some cases. In a modular BMS, the terminal voltage and current of a battery are measured by two CAN nodes, respectively. Assume that there is a time delay ε between the sampling instants of terminal voltage and current, which are sampled at kT + ε and kT, respectively. The actual measured U t and I L are U t (kT + ε) and I L (kT), respectively. It is necessary to obtain the mathematical model to describe the relationship between U t (kT + ε) and I L (kT). Firstly, according to Equation (5), the mathematical relationship between U t (kT + ε) and I L (kT + ε) is: Then, assuming that the sampling delay ε is small, I L (kT + ε) and dI L (kT + ε)/dt can be divided into: Finally, with Equations (13) and (12), the mathematical model of the actual measured data U t (kT + ε) and I L (kT) can be obtained: In order to clearly express the influence of sampling delay, Equations (6) and (14), named as the original model and the modified model, are drawn in Figure 2. The meanings of the parameters θ 1 to θ 4 are also signed. Firstly, because of the sampling delay ε, the modified model contains a new term E(k), which can be considered as an error term of the original model. The E(k) includes the second order derivation of I L . This means that when the load current I L changes acutely, the E(k) error term will become large and the identification process of model parameters will be disturbed. Secondly, the sampling delay ε also changes the actual meaning of θ 3 . Even if I L changes slowly, there are errors in some identified model parameters, including R o , R p., and C p . In summary, the influence of sampling delay on the identification of model parameters based on Equation (6) mainly includes two parts: (1) When load current I L changes drastically, the identification results will fluctuate. (2) Even though I L changes slowly, the identification accuracy of R o , R p, and C p is still influenced by the sampling delay. will become large and the identification process of model parameters will be disturbed. Secondly, the sampling delay ε also changes the actual meaning of θ3. Even if IL changes slowly, there are errors in some identified model parameters, including Ro, Rp., and Cp. In summary, the influence of sampling delay on the identification of model parameters based on Equation (6) mainly includes two parts: (1) When load current IL changes drastically, the identification results will fluctuate. (2) Even though IL changes slowly, the identification accuracy of Ro, Rp, and Cp is still influenced by the sampling delay.
Original mathematical battery model Modified mathematical battery model (introducing sampling delay ε) Figure 2. The influence of sampling delay on the mathematical battery model. Figure 2. The influence of sampling delay on the mathematical battery model.

Optimized Estimation Method for Battery Parameter
In order to reduce the influence of sampling delay, an optimized estimation method for battery parameters is proposed in this section.
Firstly, Equation (14), which takes sampling delay ε into account, is selected as the mathematical battery model instead of Equation (6). For the convenience of expression, Equation (14) is rewritten as: ..
The h opt (k) and θ opt are the observation vector and the parameter vector, respectively. Assuming that ε is small, −ε(R o + R p ) in θ opt,4 is close to zero. Then, the model parameters can be obtained with the identified θ opt : Secondly, the approximations of dI L (kT)/dt and dU t (kT + ε)/dt in h opt (k) are also optimized. Instead of using the first-order backward difference, the first-order central difference is adopted to improve the approximation accuracy: . .
The approximation of d 2 I L (kT)/dt 2 in h opt (k) uses the second-order central difference: ..
The disadvantage of this method is that the measured data I L (kT + T) and U t (kT + ε + T) is required, which would lead to a sampling period delay in the online identification results. The RLS algorithm with an optimal forgetting factor is used for identifying the parameter vector θ opt in Equation (16) as well as θ in Equation (7). The RLS algorithm can meet the requirement of online identification, but data saturation phenomenon will emerge with the data length increasing. In order to increase the weight of recent data and decrease the weight of old data, a forgetting factor λ is employed, which makes it possible to estimate and track time varying parameters [26,27].
The RLS algorithm with an optimal forgetting factor is implemented as follows. Assume that there is a single-input single-output (SISO) system: where z(k) is the measured value of the output. The h(k) and θ are the observation vector and the parameter vector, respectively. The v(k) is a stochastic noise variable. The identification of θ is realized as follows: whereθ m is the m-th estimation result of θ, e m is the prediction error of the measured value z(m), and λ is the forgetting factor. The K m and P m are the algorithm gain and the covariance matrix, respectively. The parameters including P 0 ,θ 0 and λ need to be set initially. After each sampling event, the estimation results of θ can be updated according to Equation (25).

Data Set of Lithium-Ion Battery for Verification
In this section, a battery test system based on commercial battery management chips is developed to simulate the practical measuring condition in a BMS. With the system, lithium-ion batteries are tested with a special discharge curve, which combines pulse discharge and dynamic discharge. The acquired data set will be used for the verification of the optimized estimation method.

Experiment Setup
In general, a dedicated battery test system is employed to acquire the data set of lithium-ion batteries, such as Arbin BT2000 system. Inside the system, the measurement inaccuracy of the current and voltage sensors is less than ±0.05%. In our experiment, to simulate the practical measuring condition in a BMS, we developed a battery monitor node with the battery management chip LTC6804, which can measure 12 serially connected battery cells with the total measurement error less than 1.2 mV. In addition, the chip supports the synchronized measurement of voltage and current.
The schematic diagram of the monitor node is shown in Figure 3. With the LTC6804 chip, the voltages of four external cells were monitored. The analog input pins GPIO1 and GPIO2 of the chip were used to measure the charge and discharge currents, respectively. The network transmission of the node was established by a network interface device proposed by us in [28]. The network interface device is based on CAN and is named IPCAN, it can meet the transmission requirement of synchronous acquisition systems and provide synchronization signals through its SynOut pin. The LTC6804 and IPCAN are both controlled by an MCU through SPI (Serial Peripheral Interface). It is noticeable that because the LTC6804 is powered by the external cells and the MCU is powered by the IPCAN network, the signals between the LTC6804 and the MCU should be isolated. In the monitor node, a digital isolator for SPI (ADuM3151) was employed for this purpose. A battery test system was set up with the monitor nodes, as shown in Figure 4. With the IPCAN, the monitor nodes became modular and reusable. Two monitor nodes were employed to measure the voltages of cells and one monitor node was employed to measure the current of these cells. To collect measurement data from monitor nodes, an IPCAN-based collector node was developed, which transmitted collected data to a computer through Ethernet. The sample frequency of the system can be up as high as 1 KHz. Furthermore, in order to improve the synchronization accuracy of the samplings of voltage and current, a clock drift compensation method for synchronous sampling proposed by us in [29] was also employed. Test results show that, for Cell 1 in Figure 3, the sampling synchronization error of its voltage and current was bellow 10 μs. With the high sample frequency and high synchronization accuracy, it is possible to manually create millisecond delays between the samplings of voltage and current, which is important for analyzing the influence of sampling delay. In the end, a programmable electric load (ITECH IT8510) and a variable resistance load are used for realizing constant current discharge and simulated discharge.

Battery Test
The cell used in the test was the ICR18650-22P lithium-ion battery produced by Samsung. The typical capacity of the cell is 2150 mAh, and the charging voltage and discharge cut-off voltage of it are 4.2 V and 2.75 V, respectively. Other specifications of the cell are present in Table 1. The cathode A battery test system was set up with the monitor nodes, as shown in Figure 4. With the IPCAN, the monitor nodes became modular and reusable. Two monitor nodes were employed to measure the voltages of cells and one monitor node was employed to measure the current of these cells. To collect measurement data from monitor nodes, an IPCAN-based collector node was developed, which transmitted collected data to a computer through Ethernet. The sample frequency of the system can be up as high as 1 KHz. Furthermore, in order to improve the synchronization accuracy of the samplings of voltage and current, a clock drift compensation method for synchronous sampling proposed by us in [29] was also employed. Test results show that, for Cell 1 in Figure 3, the sampling synchronization error of its voltage and current was bellow 10 µs. With the high sample frequency and high synchronization accuracy, it is possible to manually create millisecond delays between the samplings of voltage and current, which is important for analyzing the influence of sampling delay. In the end, a programmable electric load (ITECH IT8510) and a variable resistance load are used for realizing constant current discharge and simulated discharge. A battery test system was set up with the monitor nodes, as shown in Figure 4. With the IPCAN, the monitor nodes became modular and reusable. Two monitor nodes were employed to measure the voltages of cells and one monitor node was employed to measure the current of these cells. To collect measurement data from monitor nodes, an IPCAN-based collector node was developed, which transmitted collected data to a computer through Ethernet. The sample frequency of the system can be up as high as 1 KHz. Furthermore, in order to improve the synchronization accuracy of the samplings of voltage and current, a clock drift compensation method for synchronous sampling proposed by us in [29] was also employed. Test results show that, for Cell 1 in Figure 3, the sampling synchronization error of its voltage and current was bellow 10 μs. With the high sample frequency and high synchronization accuracy, it is possible to manually create millisecond delays between the samplings of voltage and current, which is important for analyzing the influence of sampling delay. In the end, a programmable electric load (ITECH IT8510) and a variable resistance load are used for realizing constant current discharge and simulated discharge.

Battery Test
The cell used in the test was the ICR18650-22P lithium-ion battery produced by Samsung. The typical capacity of the cell is 2150 mAh, and the charging voltage and discharge cut-off voltage of it are 4.2 V and 2.75 V, respectively. Other specifications of the cell are present in Table 1. The cathode

Battery Test
The cell used in the test was the ICR18650-22P lithium-ion battery produced by Samsung. The typical capacity of the cell is 2150 mAh, and the charging voltage and discharge cut-off voltage of it are 4.2 V and 2.75 V, respectively. Other specifications of the cell are present in Table 1. The cathode Energies 2019, 12, 1878 9 of 16 material of the cell is LiNi x Co y Mn z O 2 (NCM), which has many advantages including high energy density, excellent consistency, and mild thermal stability [30]. The NCM lithium-ion batteries have been widely used in electric vehicles. In order to verify the accuracy of the online estimation methods, a battery test method that combines pulse discharge and simulated discharge is proposed. As shown in Figure 5, the battery testing process was divided into three steps: (1) In step 1, the cell was fully rested and then a pulse discharge with current at 2.15 A (1C) was carried out. (2) In step 2, a simulated discharge with varying discharge current was implemented for 120 seconds. (3) In step 3, the cell was again rested to reach cell equilibrium and then a pulse discharge was carried out once more.
The response curve of terminal voltage for the cell in the test is shown in Figure 6. The results of pulse discharges can be used for estimating battery parameters offline. As shown in Figure 6a, because the battery was fully rested, the measured terminal voltage U 0 before the pulse discharge was equal to its OCV. When the discharge pulse was applied, the terminal voltage dropped from U 0 to U 1 suddenly. This phenomenon is mainly caused by the internal resistance of the cell, and the internal resistance can be estimated as follows [31]: With the step 1 and step 3 pulse discharges, the internal resistance and OCV of the cell before and after the step 2 simulated discharge can be estimated offline, which will be used as the evaluation basis of the online estimation results based on step2 simulated discharge.
Energies 2019, 12, x FOR PEER REVIEW 9 of 16 material of the cell is LiNixCoyMnzO2 (NCM), which has many advantages including high energy density, excellent consistency, and mild thermal stability [30]. The NCM lithium-ion batteries have been widely used in electric vehicles. In order to verify the accuracy of the online estimation methods, a battery test method that combines pulse discharge and simulated discharge is proposed. As shown in Figure 5, the battery testing process was divided into three steps: (1) In step 1, the cell was fully rested and then a pulse discharge with current at 2.15 A (1C) was carried out. (2) In step 2, a simulated discharge with varying discharge current was implemented for 120 seconds. (3) In step 3, the cell was again rested to reach cell equilibrium and then a pulse discharge was carried out once more.
The response curve of terminal voltage for the cell in the test is shown in Figure 6. The results of pulse discharges can be used for estimating battery parameters offline. As shown in Figure 6a, because the battery was fully rested, the measured terminal voltage U0 before the pulse discharge was equal to its OCV. When the discharge pulse was applied, the terminal voltage dropped from U0 to U1 suddenly. This phenomenon is mainly caused by the internal resistance of the cell, and the internal resistance can be estimated as follows [31]: With the step 1 and step 3 pulse discharges, the internal resistance and OCV of the cell before and after the step 2 simulated discharge can be estimated offline, which will be used as the evaluation basis of the online estimation results based on step2 simulated discharge.

Verification and Evaluation
The measured current and voltage data in step 2 simulated discharge is used for estimating battery parameters online. Because the sampling period is 1 kHz and the sampling synchronization error of voltage and current is bellow 10 μs in the test, the data with sampling delay of several milliseconds can be obtained from the original data measured in step 2. Through comparing the estimation results under different sampling delays and different estimation methods, the influence of sampling delay and the performance of the optimized estimation method can be demonstrated.

The Influence of SamplingDdelay on Traditional Estimation Method
The offline estimation results of battery parameters are present in Table 2. The OCV drops from 3.945 V in step 1 to 3.913 V in step 3, which is mainly caused by the consumed energy in step 2 simulated discharge. The internal resistance changes slightly from 0.103 Ω in step 1 to 0.101 Ω in step 3, which reflects that the temperature variation and energy consumption are small in the test with a short time. It can be inferred that, in the step 2 simulated discharge process, OCV drops from 3.945 V to 3.913 V and the internal resistance is around 0.101 Ω.

Data Source Battery Parameter Estimation Result
Step 1 pulse discharge Uoc 3.945 V Ro 0.103 Ω Step 3 pulse discharge Uoc 3.913 V Ro 0.101 Ω Then, using measured current and voltage data in step 2 simulated discharge, we estimated battery parameters with the traditional online method, which adopts the traditional mathematical battery model, related to Equations (7)-(10), and the RLS algorithm with an optimal forgetting factor, related to Equations (24) and (25). In the estimating process, the sampling period and sampling delay were set at 1 s and 0 ms, respectively. The optimal forgetting factor λ was set to 0.98.
The trajectories of estimated battery parameters in the estimation process are shown in Figure 7. The green dashed line and blue dot-dashed line denote the offline estimation results of step 1 and step 3, respectively. The red line refers to the online estimation result in step 2, showing that the estimated parameters begin to converge after eight seconds. For the OCV shown in Figure 7a, the initial estimated result is 3.922 V, which is 23 mV less than the offline result of step 1. The final estimated result is 3.884 V, which is 29 mV less than the offline result of step 3. For the internal resistance, the mean value and standard deviation of online estimated results is 0.0949 Ω and 1.7 mΩ, which is close to the offline estimation results. In summary, with the traditional estimation method, the estimated OCV is about 29 mV less than its actual value, and the estimated internal resistance is close to its actual value but is fluctuant.

Verification and Evaluation
The measured current and voltage data in step 2 simulated discharge is used for estimating battery parameters online. Because the sampling period is 1 kHz and the sampling synchronization error of voltage and current is bellow 10 µs in the test, the data with sampling delay of several milliseconds can be obtained from the original data measured in step 2. Through comparing the estimation results under different sampling delays and different estimation methods, the influence of sampling delay and the performance of the optimized estimation method can be demonstrated.

The Influence of Sampling Delay on Traditional Estimation Method
The offline estimation results of battery parameters are present in Table 2. The OCV drops from 3.945 V in step 1 to 3.913 V in step 3, which is mainly caused by the consumed energy in step 2 simulated discharge. The internal resistance changes slightly from 0.103 Ω in step 1 to 0.101 Ω in step 3, which reflects that the temperature variation and energy consumption are small in the test with a short time. It can be inferred that, in the step 2 simulated discharge process, OCV drops from 3.945 V to 3.913 V and the internal resistance is around 0.101 Ω.

Data Source Battery Parameter Estimation Result
Step 1 pulse discharge U oc 3.945 V R o 0.103 Ω Step 3 pulse discharge U oc 3.913 V R o 0.101 Ω Then, using measured current and voltage data in step 2 simulated discharge, we estimated battery parameters with the traditional online method, which adopts the traditional mathematical battery model, related to Equations (7)- (10), and the RLS algorithm with an optimal forgetting factor, related to Equations (24) and (25). In the estimating process, the sampling period and sampling delay were set at 1 s and 0 ms, respectively. The optimal forgetting factor λ was set to 0.98.
The trajectories of estimated battery parameters in the estimation process are shown in Figure 7. The green dashed line and blue dot-dashed line denote the offline estimation results of step 1 and step 3, respectively. The red line refers to the online estimation result in step 2, showing that the estimated parameters begin to converge after eight seconds. For the OCV shown in Figure 7a, the initial estimated result is 3.922 V, which is 23 mV less than the offline result of step 1. The final estimated result is 3.884 V, which is 29 mV less than the offline result of step 3. For the internal resistance, the mean value and standard deviation of online estimated results is 0.0949 Ω and 1.7 mΩ, which is close to the offline estimation results. In summary, with the traditional estimation method, the estimated OCV is about Energies 2019, 12, 1878 11 of 16 29 mV less than its actual value, and the estimated internal resistance is close to its actual value but is fluctuant.  In order to analyze the influence of sampling delay on the traditional online estimation method, the sampling delay of measured current and voltage in the step 2 discharge wa manually changed from −4 ms to 4 ms, and the above online estimation process was repeated. As analyzed in Section 2.2, the sampling delay will cause the estimation results to fluctuate. Besides, the offline estimation results indicate that the internal resistance is basically unchanged in the step 2 discharge. Hence, the estimation accuracy of internal resistance can be used for showing the influence of sampling delay.
According to the definition of the sampling delay ε in Section 2.2, negative sampling delays mean that the sampling instant of voltage is ahead of that of current. The trajectories of estimated internal resistance with negative sampling delays are shown in Figure 8. With the absolute value of sampling delay increasing, the fluctuation range of estimated internal resistances becomes large. When the sampling delay reaches −4 ms, the estimated result is difficult to converge. However, as shown in Figure 9, the trajectories of estimated internal resistance with positive sampling delays indicate that when the sampling delay changes from 0 ms to 4 ms, the estimated internal resistances become more and more accuracy. In summary, negative sampling delay has a bad effect on parameter estimation, and a little positive sampling delay is beneficial.
In order to show the influence of sampling delay more clearly, we changed the sampling delay from −20 ms to 20 ms, repeated the traditional online estimation process again, and then calculated the mean and standard deviation of estimated internal resistances between 20 s and 120 s. The results are shown in Figure 10, where the standard deviation is presented by the error bar. Two conclusions can be drawn: (1) When the sampling delay is 6 ms instead of 0 ms, the estimation accuracy is the highest, but there is still 4 mΩ error in the mean value. (2) With the sampling delay deviating from 6ms, the average error and fluctuation range become larger and larger. When the sampling delay is shorter than −2 ms or larger than 15 ms, the convergence of estimated parameters becomes difficult.  In order to analyze the influence of sampling delay on the traditional online estimation method, the sampling delay of measured current and voltage in the step 2 discharge wa manually changed from −4 ms to 4 ms, and the above online estimation process was repeated. As analyzed in Section 2.2, the sampling delay will cause the estimation results to fluctuate. Besides, the offline estimation results indicate that the internal resistance is basically unchanged in the step 2 discharge. Hence, the estimation accuracy of internal resistance can be used for showing the influence of sampling delay.
According to the definition of the sampling delay ε in Section 2.2, negative sampling delays mean that the sampling instant of voltage is ahead of that of current. The trajectories of estimated internal resistance with negative sampling delays are shown in Figure 8. With the absolute value of sampling delay increasing, the fluctuation range of estimated internal resistances becomes large. When the sampling delay reaches −4 ms, the estimated result is difficult to converge. However, as shown in Figure 9, the trajectories of estimated internal resistance with positive sampling delays indicate that when the sampling delay changes from 0 ms to 4 ms, the estimated internal resistances become more and more accuracy. In summary, negative sampling delay has a bad effect on parameter estimation, and a little positive sampling delay is beneficial.  In order to analyze the influence of sampling delay on the traditional online estimation method, the sampling delay of measured current and voltage in the step 2 discharge wa manually changed from −4 ms to 4 ms, and the above online estimation process was repeated. As analyzed in Section 2.2, the sampling delay will cause the estimation results to fluctuate. Besides, the offline estimation results indicate that the internal resistance is basically unchanged in the step 2 discharge. Hence, the estimation accuracy of internal resistance can be used for showing the influence of sampling delay.
According to the definition of the sampling delay ε in Section 2.2, negative sampling delays mean that the sampling instant of voltage is ahead of that of current. The trajectories of estimated internal resistance with negative sampling delays are shown in Figure 8. With the absolute value of sampling delay increasing, the fluctuation range of estimated internal resistances becomes large. When the sampling delay reaches −4 ms, the estimated result is difficult to converge. However, as shown in Figure 9, the trajectories of estimated internal resistance with positive sampling delays indicate that when the sampling delay changes from 0 ms to 4 ms, the estimated internal resistances become more and more accuracy. In summary, negative sampling delay has a bad effect on parameter estimation, and a little positive sampling delay is beneficial.
In order to show the influence of sampling delay more clearly, we changed the sampling delay from −20 ms to 20 ms, repeated the traditional online estimation process again, and then calculated the mean and standard deviation of estimated internal resistances between 20 s and 120 s. The results are shown in Figure 10, where the standard deviation is presented by the error bar. Two conclusions can be drawn: (1) When the sampling delay is 6 ms instead of 0 ms, the estimation accuracy is the highest, but there is still 4 mΩ error in the mean value. (2) With the sampling delay deviating from 6ms, the average error and fluctuation range become larger and larger. When the sampling delay is shorter than −2 ms or larger than 15 ms, the convergence of estimated parameters becomes difficult.

The Performance of the Optimized Estimation Method
Using the same data measured in step 2 simulated discharge, we online estimated battery parameters with the optimized estimation method described in Section 3. The sampling period, sampling delay and optimal forgetting factor λ were also set at 1 s, 0 ms and 0.98, respectively. The trajectories of estimated battery parameters are shown in Figure 11, in which the results of traditional estimation method are also present. For the OCV, the estimated results of the optimized method are similar to that of the traditional method, and estimation errors still exist. For the internal resistance, the estimation accuracy is significantly improved, and the fluctuation range is greatly reduced. The mean value and standard deviation of estimated internal insistences between 20 s and 120 s are 0.1 Ω and 0.28m Ω, respectively, which are much better than that of traditional estimation method. Because the sampling delay is set at 0 ms, the optimized battery model shown by Equation (14) is equal to the traditional model shown by Equation (6). Hence, the improvement of estimation accuracy is mainly caused by optimizing the approximation of dIL(kT)/dt and dUt(kT + ε)/dt. It is necessary to adopt the first-order central difference instead of the first-order backward difference to improve the approximation accuracy. In order to show the influence of sampling delay more clearly, we changed the sampling delay from −20 ms to 20 ms, repeated the traditional online estimation process again, and then calculated the mean and standard deviation of estimated internal resistances between 20 s and 120 s. The results are shown in Figure 10, where the standard deviation is presented by the error bar. Two conclusions can be drawn: (1) When the sampling delay is 6 ms instead of 0 ms, the estimation accuracy is the highest, but there is still 4 mΩ error in the mean value. (2) With the sampling delay deviating from 6 ms, the average error and fluctuation range become larger and larger. When the sampling delay is shorter than −2 ms or larger than 15 ms, the convergence of estimated parameters becomes difficult.

The Performance of the Optimized Estimation Method
Using the same data measured in step 2 simulated discharge, we online estimated battery parameters with the optimized estimation method described in Section 3. The sampling period, sampling delay and optimal forgetting factor λ were also set at 1 s, 0 ms and 0.98, respectively. The trajectories of estimated battery parameters are shown in Figure 11, in which the results of traditional estimation method are also present. For the OCV, the estimated results of the optimized method are similar to that of the traditional method, and estimation errors still exist. For the internal resistance, the estimation accuracy is significantly improved, and the fluctuation range is greatly reduced. The mean value and standard deviation of estimated internal insistences between 20 s and 120 s are 0.1 Ω and 0.28m Ω, respectively, which are much better than that of traditional estimation method. Because the sampling delay is set at 0 ms, the optimized battery model shown by Equation (14) is equal to the traditional model shown by Equation (6). Hence, the improvement of estimation accuracy is mainly caused by optimizing the approximation of dIL(kT)/dt and dUt(kT + ε)/dt. It is necessary to adopt the first-order central difference instead of the first-order backward difference to improve the approximation accuracy.

The Performance of the Optimized Estimation Method
Using the same data measured in step 2 simulated discharge, we online estimated battery parameters with the optimized estimation method described in Section 3. The sampling period, sampling delay and optimal forgetting factor λ were also set at 1 s, 0 ms and 0.98, respectively. The trajectories of estimated battery parameters are shown in Figure 11, in which the results of traditional estimation method are also present. For the OCV, the estimated results of the optimized method are similar to that of the traditional method, and estimation errors still exist. For the internal resistance, the estimation accuracy is significantly improved, and the fluctuation range is greatly reduced. The mean value and standard deviation of estimated internal insistences between 20 s and 120 s are 0.1 Ω and 0.28 mΩ, respectively, which are much better than that of traditional estimation method. Because the sampling delay is set at 0 ms, the optimized battery model shown by Equation (14) is equal to the traditional model shown by Equation (6). Hence, the improvement of estimation accuracy is mainly caused by optimizing the approximation of dI L (kT)/dt and dU t (kT + ε)/dt. It is necessary to adopt the first-order central difference instead of the first-order backward difference to improve the approximation accuracy. Then, in order to compare the influence of sampling delay on optimized and traditional estimation methods, we changed the sampling delay of the data measured in step 2 to −2 ms and 6 ms, and then repeated the optimized estimation process. The estimation results are shown in Figure  12, in which the results of the traditional method under the same condition are also shown. The estimation results of the optimized estimation method are closer to the offline estimation results and their fluctuations are lower. This indicates that, with the optimized estimation method, the influence of sampling delay is reduced.  For the purpose of analyzing the influence of larger sampling delays on the optimized method, the sampling delay was set at −20 ms, −10 ms, 10 ms, 20 ms, and 30 ms. Then we repeated the optimized estimation method again. The results are shown in Figure 13. Although the sampling delay increased to −10 ms and 30 ms, the estimated internal resistance still converged well, reflecting that the tolerance range of sampling delay was increased. In addition, the influence of negative sampling delays was more serious than that of positive sampling delays. The reason is that negative sampling delays mean that the voltage sampling is ahead of current sampling, but the load current in the battery model is regarded as the excitation signal and the battery voltage is seen as the response signal. Sampling the response signal ahead has more effect on the parameter estimation. Then, in order to compare the influence of sampling delay on optimized and traditional estimation methods, we changed the sampling delay of the data measured in step 2 to −2 ms and 6 ms, and then repeated the optimized estimation process. The estimation results are shown in Figure 12, in which the results of the traditional method under the same condition are also shown. The estimation results of the optimized estimation method are closer to the offline estimation results and their fluctuations are lower. This indicates that, with the optimized estimation method, the influence of sampling delay is reduced.  Then, in order to compare the influence of sampling delay on optimized and traditional estimation methods, we changed the sampling delay of the data measured in step 2 to −2 ms and 6 ms, and then repeated the optimized estimation process. The estimation results are shown in Figure  12, in which the results of the traditional method under the same condition are also shown. The estimation results of the optimized estimation method are closer to the offline estimation results and their fluctuations are lower. This indicates that, with the optimized estimation method, the influence of sampling delay is reduced.  For the purpose of analyzing the influence of larger sampling delays on the optimized method, the sampling delay was set at −20 ms, −10 ms, 10 ms, 20 ms, and 30 ms. Then we repeated the optimized estimation method again. The results are shown in Figure 13. Although the sampling delay increased to −10 ms and 30 ms, the estimated internal resistance still converged well, reflecting that the tolerance range of sampling delay was increased. In addition, the influence of negative sampling delays was more serious than that of positive sampling delays. The reason is that negative sampling delays mean that the voltage sampling is ahead of current sampling, but the load current in the battery model is regarded as the excitation signal and the battery voltage is seen as the response signal. Sampling the response signal ahead has more effect on the parameter estimation. For the purpose of analyzing the influence of larger sampling delays on the optimized method, the sampling delay was set at −20 ms, −10 ms, 10 ms, 20 ms, and 30 ms. Then we repeated the optimized estimation method again. The results are shown in Figure 13. Although the sampling delay increased to −10 ms and 30 ms, the estimated internal resistance still converged well, reflecting that the tolerance range of sampling delay was increased. In addition, the influence of negative sampling delays was more serious than that of positive sampling delays. The reason is that negative sampling delays mean that the voltage sampling is ahead of current sampling, but the load current in the battery model is regarded as the excitation signal and the battery voltage is seen as the response signal. Sampling the response signal ahead has more effect on the parameter estimation. Finally, we changed the sampling delay from −20 ms to 30 ms, repeated the optimized estimation process again and then calculated the mean and standard deviation of estimated internal resistances between 20 s and 120 s. The mean value and standard deviation are shown in Figure 14a and b, respectively, in which the results of traditional estimation method are also present. Three conclusions can be drawn: (1) For optimized estimation method, when the sampling delay is 3 ms, the estimation accuracy is the highest. The mean value and standard derivation of estimated internal resistances are 0.1001 Ω and 0.26 mΩ, which is much closer to the offline result in step 3. (2) Under the same sampling delay condition, the estimation accuracy of the optimized method is higher than that of the traditional method. The mean value of the estimated internal resistances is closer to offline results and the fluctuation range is smaller. (3) The tolerance range of sampling delay of the optimized method is much larger than that of the traditional method. While the sampling delay reaches −10 ms or 30 ms, the estimation accuracy is still higher than what can be achieved by the traditional method. In summary, the optimized method for online estimating battery parameters has higher estimation accuracy and effectively improves the tolerance range of sampling delay.

Conclusions
In this paper, we analyzed the influence of sampling delay on the online estimation of battery parameters based on the first-order RC model, and proposed an optimized estimation method with an optimized mathematical battery model. A modular battery test system with sampling frequency at 1 KHz and with synchronization accuracy below 0.5 μs was developed. Through processing the data set acquired from NCM lithium-ion batteries, the theoretical analysis results and the proposed estimation method were verified. The results show that, with the sampling delay increasing, the Finally, we changed the sampling delay from −20 ms to 30 ms, repeated the optimized estimation process again and then calculated the mean and standard deviation of estimated internal resistances between 20 s and 120 s. The mean value and standard deviation are shown in Figure 14a,b, respectively, in which the results of traditional estimation method are also present. Three conclusions can be drawn: (1) For optimized estimation method, when the sampling delay is 3 ms, the estimation accuracy is the highest. The mean value and standard derivation of estimated internal resistances are 0.1001 Ω and 0.26 mΩ, which is much closer to the offline result in step 3. (2) Under the same sampling delay condition, the estimation accuracy of the optimized method is higher than that of the traditional method. The mean value of the estimated internal resistances is closer to offline results and the fluctuation range is smaller. (3) The tolerance range of sampling delay of the optimized method is much larger than that of the traditional method. While the sampling delay reaches −10 ms or 30 ms, the estimation accuracy is still higher than what can be achieved by the traditional method. In summary, the optimized method for online estimating battery parameters has higher estimation accuracy and effectively improves the tolerance range of sampling delay. Finally, we changed the sampling delay from −20 ms to 30 ms, repeated the optimized estimation process again and then calculated the mean and standard deviation of estimated internal resistances between 20 s and 120 s. The mean value and standard deviation are shown in Figure 14a and b, respectively, in which the results of traditional estimation method are also present. Three conclusions can be drawn: (1) For optimized estimation method, when the sampling delay is 3 ms, the estimation accuracy is the highest. The mean value and standard derivation of estimated internal resistances are 0.1001 Ω and 0.26 mΩ, which is much closer to the offline result in step 3. (2) Under the same sampling delay condition, the estimation accuracy of the optimized method is higher than that of the traditional method. The mean value of the estimated internal resistances is closer to offline results and the fluctuation range is smaller. (3) The tolerance range of sampling delay of the optimized method is much larger than that of the traditional method. While the sampling delay reaches −10 ms or 30 ms, the estimation accuracy is still higher than what can be achieved by the traditional method. In summary, the optimized method for online estimating battery parameters has higher estimation accuracy and effectively improves the tolerance range of sampling delay.

Conclusions
In this paper, we analyzed the influence of sampling delay on the online estimation of battery parameters based on the first-order RC model, and proposed an optimized estimation method with an optimized mathematical battery model. A modular battery test system with sampling frequency at 1 KHz and with synchronization accuracy below 0.5 μs was developed. Through processing the data set acquired from NCM lithium-ion batteries, the theoretical analysis results and the proposed estimation method were verified. The results show that, with the sampling delay increasing, the

Conclusions
In this paper, we analyzed the influence of sampling delay on the online estimation of battery parameters based on the first-order RC model, and proposed an optimized estimation method with an Energies 2019, 12, 1878 15 of 16 optimized mathematical battery model. A modular battery test system with sampling frequency at 1 KHz and with synchronization accuracy below 0.5 µs was developed. Through processing the data set acquired from NCM lithium-ion batteries, the theoretical analysis results and the proposed estimation method were verified. The results show that, with the sampling delay increasing, the average error and fluctuation range of estimated results would become larger. For the traditional estimation method, when the sampling delay is shorter than −2 ms or larger than 15 ms, the convergence of estimated results would be difficult. The negative sampling delay means that the sampling instant of voltage is ahead of that of current. With the proposed optimized estimation method, the estimation accuracy is improved, and the tolerance range of sampling delay is increased from [−2 ms, 15 ms] to [−10 ms, 30 ms].