Particle Filter

The linear and quasi-linear approaches proposed by Kalman can be used for problems in which the state is Gaussian or nearly Gaussian, with a unimodal distribution: the state estimate at time $k$ is a direct function of the single state estimate at time $k-1$ and its covariance.

When the non-Gaussian probability distribution of the system state $p(x_k; u_{k-1}; z_{k})$ at time $k$ must be determined as a function of the inputs and observations, Kalman-type approaches are no longer adequate.

Grid-based approaches are suitable for the relatively uncommon problems in which the state is finite and can be discretized. Histogram Filters/Occupancy Grid Methods apply to a broader class of problems, but scale very poorly as dimensionality increases because they sample the state uniformly.

Consider again the result given by Equation (2.4): to extract a general statistic $h(\cdot)$ (for example, the mean or variance) from a probability distribution $p(x)$, we use the expression

\begin{displaymath}
\bar{h} \stackrel{def}{=} \int_X h(x) p(x) dx
\end{displaymath} (3.41)

If this estimate cannot be obtained analytically, it can still be found indirectly by analyzing $x_i$ independent samples, with $1 \leq i \leq N$, drawn randomly from the exact distribution $p$.

Given the samples $x_i$ generated in this way, the Monte Carlo estimate of $h(\cdot)$ is

\begin{displaymath}
\bar{h} \approx \frac{1}{N} \sum_{i=1}^{N} h(x_i)
\end{displaymath} (3.42)

Monte Carlo does not solve every problem, nor does it suggest how to obtain random samples efficiently. The problem becomes significant in high-dimensional cases, where the regions in which the probability takes appreciable values are extremely small. The goal of Importance Sampling (IS) is to sample the distribution $p(x)$ in “important” regions to maximize computational efficiency.

The idea behind Importance Sampling is to use a simpler distribution $q(x)$ (importance density) instead of the true distribution $p(x)$, which is usually difficult to sample (or reproduce), making the substitution

\begin{displaymath}
\int_X h(x) p(x) dx = \int_X h(x) \frac{p(x)}{q(x)} q(x) dx = \int_X h(x) w(x) q(x) dx
\end{displaymath}

where the system of weights $w(x)$ has been introduced.

With suitable weights, Equation (3.42) can therefore be rewritten as

\begin{displaymath}
\bar{h}
\approx
\sum_{i=1}^{N}
w_i h(x_i)
\end{displaymath} (3.43)

where

\begin{displaymath}
W_i = \frac{p(x_i)}{q(x_i)}
\end{displaymath}

is a correction factor, called the importance weight, that converts the proposal distribution $q$ into the true distribution $p$. The weights are then normalized
\begin{displaymath}
w_i =
\frac{W_i}
{\sum_{j=1}^{N} W_j}
\end{displaymath} (3.44)

so that

\begin{displaymath}
\sum_{i=1}^{N} w_i = 1.
\end{displaymath}

The closer the distribution $q(x)$ is to $p(x)$ in the regions of highest probability, the lower the variance of the weights and the more efficient the estimate. On the other hand, the distribution $q(x)$ must be very easy to sample from; the uniform or Gaussian distribution, for example, may be used.

Bayesian filtering and Monte Carlo techniques provide the basis for particle filter theory. The state at time $k$ is represented by a set of samples (particles), each of which is a hypothesis about the state to be evaluated. The particles can be viewed as a set of prior samples, obtained by applying Equation (3.43) to the state evolution function.

By applying Bayesian theory directly to samples from the estimated distribution, the weights $w_i$ associated with the samples can be updated using both the system and perception models (Sequential Importance Sampling):

\begin{displaymath}
w_{k,i} \propto w_{k-1,i} \frac{ p (z_k \vert x_{k,i} ) p (x_{k,i} \vert x_{k-1,i} ) } { q (x_{k,i} \vert x_{k-1,i}, z_k ) }
\end{displaymath} (3.45)

At each iteration, the particles are propagated according to the proposal distribution $q(\cdot)$, and their weights $w_i$ are updated recursively according to Equation (3.45).

When possible, it is convenient to use the prior distribution as the importance density:

\begin{displaymath}
q (x_{k,i} \vert x_{k-1,i}, z_k ) = p (x_{k,i} \vert x_{k-1,i} )
\end{displaymath} (3.46)

Substituting this into (3.45) gives
\begin{displaymath}
w_{k,i} \propto w_{k-1,i} p (z_k \vert x_{k,i} )
\end{displaymath} (3.47)

The problem with the SIS approach is that, after a few iterations, only a small number of particles have non-negligible weights (weight degeneracy).



Subsections
Paolo medici
2026-10-19