Bayes Filter
We can use such a graph to understand the meaning of Bayes Filter. For a certain moment \(t\), we apply a control \(u_t\) to the system, drive the system's state from \(x_{t-1}\) to \(x_t\). And at this particular moment, we can only obtain the measurement \(z_t\) rather than directly get \(x_t\). So attemp to estimate the state of the system for given input and measurement is the purpose of Bayes Filter.
graph LR
L("x(0)") --> J(...)
J--> B
A("u(t-1)") --> B("x(t-1)")
B --> C("z(t-1)")
B --> E
D("u(t)") --> E("x(t)")
E --> F("z(t)")
E --> H
G("u(t+1)") --> H("x(t+1)")
H --> I("z(t+1)")
H --> K(...)
Bayes Theorem
Let \(x\) denote the state of the system, \(z\) denote the measurement of the system. Bayes Filter tends to estimate the belief of a certain state when given a measurement. Which is,
In this clever way, the hard-to-obtain part \(p(x|z)\) converts to an easier-obtain part \(p(x|z)\). Because \(p(x|z)\) is diagnostic, while \(p(z|x)\) is causal.
Markov Assumptions
In fact there is an important hidden assumption in the statement at the beginning. We assume that the current state depends only on the last single state, rather than all states from the beginning. Without the assumption, the problem should be modeled like this
With Bayes Theorem, we can easily obtain the following form
Then, apply Markov Assumption to \(p(z_{t}|x_t, z_{1:t-1}, u_{1:t})\). Hypothetically but intuitively, if we are interested in measurement \(z_t\), we only needs to know the state \(x_t\), rather than other previous inputs or measurement. In mathematical,
And for \(p(z_t|z_{1:t-1},u_{1:t})\), \(x_t\) doen't depend on \(z_t\). Which means, for every \(x_t\), the denominator is same. We can simply use a nominalizer \(\frac1\eta\) to represent it.
The rest part \(p(x_t|z_{1:t-1},u_{1:t})\), with the Law of Total Probability
Bayes Filter
We can now wrtie down all the expressions
Prediction
Equation \(7\) is the predict step of the Bayes Filter. When you only have an estimate of the previous state and the current input, predict what the current state should look like
Update
After you do a predict, then you can put equations \(5,6,8\) back to \(4\). We are able to know where is the maximum belief of current state.
However, in addition to initial state \(x_0\), we are still not able to get \(p(x_t|x_{t-1},u_t)\) and \(p(z_t|x_t)\). But I would say, this is the essense of Bayes Filter. That is, as mentioned before, it makes the diagnostic part to be casual.
Starting from the second principle, for example, if we want to get \(p(z_t|x_t)\). We can keep the system in a certain state, and continuously obtain the measurements from sensor. Then we are able to get the probablistic distribution. Or start from the first principle, we can use mathematics tools, such as state space model, to model the system.
Reference
[1] S. Shen, “ELEC 3210 Introduction to Mobile Robotics Lecture,” HKUST.
[2] S. Thrun, W. Burgard, and D. Fox, “PROBABILISTIC ROBOTICS”.