Drivingstyles: A Smartphone Application To Assess Driver Behavior
Drivingstyles: A Smartphone Application To Assess Driver Behavior
Drivingstyles: A Smartphone Application To Assess Driver Behavior
driver behavior
Javier E. Meseguer, Carlos T. Calafate, Juan Carlos Cano, Pietro Manzoni
Department of Computer Engineering
Universitat Politecnica de Valencia
Camino de Vera SIN, 46022, Spain
[email protected], {calafate, jucano, pmanzoni}@disca.upv.es
Abstract-The DrivingStyles architecture integrates both data the type of road on which the vehicle is circulating. Currently,
mining techniques and neural networks to generate a classifica this information is being collected and used in applications
tion of driving styles by analyzing the driver behavior along
aimed at improving road safety and promoting eco-driving [3],
each route. In particular, based on parameters such as speed,
acceleration, and revolutions per minute of the engine (rpm), we
thus reducing fuel consumption and greenhouse gas emissions.
have implemented a neural network based algorithm that is able The given recommendations addressing the driving style of
to characterize the type of road on which the vehicle is moving, as each user can save up to 20% of fuel while improving driving
well as the degree of aggressiveness of each driver. The final goal safety.
is to assist drivers at correcting the bad habits in their driving
The rest of this paper is organized as follow: Section
behavior, while offering helpful tips to improve fuel economy.
In this work we take advantage of two key-points: the evolution
II briefly reviews previous related works. Then, Section III
of mobile terminals and the availability of a standard interface provides an overall overview of the DrivingStyles architecture.
to access car data. Our DrivingStyles platform to achieve a Both client and server side applications are described in more
symbiosis between smartphones and vehicles able to make the detail in sections IV and V, respectively. The neural network
former operate as an onboard unit. Results show that neural
we have developed, along with the achieved accuracy results,
networks were able to achieve a high degree of exactitude at
classifying both road and driver types based on user traces.
are presented in section VI. Finally, section VII presents the
DrivingStyles is currently available on the Google Play Store conclusions of our work.
platform for free download, and has achieved more than 1550
downloads from different countries in just a few months. II. RELATED WORK
Index Terms-Driving styles; Android smartphone; OBD-II; Technological achievements in the field of mobile telephony
neural networks; eco-driving.
are making smartphones very powerful devices. In the research
world, this high computing power opens new and attractive
I. INTRODUCTION
research areas where many of them are able to generate
Mobile devices have experienced a technological break economic profit and significant advantages for our society.
through in recent years, evolving towards high performance One of the main problems of eco-driving systems [3]
terminals with multi-core microprocessors, being smartphones is identifying the factors that affect energy consumption.
a clear representative exponent of this trend. In addition, Ericsson [4] suggests that, in order to save fuel, sudden
the On Board Diagnostics (OBD-II) [1] standard, available changes in acceleration and high speed driving should be
since 1994, has recently become an enabling technology for avoided. Johansson et al. [5] suggest maintaining low levels of
in-vehicle applications due to the availability of Bluetooth deceleration, minimizing the use of the first and second gears,
OBD-II connectors [2]. These connectors enable a transparent and putting every effort into using the 5th and 6th gears, while
connectivity between the mobile device and the vehicle's avoiding continuous gear changes.
Electronic Control Unit (ECU). There are several proposals that analyze which variables
The range of possibilities that arise when combining cars affect fuel consumption. Kuhler [6] presented a set of ten
and smartphones is endless, allowing, for example, diagnosing variables. These variables are used in laboratories that work
the car via mobile devices which assume the tasks that are with the consumption of fuel and gas emissions. Other authors,
typically performed by the On Board Unit (OBU) of the like Andre [7] and Fomunung [8], increased the number of
vehicle, or sending the collected data to a platform where parameters, or replaced some of them in order to improve the
diagnosis and vehicle maintenance can be done, detecting obtained results. The problem of all the previous proposals is
possible failures automatically. that the environment in which the vehicle is circulating is not
Based on obtained data about the speed, acceleration, and considered, despite it has a very significant influence on the
revolutions per minute of the engine, we have implemented our energy consumption.
DrivingStyles platform, which is based on neural networks and Regarding other works related to the proposal discussed in
permits characterizing the driving style of each user, as well as this paper, it is worth highlighting the work by Chen et al.
'"
I
Figure 1: DrivingStyles: architecture overview.
[9], who proposed an Android/OSGi vehicular platform able information such as speed, acceleration, engine revo
to diagnose and manage the status of a vehicle remotely, using lutions per minute, throttle position, and the vehicle's
visual intelligence to continuously update their application geographic position. After gathering this information in
services based on context, and without user intervention. real time, the user uploads the route data to the remote
Focusing on road safety, systems such as e-NOTIFY [10] data center for analysis.
allow a fast detection of traffic accidents, improving the 2) A data center with a web interface able to collect large
assistance to injured passengers by reducing the response data sets sent by different users concurrently, and to
time of emergency services. The proposed system requires graphically display a summary of the most relevant
installing OBUs on board vehicles that are in charge of results. Our solution is based on open source software
detecting accidents, as well as notifying them to external tools such as Apache, PHP and Joomla.
control units (CU); the latter estimates the severity of the 3) A neural network, which must be designed and trained
accident and automatically informs the emergency services. using the most representative route traces in order to cor
Zaldivar et al. [11] propose an Android-based application that rectly identify, for each path segment, the driving style
monitors the vehicle through the On Board Diagnostics (OBD of the user, as well as identify the segment profile: urban,
II) interface, being able to detect accidents and sending details suburban or highway. To implement our neural network
about the accident to pre-defined destinations through either we adopted the backpropagation algorithm [16], which
e-mail or SMS; these tasks are immediately followed by an has been proven to provide good results in classification
automatic phone call to the emergency services. problems such as the one associated to this project.
Our solution differs from the former ones by providing an 4) Integration of the neural networks in the data center
analysis of the driving style of each user based on neural net platform. The goal is to dynamically and automatically
work techniques in the scope of urban, suburban, or highway analyze user data, allowing users to find out their profiles
scenarios, helping to promote a more responsible and eco as a driver, thus promoting a less aggressive and more
driving behavior. ecological driving.
III. DRIV INOSTYLES ARCHITECTURE Figure 1 illustrates the steps followed by users of the Driv
The proposed architecture applies data mining techniques ingStyles platform to assess their driving styles. The first step
to generate a classification of the driving styles of users based is registering the user at http://www.drivingstyles.info. and
on the analysis of their mobility traces. Such classification is downloading the free Android application.
generated taking into consideration the characteristics of each After installing the Android application in the smartphone,
route, such as whether it is urban, suburban or highway. and after connecting to the bluetooth ELM327 [2] interface
To achieve the overall objective, the system is structured inside the car (this connector is mandatory on all vehicles
around the following four elements, see Figure 1: since 2001), the data acquisition process can start. Once the
1) An application for Android based smartphones. Using route is completed and stored, the user can send it to the server,
an OBD-II Bluetooth interface, the application collects which checks the username and password before accepting the
A. Configuration options
- , ,
(ECU), the mobile's accelerometer, and the GPS. The second main component of our architecture corresponds
• List the routes captured by the app. to the data center and its web interface. For this endeavor we
• Show the current position of the vehicle on the map, as have selected open source software such as Apache HTTP, and
well as the detailed route followed whenever an Internet Joomla as the content management system (CMS). The URL
connection is available. of this module is http://www.drivingstyles.info.
- �"'
N 10
Q)
0 332 +".q;,e;z;.§iln
�
v-.:l
• •
�
5
noON!� 332
ol!;
rpm
��
!:
035"��:--:=31nOName 0
332
�/ 32
200 4 0 600 800 1000
Learning cycles
I 200 I 400 1 600 1800 2.00
•
=
! • om 10
0074 0003 052 If
(a) Convergence when training the road type with 2000 cycles.
O !i �
� ::: '" noName
' �6m '" '" 100
'"
c
=>
c
------- Rate 0.2
80·
------- Rate 0.4
�� �
:::�
N 60 ------- Rate 0.6
052 Q)
v-.:l40
noName -
·1 ·10
0..52
(a) Trained neural network. 500 1.000 1.500 2.000 2.500 3�00 3.500 4.000 4.500 5,005
Learning cycles
10 (b) Convergence when training the driving style with 5000 cycles.
of patterns, and the sum corresponds to the sum of absolute C. Obtained results
errors for all patterns. With the neural network already implemented, every time
We started training the neural network by adjusting the a route or route segment is selected, the system automatically
learning rate to 0.2 and observing how the error affects our returns the type of road, and the associated driving style.
neural network. The higher the learning rate, the higher the The overall behavior of each user can also be obtained by
modification of the weights for each iteration, so the learning evaluating all the routes sent by the user.
process becomes faster. However, this can cause unwanted The results obtained from a real set of data can be seen
oscillations in the network. The convergence results of the in Figure 6. Figure 6a graphically shows the result returned
two neural networks are the following: by our neural network when determining the route type. The
1) Road type characterization: By iterating with a learning abscissa axis corresponds to the timeline, and the vertical axis
rate of 0.2, we see how the learning process slows down to the degree of matching for the dominant route type. We can
for a local minimum MSE with an error of 0.02l. The see that, in this example, the user starts and ends in an urban
network starts converging quickly again beyond 300 environment, going through a suburban route in between; such
cycles, as shown is the mean square error shown in results represent an accurate classification of the actual route
Figure Sa. followed by the driver. Figure 6b refers to the neural network
2) Driving style characterization: This characterization is results that determine the behavior on that route; as in the
more complex than the road type, and no local minimum previous graph, the abscissa axis corresponds to the temporal
is reached as quickly as in the previous case; also, the line, and the ordinate axis is a behavior correlation percentage,
error of the neural network is much higher (see Figure where each color identifies a different type of driver behavior.
5b). At the end of these tests we chose to use the We can observe that most of the time the driver is showing
trained neural network with a learning rate of 0.4, which an aggressive behavior, which alternates with periods of quiet
"
"
" As future work we plan to monitor the fuel consumption
"
"
" in order to correlate it with the driver aggressiveness, thereby
,o
�o�, �
,�,��
. , �
,�,�,
� , ��
"
"U,�
, �
"�,,� U,�
,, , �
,, �
,,� L,�
,, o �
,, �
,,��,U
" . �
"� �
,, ,� U
, , ,�
,,��
,, ,�
" �
,�,,��
,. ,,
making the driver more aware of their bad habits while driving.
(a) Route type. We are also extending the platform to provide traffic recom
mendations based on real-time feedback about the congestion
Speed Car acc eieromeler Mobil acceieromeler Rpm Thrortle AKA route Iype RIIA raUle behavior
on different routes.
RNA DrivingStytes, route FordFiesta2 FordFiesta2(40years)
ACKNOWLEDGMENT S
Figure 6: Snapshots of route type and behavior. [I] International Organization for Standardization, ": Road vehicles, Diag
nostic systems, Keyword Protocol 2000", 1999.
[2] ELM327DS. OBD to RS232 Interpreter. Elm Electronics - Circuits for
the Hobbyist.
behavior. When analyzing the actual route with the driver, we [3] Co Eco-Driving: Pilot Evaluation of Driving Behavior Changes among
find that periods of quiet behavior were associated with slow U.S. Drivers.
[4] Erikcsson, E., "Independent driving pattern factors and their influence
transit areas where vehicle queueing and semaphores impeded on fuel-use and exhaust emission factors" Transportation Research Part
a more aggressive driving style. D: Transport, Vol. 6(5), pp. 325-345, 200I.
Overall, and after analyzing a wide set of routes with [5] Johansson, H., Gustafsson, P., Henke, M., Rosengren, M., "Impact
of EcoDriving on emissions". International Scientific Symposium on
different drivers, the system has shown to provide a correct
Transport and Air Pollution, Avignon, France, 2003.
classification of the different route traces registered in the [6] Kuhler, M., Kartens, D., "Improved driving cycle for testing automotive
database, both in terms of route types and driving styles, exhaust emissions". SAE Technical Paper Series 780650, 1978.
[7] Andre, M., "Driving cycles development: Characterization of the meth
validating the proposed solution. In particular, we achieve a
ods". SAE Technical Papers Series 961112, 1996.
degree of accuracy of 98% when attempting to characterize [8] Fomunung, I., Washington, S., Guensler, R. "A statistical model for esti
road types, and a degree of accuracy of 77% when attempting mating oxides emissions from light duty motor vehicles". Transportation
to characterize the driving style of users. These values are Research Part D, pp.333-352, 1999.
[9] Chen, M.-C, Chen, J.-L., and Chang, T.-W., "Android/OSGi-based
easily explained since the latter process is more ambiguous vehicular network management system," Elsevier Computer Commu
than the fonner. nications, vol. 34, no. 2, pp. 169 - 183, 201I.
[10] Fogue, M., Garrido, P., Martinez, FJ., Cano, 1., Calafate, c.T., Manzoni,
VII. CONCLUSIONS AND FUTURE WORK P., "Automatic Accident Detection: Assistance Through Communication
Technologies and Vehicles", Vehicular Technology Magazine, IEEE,
In this paper we presented the DrivingStyles platform, Sept. 2012.
which integrates mobile devices with data obtained from the [II] Zaldivar, J., Calafate, c.T., Cano, J.C., Manzoni, P., "Providing accident
Electronic Control Unit (ECU) to determine the type of road detection in vehicular networks through OBD-II devices and Android
based smartphones", Local Computer Networks (LCN), IEEE 36th
where the driver is circulating, as well as his driving habits. Its Conference, 4-7 Oct. 20II.
main goal is to help promoting a safer and more ecological [12] Fischer, I., Hennecke, F., Bannes, C., Zell, A., "JavaNNS: Java Neural
driving style by making drivers more conscious about their Network Simulator", User Manual, Version 1.1.
[13] Haykin, S., "Neural Networks: A Comprehensive Foundation (2nd ed.)",
behavior on the road. Our platfonn offers helpful tips to Prentice Hall PTR, Upper Saddle River, NJ, USA, 1998.
reduce fuel consumption with the consequent impact on the [14] Anand, R.; Mehrotra, K.; Mohan, C.K.; Ranka, S., "Efficient classifi
environment. We implemented this platfonn using real devices, cation for multiclass problems using modular neural networks," Neural
Networks, IEEE Transactions on, vol.6, no.l, pp.117-124, Jan 1995
and the results we obtained based on real user traces are quite
[15] hltp:llwww-ra.informatik.uni-tuebingen.de/SNNSI
encouraging, showing that the classification of both routes and [16] Hecht-Nielsen, R., "Theory of the backpropagation neural network,"
driving styles using neural networks presents a high correlation Neural Networks, IJCNN., International Joint Conference on, pp.593-
605 vol.I, 1989.
with the actual routes and driver behavior.