A Sparse Learning Machine for Real-Time SOC Estimation of Li-ion Batteries

The state of charge (SOC) estimation of Li-ion batteries has attracted substantial interests in recent years. Kalman Filter has been widely used in real-time battery SOC estimation, however, to build a suitable dynamic battery state-space model is a key challenge, and most existing methods still use the off-line modelling approach. This paper tackles the challenge by proposing a novel sparse learning machine for real-time SOC estimation. This is achieved first by developing a new learning machine based on the traditional least squares support vector machine (LS-SVM) to capture the process dynamics of Li-ion batteries in real-time. The least squares support vector machine is the least squares version of the conventional support vector machines (SVMs) which suffers from low model sparseness. The proposed learning machine reduces the dimension of the projected high dimensional feature space with no loss of input information, leading to improved model sparsity and accuracy. To accelerate computation, mapping functions in the high feature space are selected using a fast recursive method. To further improve the model accuracy, a weighted regularization scheme and the differential evolution (DE) method are used to optimize the parameters. Then, an unscented Kalman filter (UKF) is used for real-time SOC estimation based on the proposed sparse learning machine model. Experimental results on the Federal Urban Drive Schedule (FUDS) test data reveal that the performance of the proposed algorithm is significantly enhanced, where the maximum absolute error is only one sixth of that obtained by the conventional LS-SVMs and the mean square error of the SOC estimations reaches to 10−7, while the proposed method is executed nearly 10 times faster than the conventional LS-SVMs.


I. INTRODUCTION
In recent years, the transportation electrification through mass roll-out of electric vehicles has been considered as an important measure to tackle the global challenges of climate change and environmental pollutions due to substantive The associate editor coordinating the review of this manuscript and approving it for publication was Bin Zhou . consumption of fossil fuels in the transportation sector [1]. Li-ion batteries are widely used for energy storage because of their favourable advantages of high energy density, high power performance and long cycle life [2], [3]. However, the battery pack is often composed of hundreds or thousands battery cells. The battery management system (BMS) is essential to achieve a high operation safety level and high efficiency in battery charging and discharging [4]. The state VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ of charge (SOC), indicating the remaining capacity, is an important battery state to estimate in BMS in order to maintain the battery operation safety and efficiency [5]. The battery SOC estimation has been intensively researched in the literature. The conventional direct measurement methods [1], including the ampere-hour method [6] and the open circuit voltage (OCV) based method [7], may easily lead to accumulated deviations due to the measurement errors. Besides, the OCV-based method takes long time (more than 1 hour) to measure the OCV which makes this method hardly applicable on-line [5]. To overcome this drawback, different model-based methods have been developed, such as the equivalent electric circuit models (EECMs) [1], [8], artificial neural networks [9] and least square support vector machine (LS-SVM) [2], etc. However, the majority of the existing model based approaches involve a complex offline model identification phase. When they are applied online, the resultant models are sensitive to measurement errors.
To reduce the impact of measurement errors on the estimation accuracy, the Kalman filter is widely adopted. The Kalman filter uses both the model outputs and the measurements to achieve optimal estimation of state variables by minimizing the mean square errors of the outputs. However, the classical Kalman filter is only suitable for linear systems. For the complex nonlinear processes of battery charging and discharging, the extended Kalman filter (EKF) [10]- [12], the unscented Kalman filter (UKF) [13], [14] and other Kalman filter variants [2], [15] have been successfully applied to the battery SOC estimation. The EKF method is capable of producing more accurate SOC estimation through linearizing the battery state-space equation using Taylor expansion series. The iterative process of the EKF heavily depends on the initial model and the initial state estimation. Furthermore, the Jacobian matrix may not be obtainable in some cases [15]. Unlike the EKF method, the UKF method based on the unscented transform is more robust, accurate and easier to implement. Similarly to the EKF method, the performance of the UKF method is still highly dependent on the initial model. In order to overcome the shortcomings of UKF, the adaptive unscented filter (AUKF) method [16] which adaptively adjusts the process noise covariance and the measurement noise covariance in the estimation process, has been successfully applied to the SOC estimation.
In summary, the existing model based methods for the battery SOC estimation use the offline models. Their accuracy will be compromised due to real-time noise and the initial state-space model, though the AUKF can reduce the impacts of measurement and process noises at the cost of increased computation cost. To overcome the drawback, online battery model identification has been researched in the last few years, such as the RTLS-based observer method [3] and the Gaussian process regression method [17]. This paper follows the similar technical route to build an online battery state-space model. In order to reduce the computation time incurred by existing approaches, a sparse learning machine (LM) trained only using a very small number of samples is developed for SOC estimation, in replacement of the conventional LS-SVM model. Although the traditional LS-SVM method can find the solutions quickly by solving a set of linear equations, yet poor sparseness and model accuracy are the shortcomings [18]- [20].
To enhance the sparsity of LS-SVM models, various methods have been proposed in the literature. They can be generally categorized into two groups: sparse samples methods and features selection methods [18], [20]. The sparse samples methods often involve reduction or selection of support vectors. The reduction methods prune the support vectors to approximate the original SVM model. For example, Suykens et al. proposed a class of pruning methods based on the spectrum of the support values [21], [22]. Other works [23]- [25] proposed to improve these pruning methods by iteratively solving a smaller set of linear equations. For the selection methods, the model sparsity is considered in advance by fixing the number of the prototype vectors which are iteratively selected [26]- [29]. These methods induce a low rank kernel matrix to approximate the primal space. For example, in [18], [28] the model sparsity is achieved by directly selecting support vectors (SVs) from the training data set based on a certain criterion. The main issue with these methods lies in the fact that a small improvement in the sparsity is often achieved at the cost of significantly increased computational effort, while information embedded into the removed data is lost. For the features selection method, the selection of kernel functions is a key stage. Jiao et al. [30] proposed a fast sparse approximation method LS-SVM (FSA-LSSVM) which iteratively build an approximated model by selecting the basic kernel function one by one. Zhou [19], [29] given an equivalent form of the cost function based on the kernel function to look for a low-rank approximation. However, Li and Zhang et al. [31] presented a sparse learning machine based on the LS-SVMs cost function, and the fast recursive algorithm (FRA) [32] is used to select the mapping function.
In this paper, a sparse learning machine namely S-DE-WLM is used to build the battery state-space model based our early work in [31], and the main technical contributions are summarized as follows: • The UKF method which has proved to be more effective than a few other KF variants is applied to the SOC estimation of Li-ion batteries. Compared to the EKF method, the UKF method is capable of producing more accurate estimations for strongly nonlinear system with a large initial deviation. Besides, the UKF method without measurement noise adjustment reduce the overall computation time compared to the AUKF method. In order to increase the online estimation accuracy, a battery state-space model is built first using the proposed sparse learning machine. The new model for online SOC estimation is not reliant on the first principle laws governing the battery's electrochemical processes and can be adjusted for real-time battery operation.
• To strike the balance between the model accuracy and model complexity, a regularization term is added to the traditional sum of squared error cost function. Further, a weighting scheme is applied to adjust the contribution of each training sample based on its proximity to the next forecasting time interval. The closer to the next forecasting interval, the sample will be given a larger weight. Using the weighted regularization scheme, the accumulated measurement error can be reduced and the model accuracy for short-term prediction can therefore be enhanced in real-time applications. In detail, the online model is built using a narrow sliding window of data samples at each time interval, e.g. 10 samples at each time interval. The number of selected samples, i.g. 10 samples, is determined by trial-and-error through extensive experiments. It is a trade-off between the computational complexity of model training and resultant model accuracy. Among these data samples, not all have the same level of contributions in predicting the SOC at the next time interval. Intuitively, the closer the stronger the influence becomes.
• To improve the sparsity of the proposed model, a fast recursive method is applied to select the nonlinear feature based on the weighted LS-SVM formulation. Instead of using the kernel trick, the feature mapping functions is determined first. According to the principle of parsimony, the minimum feature space is then determined which uses the least square method to calculate the net contribution of a feature to the cost function. Based on this contribution, a projected feature is selected or removed by the learning machine.
• Finally, the differential evolution (DE) algorithm [33]- [35] is adopted to optimize the centers and widths of the RBF mapping function to improve the model accuracy. The remainder of this paper is organized as follows. Section II introduces the battery state-space model for SOC estimation. In Section III, a sparse learning machine based on the LS-SVM formulation is presented for online modelling. The SOC estimation approach is detailed in Section IV using UKF assisted with the proposed sparse learning machine. The experimental and results are presented in Section V. Finally, Section VI concludes this paper.

II. THE BATTERY MODEL
In order to estimate the SOC of Li-ion batteries in real-time using the UKF method, an adaptive online model in the statespace expression is built first. The flowchart of the battery SOC estimation is illustrated in Fig.1.
In Fig.1 are the past m+1 terminal current and voltage measurements. The model is adaptively adjusted using the DE algorithm based on the estimation error e = [e(k), · · · , e(k − m)] in order to produce a more accurate prediction output v(k + 1) at the time instant k + 1.
In addition, a state equation which describes the estimated states is dynamically updated over time. In this paper, the state equation is built based on the battery SOC dynamics. The complete model including a state equation for dynamic SOC forecasting and a measurement equation is given below.

A. STATE EQUATION
Battery SOC is defined as the ratio of the remaining charge respect to the fully capacity. Suppose the nominal capacity and the remaining capacity are denoted as Q n and Q t respectively. Then SOC t is given by [2] where i(τ ) is the charging/discharging current at time instant τ , and η = 1/3600. Eqn.(1) can be expressed in the following recursive form where SOC k and SOC k−1 denote the SOC at the time instant k and k − 1 respectively. t denotes the time interval of the sampling period, and i k represents the terminal current at time instant k.

B. MEASUREMENT EQUATION
In general, the battery terminal behaviour which is described as a highly nonlinear model can correlate the SOC and the terminal current to the terminal voltage. The sparse learning machine which is capable of capturing the nonlinear characteristics of a process is used to build the measurement equation that exhibits a nonlinear behaviour. Assuming the discharging current, the SOC and the terminal voltage at the time instant k are i k , SOC k , and V k respectively, the measurement equation [31] can be expressed as follows where u k = [i k , SOC k ] consists of the current i k , the state of charge SOC k at the time instant k respectively. The Gaussian function exp{− 1 2 (u k − uc j ) T −1 j (u k − uc j )} is a feature map to produce the j th feature, w m,j are the linear coefficients, and m is the final dimension of the feature space. The hyparameters uc j and j are selected training samples center and the variance, and b is the constant term in the model.

III. A SPARSE LEARNING MACHINE
Evidently, an accurate model needs to be built for the measurement equation as shown in section II. In order to enhance the model accuracy and to reduce the computation complexity, a sparse learning machine is presented in the following section. To achieve the sparse solution while considering the unbalanced data samples, a weighting scheme is adopted to adjust the contributions of samples to the sum of the squared errors (SSE) cost function [36]. In the following, a weighted LS-SVM model is presented first in part A, then a fast algorithm to build a sparse learning machine is given in part B. Then part C provides the details of parameter optimization in the sparse learning machine. Finally, the whole sparse learning machine construction procedure is summarized in part D.

A. THE WEIGHTED LS-SVM MODEL
Consider a nonlinear multiple-input single-output system where x ∈ m and y ∈ . Now suppose the above nonlinear system is approximated using a SVM model where x ∈ N ×k and y ∈ N ×1 denotes N pairs of samples are series of mapping functions projecting the input space to a highdimensional feature space.
The weighted least squares algorithm [37] used in the model identification can be formulated as follows where w 2 represents the regularization term for a trade-off between the magnitude of the coefficients and the estimation error, c is the regularization parameter.
2 (x i ), · · · , N (x i ), 1] represents N + 1-dimensional features induced by a sample. [λ i ], i = 1, · · · , N is defined as a sequence of random numbers to weigh the contribution of each sample.
The following cost function can be obtained using the Lagrangian method where α = [α 1 , · · · , α N ] T is the Lagrange multiplier vector. The Karush-Kuhn-Tucker (KKT) conditions for optimizing the above cost function are given below Thus the optimality problem can be formulated as where M = K + c · is a positive definite symmetric matrix and K = T is the matrix of the kernel function. A typical kernel function is radial basis function (RBF) given by K( is the weight vector related to the error spectrum. Substituting the solutionα of linear equations (9) into (8), the resultant LS-SVM model for (5) is given aŝ whereŷ is the estimation outputs.

B. A FAST ALGORITHM TO BUILD A SPARSE LEARNING MACHINE
Though the computation load in the training process is partly reduced by introducing the kernel function, to solve the KKT equations (9) is still computationally expensive. Thus a fast recursive method is presented to build a sparse learning machine applied to the LS-SVM formulation. Unlike the kernel method, the nonlinear features are constituted by the mapping functions [18], [31]. The basis mapping functions are first selected using the entire training samples for a highdimensional feature space. Gaussian Basis function has a good approximation performance for unknown nonlinear systems, so here the feature space with m dimension is written as where j = 1, · · · , m and m is the maximum dimension of the mapped high dimensional space F m . −1 j is the width (variance) matrix and s j is selected training samples center matrix.
Including the constant terms, the N + 1 candidate features in matrix notation ( in Eqn. (5) ) are given as Noting that (6) is a constrained optimization problem with one equality which is solved by the direct substitution method, the cost function can thus be redefined as and Then the partial derivative of the cost function with respect to the variable w is given by Setting the gradient (15) to zero, the minimal w can be computed asŵ According to the well-known matrix inversion lemma Therefore the linear model in the feature space is built bŷ Then the estimation error is given by Substituting (17) and (19) into (14), the minimal cost function can be expressed as Referring to (17) and (20), define a recursive matrix M According to the FRA method [32], the features are selected from the candidate feature matrix one by one based on their contributions to the cost function. Suppose k features were selected, the recursive matrix M is calculated by where k = 1, · · · , m and M 0 = c · . According to the definition in (22), the matrix M k has the following properties: where k = 0, · · · , m − 1 and M −1 The cost function and the w estimation with k features becomeŵ Now, the net contribution of the (k +1) th feature to the cost function can be given where k = 0, · · · , m − 1.
In order to simplify the computation of the net contribution and the linear parameter, two new intermediate matrices where k = 0, · · · , m − 1 and i = 1, · · · , N . Note that a k+1,i can be iteratively calculated as follows:

VOLUME 8, 2020
Similarly, where i and k reflect the position of the features in the matrix described by (12). Particularly, the bottom triangular elements in A with k > i can be computed as While for B, by using (24), b k+1 can be computed Then, substituting the definition of a k+1,i and b k+1 into (27), the net contribution of a new feature to the cost function can be calculated as By computing the net contribution of each candidate feature to the cost function using equation (33), the best feature can be selected one by one.
After m features are selected, the estimated linear parameters w is given bŷ With (28), the estimate of each elementŵ m,i , i = 1, · · · , m is computed aŝ

C. MODEL PARAMETERS
In the aforementioned learning machine framework, a number of parameters including the regularization parameter, the weights for the training errors, as well as the parameters in the mapping function are introduced. Though the introduced regularization parameter has been discussed in [31] and [38], there is still no effective way to optimize the parameter.
Here, the regularization parameter is dynamically adjusted in the experiments. On the other hand, a sparse solution is achieved by selecting the mapping function while the sample information is retained. Further, based on [39], a weighting scheme is introduced to the training errors, where the samples closer to the next prediction time are given larger weights. That is, for 10 samples used to train model, 10 random weight values are generated within the range of (0,10). These weight values are sorted in the ascending order, the smallest is ranked as the first, and the largest is ranked the last. Then, to predict the voltage at time instant k + 1, the sample at time instant k is given the largest weight, while the sample at k − 9 is given the smallest weight. Furthermore, the centers in the mapping functions which are directly selected from the training samples may not be the optimal ones. Thus the centers and the widths of the mapping functions are optimized using a computationally effective method such as the differential evolution (DE) algorithm in this paper. Defining a nonlinear vector X = [x 1 , x 2 ] T to represent the optimized centers and widths of the mapping functions where x i ∈ [x i,min , x i,max ], i = 1, 2, the procedures of the DE algorithm used to optimize the parameters are given as follows.
Step 1 Initialization. The evolutionary parameters such as the upper/lower bounds [X min , X max ], the maximum number of generations T , the mutation parameter F ∈ [0, 2], the population size N and the crossover factors CR ∈ [0, 1] are initialized firstly. Then real-valued vectors are generated as the initial population. Hence, the i th vector is expressed as Step 2 Evaluation. The net contribution of each individual solution is computed using (33) Step 3 Mutation. The i th mutated vector V i,t at the t th ( t = 0, · · · , T ) generation is produced by three randomly selected individuals at the t th ( t = 0, · · · , T ) generation. Suppose 3 integers (r 1 , r 2 , r 3 ∈ 1, · · · , N and r 1 = r 2 = r 3 = i) are selected randomly, the mutated vector is given as Step 4 Crossover. A portion u j i,t of parameters in the existing target vector U i,t at the t th ( t = 0, · · · , T ) generation is replaced by where rand j ∈ [0, 1] and randn i ∈ 1, 2, v j i,t is an element of V i,t .
Step 5 Selection. Comparing the cost values of X i,t and U i,t , the better one will be selected into the next generation Step 6 Iteration. Steps 2-6 are repeated until the evolution has reached T generations.

D. THE SPARSE LEARNING MACHINE CONSTRUCTION PROCEDURE AND COMPUTATIONAL COMPLEXITY ANALYSIS
Now given all the above preminaries, the whole procedure to produce the sparse learning machine is summarized as follows.
Step 1. Initialization: a) Select suitable values for the regulation parameters c and the weight matrix of errors based on experiments; b) Set the max dimension n of the high-dimension feature space with the initial dimension k = 0, the size (ss) of the population, the initial population ([s j ; −1 j ], j = 1, · · · , ss) for initial candidate mapping functions ( 0 = [Φ 1 , · · · , Φ ss ]) using the training samples; c) Set the parameters of the DE algorithm.
Step 2. Forward learning machine construction: a) Set k = k +1, at the k th step, 1 ≤ k n step, calculate a i,j (i = 1, · · · , k) and b j (j = 1, · · · , M ) using (29), (30) and (32). Then compute the net contributions of all candidate solutions to the cost function using (33) generated by the initial mapping functions. b) Optimize the mapping function using the DE algorithm and update the net contributions. c) Select the feature with the maximum net contribution as the k th column in the feature matrix. d) If the desired number of dimension (n) is reached, or MSE satisfies the accuracy, go to Step 3. Otherwise, go back to 2(a).
It is clear that solving the weighted LS-SVM is equivalent to computing the inverse of a full N × N matrix in (9), with the complexity O(N 3 ). Here using the above proposed forward selection assisted method to construct the sparse learning machine, the computational complexity is reduced to O(n · N 2 ), where n is the number of selected features.

IV. BATTERY SOC ESTIMATION USING UKF METHOD
From section II, the real-time battery SOC estimation procedure has two parts. Firstly, a sparse learning machine model is built using the proposed algorithm in section III to capture the nonlinear behaviours of batteries. Then substituting the measurement model into the batteries state-space model, the batteries SOC can be estimated using the UKF method. From the (2) and (3), the state-space model for UKF is formulated as where s k and v k represent the process and the measurement noises respectively. f (·) is the state equation which indicates the relationship of the state variable (SOC) and control variable (i). h(·) is the measurement equation identified by the proposed model. Then the unscented Kalman Filter (UKF) is applied which is shown in Fig.1. The predicted SOC (soc(k + 1)) at the time instant k + 1 is calculated by the state equation with K 1 = η · t/Q n . Furthermore,soc(k + 1) is updated aŝ soc(k + 1) using the proportion function with gain K . The details of the UKF method is described as follows Step 1 Initialization. Calculate the initial states and the covariance matrix aŝ Step 2 Unscented Transformation. 1) In order to simplify the functions f (·) and h(·), the state matrix is extended aŝ where Q and R is the covariance of the process noise and the measurement noise respectively.ŜOC 2) Compute the sigma points by whereŜOC a k−1 and P a k−1 are the states and the covariance matrix at the time instant k −1 respectively. ( (L + λ)P a k−1 ) i stands for the i th row of the square-rooting matrix. L is the number of dimensions after the state-space is extended as formulated in (43) and (44), and L = 3 in this paper. λ = α 2 (L + t) − L in which t = 0 represents the distribution of the sigma samples, while α ∈ [10 −2 , 1] impacts the nonlinear characteristic of the measurements.
3) Compute the weights (c (m) ) for the mean and (c (c) ) for the covariance as follows where β = [0, 2] is determined by the distribution of the states.
Step 3 Prediction. The predicted state and the corresponding state covariance are updated as while the prior estimations of the measurements are obtained as Step 4 Correction (Estimation). Based on the prediction of the voltage measurement, the state is modified as follows

V. EXPERIMENTAL RESULTS
To build the battery model using the proposed algorithm, a series of experiments were conducted on a 5-Ah LiFePo4 battery using a multi-function Arbin BT2000 battery test device and the test data were recorded by a host computer. The battery was placed in a temperature chamber with constant temperature of 25. The voltage and current were recorded every 1s until the measurements falls within 0.02% of the full scale range (FSR) at low power applications and 0.05% of the FSR at high power applications. The Federal Urban Drive Schedule (FUDS) was tested on the batteries as shown in [1]. Firstly, a normalization process is applied to the acquired data because the magnitudes for the current, SOC and voltage are quite different. Here, the max-min normalization method defined below is adopted where U is the normalized matrix ranges from U min to U max , and uu is the actual matrix. Accordingly, the uu min and uu max consist of the minimum value and the maximum value of each variable respectively. The operators • and denote the Hadamard product operator and the inverse operator of Hadamard product respectively.
Secondly, a series of tests were conducted to choose suitable regularization parameter and the weights. As indicated earlier, the weights for the errors are randomly generated and the difference between two consecutive weights is set around 0.5 and the maximum weights is set to 10. The maximal feature dimension is 4. Then for the DE algorithm the mutation parameter is set as F 1 = 0.08 for optimizing the centres and F 2 = 0.8 for the widths. The crossover factors CR = 0.2 and CR = 0.6 are applied for the centers and the widths respectively. The population size n = 8 and the maximum generation is set to l = 20. Considering that the battery model varies with time, the measurement equation is retrained when every 10 new training samples are collected. The training and validation performances using the different weights are given in Table 1.
In Table 1, the RMSE (root-mean-square error) is chosen as the model performance indicator. The test results are illustrated in Fig. 2. It is clear that the model is more accurate using the ascending weights which the absolute errors are almost within ±0.02. Especially for non-smooth ramp data points, the prediction results are more accurate than the cases when the same weights or the descending weights are applied to the errors.   Then, the proposed model is compared with the conventional LS-SVM model and the SVM model. The LS-SVM method is detailed in [40] and the RBF kernel function is tuned by both the k-fold cross validation (LSSVM in the following figures and tables) and the DE method (DE-LSSVM in the following figures and tables). The SVM model is also built for the comparison purpose where the parameters are optimized by both the k-fold cross validation (SVM in the following figures and tables) and the DE method (DE-SVM in the following figures and tables) [41], [42]. In order to verify the proposed method, two numbers of mapping functions  including 10 and 4 are tested in this paper which are named as 'S-DE-WLM-N10' and 'S-DE-WLM-N4' respectively. The training and validation computation time and the performance of the three methods are listed in Table 2 and Table 3.
The maximum computation time and the mean computation time shown in Table 2 are calculated on the whole cycle simulations using 23170 samples. The maximum time for all algorithms are less than the sampling time (1 second). However, the average computation time using the proposed new modelling approach is significantly less than the other two methods. This is due to the introduction of the fast recursive algorithm for constructing a sparse features space thus reducing the algorithm complexity. The root mean square error (RMSE) and the maximum absolute error (MAX) in Table 3 reveals that the proposed method can achieve better accuracy than the other method with much less time.
The training results and the validation results are detail illustrated in Fig 4 and    The reason is that the model sparseness is lost using the LS-SVM method, leading to poor generalization performance. Though the DE method is adopted to improve this problem the computation time is still high. Accordingly, the S-DE-WLM improves the generalization capability while reduces the computational complexity.
Once the measurement equation developed by the proposed method is combined with the state equation, the UKF algorithm is then applied to estimate SOC. In the initialization process, t is set to zero given in section IV, while the measurement noise covariance, α and β are set as 1e−5, 5e−1, 1 and 0 respectively. The estimated SOC which is illustrated in Fig 6 tracks well with its reference SOC which are calculated by the ampere-hour method ignoring the measurement noise in the lab environment based on the known initial SOC. Considering that the initial SOC in the actual working condition is unknown, the initial SOC is set to 0.7. It is clearly shown that the SOC estimation can quickly follow the actual SOC values. Once the SOC estimation approaches to the reference SOC, the RMSE can reach 2.4882e−04. The error of the SOC estimation is between −0.05% and +0.2% as shown in Fig 6, outperforming the results reported in the literature [2] which is between −0.79% and 0.94%. While in literature [43], the error is within ±15% using the Ampere hour counting method when it is applied in a practical environment. While the EKF achieves 5% error. Thus, the SOC estimation used the proposed method in this paper is more accurate.

VI. CONCLUSION
A novel sparse learning machine based on the LS-SVM formulation has been proposed for real-time SOC estimation in this paper. A mapping function instead of the kernel function is first applied to produce the nonlinear features space. In order to construct sparse learning machine, a fast selection method is used to select the mapping function, while the nonlinear parameters in the mapping functions are optimized by the DE algorithm. The proposed method is used to develop the SOC estimation model based on the FUDS test data sets. The experimental results confirm that the proposed method can build a more accurate battery model with excellent generalization performance in comparison with two other methods, namely SVM and LS-SVM models. Note that a small data set is used to train the model, and the proposed method is suitable for online implementations.
The obtained battery model is then used as the measurement equation, a highly accurate SOC estimation is achieved by using the UKF algorithm. The estimated SOC values are consistent with the referenced SOC with a 10 −7 mean square error on the FUDS test data. It is demonstrated that the UKF method is more accurate than other KF variants on SOC estimations.