• 沒有找到結果。

Predict scooter’s stopping event using smartphone as the sensing device

N/A
N/A
Protected

Academic year: 2022

Share "Predict scooter’s stopping event using smartphone as the sensing device"

Copied!
7
0
0

加載中.... (立即查看全文)

全文

(1)

Predict scooter’s stopping event using smartphone as the sensing device

Chih-Hung Hsieh

Intel-NTU Connected Context Computing Center National Taiwan University

Taipei, Taiwan hsiehch@gmail.com

Hsin-Mu Tsai

Department of Computer Science and Information Engineering

National Taiwan University Taipei, Taiwan hsinmu@csie.ntu.edu.tw

Shao-Wen Yang

Intel-NTU Connected Context Computing Center Intel Labs, Intel Corporation

Taipei, Taiwan shao-wen.yang@intel.com

Shou-De Lin*

Department of Computer Science and Information Engineering

National Taiwan University Taipei, Taiwan sdlin@csie.ntu.edu.tw

*: corresponding author

Abstract—Researches show that most of deadly crashes involve one or more unsafe driving behaviors typically associated with careless driving. Many researchers try to develop intelligent transportation system (ITS) or machine learning model to detect these potential risks, to make alert, and to prevent driver from traffic accident. For example, intentionally or carelessly inappropriate stopping or not stopping a vehicle may cause traffic violation or vehicle accident. However, to the best of our knowledge so far, there exist no research of ITS dedicated to collecting scooter’s driving profile and improving driving safety of scooter rider, given the fact of that riding scooter is one of the most important transportation means in Taiwan - every 1.56 persons in Taiwan own a scooter. In this work, taking advantages of machine learning technique, we propose a model to predict whether scooter is going to stop or not, by collecting data of various sensors using smartphone, a popular and relative cheap device, set on the handler of scooter. Experiments shows that by carefully concerning the characteristics and tendencies differ from drivers to drivers, from locations to locations, our model can detect stop event of scooter with at most 90% accuracy, such that it can provide significant information to prevent traffic violation, ex: red- light running, or car accident.

Keywords- intelligent transportation system, machine learning, classification, driving behavior prediction.

I. INTRODUCTION

As the techniques of computer aiding keep improved, transportation system plays more and more important role on user’s life. It helps not only saving fuel consumption, but also collecting other information for further research topics [1-5]. In 2009, a study reported by the American Automobile Association (AAA) Foundation for Traffic Safety shows that there are 56% of deadly crashes between 2003 and 2007 involve one or more unsafe driving behaviors typically

associated with aggressive driving [6]. Therefore, in the past few years, researchers have spent lots of money and human efforts to study how to improve the quality of driving and to avoid traffic accidents caused by improper driving behavior with the aid from computers [7-11]. Most of important, transportation system detects dangerous events, sends alerts to drivers, and prevents drivers from potentially traffic accidents. There are several companies [9-11] offer products for vehicle management and individual use in order to monitor driving behavior. And government also worked on collecting lots of driving data and reported the resultant statistical analysis. Most of them using expensive cameras and equipment that it is unlikely applied to large scale in the future. Therefore, in recently years, researchers try to use relatively cheap and popular equipment, such as smartphone, as the monitoring device [7].

Due to its higher fuel efficiency, lower sale price, and better ability to move through heavy traffic jams in the urban area, compared to a regular passenger car, scooters are one of the most important transportation means in Taiwan. Out of 22 million registered vehicles in Taiwan, scooters account for 67.2% of the vehicles – every 1.56 persons in Taiwan own a scooter. However, also due to its lower sale price, which results in less safety features incorporated in it, and its higher mobility, which increases the probability of a collision with other vehicles, scooters have contributed to more than 80% of deaths in traffic accidents in Taiwan, causing more than 2,000 fatalities annually in the past decade [12].

The behaviors of the scooters are significantly different from the behaviors of cars, due to its smaller dimensions and that it has one more degree of freedom in its movement - the lean angle of its body, i.e., roll angle. Although there have been many efforts in collecting driving behavior data for cars.

And, in previous studies, to the best of our knowledge so far, 2014 IEEE International Conference on Internet of Things (iThings 2014), Green Computing and Communications (GreenCom

2014), and Cyber-Physical-Social Computing (CPSCom 2014)

2014 IEEE International Conference on Internet of Things (iThings 2014), Green Computing and Communications (GreenCom 2014), and Cyber-Physical-Social Computing (CPSCom 2014)

(2)

there exist no research of intelligent transportation system (ITS) dedicated to collecting scooter’s driving profile and improving driving safety of scooter rider [7-11, 13]. Besides, the most existed research collect data from vehicles with advanced equipment, such as radar sensor or infrastructure of road side unit, costs too much to be deployed in large scale in the future [8, 13]. Considering that a regular scooter usually costs around 2,000 U.S. dollars, about one tenth of that of a regular passenger car, it is therefore crucial to develop a safety system that can help to improve the safety of the scooters on the road, while the solution needs to be able to be implemented within the sale price.

Our work is involved in an integrated ITS project about connected vehicle safety, which was started from 2013, and supported in part by National Science Council, National Taiwan University, and Intel Corporation. The integrated project aims to develop a proactive driver assistance system consisting three main parts: 1) driver behavior modeling and prediction, 2) M2M-based neighbor map building, where neighbor map mentions the locations of all neighboring vehicles, and 3) design of passive information visualization and proactive warning mechanism [12]. In this work, we want to focus on analyzing whether it is possible for machine learning model to predict scooter going to stop or not and to alert in advance using heterogeneous sensor data collected from 100 scooter riders. The reason we focus on the event of scooter stopping is that intentionally or carelessly inappropriate stopping or not stopping a vehicle may cause traffic violation or vehicle accident, for example: red-light running.

In the following sections, we will introduce how we collect heterogeneous data (GPS, accelerometer, gyroscopes, and etc.) from 100 scooter rider estimated by smart phone, a relatively cheap and popular device, setup on the scooter, and how we build the proposed stopping event detection model based on the driving profiles. Performance of

trajectory profiles of users will also be evaluated and discussed.

II. DATA COLLECTION

As mentioned in Introduction, in order to provide a practical solution of improving driving safety while riding scooter, the resulted ITS system needs to be implemented within the sale price. One possible solution is to utilize a mobile device, such as a smartphone, to implement some of these safety features. As the market penetration rate of smartphones grows to be over the 50% mark globally, they are owned by the majority of the drivers and thus, when the safety features are implemented on the smartphone, it does not increase the cost of the vehicle. In addition, smartphones have many built-in sensors that can be used to observe the driving behavior of the scooter drivers and the surrounding vehicles; these sensors include gyroscopes, accelerometers, cameras, GPS, etc. If behavior models can be established and used to predict hazardous behaviors in advance with the collected smartphone sensor data, then advance warning can be provided to the driver of that vehicle, or, via some forms of communications, to the driver of a neighboring vehicle.

To obtain the necessary data for developing various scooter driver behavior model, in June to September 2013, we have conducted a large-scale data collection event, in which 100 scooter drivers are hired to collect sensor data during their daily use of scooters, using an app that we developed that is executed on their own Android smartphone. Before the event, we have also distributed phone mounts to all participants, so that their smartphones can be placed on the handlebar of the scooters and the back camera of the smartphones can be used to capture video of the surrounding environment of the scooters. The app functions as a video event data recorder for the user, but in addition to recording the video and the audio, it also collects

TABLE I. DESCRIPTION OF THE COLLECTED SENSOR TYPES

Sensor Frequency Description

Video Camera 30 fps Video that is split into 10-min segments. The resolution of the video depends on the phone model, and is one of the following four: 1920x1080, 640x480, 320x240, or 176x144. The video uses H.264/Advanced Video Coding (AVC).

Microphone The recorded audio is recorded as part of the video file, using the Adaptive Multi-Rate (AMR) coding.

GPS 1 Hz Longitude, latitude, velocity, and bearing of the smartphone (vehicle) are logged.

Accelerometer 10 - 30 Hz, depending on the phone

model Measures the acceleration force in m/s that is applied to the device on all three physical axes (x, y, and z), including the force of gravity.

Linear

accelerometer 10 - 30 Hz, depending on the phone

model Measures the acceleration force in m/s that is applied to the device on all three physical axes (x, y, and z), excluding the force of gravity.

Gyroscope 10 - 30 Hz, depending on the phone

model Measures the device’s rate of rotation in rad/s around each of the three physical axes (x, y, and z).

Magnetic field 10 - 30 Hz, depending on the phone

model Measures the ambient geomagnetic field for all three physical axes (x, y, z) in Orientation 10 - 30 Hz, depending on the phone T.

model Measures degrees of rotation that the device makes around all three physical axes (x, y, z)

(3)

of sensors that we used in the smartphone for data collection and their description. Note that some of the listed sensors are virtual sensors, whose data is calculated with the raw data collected by other sensors. Data collected by the smartphones is uploaded to a back-end server via cellular data connections or WiFi connections in real-time. Fig. 1 shows two screenshots of the data collection Android app.

(a) The data collection screen

(b) The file upload screen

Fig. 1. The screenshots of the data collection Android app

Over the 3-month period, a large amount of data was collected. The following summarizes some statistics of the collected data: (1) 10,858 video files, with a total size of 473.8 GB, were collected. Most of the files are 10 minutes in length. (2) In total, we collected 28,273 kilometers of driving behavior data. Out of the 100 participants, 8 of them collected more than 1,000 kilometers of data, while 22 of them collected 100 - 1,000 kilometers of data. (3) The majority of the participants operate the vehicle in the urban area of Taipei city, while some of them operate the vehicle in other parts of Taiwan. Fig. 2 illustrates the whole flow of data collection. And Fig. 3 shows the footprints of the participants during the data collection event

Fig. 2. Flowchart for the data collection

Fig. 3. The footprints of the participating scooter drivers over the 3-month event duration

III. METHOD

To introduce the used feature and model building, we need to define Region of Interest (ROI) first. ROI is defined as the feature-extracting zone, in which the used features are generated. In this work, the length of ROI is set to 30-meter length. Considering the average speed of scooter on urban roads, we try to make prediction of stopping or not ahead of 15-meter length, such that it can provide about response time of one second in advance, and prevent rider from traffic violation or accident. It implies that ROI is from 15 to 45 meters ahead of the location where the event happens. Fig. 4 is an illustration showing the ROI when we try to predict whether a scooter will stop or not at an intersection.

(4)

Fig. 4 Illustration of region of interest (ROI) A. Feature Generation

In this work, the following four types of features are generated and used to build the model for predicting whether the scooter is going to stop or not.

a. Speed measured by GPS.

b. The difference between two subsequent values of GPS compass directions.

c. Acceleration along with driving direction.

d. Number of “speed valleys” in ROI region as an integer-valued feature, representing the number of times of stop-and-go motions.

To evaluate the effectiveness of feature “speed valleys”, we collect a dataset consisting of 104 samples (60 stop cases and 44 non-stop cases) crossing intersection of Heping Road across Fuxing Road. According to our t-test analysis on the values of “speed valleys” from two distributions, stop cases and non-stop ones, the resulted p-value is very small implying that the two distributions are significantly different.

Table II shows the corresponding t-test analysis.

TABLE II. T-TEST ANALYSIS ON NUMBER OF SPEED VALLEYS FROM DISTRIBUTIONS, STOP CASES AND NON-STOP ONES.

Data Mean Variance Number

Stop cases 2.517 2.695 60

Non-stop

cases 1.341 0.881 44

t-value = 4.264, p-value = 4.494 *10-5.

At the 0.05 level, the two means are significantly different.

Note that because the smartphone may not be set perpendicularly to the ground such that the direction of the estimated acceleration may not exactly along with the moving direction. To cope with this situation, for each time stamp of estimated acceleration, we exploit the corresponding estimated orientation to project and adjust the acceleration to the direction which scooter actually moving

on the scooter. Acceleration along with driving direction is equal to (acceleration on y-axis * cos !) – (acceleration on z- axis * sin !). Besides, for feature type a, b, and c, due to the different sampling rate, number of sampled values in the ROI may different sensor to sensor, that will resulted in sample vectors of various lengths and increase the difficulty of building a model. Therefore, to generate 30 values in ROI of 30-meter length, one for each meter, we apply simple interpolation method to those location where there are no sampling values lying. Fig. 6 is an illustration of how we generating the corresponding 30 feature values for feature type a, b, and c. The total number of used features for four types of features, a, b, c, and d, is 30 + 30 + 30 + 1 = 91. We concatenated the used 91 features as the input vector of the learnt model with the following order: 30 speed measurements by GPS, 30 difference between two subsequent values of GPS compass directions, 30 processed acceleration along with driving direction, and the number of valley.

Fig. 5 The Coordinates of smartphone set on the scooter.

Fig. 6 Illustration of applying interpolation to generate feature values.

B. Model building

In this work, the prediction model is built by LIBSVM [14], a well-known variant of support vector machine, with training vectors of 91 features and one label. The best of feature selection and parameter combination are decided according to the performance of 5-fold cross-validation on training dataset by the packages, easy.py and fselect.py, provided by LIBSVM. Note that before model training and independent test, values of each features are scaled to range of [-1, 1]

(5)

IV. EXPERIMENT RESULTS

Because intentionally or carelessly inappropriate stopping or not stopping a vehicle in anywhere may cause traffic violation or vehicle accident, for instance, red-light running happening on intersections, or vehicle crashing resulted from not noticing the braking by car in front of you.

Models for prediction stopping event are needed to work well not only at intersections but also during the whole trajectories, especially on an environment of connected vehicles (M2M environment).

A. Predict whether scooter stop or not when crossing the intersection

The first evaluation is focus on the performance when predicting whether scooter stop or not when crossing the intersections. We collect 689 driving cases crossing 14 intersections. Among this Datasetintersection of 689 driving cases, there are 532 non-stop cases and 157 stop cases. The used ROI region, [15m, 45m] ahead intersections, is adopted to generate features. Again, we left the range of 15 meters ahead from intersection not to be used for the reason that there will be response time of about one second for drivers to react in the real practice when they receiving alerts. Table III shows the number of samples from 14 different intersections.

Followings are the detail results about the performance of the proposed model:

• 5-Fold CV accuracy = 90.10%

• Training Accuracy = 95.06%

• Balanced Training Accuracy = 91.87%

• Sensitivity (TP/(TP+FN)) = Recall = 85.99%

• Specificity (TN/(TN+FP)) = 97.74%

• Precision (TP/(TP+FP)) = 91.84%

The 5-fold CV partitions Datasetintersection into 4/5 training part and 1/5 validation one, repeatedly. During model learning phase, only the 4/5 training part can be accessed to fine tune the learnt model, therefore the resulted 90.1%

accuracy and the relative low false alarm rate (false positive rate) of 2.26% also reveal the ability for our model to predict unseen testing samples, to some extent. Note that the reason for the recall rate is slightly low may resulted from the dataset unbalance (157 stop cases and 532 non-stop cases).

These results show that the proposed model and the used features are able to describes the significant difference between stop cases and non-stop ones, and make accurate prediction, 15 meters ahead of the intersections. If the scooter riders are going to be red-light runners, no matter they are intentionally or carelessly, our model can detect this event, provide response time about one second, and prevent traffic violations or accident. If the left range of 15 meter is increased, it can be inference that the performance will be decreased.

TABLE III. SAMPLES OF DATASETINTERSECTION COLLECTED FROM 14 INTERSECTIONS

Intersection #stop #non-stop #samples

Heping x Dunhua 34 80 114

Heping x Fuxing 34 81 115

Heping x Xinsheng 27 75 92

Xinyi x Guangfu 4 15 19

Xinyi x Dunhua 3 3 26

Xinyi x Fuxing 4 37 41

Xinyi x Xinsheng 10 36 46

Renai x Guangfu 2 12 14

Renai x Fuxing 4 35 39

Renai x Xinsheng 5 41 46

Zhongxiao x

Guangfu 9 13 22

Zhongxiao x Dunhua 3 27 30

Zhongxiao x Fuxing 14 35 49

Zhongxiao x

Xinsheng 4 32 36

Total 157 522 689

B. Predict whether scooter stop or not on the whole trajectories

The other experiment tries to evaluate the performance when applying our model to predicting the stop events on the whole trajectory. For this experiment, we generate a dataset, named as DatasetA, consisting of stop and non-stop cases from whole trajectories of a randomly selected user,

“100E9FBD28611217”. For DatasetA, we generate all the 1563 stop cases existing among the whole trajectories. For each instance of stop cases, we also select one negative instance happening at the position which is nearest to the position of the corresponding positive case. That results in 1563 stop cases and 1563 non-stop cases for DatasetA. To evaluate the independent test performance of our model, we randomly partition DatasetA into two subsets, TrainingA (782 positive cases and 782 negative cases) and TestingA (the all remaining samples).

First, we try to use model trained by Datasetintersection to predict the independent testing set, TestingA. Table IV lists the corresponding results. We can observed that although the model trained by data from intersections works well on the same environment, when applying to testing data from whole trajectories, the performances are poor, especially for the recall rate. It means that the characteristics of predicting scooter’s stopping may differ from locations to locations, and this prediction problem should concern the differences of various locality. Table IV also shows the performance when we apply another model which is also trained by data from whole trajectories. It can be observed that the numbers of accuracy, recall, and precision are all significantly improved to 92.13%, 87.32%, and 96.60% (showed by bold face).

(6)

TABLE IV. THE PERFORMANCE OF INDEPENDENT TESTING ON DATASET,TESTINGA

performance Model trained by Datasetintersection

Model trained by TrainingA

Avg. 5-CV rate on

training set 91.58% 90.79%

Accuracy 50.38% 92.13%

Sensitivity

(Recall) 4.99% 87.32%

Specificity 95.77% 96.93%

Precision 54.17% 96.60%

The last experiment is designed for evaluating the performance variance when model apply to different profiles of users (scooter riders). Here we randomly select another scooter rider, “19F1E385E5047FD1”, and generate DatasetB using the same method adopted to generate DatasetA. Again, the DatasetB are also randomly partition into two subsets, TrainingB (38 positive cases and 37 negative cases) and TestingB (37 positive cases and 37 negative cases). Table V shows that the performance will be significantly affected

when applying model from one user

(“100E9FBD28611217”) to testing data from another (“19F1E385E5047FD1”). All performance measurements of applying model from TrainingA to testing TestingB are decreased. On the other hand, compared to model from only TrainingA, model trained by data of TrainingA Ĥ TrainingB

will provide a well improvement on those decreased performance. From these results, it can be considered as that the characteristics and tendencies differ from drivers to drivers. To optimize the fitness and resulted driving safety, the learnt models for different users should be trained by their own data, respectively.

TABLE V. THE PERFORMANCE OF INDEPENDENT TESTING ON DATASET,TESTINGB

performance Model trained by TrainingA

Model trained by TrainingAЖ

TrainingB

Avg. 5-CV rate on

training set 90.79% 89.72%

Accuracy 60.81% 79.73%

Sensitivity

(Recall) 78.38% 81.08%

Specificity 43.24% 78.38%

Precision 58.00% 78.95%

V. CONCLUSIONS

In recent decades, intelligent transportation system (ITS), which has been extensively researched in the last decade, complies advanced mechanisms to provide innovative, proactive services relating to traffic management and driving safety. To address the issue of no existent research

propose a model of ITS to predict scooter whether scooters are going to stop or not by combining machine learning techniques. The training and testing data consist of measurements from various sensors of smartphone, a popular and relative cheap device, set on the handler of scooter. Our experiment shows that 1) the model trained with data collected from intersection will provide about 91% accuracy to identify the stop event, and provide significant information to detect red-light runner; 2) due to the difference characteristics of different localities, model from intersection cannot work well when applied to data from whole trajectory; 3) By carefully considering the various tendencies of different scooter riders, model trained by data from whole trajectories detect the stop event with a relatively well performance, about 80% accuracy, and this prediction result can be used as an important information transferred from vehicle to vehicle on the environment of M2M.

In the future, we will focus on following three directions:

1) to build prediction model of different driving behavior, including left turn, U turn, … etc.; 2) to analyze profiles of drivers, to cluster each driver into different driver types or driving tendencies, and to improve the performance of prediction model with this information; and 3) apply this system to the environment of M2M, consisting of vehicles, roadsite unit, and passengers with wearable device, for the purpose of improving driving safety or providing optimized navigation.

ACKNOWLEDGMENT

This work was also supported by National Science Council, National Taiwan University and Intel Corporation under Grants NSC102-2911-I-002-001 and NTU103R7501.

REFERENCES

[1] H. Kargupta, J. Gama, and W. Fan, "The next generation of transportation systems,greenhouse emissions, and data mining," presented at the Proceedings of the 16th ACM SIGKDD international conference on Knowledge discovery and data mining, Washington, DC, USA, 2010.

[2] W. Liu, Y. Zheng, S. Chawla, J. Yuan, and X. Xing,

"Discovering spatio-temporal causal interactions in traffic data streams,"

presented at the Proceedings of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining, San Diego, California, USA, 2011.

[3] L.-Y. Wei, Y. Zheng, and W.-C. Peng, "Constructing popular routes from uncertain trajectories," presented at the Proceedings of the 18th ACM SIGKDD international conference on Knowledge discovery and data mining, Beijing, China, 2012.

[4] J. Yuan, Y. Zheng, and X. Xie, "Discovering regions of different functions in a city using human mobility and POIs," presented at the Proceedings of the 18th ACM SIGKDD international conference on Knowledge discovery and data mining, Beijing, China, 2012.

(7)

[5] J. J.-C. Ying, W.-C. Lee, T.-C. Weng, and V. S. Tseng,

"Semantic trajectory mining for location prediction," presented at the Proceedings of the 19th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, Chicago, Illinois, 2011.

[6] "Aggressive driving: Research update."

[7] D. A. T. Johnson, M.M, "Driving style recognition using a smartphone as a sensor platform," in Intelligent Transportation Systems (ITSC), 2011 14th International IEEE Conference on, Washington, DC, USA, 2011, pp. 1609-1615.

[8] O. M. Tomer Toledo, Tsippy Lotan, "In-vehicle data recorders for monitoring and feedback on drivers’ behavior," Transportation Research Part C: Emerging Technologies, vol. 16, pp. 320-33, 2008.

[9] (2011). Drivecam teen vehicle kit overview. Available:

http://www.drivecam.com/our-markets/family/overview

[10] (2011). Seeing machines. Available:

http://www.seeingmachines.com/

[11] (2011). How snapshot works. Available:

http://www.progressive.com/auto/snapshot-how-it-works.aspx

[12] H.-M. T. Kuan-Wen Chen, Chih-Hung Hsieh, Shao-Wen Yang, Yu-Chi Su, and B.-Y. C. Shou-De Lin, Chieh-Chih Wang, Shao-Yi Chien, Chia-Han Lee, Chun-Ting Chou, Ming-Hsuan Yang, Yuh-Jye Lee, Hsing- Kuo Pao, Ruey-Shan Guo, Chung-Jen Chen, and Yi-Ping Hung,

"Connected Vehicle Safety Science, System, and Framework," presented at the IEEE World Forum on Internet of Things, Seoul, Korea 2014.

[13] T. A. Dingus, Klauer, S.G., Neale, V.L., Petersen, A., Lee, S.E., Sudweeks, J., Perez, M.A., Hankey, J., Ramsey, D., Gupta, S., Bucher, and D. C., Z.R., Jermeland, J., Knipling, R.R., "The 100-car naturalistic driving study phase II – results of the 100-car field experiment," Department of Transportation, Washington, DC2006.

[14] C.-C. Chang and C.-J. Lin, "LIBSVM: a library for support vector machines," ACM Transactions on Intelligent Systems and Technology (TIST), vol. 2, p. 27, 2011.

參考文獻

相關文件

Other criteria for evaluating your survey report would include, but are not limited to, clarity, strength of your reasoning, “correctness” in using machine learning techniques, the

Other criteria for evaluating your survey report would include, but are not limited to, clarity, strength of your reasoning, “correctness” in using machine learning techniques, the

in using machine learning techniques, the work loads of team members, and properness of citations.. Our sincere suggestion: Think of your TAs as your boss who wants to be convinced

This classifier R(F ) can be used to predict the best rate r of the current request and any fu- ˜ ture video requests. First, this classifica- tion model can be offline trained using

Question 4: Use the probability model obtained in Questions 2 and 3 to predict whether the actual live birth weight is below the threshold at 2.5 kilograms. Find out the

(b) Use the logistic model to estimate the world population in the year 2010 and compare with the actual population of 6.9 billion.. (c) Use the logistic model to predict the

When a solution curve crosses one of these lines, it has a local maximum or

Further more by means of a grey verhulst model to predict the population in 2011, in order to propose results to the government for reference when making decision