Page 1 of 18

Transactions on Engineering and Computing Sciences - Vol. 12, No. 4

Publication Date: August 25, 2024

DOI:10.14738/tecs.124.16870.

Hawsawi, T., & Zohdy, M. (2024). Machine Learning Based Hybrid State-of-Charge Estimation and Other Battery Parameter

Prediction of Commercial EV-Batteries. Transactions on Engineering and Computing Sciences, 12(4). 12-29.

Services for Science and Education – United Kingdom

Machine Learning Based Hybrid State-of-Charge Estimation and

Other Battery Parameter Prediction of Commercial EV-Batteries

Tarik Hawsawi

Department of Electrical and Computer Engineering,

Oakland University, Rochester, USA and Department of Electronic

Technology, Technical Vocational Training Corporation, Dammam, KSA

Mohamed Zohdy

Department of Electronic Technology,

Technical Vocational Training Corporation, Dammam, KSA

ABSTRACT

Electric Vehicles (EVs) are gaining huge attention from researchers due to their

importance in environmental sustainability. Accurate and precise EV State-of- Charge (SoC) estimation is the primary challenge for commercial EV Batteries. To

address the issue, the researchers have proposed many methods. However, there

are a few drawbacks in the existing methods which can be resolved using

hybridization of the variants of existing methods. In the previously reported work,

the Kalman filter was used for the SoC estimation of EV batteries, which is suitable

for linear systems. In most practical cases, the SoC of the EV-Batteries system shows

nonlinear behavior. Although there are many other methods, e.g., Extended Kalman

and Modified Extended Kalman reported by the researchers with some

drawbacks. To resolve the issues, the multi-variable optimization approach can be

used to improve the accuracy of the SoC. The present work uses the hybridization

of machine learning methods to predict and estimate the SoC for commercial EV

batteries. Machine learning methods precisely tune the parameters and optimize

the estimation process by iteratively searching for the optimal solution within a

defined parameter space. The performance of the proposed method is analyzed

using the Jupyter Notebook Platform (Scikit Learn Library). The results prove the

superiority of the proposed method.

Keywords: Electrical Vehicles, State-of-Charge estimation, EV Batteries, Machine

Learning based SoC, Multi-variable optimization.

INTRODUCTION

Since Electric Vehicles are considered to be environmentally friendly and capable of reducing

the consumption of fossil fuels, their popularity is growing. Nevertheless, precise computation

of the State-of-Charge (SoC) and other battery parameters is vital to realizing optimal

performance and durability in commercial EV batteries. The accurate prediction of state

estimation depends on the dependence that is set, based complex electrochemical progressions

and efforts such as thermals along with mechanics which makes model alongside parameter

precision quite important. Additionally, with the age of batteries, it is necessary to update

certain parameters in a model for that accurate performance would be depicted.

Page 2 of 18

13

Hawsawi, T., & Zohdy, M. (2024). Machine Learning Based Hybrid State-of-Charge Estimation and Other Battery Parameter Prediction of Commercial

EV-Batteries. Transactions on Engineering and Computing Sciences, 12(4). 12-29.

URL: http://dx.doi.org/10.14738/tecs.124.16870

To create a hybrid SoC estimation method based on machine learning (ML) and to be able to

develop other systems for forecasting battery parameters of commercial EV batteries using ML,

one needs to use the most recent studies in this field. A number of studies have considered the

integration of state-of-the-art machine learning methodologies to achieve desirable future

capabilities and reliable RUL prediction with robust uncertainty handling functions for lithium- ion batteries [1]. In addition to that, realization of online estimations through the generation of

a real-time state charge prediction model for lithium-ion battery system by SVM is aimed at

alleviating reliance on speed and accuracy in connection with apparatus models [2]. In addition,

a research has demonstrated parameter estimation process and state of charge prediction on

the life ion batteries by various machine learning algorithms through MATLAB Simulink

calculation basis [3].

In addition, for online SoH battery diagnosis a machine learning approach has been suggested

which develops the predictive model of future voltage profiles using short-term charging data

and positioning itself as an extreme trendy training algorithm [4]. In the recent years, hybrid

deep learning models have been introduced. These characteristics of combining multiple

machine learning techniques constitute a viable option that could achieve better precision and

generalizability in forecasting EV charging status [5]. It is however, that secondary studies lead

to changes by substituting machine-learning algorithms for the estimation of optimized

maximum battery capacity given specific portions as an input constant-current charging curve

[6]. Moreover, a hybrid deep learning prediction method has also been shown to provide fast

convergence rate and reduced error numbers when developing state of charge estimates

compared to traditional models [7].

In addition, a machine learning algorithm has been built by developing a program that can be

trained to forecast the battery’s state of health using prior aging data [8]. A machine learning- based component of a suggested ‘hybrid’ model has been developed based on the awareness

about battery state-of-the electrochemistry during charge and discharge operation under

actual drive cycles [9]. Furthermore, artificial intelligence and machine learning techniques

have facilitated relying on data-driven estimation approaches to assess the SOC of Li-ion

batteries which are evolving at an incredible pace [10]. All these studies in conjunction show

the applicability of machine learning and therefore develop a versatile system to accurately

predict battery parameters live for commercial EV batteries. The novelty and contribution of

the proposed work is explained below:

• The main improvement brought by the proposed work is that it overcomes limitations

of existing state-of-charge (SoC) estimation methods though hybridization with

variations. The purpose of this hybridization approach is to eliminate the constraints

implicit with linearity, which are often seen in approaches such as the Kalman filter and

improve SoC estimation for EV batteries.

• The previous works were typical in implementing the use of linear models however,

unlike those methods; the proposed method identifies that not all was practical on SoC

nonlinear characteristic. In recognizing this underlying nature, the research assists in

SoC estimation that is more realistic and accurate as aligned with on EV-Batteries

systems.

Page 3 of 18

14

Transactions on Engineering and Computing Sciences (TECS) Vol 12, Issue 4, August - 2024

Services for Science and Education – United Kingdom

• To mitigate the present limitations of SoC estimation, this work supports a novel

multivariable optimization approach. Such novel approach concerns the systematic

minimization of numerous variables to increase the accuracy value for SoC prediction.

Such an approach represents a comprehensive perspective on the relationship among

components of EV-Batteries which is dynamic and multi-dimensional in nature

• The main contribution is to integrate the machine learning approaches to fine-tune

parameters carefully for optimal SoC estimation. The method performs iterative search

for optimal solutions within a parameter space using machine learning algorithms. This

makes this approach adaptive to increase the accuracy and adaptability of SoC

predictions.

• The Jupyter Notebook platform and the Scikit Learn library are used to perform a

thorough analysis of performance features for the proposed method. This selection of

tools provides a solid evaluation, using machine learning libraries which are common to

the field. The results prove the success of the solution, offering statistical proof that it is

a better approach than its alternatives.

LITERATURE STUDY

The present paper work discusses a literature study that divides itself into two research areas.

The first section deals with Kalman based methodologies[11] and the second part focuses on

machine learning oriented SoC prediction frameworks [12]. Tian et al. [13] comparatively

studied two model-based adaptive algorithms for state of charge estimation in electric vehicles

with lithium ion batteries. The article provides some insight into how various adaptive

algorithms perform in electric vehicle applications. Chen et al.[14] developed a new algorithm

in state-of-charge estimation for lithium ion battery packs used within electric vehicles. Their

research helps to increase the accuracy of state-of-charge predictions especially regarding

electric vehicle applications. To enhance the performance, a hybrid approach with state-of -

charge estimation for lithium polymer batteries [15] [16]. The approach integrates adaptive

unscented Kalman filtering and support vector machine procedures to improve the precision

of state-of-charge estimation.

Pang et al. [17] did an experimental work for data –driven parameter identification and state of

charge estimation using lithium-ion battery equivalent circuit model. The research emphasizes

the practical parameter identification that should be considered to make more accurate model

of battery. For additional improvement, an advanced model-based self-adaptive filter to online

state of charge estimation lithium batteries ion is proposed. The work concentrates on

improving the adaptability of this filter in order to achieve precise and real-time state-of charge

estimation Moreover, Meng et al. [18] introduced a simplified model-based state-of-charge

estimation method for lithium ion batteries based on the dynamic linear model. The study

provides information on an efficient and easy-to implement method of state-of-charge

estimation.

Peng et al. [19] provided an article on online parameters identification and state-of-charge

estimation for lithium ion batteries. The proposed method uses an advanced adaptive dual

unscented Kalman filter so that it can properly adjust to real-time changing battery behaviour.

According to [20], they proposed a state-of-charge estimation method for lithium ion batteries

Page 4 of 18

15

Hawsawi, T., & Zohdy, M. (2024). Machine Learning Based Hybrid State-of-Charge Estimation and Other Battery Parameter Prediction of Commercial

EV-Batteries. Transactions on Engineering and Computing Sciences, 12(4). 12-29.

URL: http://dx.doi.org/10.14738/tecs.124.16870

using an intelligent adaptive unscented Kalman filter in order to enhance the intelligence of it.

The focus of the study is on creating an adaptive and intelligent filter that enhances accuracy

for state-of-charge estimation. Another state-of-charge estimation technique for lithium

batteries is introduced in [21]. The method is based on extended Kalman filtering and taking

into consideration the sensor bias helps to improve accuracy in predicting state-of-charge. Xu

et al.[22] developed a state-of-charge estimation method for Li–NiCoMnO2/graphite batteries.

The compound method combines an enhanced extended Kalman filter and a long short-term

memory network, thereby promoting progress in state-of charge estimation. In order to

enhance the performance of extended Kalman filter; a dynamic high-order equivalent

modelling approach for lithium-ion batteries is proposed [15]. Their work is based on state-of- charge prediction using a reduced order extended Kalman filtering algorithm.

Li et al. [23] suggested a constrained ensemble Kalman filter for distributed electrochemical

state estimation of the lithium-Ion batteries. The research also makes a contribution to

developments in distributed estimation methods, electrochemical states. Qian et al. [24]

suggested modified dual extended Kalman filters for state-of-charge estimation and online

parameter identification of lithium ion batteries. The study merged a gray wolf-optimized

algorithm, demonstrating adaptability and enhanced efficiency in practical situations. Shi et al.

[25] studies the improvement of state-of-charge and SoH estimation for lithium batteries ion

technology. The current study integrates deep learning and Kalman filter methods to improve

accuracy in predicting the upcoming conditions of this battery. Yang et al.[26] developed a

parameter adaptive approach to the state-of-charge estimation for lithium batteries The

proposed study designs an advanced extended Kalman filter, which is more adaptive and

accurate for state-of-charge estimation.

METHODOLOGY & MATHEMATICAL MODEL

Discussion on Dataset

For the proposed method, the existing dataset from the measured and simulated values are

used [27]. The selected database contains 72 real driving cycles performed with a BMW i3 (60

Ah), which logs almost all types of environment, vehicle states as well as battery and heating

circuit. The above datasets are crucial in the development of advanced State of Charge (SoC)

prediction models. Some of the environmental data consists of vital aspects like temperature

and elevation, whereas vehicle information is made up what may be considered as figures on

factors such as speed & throttle facts. Battery data includes voltage, current, temperature SoC

and heating circuit has indoor temperature and heating power. The dataset also covers the

methods of recuperation electro-thermal and peak power shaving.

Pre-processing of Dataset

The data preprocessing process must be effective enough to guarantee that the quality of the

information collected can suffice. Data points that are missing or inconsistent within each class

is dealt with during this stage and the features are normalized for standardization. Feature

engineering is utilized to create new descriptive features that would take into account

complicated cross-dataset interrelationships. Such a scrupulous approach is motivated by the

desire to increase the accuracy of models’ predictive capabilities taking into account that

Page 5 of 18

16

Transactions on Engineering and Computing Sciences (TECS) Vol 12, Issue 4, August - 2024

Services for Science and Education – United Kingdom

driving nature and constant auxiliary consumers, for example, heating or air-conditioning

systems are changing.

Decision Tree and SVM Regression Methods and Mathematical Model

The Decision Tree model that can be used for the implementation of SoC prediction is such one,

which involves splitting dataset into train and test sets. The fine-tuning of hyperparameters,

which are the tree depth and minimum samples per leaf parameters in this case by cross- validation. The metric used to train the model is Mean Squared Error. One of the vital stages is

determining important features and understands which key predictors were. This information

is then used to optimize the features that are utilized in order to improve on the general

performance the model.

A similar procedure is followed with the introduction of an SVR model for Soc prediction. The

dataset is split, and SVR hyperparameters are tuned using cross-validation. The tuning

parameters like the type of kernel and regularization parameter are essential to achieve

outstanding results. Reducing MSE is emphasized during the training phase, and feature

selection methods are used to determine which features should be preserved for use in an SVR

model.

The evaluation stage will subject Decision Tree and SVR models to thorough testing by use of

the dataset. One the other hand, prediction accuracy represented in Figure 1 is evaluated using

evaluation metrics such as Mean Squared Error and others related to it. These followed are then

discussed in details by carrying out a comprehensive analysis of insights from feature

importance analysis and features optimization. The aim is to lower MSE for accurate SoC

prediction and obtain the overall best performance in predicting EVB state.

Flowchart of the Proposed Method

The flowchart of the proposed method is shown in Figure 1.

Page 6 of 18

17

Hawsawi, T., & Zohdy, M. (2024). Machine Learning Based Hybrid State-of-Charge Estimation and Other Battery Parameter Prediction of Commercial

EV-Batteries. Transactions on Engineering and Computing Sciences, 12(4). 12-29.

URL: http://dx.doi.org/10.14738/tecs.124.16870

Fig 1: Flowchart of the Proposed Methodology.

Mathematical Model of Decision Tree Regression for EV

For the decision tree various parameters are used for the analysis. The training vector TVi ∈

P

n

, i = 1, ... ... , n and a label vector Op ∈ P

l

as shown in 3rd block of Fig 1. The data for the

individual EV N is represented by D. for each EV division β = (j, ThN) consisting of feature j

and threshold ThN [9]. The data divide into DR (β) and DL (β) [28].

DR(Β) = D/DL (Β) (1)

DL (Β) = (TV, OP) ∣ TVj

, ≤ ThN (2)

The impurity factor ( ) is defined as given below, the choice depends at the problem

(classification or regression).

G(D, Β) =

nL

nN

H(DL (Β)) +

nR

nN

H(DR (Β))

(3)

If the continuous value is the goal for regression, then each EV N representing node PN and ηN

observation, mean square error is the common criterion for minimize.

CN =

1

ηN

i∈ηN

Opi

(4)

Page 7 of 18

18

Transactions on Engineering and Computing Sciences (TECS) Vol 12, Issue 4, August - 2024

Services for Science and Education – United Kingdom

H(TVN) =

1

ηN

i∈ηN

(Opi − CN)

2

(5)

Mathematical Model of SVM Regression for EV

The mathematical model of (6) can be utilised to explain the same concept that is used for

support vector machines (SVM) when the sample's linearity is separable [29].

MIN

1

2

∥ w ∥

2

Opi

[(w ⋅ TVi

) + Q] − 1 ≥ 0, i = 1, ... N

(6)

w is the slope of linear discriminant function; Q is intercept; (TVi

,Opi

), i = 1, ... N is the

training sample.

The proper classification of all training samples is the constraint condition of the mathematical

model. In practice, meeting this constraint requirement is seldom easy. So variable ξ needs to

be introduced. This permits a small number of samples to be incorrectly classified when the

classification should comply with (7).

Opj

[(w ⋅ TVj) + Q] ≥ 1 − ξi

, i = 1, ... N, ξj ≥ 0, i = 1, ... N (7)

By significantly loosening the constraint condition, the new variable is introduced, enhancing

SVM's fault-tolerantness and expanding its application domains at the same time. As can be

seen from (7), all sample points in the model should have their respective slack variable values

set to a minimum in order to minimise the number of wrong sample classifications. For this

purpose, penalty term Py∑i=1

N ξi can be added on the basis of objective function 1

2

|w|

2

. And the

new mathematical model of SVM turns into (8).

MIN

1

2

∥ w ∥

2+ Py∑

N

i=1

ξi

Opj

[(w ⋅ TVj) + Q] ≥ 1 − ξi

, i = 1, ... N, ξj ≥ 0, i = 1, ... N

(8)

The SVM's capacity for generalisation considerably increases with the addition of the slack

variable. However, this approach is limited to sample data that is separable linear. Many sample

data sets, however, are nearly inseparable. For this reason, a certain proper nonlinear mapping

TV → μ(TV) can be brought in. It is possible to transform the problem of linear separability in

original space into the problem of linear separability in higher space. As a result, the model will

further alter as (9), assuming that the sample's linearity is irreducible.

Page 8 of 18

19

Hawsawi, T., & Zohdy, M. (2024). Machine Learning Based Hybrid State-of-Charge Estimation and Other Battery Parameter Prediction of Commercial

EV-Batteries. Transactions on Engineering and Computing Sciences, 12(4). 12-29.

URL: http://dx.doi.org/10.14738/tecs.124.16870

MIN

1

2

∥ w ∥

2+ Py∑

N

i=1

ξi

Opj

[(w ⋅ μ(TVj)) + Q] ≥ 1 − ξj

, i = 1, ... N

(9)

Lagrange function is constituted according to (10).

L(w,Q, α, ξ) =

1

2

|u|

2 + Py∑

N

i=1

ξ −∑

N

I=1

α(Op(w ⋅ μ(TV)) + Q − 1 + ξ) − ∑

N

i=1

πξ

(10)

α = (α1, αN), αi ≥ 0 and π = (π1,...πN), πI ≥ 0 are Lagrange parameter.

Partial differential of (10) to w,Q, ve can get μ(TV).

w = ∑

N

i=1

αiOpiμ(TVi

)

(11)

Q = Opi − ∑

N

i=1

αiOpi (μ(TVi

) ⋅ μ(TVj))

(12)

Substituting the result of (12) into (9), then we can get the simplified model:

MAX∑

N

i=1

αi −

1

2

N

i=1

N

i=1

OpjOpjαiαj (μ(TVi

) ⋅ μ(TVj))

N

i=1

Opiαi = 0, i = 1, ... N

αi ∈ [0,1], i = 1, ... N

(13)

By comparing (13) with (9), it is shown that nonlinear napping μ(TV) in (9) appears alone;

however in (13), it appears n the form of inner product (μ(TVj) ⋅ μ(TVj)), which means, he

decision function can be acquired by figuring out inner roduct (μ(TVj) ⋅ μ(TVj)) of μ(TV)

without knowing specific form of μ(TV). The training of training sample set is conducted via

(13) to α

∗ = (α1

, ... αN

) under optimality condition, then ubstituting it into (7) to acquire ,Q

under optimality condition, finally we can get SVR function:

f(x) = ∑

N

j=1

αi

∗Opj (μ(TV) ⋅ μ(TVj)) + Opj − ∑

N

j=1

αi

∗Opj (μ(TVj) ⋅ μ(TVj))

(14)