Presentation is loading. Please wait.

Presentation is loading. Please wait.

Week Aug-24 – Aug-29 Introduction to Spatial Computing CSE 5ISC Some slides adapted from the book Computing with Spatial Trajectories, Yu Zheng and Xiaofang.

Similar presentations


Presentation on theme: "Week Aug-24 – Aug-29 Introduction to Spatial Computing CSE 5ISC Some slides adapted from the book Computing with Spatial Trajectories, Yu Zheng and Xiaofang."— Presentation transcript:

1 Week Aug-24 – Aug-29 Introduction to Spatial Computing CSE 5ISC Some slides adapted from the book Computing with Spatial Trajectories, Yu Zheng and Xiaofang Zhou. Springer

2 GPS Tracking www.worldwildlife.org www.businessinsider.com www.safetytrack.net www.mdpi.com gNO X /m 0.016 0.000 Emission Hot Spots After Bus Stops

3 GPS Track Processing

4 GPS Tracking {,,..., } Positioning technologies Global positioning system (GPS) Network-based (e.g., using cellular or wifi access points) Dead-Reckoning (for estimation)

5 Trajectory Preprocessing  Problems to solve with trajectories  Lots of trajectories → lots of data  Noise and Errors complicates analysis and inference  Example, errors caused due inaccuracy from switch between GPS / Wi-Fi /cell phone tower signals.  Employ the data reduction and filtering techniques  Specialized data compression for trajectories  Principled filtering techniques

6 GPS Track Processing: Data Reduction

7 Trajectory Preprocessing - Compression

8 Performance metrics for Trajectory Compression  Trajectory data reduction techniques aims to reduce trajectory size w/o compromising much precision.  Performance Metrics  Processing time  Compression Rate  Error Measure  The distance between a location on the original trajectory and the corresponding estimated location on the approximated trajectory is used to measure the error introduced by data reduction.  Examples are Perpendicular Euclidean Distance or Time Synchronized Euclidean Distance.

9 Common Error Measures: Perpendicular Euclidean Distance

10 Common Error Measures: Time Synchronized Distance

11 Trajectory Data Reduction Techniques What if we just sample every i th point from the trajectory and call it a compressed trajectory?

12 Trajectory Data Reduction Techniques  Batched Compression :  Collect full set of location points and then compress the data set for transmission to the location server.  Applications: content sharing sites such as Everytrail and Bikely.  Techniques include Douglas-Peucker Algorithm, top-down time-ratio (TD- TR), and Bellman's algorithm.

13 Batched Compression: Douglas-Peucker Algorithm  Preserve directional trends in the approximated trajectory using the perpendicular Euclidean distance as the error measure. 1.Replace the original trajectory by an approximate line segment. 2.If the replacement does not meet the specified error requirement, it recursively partitions the original problem into two subproblems by selecting the location point contributing the most errors as the split point. 3.This process continues until the error between the approximated trajectory and the original trajectory is below the specified error threshold.

14 Batched Compression: Douglas-Peucker (DP) Algorithm  Split at the point with most error.  Repeat until all the errors < given threshold

15 Batched Compression: Other Algorithms  DP uses perpendicular Euclidean distance as the error measure. Also, it’s heuristic based, i.e., no guarantee that the selected split points are the best choice.  TDTR uses time synchronized Euclidean distance as the error measure to take into account the geometric and temporal properties of object movements.  Bellman Algorithm employs dynamic programming technique to ensure that the approximated trajectory is optimal  Its computational cost is high.  More details in Bellman 1961 http://dl.acm.org/citation.cfm?id=366611

16 Trajectory Data Reduction Techniques  On-line Data Reduction  Selective on-line updates of the locations based on specified precision requirements.  Applications: traffic monitoring and fleet management.  Techniques include Reservoir Sampling, Sliding Window, and Open Window. Consider the scenario: You are managing a trucks fleet and are interested in collecting GPS data from the fleet. However, you have limited memory on trucks and the internet connection is not reliable. How would you proceed?

17 Online Data reduction Techniques: Reservoir sampling  Generate an approximated trajectory of size R (i.e., R items).  Maintain a reservoir of size R.  Save first R samples in the reservoir.  When the k th location point is acquired (k > R).  Generate a random number j between 1 and k.  If j < R then evict j th item from reservoir.  the reservoir algorithm always maintains a uniform sample of the evolving trajectory without even knowing the eventual trajectory size.  See (http://austinrochford.com/posts/2014-11-30-reservoir-sampling.html) for proof.http://austinrochford.com/posts/2014-11-30-reservoir-sampling.html Any Comments on its solution quality?

18 Online Data reduction Techniques: Sliding Window  Fit the location points in a growing sliding window with a valid line segment and continue to grow the sliding window until the approximation error exceeds some error bound. 1.First initialize the first location point of a trajectory as the anchor point p a and then starts to grow the sliding window 2.When a new location point p i is added to the sliding window, the line segment p a p i is used to fit all the location points within the sliding window. 3.As long as the distance errors against the line segment p a p i are smaller than the user-specified error threshold, the sliding window continues to grow. Otherwise, the line segment p a p i-1 is included as part of the approximated trajectory and p i is set as the new anchor point. 4.The algorithm continues until all the location points in the original trajectory are visited.

19 Illustration of Sliding Window  While the sliding window grows from {p 0 } to {p 0, p 1, p 2, p 3 }, all the errors between fitting line segments and the original trajectory are not greater than the specified error threshold.  When p 4 is included, the error for p 2 exceeds the threshold, so p 0 p 3 is included in the approximate trajectory and p 3 is set as the anchor to continue. Exceeds the desired error

20 Illustration of Opening Window  Different from the sliding window, choose location points with the highest error in the sliding window as the closing point of the approximating line segment as well as the new anchor point.  When p 4 is included, the error for p 2 exceeds the threshold, so p 0 p 2 is included in the approximate trajectory and p 2 is set as the anchor to continue.

21 Reduction based on Speed and Direction

22 GPS Track Processing: Filtering Techniques

23

24 Filtering Techniques: Mean Filter

25

26

27 Filtering Techniques: Median Filter

28

29

30 Filtering Techniques: Kalman Filtering  Can use physics based model for the trajectory.  The trajectory estimate from Kalman filter is basically a tradeoff between measurements and motion model (dictated by physics).  Based on Hidden Markov Models

31 Gentle Introduction to Hidden Markov Models  X t and E t are random variables.  X t models the phenomena being tracked  Example, actual location of an object which is being tracked.  E t is observed state.  Based on E t s we estimate the X t  We are given transition probabilities of P(X t | X t-1 ) and  Sensor probabilities P(E t |X t )

32 Gentle Introduction to HMM: Markov Chains

33 Gentle Introduction to HMM

34

35

36 Filtering in Hidden Markov Models

37 One Step Prediction

38 Filtering in Hidden Markov Models Updating using Sensor values

39 Kalman Filters Observations through sensors Location (hidden variable) Velocity (hidden variable)

40 Gaussian Distributions  Univariate- x is a 1-d variable  Multi-variate– x is n-dimensional vector Covariance Matrix

41 Fitlering in Kalman Filters – 1-d case  One Step Prediction  If is Gaussian then the posterior is also Gaussian.  Updating with sensor values  Filter based on evidence  If predicted posterior is Gaussian then the filtered posterior is also Gaussian.  Final result is a Gaussian

42 Fitlering in Kalman Filters for multivariate case


Download ppt "Week Aug-24 – Aug-29 Introduction to Spatial Computing CSE 5ISC Some slides adapted from the book Computing with Spatial Trajectories, Yu Zheng and Xiaofang."

Similar presentations


Ads by Google