A Two-Level Model for Traffic Signal Timing and Trajectories Planning of Multiple CAVs in a Random Environment

School of Transportation and Logistics, Southwest Jiaotong University, Chengdu 610031, Sichuan, China National Engineering Laboratory of Integrated Transportation Big Data Application Technology, Southwest Jiaotong University, Chengdu 610031, Sichuan, China National United Engineering Laboratory of Integrated and Intelligent Transportation, Southwest Jiaotong University, Chengdu 610031, Sichuan, China Institute of System Science and Engineering, Southwest Jiaotong University, Chengdu 610031, Sichuan, China


Introduction
Traffic congestion has become a common traffic phenomenon in many cities [1]. In the United States, the transportation sector consumed about 143 billion gallons of gasoline in 2017 [2]. Moreover, traffic congestion leads to additional transportation emissions and travel delays. In 2017, due to traffic congestion, drivers in the United States waste an average of 41 hours per year during peak hours [3]. erefore, it is urgent to save gasoline consumption and travel time in cities [4,5].
As one of the effective methods to alleviate urban traffic congestion [6], traffic signal control [7] first appeared in London, England, in 1868. Currently, traffic signal control mainly consists of three strategies: fixed-time control, vehicle-actuated control, and traffic signal adaptive control. ese strategies allocate space-time right of way to vehicles in different conflict directions to resolve traffic flow conflicts at intersections [8]. However, these control strategies rely on traffic data from infrastructure-based vehicle detection systems, such as loop detectors, radar, or cameras [9-11]. Infrastructure-based vehicle detection systems only provide limited discrete data, and their installation and maintenance costs are considerably high [9]. Recently, with the development of wireless communication and automatic driving technologies, CAVs can realize the information exchange between vehicles and infrastructure (i.e., traffic signal equipment) [12,13]. erefore, traffic signals and vehicle trajectories can be optimized and designed for connected automated vehicles (CAVs) to improve traffic efficiency and save gasoline consumption.
However, there are several limitations to current integrated optimization methods. First, Feng et al. [8] and Yu et al. [29] only optimized the leading vehicle trajectory of a platoon and a car-following model that calculates the other vehicles' trajectories. Second, Xu et al. [28] proposed a vehicle trajectory designing model that considered a safe front vehicle distance. Still, they did not consider optimizing the trajectory of all CAVs at the same time. erefore, this study would fill in this gap by showing a two-level model for traffic signal timing and trajectories planning of multiple connected automated vehicles considering the random arrival of vehicles. e contribution of this paper consists of extending the optimal framework in Feng et al. [8]. First, instead of optimizing traffic signals by dynamic programming [8], we formulate an optimal arrival time calculation model for each CAV based on traffic signal timing and optimize traffic signals and vehicles' arrival time for random arrival CAVs to minimize average vehicle's delay. Second, unlike Feng et al. [8] and Yu et al. [29], only optimizing the leading vehicle trajectory of a platoon, the other vehicle trajectories are generated by a car-following model. Here, we proposed a multiple CAVs trajectories planning model, which is solved by the GPOPS [30]. Compared with Feng et al. [8], Yu et al. [29], and Xu et al. [28], the proposed model can optimize the trajectories of multiple CAVs at the same time. ird, we develop a two-level optimization framework and algorithm. Finally, we design the numerical examples and investigate the influence of critical parameters on the proposed method's performance. e remainder of the paper is organized as follows. Section 2 reviews the research on traffic signal and trajectory optimization. Section 3 introduces some assumptions, twolevel model, and solution algorithm. Section 4 presents numerical experiments, discussions, and sensitivity analysis. Finally, conclusions and recommendations are delivered in Section 5.

Literature Review
Connected and automated vehicles (CAVs) have great potential in improving traffic efficiency and reducing traffic congestion and have gained a wide application in the transportation field during the last decade [31]. ese applications mainly focus on CAV-based trajectories planning [22,23,25,26,[32][33][34] and CAV-based signal timing optimization [9,12,16,35] and even further to design traffic signals and CAVs trajectories simultaneously [8,27,29,34,36,37]. ese studies showed that CAVs applications in trajectories planning and signal timing optimization could further reduce gasoline consumption, pollutant emissions, delays, and stops caused by more stable speed change and fewer stops at the intersection [38].
To our knowledge, the first approach focuses on vehicle trajectory planning [39,40]. He et al. [32] proposed a speed optimization model to give ecodriving suggestions considering queues on a signalized arterial. Wan et al. [22] developed a speed advisory model (SAM) based on a given signal timing plan. en, an analytical driving strategy is obtained to minimize fuel consumption. e results indicated that the SAM reduces fuel consumption and benefitted human-driven vehicles (HDVs), and the platoon fuel consumption decreased with the increase of CAVs' penetration rates. Zhao et al. [25] designed an ecological driving strategy to coordinate the platoon mixed with CAVs and HDVs. A model predictive control is proposed to save platoons' fuel consumption with a fixed-time traffic signal. e results showed that the driving strategy could further smooth out the trajectory and save fuel consumption. erefore, these studies mainly focus on optimizing CAVs trajectories based on a preset traffic signals. e second method optimizes signal timing plans by CAVs data [41,42]. Goodall et al. [35] optimized traffic signal with a predictive microscopic simulation algorithm (PMSA). e connected vehicles (CVs) data, including locations and speeds, were used to predict future traffic conditions via the microscopic simulation method. A 15second rolling horizon was chosen to minimize vehicles' delay, stops, and decelerations. Feng et al.
[9] presented a real-time traffic adaptive signal control algorithm to minimize vehicle delay and queue length via connected vehicle (CVs) data. e simulation results indicated that the proposed algorithm reduced vehicle delay and balanced each phase's queue length. However, they did not consider optimizing the CAVs trajectories at the same time.
erefore, to address this gap, the third approach simultaneously optimizes CAVs trajectories and traffic signals. Xu et al. [28] presented a two-level method to optimize traffic signal and speed for CAVs. e first level optimized traffic signals and CAVs arrival times to minimize travel time; the second level planned CAVs trajectories to save individual vehicles' fuel consumption. e results indicated that this method could improve transportation efficiency and fuel economy significantly. Yu et al. [29] developed mixed-integer linear programming to optimize vehicle trajectories and traffic signals at a signalized intersections. Simulation results showed that this method was superior to actuated control in vehicle's delay, intersection capacity, and CO 2 emission. Feng et al. [8] proposed a two-stage method with traffic signal optimization and vehicle trajectory planning. e optimal control theory and dynamic programming (DP) are applied to optimize vehicle trajectories and traffic signals to minimize vehicle delay and fuel consumption. Results showed that the proposed method could reduce vehicle delay and fuel consumption under different demand compared to fixed-time traffic signal control. However, these joint optimization methods only optimize the trajectory of the leading vehicle in a platoon; a car-following model is used to calculate the other vehicle's trajectory in the platoon. Ghiasi et al. [27] considered the joint optimization algorithm's computational efficiency; an analytical solution to joint CAVs trajectories and traffic signals optimization problem was proposed in their study.
e numerical experiment showed that the proposed model could reduce travel delay and fuel consumption significantly.
is study proposes a two-level model for traffic signal timing and trajectories planning of multiple CAVs considering the random arrival of vehicles. e integrated optimization problem is modeled as a two-level model. Firstly, the traffic signal and arrival time for CAVs are optimized by the signal timing model to minimize the average vehicle's delay. Secondly, considering average gasoline consumption, an optimal control method is proposed to optimize trajectories for all CAVs. Finally, the proposed method is tested in a simulation experiment, and numerical studies and sensitivity analysis are carried out based on a simple two-phase intersection.

Assumption.
e following necessary assumptions are made to facilitate modeling and analysis.
(1) e interarrival time of all CAVs follows the shifted negative exponential distribution, which is verified at an isolated intersection [8,21,29]. is means CAVs arrive at the border of the control zone following a Poisson distribution. (2) All CAVs can share information (such as location, speed, and arrival time) through V2V; hence, their arrival time can be predicted more accurately [25]. (3) All CAVs arrive at the boundary of the control zone and through the downstream intersection with the desired speed, which can refer to Ghiasi et al. [27]. (4) All CAVs cannot change lanes in the control zone; that is, only the longitudinal movement is considered [43][44][45].

Problem Statement.
In this study, no left-turn and rightturn are considered; only through traffic flow it is modeled, which is shown in Figure 1. ere are four arms indexed by i ∈ I � 1, 2, 3, 4 { }, and l i and v f i are the length of the control zone and the desired speed of arm i, i ∈ I, respectively. A simple two-phase signal timing plan and an arm i as an example are shown in Figure 2; the traffic signal is S � 4 , where G i and R i are the effective green time and red time for arm i, i ∈ I, respectively. In this study, the indexes 1, 2, 3, and 4 are defined as east, south, west, and north arm, respectively. erefore, there have G 1 � G 3 and G 2 � G 4 . Let L � R 1 + R 2 − G 1 − G 2 represent the lost time of a traffic signal cycle. e traffic arrival rate and the saturation flow rate of arm i are defined as λ i and μ i . e unsaturated traffic is considered in this study, which can be expressed as i∈I For the convenience of the readers, the main variables used in this paper are shown in Table 1.
As shown in Figure 2, CAVs arrival at the border of the control zone is defined as j and € x ij (t ij ) are the instantaneous speed and acceleration of the j-th CAV at each arm i at time t ij , respectively. Let t a ij and t f ij be the expected and optimal arrival times of the j-th CAV at the stop line of each arm i. t 0 ij is the time of j-th CAV arriving at the border of the control zone at each arm i, which can be estimated accurately via advanced CAV technology [27].

Model Formulation.
e proposed method consists of two levels, i.e., vehicle's arrival time and traffic signal timing, and vehicle trajectories planning. e former optimizes traffic signals and vehicles' arrival time for CAVs to minimize the average vehicle's delay. e latter optimizes trajectories for all CAVs considering average gasoline consumption based on the optimal traffic signal timing plan. To better understand the proposed model, the vehicle's trajectories are optimized by giving the optimal traffic signal plan of a two-phase intersection:

Optimal Arrival Time.
e time of CAVs (t 0 ij ) arriving at the control zone border can be accurately estimated via the CAV technology [27]. en, the expected arrival time of the j-th CAV arrival at the stop line of arm i can be estimated by where the red signal is defined as the cycle starts is shown in Figure 2. erefore, the number of CAVs arrival at this cycle is determined by the number of t a ij , which is determined by the arrival flow rate (λ i ). e analysis indicates that the optimal arrival time at the stop line is determined by the expected arrival times, traffic signals, and saturation flow rate. Taking the optimal arrival time of the j-th CAV at each arm i as an example, it can be divided into the following four cases.
(a) e first CAV of a signal cycle at each arm i: (i) If the expected arrival time of the first CAV is during the red signal period, to minimize the vehicle's delay, the first CAV's optimal arrival time is equal to the start time of the green signal in the next signal cycle.
(ii) If the expected arrival time of the first CAV is during the green signal duration, to minimize the vehicle's delay, the first CAV's optimal arrival time is equal to the expected arrival time.
(b) e other CAVs of a signal cycle at each arm i: the estimated arrival time is the sum of the optimal arrival time of the preceding CAV and saturation headway.
e acceleration of the j-th CAV at arm i at time t ij t 0   (1) and (3), respectively. As a result, the vehicle's delay function for arm i is formulated as where D i is the average vehicle's delay for each arm i. erefore, the average vehicle's delay for this intersection is formulated as (2) Gasoline Consumption Function. Gasoline consumption is a function of instantaneous speed and acceleration of vehicle [46][47][48], which is formulated as where α represents constant idle fuel rate (ml/s), M represents the weight of the vehicle (kg), β 1 and β 2 represent the efficiency parameters, a and v represent instantaneous acceleration and speed of a vehicle, respectively, and R T (t) represents total "tractive" force required to drive the vehicle, which is defined as where b 1 , b 2 , and b 3 represent rolling, engine, and aerodynamic drag, respectively; G is percent grade. Referring to Akcelik [47], the calibrated parameters in (6) and (7) are M � 1600 kg, G � 0, α � 0.666 ml/kJ, β 1 � 0.0717 ml/kJ, β 2 � 0.0344 ml/(kJ · m/s 2 ), b 1 � 0.269 kN, b 2 � 0.0171 kN (m/ s 2 ), b 3 � 0.000672. e average gasoline consumption function for arm i is defined as where G i is the average gasoline consumption for arm i. erefore, the average gasoline consumption for this intersection is formulated as

Constrain Conditions
(1) Traffic Signals Constrain. e green time duration constraints: the green time duration of each arm i must be between the minimum and maximum green time duration.
where G min e Unsaturated Traffic Flow Constraint. e maximum number of the departure CAVs must not be smaller than the number of the arrival CAVs for each arm i.
(2) Vehicle Trajectories Constrain. Dynamic state constraint: at arm i, the position, velocity, and acceleration of the j-th CAV at any time should satisfy the following dynamic equations.
Initial Boundary Constraint. At arm i, the position, velocity, and acceleration of the j-th CAV at start time are given by the assumptions [27].
Final Boundary Constraint. At arm i, the position, velocity, and acceleration of the j-th CAV at end time are given by the assumptions [27].
Consecutive Vehicle Position Constraint. e adjacent CAVs must meet the specific safety headway because of control and communication delay. e headway between vehicle (j − 1)'s location with a control and communication delay τ ago x i(j−1) (t − τ) and vehicle j's location, x ij (t) is no less than s 0 in time interval where τ is control and communication delay, s 0 is the safety spacing between two adjacent CAVs, andL is the length of CAVs. Speed Constraint. e speed of all CAVs cannot go beyond the free speed limit.
Acceleration Constraint. e acceleration of all CAVs must be between the minimum and maximum acceleration.
where a min and a max are the minimum and maximum acceleration, respectively.

Solution Method.
In this study, a dynamic programming (DP) algorithm and the GPOPS are adopted to solve the traffic signal timing problem and multiple vehicle trajectories planning problem, respectively.

Dynamic Programming.
Many DP-based traffic signal timing methods have been developed [8,9,49]. In the DP algorithm, state variables and decision variables are the key parameters. Equations (19)-(20) illustrate the relationship between the two parameters; see more details in [49].
where s p is the total number of time intervals from the beginning stage to the end of stage p and x p and r p are the green and the clearance time intervals of the stage p.
When the state variable s p is given, the feasible set of decision variables can be calculated by x min , x min + 1, . . . , x max , if s p − r p ≥ x min and T − s p−1 − r p > x max , After determining X p (s p ), DP is adopted to search for the optimal decision variables x p . e DP algorithm consists of two recursions; the first recursion obtains the optimal objective function in every time interval; the second recursion searches the decision variables corresponding to the optimal objective.

Forward Recursion
Record x * p (s p ) and v p (s p ) as the optimal solution and value function}.  [49]. Besides, the number of phases |P| is 2 in this study, which contains the east-west phase and the north-south phase.

Backward Recursion.
After optimal value function is determined, the optimal decision x * p (s p ) of each stage can be retrieved in the second recursion as follows.
(i) Step 1: Set the optimal stages as J, and the optimal state variable s * Finding x * p (s * p ) from the records of Forward recursion.

General Pseudospectral Optimal Control Method.
As an optimal control problem, the vehicle trajectories planning can be handled numerically by GPOPS [30], which is widely used in vehicle trajectory optimization [25,32,33]. erefore, the GPOPS is used to solve the optimal control problem for multiple CAVs trajectory planning.

Solution Algorithm.
In summary, the two-level optimization algorithm is as follows. (i.e., Algorithm 1).

Simulation Settings.
e simulation duration of every scenario with a different traffic volume is 900 seconds. Every scenario is repeated five times with different random seeds. Besides, vehicle arrival conforms to the Poisson distribution [8,21,29].
In signal optimization, a four-arm and two phases of a cycle are selected. e time planning horizon is T p � 50 s.

Results and Discussions.
e two-level integrated optimization model, denoted as "IO", is compared with Signalfixed. ree volume levels, namely, 600, 800, and 1200 vph, are created in this study [50]. e demands in the two approaches (i.e., arm 1 and 3, arm 2 and 4) are set to be the same. To consider the difference in traffic between the two directions, we designed four scenarios, including two balanced and two unbalanced flows. In the "IO" control, vehicle trajectories are optimized by GPOPS [30], and the DP algorithm optimizes the signal timing plan in different scenarios. In the "Signal-fixed" control, vehicle trajectories are optimized by GPOPS [30], and the signal timing plan is optimized by Synchro [51] in different scenarios. Specifically, the signal parameters setup is the same as "IO" (e.g., the lost time of each phase, the saturation flow rate, and the minimum and maximum green time). e average vehicle's delay and gasoline consumption of 4 scenarios with different traffic demands are shown in Table 2. Besides, all CAVs trajectories and traffic signal plans can be obtained. Figure 3 shows vehicle trajectories for 4 scenarios with different demand.
As shown in Table 2, there are four scenarios, namely, 1200/1200, 1200/800, 800/800, and 800/600 vph. e simulation results show a significant decrease in the average vehicle's delay and gasoline consumption when IO control is applied. Compared with the Signal-fixed, the reduced average vehicle's delay with four scenarios are 26.91%, 15.57%, 24.17%, and 21.77%, and the reduced gasoline consumption with four scenarios are 10.38%, 5.30%, 8.50%, and 7.15%. In other words, the proposed integrated optimization method can averagely improve the transportation efficiency by 21.77% and decrease gasoline consumption by 7.83%, compared with Signal-fixed control in these studied scenarios, respectively. Figure 3 shows that all CAVs pass through the intersection at free speed without stopping. erefore, no CAVs are queuing at the stop line of the intersection. Furthermore, this method eliminates the loss of green start-up time compared with no trajectory optimization, and more vehicles can pass through the intersection in the same green interval. Besides, compared with Signal-fixed control, IO control has a smaller vehicle delay and gasoline consumption. is indicates that the integrated optimization method can better consider traffic signal and vehicle trajectories optimization, thus further reducing the average vehicle's delay and gasoline consumption, compared with Signalfixed control. In addition, the minimum green time duration is considered in this study. erefore, a part of the green time duration of the phase is wasted in Figure 3.

Sensitivity Analysis.
In this study, the minimum green time (G min i ) and free-flow speed (v f i ) are the most critical parameters. erefore, we have carried on the analysis and the discussion of these two parameters.

Minimum Green Time.
Minimum green time is to ensure the safety of drivers and pedestrians. A minimum green time that is too long may result in increased delay; one that is too short may violate pedestrian needs. erefore, different geometric shapes of intersections can set different minimum green time. To avoid the influence of other parameters, scenario one (1200/1200 vph) is selected as a sensitivity analysis of the minimum green time. In the sensitivity analysis, G min i varies from 10 s to 20 s with an Journal of Advanced Transportation 7 increment of 1 s. e sensitivity analysis result is shown in Figure 4. As shown in Figure 4, the sensitivity analysis result shows that a shorter minimum green time results in a significantly less average vehicle's delay and gasoline consumption under IO control. In the unsaturated traffic flow, a shorter minimum green time can ensure that CAVs pass through intersections faster, resulting in less travel time, deceleration, and acceleration.
is is because a shorter minimum green time helps avoid the waste of green time caused by the random arrival of vehicles, especially in low traffic flow rates. As a result, there are a smaller average vehicle's delay and lower gasoline consumption.

Free-Flow Speed.
e free-flow speeds influence CAVs arrival time, which is an essential parameter for traffic signal optimization and trajectories planning of this study. Scenario no.1 (1200/1200 vph) is selected as a sensitivity analysis of the free-flow speeds. In the sensitivity analysis, v f i is from 10 m/s to 20 m/s in steps of 1 m/s. e sensitivity analysis result is shown in Figure 5. e sensitivity analysis ( Figure 5) shows that the average vehicle's delay decreases with free-flow speed. is indicates that a more significant free speed resulting in shorter travel times of CAVs would lead to smaller vehicle delays. However, Figure 5 indicates the average gasoline consumption decreases with free-flow speed (10-13 m/s) before reaching the lowest point when the free speed is 13 m/s and then starts to increase. is suggests an optimal free-flow speed to minimize the average gasoline consumption, and the optimal free-flow speed is 13 m/s in this scenario.

Conclusions and Future Work
is study developed a two-level model for traffic signal timing and trajectories planning of multiple connected automated vehicles considering the random arrival of vehicles. Based on the numerical experiments, the following conclusions can be drawn: ( In the current work, this work applied the proposed model to a single intersection, similar to vehicle merging Initialize: (1)Set the total simulation time as T, the time planning horizon as T p , the current time as T c � 0, L, (2)Simulate the arrival times of CAVs at arm i,∀i ∈ I. Iterate: Get the arrival times (t 0 ij , ∀i ∈ I, j ∈ N i ) of CAVs in time planning horizon [T c , T c + T p ].
Calculate t a ij , ∀i ∈ I, j ∈ N i based on equation (1). (6) Optimize the traffic signal timing plan by DP algorithm. (7) For Each signal cycle do (8) Obtain signal time plan S.
Optimize the j-th CAV trajectory by GPOPS. behavior [50,52,53]. We will improve the proposed model and apply it to multiple intersections or a traffic network in the next step.

Data Availability
e data used to support the findings of this study are included within the article.