Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2018 Mar 29;18(4):1036.
doi: 10.3390/s18041036.

Vehicle Mode and Driving Activity Detection Based on Analyzing Sensor Data of Smartphones

Affiliations

Vehicle Mode and Driving Activity Detection Based on Analyzing Sensor Data of Smartphones

Dang-Nhac Lu et al. Sensors (Basel). .

Abstract

In this paper, we present a flexible combined system, namely the Vehicle mode-driving Activity Detection System (VADS), that is capable of detecting either the current vehicle mode or the current driving activity of travelers. Our proposed system is designed to be lightweight in computation and very fast in response to the changes of travelers' vehicle modes or driving events. The vehicle mode detection module is responsible for recognizing both motorized vehicles, such as cars, buses, and motorbikes, and non-motorized ones, for instance, walking, and bikes. It relies only on accelerometer data in order to minimize the energy consumption of smartphones. By contrast, the driving activity detection module uses the data collected from the accelerometer, gyroscope, and magnetometer of a smartphone to detect various driving activities, i.e., stopping, going straight, turning left, and turning right. Furthermore, we propose a method to compute the optimized data window size and the optimized overlapping ratio for each vehicle mode and each driving event from the training datasets. The experimental results show that this strategy significantly increases the overall prediction accuracy. Additionally, numerous experiments are carried out to compare the impact of different feature sets (time domain features, frequency domain features, Hjorth features) as well as the impact of various classification algorithms (Random Forest, Naïve Bayes, Decision tree J48, K Nearest Neighbor, Support Vector Machine) contributing to the prediction accuracy. Our system achieves an average accuracy of 98.33% in detecting the vehicle modes and an average accuracy of 98.95% in recognizing the driving events of motorcyclists when using the Random Forest classifier and a feature set containing time domain features, frequency domain features, and Hjorth features. Moreover, on a public dataset of HTC company in New Taipei, Taiwan, our framework obtains the overall accuracy of 97.33% that is considerably higher than that of the state-of the art.

Keywords: driving event; motorbike assistance; optimized overlapping ratio; optimized window size; smartphone sensor; vehicle mode.

PubMed Disclaimer

Conflict of interest statement

The authors declare no conflict of interest.

Figures

Figure 1
Figure 1
The Vehicle mode-driving Activities Detection System (VADS).
Figure 2
Figure 2
The framework of the Vehicle Detection Module (VDM).
Figure 3
Figure 3
The framework of the Activity Detection Module (ADM).
Figure 4
Figure 4
(a) The orientation of a smartphone given by (X, Y, Z) coordinate system. (b) The orientation of a vehicle given by (X’, Y’, Z’) coordinate system.
Figure 5
Figure 5
Each data window consists of N signal values. Two consecutive data windows overlap each other by an overlapping ratio of 50%.
Figure 6
Figure 6
The performance of VDM on different classifiers, and different feature sets with the window size of 5 s at 50% overlapping based on the metric: (a) Accuracy; (b) AUC.
Figure 7
Figure 7
Effect of window size on the vehicle mode detection system performance with different amount of overlapping based on the metric: (a) Accuracy; (b) AUC.
Figure 8
Figure 8
Variation of AUC difference between two consecutive window sizes at different overlapping ratios for different vehicle detection: (a) Car; (b) Motorbike; (c) Bus; (d) Walking (Non-vehicle).
Figure 9
Figure 9
Performance of VDM with the optimized parameters: (a) Accuracy; (b) AUC.
Figure 10
Figure 10
The activity mode detection system performance of classifiers using different feature sets with the window size of 5 s at 50% overlapping based on the metric: (a) Accuracy; (b) AUC.
Figure 11
Figure 11
The activity mode detection system performance of different classifiers using raw and transformed data with the window size of 5 s at 50% overlapping on TFH2 feature set based on the metric: (a) Accuracy; (b) AUC.
Figure 12
Figure 12
The performance result (AUC) of detecting the activity Stopping with respect to window size and overlapping ratio.
Figure 13
Figure 13
The performance result (AUC) of detecting the activity Going with respect to window size and overlapping ratio.
Figure 14
Figure 14
The performance result (AUC) of detecting the activity Turning left with respect to window size and overlapping ratio.
Figure 15
Figure 15
The performance result (AUC) of detecting the activity Turning right with respect to window size and overlapping ratio.
Figure 16
Figure 16
Variation of AUC difference between two consecutive window sizes at different overlapping ratios for activity mode detection: (a) Stop; (b) Going straight; (c) turning Left; (d) turning Right.
Figure 17
Figure 17
Performance of activity mode detection system with the optimized parameters using different classifiers based on the metric: (a) Accuracy; (b) AUC.

References

    1. World Health Organization Global Status Report on Road Safety. [(accessed on 9 January 2017)];2015 Available online: http://www.who.int/violence_injury_prevention/road_safety_status/2015/en/
    1. Bedogni L., Di Felice M., Bononi L. By train or by car? Detecting the user’s motion type through smartphone sensors data; Proceedings of the 2012 IFIP Wireless Days; Dublin, Ireland. 21–23 November 2012; pp. 1–6.
    1. Hemminki S., Nurmi P., Tarkoma S. Accelerometer-based transportation mode detection on smartphones; Proceedings of the SenSys ’13, 11th ACM Conference on Embedded Networked Sensor Systems; Roma, Italy. 11–15 November 2013.
    1. Widhalm P., Nitsche P., Brändie N. Transport mode detection with realistic smartphone sensor data; Proceedings of the 21st International Conference on Pattern Recognition (ICPR); Tsukuba, Japan. 11–15 November 2012; pp. 573–576.
    1. Shafique M.A., Hato E. Travel Mode Detection with Varying Smartphone Data Collection Frequencies. Sensors. 2016;16:716. doi: 10.3390/s16050716. - DOI - PMC - PubMed