Home > automotive-insights > Inside Access: How Embitel’s Innovation Lab is Harnessing Machine Learning to Score Driver’s Behaviour

“All achievements, all earned riches, have their beginning in an idea.” — Napoleon Hill

[January 2019] Foreword by Sitaram Naik (Chief Innovation Officer, Embitel Technologies):

  • I will always cherish the Eureka Moment of this idea. Whenever I recollect that conversation with Vidya Sagar (Head of Technology – IoT Business Unit), I always feel amazed to see how a casual discussion has become one of the most fulfilling projects for our team.
  • That’s my friend, is the power of an Idea!
  • This happened during a drive back from a customer visit. We were returning after a very enthusiastic discussion with a leading Electric Vehicle OEM.
  • We have been partnering with this pioneer of EV Revolution, for a Car Head-up Display (HUD) project. Our Automotive and IoT Teams are designing a HUD solution for simulated test track, for this customer.
  • This Head-up Display solution simulates city traffic through virtual signals, speed-breakers, other simulated vehicles, pedestrians and more. Our customer has planned to deploy this Automotive HUD Solution for internal test-drives of their cars.
  • On our way back to Embitel’s HQ in Bengaluru; we realized that there is an opportunity to make this a more mainstream solution. A solution that can be deployed to assess Driver Behavior, for various business use-cases; instead of limiting this to only the test-tracks.
  • And rest is the “History in the Making”!

[Demo Video] How our Machine Learning (ML) App Monitors & Analyzes Driver Behavior & Road Conditions

  • [July 2018] Defining the Problem Statement

After several sessions of brainstorming, we zeroed in on the final problem statement for Phase I of Project Genie.

Problem Statement: An easy to install App that will help to assess a driver’s behavior in a city traffic condition and generate a driving score based on driving pattern

 

  • [August 2018] On-boarding the Team with right Skill-sets

The app in its initial stage required engineers with experience in Machine Learning, Edge Computing, and Android app development.

We are happy to receive complete support from Vidya Sagar and the HR Team in helping us identify the best talent. This helped us to build our Dream Team and get started with this Innovative Project, on a fast-track mode.

 

  • [September 2018] Simulating Vehicle Speed Data

To assess the driver’s behavior, we need machine learning model but prior to that, vehicle speed data is required to train it.

We have started with simulation of vehicle data before hitting the road for the real data. The simulated data is nothing but a speed variation data (similar to what a speed sensor would have recorded).

Our Modus Operandi is to first train the ML model with the simulated data and then verify with the real data.

 

  •  [October 2018] Finding the right “Machine Learning Model” and Training it

Now our first step is to make our System differentiate between good driving and rash driving. This requires learning from the simulated vehicle data. And this is where Machine Learning will play a crucial role.

There are plenty of Machine Learning (ML) Models available, but we need to figure out the most suitable ML Algorithm for our Application. While simulating the vehicle speed data, our team also kept shortlisting few ML Models that can be tested once the field-trials are concluded.

So here we are! We have identified 8-9 ML models and this month is all about putting each one of these Machine Learning Algorithms to test. A few of these models are    Linear Regression, SVR- Support vector Regression, MLRMulti Linear Regression and Artificial Neural Networks for Regression.

We have started feeding the simulated driving data into the machine learning algorithms. After days of testing and data crunching, out of 9 models, we have been able to get satisfactory results from 2 of them.

 

  • [November 2018] Getting the driver’s score computation right

It took 96 hours of data feeding and crunching, in order to generate our First Version of the Machine Learning Model, for this system.

For four continuous day, the ML Algorithm kept processing the vehicle speed data that we fed to it.

We are feeding the various instances of speed variation and specifying it as ‘good’ or ‘bad’. This is to help the ML model to understand how to compute the driver’s behavior score accurately.

We are improving our existing model using Artificial Neural Network. Keras-on TensorFlow, integrated in the backend, is the API and the library to build and train our machine learning model.

At the current stage of learning, the models are taking 1000 seconds of data to predict the score. We need to feed thousands of thousand seconds data of vehicle speed to the model so that it learns properly and gives us more accurate score.

 

  • [December 2018] Collecting real vehicle data using smartphone

Yay! Our Machine Learning Model is all set to roar! After months of tireless team-work, we have successfully designed an accurate ML model on our system.

But here’s the catch! The model has been trained only with the simulated data on a window’s based PC. For a real-world application, the model has to take real vehicle data and give the score.

So we have developed an Android app that makes use of the GPS sensor and collects real-time vehicle speed data.

Time to put the Android app to some use. We are getting our hands dirty and hitting the road. Our team has got involved in a lot of necessary field-work.

We undertook miles of real-time driving and gathered driving data for speed variations (acceleration and deceleration).

In this phase of our project, we are relying on sensors in-built in the smartphones. We are using GPS system of the smart-phones to record speed and location information.

However, once we have the PoC ready, we would be able to work with any sensor or a telematics device, as per the requirement of the customer’s project.

 

  • [January 2019] Re-training of ML Model and porting the algorithm to Android OS

The training starts again! Yes, we are now feeding the real data to the ML model to train it all over again.

Hard work and luck have a strong bond you see! We were expecting some discrepancy in the score that the model gave for simulated and real data. But to everyone’s surprise, the difference was negligible.

Real-time score prediction is supposed to be done on the mobile phone. For that, we have started porting the Machine Learning Model to Android OS.

Our team has come up with a very smart move! Instead of porting the entire model only the learning parameters (that the model has saved as files) are being ported. Instead of rewriting whole model, only the trained model is ported to Android OS.

Separating ML learning process and prediction process is helping us to get optimum performance on Android phone.

The porting of machine learning algorithm to Android doesn’t seem to be a cakewalk though. Only light version of TensorFlow is available on Android platform.

Hence, our team has started working on customizing the code to ensure successful porting.

Till now, first score is displayed only after 1000 seconds of driving time. For city drive, 1000 seconds of waiting time for first score is very high. So we have redesigned the ML algorithm to predict score with 100 seconds of speed data.

Now, it shows first score after 100 seconds (in less than 2 minutes) and updates score every 10 seconds. A graph is rendered with scores values and updated every 10 seconds. Overall score of the trip is also rendered using full trip data.

From the onset, we have had taken steps to implement Edge computing for score generation. This will be one more ‘feather in the cap’ that will help us to deliver a trail-blazing system performance.

With Edge Computing, we will be able to predict score locally on the device and no server connectivity will be required.

 

  • [March 2019]: Intelligent Analysis of Road Conditions:

We are firmly believe that the technology has the power to solve some of the critical real-world issues. One just needs to harness this ability through Innovation.

While working on this project (Development of AI Powered Driver Behaviour App), we realised the necessity of being aware of the road conditions.

A driver who is pre-warned about the impending potholes, speed humps, blind spots and more, can ensure better safety of the himself/herself, passengers, and the pedestrians.

In order to achieve this, our team decided to integrate a feature called “Intelligent Analysis of Road Conditions”.

Under this new feature, the app analyses the road-conditions in real-time and locates any event of potholes, bumps on a normal road.

The app leverages the built-in smartphone sensors such accelerometer and gyroscope for data collection related to road-conditions.

The data collected from these sensors: accelerometer – measurement of device’s linear acceleration, gyroscope- angular velocity, is fed to our ML (Machine Learning) model. The data is then pre-processed at the server leveraging Python script.

Driver behaviour app image

For more accuracy in detecting the potholes, our team ensured that the sensor data along with GPS coordinates is collected from the mobile devices of multiple users and transmitted to the server.

All these data are stitched together to train the ML model so that it can identify the pattern and detect the relationship between the sensor measurements and road conditions.

After thousands and lakhs of such multiple iterations of data recording and learning, the ML model is ready to deliver accurate information about the location of potholes, speedy humps or surface conditions of road at various locations.

Once the potholes and road conditions are classified, the server updates this information in the app in edge devices, so that the user is alerted at least 100 meter ahead of a pothole or speed hump.

*More Entries will be added as we move ahead with the project.

×

Happy to Help!