Positioning Algorithms Petteri Nurmi 19.1.2012 1
Questions How triangulation works and where it is still used? How trilateration works? How can distances be measured? How multilateration differs from trilateration? What is dilution of precision? Which two factors influence positioning errors? How fingerprinting works? What is the difference between deterministic and probabilistic fingerprinting? 20.3.2014 2
Positioning The process of determining where an entity is located Also know as localization, locating and location tracking Examples of application areas: Navigation technologies Military operations Location-based services Petteri Nurmi / Positioning Algorithms 19.1.2012 3
Positioning System A system that estimates the position of an object The returned estimate can be absolute or relative Absolute: position determined by a suitable coordinate system (e.g., WGS-84 or a local coordinate system) E.g., 60 12 16 N 24 57 46 E (Kumpula campus) Estimate meaningful within the scope of the coordinate system: global (WGS-84) or specific to a region (KKJ) Relative: position determined relative to other entities E.g., 5km NE from Stockman Estimate meaningful only in a local context 20.3.2014 4
Positioning System Two parts to every positioning system: Location system: provides measurements that can be used to determine the location of an entity Examples: GPS, WiFi, GSM, Ultrasound, Infrared, These will be discussed in a separate lecture Positioning algorithm: technique that determines the position of the entity Triangulation Trilateration Multilateration Fingerprinting 20.3.2014 5
Triangulation The process of determining location using angle measurements from known reference points Based on geometry of triangles Prior to GPS widely used, nowadays less utilized 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 20.3.2014 6
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 20.3.2014 7
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 20.3.2014 8
Trilateration: Example 20.3.2014 9
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 20.3.2014 10
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 20.3.2014 11
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 20.3.2014 12
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 20.3.2014 13
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 20.3.2014 14
Log Distance Path Loss Model Example d 0 = 1km PL 0 = 50 dbm Assume path loss at 2km distance equals 62 dbm, what is the (empirical) value of the path loss coefficient? γ = (PL PL 0 ) / (10 * log 10 d/d 0 ) = (62 50) / (10 * log 10 2) 4 Fading ignored 20.3.2014 15
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) 20.3.2014 16
Multilateration - Example 20.3.2014 17
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 20.3.2014 18
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 E.g., GPS returns estimates of error in horizontal, vertical, positional and time estimates Overall error thus depends on two factors Error in distance/angle calculations Geometry of reference points 20.3.2014 19
Fingerprinting Technique that exploits spatial variations in observed signal characteristics for positioning The de-facto approach for indoor 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 20.3.2014 20
Fingerprinting Calibration Collect information containing: Location measurements Continuous: measurements associated with coordinates Discrete: measurements associates with discrete regions, e.g., grid cells or other topological partionings Measurements of signal characteristics WiFi: MAC addresses and received signal strenght GSM: Cell identifiers and received signal strength Note: Fingerprinting is a generic technique that can be applied to ANY measurements Sound, light, radioactivity, Requires merely sufficiently stable spatial variations 20.3.2014 21
Calibration Example Continuous Measurements 60.2035016666667 24.9615033333333 59 60.2044016666667 24.9609333333333 95 60.2017816666667 24.9599583333333 68 60.2077316666667 24.9464716666667 80 60.2060183333333 24.9725366666667 76 60.2089233333333 24.962195 86 60.2134933333333 24.979265 82 60.2057783333333 24.96276 93 60.2104616666667 24.964205 61 60.2094616666667 24.964735 61 20.3.2014 22
Calibration Example Discrete Measurements Measurements from Grid 183219 RSS Values 82 89 87 92 90 93 65 93 94 90 93 92 Radio Map GridId Mean St.Dev N 183219 88.33 8.07 12 20.3.2014 23
Fingerprinting Position Estimation Deterministic: signal measurements considered as scalar values location estimated using vector comparisons typically used when location measurements are continuous Probabilistic: signal measurements considered as a sample from a random variable probabilistic inference used for position estimation typically used when location measurements are discrete 20.3.2014 24
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) 20.3.2014 25
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 20.3.2014 26
Deterministic Fingerprinting Example 20.3.2014 27
Deterministic Fingerprinting Example (k = 5) Current measurement Radio map Distance 64 60.2035016666667 24.9615033333333 59 60.2044016666667 24.9609333333333 95 60.2017816666667 24.9599583333333 68 60.2077316666667 24.9464716666667 80 60.2060183333333 24.9725366666667 76 60.2089233333333 24.962195 86 60.2134933333333 24.979265 82 60.2057783333333 24.96276 93 60.2104616666667 24.964205 61 60.2094616666667 24.964735 61 5 31 4 16 12 22 18 29 3 3 20.3.2014 28
Deterministic Fingerprinting Example (k = 5) (knn) 60.2035016666667 24.9615033333333 59 60.2017816666667 24.9599583333333 68 60.2060183333333 24.9725366666667 76 60.2104616666667 24.964205 61 60.2094616666667 24.964735 61 60.206245 24.9645876666667 Note, when possible, the geographic average should be used instead. It takes into account the curvature of Earth. In this example the result would be: 60.2062450709712 24.9645875070449 (difference approximately 12cm) 20.3.2014 29
Deterministic Fingerprinting Example (k = 5) (WkNN) Best matches 60.2035016666667 24.9615033333333 59 60.2017816666667 24.9599583333333 68 60.2060183333333 24.9725366666667 76 60.2104616666667 24.964205 61 60.2094616666667 24.964735 61 Weight (1/d) 1 / 5 1 / 4 1 / 12 1 / 3 1 / 3 60.2069069907408 24.9635958101852 20.3.2014 30
20.3.2014 31
Deterministic Fingerprinting - Multidimensional Example How to match partially matching fingerprints against each other? Basic principle the same: calculate Euclidean distance between signal characteristics Missing dimensions typically handled by substituting a default value E.g., for RSS values the minimum observable RSS value is typically used 00:21:91:52:20:c8-57 00:21:91:51:5e:5e -60 00:20:a6:4d:39:20-65 00:21:91:52:20:c8-52 00:21:91:51:5e:5e -59 00:20:a6:4d:39:20-105 40.323 20.3.2014 32
Probabilistic Fingerprinting 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 Particle filters / Kalman filters can be used for tracking when measurements obtained continuously 20.3.2014 33
Probabilistic Fingerprinting Histogram cf. Gaussian GridId Mean St.Dev N 183219 88.33 8.07 12 82 89 87 92 90 93 65 93 94 90 93 92 Histogram Gaussian Can be converted into probabilities using n i / n i for each separate bin/value i 20.3.2014 34
Probabilistic Fingerprinting - Example: 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 20.3.2014 35
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 20.3.2014 36
Probabilistic Fingerprinting Example: Gaussian Assume Gaussian model for signal strenght values Radio map GridId Mean St.Dev N 183219 88.33 8.07 12 183220 75.25 6.04 10 183222 90.16 9.02 18 Measurement Likelihood 64 0.000525157553911607 0.0116081147104146 0.000659501766423425 Estimated position: grid 183220 20.3.2014 37
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 20.3.2014 38
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 20.3.2014 39
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 20.3.2014 40
Case Study Probabilistic GSM Positioning World represented using a discrete grid Facilitates calibration efforts Provides stability to position estimation Each grid cell has size d x d The grid representation consists of two mappings: a) latitude, longitude à grid cell b) grid cell à latitude, longitude 20.3.2014 41
Case Study Probabilistic GSM Positioning GSM signal intensity variations within a grid cell are modeled using Gaussian distributions One Gaussian for each grid cell, GSM cell pair Standard deviation constrained to reduce overfitting Combined with a particle filter for continuous tracking Essentially smoothens estimated trajectories by restricting how a person can move More on tracking later during the course 20.3.2014 42
Case Study Probabilistic GSM Positioning 20.3.2014 43
Summary Four basic algorithms for position estimation: Triangulation: angle based positioning Trilateration: distance based positioning Time of arrival, radio propagation De-facto approach for outdoor positioning (GPS) Multilateration: positioning using differences in distances Time difference of arrival Fingerprinting: positioning by comparing against a database of reference measurements Discrete vs. continuous location measurements Deterministic vs. probabilistic position estimation methods De-facto approach for indoor positioning 20.3.2014 44
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 Krumm, J. & Horvitz, E., LOCADIO: Inferring Motion and Location from Wi-Fi Signal Strengths, Proceedings of the 1st International Conference on Mobile and Ubiquitous Systems (Mobiquitous), IEEE, 2004, 4-14 Roos, T.; Myllymäki, P. & Tirri, H., A Statistical Modeling Approach to Location Estimation, IEEE Transactions on Mobile Computing, 2002, 1, 59-69 20.3.2014 45
Literature Nurmi, P.; Bhattacharya, S. & Kukkonen, J., A grid-based algorithm for on-device GSM positioning, Proceedings of the 12th International Conference on Ubiquitous Computing (UbiComp), 2010, 227-236 Youssef, M. & Agrawala, A., The Horus location determination system Wireless Networks, 2008, 14, 357-374 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 Varshavsky, A.; de Lara, E.; Hightower, J.; LaMarca, A. & Otsason, V., GSM indoor localization, Pervasive and Mobile Computing, 2007, 3, 698-720 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 20.3.2014 46