Академический Документы
Профессиональный Документы
Культура Документы
Background:
All variables of interest of a system at a particular time determine the state of the system.
Static case
• Estimation of location of a ship lost in the sea.
Assuming that the effect of waves
is random in nature, i.e., the waves
do not impart any velocity to the
ship.
2
µ1 𝜎2 + µ2 𝜎1 2 𝜎1 2 𝜎2 2
µ𝑓𝑢𝑠𝑒𝑑 = 𝜎𝑓𝑢𝑠𝑒𝑑 2 = 2
𝜎1 2 + 𝜎2 2 𝜎1 + 𝜎2 2
𝜎1 2 (µ2 − µ1 ሻ 𝜎1 4
µ𝑓𝑢𝑠𝑒𝑑 = µ1 + 𝜎 2𝑓𝑢𝑠𝑒𝑑 2
= 𝜎1 − 2
𝜎1 2 + 𝜎2 2 𝜎1 + 𝜎2 2
𝑜𝑟
2 2
𝜎2 4
𝜎 𝑓𝑢𝑠𝑒𝑑 = 𝜎2 − 2
𝜎1 + 𝜎2 2
Assumptions used in Kalman Filter
• System is linear
So the state vector x(t) contains the position and velocity of the
Robot robot
𝑝 𝑡
𝑥 𝑡 =
𝑣 𝑡
Position
𝑑𝑥
The motion is of the simple form =𝑣+𝑤
𝑑𝑡
Kalman Filter Terminology
• 𝑥ො 𝑡2 =Optimal estimate at time 𝑡2
By the same process as before, the density with mean 𝑥ො 𝑡2 − and variance 𝜎𝑥 2 𝑡2 − is combined with the
density with mean 𝑧2 and variance 𝜎 2 𝑧2 , to yield a Gaussian density with mean
𝑥ො 𝑡2 = 𝑥ො 𝑡2 − + 𝐾 𝑡2 [𝑧2 − 𝑥ො 𝑡2 − ]
and variance
𝜎𝑥 2 𝑡2 = 𝜎𝑥 2 𝑡2 − − 𝐾 𝑡2 𝜎𝑥 2 𝑡2 −
where the gain 𝐾 𝑡2 is given by
𝜎𝑥 2 𝑡2 −
𝐾 𝑡2 =
[𝜎𝑥 2 𝑡2 − + 𝜎 2 𝑧2 ]
Dynamic case with control Input
We provide constant acceleration to the robot. The control vector can be expressed as u(t)
𝑓
𝑢 𝑡 =
𝑚
𝑥 𝑡2 =
𝑝 𝑡2
=
1 𝛥𝑡 𝑝(𝑡1 ሻ
+ 𝛥𝑡 2 Τ2 𝑓
𝑣 𝑡2 0 1 𝑣(𝑡1 ሻ 𝛥𝑡 𝑚
We introduce a negative superscript on time values to describe predicted value of the state at that time. So
𝑥ො 𝑡2 − =
1 𝛥𝑡
𝑥ො 𝑡1 + 𝛥𝑡 2 Τ2 𝑢 𝑡
1
0 1 𝛥𝑡
Let, F =
1 𝛥𝑡
𝑎𝑛𝑑 𝐵= 𝛥𝑡 2 Τ2 , then
0 1 𝛥𝑡
ෝ 𝒕𝟐 − = 𝑭ෝ
𝒙 𝒙 𝒕𝟏 + 𝑩𝒖 𝒕𝟏
𝑥 𝑡2 = 𝐹 𝑥ො 𝑡1 + 𝐵𝑢 𝑡1 + 𝑤(𝑡1 ሻ
𝑤1 (𝑡1 ሻ
𝒘(𝒕𝟏 ሻ =
𝑤2 (𝑡1 ሻ
𝑃(𝑡2− ሻ = 𝐸[ 𝑥 𝑡2 − 𝑥ො 𝑡2 − 𝑥 𝑡2 − 𝑥ො 𝑡2 − 𝑇]
𝑷(𝒕𝟐 − ሻ = 𝑭𝑷(𝒕𝟏 ሻ 𝑭𝑻 + 𝑸𝒕
𝜎𝑥 𝑡2 − 2 𝑥ො 𝑡2 −
µ𝑓𝑢𝑠𝑒𝑑 𝑥ො 𝑡2 − ( ሻ (𝑧2 − ሻ
= + 𝑐 𝑐
𝑐 𝑐 𝜎𝑥 𝑡2 − 2 2
( ሻ +𝜎 𝑧2
𝑐
𝜎𝑥 2 𝑡2 − 𝑥ො 𝑡2 −
( ሻ(𝑧2 − ሻ
ෝ 𝒕𝟐 = 𝑥ො 𝑡2 −
⇒𝒙 + 𝑐 𝑐
𝜎𝑥 𝑡2 − 2 2
( ሻ +𝜎 𝑧2
𝑐
𝐻𝜎𝑥 2 𝑡2 −
Substituting H= 1/c and 𝑲 𝒕𝟐 = results in
𝐻𝜎𝑥 2 𝑡2 − +𝜎2 𝑧2
ෝ 𝒕𝟐 − + 𝑲 𝒕𝟐 (𝒛𝟐 − 𝑯ෝ
ෝ 𝒕𝟐 = 𝒙
𝒙 𝒙 𝒕𝟐 − ሻ
𝜎𝑥 (𝑡2 − ሻ 4
𝜎𝑓𝑢𝑠𝑒𝑑 2 𝜎𝑥 (𝑡2 − ሻ 2 𝑐
=( ሻ −
𝑐 𝑐 𝜎𝑥 𝑡2 − 2 2
( 𝑐 ሻ +𝜎 𝑧2
𝜎𝑥 2 𝑡2 −
( 𝑐 ሻ 𝜎𝑥 2 (𝑡2 − ሻ
2 2 −
𝜎𝑥 𝑡2 = 𝜎𝑥 (𝑡2 ሻ − = 𝜎𝑥 2 𝑡2 − − 𝐾 𝑡2 𝐻𝜎𝑥 2 𝑡2 −
𝜎𝑥 𝑡2 − 2 2 𝑐
( 𝑐 ሻ +𝜎 𝑧2
𝐻𝜎𝑥 2 𝑡2 −
𝑲 𝒕𝟐 = 𝐻𝜎𝑥 2 𝑡2 − +𝜎2 𝑧2
𝑲 𝒕𝟐 = 𝑷 𝒕𝟐 − 𝑯𝑻 (𝑯𝑷 𝒕𝟐 − 𝑯𝑻 + 𝑹ሻ−𝟏
Where R is the uncertainty matrix (covariance matrix) associated with a noisy set of measurements.
An Example
Initial Condition: p(0)=0, v(0)= -8, 𝛥t=0.1,acceleraton(a)=0.4 (all in SI)
Without noise
Result from Kalman
Filter
Advantages
• So the advantage of Kalman Filter is that, if we are damn sure about our system dynamics,
then even in the case of poor measurements, we will get good estimation.
• This is also true the other way around, i.e., if we are damn sure about our measurement
accuracy, then even in the case of our system dynamics being not known exactly, Kalman