Indoor Localization Alessandro Redondi
Introduction Indoor localization in wireless networks Ranging and trilateration Practical example using python 2
Localization Process to determine the physical location of an object with respect to a known coordinate system Almost all location systems are composed by two parts: Anchor nodes: devices in known positions (e.g. GPS satellites) Target nodes: devices to be localized. Depending on the application, the anchor nodes may transmit a signal to or receive it from the target nodes 3
Localization systems classification (1) Signal type: Radio-frequency based (WiFi, Bluetooth, UWB, others) Audio (audibile range / ultrasound) Infrared Input data: Power-based (e.g. Received Signal Strength, RSS) Time-based (Time of Arrival (TOA), Time difference of Arrival (TDOA), Round Trip Time (RTT)) Phase-based (EM fields phase difference) Angle of arrival (AOA) Signal model: Parametric (e.g. model-based) Non-parametric (e.g. fingerprinting) 4
Localization systems classification (1) Signal type: Radio-frequency based (WiFi, Bluetooth, UWB, others) Audio (audibile range / ultrasound) Infrared Images Input data: Power-based (e.g. Received Signal Strength, RSS) Time-based (Time of Arrival (TOA), Time difference of Arrival (TDOA), Round Trip Time (RTT)) Phase-based (EM fields phase difference) Angle of arrival (AOA) Localization technique: Parametric (e.g. model-based) Non-parametric (e.g. fingerprinting) 5
Outdoor localization systems GPS: Global Positioning System Anchor nodes: 31 satellites Target nodes: GPS receivers Signal type: RF CDMA spread-spectrum @ 1575.42MHz Input data: Time of Arrival Application: outdoor only (signal is too weak indoor) Accuracy: 1m 6
Indoor localization systems ELIKO, Ekahau, Decawave and many others Anchor nodes: 4 UWB transmitters Target nodes: UWB receiver Signal type: UWB @ 3.1 4.8 GHz Input data: Time of Arrival Application: indoor (4 anchors cover up to 40 m/150m 2 ) Accuracy: 30cm 7
Model based RSS localization: how does it work? 1. Ranging at the receiver, estimate the distance d of the transmitter given the signal strength s Need a model f() for d = f(s) Typically, the log-distance path loss model is used: s = s 0 d 10alog 10 + b d 0 s 0 is the power emitted at d 0 meters a is the path loss exponent, b is a noise term s 0, a are estimated, b generally set to 0 To retrieve d, use d = 10 s 0 s 10a 8
Model based RSS localization: how does it work? 2. Triangulation / trilateration the target estimates distances d 1, d 2, d n from n anchors in positions (x 1, y 1 ), (x 2, y 2 ), (x n,y n ) (x 2, y 2 ) d 2 target d 1 (x 1, y 1 ) d 3 (x 3, y 3 ) Target position is the intersection of the (at least three) circumferences having d 1, d 2, d n as radii and (x 1, y 1 ), (x 2, y 2 ), (x n,y n ) as centers 9
Dealing with errors Often, the estimates d 1, d 2, d n are not exact That means that the 3+ circumferences may never intersect How to deal with this? Least square solution / gradient descent (return the position that minimize the sum of errors between the estimated distances and the resulting ones) Naïve solutions (e.g. weighted average of the anchors position) (x t,y t )= NX w i (x i,y i ) i=1 w i = d p i P N i=1 d p i 10
Weighted Average example 10 real position anchors estimated position 8 6 4 2 0 0 2 4 6 8 10 real distances = [8.2462 2.8284 4.2426] estimated distances = [9.1084 3.1472 2.9350] weights = [0.0753 0.6402 0.2845] 11
A practical example We ll use access points as anchors They are everywhere! I have two with me Anyone can receive beacons from access points and estimate the signal strength Use tshark/wireshark/tcpdump listening for beacons! Let s see how many access points we find here What do we need? Coordinates of access points Some processing in python 12
Fingerprinting localization What if we don t know the coordinate of the APs? Fingerprint approach! 1. Construct a radio map (fingerprint database) of the environment, saving for each position (x,y) the RSS from all visible access points (s 1, s 2,., s n ) 2. When the target needs to be localized, transmit the RSS from visible access points to the database and get the position (x,y) with the most similar fingerprint (many algorithms available) Guess who has the biggest fingerprint database in the world? 13
Let s see an example Sniff beacons from 2 or more access points serving polimi or polimi protected Get the MAC addresses of the AP and the corresponding RSSI 14
Input query to Google Prepare a text document that looks like this: { "considerip": "false", "wifiaccesspoints": [ { "macaddress": MACADDRESS_1", "signalstrength": RSSI_1, "signaltonoiseratio": 0 }, { "macaddress": MACADDRESS_2", "signalstrength": -81, "signaltonoiseratio": 0 } ] } 15
Make the request Go to www.hurl.it for preparing the request Select POST and copy the following URL https://www.googleapis.com/geolocation/v1/geolocate?key =AIzaSyBslCSyun2-ZoO9kYL8p_Z8qanjk_eSd-Y On headers, select Content-Type as name and add application/json as value Copy the text document you have prepared into the body field and launch the request What is the output? What happens if you add other AP? 16