Accident Risk Prediction and Avoidance I
Accident Risk Prediction and Avoidance I
Accident Risk Prediction and Avoidance I
DOI:10.3233/JIFS-191375
IOS Press
Abstract. Autonomous vehicles technology is an emerging area and has attracted lots of recognition in recent times. Accidents-
free driving has always been the focal point of autonomous vehicles. Autonomous vehicles have the potential to eliminate
human errors while driving, which has been argued as the predominant cause of traffic accidents. In autonomous vehicles
technologies, a variety of efforts have been made to eliminate human drivers. The full elimination of humans is not possible
at this moment, but some of the tasks can be automated to facilitate the drivers. In this paper, we investigate the leading causes
of accidents based on UK vehicle safety data of 2017-2018. We analyze the data and investigate the leading factors which
cause traffic crashes. Based on the leading features in the dataset, we then run different prediction algorithms to predict the
severity of accidents under a given input feature set. The accuracy of the model with Decision Tree classifier, Random Forest,
and Logistic Regression are compared, and it has been found that Random Forest performs best among others with 95%
accuracy. The trained random forest model is deployed on the Internet of Things server based on Arduino, and a lightweight
application is developed to get the vital data from the driver. The data is applied to the trained model to predict the risk index
of driving. This application is lightweight but yet provide a significant contribution in terms of safety in autonomous vehicles.
Keywords: Internet of things, cyber-physical systems, real-time systems, virtualisation, virtual object
1. Introduction
ISSN 1064-1246/20/$35.00 © 2020 – IOS Press and the authors. All rights reserved
4592 S. Ahmad et al. / Accident risk prediction in semi-autonomous vehicles
portation systems, respectively. In the former case, The remainder of this paper is organized as follows.
the motivation is the reduction of fatalities and acci- In the next Section, the motivation and parameter
dents, which are mostly caused by drivers’ errors. It is prioritization are discussed, followed by the method-
envisioned that more than 90% of traffic crashes are ology, interaction modeling, implementation stack,
due to the drivers’ errors, such as fatigue, and thus, and execution results. Finally, the model is evaluated
their elimination can reduce the chances of accidents with respect to different parameters, and the paper
near to 10%. is concluded with a summary of key findings and
Nevertheless, the reduction of human intervention directions for future research.
is the sole aim of autonomous, which is very reward-
ing. However, at the same time, it can lead to catas-
trophic hazards if any failure occurs. AV testing and 2. Motivation
piloting have begun in various countries. By 2014,
AV testing on roadways has been legalized in four In this Section, the motivation of this paper is dis-
states in the US. In Australia, AV testing has been first cussed in detail. The primary impulse which leads to
introduced in South Australia’s roads in 2016 [11]. this work is the fact that accidents and traffic crash
The market penetration rate of AVs is estimated to be not only result in human losses but also a considerable
between 24% and 87% by 2045 [12, 13]. However, portion of economic resources are wasted in handling
no vehicle has passed level 5, which corresponds to a these crashes. For instance, in the UK, the amount
fully autonomous vehicle. Although Tesla claims that spent on avoiding fatalities is about 1.25 million in
they will introduce level 5 vehicles by 2020, it is still 2002 despite the fact that it is among the leading safest
far from reality. So, in order to contribute to the major- countries around the globe [16]. It means the money
ity of traffic crashes, automakers introduced some spent in other countries are way more than the UK.
automated features such as self-parking, automatic Similarly, in the United States, about 1.6% of annual
braking, forward collision warning, lane departure GDP is spent on handling traffic crashes, which con-
warning, and blind-spot monitoring [14, 15]. tributed around 838 billion USD in 2010, and this
The problem with these features is that they are keeps growing every year [17]. Fig. 1 shows the cost
very sophisticated at times and can facilitate driver of all individual crashes due to driver’s errors and
but near to 100% accuracy, but for every feature, external environment for drivers, which contributes
single embedded hardware is equipped with the a significant portion of the economy in handling and
vehicle, which is not only expensive but also put a avoidance crashes. Therefore, the goal of this paper
load the battery of the vehicle as well. In this paper, is to make use of newer technologies such as IoT
we model the safety of vehicle using a completely and RT-IoT to make a generic system that not only
different perspective and assume the collection avoids the traffic crashes but also contribute a sig-
of real-time tasks which must be executed within nificant deal to the economy. Other similar systems
their deadline. Unlike dedicated and expensive are accurate but not cost-effective and specific with
hardware, we use a single generic IoT hardware that a single role so multiple chips are needed to pro-
communicates with sensors to detect the driver’s vide a complete system which not only increase the
state and based the state, the risk index is predicted. cost but also the load on the vehicle. The proposed
We prioritize the tasks based on the dataset of UK system is generic and cost-effective and only a sin-
road safety, which is taken for 2017-2018. The gle general-purpose hardware need to be installed.
dataset is analyzed, and the vital factors affecting the This is the leading advantage of this work over the
safety of vehicles are investigated. Based on vital state-of-the-art solutions.
features, the data is trained to predict the risk index As part of the work, we prioritize specific param-
for a certain set of features. Furthermore, the trained eters that affect the most on road safety. Certain
model is deployed, which takes real-time data and parameters are related to the environment, such as bad
gives it to the deployed model. The model computes weather, surface friction, whereas certain parameters
the risk index. If the risk index is high, actions such are related to drivers’ biological behaviors. In this
as alerts and notifications are issued to the driver. work, we consider the driver’s biological behavior
The assurance of real-time tasks execution can be and environmental conditions which can make them
formally proved by carrying out feasibility analysis. uncomfortable and error-prune, which is considered
Once it has been guaranteed than no critical task will the leading factor for traffic crashes. Artificial intelli-
be missed, it will be deployed in a real environment. gence and Machine learning are used to find patterns
S. Ahmad et al. / Accident risk prediction in semi-autonomous vehicles 4593
Table 1 Table 2
Task Modelling and Parameters Description Tasks Generation and Mapping in Electric Vehicle Safety
Modeling
Task Description Applicability
Parameter Task ID Task Name Vo IDs
Start time The arrival of tasks, also called Sensors, 1 GetTemperatureData Temperature 01
or arrival phase of the tasks. Actuators 2 GetHumidity Humidity BMP 01
time 3 GetPressure Pressure BMP 01
Execution The time it requires to execute Sensors, 4 GetLightCondition Light Sensor
time during its period in other words, Actuators 5 getWeather Weather Server
The execution time within its 4 GetECG Electro Cardio Gram
period. (ECG)-e-Health Libillium
Period The time after which the tasks Sensors, 5 GetPulse Pulse-e-Health Libillium
repeat itself. This parameter is Actuators 6 GetOximeter Oximeter e-Health Libillium
specific to periodic tasks only and 7 FindIrregularPattern All Vo
for sporadic tasks it is irrelevant. 8 ControlFan Fan Actuator
Type This indicate the type of task, N/A
whether the task is periodic or
event-driven task
where V is the voltage supplied to the node and R
Urgency Urgency is the quantitative Sensors,
measure of the priority of the Actuators is resistance induced to prevent from burning due to
tasks. 0 means Normal Periodic, excessive current. The total power is given by
1 means highly urgent Periodic 2
means normal event-driven and 3
means high urgent event-driven
i=n
task. total
ψm = ψi,m (3)
Deadline The maximum time limit in Sensors,
i=o
which the task must have to be Actuators
executed otherwise will be The power and energy must be within the permis-
considered invalid. For event
tasks the deadline is considered 0.
sible range to avoid any circuit breakage, which can
Sensing Every task is inherently Sensors cause hazards in many cases. In this paper, tasks con-
Output associated with a physical device. sidered vital for safety are summarized along with
Be its sensor or actuator, in either their mapped virtual objects in Table 2.
case it generates some data which
can be stored as a task’s
parameters.
Energy Every task is when deployed on Sensors 4. Interactive modeling
Consumed an IoT node, consume some
energy which depends on the
amount of data it is shipped with In this Section, the interaction and flow of the
and the period of the task. system have been described in detail. The proposed
system first analyzes the safety scenarios, which are
described in a service requirement. Once the scenar-
optimize it accordingly. For instance, if a task τi with ios are analyzed, the tasks are generated for them.
a period P is deployed on a physical object vm , the These tasks are then mapped on virtual objects and
energy consumed is given by allocated to the corresponding IoT node. The data
collected from sensor nodes are persisted in a central
φ+P repository from where it is consumed by a module
Dm
Ei,m = dt (1) named intelligent control. The module checks the val-
t=φ P ues of the sensors’ data and classifies them as normal
where Dm is the output data from the node vm , and φ is or abnormal. In the case of abnormal values, some
the arrival time of the task. The formula suggests that actions need to be taken, which is in the form of con-
the longer the period and lesser the data, the little will trol task generation and deployment. For instance,
be the energy consumed and vice versa. Similarly, the if the ECG values suggest that the driver is tired or
power is directly proportional to the energy, and for drowsy, a control task with the sound notification is
the same task, the power ψi,m is given by generated and deployed on the corresponding actua-
tor. The flowchart of this process is shown in Fig. 5
to portray the above-mentioned processes.
V φ+P Dm The sequence of operations in the proposed work
ψi,m = dt (2)
R t=φ P is exhibited in the form of a UML sequence diagram,
4596 S. Ahmad et al. / Accident risk prediction in semi-autonomous vehicles
5. Implementation detail
6. Execution results
Forest, Decision Tree and Linear Regression. The overall accuracy of Random Forest is also the high-
model output is risk severity classes. There are three est among other algorithms. The micro-average for
classes. 1 represents fatality, 2 represents casualties, Logistic regression is highest, which means this algo-
and 3 represents no harm. The input is the data param- rithm is less accurate, but its performance is balanced
eters. The data is normalized prior to giving it to the across all classes.
training phase. Table 4 shows the summary of model Fig. 10 shows the graph of true predictions and
evaluation in terms of various attributes. The recall false predictions. The value of true predictions is
and precision of different classes in Random For- comfortably higher than the value of false predic-
est are more than its counterpart’s algorithms. The tions. Similarly, for every respective algorithm, the
S. Ahmad et al. / Accident risk prediction in semi-autonomous vehicles 4599
support
4111
38151
264697
306959
306959
306959
f1-score
0.0412
0.171
0.858
0.357
0.761
0.75
Decision Tree
85.67
Recall
0.046
0.186
0.845
0.359
0.752
0.75
Precision
0.158
0.871
0.355
0.771
0.03
0.75
support
4111
38151
264697
306959
306959
306959
Analysis of Model Training Results of various algorithms
f1-score
0.308
Logistic Regression
0.01
0.01
0.92
0.93
0.79
92.4
Recall
0.001
0.001
0.99
0.99
0.33
0.86
Table 4
0.866541
Precision
0.86
0.28
0.74
9. Conclusion
0.801
0.51
0.84
0.34
0.845
0.51
0.84
0.34
0.84
0.38
point to redefine the mechanism of driver assistance [13] P. Bansal and K.M. Kockelman, Forecasting americans’
systems and get rid of the commercial and costly long-term adoption of connected and autonomous vehicle
technologies, Transportation Research Part A: Policy and
devices which only do a dedicated job. Practice 95 (2017), 49–63.
[14] I.J. Reagan, J.B. Cicchino, L.B. Kerfoot and R.A. Weast,
Crash avoidance and driver assistance technologies–are they
References used? Transportation Research Part F: Traffic Psychology
and Behaviour 52 (2018), 176–190.
[15] J. Bierstedt, A. Gooze, C. Gray, J. Peterman, L. Raykin
[1] R. Lukkien, T. Ozcelebi, J.J. Lukkien, O. Uzun, et al., and J. Walters, Effects of next-generation vehicles on travel
Discovery, monitoring and management in smart spaces demand and highway capacity, FP Think Working Group
composed of low capacity nodes, IEEE Transactions on (2014), 10–11.
Consumer Electronics 56(2) 2010. [16] M.A. Quddus, Time series count data models: An empir-
[2] N. Dimakis, J.K. Soldatos, L. Polymenakos, P. Fleury, ical application to traffic accidents, Accident Analysis &
J. Curı́n and J. Kleindienst, Integrated development of Prevention 40(5) (2008), 1732–1741.
context-aware applications in smart spaces, IEEE Pervasive [17] K.H. Janstrup, Road Safety Annual Report 2017, 2017.
Computing 7(4) (2008), 71–79. [18] data.gove.uk, Road safety data, https://data.gov.uk/dataset/
[3] H.-n. Lee, S.-h. Lim and J.-h. Kim, Umons: Ubiquitous cb7ae6f0-4be6-4935-9277-47e5ce24a11f/road-safety-data,
monitoring system in smart space, IEEE Transactions on [Online; accessed 01-January-2020].
Consumer Electronics 55(3) 2009. [19] D.J. Fagnant and K. Kockelman, Preparing a nation for
[4] S. Ahmad, L. Hang and D.H. Kim, Design and implemen- autonomous vehicles: Opportunities, barriers and policy
tation of cloud-centric configuration repository for diy iot recommendations, Transportation Research Part A: Policy
applications, Sensors 18(2) (2018), 474. and Practice 77 (2015), 167–181.
[5] S.D.T. Kelly, N.K. Suryadevara and S.C. Mukhopadhyay, [20] P. Rau, M. Yanagisawa and W.G. Najm, Target crash pop-
Towards the implementation of iot for environmental con- ulation of automated vehicles, in In 24th International
dition monitoring in homes, IEEE Sensors Journal 13(10) Technical Conference on the Enhanced Safety of Vehicles
(2013), 3846–3853. (ESV) (2015), 1–11.
[6] X. Li, R. Lu, X. Liang, X. Shen, J. Chen and X. Lin, Smart [21] V.V. Dixit, S. Chand and D.J. Nair, Autonomous vehicles:
community: An internet of things application, IEEE Com- Disengagements, accidents and reaction times, PLoS One
munications Magazine 49(11) 2011. 11(12) p.e0168054, 2016.
[7] S. Childress, B. Nichols, B. Charlton and S. Coe, Using [22] B. Schoettle and M. Sivak, A preliminary analysis of real-
an activitybased model to explore the potential impacts of world crashes involving self-driving vehicles, University of
automated vehicles, Transportation Research Record: Jour- Michigan Transportation Research Institute, 2015.
nal of the Transportation Research Board 2493 (2015), [23] P. Bhavsar, P. Das, M. Paugh, K. Dey and M. Chowd-
99–106. hury, Risk analysis of autonomous vehicles in mixed traffic
[8] L. Da Xu, W. He and S. Li, Internet of things in industries: A streams, Transportation Research Record: Journal of the
survey, IEEE Transactions on Industrial Informatics 10(4) Transportation Research Board 2625 (2017), 51–61.
(2014), 2233–2243. [24] F.M. Favarò, N. Nader, S.O. Eurich, M. Tripp and
[9] S. Ahmad, S. Malik, I. Ullah, M. Fayaz, D.-H. Park, K. N. Varadaraju, Examining accident reports involving
Kim and D. Kim, An adaptive approach based on resource- autonomous vehicles in california, PLoS One 12(9)
awareness towards power-efficient real-time periodic task p. e0184952, 2017.
modeling on embedded iot devices, Processes 6 (7) (2018), [25] I.R. Johnston, C. Muir and E.W. Howard, Eliminating seri-
90. ous injury and death from road transport: A crisis of
[10] S. Ahmad, S. Malik and D.-H. Kim, Comparative analysis complacency. CRC Press, 2013.
of simulation tools with visualization based on real-time [26] A.E. Curry, J. Hafetz, M.J. Kallan, F.K. Winston and D.R.
task scheduling algorithms for iot embedded applications, Durbin, Prevalence of teen driver errors leading to seri-
International Journal of Grid and Distributed Computing ous motor vehicle crashes, Accident Analysis & Prevention
11(2) (2018), 1–10. 43(4) (2011), 1285–1290.
[11] A. Daly, Privacy in automation: An appraisal of the emerg- [27] S.E. Shladover, Cooperative (rather than autonomous)
ing australian approach, Computer Law & Security Review vehicle-highway automation systems, IEEE Intelligent
33(6) (2017), 836–846. Transportation Systems Magazine 1(1) (2009), 10–19.
[12] T. Litman, Autonomous vehicle implementation predic- [28] O.A. Basir, J.P. Bhavnani, F. Karray and K. Desrochers,
tions, Victoria Transport Policy Institute Victoria, Canada, Drowsiness detection system, 23 (2004), US Patent
2017. 6,822,573.