Skip to main content
. Author manuscript; available in PMC: 2022 Mar 8.
Published in final edited form as: IFAC Pap OnLine. 2021 Sep 15;54(7):511–516. doi: 10.1016/j.ifacol.2021.08.411

Algorithm 3.

Backward Simulation Particle Smoother

1: /* simulate T smoothed trajectories from time N */
2: for k = 1 to T do
3:  /* draw index according to weights {wNj}j=1M */
4:  set x˜NNk=x˜N.
5: end for
6: /* propagate the remaining simulated trajectories */
7: for t = N − 1 to 1 do
8: for k = 1 : T do
9:   /* compute new weights */
10:   w˜tNj,kwtjf(x˜t+1Nkxtj) for j = 1, …, M.
11:   /* normalize the smoothing weights */
12:   w˜tNj,k=w˜tNj,kj=1Mw˜tNj,k,j=1,,M.
13:   /* draw index according to {w˜tNj,k}j=1M */
14:   set x˜tNk=x˜t.
15: end for
16: end for