Professional Documents
Culture Documents
Driving Event Detection and Driving Style Classification Using Artificial
Driving Event Detection and Driving Style Classification Using Artificial
Driving Event Detection and Driving Style Classification Using Artificial
Neural Networks
Patrick Brombacher1 , Johannes Masino2 , Michael Frey2 , Frank Gauterin2
Abstract— Knowledge about the driving behavior of a driver Since there are many applications for the knowledge of
is important for applications in many different areas, especially driving style, many studies and patents exist, which present
for Advanced Driver Assistance Systems. The driving style does models for driving style recognition. The methods to estimate
not only affect the current driver and his vehicle but also his
environment. For example, usage-based insurances classify the driving style presented in previous literature can be distin-
driving style in order to reward calm drivers by granting them a guished with respect to the hardware to collect the data on
discount. In this paper we present a novel algorithm to provide the one hand as well as to the approach and the algorithm
an accurate classification of a person’s driving style. Our model used for classification on the other hand.
is based on the identification of driving maneuvers and the Many authors use sensors of modern smartphones [3]–
classification of the driving style for these events using artificial
neural networks. Furthermore, an overall score of the driving [5]. This approach has many advantages, since smartphones
style for one trip is calculated based on the classified events. We are widely used and provide a powerful platform with both
validate our developed model in 58 test trips from different test multiple sensors and the possibility to implement an algo-
drivers using a recently developed low-cost measuring device rithm for on-line calculations [6]. Furthermore, sensor data
based on a Raspberry Pi. The results of our validation show for driving style classification can also be accessed through
that the model can identify more than 90 % of the driving
maneuvers correctly. Moreover, the driving style classification the vehicle’s CAN bus [7]. However, the vehicle manufac-
matches the assessment of the driver in 81 % of the relevant turer usually encrypts such data, which makes it difficult
trips with a normalized average mean squared error of less to read them without additional information. Summarized,
than 11 %. In addition, a moving average of the calculated inertial sensor data, such as acceleration or angular rate, are
score for each event shows validated changes in the driving essentially important for driving behavior classification. In
behavior of the test persons.
addition, GPS sensors are often used to determine the speed
I. I NTRODUCTION and position of the vehicle [3].
The driving style can either be classified continuously or
Active vehicle safety systems have become more important based on individual events of a trip, such as accelerations
in recent years and are one reason for the decrease of or curves. The Dynamic Time Warping (DTW) algorithm is
accidental deaths in road traffic [1]. The current driving style often applied for the latter approach [3], [5]. An algorithm
could be an additional input for an active vehicle safety often used for continuous classification independent from
system to warn the driver or to adjust vehicle dynamics in driving maneuvers is the fuzzy logic [8]–[10]. In contrast
an event of dangerous driving behavior or if the driving style to binary logic, in which classifications are defined with
is not safe in the current environment, e.g. in case of low exact thresholds, one can implement continuous transitions
frictional connection due to rain. in fuzzy-logic systems by making gradations between the
Moreover, driving style is one important factor for usage- individual thresholds via membership functions. The contin-
based insurances. Drivers with a less aggressive driving uous classification of driving style is often used for Advanced
behavior can benefit from reduced insurance premiums. The Driver Assistance Systems (ADAS), whereas the event-based
knowledge about their driving styles and financial benefits classification is suitable for usage-based insurances, where
might also motivate drivers to adjust to a more efficient the average behavior of the driver is important. However, a
and fuel saving driving behavior. The data used for driving change of driving behavior can also be identified with the
style classification can be recorded by vehicle or smartphone event-based approach by analyzing each event and recogniz-
sensors, or a dedicated black box. Furthermore, driving style ing changes. An overview of previous approaches is given
plays an important role in the charging strategy of hybrid in Table I.
electric vehicles. The control strategy can be adjusted to In this study we present a novel method to identify and
the driving behavior, e.g. to greater boosting capability for classify driving maneuvers with respect to driving styles
dynamic driving styles [2]. based on artificial neural networks (ANNs). We use a self-
developed measurement device [11] to acquire data from a
1 Patrick Brombacher is with the School of Industrial Engineering and
GPS sensor and inertial sensors under real driving conditions.
Management, Karlsruhe Institute of Technology (KIT), Germany, and has
written his master thesis at the Institute of Vehicle System Technology, KIT In our algorithm for driving style classification we use
p.brombacher@gmx.net a threshold-based endpoint detection to extract maneuvers
2 Johannes Masino, Michael Frey and Frank Gauterin are with the Institute
from the trip. In contrast to previous literature [5], we post-
of Vehicle System Technology, Karlsruhe Institute of Technology (KIT),
Kaiserstr. 12, 76131 Karlsruhe, Germany {johannes.masino, process the events automatically, e.g. by combining events,
michael.frey, frank.gauterin}@kit.edu such as accelerations with shift gears to get an improved data
l-)))
TABLE I
D[ Ȧ] D[ D\ Ȧ] W
OVERVIEW OF RELEVANT LITERATURE
(YHQWGHWHFWLRQ
Reference Year Methodology Data from Approach
(QGSRLQWGHWHFWLRQ )HDWXUHYHFWRUV
[5] 2011 DTW1 Smartphone Event-based
[4] 2012 DTW Smartphone Event-based
[3] 2014 DTW Smartphone Event-based
[8] 2012 Fuzzy Logic GPS tracker Continuous
[9] 2013 Fuzzy Logic Smartphone Continuous $UWL¿FLDOQHXUDO 'ULYLQJHYHQW
[10] 2014 Fuzzy Logic Simulations Continuous QHWZRUNV FODVVL¿FDWLRQ
[7] 2013 NN2, SVM3 Vehicle Sensors Event-based
1 Dynamic Time Warping
2 Nearest Neighbor
3 Support Vector Machine
'ULYLQJVW\OH
'ULYLQJVW\OH &ODVVL¿HGHYHQWV
FODVVL¿FDWLRQ
Y
set for our classification algorithm. We calculate statistical
Fig. 1. Block diagram of our developed algorithm for driving style
values from the sensor data to describe events and to build classification.
feature vectors, as input for our ANNs to classify the driving
style. We validate our algorithm in practical test runs.
III. A LGORITHM
II. M ETHODOLOGY The algorithm presented in this paper is based on a three-
step process, as shown in Fig. 1.
In our experimental setup, we use a Raspberry Pi based
In the first step of the model, the start- and endpoints of
measurement platform attached to the following sensors:
longitudinal and lateral driving events are detected based on
• Inertial module LSM9DS1 thresholds of the longitudinal acceleration ax and the yaw
• GPS module built around the MTK 3339 chipset rate ωz . Afterwards, the algorithm characterizes all events
This system provides a low-cost yet high-accuracy mea- by a set of statistical values calculated from the longitudinal
surement device for our application, even compared to pro- acceleration ax , lateral acceleration ay , yaw rate ωz , and the
fessional inertial measuring units [11]. The device is mounted length of the event t.
inside the car on the dashboard and vehicle dynamics is In the second step, all detected maneuvers are classified
measured according to ISO 8855:2011. into several categories by two ANNs, which have to be
For the classification of the driving style, we consider the generated and trained in advance. There are four categories
longitudinal acceleration ax , the lateral acceleration ay , the of longitudinal events and six categories of lateral events.
yaw rate ωz and the velocity v of the vehicle. All sensor At last, the algorithm calculates a score percentage from
data are stored with a uniform sampling rate of 20 Hz. all recognized driving events and classifies the overall driving
Due to vibrations in the interior of each vehicle all recorded style from this score based on thresholds for each of the five
data, particularly the acceleration, is subject to a significant different driving style categories.
amount of noise. Therefore, the acceleration and gyroscope
data is filtered using a Savitzky-Golay smoothing filter of A. Endpoint Detection
polynomial degree 2 and a window size of 9 samples [12]. After the import and pre-processing of all data from a
For the driving maneuver classification, we use two ANNs. trip, our endpoint detection algorithm identifies start and
The most important advantages of ANNs, which make them end points of lateral driving maneuvers, such as turns, and
suitable for our driving event classification algorithm, include longitudinal driving maneuvers, such as accelerations and
the comparably low computing time for output calculation decelerations. In order to detect the endpoints of those
and the possibility to allow a fuzzy classification output maneuvers, we use a threshold-based approach. For the lon-
in contrast to the discrete classification e.g. by a decision gitudinal events we determine a threshold for the longitudinal
tree. On the other hand, the larger computing costs for acceleration ax and for the lateral events we consider the yaw
initial training of the networks is not an issue since it rate ωz [5].
is done beforehand. Our networks are simple multilayer If the value of the signal exceeds the corresponding
perceptrons with one hidden layer and 8 hidden neurons threshold, a start point of an event is detected. If it drops
for the longitudinal events and 12 for the lateral events. below the threshold, the endpoint of this event is stored.
This structure has been determined empirically based on Typically, the absolute value of the longitudinal acceleration
the given number of input and output neurons. Since the is larger for braking events. Therefore, we distinguish be-
focus of this work is on the application for driving style tween acceleration and deceleration events and use a larger
recognition, we refer to the literature about ANNs for more threshold for deceleration events. The thresholds used in the
detailed information, e.g. [13]. endpoint detection were determined empirically based on
TABLE II
F EATURE V ECTORS AS I NPUTS FOR THE M ODEL
#!" #!"
#$!#"
TABLE IV
S CORE I NTERVALS FOR D RIVING S TYLE C LASSIFICATION
#!!#"
"%##$!
&!#!"
Score interval Driving style
[%]
[0...57] Very sporty
(57...69] Sporty
(69...81] Normal
(81...92] Defensive
(92...100] Very defensive
"
#!!#"
!#'"! #$!
summation is necessary because especially turns often cannot
&!#!"
be categorized exclusively into one of the three sharpness
categories. The overall score for a trip is calculated as
the average score of all classified events. Hence, a high
score characterizes a defensive overall driving behavior. In
a simplified example with only two longitudinal maneuvers,
one of which is an acceleration classified as 70 % defensive
and 30 % sporty and the other one is a deceleration classified "
as 50 % defensive and 50 % sporty, the calculated overall
score would be 60 %.
Fig. 3. Example of lateral acceleration and yaw rate of a defensive light
In addition to the classification of the detected driving turn and a sporty sharp turn. The sharpness of a turn is determined by the
maneuvers, we include sections with high velocity as a sec- characteristics of the yaw rate whereas the lateral acceleration defines its
ond factor to calculate the overall driving style classification sportiness, depending on the sharpness classification.
score. When a driver exceeds a speed threshold of 42 m/s
for 30 seconds it is considered as one equivalent sporty event
and therefore leads to a lower overall score. This parameter from seven test trips resulting in a range of 20 to more than
values were determined empirically, are defined for German 100 training examples for each class.
motorways without speed limit, and can easily be adjusted We labeled longitudinal events based on the longitudinal
via a central parameter file. The reason for this second factor acceleration whereas for the lateral events, we used the yaw
is that driving on motorways with high speed cannot be rate to identify the angle of a turn and the lateral acceleration
detected by our driving event detection algorithm since the to classify its driving style.
thresholds for longitudinal acceleration or yaw rate usually
are not exceeded on these type of roads. B. Methodology
At last, we classify the driving style into one of five
1) Driving Event Classification: In the first step of the
categories based on the calculated overall score. A high score
validation, we compare manually classified driving events
leads to a more defensive driving style classification whereas
with the output of the neural networks. Since the model
a lower score characterizes a sporty driving behavior. Values
calculates a fuzzy classification output for each event, but
lower than 50 % are hardly achieved because even in a very
the manual labeling can only be conducted ”binary”, i.e.
sporty test run on public roads, there are usually several
every event is classified into one specific class, we have
defensive events. The empirically determined thresholds for
to adjust the neural network output to be able to compare
the driving style classification are shown in Table IV.
both classifications. In particular, we derive the ”binary”
IV. VALIDATION classification of a maneuver by taking the class with the
We validate the developed model in two steps using differ- maximum output value ignoring all other entries of the
ent methodologies. In the first part, we analyze the driving fuzzy classification vector. We also analyze the classification
event classification accuracy of the ANNs by comparing accuracy by a confusion matrix for each of the two neural
the results to manually classified events as benchmark. In networks.
the second step, we analyze our algorithm for driving style 2) Driving Style Recognition: In the second step, we
recognition by comparing the classification to the assessment evaluate the driving style classification accuracy based on
of test drivers. In total we analyze 58 trips of different a set of 58 trips by comparing the subjective assessment
drivers, different cars and on different routes. of the driver to the classification output of the algorithm.
We distinguish between the three different precision ratings
A. Training Data correct classification, differing classification, where model
The neural networks are created and trained in advance by and driver classification differ by one class, and wrong
manually labeled training examples using a backpropagation classification, where model and driver classification differ
algorithm. Therefore, we classified a large number of events by more than one class.
TABLE V TABLE VI
N UMBER OF D ETECTED E VENTS AND P ERCENTAGE OF C ORRECTLY C ONFUSION M ATRIX FOR THE C LASSIFICATION OF L ONGITUDINAL
C LASSIFIED E VENTS FOR E ACH VALIDATION T RIP E VENTS
TABLE VIII
S UMMARY OF THE ACCURACY OF D IFFERENT DATA S ETS the driving maneuvers when compared to manually labeled
data. We validated our driving style classification algorithm
Set Trips Classification Error using a large set of trips from different drivers, vehicles and
correct differing wrong NRMSD on different routes. In the most relevant subset containing 42
1 58 66 % 31 % 3% 17 % trips, we achieved a classification accuracy of 81 % with no
2 42 81 % 19 % 0% 11 % wrong classifications, according to our proposed definition.
3 9 100 % 0% 0% 0% Our approach could be extended by using data about the
steering wheel angle and the throttle or brake pedal to allow
for a more accurate endpoint detection. This signals could
be extracted from the vehicle’s CAN bus. In addition, more
# "
different classes of events could be distinguished, since the
" neural network classification accuracy is very high and more
classes could provide more information for the driving style
!
classification. Furthermore, the model could be extended to
recognize traffic jams on motorways in order to remove
!#
the respective events for driving style classification. Also,
a current score could be calculated continuously based on
# !# a range of the last detected events to classify the current
driving style for applications in ADAS.
R EFERENCES
[1] A. Jarašūniene and G. Jakubauskas, “Improvement of road safety
"!
using passive and active intelligent vehicle safety systems,” Transport,
vol. 22, no. 4, pp. 284–289, 2007.
Fig. 4. 20 sample moving average of the individual scores of all [2] A. Wilde, J. Schneider, and H.-G. Herzog, “Driving situation and
consecutively arranged events of one trip. In the first part of this trip, driving style dependent charging strategy in hybrid electric vehicles,”
which corresponds to the first 70 events, our test driver drove defensively, ATZ worldwide, vol. 110, no. 5, pp. 18–24. [Online]. Available:
whereas he pursued a more sporty driving style during the last part of the http://dx.doi.org/10.1007/BF03225005
trip corresponding to the last 40 detected events. [3] J. Engelbrecht, M. J. Booysen, and G.-J. Van Rooyen, “Recognition
of driving manoeuvres using smartphone-based inertial and gps mea-
surement,” in Proceedings of the First International Conference on the
use of Mobile Informations and Communication Technology (ICT) in
In addition, Fig. 4 shows a 20 sample moving average of Africa UMICTA, 2014.
the scores of the consecutively arranged classified events of [4] H. Eren, S. Makinist, E. Akin, and A. Yilmaz, “Estimating driving be-
one trip. A change in driving style can easily be detected havior by a smartphone,” in 2012 IEEE Intelligent Vehicles Symposium
(IV), 2012, pp. 234–239.
by comparing the first part of this trip to the second part, [5] D. A. Johnson and M. M. Trivedi, “Driving style recognition using
where the average detected score is lower and therefore the a smartphone as a sensor platform,” in 2011 14th International IEEE
detected driving style is much more sporty. This finding is Conference on Intelligent Transportation Systems (ITSC), Oct 2011,
pp. 1609–1615.
coherent with the statement of our test driver. This shows that [6] M. Pfriem and F. Gauterin, “Employing smartphones as a low-cost
our method can also detect changes in driving style within a multi sensor platform in a field operational test with electric vehicles,”
trip, which is a key requirement for applications in ADAS. in 47th Hawaii International Conference on System Sciences (HICSS),
Jan. 2014, pp. 1143–1152.
The analysis shows that our model is able to classify the [7] M. V. Ly, S. Martin, and M. M. Trivedi, “Driver classification
driving style precisely on most routes with different drivers and driving style recognition using inertial sensors,” in 2013 IEEE
and different cars. Apart from few situations, i.e. when not Intelligent Vehicles Symposium (IV), June 2013, pp. 1040–1045.
[8] A. Aljaafreh, N. Alshabatat, and M. S. N. Al-Din, “Driving style
enough events can be detected or the driver has to adjust recognition using fuzzy logic,” in 2012 IEEE International Conference
his driving style according to the environment in a traffic on Vehicular Electronics and Safety (ICVES), July 2012, pp. 460–463.
jam, the developed algorithm shows a very high classification [9] G. Castignani, T. Derrmann, R. Frank, and T. Engel, “Driver behavior
profiling using smartphones: A low-cost platform for driver monitor-
accuracy. ing,” IEEE Intelligent Transportation Systems Magazine, vol. 7, no. 1,
pp. 91–102, Spring 2015.
V. C ONCLUSION [10] D. Dörr, D. Grabengiesser, and F. Gauterin, “Online driving style
In this paper we present a model that can detect longitudi- recognition using fuzzy logic,” in 2014 IEEE 17th International
Conference on Intelligent Transportation Systems (ITSC), Oct 2014,
nal and lateral driving maneuvers from inertial sensor data. pp. 1021–1026.
The detected events are classified by two ANNs, especially to [11] J. Masino, M. Frey, F. Gauterin, and R. Sharma, “Development of a
distinguish between defensive and sporty driving maneuvers. highly accurate and low cost measurement device for field operational
tests,” in 2016 IEEE International Symposium on Inertial Sensors and
From the event classification, our algorithm calculates an Systems, Feb 2016, pp. 74–77.
overall driving style classification score to rate the driving [12] A. Savitzky and M. J. E. Golay, “Smoothing and differentiation of data
style into five categories. by simplified least squares procedures.” Analytical Chemistry, vol. 36,
no. 8, pp. 1627–1639, 1964.
The model is based on sensor data from a low-cost [13] E. Alpaydin, Introduction to machine learning. Cambridge, Mas-
measuring device and correctly detects more than 90 % of sachusetts: The MIT Press, 2014.