Recursive Bayes Filter
![/edward_page/recursive_bayes_filter/featured-image.jpg /edward_page/recursive_bayes_filter/featured-image.jpg](/edward_page/recursive_bayes_filter/featured-image.jpg)
Contents
Recursive Bayes Filter
Estimate the state $x$ of a system given observations $z$ and controls $u$ :
$$
\begin{align*}
bel(x_t) &= p(x_t|z_{1:t}, u_{1:t})= \frac{p(z_t|x_t,z_{1:t-1},u_{1:t})p(x_t|z_{1:t-1},u_{1:t})}{p(z_t|z_{1:t-1},u_{1:t})}&\text {(Bayes' rule)}
\\ &=\eta p(z_t|x_t,z_{1:t-1},u_{1:t})p(x_t|z_{1:t-1},u_{1:t})
\\ &=\eta p(z_t|x_t)p(x_t|z_{1:t-1},u_{1:t}) &\text { (Markov assumption)}
\\&=\eta p(z_t|x_t) \int p(x_t|x_{t-1},z_{1:t-1},u_{1:t})p(x_{t-1}|z_{1:t-1}, u_{1:t})dx_{t-1} &\text { (Law of total probablility)}
\\&=\eta p(z_t|x_t) \int p(x_t|x_{t-1},u_{t})p(x_{t-1}|z_{1:t-1}, u_{1:t})dx_{t-1} &\text { (Markov assumption)}
\\&=\eta p(z_t|x_t) \int p(x_t|x_{t-1},u_{t})p(x_{t-1}|z_{1:t-1}, u_{1:t-1})dx_{t-1} &\text { (Independence assumption)}
\end{align*}
$$
So that Bayes filter can be written as two step process:
- Prediction step:
$$
\begin{align}
\overline {bel(x_t)} &= \int p(x_t|x_{t-1},u_{t})p(x_{t-1}|z_{1:t-1}, u_{1:t-1})dx_{t-1}\\
&= \int p(x_t|x_{t-1},u_{t})bel(x_{t-1})dx_{t-1}
\end{align}
$$
- Correction step:
$$
\begin{align}
bel(x_t) = \eta p(z_t|x_t)\overline {bel(x_t)}
\end{align}
$$
conclusions
- Bayes filter is a framework for state estimation
- The dynamics of the robot and its environment are characterized in the form of two probabilistic laws:
- state transition distribution
- measurement distribution.
Bayes rule
Starts from conditional probability:
- Discrete
$$
\begin{align}
p(x|y) &= \frac{p(x,y)}{p(y)} \\
&= \frac{p(y|x)p(x)}{p(y)} \\
&=\frac{p(y|x)p(x)}{\sum_{x'} p(y|x')p(x')}
\end{align}
$$
- Continuous
$$
\begin{align}
p(x|y) &= \frac{p(x,y)}{p(y)} \\
&= \frac{p(y|x)p(x)}{p(y)} \\
&=\frac{p(y|x)p(x)}{\int p(y|x')p(x')dx'}
\end{align}
$$
Law of Total Probability
Discrete case:
$$
\begin{align}
P(A) &= \sum_n P(A \cap B_n)\\
&= \sum_n P(A|B_n)P(B_n)
\end{align}
$$
Discrete case:$$
\begin{align}
P(A) &= \int_{-\infty}^\infty P(A| X=x)dF_X(x)\\
&= \int_{-\infty}^\infty P(A| X=x)f_X(x)dx
\end{align}
$$
Motion Model and Observation Model
The term $p(x_t|x_{t-1},u_{t})$ is motion model
The term $p(z_t|x_{t})$ is observation or sensor model
Assignment
Consider a robot that navigates in a discrete 1D grid world composed by 15 cells as the one illustrated below.
The floor can be either black (0) or white (1)
In this world, the robot can move forward (F) or backward (B).
Given a command, it moves according to the following motion model:
- with probability 0.7, it moves in the correct direction (i.e. F→F,B→B );
- with probability 0.2 or if the command cannot be exectuted (e.g. end of the world!), it does not move;
- with probability 0.1, it moves in the opposite direction (i.e.F→B,B→F ).
- The initial position of the robot is known and is at cell 7
The sensor is able to recognize that:
- a tile is white with probability 0.7
- a tile is black with probability 0.9
|
|
localization with recursive bayes filter:
|
|
Video Lecture
Reference
- Probabilistic Robotics , Ch2