Predicting the travel time of arterial traffic using particle filter with speed matrix

. Travel time prediction is an essential part of intelligent transportation system applications. However, the existing travel time prediction methods mainly focus on the freeway due to its simplicity and the high coverage of sensors and few researches have been conducted for the urban arterial road. Consequently, a travel time prediction algorithm based on particle filter is proposed in this paper to predict short-term travel time of the arterial traffic with historical floating car data and the concept of speed matrix is developed to illustrate the spatiotemporal properties of the arterial traffic. Unlike previous travel time prediction methods, the proposed algorithm uses particles with corresponding weights to model the traffic trend in the historical data instead of state-transition function and the weight for each particle are calculated with similarities between the speed matrix of the particle and the current traffic pattern. Moreover, a resampling process is developed to solve the degeneracy problem of the particles by replacing the low-weight particles with historical data. A real floating car dataset of 10357 taxis over a period of 3 months within Beijing is utilized to evaluate the performances of the algorithms. The proposed algorithm has the least errors by comparing with other three algorithms.


Introduction
As one of the best indicators for evaluation of the performances of the transportation system, accurate travel time data are crucial for efficient traffic management and transport planning [1,2]. All traffic manage centers are encouraged to provide travel time and incident information, which give useful information to travelers and help them to make smart route decisions [3][4][5]. Such information can help drivers choose the route to detour from the congested highways and provide additional capacity, which will reduce the burden of the traffic and help relieve the congestions. Moreover, reliable travel time prediction results enable establishing dynamic control strategies. As performance indicators, travel times data can also serve as a tool for comparing various traffic management strategies quantitatively. Accurate travel time can enhance traffic management systems by giving opportunities to react to the traffic changes proactively rather than passively.
In this paper, an algorithm is proposed to use the particle with corresponding weight to model the historical trend hidden in the historical data instead of building up a state-transition function with macroscopic physical model. After a new measurement arrives, the similarity between the historical traffic patterns represented by each particle and the current traffic pattern is calculated and the particles with low similarities are removed and resampled with SIR (sampling importance resampling). The concept speed matrix are developed to represent the spatial-temporal properties of the target segments and the similarities are calculated with speed matrix instead of a time sequence of speed which is used in most of the previous particle filter approaches. A floating car dataset from 10357 taxis over a period of 3 months within Beijing are utilized to evaluate the proposed approach. The results show that the proposed approach performs better than the nearest neighbor method and two kalman filter methods.

Generation of the speed matrix
Speed matrix is a concept used in many transportation applications to represent the traffic condition of all the roads in all the time slots under consideration and equation (1)  T={t ,t ,...,t } . In this paper, to demonstrate the spatiotemporal properties of the traffic condition of the target road r, the speed matrix is generated for all the segments whose distance to r is less than 3(which are the target road r, the neighboring segments of r and the neighboring segments of the neighboring segments of r). The time slots under consideration are from short past time t-p+1 to the current time slot t.

Particle filter approach for travel time prediction
After generating the speed matrix, the travel time can be predicted with the particle filter approach. The input for the particle filter approach is the current speed matrix generated from the received new floating car data for each time interval and the update of the measurement from Yt-1 to t Y is conducted by shifting the measurement time window one step forward. Each particle can be recognized as a speed matrix which represents the spatiotemporal traffic condition of the target road. The time update of each particle x to i t x is conducted by shifting the data one step ahead in the historical data. At the same time, the corresponding weight can be calculated as the similarities between the real-time traffic pattern and the historical traffic pattern. Consequently, the distribution of the travel time on the next time interval t+1 can be predicted as For multi-step prediction with prediction horizon p, the speed matrix is generated by moving forward p steps iteratively, but the weights for each particle are kept the same with the weight updated by the current measurement. So the travel time on t+p can be predicted as Then the rest of this section will present the detailed steps of the particle filter approach.
Initialization: Since there is no priori-knowledge about the initial states of the particles, the initial speed matrix should be assigned to all particles. For each particle i, the initialization process is conducted by randomly choosing the day index i 0 d and the time index i 0 j in that day. Then the initial speed matrix for that particle is constructed by selecting the corresponding historical data. Assume there are n segments whose distance to the target road r is less than 3 and the time slot index for day i 0 d and time i 0 j is i 0 t , then the initial speed matrix is shown in equation (2).
where i,j v represents the speed of road i at time slot j.

Time update process:
Since there is no state-transition function in the proposed approach, the time update process is conducted by propagating the states of each particle along the historical data sequence. For a particle i t-1 x at time t-1, the time update process is conducted by shifting the time index one step further and keeping the same day index, which are shown in equation (3)(4). The next process is trying to find out the particles that are not able to predict the travel time p steps ahead. These invalid particles are selected by moving the time index p steps ahead and check if there is available historical data on that time index. All the selected invalid particles are removed and will be resampled in the following steps. However, the similarities for different kinds of segments will have different impact on the target segment (the similarity between the traffic patterns of the target roads are more meaningful than the similarities between the traffic patterns of the neighboring segments). For the above reason, different weights are assigned to the similarities and the similarities are calculated as below:

 
In this paper, 1 2 λ ,λ are set to equal 0.7, 0.5 respectively. The reason for choosing the weight as above is that the roads whose distance is larger than 2 will have little spatial and temporal effect on the target road according to the similarity analysis. Moreover, obviously the more neighboring road will have larger effect on the target and the weight of the road are chosen according to experiment results. Thereafter, all the valid particles are sorted according to the weight in descending order and the top val N particles are maintained and the rest particles will be resampled in the next step. In this way, the invalid particles will be re-selected so that new particles with similar traffic pattern with the current traffic pattern can be selected.
Resampling: In the Measurement updating process mentioned in the last step, there is a common problem named degeneracy problem. The degeneracy problem is a problem that the variance of the weight can only increase in time, which results in that only one particle have a non-negligible weight after several iterations. Consequently, the particles need to be resampled for the reason that the concept of particle filter is to use a large number of particles to approximate the posterior function accurately. The basic idea of resampling is removing the particles with small weight and concentrating on the particles with large weight. A partial sampling importance resampling (SIR) is proposed instead of the traditional threshold-based resampling method, which will be discussed in detail below.
SIR is derived from the sequential importance sampling by sampling in different pre-chosen intervals instead of sampling uniformly in the whole data. The SIR approach can be easily updated and the importance is easily calculated. In the particle filter approach, the remaining Nval N invalid particles in the last step will be resampled in this step. First, the similarities i λ between the traffic pattern of each day i Y in the historical data (Assume there are D days of valid data in the historical data) and the current day c Y are calculated.
Next, the cumulative density intervals C are constructed based on the similarities i λ with equation (6). Finally, for each particle in the remaining Nval N invalid particles, a random value i σ is generated between [0, D c ] uniformly and determine which interval covers i σ .
If i σ is in the jth interval, the day index of this particle is set to be j and the time index is randomly selected. Moreover, the weight of this particle is set to be j λ . In this way, the day with closer similarity to the current traffic pattern has a larger probability to be selected in the resampling process.
Travel time prediction: In the proposed particle filter approach, the p-step ahead travel time prediction is estimated by shifting the time step of each particle along the historical data and keeping the same weight until a new measurement arrives. The average prediction results are calculated as the weighted average travel time of each particle as equation (7).

Data and environment set up
The evaluation of the proposed algorithm is conducted based on a real probe vehicle trajectory dataset [6,7], which are collected by the Microsoft research Center for the project T-drive. T-drive is a smart driving direction services based on GPS trajectories of a large number of taxis. It helps user find out the practically fastest path to a destination at a given departure time. The collected dataset contain the GPS data from 10357 taxis over a period of 3 months (from 2013.09 to 2013.12) within Beijing. The total number of GPS points reaches 15 million and the total distance of the trajectory reaches 9 million kilometers. The average sampling interval is about 177 seconds with a distance about 623 meters. Each data sequence consists of the taxi ID, data time, longitude, latitude.

Evaluation of the algorithms
Two Kalman filters [8,9] and KNN are used in the evaluation of the method as comparative method. The MAE and MAPE of the four travel prediction algorithms are represented in Table 1. As shown in the table, the proposed particle filter approach produces a better performance over other methods in all predictions horizons. Among all the prediction methods, the first kalman filter with the state-transition function which models the ratio between the measurement of time t-1 and t-2 produces the worst performances. The results of the first kalman filter show a degeneracy problem, which means that the errors produced by this method increase significantly as the prediction horizon increases. The reason for this degeneracy problem lies in the assumption of the method that the short-term traffic pattern will propagate in the near future. However, when the prediction horizon is large, this assumption may not be true. The KNN method outperforms both kalman filters in all prediction horizon but it's not as good as the proposed algorithm. Moreover, both the KNN and the proposed algorithms produce consistent results over a long period prediction time (1 hour). The relative MAPE increase from 10 min to 1 hour for the KNN method and the proposed method are 41.2% and 37.2% respectively, which is much smaller than both kalman filters (65.9% and 68.8% respectively).

Parameter determination
A sensitivity test is conducted to demonstrate the impact of three parameters: the length of the data sequence p, the number of particles N and the resampling ratio 1-Nval/N. The optimal value for these parameter are also determined in the sensitivity test. First, the value ranging from 1 to 10 for the length of the data sequence p are used to calculate the average MAPE for three prediction horizons(10, 30 and 60 minutes) and the results are shown in Figure 1. From Figure 2, we can see that the least error is obtained when p equals to 4, which means that the least error can be obtained by utilizing the previous 40 minutes travel pattern. The reason for this may lie in the fact that there is an optimal number of utilizing the historical data. When the number is too small, there is not enough information about the current traffic pattern. However, when the number is too large, some historical data are too old to bring any valuable information about the current traffic pattern but bring some disturbances for predicting the short-term travel time. Moreover, different numbers of particles from 10 to 400 are evaluated by calculating the average MAPE for three prediction horizons (10, 30 and 60 minutes). The results are shown in Figure 2 and the MAPE decreases as the number of particles increases, but when the number is larger than 100, the MAPE almost remains the same. Therefore, the optimal value of N is 100. Lastly, the ratio of resampling is investigated by calculating the MAPE for the value ranging from 10% to 90%. The results are shown in Figure 3 and the least error reaches when the value of the resampling ratio equals to 20%.

Conclusions
A travel time prediction algorithm based on particle filter is proposed in this paper to predict short-term travel time with historical floating car data and the concept of speed matrix is developed to illustrate the spatiotemporal properties of the traffic pattern. First, a large number of particles are initialized with each particle representing a historical data sequence with a randomly chosen day index and time index. Then, unlike previous travel time prediction methods, the proposed algorithm uses particles with corresponding weight to model the traffic trend in the historical data instead of using the state-transition function. Moreover, the weights for each particle are calculated with similarities between the speed matrix of the particle and the speed matrix of the current traffic pattern. Finally, a resampling process is developed to solve the degeneracy problem of the particles by removing the low-weight particles with historical data that has high similarity with current traffic pattern and the short-term travel time is predicted by the weighted travel time of all particles. However, the performances of the proposed algorithms is still not as good as the