A Method to Estimate URT Passenger Spatial-Temporal Trajectory with Smart Card Data and Train Schedules

: Precise estimation of passenger spatial-temporal trajectory is the basis for urban rail transit (URT) passenger ﬂow assignment and ticket fare clearing. Inspired by the correlation between passenger tap-in / out time and train schedules, we present a method to estimate URT passenger spatial-temporal trajectory. First, we classify passengers into four types according to the number of their routes and transfers. Subsequently, based on the characteristic that passengers tap-out in batches at each station, the K-means algorithm is used to assign passengers to trains. Then, we acquire passenger access, egress, and transfer time distribution, which are used to give a probability estimation of passenger trajectories. Finally, in a multi-route case of the Beijing Subway, this method presents an estimation result with 91.2% of the passengers choosing the same route in two consecutive days, and the di ﬀ erence of route choice ratio in these two days is 3.8%. Our method has high accuracy and provides a new method for passenger microcosmic behavior research.


Introduction
Urban rail transit (URT) passenger route choice behavior is the core of passenger flow assignment and ticket fare clearing [1]. Under the condition of network operation and seamless transfer, passengers have plenty of routes to choose, which makes the estimation of route choice behavior difficult. Factors such as the design of the station, transfer convenience, and station service influence passenger behavior, making the estimation of passenger behavior very difficult. With the continuous growth of passenger volume, URT operation needs more precise estimation of passenger flow distribution. The precise estimation of passenger spatial-temporal trajectory is of great significance to station operation and train scheduling.
Traditional research adopts expected utility theory (EUT) to describe passenger route choice behavior. The EUT-based approach analyzes the factors considered by passengers when choosing a route such as the travel motivation, travel time, and transfer convenience [2]. By considering all these factors, an EUT-based model can predict the route choice behavior of passengers. This approach estimates passenger route choice result but ignores the spatial-temporal details of passengers in URT system. The EUT method has limitations when passenger flow distribution and evolution in smaller time granularity is needed. Smart card data collected by Passenger Automated Fare Collection System (AFC) provides a new idea for estimating passenger spatial-temporal trajectory. Compared with the EUT-based approach, the AFC data-based approach analyzes the passenger choice result rather than predicting passenger choice. And the result of data-based approach could in turn calibrate the parameters of the EUT-based model. Passenger trajectory estimation based on smart card data has attracted the attention of researchers in recent years [3]. It has the following advantages:

1.
Large data volume and easy access. The AFC system records millions of passenger travel data every day, which has lower cost to obtain comparing to traditional manual surveys.

2.
Provides actual RP data. Smart card data are all actual RP (Revealed Preference) data, which have higher authenticity than SP (Stated Preference) survey. 3.
Provides abundant hidden information. Each single smart card data only records simple information such as tap-in, tap-out time and station number, but large-scale smart card data can provide abundant hidden information, especially when combined with the train schedule data.
However, the existing methods for estimating passenger trajectory using smart card and train operation data still have some shortcomings. For example, statistical analysis methods from a macro perspective can hardly describe the travel behavior of individual passengers, while the methods from a micro perspective usually neglect the implicit information of passenger groups. How to mine passenger travel information from AFC data set and train schedules as much as possible become an important issue. In this paper, we cluster passenger tap-in and tap-out time with trains to estimate the distribution of passenger access, egress, and transfer time based on smart card data and train schedules. Then, we present a probabilistic method for estimating passenger spatial-temporal trajectory.
The paper is structured as follows. Section 2 reviews the earlier literature of passenger trajectory estimation. Section 3 is the backbone of this paper: first, we introduce the data set and passenger type classification; then, an estimation method for passenger access, egress and transfer time distribution is presented; finally, we present the passenger spatial-temporal trajectory estimation method. Section 4 delivers a case study of this method in Beijing Subway.

Literature Review
The passenger route choice problem is the core of the passenger flow assignment and ticket fare clearing. As the URT system usually adopts seamless transfer, the passenger travel information recorded by the AFC system cannot reflect the passenger choice behavior. To cope with this problem, researchers have devoted significant effort to passenger behavior modeling. An important modeling idea is to use the expected utility theory to describe the passenger choice behavior, assuming that passengers choose the route with the highest utility [4][5][6]. However, different from the urban road system, the increase of passenger flow in an URT route does not significantly affect the travel time on this route. Therefore, the route choice model based on utility maximization may cause the result of passenger flow assignment deviate from the truth. Compared with the deterministic utility theory (DUT), the random utility theory (RUT) is an expansion under the framework of the EUT. The RUT-based models can make up for the defect of DUT-based models by introducing a random error. A typical RUT-based model is the Logit model [7][8][9][10], which assumes that the utility random term is independent and obeys the Gumbel distribution. Because the Logit model assumes that the options are independent and has IIA characteristics, this assumption cannot be satisfied when the alternative route contains overlapping sections. With the deepening of research, the defects of the Logit model are improved in its application. To solve this problem, one solution is to introduce the Nested Logit model [11]. As the Nested Logit model may cause lots of parameters to be estimated and result in a heavy calculation burden, researchers try to make the alternative routes as independent as possible by simplifying the relationship between overlapping routes. The Path Size Logit (PSL) model built by Ben-Akiva [12], the Path Size Correction Logit (PSCL) model built by Bliemer [13], and the Recursive Logit (RL) model built by Nassir [2] adopt the above idea. In order to improve the EUT-based model, methods for fast route search are also applied [14].
Even though the EUT-based approach can describe the choice behavior of passengers, the precise spatial-temporal trajectories of passengers cannot be deduced by the EUT-based methods. On the other hand, the EUT-based methods need a large number of passenger choice results to calibrate parameters. Traditional passenger behavior research collects passenger travel details by Stated Preference (SP) or Revealed Preference (RP) survey, which is not only costly but also limited in data volume. Smart card data provides a new means for travel information collection. The methods for passenger route choice estimation based on smart card data can be divided into two categories-the aggregate method and the disaggregate method.

The Aggregate Method
The idea of the aggregate method is to mine effective information from large-scale smart card data by statistical analysis. One strategy is to study the relationship between passenger volume and individual behavior. Through analyzing historical smart card data, Silva et al. [15] proposed a method to predict passenger demand during transit disruption. Similarly, a method for estimating the number of passengers with different behaviors in a disruption event based on large scale smart card data was proposed by Sun et al. [16]. Chen et al. [17] proposed a method to analyze metro passenger travel distance by using smart card data. Further, Yu et al. [18] analyzed the space-time variation of passenger flow and commuting characteristics of residents using smart card data from the Nanjing metro.
Another strategy is to mine information hidden in passenger travel time. Sun et al. [19] used a Bayesian approach to estimate parameters such as link travel time, transfer time, and route choice ratio. The core idea of this approach is to mine the correlation between the travel time data set and those parameters. Lee et al. [3] constructed a Gaussian mixture model to analyze passenger travel time and estimated route choice ratio according to travel time distributions. Li et al. [20] adopted a Synchronous clustering algorithm to analyze travel time data trimmed by train schedules, and each cluster represents an effective route. In addition to the above statistical methods, scholars have introduced data fusion technology to estimate passenger route choice behavior. Kusakabe et al. [21] proposed a data fusion technology based on a naive Bayesian method, which fuses the SP survey and smart card data. This approach makes up for the shortcoming of smart card data which lack of personal information of passengers. In summary, the aggregate methods are applicable to the macroscopic study of passenger behavior because they analyze the aggregated characteristics of passenger groups and ignore individual behaviors.

The Disaggregate Method
The disaggregate method uses the data of typical passengers as a reference to accurately analyze behaviors of other passengers and is usually combined with train schedules. The difficulty of passenger trajectory estimation is that the traveling process in URT may include many links, such as entry walking, waiting a train, riding in train, transfer walking, and exit walking. Except for the fixed time of riding in train, all these link travel times are difficult to estimate due to passenger individual difference. Researchers had supplemented data through manual surveys. Zhu et al. [22] investigated the access and egress walking distance of each station and proposed a probabilistic Passenger-to-Train Assignment Model based on smart card data and train schedules. Although this model has strongly interpretation ability, it has weakness that the manual survey could not reflect the distribution of real passenger flow due to congestion in rush hours.
To solve these problems, a solution strategy is to simplify passenger behavior by putting forward reasonable assumptions. Under the assumption that passengers will choose the train which has minimum waiting time, Kusakabe et al. [23] took advantage of the difference between suburban railway trains, and estimated passengers' train choice behavior. Zhou et al. [24] limited access and egress time to a certain range and assumed that the waiting time at each station are very close. Similarly, Sun et al. [25] assumed that passengers have the same fail to board (FtB) probability at the same station during a short period of time. According to this assumption, the passenger trajectories could be estimated by the timetable. All these methods can easily provide passenger trajectories, but due to the idealized assumptions, their estimation results may differ from actual behaviors of passengers.
Another strategy is to mine information from some typical passengers and carry out the estimation rely on their travel information. Sun et al. [26] noticed that the smart card data contains "typical passengers" who have the shortest travel time between the same OD pairs and inferred that these typical passengers' waiting time were zero. Using the travel time of such typical passengers and the train schedules, the access and egress time of each station, and then the trajectories of passengers can be inferred. This approach was expanded to transfer passengers by Zhang et al. [27], Zhao et al. [28], and Zhao et al. [29]. Hong et al. [30] and Kim et al. [31] found that the tap-out time of passengers were concentrated in a short time after train arrival, which caused passenger arrival waves at fare gates. According to this characteristic, they proposed the concept of the "reference passenger" and estimated passenger trajectory by building a relationship between passengers and the trains. Hörcher et al. [32] classified passengers according to the number of their routes and transfers, and the route choice behavior of passengers can be deduced by using passengers who have a relatively simple trip as a reference.
In summary, the core idea of disaggregate methods is to mine typical passenger behaviors. By combining typical passenger information with train schedules, researchers can provide precise estimation of passenger trajectories. Compared with aggregate methods, disaggregate methods are applicable to the microscopic study of passenger behavior. The estimation accuracy of the disaggregate methods rely on typical passengers. However, due to the complexity of URT passenger behavior, the estimation based on passenger individuals may cause errors.
In this paper, we propose an approach combining the advantages of aggregate methods and disaggregate methods. We utilize the hidden information of passenger group and also give precise microscopic trajectory estimation.

Data and Assumptions
The smart card data and train schedules used in this paper were provided by Beijing Subway, the urban rail operator of Beijing. Smart card number, tap-in time, tap-in station, tap-out time, and tap-out station were completely recorded in the AFC system. The train schedules recorded the arrival and departure time of trains at each station.
This paper uses the access, egress, and transfer time distribution of each station to estimate passenger travel trajectory. However, those time distributions of each station will be different in each period. In order to simplify the problem, we think those distributions of the same station remain unchanged in a short period of time (for example, 30 min). Then, we have the following reasonable assumptions:

1.
Passengers riding to the same direction in the same station have the same access time distribution.

2.
Passengers arriving from the same direction in the same station have the same egress time distribution. 3.
Passengers transfer to the same direction in the same transfer station have the same transfer time distribution.

Passenger Classification
With the expansion of URT network, there are massive routes for the same OD trip. But some obviously unreasonable routes will not be considered by passengers. We call the "effective route" a route that passengers might consider. In order to balance the computational complexity and the number of alternative routes, we use 1.5 times the shortest route travel time as the effective route threshold [32], that is, only the routes with travel time less than 1.5 times the shortest route will be considered by passengers. According to the number of effective routes and the transfer number of a route, we classify passengers into the following four classes, and their travel process is shown in Figure 1.
Type A passengers have a single effective route and no transfer in the route; Type B passengers have a single effective route and one transfer in the route; Type C passengers have a single effective route and two or more transfer in the route; Type D passengers have multiple effective route. The purpose of passenger classification is to select passengers whose routes are unambiguous, and we use their trip information to estimate the choice of other passengers whose routes are ambiguous. Hörcher et al. [32] classified passengers into seven classes; they selected passengers with unique spatial-temporal trajectory as a reference to estimate passenger walking time distribution. However, according to Zhu et al. [22], passengers with unique spatial-temporal trajectory always have higher walking speed than other passengers. Taking these passengers as a reference may cause errors. Therefore, this paper presents an unbiased sampling method to obtain reference passengers and uses their trip information to estimate passenger walking time distribution.

Passenger Spatial-Temporal Trajectory Estimation
The spatial-temporal trajectory candidates of each type passengers are shown in Figure 2. In this section, we provide a method to find the true trajectory for each type of passengers. We propose a clustering-based approach to estimate the spatial-temporal trajectory of Type A passengers. We then use the access and egress time distribution acquired from the Type A passengers to estimate the spatial-temporal trajectory of Type B, C, and D passengers. The estimation process is shown in Figure  1. The purpose of passenger classification is to select passengers whose routes are unambiguous, and we use their trip information to estimate the choice of other passengers whose routes are ambiguous. Hörcher et al. [32] classified passengers into seven classes; they selected passengers with unique spatial-temporal trajectory as a reference to estimate passenger walking time distribution. However, according to Zhu et al. [22], passengers with unique spatial-temporal trajectory always have higher walking speed than other passengers. Taking these passengers as a reference may cause errors. Therefore, this paper presents an unbiased sampling method to obtain reference passengers and uses their trip information to estimate passenger walking time distribution.

Passenger Spatial-Temporal Trajectory Estimation
The spatial-temporal trajectory candidates of each type passengers are shown in Figure 2. In this section, we provide a method to find the true trajectory for each type of passengers. We propose a clustering-based approach to estimate the spatial-temporal trajectory of Type A passengers. We then use the access and egress time distribution acquired from the Type A passengers to estimate the spatial-temporal trajectory of Type B, C, and D passengers. The estimation process is shown in Figure 1.

Type A Passenger
The Type A passenger has the simplest travel process and unambiguous route. Therefore, we estimate the access and egress time distribution based on smart card data of Type A passengers and train schedules. We show the passenger tap-out time of Beijing Subway Xierqi station in Figure 3. We can see passenger clustering is significant during off-peak hours (Figure 3a). Inspired by this characteristic, Zhang et al. [27], Zhao et al. [28], and Zhao et al. [29] chose the first tapping-out passengers from each cluster as a reference. Hong et al. [30] put forward the concept "alighting and boarding time intervals" based on tapping-out passenger clusters and used these time intervals to assign passengers to trains. As shown in Figure 3b, during peak hours, the tapping-out passenger clusters may overlap each other due to higher passenger volume and lower train interval. This makes it difficult to identify passenger clusters only by observation. In this paper, we present a clustering approach taking both passenger tap-in and tap-out time into account to directly estimate which train the Type A passengers rode.  The tap-in and tap-out time distribution of passengers riding from Shahe station to Xierqi station on Beijing Subway Line Changping is shown in Figure 4. We can see notable clusters of passengers, and each cluster corresponds to a train which the passengers rode. We find that passengers with

Type A Passenger
The Type A passenger has the simplest travel process and unambiguous route. Therefore, we estimate the access and egress time distribution based on smart card data of Type A passengers and train schedules. We show the passenger tap-out time of Beijing Subway Xierqi station in Figure 3. We can see passenger clustering is significant during off-peak hours (Figure 3a). Inspired by this characteristic, Zhang et al. [27], Zhao et al. [28], and Zhao et al. [29] chose the first tapping-out passengers from each cluster as a reference. Hong et al. [30] put forward the concept "alighting and boarding time intervals" based on tapping-out passenger clusters and used these time intervals to assign passengers to trains. As shown in Figure 3b, during peak hours, the tapping-out passenger clusters may overlap each other due to higher passenger volume and lower train interval. This makes it difficult to identify passenger clusters only by observation. In this paper, we present a clustering approach taking both passenger tap-in and tap-out time into account to directly estimate which train the Type A passengers rode.

Type A Passenger
The Type A passenger has the simplest travel process and unambiguous route. Therefore, we estimate the access and egress time distribution based on smart card data of Type A passengers and train schedules. We show the passenger tap-out time of Beijing Subway Xierqi station in Figure 3. We can see passenger clustering is significant during off-peak hours (Figure 3a). Inspired by this characteristic, Zhang et al. [27], Zhao et al. [28], and Zhao et al. [29] chose the first tapping-out passengers from each cluster as a reference. Hong et al. [30] put forward the concept "alighting and boarding time intervals" based on tapping-out passenger clusters and used these time intervals to assign passengers to trains. As shown in Figure 3b, during peak hours, the tapping-out passenger clusters may overlap each other due to higher passenger volume and lower train interval. This makes it difficult to identify passenger clusters only by observation. In this paper, we present a clustering approach taking both passenger tap-in and tap-out time into account to directly estimate which train the Type A passengers rode.  The tap-in and tap-out time distribution of passengers riding from Shahe station to Xierqi station on Beijing Subway Line Changping is shown in Figure 4. We can see notable clusters of passengers, and each cluster corresponds to a train which the passengers rode. We find that passengers with The tap-in and tap-out time distribution of passengers riding from Shahe station to Xierqi station on Beijing Subway Line Changping is shown in Figure 4. We can see notable clusters of passengers, and each cluster corresponds to a train which the passengers rode. We find that passengers with longer egress time also have longer access time than others. This consistent with the fact that passenger walking speed is stable during the whole trip. Therefore, by taking both the tap-in and tap-out time of Type A passengers into account, the passenger overlapping problem could be solved to a certain extent.
longer egress time also have longer access time than others. This consistent with the fact that passenger walking speed is stable during the whole trip. Therefore, by taking both the tap-in and tapout time of Type A passengers into account, the passenger overlapping problem could be solved to a certain extent. In this paper, we use the K-means clustering algorithm [33] to cluster passengers according to their tap-in and tap-out time. The K-means algorithm has the advantages of convenient and fast calculation. This algorithm iteratively updates the clustering center until the result no longer changes. The K-means algorithm has a disadvantage in that the number of clusters k needs to be given in advance. However, as the train schedules are known, the number of clusters k is equal to the number of trains running between these two stations. The access time contains access walking and waiting time and is far longer than the egress time due to failing to board in peak hours. Therefore, using Euclidean distance to directly calculate the distance between each sample data and cluster centers may overestimate the effect of access time. We present a scaling factor to zoom out the tap-in time of passengers. The distance between sample data and cluster center is calculated as where is the data set of Type A passengers; is the number of trains/clusters, ( , ) are the tap-in and tap-out time of passenger ; ( , ) are the coordinate of the th cluster center; is the scaling factor between 0 and 1 which depends on the degree of "fail to board" and the headway of trains. For example, if a passenger fails to board one train due to the limit of train capacity, his access time will add an extra headway time. The more passengers fail to board or the higher the headway time is, the closer the value of is to 0. Conversely, the value of is closer to 1. According to the clustering algorithm, each passenger from station O to station D will be assigned to a certain train . The access time and egress time of passenger could then be deduced by train schedules. By collecting the and of station o and d in the same period of time we can obtain the access time distribution of station o and the egress time distribution of station d.

Type B Passenger
The trip of Type B passengers contains one transfer. As shown in Figure 2b, a Type B passenger ∈ may have several spatial-temporal trajectory candidates in his available trajectory set = ( , , … , ). The diversity of the trajectories makes it difficult to estimate the true one directly In this paper, we use the K-means clustering algorithm [33] to cluster passengers according to their tap-in and tap-out time. The K-means algorithm has the advantages of convenient and fast calculation. This algorithm iteratively updates the clustering center until the result no longer changes. The K-means algorithm has a disadvantage in that the number of clusters k needs to be given in advance. However, as the train schedules are known, the number of clusters k is equal to the number of trains running between these two stations. The access time contains access walking and waiting time and is far longer than the egress time due to failing to board in peak hours. Therefore, using Euclidean distance to directly calculate the distance between each sample data and cluster centers may overestimate the effect of access time. We present a scaling factor α to zoom out the tap-in time of passengers. The distance between sample data and cluster center is calculated as where P A is the data set of Type A passengers; k is the number of trains/clusters, (x in j , x out j ) are the tap-in and tap-out time of passenger x j ; (µ in i , µ out i ) are the coordinate of the ith cluster center; α is the scaling factor between 0 and 1 which depends on the degree of "fail to board" and the headway of trains. For example, if a passenger fails to board one train due to the limit of train capacity, his access time will add an extra headway time. The more passengers fail to board or the higher the headway time is, the closer the value of α is to 0. Conversely, the value of α is closer to 1.
According to the clustering algorithm, each passenger x od j from station O to station D will be assigned to a certain train train i .

Type B Passenger
The trip of Type B passengers contains one transfer. As shown in Figure 2b, a Type B passenger x j ∈ P B may have several spatial-temporal trajectory candidates C j l in his available trajectory set C j = (C j 1 , C j 2 , . . . , C j n ). The diversity of the trajectories makes it difficult to estimate the true one directly through clustering. So, we present a probabilistic approach to estimate the trajectory of the Type B passengers based on the access and egress time distribution f o acc and f d egr . First, we build an available spatial-temporal trajectory set C j = (C j 1 , C j 2 , . . . , C j n ) for all x j ∈ P B according to these basic constraints: The probability that C j l being the true trajectory could be calculated by We choose the trajectory with maximum probability as the estimation result, and the transfer time trans tr j,l of passenger x j will be stored in the data set of transfer station tr to estimate the transfer time distribution f tr trans .

Type C Passenger
The trip of Type C passenger contains multiple transfers. We use the access, egress, and transfer time distribution obtained from Type A and B passengers to estimate the trajectory of Type C passengers. The transfer stations in the trajectory of Type C passengers are denoted by Tr = (tr1, tr2, . . . , trn). Like the Type B passengers, the available trajectory set C j of the Type C passengers is shown in Figure 2c. The probability that C j l being the true trajectory can be calculated by Then, we choose the trajectory with maximum probability as the estimation result.

Type D Passenger
The trip of Type D passenger contains multiple routes, and this makes it difficult to estimate their trajectories. To estimate the trajectory of a Type D passenger, we need to calculate the probability of all his available trajectories in the set C j = (C j 1 , C j 2 , . . . , C j n ) (as shown in Figure 2d). For each alternative trajectory, its probability P D (C j l ) could be calculated by formula (5) or (6) according to the number of transfers. Finally, the trajectory C j l with maximum probability P D (C j l ) is estimated as the true one.

Case Study
We take a typical OD pair (Pingxifu to Xierqi) in the morning rush hours (07:30-09:30) of two consecutive days (21-22 December 2016) in the Beijing Subway as an example to show the estimation process of our method. There were 207 and 199 passengers traveled between Pingxifu and Xierqi during this same period in these two days separately. Only 159 of them traveled both the consecutive days. As these two days are weekdays, we can think of these passengers as commuters and their choice behavior is relatively stable. Beijing Subway operates 19 metro lines with 345 stations, which forms a complex network by the end of January 2017. Passengers from Pingxifu to Xierqi station have two effective routes and belong to the Type D passenger. As shown in Figure 5, we choose this OD pair because the travel time of these two routes are extremely close. According to the train schedule, riding time of route 1 and route 2 are separately 15 minutes 33 seconds and 15 minutes 29 seconds, and both the two routes have one transfer. Obviously, it is difficult to identify the actual routes by using the EUT based methods or AFC based aggregate methods.
two effective routes and belong to the Type D passenger. As shown in Figure 5, we choose this OD pair because the travel time of these two routes are extremely close. According to the train schedule, riding time of route 1 and route 2 are separately 15 minutes 33 seconds and 15 minutes 29 seconds, and both the two routes have one transfer. Obviously, it is difficult to identify the actual routes by using the EUT based methods or AFC based aggregate methods.

Access and Egress Time Estimation
First, we carried out the clustering procedure introduced in Section 3.3.1 to estimate the trajectories of Type A passengers between OD pairs of Pingxifu-Zhuxinzhuang, Zhuxinzhuang-Xierqi, and Huoying-Xierqi. Due to the congestion in morning rush hours, we set the scaling factor to 0.15 to avoid overestimate the role of tap-in time in clustering. Clustering result of passengers are shown in Figure 6. We can obtain the access time of Pingxifu station by the clustering of Pingxifu-Zhuxinzhuang and obtain the egress time of line Changping and line 13 Xierqi station by the clustering of Zhuxinzhuang-Xierqi and Huoying-Xierqi respectively. The access time distribution of Pingxifu station and egress time distribution of Xierqi station are shown in Figure 7. Similar to the conclusion of Hong et al. [30], the generalized extreme value distribution fits the access time and egress time better than the normal distribution.

Access and Egress Time Estimation
First, we carried out the clustering procedure introduced in Section 3.3.1 to estimate the trajectories of Type A passengers between OD pairs of Pingxifu-Zhuxinzhuang, Zhuxinzhuang-Xierqi, and Huoying-Xierqi. Due to the congestion in morning rush hours, we set the scaling factor α to 0.15 to avoid overestimate the role of tap-in time in clustering. Clustering result of passengers are shown in Figure 6. We can obtain the access time of Pingxifu station by the clustering of Pingxifu-Zhuxinzhuang and obtain the egress time of line Changping and line 13 Xierqi station by the clustering of Zhuxinzhuang-Xierqi and Huoying-Xierqi respectively. The access time distribution of Pingxifu station and egress time distribution of Xierqi station are shown in Figure 7. Similar to the conclusion of Hong et al. [30], the generalized extreme value distribution fits the access time and egress time better than the normal distribution.
two effective routes and belong to the Type D passenger. As shown in Figure 5, we choose this OD pair because the travel time of these two routes are extremely close. According to the train schedule, riding time of route 1 and route 2 are separately 15 minutes 33 seconds and 15 minutes 29 seconds, and both the two routes have one transfer. Obviously, it is difficult to identify the actual routes by using the EUT based methods or AFC based aggregate methods.

Access and Egress Time Estimation
First, we carried out the clustering procedure introduced in Section 3.3.1 to estimate the trajectories of Type A passengers between OD pairs of Pingxifu-Zhuxinzhuang, Zhuxinzhuang-Xierqi, and Huoying-Xierqi. Due to the congestion in morning rush hours, we set the scaling factor to 0.15 to avoid overestimate the role of tap-in time in clustering. Clustering result of passengers are shown in Figure 6. We can obtain the access time of Pingxifu station by the clustering of Pingxifu-Zhuxinzhuang and obtain the egress time of line Changping and line 13 Xierqi station by the clustering of Zhuxinzhuang-Xierqi and Huoying-Xierqi respectively. The access time distribution of Pingxifu station and egress time distribution of Xierqi station are shown in Figure 7. Similar to the conclusion of Hong et al. [30], the generalized extreme value distribution fits the access time and egress time better than the normal distribution.

Transfer Time Estimation
In order to obtain the transfer time distributions, we estimate the trajectories of Type B passengers between OD pairs of Yuzhilu-Xierqi and Huidong-Xierqi based on the method introduced in Section 3.3.2. The transfer time distribution of Zhuxinzhuang and Huoying station is shown in Figure 8. Similar to the access and egress time distribution, the generalized extreme value distribution fits the transfer time better than the normal distribution.

Passenger Spatial-Temporal Trajectory Estimation
As introduced in Section 3.3.3, we use the depth-first algorithm to search the feasible spatialtemporal trajectories of Pingxifu-Xierqi passengers under the constraints of Equations (2)-(4). By calculating Equation (5), we get the probability of each spatial-temporal trajectories for each passenger. The trajectory with highest probability for a passenger is considered to be the true one.
To verify the accuracy of this method, 159 passengers who traveled from Pingxifu to Xierqi in the same period (07:30-9:30) of two consecutive days (21-22 December 2016) were selected to compare their route choice in these two days. In most cases, commuters tend to choose a fixed route every day. Even if some commuters change their route choice in two consecutive days, the route choice ratio of the same OD pair is usually stable. In our case, 145 of the 159 passengers choose the same route in two consecutive days, accounting for 91.2%. Route 1 had a higher chosen ratio, which were 66.0% and 69.8% in these two days with a difference of 3.8% (Figure 9). The reason for this difference may be related to the day-to-day route choice behavior of passengers. Generally speaking, the route choice proportion estimated by this method is relatively stable, which verifies the accuracy of our method.
We also analyzed the reason for the higher chosen proportion of Route 1. In our case, these two routes have extremely close travel time and the same transfer number, but Route 2 has a longer transfer walking time (3 min) than Route 1 (1.5 min). Although Route 1 needs to transfer to Line

Transfer Time Estimation
In order to obtain the transfer time distributions, we estimate the trajectories of Type B passengers between OD pairs of Yuzhilu-Xierqi and Huidong-Xierqi based on the method introduced in Section 3.3.2. The transfer time distribution of Zhuxinzhuang and Huoying station is shown in Figure 8. Similar to the access and egress time distribution, the generalized extreme value distribution fits the transfer time better than the normal distribution.

Transfer Time Estimation
In order to obtain the transfer time distributions, we estimate the trajectories of Type B passengers between OD pairs of Yuzhilu-Xierqi and Huidong-Xierqi based on the method introduced in Section 3.3.2. The transfer time distribution of Zhuxinzhuang and Huoying station is shown in Figure 8. Similar to the access and egress time distribution, the generalized extreme value distribution fits the transfer time better than the normal distribution.

Passenger Spatial-Temporal Trajectory Estimation
As introduced in Section 3.3.3, we use the depth-first algorithm to search the feasible spatialtemporal trajectories of Pingxifu-Xierqi passengers under the constraints of Equations (2)-(4). By calculating Equation (5), we get the probability of each spatial-temporal trajectories for each passenger. The trajectory with highest probability for a passenger is considered to be the true one.
To verify the accuracy of this method, 159 passengers who traveled from Pingxifu to Xierqi in the same period (07:30-9:30) of two consecutive days (21-22 December 2016) were selected to compare their route choice in these two days. In most cases, commuters tend to choose a fixed route every day. Even if some commuters change their route choice in two consecutive days, the route choice ratio of the same OD pair is usually stable. In our case, 145 of the 159 passengers choose the same route in two consecutive days, accounting for 91.2%. Route 1 had a higher chosen ratio, which were 66.0% and 69.8% in these two days with a difference of 3.8% (Figure 9). The reason for this difference may be related to the day-to-day route choice behavior of passengers. Generally speaking, the route choice proportion estimated by this method is relatively stable, which verifies the accuracy of our method.
We also analyzed the reason for the higher chosen proportion of Route 1. In our case, these two routes have extremely close travel time and the same transfer number, but Route 2 has a longer transfer walking time (3 min) than Route 1 (1.5 min). Although Route 1 needs to transfer to Line

Passenger Spatial-Temporal Trajectory Estimation
As introduced in Section 3.3.3, we use the depth-first algorithm to search the feasible spatial-temporal trajectories of Pingxifu-Xierqi passengers under the constraints of Equations (2)-(4). By calculating Equation (5), we get the probability of each spatial-temporal trajectories for each passenger. The trajectory with highest probability for a passenger is considered to be the true one.
To verify the accuracy of this method, 159 passengers who traveled from Pingxifu to Xierqi in the same period (07:30-9:30) of two consecutive days (21-22 December 2016) were selected to compare their route choice in these two days. In most cases, commuters tend to choose a fixed route every day. Even if some commuters change their route choice in two consecutive days, the route choice ratio of the same OD pair is usually stable. In our case, 145 of the 159 passengers choose the same route in two consecutive days, accounting for 91.2%. Route 1 had a higher chosen ratio, which were 66.0% and 69.8% in these two days with a difference of 3.8% (Figure 9). The reason for this difference may be related to the day-to-day route choice behavior of passengers. Generally speaking, the route choice proportion estimated by this method is relatively stable, which verifies the accuracy of our method.
We also analyzed the reason for the higher chosen proportion of Route 1. In our case, these two routes have extremely close travel time and the same transfer number, but Route 2 has a longer transfer walking time (3 min) than Route 1 (1.5 min). Although Route 1 needs to transfer to Line Changping, which has a higher headway (5 min) than Line 13 of Route 2 (3.5 min), more passengers prefer the route with shorter walking distance when the total travel time are extremely close. Some other factors such as the congestion degree inside the train, the environment inside the train, and even the personal choice preference may affect the route choice results. All these reasons need further research for quantitative analysis; in this paper, we only present the method to estimate the true spatial-temporal trajectory of passengers, which may be useful for further research.
Changping, which has a higher headway (5 min) than Line 13 of Route 2 (3.5 min), more passengers prefer the route with shorter walking distance when the total travel time are extremely close. Some other factors such as the congestion degree inside the train, the environment inside the train, and even the personal choice preference may affect the route choice results. All these reasons need further research for quantitative analysis; in this paper, we only present the method to estimate the true spatial-temporal trajectory of passengers, which may be useful for further research.

Conclusion
This paper presents a method for estimating URT passenger spatial-temporal trajectory by using smart card data and train schedules. On the basis of passenger classification, we use the K-means algorithm to cluster passengers with relatively simple trip and then acquired their access, egress, and transfer time distribution. To estimate passenger actual spatial-temporal trajectory, we proposed a probability approach based on aforementioned time distribution. Finally, a case study of the Beijing Subway was carried out to verify the reliability of this method. Using our method to estimate passenger route choice behavior between two similar routes, we found that 91.2% of the passengers choose the same route in two consecutive days, and the difference of route choice ratio in these two days is 3.8%.
Our method can be applied to URT passenger flow assignment and ticket fare clearing and serve as a basis for deeper research on passenger behavior. This method could be applied in other transit systems that have high frequency and seamless transfer. In future research, we will explore the influence of failing to board, in-vehicle crowding, and other factors on passenger route choice behavior. By introducing further trip chain analysis of URT passengers or multimodal travelers, this method may provide more detailed travel behavior analysis such as commuting and tourism passenger analysis, the influence of crowding degree on passenger choice behavior, the day-to-day choice behavior of passengers, etc. Other studies on passenger microscopic behavior can also carried out using our method.

Conclusions
This paper presents a method for estimating URT passenger spatial-temporal trajectory by using smart card data and train schedules. On the basis of passenger classification, we use the K-means algorithm to cluster passengers with relatively simple trip and then acquired their access, egress, and transfer time distribution. To estimate passenger actual spatial-temporal trajectory, we proposed a probability approach based on aforementioned time distribution. Finally, a case study of the Beijing Subway was carried out to verify the reliability of this method. Using our method to estimate passenger route choice behavior between two similar routes, we found that 91.2% of the passengers choose the same route in two consecutive days, and the difference of route choice ratio in these two days is 3.8%.
Our method can be applied to URT passenger flow assignment and ticket fare clearing and serve as a basis for deeper research on passenger behavior. This method could be applied in other transit systems that have high frequency and seamless transfer. In future research, we will explore the influence of failing to board, in-vehicle crowding, and other factors on passenger route choice behavior. By introducing further trip chain analysis of URT passengers or multimodal travelers, this method may provide more detailed travel behavior analysis such as commuting and tourism passenger analysis, the influence of crowding degree on passenger choice behavior, the day-to-day choice behavior of passengers, etc. Other studies on passenger microscopic behavior can also carried out using our method.