Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Travel time prediction of urban public transportation based on detection of single routes

  • Xinhuan Zhang ,

    Contributed equally to this work with: Xinhuan Zhang, Les Lauber

    Roles Conceptualization, Data curation, Formal analysis, Funding acquisition, Investigation, Methodology, Project administration, Resources, Supervision, Writing – original draft

    zxh@zjnu.cn (XZ); hj_popel@stu.xjtu.edu (HL)

    Affiliation The Institute of Road and Traffic Engineering, Zhejiang Normal University, Jinhua, Zhejiang Province, China

  • Les Lauber ,

    Contributed equally to this work with: Xinhuan Zhang, Les Lauber

    Roles Writing – review & editing

    Affiliation Kansas Public Employee Retirement System, Topeka, Kansas, United States of America

  • Hongjie Liu ,

    Roles Conceptualization, Data curation, Formal analysis, Methodology, Supervision

    zxh@zjnu.cn (XZ); hj_popel@stu.xjtu.edu (HL)

    Affiliation School of Electronic and Information Engineering, Xi’an Jiao Tong University, Xi’an, Shanxi Province, China

  • Junqing Shi ,

    Roles Investigation, Validation

    ‡ JS, MX and YP also contributed equally to this work.

    Affiliation The Institute of Road and Traffic Engineering, Zhejiang Normal University, Jinhua, Zhejiang Province, China

  • Meili Xie ,

    Roles Data curation

    ‡ JS, MX and YP also contributed equally to this work.

    Affiliation The Institute of Road and Traffic Engineering, Zhejiang Normal University, Jinhua, Zhejiang Province, China

  • Yuran Pan

    Roles Data curation, Formal analysis

    ‡ JS, MX and YP also contributed equally to this work.

    Affiliation The Institute of Road and Traffic Engineering, Zhejiang Normal University, Jinhua, Zhejiang Province, China

Abstract

Improving travel time prediction for public transit effectively enhances service reliability, optimizes travel structure, and alleviates traffic problems. Its greater time-variance and uncertainty make predictions for short travel times (≤35min) more subject to be influenced by random factors. It requires higher precision and is more complicated than long-term predictions. Effectively extracting and mining real-time, accurate, reliable, and low-cost multi-source data such as GPS, AFC, and IC can provide data support for travel time prediction. Kalman filter model has high accuracy in one-step prediction and can be used to calculate a large amount of data. This paper adopts the Kalman filter as a travel time prediction model for a single bus based on single-line detection: including the travel time prediction model of route (RTM) and the stop dwell time prediction model (DTM); the evaluation criteria and indexes of the models are given. The error analysis of the prediction results is carried out based on AVL data by case study. Results show that under the precondition of multi-source data, the public transportation prediction model can meet the accuracy requirement for travel time prediction and the prediction effect of the whole route is superior to that of the route segment between stops.

I. Introduction

Public transit travel time prediction is one effective measure for improving service reliability, optimizing travel structure, and alleviating traffic problems. Accurate real-time travel time information benefits include reducing passenger waiting time, relieving passenger anxiety, reasonably distributing travel time, improving convenience in taking or transferring busses, enriching public transit services types, enhancing public transit’s image and improving its desirability, and providing a rational basis for scheduling [1]. In contrast, conventional transit is a complex non-linear system with multiple parameters, creating a high degree of uncertainty. This complexity makes it challenging to predict travel times, especially when short-term travel times are more susceptible to random factors and uncertainties than long-term forecasts. Moreover, as travel time increases, so does the probability of unexpected accidents. The requirement for short-term travel time prediction precision (≤35min) is higher than for long-term, making its prediction also more complex.

Traditional travel time prediction methods based on statistical analysis or mathematical modeling are deficient in intelligence and have weak adaptability. Current methods depend on real-time detection of traffic conditions regardless of precision or accuracy. Some methods based on new mathematical tools, such as neural networks, have a good application effect for some specific problems but lack generalizability. Other knowledge discovery methods embody knowledge-based requirements but have not formed a methodology suitable for traffic data analysis. Therefore, in the big data environment, it is necessary to study travel time prediction technology to more fully meet the data requirements in the operation analysis process of urban public transit and improve its applicability.

This paper studies the travel time prediction of urban public transit based on the Kalman filter in a big data environment. Based on leading research and application in intelligent transit technologies, the theories and methods of current travel time prediction of public transit based on data mining are enriched and complemented. Additionally, a travel time prediction system of conventional transit under the influence of random factors is constructed, and a short-term (≤35min) travel time prediction model with strong applicability is built. These will work congruously to improve prediction’s real-time accuracy and adaptability and reduce costs associated with data acquisition. This paper provides a scientific theoretical basis and decision support for the practical work of using intelligent technology to improve the prediction accuracy of travel time. It holds practical application value for four stakeholder groups:

  1. Travelers: As a general travel time prediction system of public transit, it can predict travel time information within a certain period. This improves an urban public transit system’s service levels and provides passengers with real-time travel time information through multiple channels to facilitate their travel choices.
  2. Public transit operators: Accurate travel time prediction is the basis of dynamic scheduling. Using artificial intelligence to perceive and predict the system’s status continuously improves travel time predictions in real-time. Establishing a new generation of intelligent information service systems that bases predictions on big data analysis improves and enhances the intelligent service level of public transit. Innovative big data analysis applied to public transit realizes gains in the efficient operation and management of public transportation systems.
  3. Public transit managers: Building a flexible and universal public transit travel time model based on data mining in the big data environment can provide public transit managers with decision-support information related to management planning.
  4. Public transit policymakers: Strategic public policymakers and planners can use this approach for improving passenger satisfaction, optimizing scheduling schemes, increasing public transit system reliability, making public transit options more attractive, promoting reasonable travel plan creation, and relieving the pressure of urban traffic. These benefits will facilitate the strategic development of public transit.

II. Literature review

Prior researchers have developed methods to predict travel time [24]. This section is an overview of methods for predicting travel time published in the last five years. These methods can be divided into five categories: Global Positioning System (GPS) based, Neural Network based, Support Vector Machines (SVM) based, Particle Filtering (PF) based, and Kalman Filter (KF) based.

A. Global positioning system

GPS signal positioning is the most direct method for travel time prediction. Based on bus riders’ smartphone Wi-Fi information, Liu et al. [5] presented a model to track and predict the arrival time of a city bus. Automatic Vehicle Location (AVL) and smartphone location can also predict bus arrival time. Farooq et al. [6] presented a prediction system relying on real-time AVL. While using technological solutions such as GPS and AVL, those methods could not use historical information and ignored space features.

Chen EH et al. [7] proposed a generic framework to analyze short-term passenger flow, considering passenger flow’s dynamic volatility and nonlinearity during special events. Four different generalized autoregressive conditional heteroscedasticity models and the ARIMA model were used to model the mean and volatility of passenger flow based on the transit smart card data(Contains GPS information) from Nanjing, China. The proposed framework could effectively capture the mean and volatility of passenger flow and outperform the traditional methods in terms of accuracy and reliability. Zhang B et al. [8] focuses on identifying the distribution of regions with high travel intensity and the correlation between travel intensity and points of interest (POIs), based on the online car-hailing data collected in Chengdu, China(Contains GPS information). Zhang HL et al. [9] propose a spatial-temporal generative adversarial network (ST-GAN) to assign the generative factors of traffic flow to the feature vector in latent space and reconstructs the high-dimensional citywide traffic flow from the given elements. With the help of the disentangled representations, the decomposed feature vector in latent space discloses the relationship between underlying patterns and citywide traffic dynamics. Liu Y et al. [10] propose a novel travel mode recommendation system for multi-modal transportation. In the proposed model, the feature engineering focuses on the application scenario of the multi-modal transportation recommendation and is designed from multiple perspectives of users, travel modes, locations, and time.

B. Neural network

Neural networks’ non-linear modeling ability has made them more popular. Chen CH et al. [11] proposed an arrival time prediction method (ATPM) based on recurrent neural networks (RNNs) to predict the stop-to-stop travel time for motor carriers. Pang et al. [12] proposed to exploit the long-range dependencies among the multiple time steps for bus arrival prediction via a recurrent neural network. Zhang et al. [13] proposed a model based on MapReduce combining clustering with the neural network. Yang et al. [14] proposed a novel stacked autoencoder Levenberg-Marquardt model, a type of deep architecture of neural network approach that aimed to improve forecasting accuracy. Polson et al. [15] developed a deep learning model to predict traffic flows. Wu et al. [16] proposed a deep neural network (DNN) based traffic flow prediction model (DNN-BTF) to improve the prediction accuracy. Cristina et al. [17] tried five neural network models and identified the best performing deep learning model. Wichai et al. [18] proposed another DNN-based model. Zhang et al. [19] proposed an end-to-end multitask learning temporal convolutional neural network (MTL-TCNN) to predict the short-term passenger demand at a multi-zone level. In the same year, Zhang et al. [20] also proposed a deep learning-based multitask learning (MTL) model using Bayesian optimization to tune parameters of MTL to predict short-term traffic speed. Zheng et al. [21] proposed a feature selection-based approach to identify reasonable spatial-temporal traffic patterns related to the target link to improve online prediction performance. To resolve the problem that empirical methods cannot adequately capture various travel time distributions, Zhang et al. [22] proposed a deep learning-based Trip Information Maximizing Generative Adversarial Network (T-InfoGAN). Liu Y et al. [23] analyze the passenger flow from scopes on macroscopic and microscopic levels. Decision-tree-based models are used in modeling and predicting passenger flow. Inspired by the feature engineering of decision-tree-based models, a modular convolutional neural network is designed, which contains automatic feature extraction block, feature importance block, fully-connected block, and data fusion block. However, these articles do not combine timely GPS data with the neural network model.

C. Support vector machine

SVM maps the input data into higher dimensional space with a specifically designed kernel such that the relationship between modified input data and the target variable is linear. Yang et al. [24] presented a prediction model of bus arrival time based on SVM with a genetic algorithm (GA-SVM). Peng et al. [25] proposed a forecasting method based on principal component analysis-genetic algorithm-support vector machine (PCA-GA-SVM) to improve arrival time prediction precision. Yao et al. [26] proposed a single-step prediction SVM model composed of spatial and temporal parameters. Moridpour et al. [27] suggested a Least Squares SVM (LS-SVM) method that expedited the training process by simplifying the quadratic programming problem using a linear regression technique. Lu LL et al. [28] propose a methodology for real-time freeway travel time estimation with data from sparse detectors, utilizing a self-organized mapping algorithm to cluster the sensors with similar traffic patterns. The data collected from the representative detectors within each cluster is then employed to estimate the travel time based on a support vector regression model.

And further, to better assist travelers in making trip decisions in under-connected environments and undersaturated signalized arterial environments, Lu LL et al. [29, 30] propose a lane-level travel time prediction model under a connected environment real-time prediction model for vehicle individuals on an undersaturated signalized arterial. Conventional models are suitable for estimating the travel time distributions of only a few road segments. In contrast, these two models fully capture travel time reliability metrics such as the buffer time index, skewness, and width of the travel time distributions for all road segments, these results will help traffic managers and engineers carry out effective traffic management and control to optimize the operation under-connected environments, and undersaturated signalized arterial environments.

D. Particle filtering

The PF technique has been widely applied to deal with historical GPS information and predict bus arrival time. Dhivyabharathi et al. [31] proposed a method to predict stream travel time using a particle filtering approach that considers the predicted stream travel time as the sum of the median of historical travel times, random variations in travel time over time, and a model evolution error. Dhivyabharathi et al. [32] developed a model based on particle filtering technique which was better than the existing method with MAPE values around 17% with the accuracy of +/- 2 minutes, wherein inputs were obtained using the K-NN (k-nearest neighbors) algorithm (the core of KNN is that a sample belongs to most categories of k samples adjacent to it). However, the particle filtering algorithm used in these two papers is only suitable for a non-linear stochastic system with the state-space model, but the time property of bus arrival prediction was not considered.

E. Kalman filtering

Kalman first proposed Kalman filtering in 1960. It takes the minimum mean square error as the best estimation criterion to seek a set of recursive estimation algorithms. Its basic idea is to use the state-space model of signal and noise, update the estimation of state variables by using the estimated value of the previous time and the observed value of the current time, and obtain the estimated value of the present time. It is suitable for real-time processing and computer operation. Kalman filters are ideal for conventional urban transit systems, a multi-parameter and time-varying complex giant system with a high degree of uncertainty and are non-linear. This filter can consider quantities that are partially or entirely neglected in other methods (such as the variance of the initial estimate of the state and the variance of the model error). It provides information about the quality of the estimation by providing, in addition to the best estimate, the variance of the estimation error.

KF has been widely applied to the prediction of travel time. Li et al. [33] considered KF combined with other methods and proposed a three-stage mixed model including K-means, real-time adjusted Kalman filter, and Markov historical transfer model. Huo JB et al. [34] propose a spatiotemporal extended Kalman filter (SEKF)short-term pedestrian density estimation and prediction method based on mobile phone data. A massive mobile phone dataset collected in Nanjing, China, is used in the case study. The estimated pedestrian density from Monday to Thursday is used for Friday’s prediction. KF model has the advantages of high prediction accuracy and a large amount of data processed by computer. At the same time, there still is room for improvement in model construction and data input in previous studies.

While the models described in this section can solve the bus-to-station prediction problem to some degree, the influence factors these models considered are one-sided. GPS over-emphasizes the current state of the bus, degrading the prediction accuracy as the predicted distance increases. The input used in the NN network is too one-sided and does not consider the comprehensive impact of time and space characteristics. SVM relies too much on kernel tricks to achieve predictions on a large scale. The PF only finds the time of the bus to the stop and ignores the spatial effect of the bus.

The system contains accurate mathematical noise statistics (noise mean and variance matrix), which is the essential requirement of the Kalman filtering method. However, in practical application, the mathematical model and/or noise statistics of the system are always unknown (the model or noise statistics of the system contain errors). In addition, there is often model uncertainty and/or interference uncertainty; that is, there is an unmodeled dynamic system, which will cause the filtering performance to deteriorate or even diverge. This paper tries to achieve as follows:

  1. Build the model to match the actual situation;
  2. Noise convergence is ensured based on multi-source data input;

The above two points ensure that the performance of the Kalman filter is good to overcome the shortcoming mentioned.

This paper applies models to the public transit network data of Madison, Wisconsin, USA. It combines the Kalman filter model with the AVL and IC card intelligent bus technologies, both currently widely used, to predict urban public transit travel time.

III. Methodology

A. Definitions

1) Research object.

In conventional urban transit, the uncertainty of many external factors makes it challenging to execute vehicle and personnel scheduling and dispatching, leading to the low reliability of public transportation. Bus ridership is consistently at low levels due to lack of information about wait times, anxiety regarding the timeliness of the bus service, and failure to arrive at the destination at the expected time. These deficiencies inconvenience urban commuters who rely on mass public transit and hinder the resultant urban traffic structures that would lower energy consumption and pollution, raise efficiency, and yield more sustainable development. Given existing technical conditions, in-depth research on the prediction method of travel time of conventional transit is of great practical value.

2) Short-term travel time predictions.

Short-term travel time predictions are influenced by random factors (road conditions, traffic conditions, time, climate, emergencies, vehicle conditions, drivers, passengers, intersection, and control mode [3537]). Unexpected and accidental events occur less predictably, thus requiring greater precision than long-term prediction. In this paper, the short time travel prediction is the next step prediction of travel time, that is, at time T, a short-term prediction is made for the travel time of the following decision moment T + Δt, where the prediction period Δt is generally not more than 35 minutes.

Historical data is used to predict long-term travel time (35 minutes or more). However, travel time prediction (15 minutes or less) uses real-time data. Short-term travel time prediction (15 minutes ~ 35 minutes) uses historical and real-time data, where the recorded data is used to build and test models, and real-time information is used for online prediction and evaluation. The classification of travel time prediction is shown in Fig 1.

From this analysis, this paper’s specific research focus is the short-term travel time prediction of the urban conventional transit with fixed routes and stops within the time range of 15min ~ 35min, where the system is equipped with at least advanced intelligent public transit technologies, including AVL, IC, and another real-time spatial positioning, monitoring, and transmission.

3) Definition of bus travel time.

In this paper, public transit travel time consists of two parts: Route travel Time (RT) + stop Dwell Time (DWT). Transfer time is not included in the scope of this paper. Combined with the above discussion, this paper’s definition of the public transport travel time can be expanded to the short-time travel time (15min ~ 35min) with the regular bus as the carrier, namely the single bus travel time prediction based on single-line detection.

B. Data preprocessing

1) The data type.

Relative to IC and dispatching information, route and stop information is relatively fixed and does not change often. It is usually obtained directly from bus companies or government passenger transport authorities. However, this information is often neither detailed nor accurate enough, especially the location of stops and other information. Discrepancies often arise in routes, requiring a supplementary survey of the routes and stops to determine their correct directions and locations.

The Madison bureau of the Wisconsin Traffic Operations and Safety Laboratory provided the data analyzed herein (see S3 File, Figs 1 and 2). All data obtained for routes and stops are spatial data. This data was digitized and stored in a spatial database utilizing GIS technology for storage. The raw data required for data mining are:

  1. Static primary data of transit
    1. ■ Route data: route number, number of stops, stop location (latitude and longitude), etc.
    2. ■ Stop data: stop ID, stop site (latitude and longitude), the distance between adjacent stops, etc.
  2. Dynamic primary data of transit
    1. ■ IC data: Service day, bus code, swiping time, latitude and longitude when swiping, ID of IC, route number, etc.
    2. ■ AVL data: Service day, bus code, pattern ID, actual arrival time, actual departure time, time point ID, stop ID, etc.
    3. ■ Bus dispatching data: bus code, pattern ID, departure time, arrival time, departure interval, etc.

2) Data preprocessing.

In this paper, data preprocessing and analysis were carried out using Oracle and MATLAB software. Clustering was carried out on the IC data, and the travel time after clustering was divided into sections to obtain the arrival, departure, and stop dwell times of each stop. These steps are shown in S1 File. The dwell time of each stop was assessed to estimate each boarding stop. Finally, the essential travel time of stops after segmentation based on the actual stops was obtained as the input data of the travel time prediction model. These results are shown in S2 File, Table 1.

thumbnail
Table 1. Average absolute error and relative error of travel time prediction of the route segment.

https://doi.org/10.1371/journal.pone.0262535.t001

AVL data was used to verify the validity of the IC data processing procedures. These steps are shown in S1 File. AVL data was also used both to estimate the parameters of the prediction model and evaluate the accuracy of the prediction model. AVL key stops (Timepoint) information was used to assess the accuracy of the segmented results: AVL key stop (Timepoint) data was used to adjust the parameters of the data processing procedures, allowing the absolute error to be minimized.

C. Prediction model

1) Model assumptions.

  1. i. The basic assumptions

A Transit Network consists of routes and stops. Routes are comprised of route segments and stops.

  1. The whole route is simplified into two parts: stop and route segment (see Fig 2). The route segment is divided into two adjacent stops: the initial and terminal stops. The route segment may or may not contain intersections. The total travel time consists of two parts: route travel time (RT) + stop dwell time (DWT).
  2. All vehicles are equipped with IC and AVL systems.
  3. Intersection delays and road segment delays are reflected in RT. The time of arrival and departure stop, as well as stop delays, are reflected in DWT.
  4. Due to the limitation of route and dispatch, drivers are not affected by their subjective will factors.
  5. The vehicle type and performance are the same on the same route.
  6. There will be no changes to road infrastructure or stops during the prediction period.
  7. Assuming that the bus has two doors, one door for boarding and another for disembarking, the time taken by unit passengers to get on and off is the same, and the number of people determines the time to get on and off.
  1. ii. Basic principle

The travel time prediction model based on single route detection comprises the route travel time prediction model (RTM), and the stop dwell time prediction model (DTM).

Route travel time is predicted by the route travel time prediction model (RTM). Each route segment’s historical travel time data is used as the input to the prediction model. The arrival time at the stop for each route segment is obtained from IC card data, and the updated travel time is used to predict the new travel time, then stored as historical data. The dwell time model (DTM) and passenger arrival rate prediction model (PARM) are based on IC records of getting on and off the bus at each stop (combined with historical and current data).

The chosen historical data input for this model is the travel time data of the same period for the previous three days and the previous period of the same day, and the model output is the travel time of the current period of the day.

2) Overall model.

The single route travel time between stops is composed of two parts: road travel time (RT) + stop dwell time (DWT), which can be expressed by the arrival time of buses: (Eq 1)

Where,

ATn(i+1) is the predicted time the bus n to arrives at the stop i +1;

DTn(i) is the time the bus n to leave the stop i;

RTn(i, i+1) is the travel time of bus n between stops i and i +1 predicted by the Kalman filtering algorithm.

The stop dwell time can be expressed as: (Eq 2)

Where,

DWTn(i+1) is the time of bus n stay at stop i+1 to be predicted;

λ(i+1) is the passenger arrival rate at the stop i +1 predicted by the Kalman filtering algorithm;

H(i+1) is the headway of bus n in the stop i + 1, H(i+1) = ATn(i+1)−ATn-1(i+1).

ρavg(i+1) is consumed at the boarding time of the average passenger at the stop i +1, assumed to be 2.5 seconds per person.

The time when the bus leaves the stop can be expressed as: (Eq 3)

Where,

DTn(i+1) is the predicted time for bus n to leave the stop i +1;

ATn(i+1) is the time of bus n arriving at stop i +1 predicted by Eq (1);

DWTn(i+1) is the time of bus n stay at stop i +1 predicted by Eq (2).

Meanwhile, according to Eqs (1), (2) and (3), the time of departure from the stop i +1 is: (Eq 4)

In the equation, each parameter is the same as the above equation. The above equations can predict the arrival and departure times of bus n at stop i+1. In the equation, RTn(i, i+1) and λi+1 are obtained from the Route Travel Time Prediction Model(RTM) and the Passenger Arrival Rate Prediction Model(PARM).

  1. i. Route Travel Time Prediction Model (RTM)

The road travel time prediction model of period k+1 of a single route between adjacent stops can be expressed in Eqs (5) ~ (8): (Eq 5) (Eq 6) (Eq 7) (Eq 8)

Where,

g (k+1) is the gain of the Kalman filter in the period k +1;

a (k+1) is the loop gain in the period k +1;

e (k) is the filter error in period k, which is calculated in the previous cycle;

e (k+1) is the filter error of period k +1, which is used for the calculation of the following process;

RTn(i,i+1)(k+1) is the travel time of bus n between stops i and i +1 predicted by Kalman filtering algorithm in period k +1;

art (k) is the travel time of bus n between stop i and i +1 in period k;

art1 (k+1) is the travel time of bus n between stops i and i +1 during period k+1 on the previous day;

art2 (k+1) is the travel time of bus n between stops i and i +1 during period k+1 on the previous two days;

art3 (k+1) is the travel time of bus n between stops i and i +1 during period k+1 on the previous three days;

VAR(dataout) is the variance of the prediction;

VAR(datain) is the variance of the travel time "art1 (k+1), art2 (k+1), art3 (k+1)" between stops i and i +1 for the previous three days, which can be expressed by the travel time " art1 (k+1), art2 (k+1), art3 (k+1)"of the previous three days: (Eq 9)

The variance of the random variable can be expressed as: (Eq 10) (Eq 11)

The equation expresses the relevant variables: (Eq 12) (Eq 13) (Eq 14) (Eq 15)

VAR(dataout) is determined by the prediction result of the filter model and the observation value in the future, which cannot be obtained because the prediction result is unknown, and the future trip has not yet happened, ideally, under the condition of good prediction state, VAR(dataout) = VAR(datain), the introduction of new variables: VAR(localdata) is used to indicate the VAR(dataout), VAR(datain) and can be represented as: (Eq 16)

Filter gain (Eq (5) and filter error (Eq (7)) can be reduced to Eqs (17) and (18): (Eq 17) (Eq 18)

From what has been discussed above, the prediction model of route travel time for a single route between stops based on the Kalman filter mainly consists of Eqs (6), (8), (17) and (18). The four essential equations can predict the route travel time of bus n on the whole route by rolling(these results are shown in S2 File, Table 2).

thumbnail
Table 2. Absolute and relative errors of the total travel time prediction of the whole route.

https://doi.org/10.1371/journal.pone.0262535.t002

  1. ii. Stop Dwell Time prediction Model (DTM)
  1. (1) Stop Dwell Time Prediction Model

Stop dwell time refers to the bus’s time at a stop due to events. According to the vehicle arrival process, stop dwell time includes passenger service time, acceleration and deceleration time, opening and closing door time, and additional delay time caused by queuing at the stop. Most passenger service time is when passengers require to board and disembark the bus. Acceleration and deceleration times, opening and closing door times are the same for the same type of bus on the same route. Additional delays caused by queuing occur at stops with multiple routes, and there are second dwell at longer stops. However, direct observation finds that when there is a queue at the stop, buses can often use the queuing time to complete the loading and unloading service. The time lost in queuing is considered negligible due to its small size.

Therefore, this paper only considers the difference in service time of passengers on and off the bus. The dwell time of the bus at the stop i+1 is mainly determined by the number of passengers arriving in a unit time (expressed by Eq (2)). The equation shows that H (i +1) can be obtained directly from the IC data. The only predictive value in this equation is the passenger arrival rate λ(i+1).

  1. (2) Passenger Arrival Rate prediction Model (PARM)

λ(i+1) is the number of passengers arriving per unit of time. The historical arrival rate λ(i+1) per stop can be obtained through IC data mining technology. In this paper, the Kalman filtering method is still used to predict the passenger arrival rate of stop i +1. The prediction model construction follows, VAR(localdata) can be expressed as follows: (Eq 19)

There are: (Eq 20) (Eq 21) (Eq 22) (Eq 23) (Eq 24)

The Kalman gain g (k + 1) and the loop gain a (k + 1), λ(i+1)(k+1) prediction model: (Eq 25) (Eq 26) (Eq 27)

Where,

g (k+1) is the gain of the Kalman filter in the period k +1;

a (k+1) is the loop gain in the period k +1;

e (k) is the filter error of period k, which is calculated from the previous cycle;

e (k+1) is the filter error of period k +1, which is used for the calculation of the following process;

par (k) is the passenger arrival rate between stops i and i +1 during the period k;

par1 (k+1) is the passenger arrival rate at stop i+1 during period k +1 in the previous day;

par2 (k+1) is the passenger arrival rate at stop i+1 during period k +1 in the previous two days;

par3 (k+1) is the passenger arrival rate at stop i+1 during period k +1 in the previous three days.

VAR(localdata) is the variance of the passenger arrival rate of " par1 (k+1), par2 (k+1), par3 (k+1) " during period k+1 between stops i and i +1 in the previous three days.

(Eq 28)

The Passenger Arrival Rate prediction Model (PARM) based on the Kalman filter is mainly composed of Eqs (25), (26), (27), and (28). Based on the above four essential equations, the passenger arrival rate of bus n in the period i +1 can be predicted by rolling to obtain the dwell time of each stop (these results are shown in S2 File, Table 3).

thumbnail
Table 3. The mean absolute error of predictive travel time of route 2 # (entire route).

https://doi.org/10.1371/journal.pone.0262535.t003

  1. 3) Prediction process. In conclusion, the travel time prediction model constructed above can predict the travel time of the whole route.

Step 1: Overall prediction

  1. Determine the target route predicted and its initial and terminal stops: determine the initial forecast period k +1, assume stop i as the initial stop, and predict the time of bus n arriving at stop i +n;
  2. Prepare the basic data required for prediction;
  3. i = 0;
  4. i = i+1;
  5. Executing Stop Dwell time prediction Module (DTM): to predict the dwell time of bus n at stop i, DWTn(i);
  6. Executing Route Travel time prediction Module (RTM): to predict the route travel time of bus n between stop i and i+1 during the k+1 period, RTn(i, i+1)(k+1);
  7. Sum, DTn(i) = ATn(i)+DWTn(i), ATn(i+1) = DTn(i) = RTn(i, i+1);
  8. Determine if i +1 = n, then end the operation; otherwise, return to Step (4) and continue the procedure until the end of the prediction.

After the repeated cyclic operation, the arrival time of bus n ATn(i+n) at stop i +n during period k+m can be obtained by stop, one by one (as shown in Fig 3).

Step 2–1: Built-in module (Stop Dwell Time Prediction Module (DTM))

  1. Initialize e (k) = 0, assuming stop i is the initial stop;
  2. The historical data of passenger arrival rate between stop i and i +1 for these four days (during period k +1 in the previous three days, during period k in the same day) can be obtained through the IC card system: par3 (k+1), par2 (k+1), par1 (k+1), par(k);
  3. The passenger arrival rate of stop i +1 in period k +1 can be predicted according to the Eqs (25), (26), (27), and (28);
  4. The headway of the corresponding stop in period k+1 of the predicted day can be obtained through the bus IC data;
  5. According to Eq (2), the dwell time of stop i +1 in period k+1 can be predicted.

Step 2–2: Built-in module (Route Travel Time Prediction Module (DTM))

  1. Initialize e (k) = 0, assuming stop i is the initial stop, and the AVL system can obtain its departure time, and it is set as DTn(i);
  2. The historical data of travel time between stop i and i +1 for these four days (during period k +1 in the previous three days, during period k in the same day) can be obtained through the IC card system: art3 (k+1), art2 (k+1), art1 (k+1), art(k);
  3. According to Eqs (6), (8), (17), and (18), the route travel time of bus n between stop i and i +1 in period k+1 can be predicted RTn(i, i+1)(k+1).

The prediction process is shown in Fig 4.

thumbnail
Fig 4. Travel time prediction process based on single route detection.

https://doi.org/10.1371/journal.pone.0262535.g004

IV. Case study

A. Data preprocessing

1) Circuit information.

This example selects route 2 in Madison, Wisconsin, located in the Madison metropolitan area. The chosen route is the section between N Frances Street in the east and N Midvale Blvd in the west and traverses the city’s center. The route goes through different road types and thus can comprehensively reflect the operational characteristics of buses under other road conditions (shown in S3 File, Figs 3 and 4).

2) Data information.

The IC card and AV data of four days on October 1, 2, 3, and 4, 2019 were selected as the primary data of the example, and the historical data of period k+1 on October 1, 2, and 3 and period k on October 4 were used to predict the data of period k+1 on October 4. Among them, 4,157 sets of travel time data (IC data) were used as the model’s input data, and 2,124 sets of AVL data were used as the validation data of the model.

B. Preliminary results

According to the characteristics of urban roads, in this paper, the day was divided into three time periods, with morning and evening peaks as the boundary:

  1. ■ Period 1: 7:00–9:00, morning peak;
  2. ■ Period 2: 17:00–19:00, evening peak;
  3. ■ Period 3: another period, flat peak.

Given these three periods, this paper will first analyze the change laws between these three periods and then analyze the change rule within each period.

1) Route segment between stops.

The average absolute error and relative error of the travel time prediction of the ten shifts were calculated. Table 1 shows the results.

Table 2 shows that the average absolute error of the travel time prediction between stops is concentrated between 11~16 seconds, and the average absolute error of the evening peak is slightly higher than that of the other two periods. The average relative error is higher than the whole route, concentrated in the range of 9% to 15%.

2) Whole route.

The travel time of the whole route is the total time taken by the bus between the initial and terminal stop (prediction results are shown in S2 File, Table 4). Table 2 shows the calculations of the absolute error and relative error of the total travel time prediction of the route of 10 shifts between 128 stops in the entire day.

Table 2 shows that the absolute error of the total travel time prediction for the ten shifts is within 2.25 minutes, with the maximum absolute error of 2.23 minutes and the minimum absolute error of only 0.17 minutes. The maximum relative error is 7%, and the minimum relative error is only 0.4%. At the same time, the absolute and relative errors of the morning, evening, and flat peaks are not significantly different, indicating that the prediction model can respond to the change of traffic conditions over time and can make an accurate prediction of travel time during peak hours.

In summary, the relative error of the model is within 15%, and the absolute error is concentrated in about 11~16 seconds when the route travel time between stops is taken as the prediction object. The relative error of the model is within 7%, and the absolute error is concentrated in 0~2.5 minutes when the whole route is taken as the prediction object. The forecast method proposed in this paper can accurately predict the travel time of buses, and the prediction effect of the whole route is better than that of the route segment between stops.

C. Evaluation

Travel time predictions for 235 groups of 128 sections between stops of route 2# were carried out throughout the day from 6:00 to 18:00. The following three forms were evaluated respectively in route segment between stops, whole route, and comparison with another prediction method.

1) Route segment between stops.

  1. i. Route segment 1 (CAMPUS & BABCOCK[ID#0809] W JOHNSON & CHARTER [ID#0581])

Fig 5 shows the predicted travel time for route segment 1 using this process (Campus & Babcock [ID#0809] W Johnson & Charter [ID#0581]).

thumbnail
Fig 5. Predicted result of travel time (route segment 1).

https://doi.org/10.1371/journal.pone.0262535.g005

  1. ii. Route segment 2 (W JOHNSON & CHARTER [ID#0581] W JOHNSON & MILLS [ID#0741])

Fig 6 shows the predicted travel time for route segment 2(W Johnson & Charter [ID #0581] W Johnson & Mills [ID #0741]).

thumbnail
Fig 6. Predicted result of travel time (route segment 2).

https://doi.org/10.1371/journal.pone.0262535.g006

  1. iii. Route segment 3 (W JOHNSON & MILLS [ID#0741] W JOHNSON & N PARK [ID#0435])

Fig 7 shows the predicted travel time for route segment 3 (W Johnson & Mills [ID #0741] W Johnson & N Park [ID #0435]).

thumbnail
Fig 7. Predicted result of travel time (route segment 3).

https://doi.org/10.1371/journal.pone.0262535.g007

  1. iv. Route segment 4 (W JOHNSON & PAKE [ID#0435] W JOHNSON & FRANCES [ID#0941])

Fig 8 shows the predicted result travel time for route segment 3 (W Johnson & Pake [ID #0435] W Johnson & Frances [ID #0941]).

thumbnail
Fig 8. Predicted result of travel time (route segment 4).

https://doi.org/10.1371/journal.pone.0262535.g008

2) Whole route.

The critical stop data (time points) across route 2# was taken for analysis and evaluation. The Mean Absolute Error (MAE) of the whole route was evaluated. Table 3 displays these results:

3) Comparison with other prediction models.

Since neural network models can guarantee real-time prediction and adequately control multiple influencing factors in public transit systems, previous researchers primarily used neural network models to predict travel time. Comparing and analyzing the current model’s prediction results against neural networks, a travel time prediction method based on a neural network model was introduced. The two forecasting methods’ Mean Relative Error (MRE), Root Squared Relative Error (RSRE), and Maximum Relative Error (MARE), were calculated. From the evaluation results, the MRE were all less than 20%, indicating that this model is a good prediction model. The calculation results are shown in Table 4.

Table 4 demonstrates that the Kalman filtering algorithm is more accurate and stable than the neural network, with less fluctuation and minor errors.

IV. Conclusions

The travel time prediction of public transit is one of the effective measures to improve service reliability and travel structure, alleviate traffic problems. The Kalman filter model has high precision in one-step-ahead prediction and uses computer software to calculate massive data. Under the background of the urban intelligent public transit system and big data, this paper focuses on an urban conventional transit system. The Kalman filter-based travel time prediction technology of an urban public transit system with various random traffic factors was studied based on AVL and IC data.

  1. Prediction model: The overall prediction model (including prediction steps and processes) was constructed: 1) Road travel Time prediction Model (RTM); 2) stop Dwell time prediction Model (DTM) and Passenger Arrival Rate prediction Model (PARM).
  2. Model evaluation: The model’s evaluation criteria and indices are given; The travel time of route #2 in Madison was selected for prediction, and the error analysis of the prediction results was carried out in combination with AVL data. The results show that the model can meet the accuracy requirements of the travel time prediction, and the prediction effect of the whole route is superior to that of the route segment between stops.

In this paper, the travel time considered only a single bus in a journey, which is the basis of passenger-oriented travel time predictions. The prediction model should be expanded to be more consistent with the actual application scenario of a conventional large-scale composite transit network. Due to the data’s particularity and the demand’s diversity and complexity, future research should focus on these points:

  1. Data mining: In practical applications, massive multi-source data is needed. Meticulous data collection, processing, and analysis are conducive to improving the accuracy of prediction results. Therefore, the construction and management of databases need further research. Data mining is an iterative process in which mining results are constantly applied to practice, the effect is tested, and the mining algorithm is improved. Further research is needed on the actual application effect, user evaluation, and improvement direction of data mining algorithm in the intelligent public transit system to promote the perfection and improvement of the prediction model.
  2. Prediction model of travel time: This paper only studies the travel time prediction method based on the Kalman filter. In future research, other commonly used prediction methods such as Long Short-Term Memory (LSTM) and comprehensive modeling can be combined to improve prediction accuracy.
  3. Levels of travel time prediction: In this paper, the travel time focuses on a single bus in a journey, which is the basis of traveler-oriented travel time predictions. In contrast, a trip consists of the sum of one or more bus journeys. Based on several routes for multiple buses, travel time prediction problems involving line selection and transfer will need to consider the transit system’s network capacity. For a large-scale network, the complexity will increase sharply with stops and routes. Therefore, making the method scalable to large networks should be studied.
  4. Promotion and application: Extensive cooperation and investment of enterprises and research institutes would benefit the use of the models described here. Special attention to the characteristics of those local enterprises, allowing measures to be adjusted to local conditions will ease the application and promotion of this technology. Properly promoted and applied, these models will contribute to developing and using intelligent public transit systems to meet the needs of passengers, operators, managers, and policymakers.

Acknowledgments

We would like to acknowledge Mr. Hongjie Liu for providing the part of data for the study. Additionally, special gratitude to Mr. Les Lauber for reviewing the language usage. Thanks to anonymous reviewers for their constructive comments and suggestions regarding the earlier version of this paper.

References

  1. 1. Ma J, Chan J, Ristanoski G, Rajasegarar S, Leckie C. Bus travel time prediction with real-time traffic information. Transportation Research Part C: Emerging Technologies. 2019;105: 536–549.
  2. 2. Niklas CP, Filipe R, Francisco CP. Multi-output bus travel time prediction with convolutional LSTM neural network. Expert Systems with Applications. 2019;120(4): 426–435.
  3. 3. Huang Z, Li Q, Li F, Xia JZ. A Novel Bus-Dispatching Model Based on Passenger Flow and Arrival Time Prediction. IEEE Access. 2019, 7: 106453–106465. ISBN: 2169–3536.
  4. 4. Kumar BA, Jairam R, Shriniwas SA, Lelitha V. Real-time bus travel time prediction using k-NN classifier. Transportation Letters. 2017, 8: 362–372.
  5. 5. Liu WP, Liu JC, Jiang HB, Xu BC, Lin HZ, Jiang GY, et al. WiLocator: WiFi-sensing based real-time bus tracking and arrival time prediction in urban environments. 2016 IEEE 36th International Conference on Distributed Computing Systems (ICDCS). IEEE, 2016. https://doi.org/10.1109/ICDCS.2016.31
  6. 6. Farooq MU, Shakoor A, Siddique AB. GPS based Public transit Arrival Time Prediction. 2017 International Conference on Frontiers of Information Technology (FIT). IEEE, 2017. https://doi.org/10.1109/FIT.2017.00021
  7. 7. Chen EH, Ye ZR, Wang C, Xu MT. Subway Passenger Flow Prediction for Special Events Using Smart Card Data[J]. IEEE Transactions on Intelligent Transportation Systems. March 2020, 21(3):1109–1120.
  8. 8. Zhang B, Chen SY, Ma YF, et al. analysis on spatiotemporal urban mobility based on online car-hailing data[J]. Journal of Transport Geography. 2020, 82:102568.
  9. 9. Zhang HL, Wu YK, Tan HC, et al. Understanding and Modeling Urban Mobility Dynamics via Disentangled Representation Learning. IEEE Transactions on Intelligent Transportation Systems. October 26, 2020: 1 – 11,
  10. 10. Liu Y, Lyu C, Liu ZY, Cao JD. Exploring a large-scale multi-modal transportation recommendation system[J]. Transportation Research Part C: Emerging Technologies. May 2021, Volume 126.
  11. 11. Chen CH. An arrival time prediction method for bus system. IEEE Internet of Things Journal. 2018, 5(5): 4231–4232.
  12. 12. Pang JB, Huang J, Du Y, Yu HT, Huang QM, Yin Baocai. Learning to Predict Bus Arrival Time from Heterogeneous Measurements via Recurrent Neural Network. IEEE Transactions on Intelligent Transportation Systems 2019, 20(9): 3283–3293. ISBN: 1524–9050.
  13. 13. Zhang J, Gu JH, Guan L, Zhang SQ. Method of predicting bus arrival time based on MapReduce combining clustering with neural network. IEEE 2nd International Conference on Big Data Analysis (ICBDA). IEEE, 2017. https://doi.org/10.1109/ICBDA.2017.8078828
  14. 14. Yang HF, Dillon TS, Chen YP. Optimized structure of the traffic flow forecasting model with a deep learning approach. IEEE transactions on neural networks and learning systems. 2017, 10: 2371–2381. pmid:27448371
  15. 15. Polson NG, Sokolov VO. Deep learning for short-term traffic flow prediction. Transportation Research Part C: Emerging Technologies. 2017, 79: 1–17. ISBN: 0968-090X.
  16. 16. Wu YK, Tan HC, Qin LQ, Ran B, Zhu XJ. A hybrid deep learning-based traffic flow prediction method and its understanding. Transportation Research Part C: Emerging Technologies. 2018, 90: 166–180.
  17. 17. Cristina H. Ph.D. Forum: Forecasting Public Transit Using Neural Network Models. 2017 IEEE International Conference on Smart Computing (SMARTCOMP). IEEE, 2017. https://doi.org/10.1109/SMARTCOMP.2017.7947031
  18. 18. Wichai T, Wasan PA, Sippakorn K. Bus arrival time prediction at any distance of bus route using deep neural network model. 2017 IEEE 20th International Conference on Intelligent Transportation Systems (ITSC). IEEE, 2017. https://doi.org/10.1109/ITSC.2017.8317891
  19. 19. Zhang KP, Liu ZJ, Zheng L. Short-term prediction of passenger demand in multi-zone level: temporal convolutional neural network with multitasks learning. IEEE Transactions on Intelligent Transportation Systems, 2020, 21(4):1480 – 1490. https://doi.org/10.1109/TITS.2019.2909571.
  20. 20. Zhang KP, Zheng LP, Liu ZJ, Jia N. A deep learning based multitask model for network-wide traffic speed prediction. Neurocomputing.2020, 396:438–450. https://doi.org/10.1016/j.neucom.2018.10.097.
  21. 21. Zheng L, Zhu C, Zhu N, He T, Dong N, Huang HL. Feature selection-based approach for urban short-term travel speed prediction. IET Intelligent Transport Systems. 2018, 12(6): 474–484.
  22. 22. Zhang KP, Jia N, Zheng L, Liu ZJ, A novel generative adversarial network for estimation of trip travel time distribution with trajectory data. Transportation Research Part C. 2019,108:223–244.
  23. 23. Liu Y, Lyu C, Liu X, Liu ZY. Automatic Feature Engineering for Bus Passenger Flow Prediction Based on Modular Convolutional Neural Network. IEEE Transactions on Intelligent Transportation Systems. April, 2021, 22(4):2349–2358,
  24. 24. Yang M, Chen C, Wang L, Yan XX, Zhou LP. Bus arrival time prediction using support vector machine with genetic algorithm. Neural Network World. 2016, 26(3):205–217.
  25. 25. Peng ZX, Jiang YL, Yang XL, Zhao ZG, Zhang L, Wang YT. Bus arrival time prediction based on PCA-GA-SVM. Neural Network World. 2018, 28(1): 87–104.
  26. 26. Yao BZ, Chen C, Cao QA, Jin L, Zhang MH, Zhu HB, et al. Short‐term traffic speed prediction for an urban corridor. Computer‐Aided Civil and Infrastructure Engineering. 2016, 7: 154–169.
  27. 27. Moridpour S, Anwar T, Sadat MT, Mazloumi E. A genetic algorithm-based support vector machine for bus travel time prediction. 2015 International Conference on Transportation Information and Safety (ICTIS). IEEE, 2015, 6: 264–270. https://doi.org/10.1109/ICTIS.2015.7232119
  28. 28. Lu LL, Wang J, He ZB, Chan CY. Real-time estimation of freeway travel time with recurrent congestion based on sparse detector data. IET Intelligent Transport Systems. September 2017, IET Intelligent Transport Systems 12(1).
  29. 29. Lu LL, He ZB, Wang J, Chen JF, Wang W. Estimation of lane-level travel time distributions under a connected environment. Journal of Intelligent Transportation Systems. February 3, 2021, 25(5): 501–512,
  30. 30. Lu LL, Wang J, Wu Y, Chen X, Chan CY. Real-time prediction model for vehicle individual travel time on an undersaturated signalized arterial. IEEE Intelligent Transportation Systems Magazine. April 30, 2021: 2–17.
  31. 31. Dhivyabharathi B, Hima ES, Vanajakshi L. Stream travel time prediction using particle filtering approach. Transportation Letters. 2018, 2: 75–82.
  32. 32. Dhivyabharathi B, Anil KB, Vanajakshi L. Real-time bus arrival time prediction system under Indian traffic condition. 2016 IEEE International Conference on Intelligent Transportation Engineering (ICITE). IEEE, 2016. https://doi.org/10.1109/ICITE.2016.7581300
  33. 33. Li JL, Gao J, Yang Y, Wei HR. Bus arrival time prediction based on mixed model. China Communications. 2017, 5: 38–47.
  34. 34. Huo JB, Fu X, Liu ZY, Zhang Q. Short-Term Estimation and Prediction of Pedestrian Density in Urban Hot Spots Based on Mobile Phone Data. IEEE Transactions on Intelligent Transportation Systems, July 26, 2021: 1–12.
  35. 35. Ji Bao, Qun Chen, Dandan Luo, Yuli Wu, Zuli Liang. Exploring the impact of signal types and adjacent vehicles on drivers’ choices after the onset of yellow. Physical A: Statistical Mechanics and its Applications, 2018, 500: 222–236.
  36. 36. Du MX; Liu JH, and Chen . Improving traffic efficiency during yellow lights using connected vehicles. Physical A: Statistical Mechanics and its Applications, 2021, 578.
  37. 37. Chen Q, and Luo DD. Flow feasibility condition analysis and design optimization of contraflow left-turn lanes at signalized intersections based on kinematic wave theory. TRANSPORTMETRICA B-TRANSPORT DYNAMICS, 2021, 9(1): 746–774.