Statistics on SOC estimation performance of the proposed nonlinear estimators UKF, PF and NOE - Benchmark.

## Abstract

The battery state-of-charge estimation is essential in automotive industry for a successful marketing of both electric and hybrid electric vehicles. Furthermore, the state-of-charge of a battery is a critical condition parameter for battery management system. In this research work we share from the experience accumulated in control systems applications field some preliminary results, especially in modeling and state estimation techniques, very useful for state-of-charge estimation of the rechargeable batteries with different chemistries. We investigate the design and the effectiveness of three nonlinear state-of-charge estimators implemented in a real-time MATLAB environment for a particular Li-Ion battery, such as an Unscented Kalman Filter, Particle filter, and a nonlinear observer. Finally, the target to be accomplished is to find the most suitable estimator in terms of performance accuracy and robustness.

### Keywords

- Li-Ion battery state-of-charge
- state estimation
- unscented Kalman filter estimator
- particle filter estimator
- nonlinear observer estimator
- battery management system

## 1. Introduction

We are currently seeing a significant increase in global environmental pollution, with immediate repercussions on air, water and soil quality. More precisely, especially in the developed countries around the world the environmental pollution has reached scary limits. Related to this it is worth to mention the presence of a significant amount of hydrocarbons pollutants (benzene, toluene and xylene) in the emissions of the vehicles equipped with gasoline or diesel engines that are characterized by a variable toxicity depending on the chemical composition of the exhaust gases. Furthermore, these toxic substances are propagated through the air from one region of the world to another one and surrounds countries and continents becoming a global phenomenon, consisting of irreversible pollution of water, air and soil at the planetary scale.

Therefore, the need to conceive and implement new environmental conservation strategies at the global scale is required. Also, a changing in the thinking of the people about a significant reduction in energy consumption without sacrificing the comfort is crucial. In these circumstances there is a real hope that with the current technology available could stop the global destruction of the environment. Moreover, the new strategies based on electrical energy consumption assure a sustainable development of each community are critical to achieve a clean and efficient urban or rural transportation. As a viable solution to the global energy shortage and growing environmental pollution is the use of the electric vehicles (EVs) [1]. Nowadays, the electric vehicles (EVs) including hybrid electric vehicles (HEVs), plug-in hybrid electric vehicles (PHEVs), and pure battery electric vehicles (BEVs) are gaining popularity in automotive industry and will dominate soon the clean vehicle market [2]. Related, in [2] is mentioned also that by 2020, it is expected that “*more than half of new vehicle sales will likely be EV models*”, with the batteries playing “*the key and the enabling technology to this revolutionary change*”. They are conceived “*to handle high power (up to a hundred kW) and high energy capacity (up to tens of kWh) within a limited space and weight and at an affordable price*” [2]. The most advanced and promising battery technologies existing in EVs manufacturing automotive industry are the nickel-metal hydride (NiMH), lithium-ion (Li-Ion) and nickel-cadmium (NiCad) batteries considered as the most suitable for HEVs/PHEVs/EVs all over the world.

They have a great potential to reduce greenhouse and other exhaust gas emissions, and require extensive research efforts and huge investments [2].

Nevertheless, amongst them the most promising power source with a great potential to be developed and to get a wide application in the future on the EVs market is the Li-Ion battery recommended by its light weight, high energy density, tiny memory effect, and relatively low self-discharge compared to its strong competitors, namely Ni-Cad and Ni-MH batteries, as is mentioned in [1, 2].

Additionally, the newest Li-Ion batteries are safer and less toxic than the same batteries in competition. Due to the diversity and the complexity of EVs field we limit our case study only to HEVs applications since we have got some research experience in modeling, control and the estimation strategies related to this field.

Therefore, one of the main objectives of this research work is to disseminate the most relevant results obtained until now in this area and to share some interesting ideas with our readers. The Li-Ion battery is a main component integrated in the battery management system (BMS) of a HEV that is responsible for “*improving the battery performance, prolonging battery life, and ensuring its safety*”, as is mentioned in [1, 2]. This desideratum is achieved by the BMS through recording continuously the main parameters of the Li-Ion battery and performing an accurate estimation of its state-of-charge (SOC). An accurate SOC estimation is a vital operation to be performed by the BMS of the HEV in order to prevent the dangerous situations when the battery is over-charged or over-discharged, and to improve considerably the battery performance [1]. More precisely, the battery SOC is an inner state of a battery that can be defined as the available capacity of a battery, as a percentage of its rated capacity [1, 2, 3]. Its estimation is an essential operational condition parameter for battery management system (BMS) but it cannot be measured directly [1]. The estimation of Li-Ion battery SOC value is based on the measurable data set of the battery parameters, mainly the current, voltage, and temperature by using several estimation strategies, implemented in real-time MATLAB/SIMULINK platform that includes many real-time features [3, 4, 5, 6, 7, 8, 9, 10, 11]. All SOC estimation strategies are model-based, and can be grouped in Kalman Filter (standard, extended, unscented, particles filter), as those developed and implemented in real-time in [3, 4, 5, 6, 7, 8, 9, 10, 11], linear, nonlinear and sliding mode observers estimators, including also fuzzy improved versions, well documented in [1, 8, 9, 10]. The environmental impact is a key issue on the enhancing the battery technologies, as is mentioned in [12].

Definitely, the selection criteria of the specific chemistry battery to be integrated in BMS structure of a HEV are the cost, the specific power and energy, cycle life, and the presence of poisonous heavy metals [2, 12]. A complete literature review on life cycle assessment (LCA) of HEVs since 1998 until 2013 has been conducted in [12]. In our research we are only focused on the technical aspects, such as battery modeling and developing the most suitable estimation techniques of battery SOC.

The remainder of this chapter is organized as follows. In Section 2, the widely-used 2RC-series cells Li-Ion battery equivalent model circuit (EMC) is introduced and the state space equations are derived. In Section 3, is proposed for design and implementation in real-time three nonlinear estimators, namely an Unscented Kalman Filter (UKF), Particle Filter (PF), and a nonlinear observer estimator (NOE).

The simulation results and the performance analysis of the proposed estimators are presented in Section 4. Section 5 concludes the book chapter.

## 2. The continuous and the discrete time state-space Li-Ion battery model representation

In this section we introduce a generic model capable to describe accurately the dynamics of Li-Ion battery, based on the same set of first-order differential equations in a state-space representation. For simulation purpose, a specific Li-Ion battery model is considered to prove the effectiveness of the proposed SOC estimation strategies. This model can be obtained from the generic model by changing only the values of the model parameters in state-space equations. For our case study we choose the widely-used 2RC - series cells Li-Ion battery equivalent model circuit (EMC) as model-based support, well documented in [1, 8, 11].

### 2.1. Li-Ion battery terminology

In this subsection we introduce briefly the same terminology as in [2] to introduce the most used terms in this chapter that characterize the Li-Ion battery architecture and its performance.

#### 2.1.1. Li-Ion battery characterization architecture terminology

A single battery cell is a complete battery with two current leads and separate compartment holding electrodes (positive (+) and negative (−)), separator, and electrolyte. A few cells are connected in series, parallel or in series - parallel combinations, either by physical attachment or by welding in between cells to form a battery module. Similar, several modules are connected to form a battery pack placed in a single compartment for thermal management. A HEV may have more than one batteries packs placed in a different location of the car.

#### 2.1.2. Li-Ion battery performance terminology

A battery cell is fully charged when its terminal voltage reaches the maximum voltage limit value after being charged at infinitesimal current levels, for example a maximum limit voltage value of 4.2 V at room temperature (25°C). A battery terminal voltage value greater than this limit corresponds to a dangerous over-charging operating condition. Similar, a battery cell is fully discharged when its terminal voltage reaches the minimum voltage limit value after being drained at infinitesimal current levels, for example a minimum limit voltage value of 3.0 V at room temperature. A battery terminal voltage value smaller than this limit corresponds to a dangerous over-discharging operating condition. The capacity of a battery is measured in Ampere-hours (Ah) defined as the total charge that can be discharged from a fully charged battery under specified conditions. The rated Ah capacity is the nominal capacity of a fully charged new battery under the conditions predefined by the catalog specifications of the battery, e.g. the nominal condition could be defined as room temperature 25°C and battery discharging is at 1/25 C-rate. The C-rate is used to represent a charge or discharge rate equal to the capacity of a battery in 1 hour, e.g. for a 6 Ah battery, 1C-rate is equal to charge or discharge the battery at a constant current value of 6 A; in the same way, 0.1C-rate is equivalent to 0.6 A, and 2C-rate for charging or discharging the battery at a constant current value of 12 A. The power density of the battery is an important criterion of battery selection that is defined as the peak power per unit volume of a battery (W/l). In the battery model dynamics, the effect of its internal resistance is significant. It is defined as the overall equivalent resistance within the battery. Also, it is worth to mention that its value varies during the charging and discharging battery cycles, and moreover may vary as the operating condition changes. The peak power according to the U.S. Advanced Battery Consortium (USABC)‘s definition is given by:

where *R* is the battery internal resistance.

The peak power is defined at the condition when the terminal voltage is 2/3 of its OCV. The SOC of the battery provides an important feedback about the state of health (SOH) of the battery and its safe operation. SOC is defined as battery available capacity expressed as a percentage of its rated capacity. More precisely, the SOC can be defined as the remaining capacity of a battery and it is affected by its operating conditions such as load current and temperature:

The SOC for a fully charged battery is 100% and for an empty battery is 0%, defined for a discharging cycle, when discharging battery current is positive, as:

where η is the coulombic efficiency of the charging or discharging battery cycle, *Ahnom* represents the nominal battery capacity,

The relation (3) can be also written as a first order differential equation that further it will be used for SOC state estimation:

The SOC is a critical condition parameter for battery management system (BMS), often affected by its operating conditions such as load current and temperature; consequently, an accurate estimation of SOC is very important, since it is the key issue for the healthy and safe operation of batteries. The depth of discharge (DOD) is used to indicate the percentage of the total battery capacity that has been discharged at time t, defined as:

The SOH of the battery is defined as the ratio of the maximum charge capacity of an aged battery to the maximum charge capacity when this battery was new. Its life cycle (number of cycles) is given by the number of discharging-charging cycles that the battery can withstand at a specific DOD (normally 80%) before it fails to meet the desired performance criteria. The actual operating life of the battery is affected by the charging and discharging rates, DOD, and by the temperature. The higher the DOD is the shorter will be the cycle life. To attain a higher life cycle, a larger battery is required to be used for a lower DOD during normal operating conditions.

The Battery Management System is an integrated battery structure consisting of measurement sensors, controllers, serial communication, and computation hardware with software algorithms such as Proportion Integral Derivative (PID) and adaptive control laws, Kalman filters estimators, adaptive or sliding mode observers designed to decide the maximum charging/discharging cycles current and the duration from the estimation of SOC and SOH of the battery pack, as is shown in [11, 13, 14, 15].

#### 2.1.3. Battery management systems: architecture, trends, functions, monitoring, faults detection, hardware and software components

A BMS as an important connector between the battery and the HEV plays a vital role in improving battery performance and optimizing vehicle operation in a safe and reliable manner, as is mentioned in [13]. Nowadays, the trend of the BMSs is a rapid growth of the EV and HEV market, thus it is essential for the automotive industry to develop a comprehensive and mature BMSs. As is stated in [13]”*the U.S. Council for Automotive Research (USCAR) and the U.S. Advanced Battery Consortium (USABC) have set minimum goals for battery characteristics for the long-term commercialization of advanced batteries in EVs and hybrid electric vehicles (HEVs)*”. Furthermore, to increase the market segment of EVs and HEVs automotive industry, the main concerns such as reliability and safety remain constantly for both of them, battery technology (BT) and BMS.

The BMS hardware and software components, the safety circuitry incorporated within the battery packs play an important role to monitor, control, compute and to show continually the safety state, the SOC, SOH, as well as the longevity of the battery.

Moreover, in [13] is emphasized one of the most dangerous situations such as the ignition of a Li-Ion battery during overcharging operating conditions, due to the volatility, flammability and entropy changes. Also, after repeated over-discharging cycles, the battery cell capacity is reduced significantly, due to irreversible chemical reactions, and thus the BMS needs to monitor and control constantly the Li-Ion battery state. Whenever any abnormal conditions happen, such as self-discharge leakage current through the insulation resistance of the battery, well-known as ground insulation resistances of the negative and positive bus of BMS

Furthermore, to increase the effectiveness of BMS in [13] is proposed a new BMS with the following categories of components:

A. Hardware with the following components:

Safety circuitry; Sensor system; Data acquisition; Charge and discharge control; Communication; Thermal management.

The sensor system block integrates different sensors capable to monitor and measure battery parameters including cell voltage, battery temperature, and battery current. The new proposed BMS in [13] it seems to have a lot of improvements in terms of current safety circuitry designs that can be easily implemented, amongst them is worth to mention the addition of accurate alarms and controls to prevent overcharge, over-discharge, and overheating. Therefore, the external signals such as the current, voltage, and temperature must be measured to improve the capability of state tracking in real life applications [13]. Data acquisition (DAQ) block in conjunction with the data storage block are critical parts for the software in the BMS to analyze and build a database for system modeling and estimation algorithms development.

The charge and discharge control block is integrated in hardware architecture of the BMS to implement the charge-discharge protocol. A variable resistor may be necessary to help balance cells or perform internal resistance measurements. In [13] is mentioned also that the “*cell balancing control is still a critical design feature with room for improvement in order to equalize the battery pack and estimate the battery status in an efficient way*”. Most subsystems in a BMS are stand-alone modules, and hence, data transfer throughout the BMS is required. Communication through a CAN Bus is a major way to transfer data between the stand-alone subsystems within the BMS [13].

Furthermore, the recent development of smart batteries within the context of innovative electronics and artificial intelligence, more data can be collected to communicate with the user and the charger through the microchips incorporated within the battery [13]. In addition, “*wireless and telecommunication techniques are gradually being incorporated into charging systems that facilitate communication between the battery and the charger*”. Finally, the last thermal management hardware module proved during the time that its integration in a BMS is critical to be integrated since the temperature variations between the cells have a great impact on cell imbalance, reliability and performance [13].

B. Software with the following components:

SOC estimation and monitoring; SOH estimation and monitoring; Cell balancing; Fault Detection and Isolation; User interface.

The software compartment integrated in BMS structure is in reality such as an artificial “brain” that controls all hardware operations and examines all sensors data for making decisions and to implement in real-time linear, nonlinear and intelligent SOC, SOH estimators, and also FDI techniques. As is mention in [13], “*the switch control, sample rate monitoring in the sensor system block, cell balancing control, and even dynamic safety circuit design should be handled by the software of a BMS*”. In addition, the software components assure online data processing, and also reliable and robust automated data analysis by controlling battery functions, representing an essential factor to perform successfully the SOC, SOH estimation and fault detection and isolation algorithms. The robust SOC and SOH estimators are design to integrate also a capability assessment of the life status of the battery and to “*sets the operating limits according to state-of-the-art algorithms, such as fuzzy logic, neural networks, state-space-based models, and so on* “[13]. Most of the soft battery faults are detected through online data processing by means of an intelligent data analysis that provides information about the occurrence of the faults and their persistence by fault warnings, and also indicates abnormal limits of operating conditions. The history of the past measurements data set is recorded and provides the pre-alarm condition before the possible battery faults. In [17, 18] is proposing a real-time diagnosis approach that detects, isolates, and estimate specific sensor faults, such as battery voltage, current temperature, and fan motor. The sensor fault estimation can provide great benefits for enhancing the reliability of BMSs. Also, the sensor fault estimation can provide fault-tolerance capability to the BMS by allowing it to continue in degraded and in safe mode even after the sensor faults occur, as is mentioned in [17]. Failure in Li-Ion batteries can be also attributed to a combination of manufacturing defects, safety component failure, or human operating errors, as is specified in [18]. Furthermore, in [18] are developed some methods for realistic fault injection. Two types of sensor faults are considered in [18], namely an intermittent signal loss due to faulty wiring connections and sensor bias resulting from time or temperature drift. For the fan motor, the only fault considered is a total motor failure, and thus no longer provide cooling to the battery. The occurrence of the realistic battery faults are established based on the preset thresholds. These thresholds are computed as a minimum values that assure the prevention of the false alarms, based on the minimization of the residual error probability when occurs a fault, by studying the probability density functions (PDF)) of the healthy and faulty signals, such is shown in [18]. The PDfs are obtained through extensive experimental data collection or simulations on the system.

Roughly, for many faults scenarios to compute the magnitude of the thresholds we can use also the statistics of the residual errors for healthy system between the measured values data set and its estimated values, such as the mean

### 2.2. Li-Ion battery EMC description

The equivalent model circuits (EMCs) are simple electric circuits consisting of voltage sources, resistors and capacitors networks, commonly-used to simulate the dynamic behavior of the Li-Ion batteries [1, 8, 11]. The role of the resistor-capacitor (RC) series networks integrated in EMCs is to improve models’ accuracy, and also to increase the structural complexity of the models [1, 8]. In this research paper we chose for Li-Ion battery model design and implementation stages an equivalent second order model RC circuit. It consists of a resistor R, two series RC cells (R_{1}C_{1}, R_{2}C_{2}), and an open-circuit voltage (OCV) source dependent of SOC, i.e. OCV (SOC), as is shown in Figure 1(a), in NI Multisim 14.1 editor. In EMC architecture, R denotes the internal ohmic resistance of the Li-Ion battery, the parallel cells (R_{1}, C_{1}), (R_{2}, C_{2}) connected in series denote the electrochemical polarization resistances and capacitances, for which T_{1} = R_{1}C_{1}, T_{2} = R_{2}C_{2} can imitate the fast polarization time constant, and the slow polarization time constant for the voltage recovery of the Li-Ion battery respectively {14]. Also,

Also “*this choice is due to the early popularity of BMS for portable electronics, where the approximation of the battery model with the proposed EMC is appropriate*”, as is mentioned in [1, 8]. Related, this approach has been extended easily to Li-Ion batteries for automotive industry and for many other similar energy storage applications [11]. Since the EMC is used in following sections to design and implement in real-time all three proposed nonlinear state estimators, now it is essential to precise the main factors that affects the battery parameters, especially the internal and insulation resistances and their impact on the battery dynamics in a realistic operating conditions environment. The internal resistance of the battery is affected by the following factors: conductor resistance, electrolyte resistance, ionic mobility, separator efficiency, reactive rates at the electrodes, and concentration polarization, temperature effects and changes in SOC. When a battery fails, it is typically since it has built up enough internal resistance that it can no longer supply a useful amount of power to an external load, according to the maximum power transfer between the source and the load. The insulation positive and negative resistances of the battery are denoted by *complex production of mechanical-electrical integration*”, for which the power supply typically being in the range 100–500 V is obtained by means of several series battery packs. Amongst the BMS hardware devices consisting of high voltage components, the traction battery, electrical motor, energy recycle device, the battery charger and its auxiliary device deal with a large current and insulation [16], thus insulation issue must be under consideration since the design stage. As is stated in [16], the poor working conditions, such as shaking, corrosion, changes in temperature and humidity, “*could cause fast aging of the power cable and insulation materials, or even brake the insulation, which would decrease the insulation strength and endanger personnel*”. Thus, needs to ensure safety operating conditions for personnel are required to evaluate the insulation conditions for entire HEV’s BMS.

The National Standard (NS) 18384.3-2001, stipulates several safety requirements for HEVs, especially for insulation resistance state, measurement method [16]. According to NS, the insulation state of an EV is evaluated according to the ground insulation resistance of the DC positive and negative bus, *is the relative resistance to maximum leakage current (in the worst condition) where there is a short between the traction battery and ground (electric chassis)*” [16]. Also, “*under the conditions that the maximum AC voltage is less than 660 V, the maximum DC voltage is less than 1000 V and the car weight is less than 3500 Kg, the requirements of the high voltage security are as follows: (1) personnel’s security voltage is less than 35 V, or the product of the contact current with a person and the duration of time is less than 30 mA s; insulation resistance divided by the battery rated voltage should be more than 100* *, and preferably more 500* *”,* as is formulated in [16]. Thus, to ensure the insulation security of on-board BMS, it is necessary to detect the insulation resistance and raise an alarm in time. Currently, the insulation measurement methods, such as passive ground detection and active ground detection, include the AC voltage insulation measurement method, and the DC voltage insulation measurement method [16]. The passive ground detection insulation measurement method principle is presented in Figure 1(b) where the presence of leakage current is detected by discovering the resultant magnetic field generated by AC voltage around the mutual inductor.

### 2.3. Li-Ion battery continuous time state-space representation

By simple manipulations of Ohm’s, current and voltage Kirchhoff’s laws applied to the proposed Li-Ion battery’s EMC can be written the following first order differential equations that are most suitable to capture the entire dynamics of EMC in time domain:

By defining the following state variables *u* the DC instantaneous current that flows through battery, *y*, designating the terminal battery DC instantaneous voltage, i.e.

where

For simulation purpose, in order to validate the proposed battery model, as well as to prove the effectiveness of the SOC estimation strategies developed in Section 3, we consider as the most suitable nominal values for Li-Ion battery EMC parameters and OCV coefficients the same values that are carefully chosen for model validation in [8] as follows

Li-Ion battery ECM parameters:

The battery internal ohmic resistance (slightly different for charging and discharging cycles), R = 0.0022 [Ω] (ohms), the first RC cell polarization resistance and capacitance, R

_{1}= 0.00077 [Ω], C_{1}= 14475.24 [F], and the second RC cell polarization resistance and capacitance, R_{2}= 0.0011 [Ω], C_{2}= 98246.01 [F] (Farads).

Li-Ion battery characteristics:

The value of the battery capacity, Q = 6 Ah (Amperes hours), the voltage nominal value of the battery, V

_{nom}= 3.6 V (Volts), and the coulombic efficiency, η = 1, for charging cycle, and η = 0.85, for discharging cycle

The OCV coefficients:

K

_{0}= 4.23, K_{1}= 3.86E-05, K_{2}= 0.24, K_{3}= 0.22, K_{4}= −0.04

The *h* (SOC), as is shown in [3, 4, 8], where the OCV curve is assumed to be the average of the charge and discharge curves taken at low currents rates from fully charged to fully discharged battery [3, 4, 6, 8]. Also, by using low charging and discharging DC currents can be minimized the battery cell dynamics. A simple offline (batch) processing method for parameters calculation is carried out in [3, 4, 6, 8].

### 2.4. Li-Ion battery discrete time state-space representation

We introduce now the following new notations:

With these notations, a discrete time state space representation of the combined EMC Li-Ion battery model is obtained::

Further, a compact discrete time of combined ECM Li-Ion battery state space representation (9) can be written in the following matrix form:

where the nonlinear function

### 2.5. Li-Ion battery equivalent model in ADVISORY MATLAB platform—case study

For EMC validation purpose we compare the results of the tests using a NREL with two capacitors already integrated in an Advanced Vehicle Simulator (ADVISOR) MATLAB platform, developed by US National Renewable Energy Laboratory (NREL), as is shown in [9, 10]. The NREL Li-Ion battery model approximates with high accuracy the Li-Ion battery model 6 Ah and nominal voltage of 3.6 V, manufactured by the company SAFT America, as is mentioned in [9, 10]. Also, for simulation purpose and comparison of the tests results, the EMC battery model is incorporated in a BMS’ HEV, and its performance is compared to those obtained by a particular Japanese Toyota Prius, selected as an input vehicle in ADVISOR MATLAB platform, under standard initial conditions and the setup shown in Figure 2.

Among different driving speed cycles for a large collection of cars provided by the ADVISOR US Environmental Protection Agency (EPA), in our case study for Toyota Prius HEV car, the speed profile is selected as an Urban Dynamometer Driving Schedule (UDDS), as is shown in Figures 3 and 4, respectively.

Both, the driving UDDS cycle for car speed (*mph*) profile and its corresponding Li-Ion battery UDDS current profile are represented separately in the same ADVISOR MATLAB platform, as is shown in the first two corresponding top graphs from Figure 4.

Also, the exhaust gases emission and SOC curves, as a result to the same UDDS cycle test on the ADVISOR MATLAB platform, are shown in the last two bottom graphs of Figure 4, accompanied by details in the next section.

The Li-Ion battery EMC and the ADVISOR SOCs, for the same initial condition, SOC = 70% and the same UDDS cycle profile input current test, are implemented in a real-time MATLAB environment, as is shown on the same graph at the top of Figure 5. The SOC simulations reveal a great accuracy between Li-Ion battery EMC and its corresponding ADVISOR NREL model represented on ADVISOR MATLAB platform, as is shown in Figure 4, thus an expected confirmation of the EMC validation results.

The second graph from the bottom in the same Figure 5 depicts the EMC battery output terminal DC instantaneous voltage

The simulation results of Li-Ion battery EMC output voltage show a stabilization of the battery output voltage value at the end of UDDS cycle, i.e. after 1370 seconds.

Likewise, the Li-Ion battery OCV for a discharging cycle at 1C-rate (i.e. 6 Ah × 1/h = 6A constant input discharging current) is shown in the top of Figure 6, and its corresponding SOC during the same discharging cycle is revealed on the bottom graph of the same Figure 6 respectively.

## 3. Development and implementation in real-time of SOC Li-Ion battery estimators on MATLAB/SIMULINK platform

In this section we propose for Li-Ion battery EMC SOC estimation three nonlinear on-board real-time estimators integrated in BMS of HEV, based on Kalman Filter (KF) technique, specifically a nonlinear Gaussian Unscented Kalman Filter (UKF), a non-Gaussian nonlinear Particle Filter (PF), and a nonlinear observer estimator (NOE). The simulations results and a comprehensive performance analysis for each proposed SOC estimator are presented in the following subsections of this section.

### 3.1. Unscented Kalman filter real-time estimator design and robustness analysis

The main aim of this subsection is to build a nonlinear UKF SOC estimator, following the same design procedure described rigorously in [5]. We are motivated by some preliminary results obtained in our research, as you can see in [6, 7]. Technically, UKF estimator is based on the principle that one set of discrete sampled points parameterizes easily the mean and the covariance of a Gaussian random variable, as is stated in [5]. Moreover, the nonlinear estimator UKF yields an equivalent performance compared to a linear extended Kalman filter (EKF), well documented in [3, 4, 8], excluding the linearization steps required by EKF. In addition, the results of UKF real-time implementation for the majority of similar applications are encouraging, and it seems that the anticipated performance of this approach is slightly superior compared to EKF [3, 4, 8]. Furthermore, the nonlinear UKF SOC estimator can be extended to the applications where the distributions of the process and measurements noises are not Gaussian [19]. Concluding, the implementation simplicity and a great estimation accuracy of the proposed UKF SOC estimator recommend it as the most suitable estimator to be used in almost all similar applications. Explicitly, the nonlinear UKF estimator is an algorithm of “*predictor–corrector*” type applied to a nonlinear discrete - time systems, such as those described in [3, 4, 5, 6, 7]:

where *predictor-corrector*” structure that propagates the mean and the covariance matrix of a Gaussian distribution for the random state variable *a set of points, the so-called sigma points, are chosen such that their sample mean, and sample covariance matrix are* *and* *, respectively*”. Also, “*the nonlinear function* *is applied to each sigma points generating a “cloud” of transformed points with the mean* *and the covariance matrix* *predictor-corrector*” structure, as well as its tuning parameters are well documented in the literature, and for details we recommend the fundamental work [5]. Since we follow the same design procedure steps for building a nonlinear UKF SOC estimator as in [5, 6, 7], we are focused only to the implementation aspects.

The simulation results of the real-time implementation of proposed UKF SOC nonlinear estimator in MATLAB R17a environment are shown in Figures 7 and 8. In Figure 7 are presented the simulation results for EMC SOC true value versus EMC SOC-UKF and ADVISOR MATLAB platform estimated values.

Also, at the bottom of Figure 7 is shown the EMC battery output terminal true value DC voltage versus EMC-UKF battery output terminal estimated DC voltage. The simulation results reveal an accurate SOC estimation values, and also a very good robustness of UKF estimator to the changes in initial SOC value (guess value, SOCinit = 20%). In Figure 8 are shown the Li-Ion EMC polarization voltages versus Li-Ion EMC -UKF estimates, and in Figure 9 is represented the robustness of EMC-UKF SOC nonlinear estimator to a gradual increase in the internal resistance by 1.5 until 2 times of its initial value. The simulation results reveal a significant decrease in Li-Ion EMC UKF SOC estimator performance to an increase in internal resistance, but still remains convergent to EMC measurements after a long transient.

### 3.2. Particle filter real-time estimator design and robustness analysis

In this subsection we propose a real-time PF SOC nonlinear estimator with a similar” *prediction-corrector*” structure found to the nonlinear UKF SOC estimator described in the previous subsection 3.1. Consequently, is expected that the proposed nonlinear PF SOC estimator to update recursively an estimate of the state and to find the innovations driving a stochastic process given a sequence of observations, as is shown in detail in the original work [19]. In [19] is stated that the PF SOC estimator accomplishes this objective by a sequential Monte Carlo method (bootstrap filtering), a technique for implementing a recursive Bayesian filter by Monte Carlo simulations.

The process state estimates are used to predict and smooth the stochastic process, and with the innovations can be estimated the parameters of the linear or nonlinear dynamic model [19]. The basic idea of PF SOC estimator is that any probability distribution function (*pdf*) of a random variable can be represented as a set of samples (particles) as is described in [19], similar thru sigma points UKF SOC estimator technique developed in subsection 3.1 [5]. Each particle has one set of values for each process state variable. The novelty of this method is its ability to represent any arbitrary distribution, even if for non-Gaussian or multi-modal pdfs [5].

Compared to nonlinear UKF SOC estimator design, the nonlinear PF SOC estimator has almost a similar approach that does not require any local linearization technique, i.e. Jacobean matrices, or any rough functional approximation. Also, the PF can adjust the number of particles to match available computational resources, so a tradeoff between accuracy of estimate and required computation. Furthermore, it is computationally compliant even with complex, non-linear, non-Gaussian models, as a tradeoff between approximate solutions to complex nonlinear dynamic model versus exact solution to approximate dynamic model [6, 19]. In the Bayesian approach to dynamic state estimation the PF estimator attempts to construct the posterior probability function (pdf) of a random state variable based on available information, including the set of received measurements. Since the pdf represents all available statistical information, it can be considered as the complete solution to the optimal estimation problem. More information useful for design and implementation in real-time of a nonlinear PF estimator can be found in the fundamental work [19]. Since we follow the same design procedure steps to build and implement in real-time a nonlinear PF estimator, as is developed in [19], we are focused only on the implementation aspects. The simulation results in real-time MATLAB R17a environment are shown in Figures 10 and 11.

In Figure 10 are shown the simulation results for EMC SOC true value versus EMC SOC-PF and ADVISOR MATLAB platform estimated values. The number of filter particles is set to 1000, a very influent tuning parameter for an accurate SOC estimation performance. At the bottom of Figure 10 are shown the Li-Ion EMC battery output terminal true values of DC instantaneous voltage versus Li-Ion EMC battery output terminal DC voltage estimated by the nonlinear PF estimator. In Figure 11 are shown the Li-Ion EMC polarization DC voltages versus EMC PF estimates. In Figure 12 is shown the robustness test of Li-Ion EMC-PF SOC nonlinear estimator to a gradual increase in the internal battery resistance by same values considered for Li-Ion EMC-UKF SOC estimator.

The simulation results reveal a good robustness and convergence of Li-Ion EMC-PF estimator, but with a lot variance in the estimated values. Overall, the simulation results reveal a fast PF estimator convergence, a good SOC filtering, an accurate SOC estimation value, and also a very good robustness of PF estimator to big changes in the initial SOC value (guess value, SOCinit = 20%), and slightly slow behavior to an increase in internal resistance of the Li-Ion battery.

### 3.3. Nonlinear observer real-time estimator

In this subsection, a nonlinear observer SOC estimator (NOE) is under consideration. It is proposed to have more flexibility for a suitable choice of the best Li-Ion battery SOC estimator amongst UKF, PF, and NOE SOC estimators. We follow the same design procedure steps for its design and implementation in a real-time MATLAB R2017a simulation environment as in [1]. The estimator design is based on an important information provided by the linear structure of the matrix Eq. (9).

According to this structure all three state variables

where the matrices *A* and *B* are the same as in Eq. (9),

This outcome improves significant the NOE SOC estimation accuracy and simplifies the structural complexity of the proposed nonlinear observer estimator. The dynamics of the nonlinear observer estimation errors can be described by the following differential equations [1]:

In [1] is proved that all three states estimation errors described by the system of Eq. (17) converge asymptotically to zero in steady-state, and the observer gain for the new simplified structure is approximated by an adaptive law:

that allows the value of

Furthermore, three main assumptions are formulated in [1] to tune the values of EMC-NOE parameters

In Figure 13 are shown the simulation results for Li-Ion EMC SOC true value versus Li-Ion EMC SOC-NOE and ADVISOR MATLAB platform estimated values. At the bottom of Figure 13 are presented the Li-Ion EMC battery output terminal true values DC voltage versus Li-Ion EMC battery output terminal DC voltage estimated by the proposed Li-Ion EMC NOE SOC estimator. In Figure 14 are displayed the Li-Ion EMC polarization DC voltages versus Li-Ion battery EMC-NOE estimates.

In Figure 15 is depicted the robustness of Li-Ion EMC-NOE SOC estimator to an increase in internal battery Li-Ion resistance with the same values as used for the previous nonlinear estimators, EMC UKF and EMC PF respectively.

The simulation results in Figure 15 reveal slightly slow robustness to an increase in internal resistance of Li-Ion battery compared to simulation results from Figure 13, but still the convergence is reached in a long transient with much variation in the SOC estimates. Overall, the simulation results from this section reveal a fast NOE estimator convergence, a good SOC filtering, an accurate SOC estimation value, and also a very good robustness of PF estimator to big changes in the initial SOC value (the same guess value as for UKF and PF, SOCinit = 20%), compared to a gradual degrade in SOC estimation performance to an increase in internal battery resistance.

## 4. Real-time implementation of the Li-Ion battery SOC estimators on MATLAB/SIMULINK platform: Results comparison

For comparison purpose, we represent on the same graph the SOC estimates of all three real-time nonlinear estimators (UKF, PF, and NOE) versus EMC SOC true value and ADVISOR MATLAB SOC estimate, as are revealed in Figures 7, 10 and 13. The simulation results in Figure 16 disclose a precious information about the convergence of all three proposed estimators to Li-Ion EMC SOC true values for the proposed Li-Ion battery EMC. Furthermore, a useful benchmark is built in terms of the statistics errors between the states estimates and the corresponding model states values, such as root mean square error (RMSE), mean square error (MSE) and mean absolute error (MAE), defined in [6]. They are very easy to be computed in MATLAB R2017a, and the results are shown in Table 1. The MSE is a measure of how close the estimates values fit to model “true” values. The squaring is done so negative values do not cancel positive values. The smaller the MSE, the closer the fit of the estimates values is to the model “true” values. The RMSE is just the square root of the MSE [6].

UKF estimator | PF estimator | NOE | ||||||
---|---|---|---|---|---|---|---|---|

MAE | MSE | RMSE | MAE | MSE | RMSE | MAE | MSE | RMSE |

0.0915 | 26.1030 | 0.1380 | 0.0572 | 4.9724 | 0.0602 | 0.0247 | 2.4584 | 0.0424 |

## 5. Conclusions

The main contribution of this research paper is the design and implementation in real time of a three robust nonlinear estimators, namely UKF, PF and NOE, capable to estimate with high accuracy and robustness the Li-Ion battery SOC based on a simple battery 2R EMC without disturbance uncertainties. The simulation results obtained in a real-time MATLAB simulation environment reveal that amongst all three proposed nonlinear SOC estimators the EMC NOE is a most suitable alternative to SOC UKF and PF estimators for this kind of application. The number of tuning parameters for SOC EMC NOE is much smaller than for UKF and PF estimators. The proposed SOC EMC NOE proves its effectiveness in terms of implementation simplicity, Li-Ion battery SOC estimation accuracy and robustness. Therefore, it can be considered as one of the most suitable nonlinear estimator, and a feasible alternative to UKF and PF estimators.

## Conflict of interest

The authors declare that there is no conflict of interests regarding the publication of this paper.