Presentation - UMD MATH - University of Maryland

ASMC 663 End-Of-Semester Presentation
System Identification of Nonlinear
State-Space Battery Models
Wei He
Department of Mechanical Engineering
[email protected]
Course Advisor: Prof. Balan, Prof. Ide
Research Advisor: Dr. Chaochao Chen
Dec. 11 2012
c a lc e
TM
1
University of Maryland
Background
• Lithium-ion batteries are power sources for electric vehicles (EVs).
• State of charge (SOC) estimation of batteries is important for the
optimal energy control and residual range prediction of EVs.
• SOC is the ratio between the remaining charge (Qremain) and the
maximum capacity of a battery (Qmax)
Qremain
SOC 
Qmax
Full: SOC = 100%
c a lc e
TM
Empty: SOC=0%
2
University of Maryland
State-Space Representation of A Battery System
• Process function [1-3] :
 SOCk 1  1 0   SOCk   t / Qmax 
SOC , k 


I

V
 
 V  
 L ,k   
0
A
B
p
,
k

1
p
,
k








 Vp ,k 

 t 
 t  
where A  exp  
B  R p 1  exp  
 C R 
 C R  
p p 

p p 



• Measurement function:
Problem Statement
Vt ,k  OCV ( SOCk )  R0 I L ,k  V p ,k   k
• Process and measurement noise
 SOC ~ N 0,  

V ~ N 0,  
p
 ~ N 0,   
c a lc e
TM
Vp

S OC

The model parameters need to be
identified
   Rp , C p , R0 , Qmax ,  ,    

3
soc
Vp

University of Maryland
Problem Formulation
• Estimate the unknown parameters    Rp , C p , R0 , Qmax ,  ,     in


soc
Vp
 SOCk 1  1 0   SOCk   t / Qmax 
SOC , k 

I

V






 L ,k  
B

 p ,k 1  0 A  V p ,k  
 Vp ,k 

 t 
 t  
where A  exp  
B

R
1

exp

 
 
p
 C R 
C
R
p p 

p p 



Vt ,k  OCV ( SOCk )  R0 I L ,k  V p ,k   k
based on the information in the measured input-output responses
U1:N  I t ,1 , I t , 2 ,..., I t , N , Y1:N  Vt ,1 ,Vt , 2 ,...,Vt , N 
using a maximum likelihood framework
ˆ  arg max p (Y1:N )

 arg max L (Y1:N )

c a lc e
TM
4
University of Maryland
Expectation Maximization (EM)
• Expectation step (E step): calculate the expected value of the log
likelihood function, with respect to the conditional distribution of XN given
YN under the current estimate of the parameters k [4]
Q  , k   Ek  L  X 1:N , Y1:N  | Y1:N    L  X 1:N , Y1:N  pk  X 1:N | Y1:N  dX 1:N
where X is the state variables: SOC and Vp.
• Maximization step (M step): find the parameter that maximizes this
quantity:
 k 1  arg max Q  , k 

If not converged, update k->k+1 and return to step 2
c a lc e
TM
5
University of Maryland
Expectation Maximization (EM)
• Ref[4] have proved that Q  ,k  can be approximated
by a particle smoother:
Q  ,k   I1  I 2  I 3
 
M
I1   w log pk x
i 1
i
1
i
1| N
N 1 M

M
I 2   log w pk x
j
t|N
t 1 i 1 j 1

N 1 M
j
t 1
I 3   w log pk yt | x
t 1 i 1
c a lc e
TM
i
t|N
6
i
t
|x
i
t


University of Maryland
Particle Filter and Smoother
• Particle smoother:
P  xt | Y1:N    wti|N   xt  xti 
M
i 1
i
– The particle smoother weights wt| N can be recursively
calculated from particle filter weights wti
M
i
t|N
w
 w w
i
t
k 1
k
t 1| N
k
t 1
i
t
P ( x | x )
vtk
M
where v   wti P ( x t 1 | x t )
k
t
k
i
i 1
• Particle filter:
n
p( xt | Y1:N )   wti ( xt xti )
i 1
c a lc e
TM
7
University of Maryland
Particle Filtering
• Model prediction given past measurements
p( xk 1 | Y1:k )   p( xk 1 | xk ,Y1:k ) p( xk | Y1:k )dxk
  p( xk 1 | xk ) p( xk | Y1:k )dxk
Process function
c a lc e
TM
8
University of Maryland
Particle Filtering
• Prediction update using current measurement
p( xk 1 | Y1:k 1 )  p( xk 1 | Yk 1 , Y1:k )
posterior
p(Yk 1 | xk 1,Y1:k ) p( xk 1 | Y1:k )

P( B | AC ) P( A | C )
p(Yk 1 | Y1:k )
P( A | BC ) 
P( B | C )
p(Yk 1 | xk 1 ) p( xk 1 | Y1:k )

p(Yk 1 | Y1:k )
p(Yk 1 | Y1:k )   p(Yk 1 | xk 1 ) p( xk 1 | Y1:k )dxk 1
Measurement
Equation
c a lc e
TM
9
State Prediction
University of Maryland
Particle Filtering [5]
P(x)
x
tk
x
tk+1
t
actual state value
actual state trajectory
measured state value
estimated state trajectory
state particle value
particle propagation
state pdf (belief)
particle weight
c a lc e
TM
10
•
represent state as a pdf
•
sample the state pdf as a
set of particles and
associated weights
•
propagate particle values
according to model
•
update weights based on
measurement
University of Maryland
Particle Filtering

Prediction step: use the state update model
p(x k | Y1:k 1 )   p(x k | x k 1 ) p(x k 1 | Y1:k 1 )dx k 1

Update step: with measurement, update the
prior using Bayes’ rule:
p(Yk | x k ) p(x k | Y1:k 1 )
p(xk | Y1:k ) 
p(Yk | Y1:k 1 )
c a lc e
TM
11
University of Maryland
Particle Filter Algorithm [4-7]
1.
Initialize particles, {x0i }iM1 ~ P ( x0 ) and set t = 1.
2.
Predict the particles by drawing M i.i.d samples according to
xti ~ P  xt | xti1  , i  1,..., M
3.
Compute the importance weights wti 
i 1
 

i
P yt | x t
i
wti  w x t 
 P  y

M
j 1
4.
M
t
|x
j
t

, i  1,..., M
For each j = 1,…,M draw a new particle xti with replacement (resample)
according to
j
P( xtj  x t )  wti , i  1,..., M
5.
If t < N increment t  t  1 and return to step 2, otherwise terminate.
c a lc e
TM
12
University of Maryland
Particle Smoother Algorithm [4-7]
1.
i M
Run the particle
filter
and
store
the
predicted
particles
{
x
t }i 1 and their
M
weights wti  , for t = 1,…,N.
i 1
2.
3.
Initialize the smoothed weights to be the terminal filtered weights wt  at
time t = N.
wNi |N  wNi , i  1,..., M
and set t = N-1.
i
Compute the smoothed weights wti| N  using the filtered weights wti 
i
i
i 1
i 1
and particles {x t , x t 1}iM1 via
M
i
t|N
w
4.
M
M
 w w
i
t
k 1
k
t 1| N
k
t 1
i
t
P ( x | x )
vtk
M
where v   wti P ( x t 1 | x t )
k
t
k
i
i 1
Update t  t  1. If t > 0 return to step 3, otherwise terminate.
c a lc e
TM
13
University of Maryland
Simulated Data Sets
• Parameter settings:
Qmax  1.07 Ah R0  0.1  R p  0.1 
C p  10  SOC  108  Vp  106  Q  104
Current
• Process function:
 SOCk 1  1 0   SOCk   t / Qmax 
SOC , k 
V

 V   
 I L ,k    
0
A
B
  p ,k  

 p ,k 1  
 Vp ,k 

 t 
 t  
where A  exp  
B

R
1

exp
 
 
p
 C R 
C
R
p p 

p p 



Current (A)
4
Vt (V)
• Process and measurement noise
c a lc e
TM
SOC
Vp

~ N 0,  V
-2
0
1000
2000
3000
4000
Time(s)
Voltage
5000
6000
7000
8000
0
1000
2000
3000
4000
Time(s)
5000
6000
7000
8000
2
Vt ,k  OCV ( SOCk )  R0 I L ,k  V p ,k   k

0
-4
• Measurement function:
SOC ~ N 0,  
2
p
1
0
  ~ N 0, 

14
-1
University of Maryland
Simulated Hidden States
Hidden States: SOC and Vp
SOC
1
0.5
0
0
1000
2000
3000
4000
Time(s)
5000
6000
7000
8000
0
1000
2000
3000
4000
Time(s)
5000
6000
7000
8000
0.6
Vp
0.4
0.2
0
-0.2
c a lc e
TM
15
University of Maryland
Particle Filtering Result
• Initial guess:
 SOC0  0.5
 Vp    0 
 0   
• Particle number:50
1 0 
P0  

0 1 
1
SOC
Estimated SOC
0.9
0.8
• RMS error = 0.0023
0.7
SOC
0.6
0.5
0.4
0.3
0.2
0.1
0
c a lc e
TM
0
1000
16
2000
3000
4000
Time (S)
5000
6000
7000
8000
University of Maryland
Particle Smoothing Result
1
SOC
Estimated SOC
0.9
0.8
0.7
SOC
0.6
0.5
0.4
0.3
0.2
0.1
0
0
1000
2000
3000
4000
Time (S)
5000
6000
7000
8000
RMS error = 0.0017
c a lc e
TM
17
University of Maryland
Project Schedule and Milestones
• Project proposal: October 5 2012
• Algorithm Implementation:
- Particle filter and smoother: December 1 2012
- The full algorithm (particle EM): February 1 2012
• Validation: March 15 2012
• Testing: April 15 2012
• Final Report: May 1 2012
c a lc e
TM
18
University of Maryland
References
1.
2.
3.
4.
5.
6.
7.
H. He, R. Xiong, and H. Guo, Online estimation of model parameters and stateof-charge of LiFePO4 batteries in electric vehicles. Applied Energy, 2012. 89(1):
p. 413-420.
C. Hu, B.D. Youn, and J. Chung, A Multiscale Framework with Extended Kalman
Filter for Lithium-Ion Battery SOC and Capacity Estimation. Applied Energy,
2012. 92: p. 694-704.
H.W. He, R. Xiong, and J.X. Fan, Evaluation of Lithium-Ion Battery Equivalent
Circuit Models for State of Charge Estimation by an Experimental Approach.
Energies, 2011. 4(4): p. 582-598.
T.B. Schön, A. Wills, and B. Ninness, System identification of nonlinear statespace models. Automatica, 2011. 47(1): p. 39-49.
Bhaskar Saha, Introduction to Particle Filters, NASA.
M.S. Arulampalam, S. Maskell, N. Gordon, and T. Clapp, A tutorial on particle
filters for online nonlinear/non-Gaussian Bayesian tracking. Signal Processing,
IEEE Transactions on, 2002. 50(2): p. 174-188.
A. Doucet and A.M. Johansen, A tutorial on particle filtering and smoothing:
fifteen years later. Handbook of Nonlinear Filtering, 2009: p. 656-704.
c a lc e
TM
19
University of Maryland