Documente Academic
Documente Profesional
Documente Cultură
Where am I?
Given a map, determine the robots
location
Bayesian Filter
Bayesian Filter
Bel ( xT ) P ( xT | Z T )
What is a Posterior
Distribution?
Bel ( xt ) p ( xt | Z T )
The robots data, Z, is expanded into two
types: observations oi and actions ai
Bel ( xt ) p ( xt | ot , at 1 , ot 1 , at 2 ,..., o0 )
Invoking the Bayesian theorem
Localization
Initial state
detects nothing:
Moves and
detects landmark:
Moves and
detects nothing:
Moves and
detects landmark:
Bayesian Filter :
Requirements for
Representation for the belief
Implementation
function
Update equations
Motion model
Sensor model
Initial belief state
Representation of the
Belief Function
Sample-based
representations
e.g. Particle
filters
( x1 , y1 ), ( x2 , y2 ), ( x3 , y3 ),...( xn , yn )
Parametric
representatio
ns
y mx b
Example of a
Parameterized Bayesian
Kalman filters (KF) represent posterior belief by
Filter
:
Kalman
Filter
a
Gaussian (normal) distribution
A 1-d Gaussian
distribution is given by:
1
P( x)
e
2
( x )2
2
An n-d Gaussian
distribution is given by:
P ( x)
1
(2 ) | |
n
1
( x )T 1 ( x )
2
ot Hxt t ( observation )
What we know
What we dont know
We know what weve told the system to do and have a model for
what the expected output should be if everything works right
We can only estimate what the noise might be and try to put
some sort of upper bound on it
E[ x] xp( x)dx
| Z t ] is minimized.
E[ x | Z ] xp ( x | Z )dx
Fundamental Theorem of
Estimation Theory
E[( x x ) 2 | Z t ]
x ( E[( x x ) 2 | Z ]) 0
Control input
Process noise
xt 1 Ft xt Bt ut Gt wt
State transition Control input
function
function
Noise input
function with covariance Q
State
zt 1 H t 1 xt 1 nt 1
Sensor function
E[ x | Z t 1 ]
P MMSE E[( x x ) 2 | Z t 1 ]
We will now use the following notation:
xt 1|t 1 E[ xt 1 | Z t 1 ]
xt |t E[ xt | Z t ]
xt 1|t E[ xt 1 | Z t ]
zt 1|t H t 1 xt 1|t
Pt 1|t Ft Pt|t Ft Gt Qt Gt
T
xt 1/ t Ft xt / t Bt ut
T
Pt 1/ t Ft Pt / t Ft Gt Qt Gt
St 1 H t 1 Pt 1/ t H t 1 Rt 1
T
K t 1 Pt 1/ t H t 1 St 1
xt 1/ t 1 xt 1/ t K t 1rt 1
Pt 1/ t 1 Pt 1/ t Pt 1/ t H t 1 S t 1 H t 1 Pt 1/ t
xt 1/ t Ft xt / t Bt ut
T
Pt 1/ t Ft Pt / t Ft Gt Qt Gt
St 1 H t 1 Pt 1/ t H t 1 Rt 1
T
K t 1 Pt 1/ t H t 1 St 1
xt 1/ t 1 xt 1/ t K t 1rt 1
Pt 1/ t 1 Pt 1/ t Pt 1/ t H t 1 S t 1 H t 1 Pt 1/ t
Example 1: Simple 1D
Linear System
Given: F=G=H=1, u=0
Initial state estimate = 0
Linear system:x x w
t 1
Unknown noise
parameters
zt 1 xt 1 nt 1
Propagation:
Update:
xt 1/ t xt / t
zt 1 xt 1/ t
Pt 1/ t Pt / t Qt
rt 1 zt 1 xt 1/ t
S t 1 Pt 1/ t Rt 1
1
K t 1 Pt 1/ t S t 1
xt 1/ t 1 xt 1/ t K t 1rt 1
1
Pt 1/ t 1 Pt 1 Pt 1/ t S t 1 Pt 1/ t
State Estimate
Example 2: Simple 1D
Linear System with
Given: F=G=H=1, u=cos(t/5)
Erroneous
Initial state estimate =Start
20
xt 1 xt cos(t / 5) wt
Linear system:
zt 1 xt 1 nt 1
Propagation:
Unknown noise
parameters
xt 1/ t xt / t cos(t / 5)
zt 1 xt 1/ t
Pt 1/ t Pt / t Qt
rt 1 zt 1 xt 1/ t
S t 1 Pt 1/ t Rt 1
1
K t 1 Pt 1/ t S t 1
xt 1/ t 1 xt 1/ t K t 1rt 1
1
Pt 1/ t 1 Pt 1 Pt 1/ t S t 1 Pt 1/ t
State Estimate
Some observations
The larger the error, the smaller the effect on the final
state estimate
Sensor modeling
Approximating Robot
Motion Uncertainty with a
Gaussian
From a robot-centric
perspective, the
velocities look like
this:
From the global
perspective, the
velocities look like
this:
x t Vt
y t 0
t
x t Vt cos t
y t Vt sin t
t
Problem! We dont
know linear and
rotational velocity
errors. The state
estimate will rapidly
diverge if this is the only
source of information!
The indirect Kalman filter derives the pose equations from the
xt 1 xt 1 ~
xt 1
estimated error of the state:
yt 1 y t 1 ~yt 1
~
t 1
t 1
t 1
t 1 0 0
1
~
~
X t 1 Ft X t GtWt
xt t cos R
~
~
t sin
y
R
~t
t
0
0
0
t
wVt
w
t
Pt 1/ t Ft Pt / t Ft Gt Qt Gt
x
z
xLt1 nx
zt 1 y Lt 1 n y
L n
t1
From a global
perspective, the
measurement
looks like:
cos t 1 sin t 1 0 xLt1 xt 1 nx
zt 1 sin t 1 cos t 1 0 y Lt1 yt 1 n y
0
0
1 Lt1 t 1 n
The final expression for the error in the sensor reading is:
~
xLt 1 cos t 1
~
y Lt 1 sin t 1
~L
0
t 1
sin t 1 ( xL xt 1 ) cos t ( y L y t 1 )
cos ( x x ) sin ( y y )
xt 1 nx
~
~y n
t 1 y
~ n
t 1
sin t 1
cos
t 1
t 1
t 1
t 1
Propagation only
State vector
PRR
P
L1R
PLN R
PRL1
PL1L1
PLN L1
T
L1
PRLN
PL1LN
PLN LN
T T
Ln
t 1 t (t wt )t
x Li t 1 x Li t
y Li t 1 y Li t
Lit 1 Lit
H H
~
~
X X RT
~
~
X LT1 X LTi
0 0 H Li
~
X LTn
0 0
Enhancements to EKF
State and
covariance update
rt 1 zt 1 zt 1
S t 1 H t 1 Pk 1/ k H Tt1 Rt 1
K t 1 Pk 1/ k H Tt1 S t11
X k 1/ k 1 X k 1/ k K t 1rt 1
Pk 1/ k 1 Pk 1/ k K t 1St 1 K Tt1