Inspiration

Now a days, Tesla and big tech giants are launching many EVs and self driving cars. Recently, while relaxing on my balcony, I came across a news article about a horrific accident involving an electric vehicle (EV). I was terrified that when a user invests in a self driving car he trust it with his life and even the safety of his family. This was the trigger point when I starded learning more about how this all happened. Through my research, I discovered that Electronic Control Units (ECUs) play a vital role in EVs. The ECU controls various functions like braking, airbags, engine control, and more. hese units rely on a Controller Area Network (CAN) to facilitate communication between microcontrollers and devices within the vehicle. But the CAN doesn't have any security system or intrusion detection system of it's own. So an attacker can easily attack an EV which result in these type of accidents.

What it does

My project Intrusion Detection System In EV successfully classifies all types of attacks that may cause accident and risk the life of an individual. I got the highest accuracy model that can easily predict which specific type of attack being executed on an electric vehicle in real-time.

How I built it

For this two datasets are used: Dataset 1 is collected from a Kia Soul and Dataset 2 is collected from a Chevrolet Spark car. First the datasets were preprocesssed followed by the feature extraction. I split the data into a 75-25 training-testing dataset. Decision Tree(DT), Support Vector Machines(SVM) and K-Nearest Neignbour(KNN) were used for classification purposes. DT outperforms the SVM and KNN resulting in the highest accuray(99..4%).

Challenges I ran into

The most challenging part in the whole project was the dataset because this type of dataset was not available freely on the internet. We got through many websites, may research papers to find a suitable dataset that fits my problem. After a month of searching when I found the dataset. The another challenge was the dataset consisted of many alphanumeric and null values. That's why the prepocessing and feature engineering took the maximum time.

Accomplishments that I am proud of

I am proud that my model ran with such a brilliant accuracy. all my hard work became successful when I achieved this high accuracy. When I posted this project on github a start-up also approached me. They were working on EV's as well and wanted me to join the sart-up. But because I had some work pending, I continued on the project.

What I learned

This was the project by which I learned a lot of new things. Firstly, when I saw the dataset I was so confused and wanted to quit this idea. But I kept going and handled this huge amount of data on my own. I learned various types of machine learning models and their use-cases. Now, I have all my concepts crystal stone clear that on which dataset what model can perform well and how to choose it. Previously, I used to be in confusion and though these models to be doing same work. But when I got deep down into calculation and their algorithm I got to learn a lot.

What's next for Intrusion Detection In EV

The next step for this project can be collaborating with companies to deploy this on CAN buses. So, that we can get a clear vision on how much this is effective.

Share this project:

Updates