On Github wouterbulten / slacjs-presentation
Wouter Bulten
Supervisors: Anne van Rossum (DoBots & Almende) & Pim Haselager (Donders Institute)
Part of a Master of Science Thesis in Artificial IntelligenceRadboud University, Nijmegen
Intelligent wall socket for smart spaces - DoBots
We do not know where users are;
or locations of devices are unknown?
Given an unknown building with (smart) devices, can we autonomoumsly locate these devices and the users that walk around inside the building?
Sources of Input: What can we use?
How? FastSLAM & Particle Filters
The result: Room level accuracy
In the ‘Internet of Things’ devices are connected wirelessly
In our case: Bluetooth Low Energy (BLE)
→ Received Signal Strength Indicator (RSSI)
RSSI gives us distance, but distance needs a where
Simulteneous Localisation and Mapping (SLAM)
Given robot's controls and sensor readings what is the current estimated location and map of the environment?
Robot → Human
Control → Heading & Number of steps
Landmark → Device / Crownstone
2D Sensor readings → (1D) RSSI + initalisation phase
Focus on robot's path → Focus on device locations
Online algorithm for solving the SLAM problem
Uses Rao-Blackwellized particle filter for estimation
Each device is represented by anextended Kalman filter (EKF)
Probabilistic implementation of Darwin's Survival of the Fittest
Approximate the true state by a set of particles Mutate the samples on each step Resample set (with replacement)$\bar\chi_t = \chi_t = \emptyset$
$\bar\chi_t = \chi_t = \emptyset$
Initialisation, for $m \in M$:
$x_t^{[m]} \sim p(x_t | z_t, x_t^u$)
$\bar\chi_t = \chi_t = \emptyset$
Initialisation, for $m \in M$:
$x_t^{[m]} \sim p(x_t | z_t, x_t^u$)
Sample step, for $m \in M$:
$x_t^{[m]} \sim p(x_t | u_t, x_{t-1}^{[m]}$)
$w_t^{[m]} = p(z_t | x_t^{[m]}) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(z_t-\mu)^{2}}{2\sigma^{2}}}$
$\bar\chi_t = \chi_t = \emptyset$
Initialisation, for $m \in M$:
$x_t^{[m]} \sim p(x_t | z_t, x_t^u$)
Sample step, for $m \in M$:
$x_t^{[m]} \sim p(x_t | u_t, x_{t-1}^{[m]}$)
$w_t^{[m]} = p(z_t | x_t^{[m]}) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(z_t-\mu)^{2}}{2\sigma^{2}}}$
Resample step, for $m \in M$:
draw $i$ with probability $\propto w_t^{[m]}$
$\chi_t = \chi_t + x_t^{[m]}$
$\bar\chi_t = \chi_t = \emptyset$
Initialisation, for $m \in M$:
$x_t^{[m]} \sim p(x_t | z_t, x_t^u$)
Sample step, for $m \in M$:
$x_t^{[m]} \sim p(x_t | u_t, x_{t-1}^{[m]}$)
$w_t^{[m]} = p(z_t | x_t^{[m]}) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(z_t-\mu)^{2}}{2\sigma^{2}}}$
Resample step, for $m \in M$:
draw $i$ with probability $\propto w_t^{[m]}$
$\chi_t = \chi_t + x_t^{[m]}$
$\bar\chi_t = \chi_t = \emptyset$
Initialisation, for $m \in M$:
$x_t^{[m]} \sim p(x_t | z_t, x_t^u$)
Sample step, for $m \in M$:
$x_t^{[m]} \sim p(x_t | u_t, x_{t-1}^{[m]}$)
$w_t^{[m]} = p(z_t | x_t^{[m]}) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(z_t-\mu)^{2}}{2\sigma^{2}}}$
Resample step, for $m \in M$:
draw $i$ with probability $\propto w_t^{[m]}$
$\chi_t = \chi_t + x_t^{[m]}$
$\bar\chi_t = \chi_t = \emptyset$
Initialisation, for $m \in M$:
$x_t^{[m]} \sim p(x_t | z_t, x_t^u$)
Sample step, for $m \in M$:
$x_t^{[m]} \sim p(x_t | u_t, x_{t-1}^{[m]}$)
$w_t^{[m]} = p(z_t | x_t^{[m]}) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(z_t-\mu)^{2}}{2\sigma^{2}}}$
Resample step, for $m \in M$:
draw $i$ with probability $\propto w_t^{[m]}$
$\chi_t = \chi_t + x_t^{[m]}$
$\bar\chi_t = \chi_t = \emptyset$
Initialisation, for $m \in M$:
$x_t^{[m]} \sim p(x_t | z_t, x_t^u$)
Sample step, for $m \in M$:
$x_t^{[m]} \sim p(x_t | u_t, x_{t-1}^{[m]}$)
$w_t^{[m]} = p(z_t | x_t^{[m]}) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(z_t-\mu)^{2}}{2\sigma^{2}}}$
Resample step, for $m \in M$:
draw $i$ with probability $\propto w_t^{[m]}$
$\chi_t = \chi_t + x_t^{[m]}$
Signal strength + Motion
FastSLAM + Particle Filters
$$(x^u_t,y^u_t)$$
$$[(x_t^{[m]}, y_t^{[m]}), \Sigma_{t}^{[m]}]$$
$$w_{t}^{[m]} = w_{t-1}^{[m]} f(z | h_{m}, \sigma_z)$$
$$[(x^u_0,y^u_0), \ldots, (x^u_t,y^u_t)]$$
(Only required for visualisation)$$[x_{t+1}^{[m]}, y_{t+1}^{[m]}]^T = [x_{t}^{[m]}, y_{t}^{[m]}]^T + Kv$$
$$\Sigma_{t+1}^{[m]} = \Sigma_{t}^{[m]} - K \sigma_v K^T$$
Fully written in Javascript (including pedometer, SLAM algorithm, particle filters and visualisations)
ECMAScript 6/2015 (with BabelJS as transpiler)
Built for Android & iOS(Using Cordova)
DoBeacons from DoBots(iBeacon compatible, BLE)
Code on GitHub (See: github.com/wouterbulten/slacjs)
Average error: ∞ m
Perfect world performance
Effect of number of RSSI measurements
Effect of device location
Effect of environment noise
Noisy movement: 0.56 m (sd 0.20 m)
Perfect world: 0.26 m (sd 0.07 m)
Online recordings (RSSI & motion)
Offline evaluation, 500 per run
Measured average localisation error for DoBeacons
Accuraccy of 2.3m, 60 steps ~ 2min walking
Run 1: 2.41 m (sd 0.38 m)
Run 1: 2.30 m (sd 0.18 m)
Run 1: 3.01 m (sd 0.51 m)
Walls, obstacles, users themselves
Mirroring errors
→ Invest in better motion modelling
→ Use more of the environment
Dependent on movement and location
→ Longer traces
→ Map fusing
Using an adapted range-only version of SLAM, we replaced the robot with a human and used that to locate both humans and devices inside buildings.