880 likes | 1.17k Vues
Map-Matching for Outdoor Tracking. Guobin (Jacky) Shen jackysh@Microsoft.com Microsoft Research Asia Mobile Location Sensing Tutorial, Mobisys’13. Applications. Navigation Personal location diary: K eep track of trips and location-based notes
E N D
Map-Matching for Outdoor Tracking Guobin (Jacky) Shen jackysh@Microsoft.com Microsoft Research Asia Mobile Location Sensing Tutorial, Mobisys’13.
Applications • Navigation • Personal location diary: • Keep track of trips and location-based notes • Traffic estimation from crowd/fleet sources • Package, trash tracking • Low power embedded chip • Etc, etc, …
What is map matching? • Map-matching is the process of aligning a sequence of observed user positions with the road network on a digital map. • Essentially, a map-constrained filtering process Map Data Raw sensor Data Location Samples Matching Engine Trajectory
Typical sensors and techniques • Sensors: • GPS • WiFi • Cellular • IMU (accelerometer, compass, gyroscope) • Techniques: • Hidden Markov Model GPS Relative Energy Consumption WiFi IMU Cellular 75m 5-10m 150m 300m
A trivial task when using GPS? • Seemingly trivial • GPS’s accuracy: < 10m • “nearest road” alg. • But it’s not always true. • Sampling frequency: • Unaffordable continuous location acquisition • GPS is energy hungry • Canyon effect
More challenging using other sensors The Case of WiFi The Case of Cellular
Markov Models • Set of states: • Process moves from one state to another generating a sequence of states : • Markov chain property: • Probability of each subsequent state depends only on what was the previous state: • To define Markov model needs these probabilities: • Transition probabilities, • Initial probabilities
0.3 0.7 Rain Dry 0.2 0.8 Example of Markov Model • Two states : ‘Rain’ and ‘Dry’. • Transition probabilities. E.g., P(‘Dry’|‘Rain’)=0.7 • Initial probabilities: • P(‘Rain’)=0.4 , P(‘Dry’)=0.6 .
Calculation of sequence probability • By Markov chain property, prob of state sequence: • Prob of the state sequence {‘Dry’,’Dry’,’Rain’,’Rain’}P({‘Dry’,’Dry’,’Rain’,Rain’} ) = P(‘Rain’|’Rain’) P(‘Rain’|’Dry’) P(‘Dry’|’Dry’) P(‘Dry’) = 0.3*0.2*0.8*0.6
Hidden Markov models. • Markov Model: • Set of states, sequence of states, • Markov chain property, • Transition probA, Initial prob. • Hidden Markov Model: • States are not visible, but each state generates one random observable/visible states • To define an HMM, needs additional probabilities: • Emission/Observation probabilities B: • HMM: M=(A, B, )
0.3 0.7 Low High 0.2 0.8 Rain Example of Hidden Markov Model • Two states : ‘ • Low’ and ‘High’ atmospheric pressure. • Two observations : • ‘Rain’ and ‘Dry’. • Transition probabilities • Same as before • Observation probabilities : P(‘Rain’|‘Low’)=0.6 , P(‘Dry’|‘Low’)=0.4 , P(‘Rain’|‘High’)=0.4 , P(‘Dry’|‘High’)=0.3 • Initial probabilities: P(‘Low’)=0.4, P(‘High’)=0.6 0.6 0.6 0.4 0.4 Dry
Main problems using HMMs • Given the HMM M=(A, B, ) and the observation sequence O=o1 o2 ... oK , • Evaluation problem: calculate the probability that the model M has generated sequence O. • Decoding problem: calculate the most likely sequence of hidden states Si that produced this observation sequence O. • Learning problem. Given some training observation sequences O, and general structure of HMM (numbers of hidden and visible states), determine HMM parameters A, B, that best fit training data.
sj s2 s1 sN s2 s1 sN si si s1 sN si s2 s1 sN s2 Decoding problem • Given the HMM M=(A, B, ) and the observation sequence O=o1 o2 ... oK, find the state sequence Q= q1,…, qK which maximizes P(Q | O ), or equivalently P(Q, O). a1j o1 okok+1 (oK= Observations) a2j Trellis representation aij aNj Time= 1 k k+1 K
s1 si sN sj qk-1 qk a1j aij aNj Viterbi algorithm (1) • General idea: • if best path ending in qk= Sj goes through qk-1= Si, then it should coincide with best path ending in qk-1= Si. • To backtrack best path, keep the predecessors of Sj was Si.
Viterbi algorithm (2) • Define: k(i) as the maximum probability of producing observation sequence o1 o2 ... okwhen moving along any hidden state sequence q1… qk-1and getting into qk= Si . k(i) = max P(q1… qk-1 , qk= Si, o1 o2 ... ok) where max is taken over all possible paths q1… qk-1. • Recursion formula: k(i) = max P(q1… qk-1 , qk= Si, o1 o2 ... ok) = maxi [aijbj(ok)k-1(j)]
Viterbi algorithm (3) • Initialization: 1(i) = max P(q1= Si, o1) = ibi (o1) , 1<=i<=N. • Forward recursion: k(i) = maxi [aijbj(ok)k-1(j)](1<=j<=N, 2<=k<=K) • Termination: Choose best path ending at time K (i.e., maxi [ K(i) ]) • Backtrack best path.
The case of GPS Paul Newson and John Krumm, "Hidden Markov Map Matching Through Noise and Sparseness", ACM SIGSPATIAL GIS 2009, pp. 336-343.
A trivial task when using GPS? • Seemingly trivial • GPS’s accuracy: < 10m • “nearest road” alg. • But it’s not always true. • Sampling frequency: • Unaffordable continuous location acquisition • GPS is energy hungry • Canyon effect Many people encountered loops in navigation when using GPS.
Three Insights • Correct matches tend to be nearby • Successive correct matches tend to be linked by simple routes • Some points are junk, and the best thing to do is ignore them
Three Insights, Three Choices Match Candidate Probabilities Route Transition Probabilities “Junk” Points
Obtaining probabilities Emission Probability Model Transition Probability Model
Match Candidate Limitation • Don’t consider roads “unreasonably” far from GPS point • “Junk Points”
Route Candidate Limitation • Route Distance Limit • Absolute Speed Limit • Relative Speed Limit
Robustness to Sparse Data • HMM Map Matcher works “perfectly” up to 30 second sample period • HMM Map Matcher is reasonably good up to 90 second sample period Data: http://research.microsoft.com/en-us/um/people/jckrumm/MapMatchingData/data.htm
The case of WiFi Thiagarajan, Arvindet al. “Vtrack: Accurate, Energy-Aware Road Traffic Delay Estimation using Mobile Phones, In Sensys’09, pages 85-98.
Background • Road Traffic Problem: • Causes inefficiency, Fuel Waste, Frustration • Trends: • More cars on road, more time wasted in traffic • Smartphone Capabilities • Massive Deployment • GPS , WiFi, and Cellular localization capabilities • The ask: • Accurate, energy-aware road traffic delay estimation using mobile phones?
VTrack • VTrack is a system for travel time estimation using smart phones sensors (GPS, WiFi). • Key Challenges • Sensor unreliability • GPS outages • WiFi is only applicable when APs are available • Energy consumption • WiFi is more energy efficient (2x) but less accurate • Need to find optimal sample rate • Key idea: HMM map matching to produce the actual trajectories using WiFi location estimation
System Architecture • Users with smartphones (crowdsourcing) • Run VTrack reporting application • Report position data periodically to the server
VTrack algorithm Outlier removal & interpolation Raw trace Viterbi matching Bad zone removal • Preprocess the position samples to remove outliers • Speed constraint (<200mph) • HMM map matching • Bad zone removal • Viterbi decoding confidences
HMM Map Matching • Hidden states: road segments • Observables: position samples • Emission probability: • Assumed to be uniform, 1/N • Transition probabilities p = P(Sj,t|Si,t-1): • If i=j, p= (constant set to <= 1/(dmax+1), where dmax is maximum out-degree of any intersection). • If j does not start where i ends, p=0. • If j does start where i ends, p= or 0.
Results • HMM-based map matching • Robust to noise • Error < 10% • When only WiFi • With 40m Gaussian noise • GPS available and accurate, periodic sampling helps with both
The case of Cellular Thiagarajan, Arvind et al. "Accurate, Low-Energy Trajectory Mapping for Mobile Devices.” NSDI 2011.
Problem statement • Can we process cellular signal information to produce accurate trajectories? How accurate?
Motivation • Push down the energy consumption • GPS signals are energy-intensive • Frequent GPS sampling drains battery fast • Cellular consumes almost no additional energy • But, existing cellular location systems aren’t good enough to find tracks • Existing map-matching algs.perform poorly w/ cellular signals.
Key insights • Proper preprocessing is crucial! • Translating raw sensor data to location stamps is a kind of preprocessing, but not necessarily good. • Cellular has very localization accuracy, introduce too much noises. Map Data Sequencing &Smoothing Location Samples Matching Engine Trajectory Raw sensor Data
Overall workflow • Not convert radio FP to (lat,lon) coords and then match to a map • Instead, first sequence GSM FPs on a spatial grid Cell Tower Fingerprints SensorHints Training Database Grid Sequencing Sequence of Grids Smoothing and Interpolation Sequence of Coordinates Road Map Segment Matching Sequence of Road Segments
Three key steps HMM fingerprints to grid sequence HMM smooth grid to road segments
HMM for grid sequencing • Given a sequence of GSM fingerprints,find most likely sequence of grid cells • Hidden state: Grid Cell • Observables: <CellTowerID, RSSI> • Emission score: • P(Signature | Grid Cell) • Transition score: • P(GCi|GCi-1) • Decoding: • max(Emission Score * Transition Score)
Smoothing and interpolation • Smoothing: • Step1: centroid(training points in a grid) • Step2: centroid(Cg in a sliding window) • Interpolation: to increase the sample rate s.t., minimum road segment (~30m) has one sample
HMM for road segment matching • Hidden state: road segment • Observables: <lat, lon> • Emission score: • Transition score: • P(RSi|RSi-1)
Add motion state and turn hints • Binary motion states: still or moving (from Acc) • Binary turn hints: turn or not turn (from Compass) • Consider hints in transition score • P(RSi|RSi-1)*P(Move|Move Hint)*P(Turn|Turn Hint)
Evaluation results • 75% precision, 2.4x better than existing approaches • Sequence first before converting to <lat, lon> is critical • Sensor hints lead to small improvement in system metrics, but can correct some systematic errors (e.g., kinks, looping)
The case of IMU SantanuGuha, et al., AutoWitness: Locating and Tracking Stolen Property While Tolerating GPS and Radio Outages, Sensys’10.
AutoWitness • Objectives • Detection of theft • Tracking of the stolen tag • Pinpointing of the location • Challenges - Cost & Energy • Hardware selection • Theft classifier • Tracking method
System Overview Motion detection (vibration dosimeter) Classification (Accelerometer) Sufficient time & RF power available
Turns Angle Estimate • Gyro single integration change in the attitude • Heading angle detection: • Absolute value of 1st difference • Thresholds, Dh & Dl • Activation time • From Dh to Dl