You are on page 1of 15

ELEC-8900 Special Topics:

Advanced Energy Storage Systems


Lecture 07: Battery Identification
Instructor: Dr. Balakumar Balasingam
(Link to video: https://tinyurl.com/tk3bymmt)
July 14, 2022

Contents
1 Introduction 1

2 Open Circuit Voltage Characterization 1

3 Real Time Identification 7

4 ECM Identification of Different Model Orders 11

5 Parameter Estimation Method 12

6 ECM Identification Using R-int Model 14

7 Problems 15

1 Introduction
The next step after battery modelling is to identify the model parameters. Fig-
ure 1 summarizes this process. In this chapter, we summarize important ap-
proaches to battery model identification.

2 Open Circuit Voltage Characterization


The OCV of a Li-ion battery has a non-linear relationship to its state of charge
(SOC) similar to the sample curve in Figure 2. This section summarizes the
OCV characterization approach.

1
Offline    
Ba#ery  
Data  
Modeling  
collec-on  

Offline  Parameter  Es-ma-on    


Capacity/Power  fade  
SOC  
OCV-­‐SOC  
(CF/PF)  
characteriza-on  
characteriza-on  

SOH  

Forecas-ng/ TTS  
Ba;ery  In   System  ID   Tracking  
Use   Online  es-ma-on  
  Trending  
 
State  of   Time  to    
(e.g.  mobile   ECM  
 
parameter   Capacity   charge  
  State   of  
health  
Rem.  
shutdown     useful  life   RUL  
phone)     (SOC)     (SOH)   (TTS)     (RUL)  

Figure 1: Elements of a BFG.

Figure 3 shows the equivalent circuit of a battery when it is slowly charged/discharged


with a constant rate. First, we define the SOC at a given time as

s[k] ≜ s at time k (1)

where the notation ≜, that reads “defined as”, is used to assign a new variable
name with slightly different context, e.g., the value s at time k is defined as
s[k] in (1). The true SOC at time k can be recursively computed using the
Coulomb counting equation:
∆k i[k]
s[k + 1] = s[k] + (2)
3600Cbatt
where ∆k is the time difference between two measurements, i[k] is the current
through the battery and Cbatt is the battery capacity in Ampere hour (Ah).
Now, let us consider the measured voltage across the battery terminals

zv [k] = v[k] + nv [k] (3)

where v[k] is the true voltage across the battery terminals, and nv [k] is the
voltage measurement noise which is modeled as white Gaussian with standard
deviation (s.d.) σv . During the OCV experiment i.e., when the battery is being
slowly charged/discharged, the terminal voltage can be written as

zv [k] = V◦ (s[k]) + h[k] + i[k]R0 + nv [k] (4)

2
4.2

4
OCV (V)
3.8

3.6

3.4

3.2
0 0.2 0.4 0.6 0.8 1
SOC

Figure 2: OCV vs. SOC curve of a Li-ion battery. This particular curve
is obtained from a Samsung EB575152 battery. The state of charge (SOC) is
indicated as a ratio of remaining charge and battery capacity, i.e., SOC ∈ [0,1].

where h[k] is the hysteresis or voltage “pull” which is a function of current and
SOC of the battery. Since the OCV test is performed at a very low current, we
assume that the hysteresis is proportional to the current only [?], i.e.

h[k] ∝ i[k] (5)

Hence, (4) can be rewritten as

zv [k] = V◦ (s[k]) + i[k]R0,h + nv [k] (6)

where the effective resistance

R0,h = R0 + Rh (7)

is the summation of the battery series resistance R0 and the constant-current


hysteresis equivalent resistance Rh .
Using vector notations, the observation model in (6) can be written as,
 
 T
 k◦
zv [k] = p◦ (s[k]) i[k] +nv [k] (8)
| {z } R0,h
p[k]T
| {z }
k

where

k◦ = [k0 k1 k2 k3 k4 k5 k6 k7 ]T (9)

3
Figure 3: Equivalent circuit model of a battery during slow
charge/discharge. It must be noted that the above equivalent circuit model
is suitable when the battery experiences constant current of very low amplitude.
This model allows us to estimate the OCV-SOC curve.

and
1 1 1 1
p◦ (s[k])T = [1 2 3 4
s[k] s [k] s [k] s [k]
s[k] ln(s[k]) ln(1 − s[k])] (10)

By considering a batch of N voltage observations, (8) can be written as

v = Pk + n (11)

where
T
v = [zv [1] zv [2] . . . zv [tN ]] (12)
T
P = [p[1] p[2] . . . p[tN ]] (13)
T
n = [n[1] n[2] . . . n[tN ]] (14)
k = [k0 k1 k2 k3 k4 k5 k6 k7 R0,h ]T (15)

The least squares estimate of the parameter vector is given by


−1 T
k̂ = PT P P v (16)

Now, for a given SOC, the corresponding OCV estimate V̂◦ (s) is computed
as

V̂◦ (s) = p◦ (s)T k̂◦ (17)

where k̂◦ is formed by the first 8 elements of k̂.


Figure 4 shows the discharging/charging process when low current (C/30)
was used to drain/charge the battery. After computing the SOC using Coulomb

4
4.5

Voltage (V) 4

3.5

3
0 10 20 30 40 50 60

50
Current (mA)

-50
0 10 20 30 40 50 60
Time (Hr)

Figure 4: Measured voltage and current. Voltage and current during charge
and discharge at 25°C.

counting, as shown in (2), it can be used along with the measured voltage and
current values to compute the OCV-SOC model using (16).
Figure 5 shows some measurements that were taken using the below process.
It also shows the computed OCV model using the least square approach. The
folder called “OCV Model” can be run to see the code get the plot shown in
Figure 5.
Finally, the OCV-SOC modeling can be summarized as follows:

5
Estimated R 0 = 0.14809
4.2

4.1

3.9
Voltage (V)

3.8
Measured Voltage
3.7 Modeled OCV

3.6

3.5

3.4

3.3

3.2
0 0.2 0.4 0.6 0.8 1
SOC
Figure 5: OCV model of a Li-ion battery. The OCV curve that was calcu-
lated using the k-parameters generated from measurments.

Summary: OCV-SOC Modeling at Temperature T

1. Fully charge the battery at Tmax


2. Bring the battery to temperature T
3. Collect v[k], i[k] during steps 4) and 5)

4. Slow-discharge the battery at C/30 rate until empty


5. Slow-charge the battery at C/30 rate until full
6. Compute battery capacity at T
7. Compute SOC s[k] using Coulomb counting through (2)

8. Estimate the model parameters through (16)

The (voltage, current, time) data corresponding to Figure 4 can be down-


loaded from here.

6
The estimated OCV parameters are
k0 = −9.4868, k1 = 95.4174, k2 = −16.9954,
k3 = 1.9460, k4 = −0.0970, k5 = −69.1837, (18)
k6 = 129.3188, k7 = −0.9679, k8 = 0.1481
The estimated ECM parameter is R0 = 0.14809 Ω.
Figure 1 shows a high level block diagram of a battery fuel gauge (BFG)
which estimates the state of charge (SOH), state of health (SOH), time to shut
down (TTS), and remaining useful time (RUL) of a battery.
The (voltage, current, time) data corresponding to Figure 4 can be down-
loaded from here.
The OCV and ECM parameter estimation codes, that requires the above
data, can be downloaded from here.

3 Real Time Identification


Figure 6 shows four different approximations of an equivalent circuit model
(ECM). The derivations presented in this section are refer to the most general
model shown Figure 6(d). Section 4 shows how these derivations can be applied
to other three models.
The measured current through the battery is written as
zi [k] = i[k] + ni [k] (19)
where i[k] is the true current through the battery and ni [k] is the current mea-
surement noise which is assumed to be zero mean and has standard deviation
(s.d.) σi . The measured voltage across the battery is
zv [k] = v[k] + nv [k] (20)
where v[k] is the true voltage across the battery and nv [k] is the voltage mea-
surement noise which is assumed to be zero mean with s.d. σv .
For the ECM model in Figure 6(d), the true voltage across the battery, v[k],
is written as the sum of the voltage drop across the internal components, R0 ,
R1 , R2 , and the EMF, v̌[k]. Hence, (20), can be re-written as,
zv [k] = i[k]R0 + xi1 [k]R1 + xi2 [k]R2 + v̌[k] + nv [k] (21)
where the currents through the resistors R1 and R2 can be written in the fol-
lowing form
xi1 [k + 1] ≜ i1 [k + 1] = α1 i1 [k] + (1 − α1 )i[k] (22)
xi2 [k + 1] ≜ i2 [k + 1] = α2 i2 [k] + (1 − α2 )i[k] (23)
where

α1 ≜ e− R1 C1 (24)
− R ∆C
α2 ≜ e 2 2 (25)

7
R0 R0 i[k]

+
v̌[k] v[k]

(a) Model 1 (b) Model 2

R0 i1 [k] R1 i[k]
+
+ − +
v̌[k] C1 v[k]


(c) Model 3

R0 i1 [k] R1 i2 [k] R2 i[k]


+
+ − + − +
v̌[k] C1 C2 v[k]


(d) Model 4

Figure 6: Different ECM model orders

and ∆ is the sampling interval. By substituting the measured current zi [k] for
i[k], the currents in (22) and (23) can be rewritten as follows
xi1 [k + 1] = α1 xi1 [k] + (1 − α1 )zi [k] − (1 − α1 )ni [k] (26)
xi2 [k + 1] = α2 xi2 [k] + (1 − α2 )zi [k] − (1 − α2 )ni [k] (27)
Now, using (19), (21) can be rewritten in the z-domain as follows
Zv [z] = Zi [z]R0 + Xi1 [z]R1 + Xi2 [z]R2 +
V̌ [z] + Nv [z] − R0 Ni [z] (28)
Next, let us rewrite (26) in z-domain
zXi1 [z] = α1 Xi1 [z] + (1 − α1 )Zi [z] − (1 − α1 )Ni [z] (29)

8
which yields
 
1−α1
Xi1 [z] = z−α1 Zi [z] − Ni [z] (30)

and similarly for (27),


 
1−α2
Xi2 [z] = z−α2 Zi [z] − Ni [z] (31)

By substituting (30) and (31) into (28), one gets


1−α1
Zv [z] = Zi [z]R0 + z−α1 Zi [z]R1 +
1−α2
z−α2 Zi [z]R2
+ V̌ [z] + Nv [z]
 
1−α1 1−α2
− R0 + z−α1
R1 + z−α 2
R2 Ni [z] (32)

Rearranging (32) and converting it back to time domain we get


zv [k] =αzv [k − 1] − ηzv [k − 2] + R0 zi [k] − Ř1 zi [k − 1]
+ Ř2 zi [k − 2] + V̄ [k] + n̄i [k] + n̄v [k] (33)
where
α = α1 + α2
η = α1 α2
Ř1 = (α1 + α2 )R0 − (1 − α1 )R1 − (1 − α2 )R2
Ř2 = α1 α2 R0 − α2 (1 − α1 )R1 − α1 (1 − α2 )R2 ,
V̄ [k] = v̌[k] − αv̌[k − 1] + ηv̌[k − 2]
n̄v [k] = nv [k] − αnv [k − 1] + ηnv [k − 2]
n̄i [k] = −R0 ni [k] + Ř1 ni [k − 1] − Ř2 ni [k − 2]
Consider V̄ [k] is constant over time k, then V̄ [k] ≈ V̄ . Therefore, (33) can
rewritten as
zv [k] =αzv [k − 1] − ηzv [k − 2] + R0 zi [k] − Ř1 zi [k − 1]
+ Ř2 zi [k − 2] + V̄ + n̄i [k] + n̄v [k] (34)
Now, let us rewrite (34) in the following form
zv [k] = a[k]T b + nD [k] (35)
where the observation model a[k]T and the model parameter vector b for the
ECM model are given by
a[k]T = a4 [k]T
h i
≜ zv [k − 1] − zv [k − 2] zi [k] − zi [k − 1] zi [k − 2] 1 (36)
b = b4
≜ [α η R0 Ř1 Ř2 V̄ ]T (37)

9
The subscripts 4 in (36) and (37) indicate that the model corresponds to Model
4, as in Figure 6(d). Equivalent circuit models 1-3 are discussed later in Section
4.
The noise in the voltage drop in (35) is written as

nD [k] ≜ n̄i [k] + n̄v [k] (38)

which has the following autocorrelation

RnD (l) = E (nD [k]nD [k − l]) (39)

This autocorrelation RnD (l) for different values of l are given below:
n o
RnD (0) = E nD [k]nD [k]
n
= E n2v [k] + α2 n2v [k − 1] + η 2 n2v [k − 2]
o
+R02 n2i [k] + Ř12 n2i [k − 1] + Ř22 n2i [k − 2]
= (1 + α2 + η 2 )σv2 + (R02 + Ř12 + Ř22 )σi2 (40)

n o
RnD (1) = E nD [k]nD [k − 1]
n
=E − αnv [k − 1] + ηnv [k − 2] + Ř1 ni [k − 1]

− Ř2 ni [k − 2] nv [k − 1] − αnv [k − 2]
o
− R0 ni [k − 1] + Ř1 ni [k − 2]

= −α(1 + η)σv2 − Ř1 (R0 + Ř2 )σi2 (41)

n o
RnD (2) = E nD [k]nD [k − 2]
n 
= E ηnv [k − 2] − Ř2 ni [k − 2]
 o
nv [k − 2] − R0 ni [k − 2]
= ησv2 + R0 Ř2 σi2 (42)

All the noise auto corellation values can be summarized as follows:


n o
RnD (l) ≜ E nD [k]nD [k − l]


 (1 + α2 + η 2 )σv2 + (R02 + Ř12 + Ř22 )σi2 |l| = 0
−α(1 + η)σv2 − Ř1 (R0 + Ř2 )σi2 |l| = 1

(43)

 ησv2 + R0 Ř2 σi2 |l| = 2
0 |l| > 2

10
4 ECM Identification of Different Model Orders
The four models are explained below:
• Model 1: A series resistance only (Figure 6(a)).
• Model 2: A series resistance and the battery (Figure 6(b)).
• Model 3: A series resistance, the battery and a single RC circuit (Figure
6(c)).
• Model 4: A series resistance, the battery and two RC circuits (Figure
6(d)).
The measured voltage of each of the four equivalent circuit models shown in
Figure 6 can be written in the following form:
zv [k] = a[k]T b + nD [k] (44)
where
 T 
a [k] Model 1 b1 Model 1
 1T

 

a2 [k] Model 2 b2 Model 2

a[k]T = b= (45)
aT [k] Model 3 b3 Model 3
 3T

 

a4 [k] Model 4 b4 Model 4

aT1 [k] = zi [k] aT2 [k] = [zi [k] 1]


h i
aT3 [k] = zv [k − 1] zi [k] − zi [k − 1] 1
h
aT4 [k] = zv [k − 1] − zv [k − 2] zi [k] − zi [k − 1] (46)
i
zi [k − 2] 1

 T
b1 = R0 b2 = R0 V̄
 T  T
b3 = α1 R0 Ř1 V̄ b4 = α η R0 Ř1 Ř2 V̄ (47)
For each of the above model complexities, the noise term nD [k] is expressed in
terms of n̄i [k] and n̄v [k] as follows:


 n̄v1 [k] Model 1
n̄v2 [k] Model 2

n̄v [k] = (48)

 n̄v3 [k] Model 3
n̄v4 [k] Model 4

n̄v1 [k] = n̄v2 [k] = nv [k]


n̄v3 [k] = nv [k] − α1 nv [k − 1]
n̄v4 [k] = nv [k] − (α1 + α2 )nv [k − 1] + α1 α2 nv [k − 2] (49)

11


 n̄i1 [k] Model 1
n̄i2 [k] Model 2

n̄i [k] = (50)

 n̄i3 [k] Model 3
n̄i4 [k] Model 4

n̄i1 [k] = n̄i2 [k] = −R0 ni [k]


n̄i3 [k] = −R0 ni [k] + Ř1 ni [k − 1]
n̄i4 [k] = −R0 ni [k] + Ř1 ni [k − 1] − Ř2 ni [k − 2] (51)
The autocorrelation for all four model orders is as follows:
n o
RnD (0) = E nD [k]nD [k]
 2

 σv + R02 σi2 Model 1
 σv2 + R02 σi2  Model 2



= (1 + α 2
1 )σ 2
v + R 2
0 + Ř 2
1 σi2 Model 3 (52)

  

(1 + α2 + η 2 )σv2 + R02 + Ř12 + Ř22 σi2 Model 4

n o
RnD (1) = E nD [k]nD [k − 1]


 0 Model 1
0 Model 2

= (53)

 −α1 σv2 − R0 Ř1 σi2 Model 3
−α(1 + η)σv2 − Ř1 (R0 + Ř2 )σi2 Model 4

n o
RnD (2) = E nD [k]nD [k − 2]


 0 Model 1
0 Model 2

= (54)

 0 Model 3
ησv2 + R0 Ř2 σi2 Model 4

The auto correlation RnD (l) is zero when l > 2 for all four models.

5 Parameter Estimation Method


The measurements are grouped into batches of equal length Lb . Using (44), the
vector observation model is rewritten for a particular batch of data of length
Lb .
zv [κ] = H[κ]T b + nD [κ] (55)
where κ denotes the batch number,
zv [(κ − 1)Lb + 1] nD [(κ − 1)Lb + 1]
   
zv [(κ − 1)Lb + 2] nD [(κ − 1)Lb + 2]
zv [κ] =   , nD [κ] = 
   
.. .. 
 .   . 
zv [κLb ] nD [κLb ]

12
a[(κ − 1)Lb + 1]
   T
 a1 [k] Model 1
a[(κ − 1)Lb + 2]  T

T a2 [k] Model 2
H[κ] =   , a[k] =
 
..
. aT [k] Model 3
 T3
  

a[κLb ] a4 [k] Model 4

The correlation matrix of the noise vector nD [κ] is written as

E nD [κ]nD [κ]T = RnD [κ]



(56)

where RnD [κ] is a banded symmetric Toeplitz matrix which is diagonal for
Models 1 and Model 2, tridiagonal for Model 3 and pentadiagonal for Model
4. The diagonal entry of RnD [κ] is given by RnD (1) and the first off diagonal
entry is given by RnD (1) and the second off diagonal entry is given by RnD (2)
in (52) to (54). All the other off diagonal elements of RnD [κ] are zero.
Given the κth batch of observations, the least square (LS) estimate of b can
be written as
−1
x̂LS [κ] = H[κ]T RnD [κ]−1 H[κ] H[κ]T RnD [κ]−1 zv [κ] (57)

It can be shown that the covariance of the LS estimation error is


−1
P [κ] = H[κ]T RnD [κ]−1 H[κ] (58)

When the parameter b needs to be estimated using more data the batch
length Lb increases resulting in significantly high computational complexity.
Rather than increasing Lb , a recursive least square (RLS) algorithm can be em-
ployed to achieve the same performance without significantly increasing com-
putational load. Algorithm 1 summarizes one iteration of the RLS algorithm.
The input to this algorithm are the estimate x̂[κ] and the error covariance P[κ]
from the prior batch, the new measurement z[κ + 1] and the new measurement
model H[κ + 1]. The outputs are the new estimate x̂[κ + 1] and the updated
error covariance P[κ + 1].

Algorithm
 1   
x̂[κ + 1], P[κ + 1] = RLS x̂[κ], P[κ], H[κ + 1], z[κ + 1]
1: Update residual covariance:
S[κ + 1] = H[κ + 1]P[κ]H[κ + 1]T + R[κ + 1]
2: Update gain:
W[κ + 1] = P[κ]H[κ + 1]T S[κ + 1]−1
3: Update parameter:
x̂[κ + 1] = x̂[κ] + W[κ + 1] (z[κ + 1] − H[κ + 1]x̂[κ])
4: Update information:
P−1 [κ + 1] = P−1 [κ] + H[κ + 1]T R[κ + 1]−1 H[κ + 1]

13
6 ECM Identification Using R-int Model
Consider the equivalent circuit model (ECM) of a battery shown in Figure 7.
The goal is to estimate the internal voltage E(k) and the resistance R0 based on
the measured voltage v(k) when current i(k) is applied. The measured voltage
across the battery terminals at time (k) can be written as

zv (k) = i(k)R0 + E(k) + n(k) (59)

where n(k) is the voltage measurement noise.

R0 i(k)

+
E(k) v(k)

Figure 7: Equivalent circuit model of a battery.

Consider L consecutive observations:


zv (1) = i(1)R0 + E(1) + n(1)
zv (2) = i(2)R0 + E(2) + n(2)
.. (60)
.
zv (L) = i(L)R0 + E(L) + n(L)

where it is assumed that the current values i(k) are perfectly known, i.e., there
is no noise in the observation model.
The observations (60) can now be written in vector format as

z = Ax + n (61)

where
     
zv (1) i(1) 1 n(1)
 zv (2)   i(2) 1    n(2) 
R0
z =  . , A =  . ..  x = E , n =  ..  (62)
     
 ..   .. .  . 
zv (L) i(L) 1 n(L)
Assuming that n is zero mean i.i.d. Gaussian noise vector with covariance
matrix Σ = σ 2 IL , the least square estimate of x is
−1 T
x̂LS = AT A A z (63)

14
7 Problems
Question 1.
Consider a battery that has a linear OCV-SOC relationship.
(a) Develop the necessary experimental procedures and parameter estimation
equations, similar to the ones detailed in this lecture, for OCV parameter
identification of this battery.

(b) Use the data provided in this lecture to estimate the linear OCV param-
eters.
(c) Propose a systematic approach to decide between the parameters that you
obtained in (b) above and the ones reported in (18)

References
[1] G. L. Plett, Extended Kalman filtering for battery management systems of
lipb-based HEV battery packs: Part 2. Modeling and identification, Journal
of power sources 134 (2) (2004) 262–276.
[2] B. Pattipati, B. Balasingam, G. V. Avvari, K. Pattipati, Y. Bar-Shalom,
Open circuit voltage characterization of lithium-ion batteries, submitted
to, Journal of Power Sources.

15

You might also like