Open Access Paper
14 February 2024 Traffic mode recognition based on optimized temporal convolutional neural network by using cell phone GPS data
Yaqi Zhu, Bugao Zhang, Liang Wang, Huahua Kong, Zhenxing Yao
Author Affiliations +
Proceedings Volume 13018, International Conference on Smart Transportation and City Engineering (STCE 2023); 1301809 (2024) https://doi.org/10.1117/12.3024025
Event: International Conference on Smart Transportation and City Engineering (STCE 2023), 2023, Chongqing, China
Abstract
With the continuous development of urban transportation planning, how to accurately obtain information on individual travel patterns has become the core problem of research. However, traditional methods of residential travel surveys, such as paper questionnaires, telephone interviews, and mail inquiries, are limited by low data accuracy, organizational difficulties, and limited sample size, which cannot meet the needs of modern transportation planning. GPS-based travel survey methods have gradually become the focus of researchers' attention due to their advantages of high accuracy positioning, convenience, and no human intervention. In this paper, we propose a new method for individual travel mode recognition using cell phone GPS positioning data. Firstly, through a multi-mode travel trajectory data collection application based on smartphone GPS sensors, the characterization indexes of different travel modes are extracted. Secondly, this paper proposes a temporal convolutional neural network algorithm for travel mode recognition, which has strong stability and self-adaptability, and combined with smoothing optimization can effectively improve the accuracy rate of mode recognition. The experimental results show that the average accuracy of mode detection for walking, bicycle, bus and car reaches more than 96%, which verifies the feasibility and effectiveness of the method in this paper. The research results of this paper can provide strong support for future urban transportation planning and travel behavior research.

1.

INTRODUCTION

Current traffic problems require increasingly high accuracy of traffic survey data, and fine traffic survey data is an important basis for solving these traffic planning and management problems. With the popularity of smartphones and the development of positioning technology, the precise positioning capability of mobile GPS and other sensors has attracted the attention of many scholars and companies. Studies have found that smartphone GPS data can provide real-time characterization of travel behavior that is more accurate and dynamic than traditional survey methods [1].

GPS data is an important means of obtaining urban travel information, but its inability to provide travel mode information directly is the main challenge facing current GPS-based survey methods [2]. Previously, researchers have proposed various algorithms for this problem, such as fuzzy logic algorithms and optimization methods such as long-hop mode recognition, and the average mode recognition accuracy has been improved to more than 91.6% [3]. In addition, traditional machine learning algorithms such as Bayesian networks [4] and random forests [5] have been used for traffic mode recognition, but they have limitations in terms of accuracy and stability. In recent years, there are more and more researches to improve the accuracy of mode recognition using smartphone GPS data. Byon et al. designed a neural network model [6] that can be used for travel mode recognition under different traffic conditions and achieved better classification results. In addition, Sina Dabiri et al. built a traffic travel mode recognition model based on GPS trajectory data using convolutional neural networks, and found that the CNN-based mode recognition model has the optimal recognition effect by comparing with various classification algorithms such as KNN, random forest, support vector machine, and decision tree [7]. Chenxing Wang et al. proposed a residual-based and LSTM recursive network for traffic mode recognition algorithm [8], which learns feature representations from multiple pre-processed sensor data to improve recognition accuracy. However, the model requires a predefined threshold to calculate the peak and segmentation features, which limits the generalization capability and leads to a long training time for the model. Yanjun Qin et al. proposed a fusion framework for traffic mode recognition consisting of three parts: network-in-network (NIN), dilation convolution, and graph convolution network (GCN), and the experimental results showed that the framework was effective in Sussex-Huawei Mutarotation-Transportation (SHL) dataset with higher accuracy [9]. However, due to the fact that the model training requires processing a large number of graph matrices and powerful server support, it cannot be popularized for practical applications at present.

The purpose of this paper is to explore an innovative approach to personal travel mode recognition using cell phone GPS location data. First, a multi-modal travel trajectory data collection application based on smartphone GPS sensors is developed, and effective travel mode characterization metrics are proposed through data analysis. Second, for the travel mode recognition task, this paper further proposes an intelligent solution based on Temporal Convolutional Network (TCN) algorithm, which has better performance and trainability compared with traditional recurrent neural networks, and avoids gradient disappearance and gradient explosion problems when dealing with long sequence data [10]. The algorithm can achieve accurate and efficient travel mode recognition by combining median smoothing and optimization methods. In summary, the method proposed in this paper has high accuracy and applicability, and can provide new ideas for further research in the field of travel mode recognition.

2.

METHODOLOGY

2.1.

TCN-based traffic mode recognition

Temporal convolutional neural network is a convolutional neural network model, mainly used to process time series data. Compared with traditional recurrent neural networks, TCN has strong parallel computation capability and its convolutional layers can compute multiple time steps at the same time, which significantly shortens the model training time; TCN can also extend the perceptual field by increasing the convolutional kernel and depth to capture information of longer time span, which is important for tasks such as traffic mode recognition that need to consider longer time intervals. In traffic mode recognition, sparse time series are generated due to interchange between different traffic modes and waiting for intersection signals, etc. The convolutional operation of TCN can directly handle such sparse time series, which is more advantageous than traditional RNN, LSTM and other structures for such situations. The temporal convolutional neural network uses convolutional and pooling layers to extract features, and then performs classification or regression prediction through fully connected layers, which can effectively avoid problems such as gradient disappearance or explosion. The model formulation is as follows: let the time series of input data be x1, x2, …, xT, where T denotes the length of the time series, k denotes the convolutional kernel size, f denotes the activation function, wi denotes the ith convolutional kernel, and bi denotes the bias term of the ith convolutional layer.

00010_PSISDG13018_1301809_page_2_1.jpg
00010_PSISDG13018_1301809_page_2_2.jpg
00010_PSISDG13018_1301809_page_2_3.jpg

Eq. (1) is the convolutional layer formula, where i = 1, 2, …, mI denotes the number of convolutional kernels in layer I, j = k, k+1, …, T denotes the starting point of the sliding window, and Eqs. (2-3) are the pooling layer and fully connected layer formulas, where L denotes the number of layers in the fully connected layer, 00010_PSISDG13018_1301809_page_2_4.jpg denotes the weight of the fully connected layer, and bL denotes the fully connected bias term of the layer.

The core task of traffic mode recognition using temporal convolutional neural network algorithm is to select the feature vector that best reflects the characteristics of different travel patterns and represents different modes as input. Based on the analysis of the raw GPS data, we select six attributes: average velocity per minute, maximum velocity, and velocity variance, and average acceleration per minute, maximum acceleration, and acceleration variance to construct the input feature vectors. The results of the input feature correlation analysis and the schematic diagram of the temporal convolutional neural network algorithm are shown in Figure 1.

Figure 1.

Input feature correlation and temporal convolutional neural network model principles

00010_PSISDG13018_1301809_page_3_1.jpg

2.2.

Smoothing and Optimization

During the pre-experiments, due to the differences in velocity, acceleration magnitude and fluctuations of various modes under different traffic conditions, it was found that the preliminary traffic mode classification results of the TCN model had the problem of traffic mode recognition errors within a short period of time. In order to solve these problems, we adopt data smoothing method for correction. Specifically, we used a median smoothing algorithm for filtering and optimized by the duration rule. For the undefined way sequences in the initial results, they were modified to the post-adjacent normal way sequences; for the shorter way sequences connected between two non-walking ways, they were modified to another set of sequence values. The algorithm for modifying the undefined sequences is as follows:

Algorithm

Process of Modify undefined sequences method

00010_PSISDG13018_1301809_page_4_1.jpg

3.

EXPERIMENTAL DESIGN AND DATA COLLECTION

In this paper, a smartphone APP is developed to collect data from cell phone sensors. The software connects the data collection chips such as cell phone GPS, accelerometer, gyroscope, etc., and records detailed travel information such as personal travel time, latitude and longitude, velocity, acceleration, and direction angle with a sampling frequency of 1 point/s. The data content and format collected by the APP are shown in Table 1.

Table 1.

Content and format of mobile app data collection

User IDDateTimeLongitudeLatitudeAltitude
100012022/5/815:12:23104.069262830.68073913475.7000122
100012022/5/815:12:24104.069284230.68081108475.8999939
VelocityX-axis Acc.Y-axis Acc.Z-axis Acc.Satellite numberSatellite error
8.25-0.9534243350.21792556310.0245761975
9.25-0.803600491.1441092499.41166019456

The data collection experiments were carried out in the central city of Chengdu. In order to fully verify the technical feasibility and application effect of the proposed algorithm in different travel environments, the data collection scheme was designed in detail for different traffic modes, travel routes and traffic states. The traffic modes include 10 common combinations of walking, bicycling, bus, car and subway, which comprehensively cover the common travel mode combinations of Chinese residents. The data collection scheme of this paper is mainly designed as follows: the travel modes include four travel modes of walking, bicycle, bus and car, such as walking-bicycle-walking, walking-bus-walking, walking-bicycle-walking-bus-walking, etc. During the data collection process, travelers were asked to record travel logs. The travel logs mainly include travel time, travel mode, transfer location, transfer time, travel path, parking time, and reason for parking. The travel log data is used as real reference data for model training and model performance evaluation.

4.

RESULTS AND DISCUSSION

4.1.

Case analysis

4.1.1.

Case Recognition Results

In this paper, six different trip combinations are studied as case studies, Figure 2 (a)~(f) show the graphs of real transportation mode and TCN model recognition results over time during these six trips, respectively, including Trip-A for bicycle + bus trip, Trip-B for bus trip with two transfers, Trip-C for car trip, Trip-D for walking + bicycle trip, Trip-E for bus transfer once + bicycle and Trip-F for bus transfer. In each subplot, the first plot shows the real traffic mode recorded in the trip log, the middle subplot is the recognition result using only the TCN model, and the last subplot is the recognition result after smoothing and optimization.

Figure 2.

Case results

00010_PSISDG13018_1301809_page_5_1.jpg

4.1.2.

Case accuracy and interchange time error analysis

Figure 3 shows the six times way recognition accuracy results, it can be found that the initial accuracy of the recognition algorithm model ranges from 79.58% to 88.76%, after median smoothing and optimization it is improved to 93.57% to 99.60%, the accuracy is improved by 13.09% on average. the initial recognition rate of class C is lower because the average velocity of small cars is influenced by the traffic state The reason is that the average velocity of small cars is affected by the traffic condition, resulting in being mistaken for buses in many hours. The lower initial recognition rate for category D is based on the fact that the velocity of bicycles is less stable and is more likely to be mistaken for walking or transit modes.

Figure 3.

Travel mode recognition accuracy

00010_PSISDG13018_1301809_page_6_1.jpg

Table 2. shows the transfer time error results for the six travel modes, where positive numbers indicate delayed relative to the true value and negative numbers indicate advanced relative to the true value. Among them, Bus-Walk for Trip-A and Walk-Car for Trip-C identify the error delayed by more than 70 seconds. After log analysis, we found that this is due to the increase in recognition error caused by the increased traffic congestion before and after the trip. Other interchange time errors are within 30s, indicating good overall recognition.

Table 2.

Recognition time error

Recognition time error (s)ABCDEFAverage
Walk-Bike110032607
Bike-Walk1700-121103
Walk-Bus-16-1600-16-11-10
Bus-Walk-74-26001510-13
Walk-Car00-76000-13
Car-Walk00230004

Note: Time error = Recognized boarding (alighting) time - Real boarding (alighting) time

4.2.

Model evaluation

According to the confusion matrix shown in Figure 4. it can be found that the optimized TCN model has an average recognition accuracy of 96.95% for the six different travel modes. It is worth noting that the lowest recognition accuracy is achieved for the travel mode of walking, because after smoothing and optimization, the recognition errors mainly occur between walking and other modes. The results show that the optimized TCN model has better recognition results for these four modes.

Figure 4.

Model Confusion Matrix

00010_PSISDG13018_1301809_page_6_2.jpg

5.

CONCLUSION

This paper presents an innovative method for personal travel mode recognition based on smartphone GPS location data. By developing a multi-mode travel trajectory data collection software based on smartphone GPS sensor, combining the travel characteristics of different travel modes, a travel mode classification feature library with average velocity, maximum velocity and velocity variance and average acceleration, maximum acceleration and acceleration variance as characterization indexes is established, and a temporal convolutional neural network algorithm is used for travel mode recognition, and through median smoothing and The proposed temporal convolutional neural network algorithm is used to identify the travel modes and achieve the effective recognition of multi-mode travel information through median smoothing and optimization of the recognition results. The research results show that the proposed temporal convolutional neural network model has high accuracy and can achieve accurate recognition of multi-modal travel information. The average recognition accuracy reaches over 96%, which provides a good data basis for modern traffic planning and management.

Future research will further explore the effect of mode recognition under the combined effect of different data quality, more advanced model algorithms such as artificial intelligence and machine learning, and investigate new methods for extracting individual travel information in a multi-source traffic data fusion environment.

ACKNOWLEDGEMENT

This paper is supported by National Natural Science Foundation of China (52002030); Humanities and Social Sciences Foundation of the Ministry of Education (20XJCZH011); Natural Science Foundation of Shannxi Province (2021JQ-256); Humanities and Social Sciences Foundation of Shannxi Province (2020R035); Fundamental Research Funds for the Central Universities CHD (300102341676, 300102342105), Opening Foundation of Zhejiang Intelligent Transportation Engineering Technology Research Center (2021ERCITZJ-KF04); Foundation of PowerChina Northwest Engineering Corporation Limited (2023610002003846).

REFERENCES

[1] 

Stopher P, FitzGerald C and Xu M, “2007 Assessing the accuracy of the Sydney Household Travel Survey with GPS,” Transportation, 34 723 –41 https://doi.org/10.1007/s11116-007-9126-8 Google Scholar

[2] 

Gong H, Chen C, Bialostozky E and Lawson C T, “2012 A GPS/GIS method for travel mode detection in New York City,” Computers, Environment and Urban Systems, 36 131 –9 https://doi.org/10.1016/j.compenvurbsys.2011.05.003 Google Scholar

[3] 

Biljecki F, Ledoux H and van Oosterom P, “2013 Transportation mode-based segmentation and classification of movement trajectories,” International Journal of Geographical Information Science, 27 385 –407 https://doi.org/10.1080/13658816.2012.692791 Google Scholar

[4] 

Xiao G, Juan Z and Zhang C, “2015 Travel mode detection based on GPS track data and Bayesian networks,” Computers, Environment and Urban Systems, 54 14 –22 https://doi.org/10.1016/j.compenvurbsys.2015.05.005 Google Scholar

[5] 

Lari Z A, “1 Automated Transportation Mode Detection Using Smart Phone Applications via 2 Machine Learning: Case Study Mega City of Tehran,” Google Scholar

[6] 

Byon Y-J, Abdulhai B and Shalaby A, “2009 Real-Time Transportation Mode Detection via Tracking Global Positioning System Mobile Devices,” Journal of Intelligent Transportation Systems, 13 161 –70 https://doi.org/10.1080/15472450903287781 Google Scholar

[7] 

Dabiri S and Heaslip K, “Inferring transportation modes from GPS trajectories using a convolutional neural network Transportation Research Part C,” Emerging Technologies, 86 360 –71 (2018). https://doi.org/10.1016/j.trc.2017.11.021 Google Scholar

[8] 

Wang C, Luo H, Zhao F and Qin Y, “Combining Residual and LSTM Recurrent Networks for Transportation Mode Detection Using Multimodal Sensors Integrated in Smartphones,” IEEE Trans. Intell. Transport. Syst, 22 5473 –85 (2021). https://doi.org/10.1109/TITS.2020.2987598 Google Scholar

[9] 

Qin Y, Luo H, Zhao F, Wang C and Fang Y, “NDGCN: Network in Network, Dilate Convolution and Graph Convolutional Networks Based Transportation Mode Recognition,” IEEE Trans. Veh. Technol, 70 2138 –52 (2021). https://doi.org/10.1109/TVT.2021.3060761 Google Scholar

[10] 

Bai S, Kolter J Z and Koltun V, “An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling,” (2018). Google Scholar
(2024) Published by SPIE. Downloading of the abstract is permitted for personal use only.
Yaqi Zhu, Bugao Zhang, Liang Wang, Huahua Kong, and Zhenxing Yao "Traffic mode recognition based on optimized temporal convolutional neural network by using cell phone GPS data", Proc. SPIE 13018, International Conference on Smart Transportation and City Engineering (STCE 2023), 1301809 (14 February 2024); https://doi.org/10.1117/12.3024025
Advertisement
Advertisement
RIGHTS & PERMISSIONS
Get copyright permission  Get copyright permission on Copyright Marketplace
KEYWORDS
Global Positioning System

Convolutional neural networks

Detection and tracking algorithms

Data modeling

Evolutionary algorithms

Mathematical optimization

Cell phones

Back to Top