Indoor Localization I Introduction and Positioning Algorithms Petteri Nurmi 29.10.2015 1
About the course Advanced course: networking and services subprogramme (also well suited for algorithms, data analytics, and machine learning) 4 credit units for passing the course Two compulsory project works Can be done in groups or independently No exercises, no exam Course page: http://www.cs.helsinki.fi/courses/582747/2015/s/k/1 All materials and project work instructions available from the webpage 29.10.2015 2
Objectives Learn basic principles of indoor localization technologies and algorithms Understand the dimensions that can be used to classify and evaluate localization techniques Which signals can be used for measuring locations? Which estimation algorithms can be used? Which kind of errors affect localization? Be able to apply knowledge into practice Two project works 29.10.2015 3
Localization Refers to determining where an entity is located Also known as positioning, locating, or position tracking Literature separates between three target areas: Indoor, outdoor, and ubiquitous (everywhere) Outdoor localization well-established area Satellite positioning (GPS, Glonass, others) used in cars, boats, aircrafts, mobile devices Requires clear view of sky hence not available indoors Course focuses on localization for indoor areas Satellite positioning and other outdoor positioning methods covered as part of the Location-Awareness course 29.10.2015 4
Why Indoor Localization? Indoor environments becoming increasingly complex (and commercialized) COEX mall (Seoul, Republic of Korea): 154,000m 2 with multiple floors Indoor navigation, location-based advertising, etc. Indoor logistics and analytics Monitoring people flows, optimizing staff and product placements, identifying bottlenecks in environment etc. Airports, supermarkets, and other indoor locations starting to use localization techniques 29.10.2015 5
What are the main challenges? Layouts of environments complex Mixture of open and confined areas Most signals subject to refraction and attenuation Varying crowd densities Humans absorb and influence most signals that are used in positioning Accuracy-cost tradeoffs Best accuracy requires expensive investments Maintenance costs Even small changes in environment can requires efforts at maintaining desired level of accuracy (e.g., recalibration) 29.10.2015 6
Localization Systems Localization system responsible for localizing an entity We mainly focus on humans, but could equally be an animal or an object (key, package, other object) Three parts to every localization system Localization algorithm: technique that determines the position of the entity from the given measurements Also known as position estimator Location system: collects measurements that can be used to localize the entity Examples: WiFi, ultrasound, GSM, infrared, Reference system: determines how output of the system relates to geographical area 29.10.2015 7
Components of Reference Systems 1. Coordinate system: how positions are represented Absolute: position uniquely mapped into geographical area (e.g., 60 12 16 N 24 57 46 E for Kumpula campus) Location meaningful within the scope of the coordinate system Relative: position given relative to another object (5km NE of Stockmann) Location meaningful only in a local context 2. Datum: model that defines how coordinates relate to geographic area 3. Projection: mapping that determines how positions can be visualized 29.10.2015 8
Geographic Coordinate Systems Systems for representing locations as vector of numbers, called coordinates Coordinates refer to position, typically measured either in terms of distances or angles Coordinate system consists of three components Origin: intersection of the axes of coordinate system Scale: the subdivision of axes into common units Orientation: direction of axes 29.10.2015 9
Reference Systems for Indoor Positioning Reference systems for indoor localization typically defined relative to a floorplan / map One corner (or the center) of a map defined as origin, positions given relative to origin Datum defined as mapping that converts differences in coordinates to physical distances E.g., difference of 0.025 coordinate units equivalent of 1m or similar Projection defined as mapping that relates coordinates within the floorplan / map E.g., pixel distance, how coordinate differences translate to pixels within the floorplan 29.10.2015 10
Reference systems: Indoors vs. Outdoors Source: http://en.wikipedia.org/wiki/la titude Outdoor reference systems more complex Earth is ellipsoidal so need to take into account curvature of Earth s surface in distance calculations E.g., WGS-84: World Geodetic System Specifies a reference ellipsoid that approximates the shape of Earth Separate datums for surface (vertical, altitude estimation) and shape (horizontal, position) Indoors: Size of area small è no need to consider curvature (usually) of Earth 29.10.2015 11
Tracking Refers to monitoring the position of an entity over time Errors in individual position estimates can be potentially decreased by considering the evolution of estimates Mathematical foundation for tracking given by socalled state-space models Physical model where the state of the system evolves over time and is estimated from noisy measurements In the context of location tracking, the state refers to position, and measurements to position estimates General form of the model: x k = Ax k-1 + v y k = Ux k + w State equation Measurement equation 29.10.2015 12
Tracking Most techniques for tracking build on the principle of Bayesian optimal filtering Estimated location a hypothesis Probabilistic methods used to update hypothesis given new measurements and prior information Common techniques include: Kalman filter Optimal implementation of Bayes filter when noise and state space Gaussian Particle filter Discrete approximation of optimal filter Most common technique nowadays Details of tracking out-of-scope for the course 29.10.2015 13
Triangulation The process of determining location using angle measurements from known reference points Based on geometry of triangles Basic idea: Measure angle from two (or more) reference points Each measurement defines a line and the intersection of lines defines the position of the object Distance from reference points can be determined if the distance between the reference points is known Angle estimation complex and requires specialized hardware Discussed in next lecture 29.10.2015 14
Triangulation: Example x + y = l = d /tan α + d /tan β d d = l / (1/ tan α + 1 / tan β) α x y β d = l sin α sin β / sin (α + β) d = 105 sin 38 sin 43 / sin (38 + 43) = 41.1 m 29.10.2015 15
Trilateration The process of determining locations using distance measurements from known reference points Based on geometry of circles and spheres One of the oldest positioning techniques in the world Used, e.g., with GPS and ultrasound The most popular technique for outdoor positioning Basic idea: Each measurement defines a circle of uncertainty where the object can be located The position of the object can be determined from the intersection of multiple circles 29.10.2015 16
Trilateration: Example 29.10.2015 17
Measuring Distance Time-of-Flight When signal velocity known, propagation time can be used to estimate distances One-way measurements: Beacon sends system time, client compares the time to its own system time when signal is received Requires that clocks are synchronized Basis of satellite navigation (GPS, Galileo, GLONASS) Round-trip time: Time for signals to propagate back and forth between client and reference point (e.g., radar) Works well when reference points sufficiently close 29.10.2015 18
Measuring Distance Radio Propagation Models Alternative to time is to use observed radio wave characteristics to estimate distances Attenuation, wave intensity decreases as a function of distance (and other environmental conditions) A radio propagation model is a mathematical formulation that characterizes radio signal variations Obstacles and their material have strong influence on signal attenuation èmodels work best for positioning in obstacle-free environments Models depend on frequency and environment type è each model specific to a particular combination 29.10.2015 19
Radio Propagation Models Log Distance Path Loss Model Model that predicts the reduction of signal intensity (i.e., path loss) as it propagates through space Transmitted power Received power Length of path Fading variable Path loss at reference distance (in decibels) Path loss exponent Reference distance 29.10.2015 20
Radio Propagation Models Log Distance Path Loss Model Path loss exponent γ characterizes different environments Free space γ = 2 Outdoors normally γ = 2.5-5, depending on the presence of obstacles Indoors γ = 1.6 6, depending on the presence of obstacles Value of γ typically determined empirically Choose a reference distance d 0 Measure path loss at reference distance Estimate γ from measurements 29.10.2015 21
Log Distance Path Loss Model Example d 0 = 3m PL 0 = 50 dbm γ = 3.45 Tx = 40 dbm Fading ignored Given a RSS measurement s = -95 how far are we from the transmitter? PL = 55 dbm log 10 d = (PL PL 0 ) / (10 γ) + log 10 d 0 d = 10^((PL PL 0 ) / (10 γ) + log 10 d 0 ) d = 4.188 meters 29.10.2015 22
Log Distance Path Loss Model Example d 0 = 1m PL 0 = 2 dbm Assume path loss at 2m distance equals 12 dbm, what is the (empirical) value of the path loss coefficient? γ = (PL PL 0 ) / (10 * log 10 d/d 0 ) = (12 0.5) / (10 * log 10 2) 3.32 Fading ignored 29.10.2015 23
Multilateration The use of differences in distance between two (or more) references points to estimate location A variation of lateration Less sensitive to environmental variations than lateration Basic idea: Each difference measurement determines a hyperbolic curve along which the object is located Intersection of two (or more) hyperbolic curves determines the location of the object Difference typically measured using difference between arrival times (time-difference of arrival or TDOA) 29.10.2015 24
Multilateration - Example 29.10.2015 25
Errors Dilution of Precision In practice, distance/angle measurements contain inaccuracies, e.g., due to: Attenuation due to obstacles or atmospheric effects Signal interference Inaccurate synchronization Multipath effects Instead of obtaining accurate circles, lines or hyperbolas, estimates define an error region within which the true distance is assumed to be 29.10.2015 26
Errors Dilution of Precision Intersection of multiple error regions defines a region of uncertainty for the overall position estimate Size of region depends on geometry of reference points Dilution of Precision (DoP) measures the size of the error region Overall error thus depends on two factors Error in distance/angle calculations Geometry of reference points 29.10.2015 27
Dead (or deduced) Reckoning Source: http://en.wikipedia. org/wiki/dead_rec koning Estimate position by extrapolation from last position Also referred to as inertial navigation Indoors: Pedestrian Dead Reckoning (PDR) Requires information about Direction of motion E.g., compass or gyroscope Velocity of motion or distance travelled since last known position E.g., accelerometers or odometers Errors in motion measurements amplify over time è accuracy drifts and decreases over time Needs periodic recalibration 29.10.2015 28
Dead Reckoning Let (x 0,y 0 ) denote the current position of the target New position (x 1,y 1 ) given by x 1 = x 0 + L cos α, y 1 = y 0 + L sin α Where L is the distance traveled If distance is not known, but velocity is, we have L = vδt y 1 y 0 x 0 x 1 29.10.2015 29
Fingerprinting Technique that exploits spatial variations in observed signal characteristics for positioning Two phases: Calibration: construct a database that contains measurements of signal characteristics at different locations Estimation: compare current measurement against the database and estimate position using the best matches Basic idea thus similar to lateration: Distances reflect differences between measurements of signal characteristics instead of physical distance Reference points defined manually in calibration phase instead of using pre-existing points 29.10.2015 30
Fingerprinting Fingerprinting requires that signal characteristics are stable and sufficiently distinctive Spatial variation: signals at different locations vary enough to be distinguishable Temporal variation: signals sufficiently stable over time Device variation: differences between measurements of different devices sufficiently small Generally any signal source can be used as long as its stable enough across these variations WiFi and magnetic field most commonly used (indoors) Other sources include audio and even background radioactivity 29.10.2015 31
Representing Fingerprints Beacon-based fingerprints: Identifiers of beacons that can be observed WiFi: access point identifiers (MAC) ibeacon: Bluetooth beacon identifiers Signal characteristics-based fingerprints Vectors that capture specific characteristics of the measured signals E.g., WiFi / Bluetooth: signal strength (RSS) of beacons Magnetic positioning: strength of magnetic field components, possibly also orientation/heading of device Difference-based fingerprints Vectors that capture differences in signal characteristics Also known as hyperbolic fingerprints WiFi: differences between access point strengths Audio: differences in audio intensity between predefined frequency bands 29.10.2015 32
Examples of fingerprint representations WiFi scan: Beacon 00:21:91:52:20:c8, 00:21:91:51:5e:5e, 00:21:91:52:26:bc 00:21:91:52:20:c8-58 00:21:91:51:5e:5e -55 00:21:91:52:26:bc -60 Signal characteristics 00:21:91:52:20:c8-58 00:21:91:51:5e:5e -55 00:21:91:52:26:bc -60 Hyperbolic 58/55, 58/60, 55/60 29.10.2015 33
Indexing Fingerprints Deterministic Positioning based on individual fingerprints Nearest neighbors based position estimation Probabilistic (or model-based) Fingerprints used to construct a model which is stored and used for positioning Requires multiple measurements per location 29.10.2015 34
Deterministic Fingerprinting Let s denote a vector consisting of measurements of signal characteristics Pairs consisting of an identifier and RSS value Deterministic fingerprinting calculates the distance d(s,x) between measurement s and all fingerprints x in the database Euclidean distance most common choice Position estimated based on the distances d(s,x) 29.10.2015 35
Deterministic Fingerprinting knn (k nearest neighbors) 1. Find k best matching measurements in the database 2. Estimate position as the geometric average of the locations associated with these measurements WkNN (weighted k nearest neighbors) 1. Find k best matching measurements in the database 2. Assign weight for each of these measurements using the difference in signal characteristics Example: inverse of the distance 3. Estimate position as a weighted centroid 29.10.2015 36
Deterministic Fingerprinting Example (k = 5) Current measurement 00:21:91:52:20:c8 64 Radio map 2.0, 5.0, 00:21:91:52:20:c8 61 2.0, 1.5, 00:21:91:52:20:c8 70 3.5, 5.0, 00:21:91:52:20:c8 58 2.5, 4.5, 00:21:91:52:20:c8 56 4.5, 3.5, 00:21:91:52:20:c8 55 4.2, 2.5, 00:21:91:52:20:c8 72 3.2, 1.5, 00:21:91:52:20:c8 77 1.2, 2.5, 00:21:91:52:20:c8 50 2.6, 1.8, 00:21:91:52:20:c8 62 3.4, 2.5, 00:21:91:52:20:c8 61 Distance 3 6 6 8 9 8 13 14 2 3 2.7 3.16 29.10.2015 37
Fingerprint Matching: Probabilistic Use a probabilistic model to capture signal variations at different location Histogram-based: model signal variations using a histogram of observations Parametric: use a parametric distribution to model signal variations (e.g., a Gaussian) Position can be estimated by Calculating probability or likelihood of different locations Using the location with the highest probability as the estimate or calculating a weighted estimate 29.10.2015 38
Probabilistic Fingerprinting Histogram cf. Gaussian Histogram Gaussian Can be converted into probabilities using n i / n i for each separate bin/value i 29.10.2015 39
Probabilistic: Histogram Histogram is a discrete representation of the observed signal values at a particular location Corresponds to conditional probability of observing a particular value at a given location p(71) 0.118 To avoid zero probabilities, a small constant can be added to all values Alternatively, values can be interpolated 29.10.2015 40
Probabilistic Fingerprinting - Example: Histogram Assume we observe value s = 56, determine whether the client is located at x or y p x (56) = 0.08 p y (56) = 0.0015 X Y y 29.10.2015 41
Probabilistic Fingerprinting: Gaussian Assume Gaussian model for signal strenght values Radio map Room Mean St.Dev N 1 88.33 8.07 12 2 75.25 6.04 10 3 90.16 9.02 18 Measurement Likelihood 64 0.000525157553911607 0.0116081147104146 0.000659501766423425 Estimated position: room 2 29.10.2015 42
Probabilistic Fingerprinting - Multidimensional Example How to calculate probability of a multidimensional measurement? How to handle missing entries? Replace missing value with a default value Replace missing probability with a default value Radio map: MAC Mean St.Dev N 00:21:91:52:20:c8-58 12.45 29 00:21:91:51:5e:5e -55 11.04 29 00:21:91:52:26:bc -60 11.93 29 Fingerprint 00:21:91:52:20:c8-52 00:21:91:51:5e:5e -59 29.10.2015 43
Probabilistic Fingerprinting - Multidimensional Example Probability can be calculated in two ways Using multidimensional probability distributions Take into account correlations between different transmitters / beacons Assuming transmitters/beacons independent, in which case probabilities can be multiplied together Usually calculated on a logarithmic scale è becomes a sum of logarithmic probabilities Logarithms also help to prevent underflows 29.10.2015 44
Probabilistic Fingerprinting - Multidimensional Example Radio map: MAC Mean St.Dev N 00:21:91:52:20:c8-58 12.45 29 00:21:91:51:5e:5e -55 11.04 29 00:21:91:52:26:bc -60 11.93 29 Fingerprint 00:21:91:52:20:c8-52 00:21:91:51:5e:5e -59 log p(-52-58, 12.45) = -3.56 log p(-59-55, 11.04) = -3.45 log p(? -60, 11.93) =? log p(-105-60, 11.93) = -10.512 or log 10-16 = -36.8414 p (s μ, σ) = -17.5220 or p (s μ, σ) = -43.8514 29.10.2015 45
Literature Hightower, J. & Borriello, G., Location Systems for Ubiquitous Computing IEEE Computer, 2001, 34, 57-66 Bahl, P. & Padmanabhan, V. N., RADAR: An In-Building RF-Based User Location and Tracking System. Proceedings of the 19th Conference on Computer Communications (INFOCOM), IEEE Computer Society, 2000, 2, 775-784 Honkavirta, V.; Perälä, T.; Löytty, S. A. & Piché, R., A Comparative Survey of WLAN Location Fingerprinting Methods, Proceedings of the 6th Workshop on Positioning, Navigation and Communication (WPNC), IEEE, 2009, 243-251 Krishnakumar, A. & Krishnan, P., The theory and practice of signal strength-based location estimation. Proceedings of the 1st International Conference on Collaborative Computing: Networking, Applications and Worksharing, 2005 Roos, T.; Myllymäki, P. & Tirri, H., A Statistical Modeling Approach to Location Estimation, IEEE Transactions on Mobile Computing, 2002, 1, 59-69 Youssef, M. & Agrawala, A., The Horus location determination system Wireless Networks, 2008, 14, 357-374 Hightower, J. & Borriello, G., Particle Filters for Location Estimation in Ubiquitous Computing: A Case Study, Proceedings of the 6th International Conference on Ubiquitous Computing (Ubicomp), Springer, 2006, 88-106 29.10.2015 46
Literature Küpper, A., Location-Based Services : Fundamentals and Operation, Wiley, 2005 Roos, T.; Myllymäki, P.; Tirri, H.; Misikangas, P. & Sievänen, J. A probabilistic approach to WLAN user location estimation International Journal of Wireless Information Networks, 2002, 9, 155-164 Fox, D.; Burgard, W.; Dellaert, F. & Thrun, S., Monte Carlo Localization: Efficient Position Estimation for Mobile Robots., Proceedings of the Sixteenth National Conference on Artificial Intelligence and Eleventh Conference on Innovative Applications of Artificial Intelligence (AAAI/IAAI), MIT Press, 1999, 343-349 Haeberlen, A.; Flannery, E.; Ladd, A. M.; Rudys, A.; Wallach, D. S. & Kavraki, L. E. Practical robust localization over large-scale 802.11 wireless networks, Proceedings of the 10th annual international conference on Mobile computing and networking (MobiCom), ACM, 2004, 70-84 29.10.2015 47