An Online Data-Driven Model Identiﬁcation and Adaptive State of Charge Estimation Approach for Lithium-ion-Batteries Using the Lagrange Multiplier Method

: Reliable and accurate state of charge (SOC) monitoring is the most crucial part in the design of an electric vehicle (EV) battery management system (BMS). The lithium ion battery (LIB) is a highly complex electrochemical system, which performance changes with age. Therefore, measuring the SOC of a battery is a very complex and tedious process. This paper presents an online data-driven battery model identiﬁcation method, where the battery parameters are updated using the Lagrange multiplier method. A battery model with unknown battery parameters was formulated in such a way that the terminal voltage at an instant time step is a linear combination of the voltages and load current. A cost function was deﬁned to determine the optimal values of the unknown parameters with different data points measured experimentally. The constraints were added in the modiﬁed cost function using Lagrange multiplier method and the optimal value of update vector was determined using the gradient approach. An adaptive open circuit voltage (OCV) and SOC estimator was designed for the LIB. The experimental results showed that the proposed estimator is quite accurate and robust. The proposed method effectively tracks the time-varying parameters of a battery with high accuracy. During the SOC estimation, the maximum noted error was 1.28%. The convergence speed of the proposed method was only 81 s with a deliberate 100% initial error. Owing to the high accuracy and robustness, the proposed method can be used in the design of a BMS for real time applications.


Introduction
Rechargeable batteries are becoming the energy tanks and power sources for a wide range of applications, ranging from low power cellphones and notebooks to large high-power submarine, aircraft, satellite, smart grid, electric vehicle (EV), and hybrid electric vehicle (HEV) applications [1][2][3][4]. order battery models. The overall performance of Kalman filters abruptly decreased in the presence of non-Gaussian noise. Gao et al. [36] introduced the idea that a particle filter (PF) can deal with highly non-linear and non-Gaussian models. PF is based on Monte-Carlo methods to estimate the posterior distribution. To estimate the SOC, the sliding mode observer [37] and H-infinity observer [38] have also been reported. These methods cannot achieve high precision because they are based on fixed battery parameters. The battery states are quite sensitive and can be affected by slight changes in temperature, discharge/charges current rate, and battery aging [39]. These environmental and system parameters are independent of the user control. This causes uncertainty in a battery model parameter determination and may result in an unavoidable perturbation in a SOC estimation. Therefore, online battery modelling has attracted considerable research attention because it not only estimates the SOC precisely under different conditions and aging levels, is but it is also useful for battery efficiency enhancement. Salkind et al. [40] used impedance spectroscopy and fuzzy logic to propose a SOC estimator. Chin et al. [41] used an adaptive online sequential extreme learning machine (AOS-ELM) to estimate SOC at different temperature. In these techniques, battery is considered as a "black box" and machine learning techniques were used to analyze the data. These techniques are highly efficient but require high storage and computational time. Piao et al. [42] proposed statistical methods for the online model identification of a battery. This method showed reasonable accuracy in a SOC estimation of a Ni-MH battery, but the SOC of a lithium ion battery cannot be estimated accurately using this method because a lithium ion battery has a flat OCV plateau. In recent years, a recursive least squares (RLS) method used widely for updating the battery parameter in real time with the conjunction of different adapting algorithms was used to estimate the SOC [30,33,43,44]. Hu et al. [45] proposed the using a dual extended Kalman filter (DUKF) to estimate the SOC in real time. A dual nonlinear predictive filter (DNPF) was also used to estimate the SOC and battery parameters [46]. Kang et al. [47] presented the black box approach. This technique does not require any battery dynamics, and the accuracy of the SOC depends mainly on the quality and quantity of data. Therefore, it requires higher computational power and storage. Although so many efforts have been made for online SOC estimations, the stability, robustness and low computational cost is still a challenging task.
This paper proposes a data-driven online model identification method. The Lagrange multiplier method was used to identify the battery model parameters in real time using the battery voltage and current. The first order RC (resistor and capacitor) battery model was taken to manage the tradeoff between the complexity and accuracy. The adaptive estimators were designed to estimate the OCV and SOC of LIB. Different experiments were performed to validate the robustness and accuracy of the proposed technique.
The remainder of the paper is organized as follows: Section 2 presents the battery modeling and data driven battery parameters estimation technique. The adaptive OCV and SOC estimator are described in Section 3. Details of the experimental setup are presented in Section 4. The results to validate the proposed technique are discussed in Section 5. The conclusions are summarized in the final section.

Battery Modelling and Parameter Estimation Technique
This section reports the details of the battery model and associated model parameter identification method.

Modelling of Battery
To examine the state and dynamic behavior of a lithium-ion battery, an accurate and reliable battery model must be developed first. Several types of ECMs for the modelling of lithium-ion batteries have been reported [48]. Generally, the accuracy and battery dynamics are enhanced by increasing the order of ECM. In this case, however, the computing complexity of the system increases. Therefore, the first order resistor and capacitor (RC) network, as shown in Figure 1, was adopted to cope with the trade-off between the modelling accuracy and complexity. The battery model can be divided easily into four main parts. In the first part voltage source represents the open circuit voltage (V ocv ). In the second part, a self-discharge resistor (R self-discharge ) is used to describe the self-energy loss when the battery charge is stored for a long time. In a lithium-ion battery, the self-discharge can be ignored because self-discharge in a lithium-ion battery is 2%-10% per month, so R self-discharge can be set to infinity [49]. The inner ohmic resistance of a battery (R i ) (R charge at charge and R discharge at discharge condition) is in the third part. In the last part, in the parallel RC network electrochemical diffusion resistance (R a ) and electrochemical diffusion capacitance (C a ) are used to model the transient dynamic behavior of a battery during the charging and discharging condition. The values of these battery parameters are highly depending upon the SOC and operating temperature of the battery. So, the accuracy of these battery parameters is so much important to measure SOC accurately. to infinity [49]. The inner ohmic resistance of a battery (Ri) (Rcharge at charge and Rdischarge at discharge condition) is in the third part. In the last part, in the parallel RC network electrochemical diffusion resistance (Ra) and electrochemical diffusion capacitance (Ca) are used to model the transient dynamic behavior of a battery during the charging and discharging condition. The values of these battery parameters are highly depending upon the SOC and operating temperature of the battery. So, the accuracy of these battery parameters is so much important to measure SOC accurately. where is the load current. The electrical behavior of a used battery model can be expressed using the following equations: and: where is the voltage across and , and is the voltage across resistor . Therefore: The Samsung ICR18650-26F lithium cobalt oxide (LICoO2) battery was used to perform the SOC-OCV; it has a rated capacity of 2600 mAh. The test was performed under a controlled temperature of 27 ± 1 °C. Initially, the battery was fully charged using the conventional technique (constant current constant voltage) until it reached the charge termination voltage (4.05 V [50]). When the battery was fully charged, the SOC of the battery was considered to be 100%. After pausing of 1 hour for depolarization, the battery was discharged using pulses of 1000 mA for an interval of 430 s until it reached the discharge cut-off voltage (2.75 V [50]). At the end of complete discharge, the SOC of the battery was considered to be 0%. The cell was left in the open circuit after each discharge pulse for a period of one hour to measure the discharge OCVs [51]. A similar process was performed to measure the charge OCVs of a battery from 0% to 100% SOC during charging. After the pulse charging and discharging test, the average charge and discharge OCVs were treated as the real OCVs. As the OCV and SOC is intrinsically nonlinear, the function of in terms of SOC can be expressed as: = ( ) = 1 7 + 2 6 + 3 5 + 4 4 + 5 3 + 6 2 + 7 + 8 (4) where is the value of SOC of a battery. 1 , 2 , 3 , 4 , 5 , 6 , 7 , and 8 are the extracted polynomial coefficients using the curve-fitting toolbox in MATLAB TM ; it fits the OCV values precisely under different SOC values, as shown in Figure 2. These equations can be used to formulate a complete state-space approach for the development of a BMS. Table 1 lists the values of these coefficients. Where I load is the load current. The electrical behavior of a used battery model can be expressed using the following equations: and: where V a is the voltage across C a and R a , and V r is the voltage across resistor R i . Therefore: The Samsung ICR18650-26F lithium cobalt oxide (LICoO 2 ) battery was used to perform the SOC-OCV; it has a rated capacity of 2600 mAh. The test was performed under a controlled temperature of 27 ± 1 • C. Initially, the battery was fully charged using the conventional technique (constant current constant voltage) until it reached the charge termination voltage (4.05 V [50]). When the battery was fully charged, the SOC of the battery was considered to be 100%. After pausing of 1 hour for depolarization, the battery was discharged using pulses of 1000 mA for an interval of 430 s until it reached the discharge cut-off voltage (2.75 V [50]). At the end of complete discharge, the SOC of the battery was considered to be 0%. The cell was left in the open circuit after each discharge pulse for a period of one hour to measure the discharge OCVs [51]. A similar process was performed to measure the charge OCVs of a battery from 0% to 100% SOC during charging. After the pulse charging and discharging test, the average charge and discharge OCVs were treated as the real OCVs. As the OCV and SOC is intrinsically nonlinear, the function of V ocv in terms of SOC can be expressed as: V ocv = f (z) = p 1 z 7 + p 2 z 6 + p 3 z 5 + p 4 z 4 + p 5 z 3 + p 6 z 2 + p 7 z + p 8 (4) where z is the value of SOC of a battery. p 1 , p 2 , p 3 , p 4 , p 5 , p 6 , p 7 , and p 8 are the extracted polynomial coefficients using the curve-fitting toolbox in MATLAB TM ; it fits the OCV values precisely under different SOC values, as shown in Figure 2. These equations can be used to formulate a complete state-space approach for the development of a BMS. Table 1 lists the values of these coefficients.

Lagrange Multiplier Method for Online Model Identification
The discrete form of Equations (1) and (2) can be derived by using the zero order hold method [52] i.e., ( ) = (1 − −1 ) (ℒ −1 { ( ) }). By applying Laplace transform to Equation (1), we get: By substituting (0) = 0 and rearranging Equation (5), it can be written as: By applying zero order hold method, Equation (6) can be reduced to: By applying inverse -transform, the discrete form of the above equation is the following: Similarly, Equation (2) can be rewritten in time discrete form as: where is the sampling interval; is discrete time index and it is a non-negative integer number because estimation starts at = 0 second. , , and are the terminal, open circuit and

Lagrange Multiplier Method for Online Model Identification
The discrete form of Equations (1) and (2) can be derived by using the zero order hold method [52] i.e., . By applying Laplace transform to Equation (1), we get: By substituting V a (0) = 0 and rearranging Equation (5), it can be written as: By applying zero order hold method, Equation (6) can be reduced to: By applying inverse z-transform, the discrete form of the above equation is the following: Similarly, Equation (2) can be rewritten in time discrete form as: where ∆t d is the sampling interval; k is discrete time index and it is a non-negative integer number because estimation starts at t = 0 second. V k t , V k ocv , and V k a are the terminal, open circuit and diffusion voltages, respectively, at the kth sampling time, and the load current at the kth sampling time is I k load . Using Equation (8), Equation (9) becomes: E k t is defined as Equation (11): Therefore, Equation (10) can be rewritten as: By putting the value of V k a = −E k t − I k load R i in the above Equation, it becomes: By rearranging Equation (13), it becomes: Therefore, the above Equation (14) can be rewritten as: where: and: Defining: Suppose: . . . or: Supposeβ(k) andβ(k − 1) are the adjacent weight vectors of the model describer in Equation (19). The objective is to find a weight vector β with stable values that satisfy all the data, i.e., ∀ k = 1, 2, 3, . . . , N. Thus, to achieve this, the target is to minimize the difference in the two consecutive weight vector steps as follows: Subject to N constraints: is the difference of the model output and actual data at the kth sample time. Define a cost function using the Lagrange multiplier method to formulate the above problem into an optimization environment: where λ k 's are the Lagrange multipliers and can be determined as follows: Using Equations (20), (23) and (25), Equation (24) can be rewritten as: The extreme values of the above cost function can be found by differentiating it with respect to the weight vector and setting the first derivative equal to zero, i.e.: Using Equations (19) and (22), and Lagrange multiplier method we can find: and: Substituting this value of the Lagrange multiplier vector into Equation (27) results in: To apply the above-derived Equation in an adaptive algorithm, a controlling parameter could be added as follows. This parameter is used for convergence: Equation (31) can be rewritten using Equation (22): In some of cases, during application of this algorithm, numerical difficulties have been reported [53]. Therefore, to avoid such numerical difficulties, a parameter δ could be added (if required):

Adaptive SOC Estimator Design
Based on the data-driven identified parameters of battery model, an online estimation of SOC is designed in this section. The SOC of the battery can be inferred precisely using the inverse of Equation (4) if the OCV of the battery is known. The design of the OCV estimator discussed below.

Adaptive OCV Estimator Design
Using Equation (16), the discrete form of Equations (1) and (2) can be written as: Placing Equation (35) into Equation (34) yields: By assuming that the OCV is a slow varying function, then = −1 , so the OCV can be solved as follows: A smaller sampling time has the advantage of producing an estimated model with better accuracy.

Adaptive SOC Estimator Design
The SOC of a battery can be defined as the percentage of currently available capacity with respect to the current maximum available battery capacity [8][9][10][11]. The SOC in terms of the time function can be written as:

Adaptive SOC Estimator Design
Based on the data-driven identified parameters of battery model, an online estimation of SOC is designed in this section. The SOC of the battery can be inferred precisely using the inverse of Equation (4) if the OCV of the battery is known. The design of the OCV estimator discussed below.

Adaptive OCV Estimator Design
Using Equation (16), the discrete form of Equations (1) and (2) can be written as: Placing Equation (35) into Equation (34) yields: By assuming that the OCV is a slow varying function, then V k ocv = V k−1 ocv , so the OCV can be solved as follows: A smaller sampling time has the advantage of producing an estimated model with better accuracy.

Adaptive SOC Estimator Design
The SOC of a battery can be defined as the percentage of currently available capacity with respect to the current maximum available battery capacity [8][9][10][11]. The SOC in terms of the time function can be written as: where z(t) is the SOC of a battery at the sampling time t, z(t o ) is the initial SOC value, i(t) is the instantaneous load current (considered positive for the discharging and negative for charging phase), and Q m is the present maximum available battery capacity. This differs from the rated capacity due to the aging effect of the battery. η is the Columbic efficiency of a battery. The Columbic efficiency depends mainly on the temperature, capacity, and battery current. In this paper, η = 1. Equation (38) can be written in discrete form as follows: From Equation (4), it is evident that the VOC is a function of the SOC, so it can be rewritten as:

Algorithm Estimation Approach
From the above descriptions, the OCV of a battery has a direct relationship with the battery SOC estimation. An accurate and precise SOC estimation requires a reliable OCV estimator. In this paper, a Lagrange multiplier method was proposed to identify the data driven parameters. The proposed method provides accurate real-time parameters for a reliable SOC estimation. Figure 4 shows a general diagram of the proposed methodology.

Algorithm Estimation Approach
From the above descriptions, the OCV of a battery has a direct relationship with the battery SOC estimation. An accurate and precise SOC estimation requires a reliable OCV estimator. In this paper, a Lagrange multiplier method was proposed to identify the data driven parameters. The proposed method provides accurate real-time parameters for a reliable SOC estimation. Figure 4 shows a general diagram of the proposed methodology. Step 1: Data measurements. The real time battery current and voltage are monitored and measured during the battery charging and discharging time. The data is saved for each sample interval. In this work, MATLAB TM was used to run the proposed algorithm. Although the battery data (voltage and current) are in non-real-time, it is a time series computation process; hence, the proposed methodology is appropriate for real time applications.
Step 2: Battery parameter identification. The voltage and current are measured during battery charging and discharging. The Lagrange multiplier method is used to calculate the data-driven battery parameters, as discussed in Section 2. The Lagrange method continuously trying to reduce the error to reach the optimal values of parameters.
Step 3: Adaptive SOC estimation. First, the data driven parameters are used to estimate the OCV of a battery using Equation (37). The estimated OCV is used to estimate the SOC of the battery using Equation (40). Figure 5 shows the experimental configuration of the test system. The Samsung 18650 lithium- Step 1: Data measurements. The real time battery current and voltage are monitored and measured during the battery charging and discharging time. The data is saved for each sample interval. In this work, MATLAB TM was used to run the proposed algorithm. Although the battery data (voltage and current) are in non-real-time, it is a time series computation process; hence, the proposed methodology is appropriate for real time applications.

Experimental Setup
Step 2: Battery parameter identification. The voltage and current are measured during battery charging and discharging. The Lagrange multiplier method is used to calculate the data-driven battery parameters, as discussed in Section 2. The Lagrange method continuously trying to reduce the error to reach the optimal values of parameters.
Step 3: Adaptive SOC estimation. First, the data driven parameters are used to estimate the OCV of a battery using Equation (37). The estimated OCV is used to estimate the SOC of the battery using Equation (40). Figure 5 shows the experimental configuration of the test system. The Samsung 18650 lithiumion-battery (2600 mAh) was used in the experiments. The battery was positioned inside a thermal chamber to maintain a battery temperature of 27 ± 1 • C. The voltage and current sensors were used to measure the voltage and charge/discharge current at 1 second sample rate. The sensors had a maximum inaccuracy of 0.5%. The Arduino Uno interfaced with MATLAB TM Simulink was used to control the charge/discharge cycle and store sensor data in a computer. The battery was charged using a Naydrone Volter battery charger (Drong Zhang Co Ltd, Seoul, South Korea). The battery was discharged at different constant currents to check the validity of the proposed methodology. The actual SOC of the battery was measured using the ampere hour counting method. Other details of the experiment were discussed at the end of Section 2.1.

Experimental Setup
work, MATLAB TM was used to run the proposed algorithm. Although the battery data (voltage and current) are in non-real-time, it is a time series computation process; hence, the proposed methodology is appropriate for real time applications.
Step 2: Battery parameter identification. The voltage and current are measured during battery charging and discharging. The Lagrange multiplier method is used to calculate the data-driven battery parameters, as discussed in Section 2. The Lagrange method continuously trying to reduce the error to reach the optimal values of parameters.
Step 3: Adaptive SOC estimation. First, the data driven parameters are used to estimate the OCV of a battery using Equation (37). The estimated OCV is used to estimate the SOC of the battery using Equation (40). Figure 5 shows the experimental configuration of the test system. The Samsung 18650 lithiumion-battery (2600 mAh) was used in the experiments. The battery was positioned inside a thermal chamber to maintain a battery temperature of 27 ± 1 °C. The voltage and current sensors were used to measure the voltage and charge/discharge current at 1 second sample rate. The sensors had a maximum inaccuracy of 0.5%. The Arduino Uno interfaced with MATLAB TM Simulink was used to control the charge/discharge cycle and store sensor data in a computer. The battery was charged using a Naydrone Volter battery charger (Drong Zhang Co Ltd, Seoul, South Korea). The battery was discharged at different constant currents to check the validity of the proposed methodology. The actual SOC of the battery was measured using the ampere hour counting method. Other details of the experiment were discussed at the end of Section 2.1.

Results and Discussion
Rechargeable batteries play a pivotal role in renewable energy storage, EVs production, and portable electronic appliances. The BMS system of the battery must be well designed. The SOC of the battery is one of the major indicators in the BMS. The SOC can be perceived as the fuel gauge of the battery. Therefore, an estimation of the SOC is a crucial part of the BMS. Figure 1 shows a schematic diagram of the battery model. The first order RC battery model was selected considering the tradeoff between the complexity and accuracy. Figure 2 presents the relationship between the OCV and SOC of the battery. The relationship between the OCV and SOC was developed using the curve-fitting toolbox in MATLAB TM . Table 1 lists the polynomial coefficients. Figure 3 shows the flow chart to identify the data-driven parameters of the battery using the proposed technique. Figure 4 shows the general layout of the proposed methodology to estimate the OCV and SOC of the battery. Figure 5 presents the experimental setup of the proposed work. Figure 6a-c shows the online identified parameters of a lithium-ion-battery and their respective errors with the reference values. Figure 7 shows the estimated SOC of a battery using the proposed method and its comparison with the reference and fixed parameter SOC estimation. This also shows the error during the estimation of the SOC. Figure 8 shows the robustness and accuracy of proposed algorithm in hybrid pulse experiment. Figure 9 compares the reference and estimated SOC with different initial SOCs. Figure 10 presents the estimated remaining capacity of the battery. Table 2 and Table 3 summarize the performance of the proposed algorithm. Figure 11a-c shows the sensitivity analysis under different sampling time and sensors error.
The proposed Lagrange multiplier methodology was implemented on the experimental data acquired in discharge test using MATLAB TM . To check the validity of the proposed methodology, the algorithm was initialized with a random value of battery parameters. In this study, the initializing battery parameters values were R i = 3 mΩ, R a = 35 mΩ, and C a = 2500 F.

Battery Parameters Identification
The accuracy of the battery parameters is essential for estimating the SOC. To evaluate the accuracy of model identification, the reference value of the battery parameters should be known. The reference values of the battery parameters can be determined at the average points of the charge and discharge pulse test. These reference values were extracted offline, and the final reference value of each parameter was determined by taking the average of all points. The reference inner ohmic resistance of the battery, R i , can be extracted by calculating the change in voltage and step change in current at each time point, i.e., R i = (V ocv − V t )/∆I load . Because V ocv and V r are calculated, the value of V a can be determined using Equation (2). The R a and C a can be extracted using the following equation [54]:

Performance of SOC Estimator of Battery
After determining the data-driven parameters of the battery, the OCV and SOC can be estimated at each sampling interval. Figure 7 shows the SOC and error profiles of the proposed methodology, fixed parameters estimation, and reference trajectory. It also shows the discharge current and terminal voltage profiles. The reference trajectory of the lithium-ion-battery was measured using the ampere-hour counting method. The initial SOC value was set to 100%. The proposed methodology tracked the reference SOC robustly, stably and accurately after an initial error correction. The proposed algorithm had a maximum error of 1.28% and the fixed parameters had a 7.28% maximum error during the entire estimation. The high error of the proposed method was between 45% to 35% SOC because at the particle point, the SOC-OCV curve shown in Figure 2 has a very small slope. The small slope causes some error in estimating the SOC in Equation (40). The presence of this error was also discussed by Wei et al. [54].

Performance of SOC Estimator of Battery
After determining the data-driven parameters of the battery, the OCV and SOC can be estimated at each sampling interval. Figure 7 shows the SOC and error profiles of the proposed methodology, fixed parameters estimation, and reference trajectory. It also shows the discharge current and terminal voltage profiles. The reference trajectory of the lithium-ion-battery was measured using the ampere-hour counting method. The initial SOC value was set to 100%. The proposed methodology tracked the reference SOC robustly, stably and accurately after an initial error correction. The proposed algorithm had a maximum error of 1.28% and the fixed parameters had a 7.28% maximum error during the entire estimation. The high error of the proposed method was between 45% to 35% SOC because at the particle point, the SOC-OCV curve shown in Figure 2 has a very small slope. The small slope causes some error in estimating the SOC in Equation (40). The presence of this error was also discussed by Wei et al. [54]. Figure 8 shows the results of the proposed approach for hybrid pulse experiment test. The proposed algorithm shows same robustness and accuracy in the presence of different discharging pulses. The terminal voltage, pulse discharge current, estimated SOC and reference SOC profiles has shown in Figure 8. Figure 9 presents the estimated SOC with different initial SOCs and their respective errors. The proposed methodology showed a good convergence rate at different initial SOC. Figure 10 shows the estimated remaining capacity of the battery during discharge.
Energies 2018, 11, x FOR PEER REVIEW 13 of 19 Figure 8. Terminal voltage, current, estimated SOC and reference SOC profiles for hybrid pulse experiment. Figure 9 presents the estimated SOC with different initial SOCs and their respective errors. The proposed methodology showed a good convergence rate at different initial SOC. Figure 10 shows the estimated remaining capacity of the battery during discharge.   Figure 9 presents the estimated SOC with different initial SOCs and their respective errors. The proposed methodology showed a good convergence rate at different initial SOC. Figure 10 shows the estimated remaining capacity of the battery during discharge.

Computational Time
The computational complexity of the proposed methodology was compared with other existing methods reported in the literature [55]. A gradient approach-based optimization of a given problem has been used frequently in the past. Such algorithms have a favorable position because of their less computational efforts and efficient convergence in constrained and unconstrained environments. In particular, for a constraint environment, it would be beneficial is all the constraints and objective function could be combined in a single cost function that is extremized. The Lagrange multiplier method provides this feature to convert the given constraints to a function with a zero value and add them individually in the objective function. These added constraints have no effect in the function value of the objective function but at the same time, the objective function inherits the constraints defined in a particular problem. Therefore, the combination of the gradient approach and Lagrange multiplier method not only makes the problem simpler, but also solves it with less computational load and efficient convergence. To determine the computational complexity of the proposed methodology, the algorithm was run 10 times. The proposed algorithm was run on a desktop-PC, with the following specifications: 3.4 GHz CPU and 8.0 GB RAM. Table 2 compares the CPU time comparison of the methodologies. The proposed estimator used 40.89% less time than the RLS-EKF. The KF approaches were too complex as compare with the proposed methodology, which is why the computational time of the KF are high.

Convergence Rate
The evaluate the performance of the proposed algorithm, the mean absolute error (MAE) was used to compare the accuracy of the proposed algorithms with other algorithms published in the literature [54][55][56]. The convergence time is defined as an estimation error within 5% [54]. This is used to evaluate the convergence characteristics of the algorithms. Table 3 compares the proposed and other methodologies.  The convergence speed of the proposed methodology was remarkably low in the presence of erroneous initialization. The convergence time can be decreased further using the SOC close to a real value, and estimated using the OCV before start of the algorithm. In this study, the initial SOC was set to 0% to check the convergence speed of the proposed methodology.

Sensitivity Analysis
In this section, the accuracy of the parameter identification and SOC estimation has been evaluated using simulations under following scenarios: (i) voltage sensor accuracy (±2.5, ±5, ±10, and ±25 mV), (ii) current sensor accuracy (±5, ±50, ±100, and ±500 mA) and (iii) sampling time (0.1, 0.4, 0.7, and 0.95 s). The estimated parameters were compared with reference values to determine the effect on the accuracy. Figures 11a-c show the error results of the battery parameters and SOC estimation with their respective reference value under different voltage sensor accuracy, current sensor accuracy and sampling time. Figure 11a shows that the accuracy of parameters and SOC estimation decreases as the accuracy of the voltage sensor decreases. It is evident from Figure 11a that the voltage sensor accuracy has the high effect on the SOC estimation. Figure 11b show the error results of the current sensor accuracy. It was noted that at the minimum current sensor accuracy (500 mA) the maximum noted error of Ca, Ra, Ri, and SOC were 1.83%, 2.03%, 0.94%, and 0.53% respectively. It reveals that the current sensor accuracy has the low impact on the parameter identification and SOC estimation accuracy. Figure 11c shows the error profiles at different sampling interval. The lower sampling time reduced the accuracy of Ca and Ra, which also changed the estimation accuracy of SOC. According to the Lyapunov's first stability criterion, perturbation caused by noise and unmodeled dynamics has significant effect on the accuracy of battery parameter identification [57]. In other words, the sampling period must be chosen in a way that the substantial changes in the system can be captured.

Conclusions
The non-adaption of the battery model is a significant issue for an accurate OCV estimation because if the estimated OCV has poor accuracy then the SOC cannot be estimated precisely and accurately. To overcome this issue, this paper presents a data driven online model parameter identification approach using the Lagrange multiplier. The proposed method tracked the battery parameters robustly and accurately at each sampling interval using the battery voltage and current in real time. Based on data driven parameters, an adaptive SOC estimator was designed, which shows high accuracy and a fast convergence rate. The proposed methodology has the potential to show high accuracy at different aging levels of the battery. The experimental results show that the proposed

Computational Time
The computational complexity of the proposed methodology was compared with other existing methods reported in the literature [55]. A gradient approach-based optimization of a given problem has been used frequently in the past. Such algorithms have a favorable position because of their less computational efforts and efficient convergence in constrained and unconstrained environments. In particular, for a constraint environment, it would be beneficial is all the constraints and objective function could be combined in a single cost function that is extremized. The Lagrange multiplier method provides this feature to convert the given constraints to a function with a zero value and add them individually in the objective function. These added constraints have no effect in the function value of the objective function but at the same time, the objective function inherits the constraints defined in a particular problem. Therefore, the combination of the gradient approach and Lagrange multiplier method not only makes the problem simpler, but also solves it with less computational load and efficient convergence. To determine the computational complexity of the proposed methodology, the algorithm was run 10 times. The proposed algorithm was run on a desktop-PC, with the following specifications: 3.4 GHz CPU and 8.0 GB RAM. Table 2 compares the CPU time comparison of the methodologies.
The proposed estimator used 40.89% less time than the RLS-EKF. The KF approaches were too complex as compare with the proposed methodology, which is why the computational time of the KF are high.

Convergence Rate
The evaluate the performance of the proposed algorithm, the mean absolute error (MAE) was used to compare the accuracy of the proposed algorithms with other algorithms published in the literature [54][55][56]. The convergence time is defined as an estimation error within 5% [54]. This is used to evaluate the convergence characteristics of the algorithms. Table 3 compares the proposed and other methodologies.
The convergence speed of the proposed methodology was remarkably low in the presence of erroneous initialization. The convergence time can be decreased further using the SOC close to a real value, and estimated using the OCV before start of the algorithm. In this study, the initial SOC was set to 0% to check the convergence speed of the proposed methodology.

Sensitivity Analysis
In this section, the accuracy of the parameter identification and SOC estimation has been evaluated using simulations under following scenarios: (i) voltage sensor accuracy (±2.5, ±5, ±10, and ±25 mV), (ii) current sensor accuracy (±5, ±50, ±100, and ±500 mA) and (iii) sampling time (0.1, 0.4, 0.7, and 0.95 s). The estimated parameters were compared with reference values to determine the effect on the accuracy. Figure 11a-c show the error results of the battery parameters and SOC estimation with their respective reference value under different voltage sensor accuracy, current sensor accuracy and sampling time. Figure 11a shows that the accuracy of parameters and SOC estimation decreases as the accuracy of the voltage sensor decreases. It is evident from Figure 11a that the voltage sensor accuracy has the high effect on the SOC estimation. Figure 11b show the error results of the current sensor accuracy. It was noted that at the minimum current sensor accuracy (500 mA) the maximum noted error of C a , R a , R i , and SOC were 1.83%, 2.03%, 0.94%, and 0.53% respectively. It reveals that the current sensor accuracy has the low impact on the parameter identification and SOC estimation accuracy. Figure 11c shows the error profiles at different sampling interval. The lower sampling time reduced the accuracy of C a and R a , which also changed the estimation accuracy of SOC. According to the Lyapunov's first stability criterion, perturbation caused by noise and unmodeled dynamics has significant effect on the accuracy of battery parameter identification [57]. In other words, the sampling period must be chosen in a way that the substantial changes in the system can be captured.

Conclusions
The non-adaption of the battery model is a significant issue for an accurate OCV estimation because if the estimated OCV has poor accuracy then the SOC cannot be estimated precisely and accurately. To overcome this issue, this paper presents a data driven online model parameter identification approach using the Lagrange multiplier. The proposed method tracked the battery parameters robustly and accurately at each sampling interval using the battery voltage and current in real time. Based on data driven parameters, an adaptive SOC estimator was designed, which shows high accuracy and a fast convergence rate. The proposed methodology has the potential to show high accuracy at different aging levels of the battery. The experimental results show that the proposed SOC estimator has low computational complexity and high accuracy compared to the KF approaches. As this technique has a maximum error below 1.5%, it can be utilized to design the BMS in EVs.