The aim of this project is to, Analyze and capture driving behaviors that are hazardous, Develop a predictive model for predicting Unsafe Trips and Improve the overall Safety of the ride-hailing services
2. Project
Overview
The Industry
• Ride-hailing Taxi Service Market to Garner $126.52 Billion by
2025 at 16.5% CAGR.
• Primary reason for such a growth rate being rising trend of on-
demand transportation services, high-end employment
opportunities and lower rate of car ownership among
millennials
The Challenge
• Even since the emergence of these Ride hailing companies,
there has been an increase in 3 to 5 % of accidents.
• Many Research concludes that fleet or company drivers have an
increased crash risk relative to that of privately registered
vehicle drivers.
The Objective
• Analyze and capture driving behaviors that are hazardous
• Develop a predictive model for predicting Unsafe Trips
• Improve the over all Safety of the ride hailing services
3. IOT & Analytics – a
Powerful Combination
• Internet of Things (IOT) –
• By 2025, there will be 116 million IOT enabled cars in the
U.S. And each connected car will upload 25 GB of data per
hour (~ 219 TB / Yr.)
• IOT – a costly piece of technology, is it?
• Well, no it isn’t anymore
• All average smartphones today are equipped with basic
embedded low-cost telemetry sensors such as
accelerometers, gyroscopes, GPS etc.
• Role of IOT Analytics
• Large sets of driving data from GPS and telemetry sensors
allows for exciting new research possibilities using advance
Analytics and Machine Learning techniques
• Insights from IOT Analytics help address key concerns
facing industries
4. IOT Sensors – Accelerometer
& Gyroscope
• What is an Accelerometer?
• Accelerometer sensor reports the acceleration of the device along the 3 sensor
axes (X, Y, Z)
• The measured acceleration includes both the physical acceleration (change of
velocity) and the gravity
• All values are in SI units (m/s^2)
• What is a Gyroscope?
• A gyroscope sensor reports the rate of rotation of the device around the 3 sensor
axes (X, Y, Z)
• Rotations can be of 3 different types
• Pitch – Pitch is for Y axis rotational rate in (rad/s)
• Roll – Roll is for X axis rotational rate in (rad/s)
• Yaw – Yaw is for Z axis rotational rate in (rad/s)
6. Exploratory Data
Analysis
Acceleration X, Acceleration Z,
Gyro Y show a significant
difference when the trip is
classified as Unsafe. These are
initial pointers that these features
may play significant role in
determining the trip type
7. EDA (Contd.)
• Speed
• Lower speed bins have higher
percentage of unsafe rides.
Reasons could be
• Driving below speed limits
• Talking or Texting while driving
• Duration
• Longer durations Trips have
higher percentage of unsafe rides.
Reason could be
• Drowsy driving due to longer driving
hours
• Customers tendency to rate longer
drivers as uncomfortable
• Clearly both Speed and Trip
Duration have a significant role
in classifying a Trip Quality
8. Telemetry Data Processing Methods
• Removing Noise component from Raw Accelerometer and Gyroscope Data using Low Pass Filter
alpha = 0.8
Filter BEGIN
Low_X = alpha × Prev_Low_X + (1 − alpha) × Curr_X
Low_Y = alpha × Prev_Low_Y + (1 − alpha) × Curr_Y
Low_Z = alpha × Prev_Low_Z + (1 − alpha) × Curr_Z
Filter END
• Removing Gravity component from the Accelerometer data
𝑎ℎ𝑜𝑟 = 𝐴𝑐𝑐𝑓𝑖𝑙𝑡𝑒𝑟𝑒𝑑 − 𝐴𝑐𝑐𝑔
Where 𝐴𝑐𝑐𝑔 is the average of acceleration over a window size of 100 seconds
• Calculate Magnitude or Total Acceleration / Total Angular Velocity
𝑎𝑐𝑐𝑅 = 𝑎𝑥2 + 𝑎𝑦2
+ 𝑎𝑧2
𝑎𝑐𝑐𝐻 = 𝑎𝑥ℎ𝑜𝑟
2
+ 𝑎𝑦ℎ𝑜𝑟
2
+ 𝑎𝑧ℎ𝑜𝑟
2
𝑣𝑒𝑙𝑅 = 𝑣𝑥2 + 𝑣𝑦2
+ 𝑣𝑧2
𝑣𝑒𝑙𝐹 = 𝑣𝑥𝑓𝑖𝑙𝑡𝑒𝑟𝑒𝑑
2
+ 𝑣𝑦𝑓𝑖𝑙𝑡𝑒𝑟𝑒𝑑
2
+ 𝑣𝑧𝑓𝑖𝑙𝑡𝑒𝑟𝑒𝑑
2
Where,
ax, ay, az are raw accelerations along x, y, z axis respectively
𝑎𝑥ℎ𝑜𝑟 , 𝑎𝑦ℎ𝑜𝑟 , 𝑎𝑧ℎ𝑜𝑟 are filtered accelerations with gravity treatment done
vx, vy, vz are raw angular velocity along x, y, z axis respectively
𝑣𝑥𝑓𝑖𝑙𝑡𝑒𝑟𝑒𝑑 , 𝑣𝑦𝑓𝑖𝑙𝑡𝑒𝑟𝑒𝑑 . 𝑣𝑧𝑓𝑖𝑙𝑡𝑒𝑟𝑒𝑑 are filtered angular velocity
Data Processing (2)
Noise
Treatment
• (2A) Treating Raw data through LPF
Gravity
Treatment
• (2B) Remove Gravity from
Accelerometer Raw data
Calculate
Magnitude
• (2C) Calculate Magnitude of
Acceleration and of Angular Velocity
10. Significant Driving Events and
Patterns
• STEP 1 – Aggressive Turn Events
• Turn events is based on filtered gyroscope energy (𝑣𝑒𝑙𝐹)
• velF >= 0.025
• STEP 2 – Aggressive Acceleration / Breaking Events
• Acceleration (braking/accelerating) events identification,
from vehicle acceleration component information (accH)
• accH >= 0.002
• STEP 3 – Zig-Zag Events
• Zig-zag events are identified as two or more change lanes
from the significant measurements of the accelerometer
(accH) with very less angular Velocity (velR)
• velF <= 0.0025 & accH >= 0.0013
• STEP 4 – Normal Events
• Any instance that are not classified as one of the above 3 are
classified as normal events
Thresholds For Event Identification
Thresholds are identified using a combination of mean, Outliers and trial
and error method
12. Conclusion &
Recommendations
Predicted Unsafe Rides
• Alerted on real time basis to respective drivers giving them
opportunity to correct it
• Alert the drivers on driving behaviors that are Unsafe
Performance Evaluation
• Drivers can be evaluated based on their driving behaviors thus
encouraging better driving practices among drivers
Organizing Mandatory Trainings
• With specific importance on Feature’s relative importance from
Models
• Going slower that designated speed limits seems to have caused
more Trips unsafe
• Higher Trip Duration tend to be more unsafe. Encourage drivers
to take short / traffic less routes
• Advised to avoid Zig-Zag movements as they cause more trips
unsafe