Positioning Algorithms Petteri Nurmi 19.1.2012 1
Questions What are the main positioning algorithms and how they work? Which two main factors influence positioning errors? What is dilution of precision? What is fingerprinting and how does it operate? 10.11.2016 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 Position can be estimated by the user or infrastructure 10.11.2016 4
Positioning System Three 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 Triangulateration (=triangulation + trilateration) Multilateration Fingerprinting Reference system 10.11.2016 5
Triangulation d α β?? The process of determining location using angle measurements from known reference points Based on geometry of triangles Prior to GPS widely used, nowadays less Especially important in nautical and aerial positioning Also used by some indoor localization systems Basic idea: Measure angle from (at least) two 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 E.g., lighthouse in sea navigation, or ceiling mounted transmitter in indoor localization 10.11.2016 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 10.11.2016 7
Triangulation How to determine coordinates of an object using triangulation? Coordinates of the reference points usually known Triangulation provides distance and angle (heading) from reference points è first geodesic problem Photogrammetry an example of triangulation Two images taken at known locations and angles used to determine (3D) position of an object Infrastructure-based system Nautical navigation has traditionally used triangulation Angular measurements taken from landmarks or celestial objects, and combined with knowledge of their position Mainly used nowadays as part of optical positioning systems 10.11.2016 8
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 10.11.2016 9
Trilateration: Example 10.11.2016 10
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 10.11.2016 11
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 10.11.2016 12
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 10.11.2016 13
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 10.11.2016 14
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 10.11.2016 15
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 10.11.2016 16
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) 10.11.2016 17
Multilateration - Example 10.11.2016 18
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 10.11.2016 19
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 10.11.2016 20
Fingerprinting Technique that exploits spatial variations in observed signal characteristics for positioning Has been 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 Generic technique that can be used to any data as long as Stable over time Distinctive across locations Preferably also stable across device variations 10.11.2016 21
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 10.11.2016 22
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 10.11.2016 23
Calibration - Indexing Fingerprints Deterministic Positioning based on individual fingerprints Distance-based position estimation So-called full index as all measurements are indexed Requires efficient indexing to be feasible for larger areas Probabilistic (or model-based) Fingerprints used to construct a model which is stored and used for positioning Model complexity determines size of the radio map in storage Gaussian distribution: store mean, variance, and number of measurements per location Empirical: number of observations for each signal characteristic level Requires multiple measurements per location Note: many fingerprints sensitive to orientation 4-dimensional location index containing latitude, longitude (or x and y) together with altitude and orientation of device 10.11.2016 24
Calibration Example Individual Fingerprints 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 10.11.2016 25
Calibration Example Model-Based Approach Measurements from Grid 183219 RSS Values 82 89 87 92 90 93 65 93 94 90 93 92 Radio Map A) Gaussian model GridId Mean St.Dev N 183219 88.33 8.07 12 B) Histogram model 10.11.2016 26
Fingerprinting Position Estimation Deterministic: signal measurements considered as scalar values location estimated using vector comparisons typically used with the full index approach most popular approach is to use a k-nearest neighbors (knn) algorithm Probabilistic: signal measurements considered as a sample from a random variable probabilistic inference used for position estimation Most popular techniques variations of Gaussian distributions and histograms 10.11.2016 27
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 Other possible distances include: Manhattan distance, extended- Tanimoto distance, Mahalanobis distace, Kullback-Leibler divergence Position estimated based on the distances d(s,x) 10.11.2016 28
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 10.11.2016 29
Deterministic Fingerprinting Example 10.11.2016 30
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 10.11.2016 31
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) 10.11.2016 32
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 10.11.2016 33
10.11.2016 34
Deterministic Fingerprinting - Multidimensional Example How to compare partially matching fingerprints? 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 (typically -105 to -120, depending on device) Alternatively, a constant penalty can be specified for missing dimensions 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 10.11.2016 35
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 10.11.2016 36
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 10.11.2016 37
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 10.11.2016 38
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 10.11.2016 39
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 10.11.2016 40
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 10.11.2016 41
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 10.11.2016 42
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 10.11.2016 43
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 10.11.2016 44
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 10.11.2016 45
Case Study Probabilistic GSM Positioning 10.11.2016 46
Example Indoor Atlas https://www.youtube.com/watch?v=pkehw3fkplq 10.11.2016 47
Summary Five main algorithms for position estimation: Triangulation: angle based positioning Trilateration: distance based positioning Time of arrival, radio propagation De-facto approach for outdoor positioning (GPS) Triangulateration: angle and distance based positioning 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 10.11.2016 48
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 10.11.2016 49
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 10.11.2016 50