0% found this document useful (0 votes)
6 views

Lecture 10_Model-based Prognostics via Particle Filtering

Lecture 10 covers model-based prognostics using particle filtering, focusing on state-space modeling and the implementation of a particle filter for estimating hidden states in dynamic systems. It contrasts model-based and data-driven prognostics, emphasizing the use of known physics-of-failure in the former. The lecture also includes a detailed pseudocode for the particle filter algorithm and its application in estimating the remaining useful life of lithium-ion batteries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Lecture 10_Model-based Prognostics via Particle Filtering

Lecture 10 covers model-based prognostics using particle filtering, focusing on state-space modeling and the implementation of a particle filter for estimating hidden states in dynamic systems. It contrasts model-based and data-driven prognostics, emphasizing the use of known physics-of-failure in the former. The lecture also includes a detailed pseudocode for the particle filter algorithm and its application in estimating the remaining useful life of lithium-ion batteries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Lecture 10: Model-Based Prognostics via

Particle Filtering
Lecture #10
Outline

• Recall: Model-Based Prognostics

• State-Space Modeling of Dynamic System


• Discrete-Time State-Space Model
• Bayesian Network of Hidden Markov Model (HMM)

• Particle Filter
• Basics of Recursive Bayesian Filtering: Flowchart
• Numerical Implementation: Pseudocode
• Example: Aircraft Positioning

2
Recall: Unit-Wise Lifetime Prediction

Approaches to Time-Dependent Reliability Analysis

Population-wise (classical) Unit-wise (PHM)


Life PDF

Life PDF
1 Lifetime 1 Lifetime
2 2
3 Unit- 3 Unit-
4 independent 4 dependent
Unit ID Unit ID

3
Recall: Model-Based and Data-Driven Prognostics

Model-Based Prognostics Data-Driven Prognostics

Load signals Response Training Test signals


signals signals

Simulation Estimation Offline Process Online Process

Identify Update Extract Extract


model parameters Predicted offline HI1 Online HI Predicted
RUL RUL
Simulate Update & Build health Project or
with model project HI1 knowledge interpolate
1Health Index 1Health Index

Characteristics (Model-based) Characteristics (Data-Driven)


• Assumption: Known physics-of-failure (PoF); • Assumption: Large volumes of run-to-
few run-to-failure data failure data
• Key element: Online identification of PoF- • Key element: Offline training and online
based degradation model prediction processes

4
Model-Based Prognostics Using Particle Filter

State-Space Modeling of Dynamic System


 Formulation of discrete-time state-space model
Transition:
= x k f ( x k −1 , u k −1 ) + ω k
Measurement:
= y k g ( xk ) + v k
– xk is the vector of system states at the kth measurement step
– uk–1 is the vector of measured exogenous inputs
– ωk is the vector of process noise for states
– yk is the vector of system observations (or measurements)
– vk is the vector of measurement noise
– f(•,•) and g(•) are the state transition and measurement functions, respectively

5
Model-Based Prognostics Using Particle Filter

A Bayesian Network of a Hidden Markov Model (HMM)


 The dynamic system depicted by the HMM consists of:
1) The hidden states x that evolve according to the state transition equation;
2) The measurement y that is directly related to the states by the measurement
equation.

State transition:
p(xk | xk–1)

Hidden states p1(x) x1 x2 … xK


Measurement
model: p(yk | xk)
Measurement y1 y2 … yK


Time step
1 2 K k

6
Model-Based Prognostics Using Particle Filter

Objective of Filtering Problem


 To estimate sequentially the posterior probability density
p(xk | y1:k) of the hidden states xk, given the measurements y1:k at
any time step k

State transition:
p(xk | xk–1)

Hidden states p1(x) x1 x2 … xK


Measurement
model: p(yk | xk)
Measurement y1 y2 … yK


Time step
1 2 K k

7
Recall: Model-Based Prognostics of Lithium-Ion Battery

How It Works?
Current
cycle
Statistical Model extrapolation
100 estimates
Normalized capacity (%)

True end
of life Capacity
State transition: measurement yk
90 p(xk | xk–1)
p(xk) p(xk | yk)
Bayesian model
80 update
End of life limit

70 Capacity fade
0 100 200 300 400 500 model y = f(x,t)
Cycle number
Measurement:
p(yk | xk)

Hu C., Jain G., Tamirisa P., and Gorka T., “Method for Estimating Capacity and Predicting Remaining Useful Life of Lithium-Ion
Battery,” Applied Energy, v126, p182–189, 2014.

8
Model-Based Prognostics Using Particle Filter

State-Space Modeling of Battery Degradation


 Formulation of discrete-time state-space model
Transition: αk =
α k −1 + ω1,k , λk =
λk −1 + ω2,k , β k =
β k −1 + ω3,k
1 − α k 1 − exp ( −λk k )  − β k k + vk
Measurement: yk =
  
ck

– α, λ, and β are the parameters of a hybrid linear/exponential capacity fade


model
– yk is the capacity measurement (or the capacity estimate by an algorithm) at
the kth charge/discharge cycle
– ω1, ω2, ω3, and v are the Gaussian noise variables with zero means
 The inference task is to learn on the fly the capacity fade
behavior of a battery cell by tracking the evolution of the fade
parameters (or states), x, based on the capacity estimate (or
measurement), y, from the cell.

9
Model-Based Prognostics Using Particle Filter

Basics of Particle Filter


 It is often difficult or even impossible to derive an analytical form
of the updated posterior p(xk | y1:k).
 It is, however, easier to draw samples (or particles) from the true
posterior (or a distribution proportional to the posterior) and
devise an approximation to the posterior based on the particles.
 In particle filter, the state posterior is built based on a set of
particles and their associated weights, expressed as
p ( x k | y1:k ) ≈ ∑ j =P1 wkjδ ( x k − x kj )
N

𝑗𝑗 𝑗𝑗
– 𝐱𝐱𝑘𝑘 and 𝑤𝑤𝑘𝑘 are respectively the particles and weights
𝑗𝑗=1:𝑁𝑁𝑃𝑃 𝑗𝑗=1:𝑁𝑁𝑃𝑃
estimated at the kth measurement step
– NP is the number of particles
– δ is the Dirac delta function

10
Model-Based Prognostics Using Particle Filter

Basics of Particle Filter


 If the particles are drawn from a proposal importance density
q(xk | xk–1, yk), the weight of the jth particle at the kth step takes
the following form
Likelihood of Prior density
measurement of states

p ( yk | x kj ) p ( x kj | x kj −1 )
wkj ∝ wkj−1
q ( x kj | x kj −1 , yk ) Proposal density

 For the purpose of convenient implementation, the so-called


transition prior, p(xk | xk–1), is often used as the proposal
importance density, i.e., q(xk | xk–1, yk) = p(xk | xk–1).
 Substituting this transition prior into the weight equation yields a
simplified form of the weight, wkj ∝ wk–1j p(yk | xkj), which is the
most common choice of weighting scheme.

11
Model-Based Prognostics Using Particle Filter

Numerical Implementation of Particle Filter: Pseudocode


Algorithm 1: Generic Particle Filter
Inputs: K – Number of measurement steps;
u1:K, y1:K – Measurements;
p0 – Initial probability distribution of states x;
NP – Number of particles.
𝑗𝑗 𝑗𝑗
Outputs: 𝐱𝐱1:𝐾𝐾 and 𝑤𝑤1:𝑇𝑇 – Updated particles and their weights.
𝑗𝑗=1:𝑁𝑁𝑃𝑃 𝑗𝑗=1:𝑁𝑁𝑃𝑃
Particle
1. Draw initial particles {x0j}j = 1:NP from initial distribution p0(x), and assign
equal weights to initial particles: w0j = 1/NP, for j = 1 : NP. initialization
2. k = 1;
3. while k <= K do
for j = 1 : NP do
4. Evolve particle: xkj = f(xk–1j, uk–1j) + ωkj ► State transition
State transition
5. Evaluate importance weight of particle: wk ∝ wk–1 p(yk | xkj)
j j

6. end for Weight evaluation


𝑁𝑁𝑃𝑃 𝑗𝑗
7. Calculate total weight: 𝑊𝑊𝑘𝑘 = ∑𝑗𝑗=1 𝑤𝑤𝑘𝑘
8. for j = 1 : NP do
𝑗𝑗 𝑗𝑗
9. Normalize importance weight: 𝑤𝑤 �𝑘𝑘 = 𝑤𝑤𝑘𝑘 /𝑊𝑊𝑘𝑘
𝑗𝑗 𝑗𝑗
10. Assign normalized weight to particle: 𝑤𝑤𝑘𝑘 = 𝑤𝑤 �𝑘𝑘
11. end for Weight normalization
12. Resample by multiplying/suppressing samples {xkj}j = 1:NP with respect to
𝑗𝑗
high/low importance weights {𝑤𝑤𝑘𝑘 }j = 1:NP.
Resampling
13. Assign equal weights to resampled particles: wkj = 1/NP, for j = 1 : NP.
14. k = k + 1;
15. end while 12
A Step-by-Step Walkthrough of Particle Filter 𝑄𝑄(𝑘𝑘) = 1 − 𝛼𝛼 1 − exp −𝜆𝜆𝑘𝑘 − 𝛽𝛽𝑘𝑘
[Pitt and Shephard, 1999, Journal of the American Statistical
T
Association] 𝐱𝐱 = 𝛼𝛼, 𝜆𝜆, 𝛽𝛽

Ten initial particles (𝑁𝑁P = 10)

𝑖𝑖
𝐱𝐱 𝑘𝑘−1 , 𝑁𝑁P−1
State transition:
step 𝑘𝑘 − 1  𝑘𝑘 𝐱𝐱� 𝑘𝑘𝑖𝑖 , 𝑁𝑁P−1

Hu C., Jain G., Tamirisa P., and Gorka T., “Method for Estimating Capacity and Predicting Remaining Useful Life of Lithium-Ion
Battery,” Applied Energy, v126, p182–189, 2014.

13
A Step-by-Step Walkthrough of Particle Filter 𝑄𝑄(𝑘𝑘) = 1 − 𝛼𝛼 1 − exp −𝜆𝜆𝑘𝑘 − 𝛽𝛽𝑘𝑘
[Pitt and Shephard, 1999, Journal of the American Statistical
T
Association] 𝐱𝐱 = 𝛼𝛼, 𝜆𝜆, 𝛽𝛽

Ten initial particles (𝑁𝑁P = 10)

𝑖𝑖
𝐱𝐱 𝑘𝑘−1 , 𝑁𝑁P−1
State transition:
step 𝑘𝑘 − 1  𝑘𝑘 𝐱𝐱� 𝑘𝑘𝑖𝑖 , 𝑁𝑁P−1

Weight evaluation:
step 𝑘𝑘

𝐱𝐱� 𝑘𝑘𝑖𝑖 , 𝑤𝑤
�𝑘𝑘𝑖𝑖

Hu C., Jain G., Tamirisa P., and Gorka T., “Method for Estimating Capacity and Predicting Remaining Useful Life of Lithium-Ion
Battery,” Applied Energy, v126, p182–189, 2014.

14
A Step-by-Step Walkthrough of Particle Filter 𝑄𝑄(𝑘𝑘) = 1 − 𝛼𝛼 1 − exp −𝜆𝜆𝑘𝑘 − 𝛽𝛽𝑘𝑘
[Pitt and Shephard, 1999, Journal of the American Statistical
T
Association] 𝐱𝐱 = 𝛼𝛼, 𝜆𝜆, 𝛽𝛽

Ten initial particles (𝑁𝑁P = 10)

𝑖𝑖
𝐱𝐱 𝑘𝑘−1 , 𝑁𝑁P−1
State transition:
step 𝑘𝑘 − 1  𝑘𝑘 𝐱𝐱� 𝑘𝑘𝑖𝑖 , 𝑁𝑁P−1

Weight evaluation:
step 𝑘𝑘

𝐱𝐱� 𝑘𝑘𝑖𝑖 , 𝑤𝑤
�𝑘𝑘𝑖𝑖
� 𝑖𝑖
𝑄𝑄(𝑘𝑘; 𝐱𝐱� 𝑘𝑘1 )
Probability
density

𝑄𝑄(𝑘𝑘) 𝑄𝑄

Hu C., Jain G., Tamirisa P., and Gorka T., “Method for Estimating Capacity and Predicting Remaining Useful Life of Lithium-Ion
Battery,” Applied Energy, v126, p182–189, 2014.

15
A Step-by-Step Walkthrough of Particle Filter 𝑄𝑄(𝑘𝑘) = 1 − 𝛼𝛼 1 − exp −𝜆𝜆𝑘𝑘 − 𝛽𝛽𝑘𝑘
[Pitt and Shephard, 1999, Journal of the American Statistical
T
Association] 𝐱𝐱 = 𝛼𝛼, 𝜆𝜆, 𝛽𝛽

Ten initial particles (𝑁𝑁P = 10)

𝑖𝑖
𝐱𝐱 𝑘𝑘−1 , 𝑁𝑁P−1
State transition:
step 𝑘𝑘 − 1  𝑘𝑘 𝐱𝐱� 𝑘𝑘𝑖𝑖 , 𝑁𝑁P−1

Weight evaluation:
step 𝑘𝑘

𝐱𝐱� 𝑘𝑘𝑖𝑖 , 𝑤𝑤
�𝑘𝑘𝑖𝑖
� 𝑖𝑖
𝑄𝑄(𝑘𝑘; 𝐱𝐱� 𝑘𝑘2 )
Probability
density

𝑄𝑄(𝑘𝑘) 𝑄𝑄

Hu C., Jain G., Tamirisa P., and Gorka T., “Method for Estimating Capacity and Predicting Remaining Useful Life of Lithium-Ion
Battery,” Applied Energy, v126, p182–189, 2014.

16
A Step-by-Step Walkthrough of Particle Filter 𝑄𝑄(𝑘𝑘) = 1 − 𝛼𝛼 1 − exp −𝜆𝜆𝑘𝑘 − 𝛽𝛽𝑘𝑘
[Pitt and Shephard, 1999, Journal of the American Statistical
T
Association] 𝐱𝐱 = 𝛼𝛼, 𝜆𝜆, 𝛽𝛽

Ten initial particles (𝑁𝑁P = 10)

𝑖𝑖
𝐱𝐱 𝑘𝑘−1 , 𝑁𝑁P−1
State transition:
step 𝑘𝑘 − 1  𝑘𝑘 𝐱𝐱� 𝑘𝑘𝑖𝑖 , 𝑁𝑁P−1

Weight evaluation:
step 𝑘𝑘

Resampling 𝐱𝐱� 𝑘𝑘𝑖𝑖 , 𝑤𝑤


�𝑘𝑘𝑖𝑖
step 𝑘𝑘
𝐱𝐱 𝑘𝑘𝑖𝑖 , 𝑁𝑁P−1

Hu C., Jain G., Tamirisa P., and Gorka T., “Method for Estimating Capacity and Predicting Remaining Useful Life of Lithium-Ion
Battery,” Applied Energy, v126, p182–189, 2014.

17
A Step-by-Step Walkthrough of Particle Filter 𝑄𝑄(𝑘𝑘) = 1 − 𝛼𝛼 1 − exp −𝜆𝜆𝑘𝑘 − 𝛽𝛽𝑘𝑘
[Pitt and Shephard, 1999, Journal of the American Statistical
T
Association] 𝐱𝐱 = 𝛼𝛼, 𝜆𝜆, 𝛽𝛽

Ten initial particles (𝑁𝑁P = 10)

𝑖𝑖
𝐱𝐱 𝑘𝑘−1 , 𝑁𝑁P−1
State transition:
step 𝑘𝑘 − 1  𝑘𝑘 𝐱𝐱� 𝑘𝑘𝑖𝑖 , 𝑁𝑁P−1

Weight evaluation:
step 𝑘𝑘

Resampling 𝐱𝐱� 𝑘𝑘𝑖𝑖 , 𝑤𝑤


�𝑘𝑘𝑖𝑖
step 𝑘𝑘
𝐱𝐱 𝑘𝑘𝑖𝑖 , 𝑁𝑁P−1
State transition:
step 𝑘𝑘  𝑘𝑘 + 1 𝑖𝑖
𝐱𝐱� 𝑘𝑘+1 , 𝑁𝑁P−1

Hu C., Jain G., Tamirisa P., and Gorka T., “Method for Estimating Capacity and Predicting Remaining Useful Life of Lithium-Ion
Battery,” Applied Energy, v126, p182–189, 2014.

18
Model-Based Prognostics Using Particle Filter

Example on Aircraft Positioning with Particle Filter


 This toy example mimics a navigation problem in one-dimension.
 The objective is to track the position of an aircraft, x, based on the
measurement of terrain altitude, y.
 The terrain altitude does not have a one-to-one mapping with the position.
However, the terrain profile over a duration is unique for the fly trajectory.

Current
position x

Terrain
Terrain profile
altitude y

Photo Courtesy of Andreas Svensson: http://www.it.uu.se/katalog/andsv164


19
Model-Based Prognostics Using Particle Filter

Example on Aircraft Positioning with Particle Filter


 Group discussion (4 min): How to formulate a discrete-time state-
space model for this navigation (or position tracking) problem?

Transition:
= xk f ( xk −1 , uk −1 ) + ωk Generic state-
Measurement:
= yk g ( xk ) + vk space model

Transition: xk = xk −1 + uk −1 + ωk State-space model


Measurement:
= yk g ( xk ) + vk for this problem

– xk is the position of the aircraft at the kth measurement step


– uk–1 is the measured velocity at the (k–1)th measurement step
– ωk is the process noise representing unmeasurable velocity disturbance
– yk is the measured terrain altitude
– vk is the measurement noise
– g(•) is the known terrain profile as a function of aircraft position
20
Model-Based Prognostics Using Particle Filter

Example on Position Tracking with Particle Filter


 First two subplots: approximations of p(x1 | y1) before and after
resampling, respectively, at step 1. Initial particles
 Last subplot: approximation of p(x2 | y1). 𝑗𝑗
𝑥𝑥�1 , 𝑁𝑁𝑃𝑃−1
𝑗𝑗=1:𝑁𝑁𝑃𝑃
Current position
0.1
0.05
Measurement update
𝑗𝑗 𝑗𝑗
0 𝑥𝑥�1 , 𝑤𝑤1
-40 -20 0 20 40 𝑗𝑗=1:𝑁𝑁𝑃𝑃
-3
10
5 Resampling
𝑗𝑗
0 𝑥𝑥1 , 𝑁𝑁𝑃𝑃−1
-40 -20 0 20 40 𝑗𝑗=1:𝑁𝑁𝑃𝑃
-3
10
5 State transition
𝑗𝑗
0 𝑥𝑥2 , 𝑁𝑁𝑃𝑃−1
-40 -20 0 20 40 𝑗𝑗=1:𝑁𝑁𝑃𝑃
Position x
Gustafsson F., "Particle filter theory and practice with positioning applications." IEEE Aerospace and Electronic Systems
Magazine, v25, n7, p53–82, 2010.

21
Model-Based Prognostics Using Particle Filter

Example on Position Tracking with Particle Filter


 First two subplots: approximations of p(x11 | y1:11) before and
after resampling, respectively, at step 11. Initial particles
 Last subplot: approximation of p(x12 | y1:11). 𝑗𝑗
𝑥𝑥�11 , 𝑁𝑁𝑃𝑃−1
𝑗𝑗=1:𝑁𝑁𝑃𝑃
Current position
0.1
0.05
Measurement update
𝑗𝑗 𝑗𝑗
0 𝑥𝑥�11 , 𝑤𝑤𝑘𝑘
-40 -20 0 20 40 𝑗𝑗=1:𝑁𝑁𝑃𝑃
-3
10
5 Resampling
𝑗𝑗
0 𝑥𝑥11 , 𝑁𝑁𝑃𝑃−1
-40 -20 0 20 40 𝑗𝑗=1:𝑁𝑁𝑃𝑃
-3
10
5 State transition
𝑗𝑗
0 𝑥𝑥12 , 𝑁𝑁𝑃𝑃−1
-40 -20 0 20 40 𝑗𝑗=1:𝑁𝑁𝑃𝑃
Position x
Gustafsson F., "Particle filter theory and practice with positioning applications." IEEE Aerospace and Electronic Systems
Magazine, v25, n7, p53–82, 2010.

22
Model-Based Prognostics Using Particle Filter

Example on Position Tracking with Particle Filter


 First two subplots: approximations of p(x21 | y1:21) before and
after resampling, respectively, at step 21. Initial particles
 Last subplot: approximation of p(x22 | y1:21). 𝑗𝑗
𝑥𝑥�21 , 𝑁𝑁𝑃𝑃−1
𝑗𝑗=1:𝑁𝑁𝑃𝑃
-3
Current position
10
5 Measurement update
𝑗𝑗 𝑗𝑗
0 𝑥𝑥�21 , 𝑤𝑤𝑘𝑘
-40 -20 0 20 40 𝑗𝑗=1:𝑁𝑁𝑃𝑃
-3
10
5 Resampling
𝑗𝑗
0 𝑥𝑥21 , 𝑁𝑁𝑃𝑃−1
-40 -20 0 20 40 𝑗𝑗=1:𝑁𝑁𝑃𝑃
-3
10
5 State transition
𝑗𝑗
0 𝑥𝑥22 , 𝑁𝑁𝑃𝑃−1
-40 -20 0 20 40 𝑗𝑗=1:𝑁𝑁𝑃𝑃
Position x
Gustafsson F., "Particle filter theory and practice with positioning applications." IEEE Aerospace and Electronic Systems
Magazine, v25, n7, p53–82, 2010.

23
Model-Based Prognostics Using Particle Filter

Example on Position Tracking with Particle Filter


 First two subplots: approximations of p(x41 | y1:41) before and
after resampling, respectively, at step 41. Initial particles
 Last subplot: approximation of p(x42 | y1:41). 𝑗𝑗
𝑥𝑥�41 , 𝑁𝑁𝑃𝑃−1
𝑗𝑗=1:𝑁𝑁𝑃𝑃
Current position
0.1
0.05
Measurement update
𝑗𝑗 𝑗𝑗
0 𝑥𝑥�41 , 𝑤𝑤𝑘𝑘
-40 -20 0 20 40 𝑗𝑗=1:𝑁𝑁𝑃𝑃
-3
10
5 Resampling
𝑗𝑗
0 𝑥𝑥41 , 𝑁𝑁𝑃𝑃−1
-40 -20 0 20 40 𝑗𝑗=1:𝑁𝑁𝑃𝑃
-3
10
5 State transition
𝑗𝑗
0 𝑥𝑥42 , 𝑁𝑁𝑃𝑃−1
-40 -20 0 20 40 𝑗𝑗=1:𝑁𝑁𝑃𝑃
Position x
Gustafsson F., "Particle filter theory and practice with positioning applications." IEEE Aerospace and Electronic Systems
Magazine, v25, n7, p53–82, 2010.

24
Model-Based Prognostics Using Particle Filter

Example on Position Tracking with Particle Filter


 Overall performance of position tracking

60

40

20 Resampled
particles
Position

True
0 position

-20

-40
0 10 20 30 40 50 60
Time step ( k)

Gustafsson F., "Particle filter theory and practice with positioning applications." IEEE Aerospace and Electronic Systems
Magazine, v25, n7, p53–82, 2010.

25
Model-Based Prognostics Using Particle Filter

Comparing Particle Filter with other Bayesian Filtering Techniques

Extended Unscented
Applicable Kalman filter
Kalman filter Kalman filter Particle filter (PF)
domain (KF)
(EKF) (UKF)
Mildly nonlinear
systems Nonlinear
State-space
(linearized with systems (can Nonlinear
model Linear systems
first- or second- handle quadratic systems
(f and g)
order Tayler terms)
expansion)
Process and
meas. noise Gaussian Gaussian Gaussian Non-Gaussian
(ω and ν)
Posterior Unimodel (only
Unimodel (only Unimodel and
distribution Gaussian one peak) and
one peak) multimodel
[p(xk|y1:k)] symmetric

Gustafsson F., "Particle filter theory and practice with positioning applications." IEEE Aerospace and Electronic Systems
Magazine, v25, n7, p53–82, 2010.

26

You might also like