WayMore - Driver Scoring

In the last half decade, we have seen an increased interest in quantifying the way drivers behave on the road. These statistics include when and where a maneuver is executed, how aggressively was the maneuver executed, how attentive is the driver while he is on the road, is the driver?s vehicle a sa

2025-06-28 16:36:44 - Adil Khan

Project Title

WayMore - Driver Scoring

Project Area of Specialization Electrical/Electronic EngineeringProject Summary

In the last half decade, we have seen an increased interest in quantifying the way drivers behave on the road. These statistics include when and where a maneuver is executed, how aggressively was the maneuver executed, how attentive is the driver while he is on the road, is the driver’s vehicle a safe stopping distance from other vehicles, amongst others. A maneuver in this context is defined as a driving event, namely lane changes, turns, braking, acceleration, etc. In order to capture this data, a number of hardware devices can be used, which include generic cameras, dash-cams, inertial sensors, and OBD-II compatible dongles. Each device allows a different dataset, which allows for a different perspective on a driver’s overall ability to drive on the road. This gathered data is coupled with one of the many published methodologies to calculate a driver score, and also provide detailed metrics such as fuel consumption, performance under various conditions, etc.

This project is focused on inertial and position sensors. Inertial sensors include accelerometers, gyroscopes, and magnetometers. Position sensors in this case are of course, GPS units. The aim of this project is to be able to gather inertial and positional data points along time, and use this data for two things: classifying maneuvers (as mentioned above), and plotting a more accurate trajectory in a moving vehicle than available by standalone GPS (as in Google Maps). The final deliverable here would be one microcontroller-based, standalone module which is able to interface with sensors, and calculate the trajectory as well as detect maneuvers. This processed data is then used to calculate a driver score, along with any parameters the team feels are necessary, and will then push the final output to the cloud (or a computer) which will display it on an accompanying web app.

Project Objectives

We can break down the objectives of this project into two streams: immediate objectives and dependent objectives. Immediate objectives are those for which this project is being built and deployed immediately, namely driver scoring. The dependent objectives are the long term outcomes we hope to see should this project gain traction and mainstream attention.

The objective, as stated, is driver scoring as a means to reduce the incidence of poor driving. The primary statistic that fuels this objective is 3450 deaths on the road per day, most of which occur in LMICs. It is our belief that a thoughtful, user-centered approach to maneuver tracking and therefore driver scoring can lead to a drastic improvement in accident and economic loss statistics.

The long term goal of tracking maneuvers and pin-pointing them accurately on a map at the lane level unlocks a wealth of data which is key in city planning. One of the gargantuan tasks that cities like Karachi have to solve is strategic planning for expansion. To rebuild the road network to be safer and more accommodating for traffic conditions, policy makers require key insights into where the road networks fail, which will allow them to plan and model the future better.

Lastly, the team is focused on building an excellent value proposition model and merge it with the prototype that is being developed so that after graduation, the project goes into an incubation phase and the product is developed for a market and the benefits of the product are realized.

Project Implementation Method

The implementation is broken down by grouping tasks together which can be developed independently. Our four major tasks are

  1. Motion tracking
  2. Maneuver classification
  3. Driver scoring
  4. Front end

The motion tracking segment is implemented using an IMU and a GPS which communicate using I2C with a Raspberry Pi, which are fused together to output a trajectory and an orientation. The bulk of the processing happens on board the Raspberry Pi, which involves an AHRS algorithm for orientation calculations and a Kalman filter to fuse the IMU with the GPS for trajectory calculations.

The maneuver classification segment takes the IMU data, resamples it to increase accuracy (the sensors work at a fairly high frequency), and creates time windows. Features are then extracted from the time windows which are used to construct a feature vector. The feature vector undergoes PCA, which is then passed to a trained classifier which determines which maneuver was executed in that particular time window.

Driver scoring is performed using a ground truth data set, where individual maneuvers were scored by real passengers. This allows for a user centered approach to driver scoring, which increases the real world user satisfaction of someone using the product. An example would be if this product was streamlined for fleets like Careem's or Uber's. The passenger's perspective would be catered to while scoring the driver, which eliminates any bias that could carry over from the development.

The last objective is vital in its own right: driver scoring is tricky to get right, because of the nature of customers it caters to. These solutions are sold to insurance companies and fleet managers, who use it to streamline business operations. The prime motivator for the team working on this project is to go beyond fleet management, and bring about positive behavioral changes of drivers on the road, leading to safer driving conditions. This is deemed necessary since the road regulations in Pakistan are fairly relaxed, i.e. motorbikes with multiple people on them, rickshaws with more than 5 people etc. which are necessary due to economic conditions. As such, a safer road network needs to be designed from the perspective of real world users, and real world circumstances. A thoughtfully designed application can deliver these benefits and help people drive their cars in a safer, more empathetic manner.

Benefits of the Project

The benefits of this project are derived from key components of what is being engineered: the driver scoring mechanism and the motion tracking mechanism.

The driver scoring mechanism:

(i) unlocks the benefits and utility of being able to track vehicles, which is extremely necessary for fleets. 

(ii) allows fleet operators to see how their vehicles are being used in terms of active time per day, maneuvers, speed, fuel consumption, etc.

(iii) allows individuals to view their driving pattern, and make long term changes for sustainable, cost effective, and safer driving.

(iv) allows companies like Uber and Careem to select drivers based on their driving behavior as well, and give them additional data points to assess their performance.

The motion tracking mechanism in this project is highly detailed, much more than just  GPS approach would be able to do. The benefits of this information are:

(i) pinpointing exactly where on the road poor maneuvers take place, which means showing drivers exactly where their weaknesses are while driving

(ii) this information is also highly valuable to policy makers and city planners, telling them where most cars feel the need to brake hard for example, or which intersection has frequent accidents etc. This is necessary information in order to have a sustainable road network that cities like Karachi will have no choice but to develop in the next few decades for the city to function.

One of the biggest insights we were able to gather was, all the biggest companies doing driver scoring in and out of Pakistan were relying on OBD-II ports. But the traffic in Pakistan comprises heavily of old cars which do not have these ports. We have also been in contact with investors who need a fleet management + driver scoring mechanism for older trucks that travel between states. This is where our product comes in. It has no external dependencies, it relies only on a power source, and nothing else. Even the application is optional. Furthermore, OBD-II ports do not have a standard of communication, which makes OBD-II port based fleet management an unviable option for modern fleets as well. (Each model of a car needs its own device).

Technical Details of Final Deliverable

As mentioned above, our final deliverables are twofold:

1) microcontroller-based module
For this we have decided on using Raspberry Pi as it can easily interface with the IMU and GPS sensors that we will be using to collect our data. Additionally, research shows that they have sufficient processing power to run a complete machine learning pipeline. 
Our pipeline consists of the following:

Data Preproccessing: the raw data from the sensors is first normalized, recalibrated, and stored in pandas timeseries dataframe by a library of functions that we have written in Python for each sensor.

Maneuver Classification: We segment the timeseries dataframes for the previous stage to create a windowed dataset, and from this various features such mean, median, std are extracted. This windowed data is then fed to our ML Algorithms which classify which maneuver, if any, has occured in a certain window of time. The ML algorithms that we have experimented with are SVMs and Random Forest.

Driver Scoring:
Based on the frequency of maneuvers and the length of the trip, we assign a driver score for each trip. The cumulative of which forms the driver score.

Motion Tracking:
Using AHRS algorithm and Kalman Filters for sensor fusion which would allow for a more accurate trajectory to be calculated. This will also be implemented in Python. 

2) A web dashboard:
This dashboard will be used to provide the summary and stats for each trip to the drivers. It will require an authentication module and should be able to communicate with our microcontroller to recieve data from each trip. We are currently researching what would be the best way to implement  this.

Final Deliverable of the Project HW/SW integrated systemCore Industry TransportationOther IndustriesCore Technology Big DataOther Technologies RoboticsSustainable Development Goals Sustainable Cities and CommunitiesRequired Resources
Item Name Type No. of Units Per Unit Cost (in Rs) Total (in Rs)
Total in (Rs) 46500
Raspberry Pi Equipment11250012500
Arduino Equipment125002500
MPU-6050 Equipment120002000
MPU-9150 Equipment130003000
Miscellaneous hardware Equipment150005000
Sense HAT Equipment160006000
GPS Module Equipment155005500
Data set generation Miscellaneous 11000010000

More Posts