2007-07-27

"Direct version" algorithm of Particle Filter

"Direct version" algorithm

The "direct version" algorithm is rather simple (compared to other particle filtering algorithms) and it uses composition and rejection. To generate a single sample x at k from p_{x_k|y_{1:k}}(x|y_{1:k}):

1) Set p=1
2) Uniformly generate L from {1,...,P}
3) Generate a test \hat{x} from its distribution p_{x_k|x_{k-1}}(x|x_{k-1|k-1}^{(L)})
4) Generate the probability of \hat{y} using \hat{x} from p_{y|x}(y_k|\hat{x}) where yk is the measured value
5) Generate another uniform u from [0,mk]
6) Compare u and \hat{y}
6a) If u is larger then repeat from step 2
6b) If u is smaller then save \hat{x} as xk | k(p) and increment p
7) If p > P then quit

The goal is to generate P "particles" at k using only the particles from k − 1. This requires that a Markov equation can be written (and computed) to generate a xk based only upon xk − 1. This algorithm uses composition of the P particles from k − 1 to generate a particle at k and repeats (steps 2-6) until P particles are generated at k.

This can be more easily visualized if x is viewed as a two-dimensional array. One dimension is k and the other dimensions is the particle number. For example, x(k,L) would be the Lth particle at k and can also be written x_k^{(L)} (as done above in the algorithm). Step 3 generates a potential xk based on a randomly chosen particle (x_{k-1}^{(L)}) at time k − 1 and rejects or accepts it in step 6. In other words, the xk values are generated using the previously generated xk − 1.

沒有留言: