Smart Transportation forSmart Nation
11
Smart Nation
Hock Beng LimCentre for Smart Systems
Singapore University of Technology and Design 8 Dec 2015
� Introduction� What is Smart Nation ?� Smart Transportation� Cooperative Vehicular Localization
Outline
22
� Transport Trip Quality Measurement
Introduction� Smart Cities
• Interconnection between systems, applications and people.
• Cross-system situational awareness.• Complex event detection and
identification.• Predictive ability
33
• Predictive ability
� Applications• Smart living• Smart transportation• Intelligent logistics• Green environment• Smart energy management• Smart economy and governance
� The Singapore government has announced a major initiative to be the world’s first Smart Nation.
� Smart Nation is much broader than Smart Cities.� Smart nation = smart cities + economy + national governance +
national policies.� It involves nationwide deployment of systems and applications.
Smart Nation
44
Nationwide Sensor Deployment
55
Delivering RESILIENT and TRUSTED sensor connectivity
nationwide to catalyse sensor rollouts and enable data-
driven decision making and ANTICIPATORY
SERVICES
Pervasive Connectivity
66
HETNETHETEROGENEOUS
NETWORK
HetNetSeamless Roaming between networks
SMARTNATIONP L A T F O R MNationwide
Broadband Network
High-Speed FibreWireless@SG
Wireless Broadband forPublic Access
Smart Nation PlatformExtending pervasive
connectivity for sensors, open data and co-
creation of new services
Citizen Centric Service Delivery
Focus on our citizens in service delivery
77
Empowered toparticipate and
co-create
One Public ServiceEnjoyable userexperience
Make meaningfulchoices
An Integrated Smart Nation
© 2014 IDA Singapore. RESTRICTEDAll Rights Reserved. 14
TIMELY MUNICIPAL SERVICE DELIVERY
IMPROVED INFORMATION DISSEMINATION OPTIMIZED TRANSPORT
ENHANCED RESOURCE MANAGEMENT88
Our Smart Nation Framework
Weather and Environmental
Monitoring
Water Infrastructure
MonitoringSmart
Transportation Smart Buildings Smart GridsHealthcare Monitoring
99
Middleware Design for Sensor Networks
Sensor Network Virtualization
Sensor Grids and Cloud Computing
Participatory and Urban Sensing
Mobile and Pervasive Computing
Smart e-Science Cyberinfrastructure
Data Analytics and Modeling
� Due to the rapid pace of urbanization and growing population, transportation is one of the biggest challenges faced by cities.
� A major application domain being addressed by many smart cities programs world wide is transportation.
Transportation Challenge
1010
Our research focus on two main aspects of smart transportation:� Sensing, monitoring and algorithmic techniques to improve the
situational awareness of real-time urban traffic.� Participatory sensing techniques to obtain fine-grain mobility
patterns and activity behavior from users.
Towards Smart Transportation
1111
Cooperative Vehicular Localization
1212
Cooperative Vehicular Localization
MotivationMotivation
� In the DARPA Urban Challenge (2007), Team MIT developed a vehicle to demonstrate safe and autonomous driving in an urban environment.urban environment.
� The Team MIT vehicle used a standalone approach for situational perception, ie. the situational information is derived entirely from the in-vehicle sensing suite with a large number of sensors (cameras, radars, lidars, etc).
1313
� A vehicle can also derive or improve its situational awareness with the help of other nearby vehicles as well as the roadside infrastructure, by leveraging vehicle-to-vehicle (V2V) and
MotivationMotivation
Buildings Bus Stops and Lamp posts
1414
vehicle-to-vehicle (V2V) and vehicle-to-infrastructure (V2I) communications.
� Control and coordination of vehicles in urban traffic can also be accomplished by leveraging real-time global traffic information obtained from V2V and V2I communication.
MotivationMotivation
� Motivation� Vehicular localization is important for various cooperative
vehicle safety (CVS) applications, such as forward collision warning, turning assistant, etc.
� The accuracy of existing vehicular localization technologies are inadequate to recover lane level relationship among are inadequate to recover lane level relationship among vehicles.
� There is a need to augment localization accuracy of vehicles to about lane level.
1515
BackgroundBackground
� Localization Approaches� Absolute positioning
� Global Positioning System (GPS).� Cell Tower multilateral.� Wifi fingerprint pattern recognition, etc.� Wifi fingerprint pattern recognition, etc.
� Relative positioning --- distance measurements
� Radar and Lidar.� Wireless RSSI, ToA, AoA, etc.
� Auxiliary augmentation resources
� Inertial sensors, map, video, etc.
1616
BackgroundBackground
� Cooperative Vehicular Localization� Recover or improve the accuracy of vehicle’s position
with the input of other vehicles’ measurements.� Typical assumptions
� Each vehicle has a GPS device for coarse level absolute � Each vehicle has a GPS device for coarse level absolute positioning.
� Vehicles can communicate with each other when they are within the transmission range of their V2V communication radio.
� GPS and other measurements of each vehicle are periodically broadcasted to neighbors through V2V communication.
1717
BackgroundBackground
� Our Approaches and Objectives� GPS pseudorange based inter-vehicle range detection
� Improve the accuracy of range measurements with GPS and communication devices only.
� Cooperative vehicular localization algorithm
� Improve vehicle localization accuracy through combining distance and position measurements of neighbor vehicles.
1818
� Pseudorange� A GPS receiver calculates its position by precisely timing
the signals sent by GPS satellites. It computes the distance between itself and the satellite using the transit time of each message. The computed distance is called the pseudorange
PseudorangePseudorange --based Distance Measurement based Distance Measurement
PRai pseudorange measurement between receiver a and satellite i
Rai the true distance between receiver a and satellite i
ta clock error in receiver axi common noise related to satellite i
Ɛai error due to receiver noise and multipath
the pseudorange
1919
i i i ia a a aPR R t x ε= + + +
� Principles� Errors of pseudoranges comes from
� Receiver: clock bias� Propagation: atmospheric delay� Satellite: ephemeris error, clock bias
PseudorangePseudorange --based Distance Measurement based Distance Measurement
� Satellite: ephemeris error, clock bias� Environment: multipath� Random errors
� Share the pseudorange information between two nearby vehicles.
� Eliminate those GPS errors that are common in the vicinity of each node in a vehicular network.
2020
� Single-difference of Pseudoranges� Take the difference between the pseudoranges of the
two receivers a and b to the same satellite i.
PseudorangePseudorange --based Distance Measurement based Distance Measurement
i i iab a bS PR PR= −
2121
ab a bS PR PR= −
i i i ia a a a
where
PR R t x ε= + + +
� Single-difference of Pseudoranges (Cont.)� Cancel out the common noises related to satellite i (xi),
including satellite clock bias, atmospheric delay and errors in the broadcasted ephemeris
PseudorangePseudorange --based Distance Measurement based Distance Measurement
i i iS PR PR= −
2222
( ) ( ) ( )
( ) ( )
i i iab a b
i i i ia b a b a b
i i iab a b a b
S PR PR
R R t t
R t t
ε εε ε
= −
= − + − + −
= ∆ + − + −
where is the difference between the true ranges from the satellite i to the GPS receivers a and b
iabR∆
� Calculate� The true ranges from the satellite i to the GPS receivers a
and b are much larger than the distance between a and b.
� The two vectors pointing from i to a and b are nearly parallel to each other.
PseudorangePseudorange --based Distance Measurement based Distance Measurement
iabR∆
parallel to each other.
2323
2abR∆
1abR∆
1er
2er
abrr
� Calculate (Cont.)� The difference between the true ranges from receiver a and
b to satellite i can be approximated by:
i iab abR e r∆ = ⋅r r
iabR∆
PseudorangePseudorange --based Distance Measurement based Distance Measurement
2424
2abR∆
1abR∆
1er
2er
abrr
where
is the unit vector pointing from receiver a (or b) to satellite i
is the distance vector between receiver a and b.
ier
abrr
� Double-difference of Pseudoranges� Take the difference between two single-difference of
pseudoranges
: single-difference of pseudoranges to satellite i
: single-difference of pseudoranges to satellite j
iabSjS
PseudorangePseudorange --based Distance Measurement based Distance Measurement
: single-difference of pseudoranges to satellite j
� Cancel out the clock bias between receivers a and b
2525
( ) ( ) ( ) ( )
ij i jab ab ab
i j i i j jab ab a b a b
D S S
R R ε ε ε ε
= −
= ∆ − ∆ + − − −
jabS
� Compute Receiver Distance� Given two satellites, i and j, we have derived that
abrr
( )( ) ( ) ( ) andij i j i i j jab ab ab a b a bD R R ε ε ε ε= ∆ − ∆ + − − −
i iab abR e r∆ = ⋅r r
PseudorangePseudorange --based Distance Measurement based Distance Measurement
� When there are n+1 satellites (0,1,…,n) shared by receivers a and b, the relationship can be represented in the matrix form as
where
2626
a b a br= +D H εr
( ) ( )1 1 0 0 0 0 [ ( ) ( ) ... ( ) ( ) ]n n Ta b a b a b a band ε ε ε ε ε ε ε ε= − − − − − −ε
ab abR e r∆ = ⋅
� Compute Receiver Distance (Cont.)� Assume ε to be zero mean and of equal variance, using
the linear least squares estimator, we have
abrr
PseudorangePseudorange --based Distance Measurement based Distance Measurement
where
2727
� Observation
� The aggregated non-common noises include both the multipath and random code acquisition errors.
� When the multipath effect is not severe, is dominated by the code acquisition errors, which can be directly
WLSWLS--DD AlgorithmDD Algorithm
ε
εby the code acquisition errors, which can be directly linked to the Carrier to Noise Ratio (CNR).
� We propose a CNR based Weighted Least Squares Double Difference (WLS-DD) algorithm.
2828
� Weight Matrix
� With non-equal variances of each , the weighted least squares estimator can be used as the Best Linear Unbiased Estimator (BLUE).
WLSWLS--DD AlgorithmDD Algorithm
iε
where W is the inverse of the covariance matrix of
where is the standard deviation of
� However, cannot be measured.
2929
iσ iε
ε
iσ
� Weight Matrix (Cont.)� Assume the variance of is reversely proportional to
the measured value of Carrier to Noise Ratio (in dBHz):
WLSWLS--DD AlgorithmDD Algorithm
2( )iσ iaε
iaφ
2 2 2 2 2( ) ( ) ( ) 1/ ( ) 1/ ( )i i i i ia b a bσ σ σ φ φ= + ∝ +
� The final form of the weight matrix W is represented by:
3030
( ) ( ) ( ) 1/ ( ) 1/ ( )a b a bσ σ σ φ φ= + ∝ +
1 2 1 2 2 2
1 2 1 2 2 2
( ) ( ) ( ) ( ),...,
( ) ( ) ( ) ( )
n na b a b
n na b a b
diagφ φ φ φφ φ φ φ
⋅ ⋅= + + W
� Accuracy Enhancement � Select the satellite with the best CNRs to both of the two
receivers as the reference satellite for double differences.
� Set a threshold value CNRref in the selection of the
WLSWLS--DD AlgorithmDD Algorithm
refreference satellite (satellite 0), namely, the reference satellite has to have a CNR ≥ CNRref
� Set another threshold value CNRmin (normally, CNRmin < CNRref) to determine which satellites are used in double difference computations (satellite 1 to n).
3131
� DSRC Assisted Measurements� Dedicated Short Range Communications (DSRC) are
short-to-medium range wireless communication protocols for vehicular communication.
� The periodical pseudorange measurements can be
WLSWLS--DD AlgorithmDD Algorithm
The periodical pseudorange measurements can be piggybacked into the DSRC heartbeat messages.
3232
� DSRC Assisted Measurements (Cont.)� After each round of measurement, a vehicle selects the
pseudorange measurements that have better CNRs than CNRmin.
� If less than four measurements are selected, no
WLSWLS--DD AlgorithmDD Algorithm
If less than four measurements are selected, no information will be piggybacked in this round.
� Otherwise, the GPS time tag, all the candidate pseudorange measurements, and their CNRs are added to the end of the heartbeat messages and broadcasted to the neighbors.
3333
� Format of the Piggyback Message
WLSWLS--DD AlgorithmDD Algorithm
3434
� The 4-byte Satellite Bitmap field is made up of 32 ON/OFF flags, indicating the presence of the pseudorange measurements of the corresponding satellites in the message.
� Each measured pseudorange is represented by a 8-byte double-precision floating point data.
� For example, if there are four candidate satellites, the attached message is 44 bytes long.
� Settings� Two GPS receivers are placed apart at a fixed distance
from each other.� The GPS receivers use the SiRF Star IV GPS chips
conforming to a proprietary binary protocol.
� The SiRF proprietary binary protocol is used to extract
Field ExperimentField Experiment
� The SiRF proprietary binary protocol is used to extract the raw pseudorange measurements, satellite positions, estimated GPS times, as well as the calculated GPS fixes.
� Pairs of independent measurements with the same estimated GPS time are taken from the two modules for subsequent processing.
� CNRmin = 30dBHz, and CNRref = 41dBHz.
3535
Field ExperimentsField Experiments
� Experimental Results� The errors of GPS fix may go wrong as far as tens of meters.� The WLS-DD provides a decent average noise of less than 1
meter.
3636
Distributed Location Estimate AlgorithmDistributed Location Estimate Algorithm
� Overall Objective
� Improve the positioning accuracy via cooperative inter-vehicle distance measurement.
3737
Distributed Location Estimate AlgorithmDistributed Location Estimate Algorithm
� Problem Description
� Given a set of vehicles with measured GPS fixes:
� Given the computed distance between any two neighboring vehicles and
1 2{ , , ..., }VV v v v=
1 2{ ..., }|V |, ,=v v v v% % % %
ijd%
ivjvneighboring vehicles and
� To derive a set of estimated locations , so that the estimated locations can approximate to the true locations
� The objective is to minimize the value of , where is the true location of
ivjv
1 2 | |ˆ ˆ ˆ ˆ{ , ,..., }V=v v v v
| |
1
ˆV
i ii =
−∑ v v
iv iv
3838
Distributed Location Estimate AlgorithmDistributed Location Estimate Algorithm
� Features� Compute the inter-vehicle distance based on raw GPS
pseudorange measurements� Traditional radio-based ranging techniques, such as RSS,
ToA, AoA, etc., suffer from either high hardware cost or inadequate accuracy performance.inadequate accuracy performance.
� Estimates the vehicle location solely based on the inaccurate GPS measurements
� Without the assumption of any anchors with known exact locations.
� Decentralized algorithm� In catering for the highly dynamic vehicular environment.
3939
Distributed Location Estimate AlgorithmDistributed Location Estimate Algorithm
� Approach� Tentative location estimate
� Each vehicle performs local location estimate based on the GPS fixes received from its neighbors and the corresponding computed distances to its neighbors.
Constrained non-linear optimization� Constrained non-linear optimization
� Transform the tentative location estimate into a constrained non-linear programming problem. In this way, each vehicle will get a set of tentative estimated locations.
� Final location estimate
� The final estimated location of each vehicle is derived from a weighted average of its tentative estimated locations.
4040
Distributed Location Estimate AlgorithmDistributed Location Estimate Algorithm
� Tentative Location Estimate � Each vehicle computes a set of tentative locations in a
subset
� The subset consists of and its neighbors:
� The set of tentative locations is denoted by
kvkV
{ }kk kV N v= +kv
ˆ ˆ{ | }k k ki iv V= ∈V vThe set of tentative locations is denoted by
� Each vehicle in the subset will get a tentative estimate location
� Each vehicle computes the based on the GPS measurements of its neighbors and the computed distance to its neighbors (by WLS-DD).
� Transform the computation into a constrained non-linear optimization problem.
ˆ{ | }i iv V= ∈V v
ivˆ k
iv
kv ˆ kV
4141
Distributed Location Estimate AlgorithmDistributed Location Estimate Algorithm
� Constrained Non-linear Optimization� The error of the measured GPS fixes is caused by many
independent sources, such as satellite clock bias, atmospheric delay, the acquisition noise , multipath, etc.
� Therefore, the error is commonly assumed to follow δTherefore, the error is commonly assumed to follow the Gaussian distribution
where is the true location and is the GPS fix
� Denote the probability density function as , the value of is most likely distributed around the point where the highest is achieved.
2( , ) a n d i iN = −δ µ σ δ v v%
( )φ δiv iv%
i i−v v%( )φ δ
4242
Distributed Location Estimate AlgorithmDistributed Location Estimate Algorithm
� Constrained Non-linear Optimization (Cont.)� In order to maximize the possibility that the tentative
estimated location ( ) is close to the true location ( ), it is expected to maximize:
� The tentative estimated locations should also satisfy the
ˆ kiv iv
ˆ( )ki iφ −v v%
The tentative estimated locations should also satisfy the distance constraint between any two neighboring vehicles: for any
� In practice, if the road constraints (e.g. boundary coordinates) is applicable, should also satisfy:
ˆ ˆk kj k jkd− =v v %
j kv N∈
ˆ ki ∈v S
Sˆ k
iv
4343
Distributed Location Estimate AlgorithmDistributed Location Estimate Algorithm
� Constrained Non-linear Optimization (Cont.)� The set of tentative estimated locations computed by
the pivot can be derived from
Subject to that
ˆ kV
kv
ˆˆ ˆ max ( )
kk
i
k ki i
v V
arg φ∈
= −∑V
V v v%
Subject to that
is the subset with the pivot vehicle ;is the tentative estimated location of in ;is the measured GPS location vector of ;is the calculated distance between and ;is the set of vehicles which are the neighbors of .is the road space constraint
ˆ ˆ for andk kj k jk j kd v N− = ∀ ∈v v %
kV kvˆ k
iv iv kV
iv%iv
jkd%jv
kvkN
kv
ˆ for wherek ki iv V∈ ∀ ∈v S
S
4444
Distributed Location Estimate AlgorithmDistributed Location Estimate Algorithm
� Final Location Estimate� The final estimated location is computed by a weighted
average of all the tentative estimated locations
� Define the weight of a pivot vehicle as the number of vehicles in the subset:
ˆ kvˆ s
kv
kv kVk
kw V=vehicles in the subset
� Define the weight of a tentative estimated location as the weight of the pivot over the sum of the weight of each vehicle in the subset, which is calculated by
� The final estimated location for vehicle is computed by:
kw V=
ki
s
iv V
w
w∈∑
ˆ ˆk
sk
i
ssk k
v V iv V
w
w∈∈
= ⋅∑∑
v v
kv
4545
Distributed Location Estimate AlgorithmDistributed Location Estimate Algorithm
� Processing Flow� Compute the distance between any two neighboring
vehicles based on WLS-DD.
� Each vehicle broadcast its measured GPS fix to its neighbors
iviv%
ivneighbors
� Each vehicle acts as a pivot and computes a set of tentative estimated locations
� Each vehicle broadcast the computed to its neighbors.
� Each vehicle computes its final estimated location.
i
ˆ iV
iv
ˆ iV
iv
ˆ iv
4646
Performance EvaluationPerformance Evaluation
� Simulation Model� Implement the algorithm DLEA
� Control flow: C programming.
� Optimization: MATLAB.
� Primary settings� Primary settings
� 500m x 9m road space.
� True positions of vehicles spatially form a Poisson process with mean arrival rate 50 vehicle/min, and mean velocity 50km/h.
� The error of GPS fixes and distance computation errors follow the Gaussian distribution.
� 150m communication range (well supported by the DSRC).
4747
Performance EvaluationPerformance Evaluation
� Simulation Results (Cont.)
� GPS deviation = 5m
� Average error of � Average error of GPS Fix is 6.27m
� Average error of DLEA is 2.55m
4848
Transport Trip Quality Measurement
4949
Transport Trip Quality Measurement
Transport Trip Quality
5050
� Transport Trip Quality• Develop a mobile data participatory platform for trip quality measurement.• Funded by the IDA under the Jurong Lake District (JLD) programme.
� Objectives:• This application measures the quality of bus, taxi and MRT trips based on
various metrics such as bumpiness of ride, wait/travel time, distance, etc.
System Architecture
Data Source
Analysis Result Display
Spring+Hibernate+Hadoop
5151
Prototype Client App Design
GUI based on Google Map API v2
Sensors data records
(GPS, Accel, wifi,
Data Record Manager•Location data captured by both GPS and network provider•Location data sampling interval of 1s(GPS, Accel, wifi,
cell tower)•Location data sampling interval of 1s•Location accuracy assured by an estimation algorithm•Keep data recording even though the App is invisible and closed•Trip quality index calculation
Trip based GPS and Accel data combination
HTTP MultEntity Data Upload
5252
Smartphone Sensors
� Sensors enables systemsmartness
� Smart traffic� Smart shopping� Smart city� …� …
5353
Smartphone Sensors
� In the trip quality measurement app, the following sensors are used:
• Accelerometer to detect the vibration (captured)• GPS to obtain the location (captured)
Wi-Fi and cell tower (only used to assist locating)• Wi-Fi and cell tower (only used to assist locating)
The accelerometer data and GPS data are mainly what we need to assess the quality of a trip.
5454
Smartphone Sensors
3-axis accelerometer data :
• Acceleration in x axis• Acceleration in y axis• Acceleration in z axis• Acceleration in z axis• Timestamp (when the data is captured)
For practical usage, the three axis accelerometer data will be converted to a world coordinates i.e. x: points to East; y: points to North Pole; z points towards the sky.
Note 1: Acceleration, in physics, is the rate of change of velocity of an object.Note 2: A lot of accelerometer data will be captured during a trip.
5555
Smartphone Sensors
GPS data :• Altitude• Longitude• Latitude• Latitude• Velocity• Timestamp (record the time when capture the data)
Note 1: One trip on the map consists of a series of GPS data linked together.Note 2: GPS also provides the instantaneous moving velocity for each sampling point.
5656
Filtering Users ’ Random Shaking
� Signal based validationThe path can be searched by time and locationHowever, people may not on the same vehicle even though the paths satisfy the three cases in that time duration.We should define some “distance” to indicate the signals’ similarity
Same trip from two android phones Same trip from iPhone and android phone
5757
Filtering Users ’ Random Shaking
� Event detection algorithm correction
1. Locating the random behavior of user
2. Scan locally to validate it is 2. Scan locally to validate it is user’s behavior or not
3. Filter out the statistics and recalculate the bump/jam events
5858
Prototype Backend Design
HTTP MultEntity HTTP/JSP/Jquery/Google Map & Chart
Sensor Data Storage•Trip based combined GPS and
• JSON data parse• Response with GPS •Trip based combined GPS and
Accel data•Separate recorded other sensor data
• Response with GPS and Accel data accordingly
File System
5959
Backend Software Architecture
6060
Backend Development
� Platform access logics and portal:• For user: obtain the trip analytics results and trip data
retrieval.• For agency: process and obtain the global information about
the traffic based on the participatory data.� Service Modules:� Service Modules:
• Data Management Service: Data upload/Storage/Summary modules
• Data Retrieval Service: ID Manager/File locator/Filter• Data Provisioning Service• Data Analytics Service
6161
Cloud Based Global Info Statistics
� Data re-formatting for HDFS storage
Json file should be converted to a text format which is easier to be processed.easier to be processed.
6262
Cloud Based Global Info Statistics
� Hadoop Hive engine/MapReduce algorithm design
Hive provides SQL like easy way for data processing, SQL is actually translated to MapReduce tasks. For some specific processing, we should write our own MapReduce to process data.
6363
Cloud Based Global Info Statistics
� Use Sqoop to achieve cloud based and web based application integration.
Platform logicsWeb container
Data processingData analytics
Global informationData persistenceReport retrieve…
Global informationReport generation
…
6464
Data Analytics
� Raw data is rich, so we need to analyze the data to understand them
� Benefits of analyzing trip data� To assess the trip� Know the road quality
6565
� Know the road quality� Detect trip event� Forecast the traffic� Improve the traffic� …..
Data Analytics
� Core Data Analytics Algorithms• TQI calculation and statistics (e.g. mean, standard error).• Bumping and jamming detection algorithm.• Distinguish bumping and jamming.• Moving time percentage calculation.• Data aggregation per day.• Data aggregation per day.• Data summary versus time for different areas.
6666
' cos 0 sin 1 0 0 cos sin 0 0
' 0 1 0 0 cos sin sin cos 0 0
sin 0 cos 0 sin cos 0 0 1'
x
y
z
g
g
gg
ω ω θ θφ φ θ θ
ω ω φ φ
− = − −
' cos 0 sin 1 0 0 0xg ω ω
1 'tan
'x
z
g
gφ −=
1
2 2
'tan
' '
y
x z
g
g gω − −
=+
Step 1: calculate the rotation angle between device status and inertial coordinate
Trip Quality Index Calculation
' cos 0 sin 1 0 0 0
' 0 1 0 0 cos sin 0
sin 0 cos 0 sin cos'
x
y
z
g
g
gg
ω ωφ φ
ω ω φ φ
= − −
' cos sin sin cos sin 0
' 0 cos sin 0
sin sin cos cos cos'
x
y
z
g
g
gg
ω φ ω φ ωφ φ
ω φ ω φ ω
= − −
' cos sin
' sin
cos cos'
x
y
z
g g
g g
gg
φ ωφ
φ ω
= −
6767
Step 2: calculate acceleration vector component in inertial coordinate
Note: 1.The value of θ is not determined by the sensed value of acceleration (g’), but of magnetic field. However, the value of θ has no effect on trip quality index, so it is not necessary to obtain the value of magnetic field.
2.The sign of the accelerometer components are not important which will be squared while
Trip Quality Index Calculation
2.The sign of the accelerometer components are not important which will be squared while calculating the trip quality index.
1 1cos 0 sin 1 0 0 '
0 1 0 0 cos sin '
sin 0 cos 0 sin cos '
x x
y y
zz
Accel Accel
Accel Accel
AccelAccel
ω ωφ φ
ω ω φ φ
− − = − −
cos sin sin cos sin '
0 cos sin '
sin sin cos cos cos '
x x
y y
zz
Accel Accel
Accel Accel
AccelAccel
ω φ ω φ ωφ φ
ω φ ω φ ω
− = −
6868
Step 3: calculate acceleration and trip quality index
ISO 2631 standard[1]:2 2 2(1.4a ) (1.4a )x y z
t t t ta a= + +
a
Trip Quality Index Calculation
axt
is x-axis acceleration
ayt
is y-axis acceleration
azt
is z-axis acceleration
ta can be viewed as a fused
[1] ISO. ISO 2631-1-1997: Mechanical vibration and shock Evaluation of human exposure to whole-body vibration. International Organization for Standardization, Geneva, Switzerland, 1997.
*Cheng-Yu Lin, Ling-Jyh Chen, Ying-Yu Chen, and Wang-Chien Lee, “Comfort Measuring System for Public Transportation Systems Using Participatory Phone Sensing”
Expressed in log(dB):5 220log , 10 / sect
t refref
aL a m
a−= =
100, 103
5 ( 83)
0, 83
t
index t
t
L
Q L
L
>= ⋅ − <
Trip Quality calculation:
Note : Comfort index is value between [0,100]; A larger comfort index indicates a worse comfort experience (or say, a larger acceleration value detected by the sensor)
ta can be viewed as a fusedacceleration which isderived from the originalthree axis accelerationwith weighting.
tL is in dB scale by introducing a reference factor
ta
6969
Distinguish Bumping and Jamming
� Bumping will result in vertical acceleration.� Jamming will result in horizontal acceleration.� Bumping indicates the road situation.� Jamming may be caused by diver behavior or road situation.� We define an event ratio to distinguish the bumping and
jamming events.
2 2
2 2 2
( ) /
| | | |
| | ( ) ( )
| | ( ) ( ) ( )
event v h total
zv t
x yh t t
x y ztotal t t t
R Vector Vector Vector
Vector a
Vector a a
Vector a a a
= −
=
= +
= + +
eventR has value between [-1, 1], the sign can distinguish the bumping and jamming events, the value gives the information of how pure of the event is bumping or jamming
jamming events.
7070
Distinguish Bumping and Jamming
� Using peak searching algorithm• Define a peak function• Define a window size• Filter the results
Algorithm Complexity: O(n)
• Filter the results� Peak function is based on
information entropy .� Large value of entropy
means an event occurred.
7171
Moving Time Calculation
� Define a stop time left and right boundary based on the location speed data
� One time scan to calculate the
Algorithm Complexity: O(n)
� One time scan to calculate the total stop time
� Calculate the moving time and percentage
7272
Overall TQI for Whole Trip
Using our algorithm, we compute a list of statistical metrics:� Expected Value of instant TQI for whole trip, Ev� Standard Deviation of instant TQI, Sd� Events (normalized bump/jam) per minute, events� Percentage Time in moving, moving� User Ratings, ratings� User Ratings, ratings
By weighting the list of metrics and mapping them to [0,100] for the whole trip, we compute the Overall TQI :
0.3 0.1 0.3 0.1 0.2Ev Sd events moving ratings+ + + +
7373
Global Info Summary
� Data aggregation per day• Aggregate the data from all the users each day to analyze
and visualize the global traffic information.• Generate heat map to visualize a list of trip metrics including
TQI, bumping/jamming, speed.� Data summary versus time for different areas� Data summary versus time for different areas
• Analyze the area based trip behavior along the time axis.• For each area, a list of metrics including TQI,
bumping/jamming event, user number, trip number, data sampling number are summarized.
• Geo location algorithms etc. such as to calculate longitude/latitude in which area are applied to do the statistical summary.
7474
Project WebsiteThe project website is :http://sensorgrid.ntu.edu.sg/tripq/
7575
Using the Project Website
7676
Web GUI for User
7777
Web GUI for Agency
7878
Data Collection and Testing
� Internal testing:• Start from Nov 2014. Mainly conduct data collection in NTU
campus and surrounding area.� Collaborate with Cedar Girls’ Secondary School for platform
functional testing:• Testing activity started from early March until now.
7979
• Testing activity started from early March until now.• More than 100 users use the App/platform.• More than 700 trips data uploaded (over 500 trips with
enough correctly recorded data).• After launching the activities, every day we have about 10
new trips and over 1000 data samples per day.• The global information is summarized from Nov until now.
Performance Evaluation
� TQI calculation is based on ISO 2631 standard by processing the accelerometer data in three axis.
� For bumping/jamming detection algorithm, we check all the trips during 1 Mar-15 Apr 2015 with user feedback and obtain consistent results.
� The accuracy rate (for each trip, if all the bump/jam points
8080
� The accuracy rate (for each trip, if all the bump/jam points feedback are covered by the algorithm, then it counts a successful calculation) is over 86%(31/36).
� Accuracy rate for reported event detection is over 93%(169/180).
� It should be noted that our users may not always correctly give feedback, and there is no doubt that sensor data are more sensitive than peoples’ subjective feedback.
Performance Evaluation
� After processing by our algorithm, the participatory data from users’ smartphone provide consistent results with basic intuition and facts:• The trip TQI on highway is better than on small streets.• Jamming normally happen near road turning/branch,
pedestrian crossing, or traffic lights.
8181
pedestrian crossing, or traffic lights.• Traffic speed is lower near traffic lights and turning areas.• The statistics about the contributed trip data and users
distribution for each area are also consistent with fact.
Performance Evaluation
We calculate the distribution of all the trips’ TQI� The TQI of most trips is below 50.� Only small number of trips at both ends of the profile.� Two peaks at [7-14] and [21-28].� More than half the trips have TQI in the range [17-31].
8282
Thank You!
8383
Thank You!