Data verification for collective adaptive systems: spatial model-checking of vehicle location data

36
quanƟcol . . ............. ... ... ... ... ... ... www.quanticol.eu Data verification for collective adaptive systems: spatial model-checking of vehicle location data Vincenzo Ciancia Consiglio Nazionale delle Ricerche, Pisa Stephen Gilmore LFCS, University of Edinburgh Diego Latella Consiglio Nazionale delle Ricerche, Pisa Michele Loreti Universit` a di Firenze and IMT Lucca Mieke Massink Consiglio Nazionale delle Ricerche, Pisa FoCAS @ SASO, London, 8th September 2014 Stephen Gilmore, University of Edinburgh FoCAS @ SASO, London, 8th September 2014 1/30

description

Vincenzo Ciancia, Stephen Gilmore, Diego Latella, Michele Loreti, Mieke Massink from 2nd FoCAS Workshop on Fundamentals of Collective Adaptive Systems at SASO 2014

Transcript of Data verification for collective adaptive systems: spatial model-checking of vehicle location data

Page 1: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Data verification for collective adaptive systems:spatial model-checking of vehicle location data

Vincenzo Ciancia Consiglio Nazionale delle Ricerche, Pisa

Stephen Gilmore LFCS, University of Edinburgh

Diego Latella Consiglio Nazionale delle Ricerche, Pisa

Michele Loreti Universita di Firenze and IMT Lucca

Mieke Massink Consiglio Nazionale delle Ricerche, Pisa

FoCAS @ SASO, London, 8th September 2014

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 1/30

Page 2: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Outline

1 Collective adaptive systems and data correctnessGPS measurements and physical limitations

2 Application: smart public transportIdentifying error conditions in GPS data for vehiclesOn-line and off-line processing

3 Spatial logic and spatial model-checkingClosureSpatial untilReachability

4 Spatial model-checking in practiceDetecting diversions and off-road positionsEvaluating street portions, proximity to stopsDetecting out-of-order observations in data

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 2/30

Page 3: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Outline

1 Collective adaptive systems and data correctnessGPS measurements and physical limitations

2 Application: smart public transportIdentifying error conditions in GPS data for vehiclesOn-line and off-line processing

3 Spatial logic and spatial model-checkingClosureSpatial untilReachability

4 Spatial model-checking in practiceDetecting diversions and off-road positionsEvaluating street portions, proximity to stopsDetecting out-of-order observations in data

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 3/30

Page 4: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Collective adaptive systems. . . depend on accurate data

� The collective adaptive systems which we consider depend onreal-time data collection subsystems which allow them to

� reflect on their operation,� detect problems in their service, and� report these problems back to system operators or to system

users.

� These data collection systems are often built from physicalcomponents such as sensors and receivers which have limits totheir engineering, meaning that they can, and do, sometimesdeliver inaccurate measurement data.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 4/30

Page 5: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Collective adaptive systems. . . must deal with physical limitations

� GPS-based location, spatial presence and situation play anincreasing role in systems but satellite-based triangulationrequires very precise measurement of extremely fast signals.

� Environmental factors impact on the accuracy of thistriangulation.

� Signal bounce off tall buildings can interrupt the GPS signal.Heavy cloud cover, humidity andatmospheric pressure have animpact on measurements.

� Errors in GPS readings are to beexpected.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 5/30

Page 6: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Collective adaptive systems. . . must deal with inaccurate data

� Physical components can only deliver accurate information up totheir physical limits and size and weight considerations oftenseverely curtail the amount of processing which can be done onan embedded device.

� These practicalities mean that the responsibility for dealing witherroneous data lies with the system itself, and that it must makeefforts to automate the process of data checking and cleaningbefore acting in response to data received.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 6/30

Page 7: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Outline

1 Collective adaptive systems and data correctnessGPS measurements and physical limitations

2 Application: smart public transportIdentifying error conditions in GPS data for vehiclesOn-line and off-line processing

3 Spatial logic and spatial model-checkingClosureSpatial untilReachability

4 Spatial model-checking in practiceDetecting diversions and off-road positionsEvaluating street portions, proximity to stopsDetecting out-of-order observations in data

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 7/30

Page 8: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Data correctness. . . for vehicles in a fleet of buses

� We illustrate the theory with a concrete example of detectingerrors in vehicle location data for buses in the city of Edinburgh.

� In the case of vehicle location data for a bus fleet, we have anatural sense of data correctness.

� Buses are not off-road vehicles so they should at alltimes be positioned on a road or in a smallnumber of other specific locations, suchas a garage.

� Our overall goal is to classify bus fleetvehicle location data points as beingplausible or suspect, and this closelyaligns with their being on a road(or, allowing for measurement error,at least near to a road).

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 8/30

Page 9: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

A spatial verification problem. . . identifying error conditions in GPS data for vehicles

1. The GPS data received could be classified as being suspect orcorrupt, by virtue of being too far from the expected data—thismay indicate a problem with the hardware of the measurementdevice.

2. The data could indicate a problem in that, if it is correct, thenone of the vehicles in the fleet is far from its expected positionon its planned route—this may indicate a problem with thedelivery of the service or it may be due to driver error.

3. The data seems plausible, and suggests a valid position for avehicle but this vehicle seems to have deviated from its plannedroute for reasons of operational problems such as road closuresor engineering works—this may indicate a problem with the roadnetwork.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 9/30

Page 10: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Automated classification of data. . . scaling problem detection to operate at large scale

� A human observer can apply humanintelligence to detect an erroneousGPS reading by plotting it on a mapand comparing against the positionof roads and buildings.

� However, this type of intelligent watchfulness cannot scale totracking an entire fleet of buses (around 700 in the case of thecity of Edinburgh) so we seek a scalable approach to detectingGPS errors which can be automated.

� We are using a novel spatial model-checker to implement thisscalable approach.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 10/30

Page 11: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Processing on-line or off-line. . . identifying error conditions in GPS data for vehicles

� The methods presented here could either be used for on-line oroff-line data processing.

� In on-line data processing the smart infrastructure within thecollective adaptive system would attempt to identify and classifyproblems in real-time, alerting operators to problems as theyoccur.

� In off-line data processing the infrastructure would attempt toidentify and classify problems with the benefit of hindsight,providing plausible retrospective explanations for events so thatthe service operators can review their service and provide reportsfor service regulators or other authorities, and use the insightsgained to improve the service at the next offering (for example,the following day).

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 11/30

Page 12: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Outline

1 Collective adaptive systems and data correctnessGPS measurements and physical limitations

2 Application: smart public transportIdentifying error conditions in GPS data for vehiclesOn-line and off-line processing

3 Spatial logic and spatial model-checkingClosureSpatial untilReachability

4 Spatial model-checking in practiceDetecting diversions and off-road positionsEvaluating street portions, proximity to stopsDetecting out-of-order observations in data

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 12/30

Page 13: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Spatial logicOperators of the logic: closure

� The spatial logic consists of a very small number of basicoperators that, in turn, are used to define a number of usefulderived operators.

� The closure operator ♦ has its origin in topological spatiallogics. The formula ♦φ is satisfied by a point x in space if xsatisfies φ or it is a direct neighbour of a point satisfying φ.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 13/30

Page 14: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Spatial model-checker inputComputing the closure of the blue points

B B

B B

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 14/30

Page 15: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Spatial model-checker outputComputed closure, repainted blue as green

G G

G G G G

G G G G

G G

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 15/30

Page 16: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Spatial logicOperators of the logic: spatial until

� The spatial until-operator U is a spatial version of the temporaluntil operator.

� A point x in space satisfies the formula

φ U ψ

whenever it is included in an area A consisting of pointssatisfying formula φ and there is “no way out” from A unlesspassing through points in an area B that satisfies ψ.

� The spatial until-formula is weak in the sense that φ U ψ alsoholds when all points in the space satisfy φ and none of them ψ.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 16/30

Page 17: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Spatial logicThe green nodes satisfy green until blue (G UB)

B B B

B G G G B

B G G G B

B G G G B

B B B

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 17/30

Page 18: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Spatial logicOperators of the logic: reachability

� The first derived operator is the reachability operator φ R ψ.

� It is defined in terms of the spatial until operator as follows

φ R ψ , ¬((¬ψ) U (¬φ)

)and, abstracting from some details, it identifies those pointsfrom which ψ can be reached passing only by points satisfying φ.

� The formulation of reachability uses a double negation becausethe spatial until-formula is weak.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 18/30

Page 19: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Spatial model-checker inputComputing reachability R ∧ ((R ∨ Y )R Y )

Y R R

R R R R

R Y R R R

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 19/30

Page 20: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Spatial model-checker outputComputed reachability R ∧ ((R ∨ Y )R Y ), repainted

Y O O

O R R R

O Y R R R

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 20/30

Page 21: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Outline

1 Collective adaptive systems and data correctnessGPS measurements and physical limitations

2 Application: smart public transportIdentifying error conditions in GPS data for vehiclesOn-line and off-line processing

3 Spatial logic and spatial model-checkingClosureSpatial untilReachability

4 Spatial model-checking in practiceDetecting diversions and off-road positionsEvaluating street portions, proximity to stopsDetecting out-of-order observations in data

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 21/30

Page 22: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Spatial model-checking in practiceApplying spatial model-checking to annotated maps

We use an OpenStreetMap representation forthe map from which the names of streets havebeen removed for clarity. Main streets used forbus routes are pink, side streets are white.

Diverted buses are seen as being on sidestreets which are off the main bus route.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 22/30

Page 23: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Spatial model-checking in practiceApplying spatial model-checking to annotated maps

Bus positions are represented by blue squareson the map in a range of shades of blue. Bus

stops are represented by orange squares.

Errors in GPS data show up as busobservations which are not on any road.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 23/30

Page 24: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Diversions and off-road positionsInput to the model-checker

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 24/30

Page 25: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Diversions and off-road positionsOutput from the model-checker

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 24/30

Page 26: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Diversions and off-road positionsAnnotated output from the model-checker

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 24/30

Page 27: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Spatial model-checking in practiceUsing street portions to segment roads

Occasionally it will be useful to segment roadsby the position of buses. This is done bydilating a bus position until it fills the road.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 25/30

Page 28: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Street portions, proximity to stopsInput to the model-checker

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 26/30

Page 29: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Street portions, proximity to stopsOutput from the model-checker

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 26/30

Page 30: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Street portions, proximity to stopsAnnotated output from the model-checker

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 26/30

Page 31: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Introducing temporal aspectsRepresenting subsequency in timestamps through colour

The colour of a bus darkens slightly from oneobservation to the next. In this case theobservation nearer to the bus stop has a latertimestamp than the observation which isfurther away from the bus stop.

Unexpected changes in position are significant.If a later timestamped observation shows the

bus less further along its route then thisusually indicates a data error because buses

rarely reverse along a road.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 27/30

Page 32: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Out-of-order observations in dataInput to the model-checker

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 28/30

Page 33: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Out-of-order observations in dataOutput from the model-checker

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 28/30

Page 34: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Out-of-order observations in dataAnnotated output from the model-checker

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 28/30

Page 35: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Conclusions

� The use of a spatial model checker provides us with asophisticated tool for checking complex properties over systemswhere location plays an important role, as it does in manycollective adaptive systems.

� Using this tool we have been able to detect and correct a widerange of location-related errors in vehicle location data.

Future work

Future work will focus on enhancing the logic and the model checkerwith a temporal perspective. Stochastic and probabilistic aspects arealso of great interest in collective adaptive systems, and areinherently related to time. The study of such aspects is also plannedin the near future.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 29/30

Page 36: Data verification for collective adaptive systems: spatial model-checking of vehicle location data

quan col. . ...............................www.quanticol.eu

Acknowledgements

� This work is supported by the EU project QUANTICOL: AQuantitative Approach to Management and Design of Collectiveand Adaptive Behaviours, 600708.

� The authors thank Bill Johnston of Lothian Buses and StuartLowrie of the City of Edinburgh council for providing access tothe data related to bus positions.

Thank you for your attention.

Stephen Gilmore, University of Edinburgh — FoCAS@SASO, London, 8th September 2014 — 30/30