T04 Calculations Achyut Sm24mtech11005
T04 Calculations Achyut Sm24mtech11005
StSpace :
positions ,
x =
20 ,
1 ,
2
,
3
, . . .
., 2003
Total of 100 + 1 discrete locations
as the
given ID path is 100 meters
long
State Transition Model
Mon or :
(doesn't move)
[0
0 .
09 k =
;
PEKIF1)
Kimos a
=
,
Algorithm :
ID Bayes Filte (4t Et) ,
for all do :
up
be (x+ )
1 bet(u ) = +
[P((t -
) - -
bel (e)
2 .
bel(xz) =
n .
PEt(e) ·
end far
return bel (at)
#to
doesn't -
know abou to se
L-)
TIMESTEP Y =
1
-
Robot moves Im alead.
&
rediction :
bel( ) ,
= P( (4) be ,
0Pool
#0 =
,
bill =
+ 0 + 0 ....
]
=
u
Robot can't
move backwards
# : Sel(x 1) ,
=
= =(4) be
= [p(x ,
=
1(x 0) =
+ p(x 1(xo ,
=
=
1)]
! (970s
=
# 2 : bel (n =
2) = P( (40) ,
- be (
= (p(x 2(40 0)
= =
+
p(x , 2(40 1) = =
+
p(x) 2(xo 2)]
= =
00
%05
09 +
+
=
=
101
= 3 : ben, 3) =
= P( =
3) be .
= [P(x 3(x. 1)
= =
,
+
p(x, 3(x 2)
=
=
+ p(a
,
3/40 =
=
3)]
=
Ta
Similarly
,
bel(x i) = ,
= is
This is because ,
before receiving first sensor reading
,
the robot isn't aware
of its location and
according to
I m ahead .
Due to this
,
it is less likely for the robot
position chances
to be in 2 = 0
,
as
for moving
backward is counted as zero .
To be at X = 1,
it's influenced by X = 0
.
To be at X = 2 ,
it's influenced
by X =
1 and X = 0 .
And for all positions till x = 100
,
all
influenced by their last
preceding positions
.
are 2
Due to this ,
we can observe
Li
=
Correction :
After receiving first sensor
reading : z
,
=
U1
= 1
P(z (x ) , ,
=
[09,MFZ
bel() =
7 .
P(z( ) ,
·
bet (x)
bel(x 0) 4
,
= =
x p(7 ( 0), ,
=
x
bel (x , =
0)
Sell =
) 0
bel(u 2) = =
4x0
.
1x
3
,
: go value
!
bel (x, =
100) =
nx0 .
1 x
We know
, bel()
=>
y 20005095 99x +
>
- (0 . 005 + 0 855
.
+ 9 .
9) =
102
-
belo t
bel (x ,
=
2) =
n x
0 .
1 +01 =
5538 = 0 . 0092
bel(x ,
=
3) = x 0 9 .
xY01 =538 = 0 .
0072
I i
100) 1xY01 = 0092
(x
0
bel ,
= =
y>
0 .
538 = .
>
-
belf) =
[18:0 ..... 3 un
~ 7 9 .
% belief at X =
1 for t =
!
-
AT TIMESTEP t = 2
-
Robot Im ahead
Assuming
mors
Prediction :
bit() = p(x() -
be (x)
F
= 0 : Jel (2 0)= =
p(x 0(x 0) ,
=
,
=
.
bel (x ,
=
0)
= 0 .
05
x52
5040 = 0 000023
=
.
For 1 : bil (n =
1) =
p(x 1(x 0) bel(x 0)
=
,
=
·
,
=
+
p(x, 1(x 1) bel(x 1)
=
,
=
.
,
=
= 0 .
9 + 0 .
05
= (0 . 9 + 0 .
5)
=0
0 00439 ...
.
Exc = 2 :
Jil(x =
=
2) =
p(xz 2(x 0) bel (n 0)
=
,
=
·
,
=
+
p(x 3(x =
=
,
=
1) be (n .
,
=
1)
>
- p( =
=
2(n ,
=
2) bel (n
·
,
=
2)
- -
=3 :
Jil(x, 3) = =
p(xj 3(x 2) =
,
=
.
bel(x 1) ,
=
+ P(4y =
3(x ,
=
2) 2) ·
bel(x ,
=
+ p(xz 3(x =
,
=
3) bel(x 3) ·
,
=
>175
-
538
=> 0 .
0220
Fo4
: Bel (2 =
4) =
p(x= 4)x 2) bel(x 2)
=
,
=
-
,
=
,
=
-
,
=
,
=
.
=
= (0 . 05 + 0 9 + 0
. .
05) =538
Gano
o
-
be (1) =
Correction
-
After Sensor reading ,
zz =
2
Je (2)
bel(x) =
1 .
p(Eck) .
Let plzzIk)) =
CoyEEUA
(0) n(0 /3040)
Then ,
. (0 1)
bel(uc 0 1 =
= = ·
be(nz 1) m(0
= = .
2)() =
(18 /93090)
.
2 (2 4)= =
y(0 1) (0) .
48 . 5
a
We know ,
bu
- 1997 43040
255 .
E
-
=
n
0 1
.
+ 10 .
- n =
3092
bel (x =
=
0) = 0 .
2/6793 .
2 =67932
bel (n, 1) =
= 18 .
9/6743 . 2
= 18
% 7932
bel (x z
=
2) = 2789 .
9/6743 .
2
=
2789/67432
bel(x, 3) = = 55 .
9/6743 .
2
=
55//67932
bel(x = 4)
4 400/7432
=
=
-
↑
(ic %7932
&
bel =
100) =
9
bel
(2) =
Gina 2
x = 2
1323
.....
TIMESTEP t > =
Robot Im alread
.
Assuming
moves
Prediction :
5) = ps) bed (
the sunuation
After calailating using Python ,
for all 101 positions;
bet (ns) =
20 .
0
,
0 . 0002 ,
0059 ,
0 0232
.
0 059 ,
,
0 3728
-
.
0006 ,
0 .
.
...
0 .
00593
correction :
Sensor
Reading E = 4
bel (ns) =
y +
P(zy(s) + bet (x)
bel (13) =
90 .
0
,
0 2009 ,
.
0 .
0002
,
0 005
.
0 . 019
,
,
0
059,
. 0049 0 .
0049
,
,
-
....,
0 .
00493
The belief at
position x
=
3 remains
higher even
after
the sensor detects the position 4 ,
because
of the robot's
motion model .
The robot's movement probabilities cause some
belief to
spill over to
nearby positions ,
Like =3 .
So,
,
even
maintains some
belief at position 3 due to its
previous
movement history
.
Sp t=
doesn't
Assuming robot
move-stays at x =
4
Mediction :
5) = ps) bel l
the sunuation
After calailating using Python ,
for all 101 positions;
0 0 0 0 0 ,
.
.
=
.
.
. ,
,
.
,
.
0 .
0049 ,
0 . 0049; ...,
0 .
0049]
correction Sensor
Reading =4
:
bel
(nq) =
y +
P(z , (4) +
bet(x)
After doing calculations
the
using Python
,
90 0 7842 0 0619
0. 0046 ,
bel (13) 0099
0 0003 0
.
0, 0 0 , ,
.
.
= .
. .
, , ,
. 0015,
0 0 0015,
.
,..., 0 .
00157