Hierarchical Colored Petri Nets for Modeling and Analysis of Transit Signal Priority Control Systems

: In this paper, we consider the problem of developing a model for trafﬁc signal control with transit priority using Hierarchical Colored Petri nets (HCPN). Petri nets (PN) are useful for state analysis of discrete event systems due to their powerful modeling capability and mathematical formalism. This paper focuses on their use to formalize the transit signal priority (TSP) control model. In a four-phase trafﬁc signal control model, the transit detection and two kinds of transit priority strategies are integrated to obtain the HCPN-based TSP control models. One of the advantages to use these models is the clear presentation of trafﬁc light behaviors in terms of conditions and events that cause the detection of a priority request by a transit vehicle. Another advantage of the resulting models is that the correctness and reliability of the proposed strategies are easily analyzed. After their full reachable states are generated, the boundness, liveness, and fairness of the proposed models are veriﬁed. Experimental results show that the proposed control model provides transit vehicles with better effectiveness at intersections. This work helps advance the state of the art in the design of signal control models related to the intersection of roadways.


Introduction
Public transit systems have been extensively studied in the literature [1][2][3] to improve the safety and efficiency of transportation in urban traffic networks.The quality of the transit service depends heavily on how punctually the transit arrives at each bus stop and picks up passengers.Especially, transit signal priority control and signal switching behaviors are becoming necessary functions for any transit system to improve the safety and efficiency of public transportation.
Transit signal priority (TSP) control operates under the logic explained as follows.It extends the originally planned green light phase or starts the phase early to make the green light time longer if some conditions are met such that some transit vehicles can go through an intersection without waiting there.To decide which logic should be used, a quick calculation is performed on site using a bus arrival time prediction model based on historical data [4][5][6].There are many classical TSP methods being employed, including offset modification [7], green wave [8], cycle extension [9], and phase recall [10].Wahlstedt [11] presented a simulation-based model for analyzing partial dynamic signal timings as well as fully adaptive signal control systems.Wolput et al. [12] developed a logic-based adaptive TSP control system with double detection and they make comparison with full priority for mixed lane conditions.Ahmed et al. [13] presented a traffic control system that can work standalone to handle various boundary conditions of the recurrent, non-recurrent congestion, TSP and downstream blockage conditions to improve the overall traffic network vehicular productivity and efficiency.In addition, there are some studies, such as [11,14], based on adaptive traffic signal control such as SCOOT and PRIBUSS to explore new priority strategies.Although these approaches promoted the transit signal priority control research to some extent, it is worth noting that all these approaches are mainly based on analytical methods and many strict mathematical assumptions.Furthermore, the correctness and reliability of the TSP control systems are unproven, and potential design errors can lead to conflicting traffic at the intersection, which in turn affects the actual control effect.
Petri nets (PN) have shown to be powerful in modeling, analyzing, scheduling, and controlling for various kinds of information and production systems that are characterized as being concurrent, asynchronous, distributed and stochastic [15][16][17][18][19][20][21][22][23][24].Their graphical representation provides a friendly man-machine interface for simulation and logic control.To the best of the authors' knowledge, the work in [25] may be the earliest attempt to apply PNs for the modeling and analysis of urban traffic networks.Since then, a lot of researchers have focused their attention on this specific area.Ng et al. [26] presented a comprehensive review on the applications of PNs in modeling, analysis, and control of traffic networks.A variety of high-level PNs such as continuous PNs with variable speed, first-order Hybrid PNs and Synchronized Timed PNs have been used for modeling and analysis of traffic flow [27,28], and urban traffic networks [29,30].Unlike the continuous characteristics of vehicle flow, the behavior of a signal control system at the intersection shows a discrete feature.List et al. [31] used P-invariant and a reachability tree to confirm that a PN-based eight-phase traffic signal control model is conflictand deadlock-free, respectively.Huang et al. [29] developed modularized eight-phase, six-phase, and two-phase traffic-light control systems, respectively.The advantage of these models is that the size of the urban traffic network control systems can be easily extended with their proposed modular technique.It is worth noting that the common feature of the abovementioned research is that PNs are used for regular adjustment of phase and timing of traffic signal systems.Meanwhile, we also notice that some scholars aim at reducing delay for transit or emergency vehicles at signalized intersections by temporarily adjusting the traffic signal timing to benefit transit vehicles [32,33].
This paper proposes a new methodology to design a control model for the TSP systems based on Hierarchical-Colored PNs (HCPN) and adopts the state space analysis to verify the correctness and reliability of the control model before the deployment stage.The resulting system is based on the network of the on-board unit and roadside unit (RSU) for TSP applications that provide transit vehicles with safety and convenience.Once an approaching transit vehicle is detected by an RSU, signal control systems determine whether the current state meets the priority control conditions.If it is satisfied, the transit vehicle and its predecessor or successor vehicles with the same direction are allowed to pass through the intersection.If it is not satisfied, we might prefer to maintain the original control strategy without conducting priority control ones.As a result, one can infer that the proposed priority strategies are able to reduce the travel time of public transit vehicles moderately and economically.
The remainder of this paper is organized as follows.Section 2 demonstrates the model of the TSP intersection.Section 3 develops the HCPN-based TSP control models.Then, the analysis of the results is presented by using full reachable states in Section 4. Concluding remarks are given in Section 5.

Transit Priority Signalized Intersection
An example of intersection applying the transit signal priority control system is depicted in Figure 1.The TSP intersection can be divided into three parts: signalized intersection, transit detection, and signal priority controller.The traffic flows are ruled by four-phase signal control logic presented in Figure 2.

Signalized Intersection
A signalized intersection connects two or more roads.It provides a conflicting area for vehicles to occupy at different times.We consider a four-way intersection (as shown in Figure 1), which is operated by a four-phase traffic signal control logic (as shown in Figure 2).This intersection connects eight roads expressed as R D f , D ∈ {E, W, N, S} and f ∈ {i, o}, where D models the directions of traffic flows, including eastbound, westbound, northbound, and southbound, f models a vehicle entering or leaving the specific road, respectively.Presently, a four-phase signal control system with a deterministic phase transition structure at intersections is widely used, although there are studies on applying non-deterministic transition structure to improve the performance [10].The aim of this work is to test the TSP control strategies and a deterministic phase transition structure is applied.
Before further describing the control logic, the movement of traffic flow and the phase of signal light should be defined.A movement specifies the vehicle's trajectory at the intersection.In Figure 1, by taking road section R Wi as an example, there are three movements including R Wi → R No , R Wi → R Wo and R Wi → R So .Therefore, there are totally 12 movements at the intersection and, among them, the four turn-right movements can be combined into the four go-straight movements.Movements are divided into many groups, and these groups can be named as a phase.When a phase is selected, related movements receive a permission signal (e.g., green light), while all other movements receive a prohibit signal (e.g., red light).
or leaving the specific road, respectively.Presently, a four-phase signal control system with a deterministic phase transition structure at intersections is widely used, although there are studies on applying non-deterministic transition structure to improve the performance [10].The aim of this work is to test the TSP control strategies and a deterministic phase transition structure is applied.
Before further describing the control logic, the movement of traffic flow and the phase of signal light should be defined.A movement specifies the vehicle's trajectory at the intersection.In Figure 1

Transit Detection
Consider the intersection depicted in Figure 1.We deploy an RSU including sensors, controllers and processors at the roadside of each road to help us to collect the traffic data.Generally, sensors include a weather sensor, traffic flow sensor, probe vehicle detection module, and dedicated short-range communication module.Hence, we can use an RSU to detect the approaching of a transit vehicle, and send a message to the traffic signal controller at the intersection through the communication module.Once the controller receives a message, the travel time from current location to stop bar is estimated.This value and the residual time of the current phase are compared and employed to determine whether the transit priority strategy is triggered or not.

Transit Signal Priority Control
When a transit vehicle is approaching the crossing section, some specific scenarios could emerge immediately.For example, at phase one, eastbound and westbound GS green lights turn on and the remaining green time is six seconds.At this moment, an approaching transit vehicle is detected by the RSU installed on Lane 1 in Figure 1.Suppose that it takes 10 s for the transit vehicle to travel from the current location to the stop bar.This means that when the transit vehicle arrives at the stop bar, phase one will change to phase two and it has to wait here for almost a complete red light period.An obvious solution is to increase an extra green time for phase one temporarily and give the transit vehicle and other queued vehicles in front of it enough time to pass through the stop bar.This can For a typical intersection, four traffic light sets are deployed at the intersection.Each set has four types of lights involving a red one (R), a yellow one (Y), a green one with turn-left arrow (TL), and a green one with go-straight and turn-right arrow combined (GS).In phase one, GS signals turn on in the eastbound and westbound traffic directions; in other words, the movements such as

Transit Detection
Consider the intersection depicted in Figure 1.We deploy an RSU including sensors, controllers and processors at the roadside of each road to help us to collect the traffic data.Generally, sensors include a weather sensor, traffic flow sensor, probe vehicle detection module, and dedicated short-range communication module.Hence, we can use an RSU to detect the approaching of a transit vehicle, and send a message to the traffic signal controller at the intersection through the communication module.Once the controller receives a message, the travel time from current location to stop bar is estimated.This value and the residual time of the current phase are compared and employed to determine whether the transit priority strategy is triggered or not.

Transit Signal Priority Control
When a transit vehicle is approaching the crossing section, some specific scenarios could emerge immediately.For example, at phase one, eastbound and westbound GS green lights turn on and the remaining green time is six seconds.At this moment, an approaching transit vehicle is detected by the RSU installed on Lane 1 in Figure 1.Suppose that it takes 10 s for the transit vehicle to travel from the current location to the stop bar.This means that when the transit vehicle arrives at the stop bar, phase one will change to phase two and it has to wait here for almost a complete red light period.An obvious solution is to increase an extra green time for phase one temporarily and give the transit vehicle and other queued vehicles in front of it enough time to pass through the stop bar.This can effectively avoid the unnecessary waiting of a large number of passengers on the transit vehicle, and thus reduces the transit intersection delay time and travel time, as well as improves transit service reliability and quality of service.
As noted in [26], a traffic signal control system is a typical distributed, concurrent, and non-deterministic system.For such a complex system, if there is no effective method or tool for verification, one may design a system such that some important interaction patterns are missed, leading to gaps or malfunctions in the system.Therefore, how to guarantee the correctness and reliability of the TSP control strategies is an important issue.Beyond the reachability graph used in [33], this paper presents an executable model and its full state spaces to handle the dynamic alternation of traffic signal lights when one or more transit vehicles are detected by RSUs concurrently or asynchronously.

Petri Net Representation
In this section, the fundamental concepts of HCPN are reviewed briefly.Then, we present several assumptions for modeling and analysis.After that, HCPN-based executable models involving the adjustment of light time and conflict resolution are illustrated for the design of TSP control systems.

HCPN Concepts
It is well known that places, transitions, and directed arcs are three main constituent elements in PNs, a particular kind of bipartite-directed graphs.From the viewpoint of system engineering modeling, a collection of places is used to express the state of systems, and transitions are used to represent events that cause the system state change.The capabilities of a high-level programming language and module hierarchy are associated with PNs, leading to the concepts of Hierarchical-Colored PNs [34,35].

Definition 1.
A Colored Petri net is a 9-tuple Σ = (P, T, A, C, V, W, G, E, I), where: P is a finite set of places; 2.
T is a finite set of transitions and P ∩ T = ∅; 3.
A is a finite set of directed arcs, A ⊆ P × T ∪ T × P; 4.
C is a finite set of non-empty color sets; 5.
V is a set of typed variables, such that ∀v ∈ V, Type[v] ∈ C; 6.
W : P → C is a color set function that assigns a color set to each place; 7.
G : T → EXPR V is a guard function that assigns a guard to each transition t such that Type[G(t)] = Bool; 8.
E : A → EXPR V is an arc expression function that assigns an arc expression to each arc a such that Type[E(a)] = C(p) MS , here, MS means multiset; 9.
I : P → EXPR 0 is an initialization function that assigns an initialization expression to each place p such that Type[I(p)] = C(p) MS .

Definition 2.
A Colored Petri net module can be expressed as a 4-tuple Σ M = (Σ, T sub , P port , PT), where: T sub ⊆ T is a set of substitution transitions; 3.
P port ⊆ P is a set of port places; 4.
PT : P port → {IN, OUT, I/O} is a port type function that assigns a port type to each port place.Definition 3. A Hierarchical-Colored Petri net can be expressed as a 4-tuple Σ H = (S, SM, PS, FS), where: SM : T sub → S is a submodule function that assigns a sub module to each substitution transition.It is required that the module hierarchy is acyclic;

3.
PS is a port-socket relation function that assigns a port-socket relation PS(t) ⊆ P sock (t) × P SM(t) port to each substitution transition t, it is required that ST(p) = PT(p ), C(p) = C(p ), and I(p) = I(p ) for all (p, p ) ∈ PS(t) and all t ∈ T sub ; 4.
FS ⊆ 2 P is a set of non-empty fusion sets such that C(p) = C(p ) and I(p) = I(p ) for all p, p ∈ f s and all f s ∈ FS.
In practical applications of PNs for system engineering modeling, complex business logic requirements may lead to the state space of a net system being extremely large such that it is very difficult to perform simulation and performance optimization.Fortunately, HCPN formalisms using fusion place, port/socket place and substitution transition (also known as aggregated transition) provide a hierarchical formulation to solve this issue, reducing the dimension of the state space.In other words, a complete large-scale CPN model can be divided into a number of sub-nets, which is easily represented and investigated.
When an HCPN executable model is built, according to the firing rules defined in [34], full state spaces representing all possible executions of the model can be generated.The full state space is described by a directed graph where the nodes correspond to the set of reachable markings, and the arcs correspond to the occurrence-binding elements.Therefore, in full state spaces, we can observe not only all reachable states, but also all state changes.On this basis, some critical system properties such as liveness, boundness, and fairness can be validated and guaranteed.

Assumptions and Rules
In this section, we make the following assumptions such that the obtained executable model is easily simulated and dynamic behavior analysis can be done.

1.
In the urban traffic network, when one vehicle is approaching to an intersection, usually, the driver prefers to decelerate the vehicle and ensures that the vehicle safely passes through the intersection or waits in a queue.Hence, we set the nominal travel speed at V tv km/h, and the RSU sensor for transit detection is deployed at a distance of D RSU from the stop bar; 2.
In each phase, the traffic lights turn on in the following order: green lights for T G seconds, yellow lights for T Y seconds, and red lights for T R seconds.In order to ensure safety, when a cycle is completed, all-in-red lights turn on for T AR seconds.Therefore, a complete signal cycle is The event that the RSU sensor detects an approaching transit vehicle is stochastic and uncertain, but the traffic signal controller's response to the event is deterministic.Therefore, to cope with the complexity of the TSP control model, it is crucial to reduce some redundant states while a full state space is constructed and analyzed.
Different RSU sensors may detect transit vehicles and send conflicting requests to the traffic signal controller simultaneously.In order to handle this dilemma, we have the following rules: 1.
If the traffic signal controller receives more than two green extension requests in each phase, these requests are handled in accordance to the principle that only the first one is served and the others are neglected; 2.
The same principle can be used to the two or more red truncation requests; 3.
If the controller receives two different requests at the same time, the response to the green extension request is superior to the response to the red truncation request.
For example, in Figure 1a, four approaching transit vehicles are detected in four different road sections, such as Lanes 1, 3, 5, and 7, and they send priority requests in sequence.Obviously, transit vehicles on Lanes 1 and 3 request green extension, while transit vehicles on Lanes 5 and 7 request red truncation.With the help of above rules, the requests made by transit vehicles on Lanes 5 and 7 are ignored first, and then the request made by transit vehicle on Lane 3 is ignored too, only the request issued on Lane 1 can get a response.

Green Extension Strategy
The conventional green extension strategy begins with an initial fixed green time; each time a transit vehicle is detected by the magnetic loops or cameras, it will add an extra green period until the maximum green time is reached [6].In the proposed strategy, an extra green time will be appended to the green time, while the following two conditions are met simultaneously.The first one is that an approaching transit vehicle is detected by the RSU sensor; the second one is that the time when the transit vehicle is detected is at the specific green period.Different from the conventional strategy, this strategy conditionally decides whether an extra green time is appended based on the residual green time when the transit vehicle arrives at the stop bar.
The new green extension strategy that we propose is the following: 1.
The residual green time when a transit vehicle is detected is expressed as T r_gt .The additional green time is set to T δ_gt ; 2.
The distance between the RSU sensor installed on the road side and the stop bar is expressed as D RSU .The nominal speed of the transit vehicle is expressed as V tv , when it is detected by the RSU sensor.The estimated time to travel to the stop bar is expressed as When a TSP request is received by the controller in the current phase, it checks whether the detected transit vehicle has enough green time to travel to the stop bar or not, there are four cases should be considered: Case 1.If the condition (T e < T r_gt ) holds, it means that the transit vehicle will travel through the intersection without delay.Case 2. If the condition (T r_gt ≤ T e ) holds, it means that the yellow light will turn on and the transit vehicle has to wait for the green light in next cycle before the stop bar.Case 3.For Case 2, if the formula (T e − T δ_gt < T r_gt ) is also satisfied, then an additional green time (T δ_gt ) can be appended to the residual green time such that the new remaining green time (T r_gt + T δ_gt ) is long enough to serve the transit vehicle during this phase.Case 4. If the condition ((0 < T r_gt ) and (T r_gt ≤ (T e − T δ_gt ))) holds, it means that the original residual green is between one to (T e − T δ_gt ) and is not long enough to serve this vehicle during this phase either.In this situation, even if an additional green time is appended, the transit vehicle has to wait until the next cycle.

Red Truncation Strategy
The conventional red truncation strategy also begins with an initial fixed red time; each time a transit vehicle is detected, a fixed period of non-transit phase is truncated from the scheduled time until the minimal red time is reached.In the proposed red truncation strategy, a fixed red time will be truncated from the scheduled red time, if and only if the transit vehicle is detected by the RSU sensor at the specific red light period.The difference from the conventional red truncation strategy is whether a red truncation operation is triggered depends on the remaining red time when the transit vehicle arrives at the stop bar.
The proposed new red truncation strategy is the following: 1.
The residual red time when a transit vehicle is detected is expressed as T r_rt .The threshold of red time to be truncated is set to T δ_rt ; 2.
The three parameters D RSU , V tv , T e have the same meaning as in Section 3.3; 3.
When a TSP request is received by the controller in the current phase, it checks if the detected transit vehicle needs to stop at least once.The more detailed information is summarized into four cases as follows.
Case 1.If the condition (T r_rt ≤ T e ) is satisfied, it means that the traffic signal will turn green before the transit vehicle travels to the stop bar.Case 2. If the condition (T r_rt > T e ) holds, it means that the detected transit vehicle need to stop at least once.Case 3.For Case 2, if the formula (T e ≥ T r_rt − T δ_rt ) is also satified, then a fixed period of red time (T δ_rt ) can be truncated from the current phase.Then, the new remaining red time (T r_rt − T δ_rt ) is guaranted such that this transit vehicle can travel through the stop bar without any stop.Case 4. If the condition (T r_rt − T e > T δ_rt ) holds, it means that the residual red time is quite long, beyond the adjustment range.Hence, the transit vehicle has to wait before the stop bar until the red light turns green.

General Modeling Methodology
This work proposes a general methodology for designing the HCPN-based TSP control model based on the idea of a Hierarchical design.
Inputs: An intersection with TSP requirements, RSUs.Output: A HCPN-based TSP control model.

Steps:
(1) Identify the main states of the signal control system and its transitions.
(2) Define the colorset, variable, and functions used in the potential CPN model. (

Transit Signal Priority Control Model
In this section, the intersection given in Figure 1 is taken as an example.This intersection is structured for a TSP control system that includes four RSU sensors for detecting transit vehicles in each direction.An interesting feature of the TSP control model is that the event representing that an approaching transit vehicle is detected has a stochastic characteristic.Intuitively speaking, we cannot predetermine when, in which road section, and at which phase, there will be an approaching transit vehicle.
In HCPN-based TSP model, while a transit vehicle is traveling through the crossing zone, three spectacle situations could happen in the TSP control systems.We describe in detail how they operate by considering both the trajectory of transit vehicle and traffic light state while a transit vehicle is detected.The HCPNs in Figure 3 model the complete operation of priority strategies handled by the traffic signal controller while the transit vehicle goes straight through the crossing zone.In the proposed model, the colors of the potential tokens must satisfy the expressions associated with the colors in the arc expressions.The colors and variables used to describe the information required in the relevant places and arcs are summarized in Table 1.Furthermore, in order to improve the readability, we denote EW and NS as directions, including east-westbound and north-southbound, and GS and TL as the behavior of a transit vehicle at the intersection such as go-straight (including turn-right) and turn-left, as well as AR, R, G, Y as traffic lights, such as all-in-red, red, green, and yellow.The physical meanings of places and transitions are explained in Table 2.The parameters used in the HCPNs are set as follows: T G = 27 s, T Y = 3 s, T R = 90 s, T AR = 2 s, D RSU = 100 m, V tv = 10 m/s, T δ_gt = 5 s, and T δ_rt = 5 s.
In order to reduce the complexity of the proposed model further, we model the TSP control in two levels with one module at the upper level and six sub-modules at the lower level, which represent the detailed process of traffic lights in each phase, respectively.In Figure 3a, there are six aggregated transitions (phase1 to phase4, green extension, and red truncation), which are represented by boxes with double-line borders.Each aggregated transition has a submodule related to it.Essentially, a submodule presents a more detailed view of the behavior represented by the aggregated transition.Here, these six aggregated transitions correspond to the submodules shown in Figure 3b-g, respectively.
Two transitions in Figures 3f and 4g, green extension and red truncation, model the TSP control system's interfaces.Therefore, a transit vehicle's priority request can be transferred to the signal controller through them.Technically, with the help of these transitions and two groups of places {EW_GS_G, EW_TL_R, NS_GS_R, NS_TL_R} and {EW_GS_R, EW_TL_R, NS_GS_R, NS_TL_G}, two priority strategy models can be incorporated into the normal traffic signal control model to handle the priority request initiated by one or more approaching transit vehicles.In Figure 3f, we depict the proposed green extension strategy in the CPN model.The physical meanings of places and transitions are illustrated in Table 2.For example, the northbound and southbound go-straight and turn-left lights are red, the eastbound and westbound turn-left lights are red, only the eastbound and westbound go-straight lights are green and the residual time is between six to 10 s.At this moment, if an approaching transit vehicle is detected, then the green extension strategy can be considered, as shown in arc expressions in Figure 3f: if (0<=t-EGtick) andalso (t-EGtick < 5) then 1'(glt,EGtick + 5) else 1'(glt,EGtick) if (0<=t-EGtick) andalso (t-EGtick < 5) then 1'(rlt,ELtick + 5) else 1'(rlt,ELtick) if (0<=t-EGtick) andalso (t-EGtick < 5) then 1'(rlt,NGtick + 5) else 1'(rlt,NGtick) if (0<=t-EGtick) andalso (t-EGtick < 5) then 1'(rlt,NLtick + 5) else 1'(rlt,NLtick) Therefore, the residual time of EW_GS_G light will be increased by five seconds, correspondingly, and the residual time of EW_TL_R, NS_GS_R, NS_TL_R is also increased by five seconds.In addition, then, the approaching transit vehicle can travel through the intersection without delay.
Similarly, the red truncation strategy in the CPN formalism is given in Figure 3g.For example, the status of the current signal can be depicted as follows: the northbound and southbound go-straight lights are red, the northbound and southbound turn-left lights are green, the eastbound and westbound turn-left lights are red, the eastbound and westbound go-straight lights are red and the residual red time is between 11 to 15 s.In this situation, if a transit vehicle is detected in the eastbound or westbound directions, then the red truncation strategy can be considered.If this strategy is adopted, as shown in arc expressions in Figure 3g, the residual red time of EW_GS_R will be decreased by five seconds, correspondingly, and the residual time of NS_TL_G, EW_TL_R, NS_GS_R also is reduced by five seconds.In addition, then, the approaching transit vehicle can travel through the intersection without delay.A similar model can be designed to illustrate the scenario of a transit vehicle turning left through the intersection.
Appl.Sci.2018, 8, 141 10 of 24 Similarly, the red truncation strategy in the CPN formalism is given in Figure 3g.For example, the status of the current signal can be depicted as follows: the northbound and southbound go-straight lights are red, the northbound and southbound turn-left lights are green, the eastbound and westbound turn-left lights are red, the eastbound and westbound go-straight lights are red and the residual red time is between 11 to 15 s.In this situation, if a transit vehicle is detected in the eastbound or westbound directions, then the red truncation strategy can be considered.If this strategy is adopted, as shown in arc expressions in Figure 3g, the residual red time of EW_GS_R will be decreased by five seconds, correspondingly, and the residual time of NS_TL_G, EW_TL_R, NS_GS_R also is reduced by five seconds.In addition, then, the approaching transit vehicle can travel through the intersection without delay.A similar model can be designed to illustrate the scenario of a transit vehicle turning left through the intersection.

Simulation of HCPN Based TSP Model
The simulation of HCPN-based TSP model is conducted in CPN Tools [34].Multiple CPN modules at the upper and lower levels share tokens by socket-port pairs, which relates the port places of the submodule to the socket places of the aggregated transition.This means that related port and socket places always share the same marking.For example, NS_GS_R in Figure 3b is an output socket for aggregated transition phase1, an input socket for aggregated transition phase3 in Figure 3d, and an input/output socket for aggregated transition phase2 in Figure 3c.In the phase1 submodule, there are six transitions: enter all_in_red, c1, phase1, c2, t21 and c21.Transition enter all_in_red is used to represent that the status of the red signals are in all-in-red state, which means that the red lights in Table 2. Physical meaning of places and transitions in Figure 3.

Element Type Meaning
EW_GS_X Place X ∈ {AR, G, Y, R}, the eastbound and westbound go-straight light is all-in-red, green, yellow, or red.
EW_TL_X Place X ∈ {AR, G, Y, R}, the eastbound and westbound turn-left light is all-in-red, green, yellow, or red.
NS_GS_X Place X ∈ {AR, G, Y, R}, the northbound and southbound go-straight light is all-in-red, green, yellow, or red.
NS_TL_X Place X ∈ {AR, G, Y, R}, the northbound and southbound turn-left light is all-in-red, green, yellow, or red.

Init Place
Store a token, used to trigger all-in-red lights.

Simulation of HCPN Based TSP Model
The simulation of HCPN-based TSP model is conducted in CPN Tools [34].Multiple CPN modules at the upper and lower levels share tokens by socket-port pairs, which relates the port places of the submodule to the socket places of the aggregated transition.This means that related port and socket places always share the same marking.For example, NS_GS_R in Figure 3b is an output socket for aggregated transition phase1, an input socket for aggregated transition phase3 in Figure 3d, and an input/output socket for aggregated transition phase2 in Figure 3c.In the phase1 submodule, there are six transitions: enter all_in_red, c1, phase1, c2, t21 and c21.Transition enter all_in_red is used to represent that the status of the red signals are in all-in-red state, which means that the red lights in eastbound, westbound, northbound and southbound should be turn on to forbid the incoming vehicles entering the crossing zone.A detailed description of the simulation process of HCPN-based TSP model can be found in Appendix A.
In summary, the markings of the proposed model can be observed, and we can conclude that no place has an unbound number of tokens.Similar analysis can be applied to the scenario of a single transit line turning left through the intersection.

State Space Analysis
In this section, we describe the properties of the proposed HCPN models in detail.Two full state spaces are generated based on the current initial marking, and the statistics obtained by full state space analysis are illustrated in Table 3, which can be used to analyze the boundness and liveness of the TSP control model with transit vehicle go-straight or turn-left through the crossing zone.In order to verify the correctness and validation of these two strategies, and to save space, the partial state spaces are employed in Figure 4. Arcs in Figure 4 are listed in Appendix B. Compared with the state space of the normal four-phase traffic light control model, the number of nodes and arcs in the state spaces and the Scc graph both increase greatly because the proposed model represents the interactions between transit and traffic controller, and enumerates all the possible responses made by the traffic controller.These functions are exactly what traditional TSP control strategies cannot provide.In Figure 4a, node1 represents the initial state of the TSP control system, we see that node1 has three enabled binding elements: Arc1:1→2 (phase1'enter_all_in_red:{c=R}) Arc2:1→3 (green_extension'Init1:{s="Bus Request GE", n=10}) Arc3:1→4 (red_truncation'Init2:{s="Bus Request RT", n=10}) These arcs lead to the markings represented by nodes2, node3, and node4, respectively.Node3 and node4 represent that an approaching transit vehicle is detected at the initial state; actually, the transit priority request issued at this time will be neglected.Node2 represents the model entering the all-in-red state.Nodes2, node5, and node9 have two enabled binding elements: Arc4:2→5 (phase1'c1:{EGtick=2, ELtick=2, NGtick=2, NLtick=2}) Arc11:5→9 (phase1'c1:{EGtick=1, ELtick=1, NGtick=1, NLtick=1}) We illustrate the countdown of the time stamp in the all-in-red state.The markings represented by nodes7, node11, and node15 are identical to the node4 so that the transition Init2 in red_truncation fires.Similarly, the markings represented by nodes6, node10, and node14 are identical to the node3 so that the transition Init1 in green_extension fires.We found that the sequence of states that really make sense is {node1, node2, node5, node9, node13, . . .}.
Figure 4b shows the partial state spaces concerning the green extension strategy.Note that in a real transit signal priority control system, no one knows when an approaching transit vehicle is detected.Meanwhile, we know that once a transit vehicle is detected, the response of the TSP control system to the priority request is a deterministic process.There are five groups of nodes and arcs ,i.e., {node110, node117, node95, Arc208, Arc221}, {node116, node123, node101, Arc219, Arc232}, {node122, node129, node107, Arc230, Arc243}, {node128, node135, node113, Arc241, Arc254}, and {node134, node141, node119, Arc252, Arc265} that indicate the state change of the TSP control system when the priority request is received in the east-westward go-straight green time of 10 to 15 s.In Figure 4b, node98 is reachable from node13, but is not reachable from node14 and node15.
Based on the above analysis, the trajectory of the state change of the TSP control system can be divided into five scenarios: no transit vehicle requests priority (Scenario 1), two different transit vehicles request green extension and red truncation in the same cycle (Scenario 2), only one transit vehicle requests green extension (Scenario 3), only one transit vehicle requests red truncation (Scenario 4), one or more transit vehicles request priority but the TSP control system does not respond (Scenario 5).We list the state sequences for each scenario in Table 4.These scenarios show that a reasonable sequence of states can be found in the full state space as long as a transit vehicle is detected at a specified period of a red or green signal, indicating a response to the transit's priority request.Conversely, even if the model does not process the transit priority request, it can still operate according to the normal four-phase traffic signal controller.
After the examination, we can infer that, if there is no limit on the token number of transit priority requests, which represents the number of transit vehicles to be considered in the simulation, the proposed TSP control models are live and reversible.Their state space analysis proves that the liveness and reversibility are guaranteed.Therefore, the practical TSP control system implemented according to this model will not cause man-made conflicts between vehicles in different movements.

Case Study
This section briefly discusses the application of the HCPN-based TSP control model based on several simulation-based experiments.These data can be used to analyze the capability of providing a method for improving the efficiency of the transit vehicle at intersection.A single intersection (Figure 1) project is generated in VISSIM [36], a commonly used microscopic traffic simulation software.Three kinds of signal control algorithm are implemented in the experiment, such as the fixed time method (FX), conventional TSP algorithm (CTSP) in [6,10], and the proposed HCPN-based TSP control model (PNTSP).The length of each road connecting the intersection is set to 500 m.The traffic flows on each road are basically the same, with values of 900, 1200 and 1500 vehicle per hour (vph), respectively.The cycle length at the intersection is 122 s.What needs to be specially explained is that the indexes such as the number of transit stops and transit delays are only counted from the road from eastbound to westbound while the total delay of social vehicles is based on statistics on four connecting roads.Simulation-based results are shown in Table 5.The data in column FX serves as a baseline for comparison.Obviously, no matter what kind of traffic flow conditions and what kind of transit ratio are configured, CTSP and PNTSP methods can achieve a better performance than the FX method for both the number of transit stops and the transit delay time, although the rate of improvement will decrease as traffic flow increases.In addition, according to the indictor of the total delay of social vehicle, the PNTSP method shows better performance over the CTSP method.That is to say, it keeps the FX method's performance, while the total delay of social vehicles derived from the CTSP method increased by about 20%.The reason for this is that the traditional method mainly predicts traffic flow  5.The data in column FX serves as a baseline for comparison.Obviously, no matter what kind of traffic flow conditions and what kind of transit ratio are configured, CTSP and PNTSP methods can achieve a better performance than the FX method for both the number of transit stops and the transit delay time, although the rate of improvement will decrease as traffic flow increases.In addition, according to the indictor of the total delay of social vehicle, the PNTSP method shows better performance over the CTSP method.That is to say, it keeps the FX method's performance, while the total delay of social vehicles derived from the CTSP method increased by about 20%.The reason for this is that the traditional method mainly predicts traffic flow based on historical data, and then greatly adjusts the phase and duration of signal control, leading to additional delay for vehicles on other connecting roads.The proposed method, by its very nature, is a reactive fixed timing approach.Therefore, when using this method, the transit vehicles have the least impact on social vehicles.At the same time, it also extends the service time for the transit vehicles in a specific green light period and assigns the service time for transit vehicles in a particular red light period.Based on the simulation results, it can be concluded that the proposed HCPN-based TSP control model provides transit vehicles with more accuracy and better effectiveness at the intersection.

Conclusions
This work for the first time uses HCPN to design a traffic control system for a four-phase intersection dealing with priority to provide public transit passing through the intersection.Two kinds of transit priority strategies, i.e., green extension and red truncation are formalized in this work.Their analysis is performed by the state space method.Their important properties such as boundness, liveness and reversibility are verified.This helps to enhance the state of the art in traffic real-time detection and traffic management of an intersection.Future work is to design a traffic control system that is complex and close to the actual application.For example, the impact of pedestrians on the transit priority should be considered.In addition, if there are multiple transit lines overlapping at the intersection, transits on different lanes may also make a priority request at the same time; hence, how to solve these complex scenes should be considered.Also, in this work, we use a four-phase signal control system with a deterministic phase transition structure.In the future, we will explore the effect of a non-deterministic phase transition structure on TSP control strategies.
∅ otherwise M 2 indicates that the go-straight green light in the east-westward traffic direction turns on, hence, the transition c2 is enabled, and starts the countdown of traffic light.Consider a specific scenario, the residual green time in EW_GS_G is reduced to 10 s.At this time, if an approaching transit vehicle is detected, such as in Lane 1 or Lane 3 in Figure 1a, then the transition green extension in Figure 4d ∅ otherwise in M 3 , the conditions for starting the transit priority strategy are satisfied, therefore, the transition green extension is enabled, which means that the residual green time in this traffic direction can be extended.After green extension fires, a new state is generated by making the occurrence of M 3 [green extension > M 4 : ∅ otherwise in M 4 , the residual time of the go-straight green light in east-westward traffic direction is extended to 15 s, after that, the transition c2 is enabled again, and then all traffic lights start counting down until the green time in place EW_GS_G is reduced to zero.A new marking is generated by making the occurrence of M 4 [(c2) 15 > M 5 : ∅ otherwise in M 5 , the transition t21 is enabled, after it fires, we can get a new marking M 6 , which means that the go-straight green light in east-westward traffic direction switches to yellow light.
1 (Y, 3) i f p = EW_GS_Y out sock (phase1) 1 (R, 3) i f p = EW_TL_R out sock (phase1) 1 (R, 33) i f p = NS_GS_R out sock (phase1) 1 (R, 63) i f p = NS_TL_R out sock (phase1) 1 PR_RT i f p = Transit Priority Request(red truncation) ∅ otherwise in M 6 , the transition c21 is enabled, when the time stamp in EW_GS_Y is reduced to zero, as shown in M 7 .It indicates the end of phase one of the traffic control system.

∅ otherwise
In Figure 3, besides the green extension priority strategy, the red truncation priority strategy is also illustrated.A specific system state M 13 which can be generated by the execution of transition firing sequence (c5) 17 is considered to illustrate this strategy.13) i f p = EW_GS_R in sock (phase4) 1 (R, 13) i f p = EW_TL_R in sock (phase4) 1 (R, 13) i f p = NS_GS_R out sock (phase4) 1 (G, 10) i f p = NS_TL_G out sock (phase4)

Figure 1 .
Figure 1.An example of intersection with the transit signal priority (TSP) control systems.(a) Before the priority strategy is applied; (b) After the priority strategy is applied.Figure 1.An example of intersection with the transit signal priority (TSP) control systems.(a) Before the priority strategy is applied; (b) After the priority strategy is applied.

Figure 1 .
Figure 1.An example of intersection with the transit signal priority (TSP) control systems.(a) Before the priority strategy is applied; (b) After the priority strategy is applied.Figure 1.An example of intersection with the transit signal priority (TSP) control systems.(a) Before the priority strategy is applied; (b) After the priority strategy is applied.

Figure 2 .
Figure 2. Four-phase transitions of the traffic signal control.For a typical intersection, four traffic light sets are deployed at the intersection.Each set has four types of lights involving a red one (R), a yellow one (Y), a green one with turn-left arrow (TL), and a green one with go-straight and turn-right arrow combined (GS).In phase one, GS signals turn on in the eastbound and westbound traffic directions; in other words, the movements such as Ei

Figure 2 .
Figure 2. Four-phase transitions of the traffic signal control.
get the permission of passing, and R signals are displayed for all other movements.In phase two, TL signals turn on in the eastbound and westbound traffic directions, which means the movements R Wi → R So and R Ei → R No are allowed, and the R signals turn on for all other movements.In phase three, GS signals turn on in the northbound and southbound traffic directions, which indicates that the movements such as R Ni → R Eo , R Ni → R No , R Si → R Wo , and R Si → R So get the permission of passing, and R signals are displayed for all other movements.Lastly, in phase four, TL signals turn on in the northbound and southbound traffic directions, and the movements R Si → R Eo and R Ni → R Wo are allowed, and R signals are displayed for all other movements.

( 4 )( 5 )( 6 )( 7 )( 8 )
) Design the four-phase (or two-phase, six-phase) traffic signal control CPN model.Using the hierarchical method, transform the CPN model into the HCPN model.Construct two HCPN submodules based on two proposed TSP strategies, and integrated into the HCPN model.According to the application requirements, set the following parameters: T G , T Y , T R , T AR , D RSU , V tv , T δ_gt , T δ_rt .Simulate and refine the HCPN-based TSP control model.Analyze the HCPN-based TSP control model.

Figure 3 .
Figure 3.The Hierarchical Colored Petri nets (HCPN) model of transit signal priority control for public transit going straight through the crossing zone: (a) top-level signal control CPN model; (b) details of phase1 module; (c) details of phase2 module; (d) details of phase3 module; (e) details of phase4 module; (f) details of green extension module; (g) details of red truncation module.

24 Figure 4 .
Figure 4. Partial state spaces of the transit signal priority control HCPN model.

Figure 4 .
Figure 4. Partial state spaces of the transit signal priority control HCPN model.

Table 2 .
Physical meaning of places and transitions in Figure3.

Table 3 .
Statistics of simulations of Hierarchical Colored Petri nets (HCPN) model.TSP: transit signal priority.

Table 4 .
Possible state sequences of TSP control system.

Table 5 .
Statistics of simulations in VISSIM.
1 PR_RT i f p = Transit Priority Request(red truncation) ∅ otherwise in M 7 , transition phase2 is enabled.It means that the phase two can start.After it fires, four new tokens are drop into EW_GS_R, EW_TL_G, NS_GS_R, NS_TL_R, respectively, as shown in M 8 : This marking indicates that the turn-left green lights turn on and continue for 27 s.After transitions c3, t31, c31 occur in sequence at marking M 8 , a new state is generated by making the occurrence of M 8 [(c3) 27 t31(c31) 3 > M 9 : Transit Priority Request(red truncation) ∅ otherwise in M 9 , transition phase3 is enabled, it can fire.Firing the enabled transition phase3 at marking M 9 yields marking M 10 , it means that the go-straight green lights in north-southward traffic direction turn on and continue for 27 s.Transit Priority Request(red truncation) ∅ otherwise in marking M 10 , the transition firing sequence (c4) 27 t41(c41) 3 can be executed and results in a new marking M 11 , which enables the transition phase4 in Figure 4e.