Battery State of Charge
Battery State of Charge
CIF: B99349623
Author
Calle F Oeste, Nave 93. Grupo Quejido [email protected]
Polígono Malpica - 50016 - Zaragoza (Spain)
[email protected] - www.epicpower.es
AN0026
This document summarizes different
ways to estimate the State of Charge
of batteries
Version
V5
June, 2020
Since all the renewable energies and batteries usually generate and store energy in direct
current, the use of DC/DC converters, instead of previously used DC/AC and AC/DC, is gaining
uptakers as they achieve much higher efficiencies.
The company epic power designs and manufactures high efficiency bidirectional isolated
and non-isolated DC/DC converters that serve the purpose of connecting different DC levels.
These converters are especially used in moving applications such as lifts and AGVs to connect
batteries and variable frequency (VVVF) drives to feed motors as can be seen in Fig. 1.
Rpre
M
AC / DC DC/ AC
Rbrake
Cbus
Bidirectional
DC/DC converter
Fig. 1: Bidirectional DC/DC Converter to feed an AC VVVF drive directly from batteries
In most applications, epic power converters are the only connection to the battery as they
can charge (directly or through an external charger connected to the converter) and
discharge them. This requires a full knowledge of the energy going in and out, the status of
the battery, the power, and the use it is having.
With this data it is possible to obtain more information about the state of the battery. With
an external device that processes voltage, current, usage data (shared by the DC/DC
converter via CAN bus) and knowing the type of battery connected, the State of Charge (SoC),
the State of Health (SoH) and the State of Power (SoP) can be estimated accurately. This
device is called “CAN - Battery Management System Interface” and can be used in any type
of battery.
Fig. 2: CAN - Battery Management System Interface for EPC family converters
The “CAN - Battery Management System Interface” or “CAN - BMS Interface” ensures the
correct operation of the battery, its safety and reliability and with the DC/DC converter it will
establish communication to extend the life expectancy of the battery as much as possible by
defining limits of operation.
In the following sections, the algorithms’ running, their accuracy and inputs/outputs of the
battery management system are explained.
𝑄𝑟𝑒𝑚𝑎𝑖𝑛𝑖𝑛𝑔 (𝑡)
𝑆𝑜𝐶(𝑡) = ∗ 100 [%] (1)
𝑄𝑚𝑎𝑥 (𝑡)
The obtention of the SoC is key for every application and sets base for other states’
estimation although it may not be easy to obtain with every chemistry. Lithium-based
batteries, and LFP particularly, show a highly non-linear relation between the SoC and the
voltage measured in the batteries which require the use of prediction and estimation
algorithms to obtain it.
There are many algorithms to obtain the SoC but the most widely used are the open circuit
voltage (OCV) measurement, the Coulomb Counting method, and model-based methods
such as Kalman Filters. Each one of these has its benefits and limitations depending on the
application, type of battery, computation availability and required precision.
Method description
OCV measurement: This method is simple as it relates the internal voltage of the battery
correlated with SoC and a lookup table of predefined values. Being so simple, it is not
applicable to online applications as the internal voltage of the battery can only be obtained
by disconnecting it and waiting for its stabilization.
Vbatt(t) _ ΔV iBATT
+
Vfloat
Vocv(t) Z +
Icharge VOCV
VBATT
Ibatt(t) -
Holding
current
For this reason, this method cannot be used in standard applications and it is not currently
integrated in the estimation of the “CAN - BMS Interface”.
𝑡
1
𝑆𝑜𝐶(𝑡) = 𝑆𝑜𝐶0 − ∗ ∫ 𝑖𝑏𝑎𝑡𝑡 (𝑡)𝑑𝑡 ∗ 100 (2)
𝐶𝑛𝑜𝑚 𝑡0
In this estimation method it is key to know the initial state of charge of the battery (this value
is normally updated when the battery is completely charged) and to measure the current
accurately. Even when this is done properly, the CC method continues integrating errors
caused by inaccurate measurements and other factors which can potentially generate a
serious lack of reliability in the method.
Fig. 4: SoC estimations by CC method for low and severe measuring errors
The first case in Fig. 4, with the estimation of CC in low error conditions, shows an average
difference between the real and the estimated value of 2 %. That difference becomes much
greater when non linearities such as temperature or depth of discharge (DoD) in the battery
are included in the simulation.
To overcome such measurement problems and integrated errors over the time, this method
can be used in combination with other model-based estimations.
One of the most used algorithms is the Kalman filter, which takes into account the noise in
the measurement and the noise (or confidence) in our model to obtain better predictions. In
the case of highly non-linear batteries, such as lithium-based, the algorithm is modified into
the Extended Kalman Filter (EKF) due to its capabilities of handling non-linear systems.
Although there are many different model of batteries, the most commonly used are those
shown in Fig. 5 and Fig. 6 that describe the evolution of a battery voltage according to
different electrical ideal elements.
R1 R1 R2
I R0 I R0
Voc C1 Vo Voc C1 C2 Vo
These models can be described as equations. The following example develops the model in
Fig. 5, were Voc depends on the current State of Charge. This non-linear relation can be stored
in a Look-up table as well.
𝑑 𝑆𝑜𝐶(𝑡) 𝑖(𝑡)
=− ∗ 100
𝑑𝑡 𝐶𝑛𝑜𝑚
𝑆𝑡𝑎𝑡𝑒 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛𝑠 ∶=
𝑑𝑣𝑐1 (𝑡) 1 𝑣𝑐1 (𝑡) (3)
= − (𝑖(𝑡) − )
{ 𝑑𝑡 𝐶1 𝑅1
𝑀𝑒𝑎𝑠𝑢𝑟𝑒𝑚𝑒𝑛𝑡 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 ∶= {𝑉𝑜 = 𝑉𝑜𝑐 (𝑆𝑜𝐶(𝑡)) − 𝑖(𝑡)𝑅𝑜 − 𝑣𝑐1
These equations can be incorporated into the EKF framework by obtaining the jacobian of
each term. Based on the previous SoC and the current measurement, the algorithm makes
a prediction of the current SoC. Then, it proceeds with the Kalman gain computation and
uses the voltage measurement to obtain the a-posteriori, corrected estimation for SoC by
combining the initial SoC estimation and the information provided by the voltage
measurement. This feedback makes the algorithm more robust to measurement errors and
noise than the Coulomb Counting, since here a drift in the sensor is corrected. Note that in
this case, current and voltage measurements are required.
Actual values of SoC vs estimations of EKF have been simulated and tested obtaining varying
accuracy results depending on different scenarios of external noise (measurement and
model inaccuracies) for a defined battery model as can be seen in Fig. 7 for low, medium and
severe presence of noise.
The results show that the average error between the real SoC and the estimated one is 0.13
% for low, 1.21 % for medium and 2.86 % for severe external noise.
The conclusion is that EKF is reliable against measurement error and an unknown initial
state, the opposite of the CC, but the model must be well defined to obtain accurate results.
It is important to note that both the Coulomb Counting and the EKF are basic SoC estimation
algorithms, and they share a problem. They rely on parameters such as Cnom, R1, C1 and the
look-up table, which are assumed constant along the life of the cell. However, there are
external effects such as ambient temperature or battery aging which may change these
parameters, so the predictions become less and less accurate. To solve this problem, more
complex algorithms can be implemented. These algorithms are usually divided in two parts,
one specialized in tracking the parameters and their evolution, and other which performs
the SoC estimation.
Examples of these algorithms can be the Dual Kalman filtering, the Extremum Seeking
algorithm or other methods based in machine learning.
Dual Kalman filtering uses two nested Kalman filters: One to track the parameters and their
aging process and another one which uses these parameters for SoC estimation as seen
before. Both work at the same time and interchange variables and states. The changes in
the parameters of the battery are modelled as an external noise.
Extremum seeking introduces small signal variations into the initial parameters, and predicts
the voltage evolution with said parameters. Then, compares the prediction with the real
measurements, and changes these small variations. The small signal components keep on
being adjusted until the parameter values converge to the real ones.
On the other side, machine learning techniques use data from real-life experiments to learn
the behavior of the battery. They are able to estimate different parameters from the battery
features or waveforms if they are provided from the database, as well as battery aging. There
are multiple machine learning techniques that can be of use here, from simpler Multi-Layer
Perceptrons to more advanced networks such as Convolutional Neural Networks, Self-
Organizing Maps or Long-Short Term Memory networks.
Coulomb counting and extended Kalman filter methods are used together to estimate the
state of charge of a specific battery. Depending on the type of battery the model will differ
and one of the methods will gain more influence than the other.
Comparing the battery voltage of a standard 12 Vdc lithium-ion and lead-acid battery in Fig.
8 it is easy to appreciate that the lithium battery voltage response to a continuous discharge
is very flat. The voltage only changes rapidly when the battery is fully charged or when it is
fully discharged.
As the Kalman filter is fed from current, voltage and temperature measurements it will work
especially well in the flat region of the battery. The coulomb counting (CC) is fed from a
known SoC and the current measured and then can be applied appropriately to the side
regions of the charging/discharging curve.
directly on the battery by the EPC CAN BMS through a thermocouple or PTC.
o Battery electrical model: The battery will need to be tested and studied to
obtain an accurate model. Once done it will be included in the battery model
library.
o Initial state of charge: It can be set by the algorithm or obtained by either the
The outputs of both algorithms and the SoC obtained from the battery BMS will be weighted
according to the battery performance, conditions, and previous estimations to obtain the
SoC. As a second stage, models that consider the aging of the battery can be included to
adapt the SoC calculation to the most accurate scenario.
epic power
EPC CAN BMS Interface
DC/DC Converter
Microcontroller
Ambient temperature
Battery Counting
Internal SoC
(if available)
Fig. 9: EPC CAN BMS Interface inputs and outputs for SoC
As a conclusion, it is possible to obtain a good estimation of the SoC in a linear but especially
in a non-linear (SoC related to Voltage) battery even under high levels of measuring
inaccuracy. The algorithms and processing required for the calculations can be included in
the “CAN BMS Interface” device that receive inputs from the CAN communication with epic
power EPC converters.
To configure the “CAN BMS Interface” and its algorithms for a specific battery some tests
must be performed with several units of them. In a different document, the definition of the
first-time configuration procedure and the material needed is described.