100
A Particle Filter Based Scheme for Indoor Tracking on an Android Smartphone Divye Kapoor B.Tech (IDD) CSI – V 061305 Under Guidance of Dr. Manoj Misra Professor, E&CE Dept. IIT Roorkee

A particle filter based scheme for indoor tracking on an Android Smartphone

Embed Size (px)

DESCRIPTION

A particle filter based scheme for indoor tracking on an Android Smartphone. These are slides accompanying the Masters thesis of the same name presented as part of the graduating requirements at IIT Roorkee. They detail a sensor fusion based approach taken to indoor tracking on smartphones.

Citation preview

Page 1: A particle filter based scheme for indoor tracking on an Android Smartphone

A Particle Filter Based Scheme for Indoor Tracking on an Android

SmartphoneDivye

KapoorB.Tech (IDD) CSI – V

061305Under Guidance of

Dr. Manoj MisraProfessor, E&CE Dept.

IIT Roorkee

Page 2: A particle filter based scheme for indoor tracking on an Android Smartphone

Good Afternoon!

Page 3: A particle filter based scheme for indoor tracking on an Android Smartphone

Thank you for going through my thesis

• Thesis Stats:– 85 pages of content– 47 figures– 18 tables– 2 algorithms

– Total pages: 100 (excluding the cover page)

Page 4: A particle filter based scheme for indoor tracking on an Android Smartphone

Presentation Structure• Follow the structure of the thesis– Chapter Wise

• Emphasis– Understanding the problem– Understanding the current state of

research– Understanding what has been

accomplished in this work.

Page 5: A particle filter based scheme for indoor tracking on an Android Smartphone

Presentation Structure…• Introduction• Literature Review• Proposed Work• Implementation Details• Groundwork• Results• Summary

Page 6: A particle filter based scheme for indoor tracking on an Android Smartphone

Chapter 1: Introduction

Page 7: A particle filter based scheme for indoor tracking on an Android Smartphone

Introduction• 2007 - The rise of the “smartphone”

– Capacitive touch– Fast processors– Sensors

• Culmination of technological advances in many fields– Higher integration– Better fabrication processes– New Technology: capacitive touch, MEMS– Processors

• Advances in hardware have been matched with advances in software

Page 8: A particle filter based scheme for indoor tracking on an Android Smartphone

Trends in the Industry• Move GPS navigation from a dedicated device

to your pocket– Location based services, location aware applications

• 2008 onwards

– Route planning and navigation (beta applications)• 2010 and 2011

• Location is paramount for personalization

• How accurately can you locate a user and then track his movements?– The answer determines viability of a number of LBS

Page 9: A particle filter based scheme for indoor tracking on an Android Smartphone

A Natural Boundary• Indoor v/s Outdoors:

– The technological landscape is very different.

• Outdoors: A nearly solved problem– Core: High precision GPS– Other coarse methods– Commercially Available solutions

• Indoors: A very fragmented landscape– Multiple, highly specialized approaches– Pros and Cons– Very different accuracy tolerances, site information

requirements, sensor requirements

Page 10: A particle filter based scheme for indoor tracking on an Android Smartphone

Motivation• Choose a topic that is:– Current in nature– Broad in scope– Technologically intensive– Has a wide variety of applications

• Applications– Navigational Aids– Shipping Industry, Inventory Systems, Large

Retailers– Augmented Reality and Reality Fusion Gaming

Page 11: A particle filter based scheme for indoor tracking on an Android Smartphone

Scope• Develop and characterize a smartphone

based solution for online tracking of pedestrians indoors.

• Fits in well with the overall trend of integrating the virtual and real worlds.

• Addresses some of the identified application areas.

Page 12: A particle filter based scheme for indoor tracking on an Android Smartphone

Chapter 2: Literature Review

Page 13: A particle filter based scheme for indoor tracking on an Android Smartphone

Literature Review• Progression of Ideas– Initial Wifi based techniques (RADAR [4], SpotOn

[8]) – for positioning and tracking

– Trilateration• Based on existing theory• Link noise-free signal strength to distance• Simple geometry estimates distances

– Location Fingerprinting• Create a discretely sampled version of the signal strength

graph labelled by location• Match measured samples to find the closest location

match

Page 14: A particle filter based scheme for indoor tracking on an Android Smartphone

Literature Review…• Progression of Ideas…

– Bluetooth based techniques (Kotanen et al[7])• Extension of [4]

– Analysis of the behaviour of Wifi signals [1] was done to set experimental foundations of the field• Important results: RSS does not decay log-normally.

Orientation of device matters, user introduces systematic variations in the system. Summarized in Table 2.1.

– Independently, the ideas of RADAR [4], Kotanen et al [7] and SpotOn [8] were extended by Ladd et al [9], King et al[10] & others.• Covered in detail in paper [17]• Their systems had the best accuracy results among

contemporaries using similar data

Page 15: A particle filter based scheme for indoor tracking on an Android Smartphone

Literature Review…• Ladd et al [9]:– Bayesian Approach to determine a relatively

converged p(x|o0, o1, …, on)

– A HMM was bolted onto the output of the Bayesian model to try and track the user through interpolation

• King et al [10]:– Used digital compasses to provide orientation

information.– Used it for positioning, but not for tracking

applications. – Suggests angular tolerance of 60 degrees for Wifi

samples for maximum positioning accuracy

Page 16: A particle filter based scheme for indoor tracking on an Android Smartphone

Literature Review…• Integration of INS with Wifi data– The advent of MEMS made the sensors required

for an INS portable and thus suitable for indoor tracking.

– INS systems for pedestrian navigation using step detection had been explored in an outdoor setting with GPS devices by Ladetto in [18]

– Evennou and Marx [11] and Wang et al [12] explored the application of these techniques for indoor tracking using a particle filters based system that leveraged Wifi site survey information.

– In addition, Wang et al [12] attempted to include basic map information.

Page 17: A particle filter based scheme for indoor tracking on an Android Smartphone

Literature Review…• “Due to the large number of

particles, the algorithm is too complex to be implemented on handheld devices. A way to cut down this number of particles must be found.” – Evennou and Marx [11]

• They had attempted to use a trilateration approach with the Wifi signal strengths.

Page 18: A particle filter based scheme for indoor tracking on an Android Smartphone

Literature Review…• Wang et al [12] used the Wifi location

fingerprinting method and a weighted particle filter for indoor tracking.

• INS information and map data was subsequently incorporated into the system to improve accuracy.

Page 19: A particle filter based scheme for indoor tracking on an Android Smartphone

Literature Review…• Since 2008, a lot of work has focussed

on removing the pain of a Wifi site survey using crowdsourcing techniques. – Redpin [16]

• Smartphone based indoor positioning and tracking systems– Redpin [16] has been a leader in this regard

(but only for positioning)– Other systems based on other devices…

Page 20: A particle filter based scheme for indoor tracking on an Android Smartphone

Research Gaps• Systems like Evannou and Marx [11] still

depend on the assumption of a log-normally distributed signal strength which is not true as shown by [1].

• Wifi based systems report very high inaccuracies (2m with large SD) and these errors are not coming down.

• No advanced integration of map information is done for tracking purposes.

• Specific challenges with respect to smartphones have not been determined or addressed.

Page 21: A particle filter based scheme for indoor tracking on an Android Smartphone

Chapter 3: Proposed Work

Page 22: A particle filter based scheme for indoor tracking on an Android Smartphone

Particle Filters (Background)• Computationally intensive filtering

methods that in an indoor localization context help determine the PDF p(x|o0,o1…,on) through a Monte Carlo simulation of the system.

• They work on a predict-correct cycle and each particle represents a weighted system state.Predicti

onCorrectio

n

Adjust weights

Resampling

Predict the next states No States

Left

Generate new, diverse

states

Page 23: A particle filter based scheme for indoor tracking on an Android Smartphone

Proposed Method• Builds upon the work of Evennou and

Marx [11] and Wang et al [12] in a smartphone context.

• Uses sensor information available on a modern, off the shelf, Android smartphone.–Wifi data– Accelerometer Data–Magnetometer Data + (optional)

Gyroscope data– Camera

Page 24: A particle filter based scheme for indoor tracking on an Android Smartphone

Proposed Method

Page 25: A particle filter based scheme for indoor tracking on an Android Smartphone

Proposed Method• Though shown as a sequential

algorithm, the algorithm will be implemented in an event-driven manner.

• Various constants of the algorithm are sensor and implementation dependant.

• There are many subroutines that are critical for operation of the algorithm

Page 26: A particle filter based scheme for indoor tracking on an Android Smartphone

First Fix• Any tracking system must start off

with an estimate of the initial location of the tracked entity.

• The initial location is called the first fix of the algorithm.

• 2 methods are considered:–Manual marking of the starting location– QRCode encoded location information in

the environment

Page 27: A particle filter based scheme for indoor tracking on an Android Smartphone

First Fix

• Manual Marking:– Simple principle: ask

the user – “Where are you?”

– Mark it out on the map via the capacitive touchscreen

• QRCodes:– Encode location

information into a machine readable 2D barcode and install it in the environment.

Page 28: A particle filter based scheme for indoor tracking on an Android Smartphone

First Fix: QRCodes• What to encode and how to encode

it?

Page 29: A particle filter based scheme for indoor tracking on an Android Smartphone

Basic INS• Requires determination of

incremental changes to displacement.

• Required values:– Displacement change– Direction of change.

Page 30: A particle filter based scheme for indoor tracking on an Android Smartphone

INS: Step Detection• Simple double integration of accelerometer data

(even by using equations of greater precision such as the Verlet integrals) yields no usable information about displacement. – The integrals diverge in about 3-5 seconds

• Step detection and step size estimation methods similar to the ones used by Wang et al [12] were used.– Counting zero crossings on filtered accelerometer

readings– Counting distinct peaks and valleys in the filtered

accelerometer readings.

Page 31: A particle filter based scheme for indoor tracking on an Android Smartphone

Noise Filtering• Many real world sensors like the 3

axis accelerometers on the Android smartphone suffer from Sensor Noise

• Simple Noise rejection procedure

Page 32: A particle filter based scheme for indoor tracking on an Android Smartphone

Sample Unfiltered Sensor Readings

Page 33: A particle filter based scheme for indoor tracking on an Android Smartphone

Step Detection: Peak and Valley Method

Page 34: A particle filter based scheme for indoor tracking on an Android Smartphone

Step Size Estimation• The empirical relationship between

step size and accelerometer readings provided by Analog Devices in [22] is used:

Page 35: A particle filter based scheme for indoor tracking on an Android Smartphone

Dynamical Equations of the System

Page 36: A particle filter based scheme for indoor tracking on an Android Smartphone

Accounting for Orientation Bias

Page 37: A particle filter based scheme for indoor tracking on an Android Smartphone

Accounting for Varying Step Sizes

Page 38: A particle filter based scheme for indoor tracking on an Android Smartphone

Ensuring Particle Diversity• The introduction of sampled random

variables into the system is an intentional effort to cause particle diversity.

• However, the choice of the variance of the random variables is critical.– Too small a variance would prevent

achievable states from being evaluated.– Large variance would waste computational

effort on “invalid” particles.

Page 39: A particle filter based scheme for indoor tracking on an Android Smartphone

Integrating Map Information (MapSelect)

• This is effectively the “correcting function” for the particle filter.

Page 40: A particle filter based scheme for indoor tracking on an Android Smartphone

Map Information Allows Bias Determination

• The bias values are strongly dependent on the degree of map information available.

Page 41: A particle filter based scheme for indoor tracking on an Android Smartphone

Particle Insufficiency• Particle insufficiency occurs when no

valid state is found after the “correction” step where transitions are verified to be valid according to map information.

• One common cause of insufficiency is incomplete approximation of the user’s state due to the highly restricted number of particles

Page 42: A particle filter based scheme for indoor tracking on an Android Smartphone

Recovery from Particle Insufficiency

Page 43: A particle filter based scheme for indoor tracking on an Android Smartphone

Recovery from Particle Insufficiency

Page 44: A particle filter based scheme for indoor tracking on an Android Smartphone

Algorithms for Comparison• Comparisons need to be made in the same

environment due to variability of the environment, maps and Wifi site survey information.

• 2 other algorithms are implemented for comparison:– Uncorrected or Dead Reckoning– Wifi Corrected reckoning

• Extension of King et al’s [10] work to tracking using repeated Wifi based positioning with fusion of step information.

Page 45: A particle filter based scheme for indoor tracking on an Android Smartphone

Chapter 4: Implementation Details

Page 46: A particle filter based scheme for indoor tracking on an Android Smartphone

Typical Structure of the Android OS

Page 47: A particle filter based scheme for indoor tracking on an Android Smartphone

Implementation Tools• Eclipse– Java IDE– Tooling support for installation, uninstallation of apps

under development

• Android Debug Bridge– Gives visibility and remote debugging capabilities for

code running on the target system (the smartphone)

• LogCat over ADB– The logging subsystem buffers logs and makes them

visible remotely

Page 48: A particle filter based scheme for indoor tracking on an Android Smartphone

Simplified Lifecycle of an App

Page 49: A particle filter based scheme for indoor tracking on an Android Smartphone

Interfacing with the Android Sensor API

Page 50: A particle filter based scheme for indoor tracking on an Android Smartphone

System Architecture

Page 51: A particle filter based scheme for indoor tracking on an Android Smartphone

Classes and their Layers

Page 52: A particle filter based scheme for indoor tracking on an Android Smartphone

Notes on Lifecycle Implementation

• We have little to no user interaction once we have started tracking the user path.

• WakeLocks are used to prevent the device from going into an idle state, thus pushing the app into the paused state.

• Centralizing sensor management into a single layer allowed simple handling of the lifecycle events. – The layer does the right thing at lifecycle events– Abstracts complex sensor state management from the

Activity behind a simple façade (pause() and resume())

Page 53: A particle filter based scheme for indoor tracking on an Android Smartphone

Computational Complexities at Various Layers

• Absolutely minimal computations upto the step detection layer.

• Slightly greater freedom in implementing algorithms at higher layers– Higher layers are accessed infrequently

Page 54: A particle filter based scheme for indoor tracking on an Android Smartphone

Chapter 5: Groundwork

Page 55: A particle filter based scheme for indoor tracking on an Android Smartphone

Hardware

• Google Nexus S manufactured by Samsung

• Launched December 2010.

• Sensors of interest: – Accelerometer– Magnetometer– Gyroscope– Orientation Sensor– Wifi NIC– Camera

Page 56: A particle filter based scheme for indoor tracking on an Android Smartphone

Characterization of Input Signals

• Required to determine practical limits of accuracy of the sensor data.– Accelerometer–Magnetometer/Orientation Sensor

• Also, to characterize the noise present in the signal itself–Wifi signal strength data

Page 57: A particle filter based scheme for indoor tracking on an Android Smartphone

Characterization of the Accelerometer

• 2 Different Scenarios:– The phone is placed on a stable surface– The phone is held in the palm of a user

• Marked increase in sensor noise seen

Page 58: A particle filter based scheme for indoor tracking on an Android Smartphone

Characterization of the Accelerometer

Page 59: A particle filter based scheme for indoor tracking on an Android Smartphone

Characterization of the Magnetometer

Page 60: A particle filter based scheme for indoor tracking on an Android Smartphone

Characterization of the Magnetometer

Page 61: A particle filter based scheme for indoor tracking on an Android Smartphone

Magnetometer: Effect of Motion

Page 62: A particle filter based scheme for indoor tracking on an Android Smartphone

Magnetometer: Effect of Motion

Page 63: A particle filter based scheme for indoor tracking on an Android Smartphone

Test Environment

Page 64: A particle filter based scheme for indoor tracking on an Android Smartphone

Test Environment: Suitability• Long corridoors of around 30-32 m in

length

• Large number of Wifi Access Points in the vicinity

• Wifi access points are installed in the corridoors itself– Neighbouring wings and floors also have

APs, thus providing location fingerprint diversity.

Page 65: A particle filter based scheme for indoor tracking on an Android Smartphone

Characterization of the Wifi Signal Strength Distribution: Short term

Page 66: A particle filter based scheme for indoor tracking on an Android Smartphone

Wifi RSSI Distribution: Long Term (7 days)

Page 67: A particle filter based scheme for indoor tracking on an Android Smartphone

Wifi RSSI Distribution:Long Term (7 days)

Page 68: A particle filter based scheme for indoor tracking on an Android Smartphone

Wifi RSSI Distribution: Effect of Motion, Position, Orientation

Page 69: A particle filter based scheme for indoor tracking on an Android Smartphone

Wifi Site Survey

• Over 1500 samples taken

• 8 different directions

• Painstaking work

• 10+ hours for a dataset– Multiple times

Page 70: A particle filter based scheme for indoor tracking on an Android Smartphone

Wifi Positioning Performance

Page 71: A particle filter based scheme for indoor tracking on an Android Smartphone

Parameters Determined

Page 72: A particle filter based scheme for indoor tracking on an Android Smartphone

Chapter 6: Experiments and Results

Page 73: A particle filter based scheme for indoor tracking on an Android Smartphone

First Fix: Manual Method

Page 74: A particle filter based scheme for indoor tracking on an Android Smartphone

First Fix: QRCodes

Page 75: A particle filter based scheme for indoor tracking on an Android Smartphone

Noise Filtering (Q = 1.3m/s2)

Page 76: A particle filter based scheme for indoor tracking on an Android Smartphone

Noise Filtering

Page 77: A particle filter based scheme for indoor tracking on an Android Smartphone

Step Detection Performance

Page 78: A particle filter based scheme for indoor tracking on an Android Smartphone

Step Detection Performance

Page 79: A particle filter based scheme for indoor tracking on an Android Smartphone

Step Variation Analysis

Page 80: A particle filter based scheme for indoor tracking on an Android Smartphone

Test Paths

• A-B• A-B-A• A-B zigzag• A-B-C-D• A-B-C-D-C-B-

A

Page 81: A particle filter based scheme for indoor tracking on an Android Smartphone

Simple Dead Reckoning

• Significant but stable bias

• Path goes through rooms and walls and is quite unnatural.

• Bias varies with path orientation

Page 82: A particle filter based scheme for indoor tracking on an Android Smartphone

Simple Dead Reckoning

Page 83: A particle filter based scheme for indoor tracking on an Android Smartphone

Wifi Corrected Reckoning

• Degree of localization is good

• Subjective path quality is poor

Page 84: A particle filter based scheme for indoor tracking on an Android Smartphone

Wifi Corrected Reckoning

• Median error is quite good.

• Unfortunately, the standard deviation is quite large.– Expected based on

groundwork

Page 85: A particle filter based scheme for indoor tracking on an Android Smartphone

Wifi Corrected Reckoning

Page 86: A particle filter based scheme for indoor tracking on an Android Smartphone

Proposed Method

Page 87: A particle filter based scheme for indoor tracking on an Android Smartphone

Proposed Method

Page 88: A particle filter based scheme for indoor tracking on an Android Smartphone

Proposed Method

Page 89: A particle filter based scheme for indoor tracking on an Android Smartphone

Proposed Method: Number of Particles

Page 90: A particle filter based scheme for indoor tracking on an Android Smartphone

Proposed Method: Recovery

Page 91: A particle filter based scheme for indoor tracking on an Android Smartphone

Comparison with Published Results

Page 92: A particle filter based scheme for indoor tracking on an Android Smartphone

Chapter 7: Summary

Page 93: A particle filter based scheme for indoor tracking on an Android Smartphone

Points in Summary• Significant improvement in tracking

accuracy compared to published work

• Suitable modifications made to allow running the algorithm on an Android smartphone with its limited resources

Page 94: A particle filter based scheme for indoor tracking on an Android Smartphone

Insights• QRCodes are excellent tools for providing first fixes to

tracking algorithms. – Reasonably scalable and extremely easy to use.

• Wifi is a poor choice of signal source to correct for drift errors for step estimate based tracking solutions.

• Having a Wifi survey of an area is a very time consuming matter. However, it helps in recovery.

• Treating all particles as unweighted reduces computational complexity

• Choice of parameters for sensors is very important for good performance

Page 95: A particle filter based scheme for indoor tracking on an Android Smartphone

Limitations• A limitation on the number of particles results in a

higher tendency to get lost

• Once lost, recovery is not guaranteed and is usually associated with some tracking error

• A wifi survey is required.– Not very scalable and very time consuming– Can be traded off for lower recovery probabilities

• Lazy KNN type algorithms using the survey data are extremely expensive in time and memory consumption

Page 96: A particle filter based scheme for indoor tracking on an Android Smartphone

Limitations• Small, shuffling steps cannot be detected reliably due

to the sensor noise of the accelerometer.– Tradeoff

• Maps with large open spaces provide very little feedback to the system.– But suitable for dense, office like environments

• Moving “backwards” is not handled very well and introduces very significant tracking error.

• Staircases have very different step profiles and cannot be handled– Generic issue for all step based algorithms

Page 97: A particle filter based scheme for indoor tracking on an Android Smartphone

Future Enhancements• The MapSelect function can be improved by looking at making

walls near doorways more “porous” to particles.

• Integration of Barometric sensor information (once available via smartphone sensors) needs to be looked at – especially in the context of staircases.

• Methods to change maps once floors are changed need to be developed. Linking floor information in QRCodes needs evaluation.

• SVM needs to be evaluated for improving recovery accuracy using Wifi Survey data.– Data Mining of Wifi Survey dataset

• Additional Benefit: High accuracy tracking along with a Wifi RSSI logger can be used to quickly build a signal strength map of an area. This would be very beneficial to crowdsourced low complexity positioning solutions like Redpin [16]

Page 98: A particle filter based scheme for indoor tracking on an Android Smartphone

Thank You. Questions?

Page 99: A particle filter based scheme for indoor tracking on an Android Smartphone

Additional Slides

Page 100: A particle filter based scheme for indoor tracking on an Android Smartphone