| Literature DB >> 29596397 |
Dang-Nhac Lu1,2, Duc-Nhan Nguyen3, Thi-Hau Nguyen4, Ha-Nam Nguyen5.
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.Entities:
Keywords: driving event; motorbike assistance; optimized overlapping ratio; optimized window size; smartphone sensor; vehicle mode
Year: 2018 PMID: 29596397 PMCID: PMC5948751 DOI: 10.3390/s18041036
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Summary of recent researches on vehicle mode detection.
| Studies | Modes | Smartphone Data | Algorithm | Features | Window Size | Prediction Accuracy |
|---|---|---|---|---|---|---|
| Bedogni et al. [ | walk, car, train | gyroscope, accelerometer | RF, SVM, NB | time-domain | 10 s | Accuracy: 97.71% |
| Hemminki et al. [ | stationary, bus, train, metro, tram, car | accelerometer | HMM | time-domain, frequency-domain, peak-based, segmented-based | 1.2 s | Precision: 84.9% |
| Widhalm et al. [ | bus, car, bike, tram, train, subway, walk, motorcycle | gps, accelerometer | HMM | time-domain, frequency-domain | ≤2 min | Precision: 76.38% |
| Shafique and Hato [ | walk, bike, bus, car, train, subway | gyroscope, accelerometer | RF | time-domain | 10 min | Accuracy: 99.96% |
| Fang et al. [ | high speed rail (HSR), metro, bus, car, train | accelerometer, magnetometer, gyroscope | KNN, DT, SVM | time-domain | 17.06 s | Accuracy: 83.57% |
| Xiao et al. [ | walk, bike, bus, car, train, subway | gps | KNN, DT, SVM, RF, Gradient boosting decision tree, XGboost | global/local | - | Accuracy: 90.77% |
| Guvensan et al. [ | stationary, walk, bus, car, tram, metro, train, ferry | accelerometer, magnetometer, gyroscope | RF, KNN, J48, NB, Healing | time-domain | 60 s | Precision: 94.95% |
Summary of recent researches on driving event detection.
| Studies | Driving Events | Smartphone Data | Methods | Features | Coordinate Reorientation | Prediction Accuracy |
|---|---|---|---|---|---|---|
| Johnson and Trivedi [ | normal/abnormal driving events (left/right turn, u-turn, left/right swerving) | accelerometer, gyroscope, magnetometer, gps, video | DTW | x,y,z-acceleration, gyroscope, Euler angle rotation | smartphones are fixed | TP: 91% |
| Castignani et al. [ | hard acceleration, hard braking, over speeding, aggressive steering | accelerometer, magnetometer, gravity, gps | fuzzy logic | the time derivative (jerk) of the acceleration magnitude, speed variation, bearing variation, the average yaw rate, the jerk standard deviation | Yes | TP > 90% |
| Ma et al. [ | speeding, irregular driving direction change, abnormal speed control | accelerometer, gyroscope, gps, microphone | threshold detection | computing speed from gps and y-acceleration, detecting direction change based on z-gyroscope, and turn signal based on audio signal | Yes | Precision: 93.95% |
| Li et al. [ | abnormal speed changing, steering, weaving, operating smartphone during driving | accelerometer, gyroscope | threshold detection | yaw angle | Yes | TP > 90% |
| Yu et al. [ | weaving, swerving, sideslipping, fast u-turn, turning with a wide radius, sudden braking | accelerometer, orientation sensor | SVM, NN | 152 time-domain features | Yes | Accuracy: 96.88% |
| Júnior et al. [ | aggressive braking, aggressive acceleration, aggressive left/right turn, aggressive left/right lane changing, non-aggressive events | accelerometer, magnetometer, gyroscope, linear acceleration | ANN, SVM, RF, BN | Time-domain: mean, median, standard deviation, increase/decrease tendency | smartphones are fixed | AUC: 0.980–0.999 |
TP—True Positive, AUC—Area Under the Curve.
Figure 1The Vehicle mode-driving Activities Detection System (VADS).
Figure 2The framework of the Vehicle Detection Module (VDM).
Figure 3The framework of the Activity Detection Module (ADM).
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 5Each data window consists of N signal values. Two consecutive data windows overlap each other by an overlapping ratio of 50%.
Feature lists used in the proposed VADS.
| Type | Features | Definition | Applied Components |
|---|---|---|---|
| Statistic |
| Mean | |
| Time domain |
| Variance | |
|
| Standard deviation | ||
| Diff = max( | Difference | ||
| R | Cross correlation | ||
| ZC | Zero crossings | ||
| PAR | Peak to average ratio | ||
| SMA | Signal magnitude area | ||
| SVM | Signal vector magnitude |
| |
| DSVM | Differential signal vector magnitude |
| |
| I | Integration | ||
| Hjorth parameters | A | Activity | |
| M | Mobility | ||
| C | Complexity | ||
| Frequency domain | EFFT | Energy | |
| En | Entropy |
Sets of features.
| Domains | Set of Features | Number of Features | Applied Module |
|---|---|---|---|
| Time (T) | T1 | 20 | VDM |
| Frequency (F) | F1 | 04 | VDM |
| Hjorth (H) | H1 | 03 | VDM |
| T + F | TF1 | 24 | VDM |
| T + H | TH1 | 23 | VDM |
| T + F + H | TFH1 | 27 | VDM |
| Time | T2 | 34 | ADM |
| Frequency | F2 | 07 | ADM |
| Hjorth | H2 | 18 | ADM |
| T + F | TF2 | 41 | ADM |
| T + H | TH2 | 52 | ADM |
| T + F + H | TFH2 | 59 | ADM |
Datasets for VDM.
| Vehicle Mode | Number of Subjects | Total Recording Time | Positions of Smartphone |
|---|---|---|---|
| Car | 3 | 400 min | In hand, in pockets, in box |
| Bike | 2 | 300 min | In hand, in pockets |
| Motorbike | 3 | 500 min | In hand, in pockets, in bag |
| Bus | 4 | 500 min | In hand, in pockets, in bag |
| Walking | 4 | 200 min | In hand, in pockets |
Figure 6The 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.
The performance of VDM in terms of accuracy on different classifiers and different feature sets with the window size of 5 s at 50% overlapping.
| RF | J48 | NB | KNN | SVM | |
|---|---|---|---|---|---|
| 39.41% | 41.43% | 40.07% | 38.03% | 37.13% | |
| 85.04% | 81.36% | 54.66% | 84.09% | 26.54% | |
| 94.76% | 93.08% | 82.09% | 84.33% | 69.64% | |
| 95.47% | 93.65% | 82.56% | 85.01% | 78.97% | |
| 94.64% | 91.10% | 60.64% | 78.39% | 27.73% | |
| 95.60% | 93.82% | 82.67% | 82.38% | 81.25% |
Figure 7Effect of window size on the vehicle mode detection system performance with different amount of overlapping based on the metric: (a) Accuracy; (b) AUC.
Figure 8Variation 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).
Optimized parameters of VDM.
| Car | Bike | Motorbike | Walking | Bus | |
|---|---|---|---|---|---|
| 5 | 6 | 6 | 6 | 6 | |
| 75% | 75% | 75% | 75% | 75% | |
| 0.9998646 | 0.9989851 | 0.9990746 | 0.9994278 | 0.9984576 |
Confusion matrix with the optimized parameters.
| a | b | c | d | e | Class |
|---|---|---|---|---|---|
| 5334 | 0 | 0 | 0 | 0 | a = Car |
| 1 | 1979 | 24 | 15 | 24 | b = Bike |
| 2 | 17 | 2924 | 10 | 32 | c = Motorbike |
| 2 | 11 | 9 | 1700 | 29 | d = Walking |
| 0 | 13 | 22 | 24 | 1890 | e = Bus |
Figure 9Performance of VDM with the optimized parameters: (a) Accuracy; (b) AUC.
Datasets for ADM.
| Activity Mode | Number of Subjects | Total Recording Time | Positions of Smartphone |
|---|---|---|---|
| Stopping (ST) | 3 | 10 min | In hand |
| Going Straight (GS) | 2 | 20 min | In hand, in pockets |
| Turning Left (TL) | 3 | 30 min | In hand |
| Turning Right (TR) | 3 | 10 min | In hand |
Figure 10The 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.
The performance of ADM using different feature sets with the window size of 5 s at 50% overlapping.
| Random Forest | J48 | Naïve Bayes | KNN | SVM | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ACC | AUC | ACC | AUC | ACC | AUC | ACC | AUC | ACC | AUC | |
| H1 | 56.46% | 0.6986 | 58.33% | 0.6854 | 58.33% | 0.6635 | 56.04% | 0.6243 | 57.07% | 0.6126 |
| H2 | 82.39% | 0.9531 | 65.57% | 0.8881 | 65.57% | 0.8326 | 66.89% | 0.8153 | 65.41% | 0.7273 |
| F1 | 81.60% | 0.9490 | 77.84% | 0.8720 | 62.80% | 0.8330 | 81.13% | 0.8520 | 50.79% | 0.625 |
| F2 | 82.85% | 0.9530 | 79.16% | 0.8690 | 54.29% | 0.7970 | 75.99% | 0.8120 | 51.12% | 0.6551 |
| T1 | 87.93% | 0.9706 | 71.99% | 0.9182 | 71.99% | 0.8756 | 75.69% | 0.8860 | 72.28% | 0.7643 |
| T2 | 88.79% | 0.9730 | 69.90% | 0.9213 | 69.90% | 0.8546 | 73.91% | 0.8596 | 70.86% | 0.7506 |
| TH1 | 87.80% | 0.974 | 83.84% | 0.8730 | 46.77% | 0.8360 | 76.32% | 0.8210 | 71.64% | 0.7550 |
| TH2 | 88.39% | 0.975 | 82.06% | 0.8620 | 38.19% | 0.8440 | 78.56% | 0.8400 | 76.45% | 0.8090 |
| TF1 | 88.39% | 0.9727 | 74.52% | 0.9303 | 74.52% | 0.8869 | 77.34% | 0.8914 | 73.60% | 0.7683 |
| TF2 | 88.85% | 0.9752 | 70.60% | 0.9134 | 70.60% | 0.8462 | 74.08% | 0.8481 | 70.99% | 0.7384 |
| TFH1 | 87.80% | 0.9733 | 74.25% | 0.9278 | 74.25% | 0.8874 | 74.87% | 0.8738 | 71.62% | 0.7577 |
| TFH2 | 88.32% | 0.9768 | 70.36% | 0.9104 | 70.36% | 0.8479 | 72.39% | 0.8406 | 69.64% | 0.7384 |
Figure 11The 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.
The result between Raw data and Orientated data using TFH2 feature set with the window size of 5 s at 50% overlapping.
| Random Forest | J48 | Naïve Bayes | KNN | SVM | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| AUC | ACC | AUC | ACC | AUC | ACC | AUC | ACC | AUC | ACC | |
| 0.97676483 | 88.32% | 0.910449 | 85.55% | 0.847943 | 70.36% | 0.840576 | 72.39% | 0.738373 | 69.64% | |
| 0.9854096 | 90.97% | 0.959214 | 89.94% | 0.944504 | 86.05% | 0.937778 | 86.40% | 0.813128 | 74.87% | |
Figure 12The performance result (AUC) of detecting the activity Stopping with respect to window size and overlapping ratio.
Figure 13The performance result (AUC) of detecting the activity Going with respect to window size and overlapping ratio.
Figure 14The performance result (AUC) of detecting the activity Turning left with respect to window size and overlapping ratio.
Figure 15The performance result (AUC) of detecting the activity Turning right with respect to window size and overlapping ratio.
Figure 16Variation 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.
The optimized parameters of ADM.
| S | G | L | R | |
|---|---|---|---|---|
| 4 | 6 | 5 | 6 | |
| 75% | 75% | 50% | 50% | |
| 0.99942150231399 | 0.992827782904118 | 0.996841188906852 | 0.987251082251082 |
Figure 17Performance of activity mode detection system with the optimized parameters using different classifiers based on the metric: (a) Accuracy; (b) AUC.
The prediction accuracy of the proposed method and the previous studies on the dataset of HTC company [46]. The notion “-” indicates that data is not provided.
| Overall Prediction Accuracy | Computational Cost (μs) | Model Size (KB) | |
|---|---|---|---|
| Fang et al. [ | 83.57% | 9550 | 106,300 |
| Guvensan et al. [ | 91.63% | - | - |
| Our proposed method (using RF) | 97.33% | 4.9 | 187 |