IOT BASED SMART VEHICLE MONITORING SYSTEM

: Transportation system has been a part of evolving of humans. One can not image the life without vehicles. To accommodate the vast number of population, the number of vehicles also has been increased rapidly. This also led to increased number of accidents. The accident avoidance measures used now a day are all static and old. Also, there is no proper accident detection mechanism. This study proposes Smart Vehicle Monitoring System (SVMS) for early detection of accidents and also to prevent thefts. SVMS uses IoT technology to monitor the vehicle continuously and also to access and control remotely. The IoT devices placed in vehicles is designed using Raspberry Pi (RPi) that is acquainted with sensors to detect accidents immediately. The RPi is also acquainted with a camera to find the severity of accident. To detect the severity, SVMS uses machine learning based image classification model. When the accidents happen the SVMS detects it immediately and finds the severity of the accident. Then the system will immediately inform that to the authorities. The SVMS also acquainted with GPS system. This will allow the SVMS to continuously keep track of vehicles location. This data will be used to find the vehicles location during an accident or theft. The results of SVMS system were promising in terms of efficiently detecting the accidents, finding the severity of accident and also detecting the location of vehicle.


INTRODUCTION
In this vastly populated mechanical world, all the population is majorly dependent on vehicles and road transportation network to move from one place to another. Transportation has been a part of human growth from the start of civilization. As the population grows, the number of vehicles is also increased vastly. According to US publisher ward's estimation [1] [2], there has been around 1.05 billion vehicles on roads excluding off-road and heavy construction vehicles.According to World health statistics 2008, road traffic injuries are going to be 5th leading cause of death. According to global status report on road safety 2015 by WHO [3] [4], there has been around 1.25 million deaths due to road accidents every year. It also shows that, the major deaths are due to lack of immediate medical attention during accidents. Even though the technology has advanced so much, still the accident prevention and detection mechanisms used are implemented decades ago and are all static measures like speed breakers, road signs etc.
There has been extensive study in the field of transportation especially in accident detection and prevention. The Vehicular Ad-hoc NETwork (VANET) based methods [5] [6] proposes use of information gathered from neighbouring vehicles through VANET communication and machine learning approaches to predict accidents. Accidents are predicted by observing traffic behaviour from collected data. The survey on road accidents [7] [8] proposes the use of IoT technology in accident detection. Mainly the existing IoT systems were using embedded systems designed using micro controller boards like Arduino acquitted with piezoelectric sensors only.
The Smart Vehicle Monitoring System (SVMS) in this paper also proposes use of IoT technology by using sensor acquainted Raspberry Pi to early accident detection. SVMS also uses machine learning based image classification model to find the severity of the accident. The system also acquainted with GPS and GSM module to find vehicle location and to communicate through cellular network.
The remaining paper is divided into four sections. Section II discuss about the proposed system architecture. The hardware components and algorithms used in the SVMS are discussed in Section III. Section IV discuss about implementation of SVMS and results. Finally Section V explains about conclusion and future work.

PROPOSED SYSTEM
Using any existing system, one can not predict all accidents. Hence at least we must be able to detect accidents as early as possible. Any person or animal that is injured in an accident must be provided with medical treatment right away. Oftentimes, the people that are injured in accidents may not go for immediate medical treatment, either because of misjudging the injuries or due to the legal procedures involved in accidents. Even a person feels okay; there is no harm in being evaluated for any injuries. The main goal of SVMS proposed in this paper is immediately detecting accident, evaluating the driver's condition and informing it to the authorities.
The SVSM was not a simple system but a framework to immediately detect accidents with severity. SVMS also help the user to remotely shutdown the vehicle during theft. It also allows the user to locate the vehicle position from anywhere in the world. To accommodate all these, the SVMS includes Raspberry Pi accompanied by different sensors, GSM/GPRS module and GPS module. The overall architecture of the SVMS framework was shown in Figure 1. The internal design of IoT system was shown in Figure 2. The IoT system is, raspberry pi equipped with multiple sensors, camera, GSM/GPRS module and GPS module.

A. Accident Detection
Raspberry Pi equipped with two sensors, one is accelerometer and the other is impact sensor. The accelerometer sensor used in SVMS can detect any sudden change in acceleration in any direction and also can detect any tilt or rotation also. The impact sensor has been used in vehicles from last few years to detect accidents and to deploy airbags. SVMS uses these two sensors to detect any accidents. The accelerometer readings are continuously monitored and when the acceleration or deceleration exceeds more than a threshold value or the sensor is tilted more than a certain degrees, it will detect it as an accident.

B. Severity Detection
Raspberry Pi also equipped with a camera to capture the driver image, when an accident happens. Then the image will be sent to the server that will process the image finds the severity of accident by machine learning and image classification. Then raspberry pi will retrieve the severity level and alerts the authorities regarding accident with severity levels along with coordinates. The location of accident can be detected with the equipped GPS module.

Controlling Vehicle During Theft
When the vehicle was stolen, the users can shutdown the vehicle's fuel system by simply clicking a button in web user interface. Fuel relay switch in vehicle is connected to raspberry pi to allow the user to remotely shutdown the vehicle.

Figure 3: Web Interface with Vehicle Controls
The SVMS framework uses a server to provide user interface to the users to see the vehicle's location and also, to remotely control it. Figure 3 and 4 shows the web user interfaces. As shown in Figure 3, once the user logins to the server, they can switch off/on the fuel relay switch in vehicle and also can see the current location of vehicle in google maps. As shown in Figure 4, the user can see the history of vehicle's previous locations.

A. Data Acquisition
As discussed in previous section, the SVMS uses accelerometer and impact sensors to detect accidents immediately. As shown in Figure 2, the SVMS system has Raspberry pi 3 model B equipped with accelerometer sensor, impact sensor and a camera to collect data from vehicle. To on/off vehicle, the raspberry pi connected to a relay switch to control fuel supply. The module also connected with a GSM/GPRS module that is used for connect the Raspberry pi with internet and cellular network. The module has GPS module to find the geographical location of the vehicle.
Accelerometer and Gyroscope sensor is an electromechanical component that is designed to calculate acceleration force based on displacement of mass with respect to electrodes inside [9] as shown in Figure 5.
For this purpose ADXL345 3-axis accelerometer was used in the proposed model. This sensor works on very low power level of 3.6V. The sensor can detect any acceleration up to +16g. For sensing any impact or collision, Mega 2560 impact sensor was used in the SVMS system. It operates at very low voltage of 3-12 V. It gives low signal in case of collision, otherwise gives high signal as output. To take pictures of vehicle driver uses raspberry pi camera of 8MP resolution. When the accident happens, the raspberry pi uses the camera, takes picture and sends it to the server.

B. Severity Level Detection by Image Classification
The SVMS framework has one dedicated web and image processing server. The server receives image from the vehicle and gives it to image classification model. The image classification model used in this system was built by using machine learning algorithm as shown in Figure 6. The image classification model was built using Support Vector Machine (SVM)classifier.The SVM classifier is one of the popular classification algorithms, with one major disadvantage of large memory and computation time for training. But the performance of this classifier is far better than the many existing classifiers.The SVMS proposed here, uses an improved cascade SVM training algorithm. The cascade SVMS classifier in implemented using OpenCV in python. To study and analyse the classification model, it was fed with two sets of images as shown in Figure 7 and 8. One set has training images of conscious people, and another set has training images of unconscious people. Using these two sets of training images, a image classification model was built. When an accident happens and an image is received from the vehicle, it will be classified into either conscious or unconscious. The images are converted into Haar like features before feeding them to SVM classifier or the classification model as shown in Figure 6. This label will be sent to the raspberry pi that uses the GSM module to alert the authorities.

IMPLEMENTATION & RESULTS
All the SVMS software components are designed using open source software. The image classification model was implemented in a Linux server with Python and OpenCV. The web application was built in the same Linux with Apache, MySQL and PHP. The IoT device is built with Raspberry Pi (RPi) with Accelerometer and Impact Sensor as shown in Figure 2. The RPi also connected with GSM/GPRS and GPS modules.It was also equipped with a camera directly on to the board. The RPi was loaded with RaspbianOS that comes with python interpreter. All the components, that are connected to RPi were accessed and controlled by python programming language. The SVMS system was installed in a small car and tested.

Figure 8: Training Set of Unconscious Persons
The results of the system show promising results. As said in previous section, the image classification model was trained with two sets of images as shown in Figure 7 & 8. The image classification model was built using python in Linux server along with web service. Web site is built using HTML and PHP in the Linux server.
When a vehicle equipped with SVMS, the user needs to register vehicle register number that will be used as SVMS system identification number in the server. When an accident happens, the SVMS will detect the accident and will send a message to the registered mobile numbers like police, hospital, family members etc. as shown in Figure 9.
When the vehicle was stolen, the user can log in to the server and can see the vehicle location history as shown in Figure 4, and can control i.e. switch off the vehicle's fuel supply by clicking the button in user interface as shown inFigure3.

CONCLUSION & FUTURE WORK
By using the SVMS, accidents will be detected immediately with severity level and will be intimated to authorities without any delay. Immediate medical attention will reduce the number of accident kills and severe injuries. This can also help the traffic authorities to divert the traffic that will save both time and money. Since this will also help the user to find and control the stolen vehicles, the number of vehicle thefts will be reduced gradually.

Figure 9: SMS Received During Accident
At present the image classification model has been trained with only two sets of training images due to lack of data unavailability. For the given data, this gave promising results. If more sophisticated data sets are used, the result will be more efficient. If the SVMS equipped with more sensors and VANET, the performance and working of the framework will be more.