CAV Traffic Control to Mitigate the Impact of Congestion from Bottlenecks: A Linear Quadratic Regulator Approach and Microsimulation Study

This work investigates traffic control via controlled connected and automated vehicles (CAVs) using novel controllers derived from the linear-quadratic regulator (LQR) theory. CAV-platoons are modeled as moving bottlenecks impacting the surrounding traffic with their speeds as control inputs. An iterative controller algorithm based on the LQR theory is proposed along with a variant that allows for penalizing abrupt changes in platoons speeds. The controllers use the Lighthill-Whitham-Richards (LWR) model implemented using an extended cell transmission model (CTM) which considers the capacity drop phenomenon for a realistic representation of traffic in congestion. The impact of various parameters of the proposed controller on the control performance is analyzed. The effectiveness of the proposed traffic control algorithms is tested using a traffic control example and compared with existing proportional-integral (PI)- and model predictive control (MPC)- based controllers from the literature. A case study using the TransModeler traffic microsimulation software is conducted to test the usability of the proposed controller as well as existing controllers in a realistic setting and derive qualitative insights. It is observed that the proposed controller works well in both settings to mitigate the impact of the jam caused by a fixed bottleneck. The computation time required by the controller is also small making it suitable for real-time control.


I. INTRODUCTION
The advent of Connected and Autonomous Vehicle (CAV) technology has led to the opening of unforeseen avenues in the field of traffic control [1].Previously, control was restricted to using actuators that were fixed in space such as variable message signs [2], or boundary flow controllers [3].Compared to that, control using CAVs offers greater flexibility as it allows actuators to move in space in a desired manner, therefore, allowing them to be present at desired locations at desired times.In addition to that, using CAVs is relatively cheaper than using fixed actuators which need to be specifically deployed only for the single purpose of traffic control.CAVs on the other hand can be used for several applications like sensing or avoiding hazards due to dangerous driving behavior in their surrounding traffic [4].Also, it can be sometimes difficult to enforce control through traditional fixed actuators like speed limit signs as they can face the issue of low compliance from drivers in some communities.This can also be avoided with the use of CAVs in the traffic stream whose physical presence ahead of drivers would make it impossible for them to avoid the control.
Given the advantages mentioned above, it is essential to explore this newfound potential of traffic control via CAVs by developing new control methodologies that treat CAVs as moving actuators.In this work, we consider the problem of maximizing the mean speed of traffic through traffic jam dissipation by controlling the speed of CAV-platoons entering the road stretch at predefined time intervals using a Linear-Quadratic Regulator (LQR) methodology.CAV-platoons are treated as rolling roadblocks that block the entire flow of traffic at their location.While the general problem of traffic control by controlling the speed of CAV-platoons has been previously explored, the main focus of this work is on proposing and investigating a new controller implementation for this problem in the LQR framework which so far has not been explored in the literature and further compare it with existing approaches from the literature in terms of performance and computational tractability for real-time control.
Several studies in the past decade have considered the problem of moving-bottleneck control of traffic to improve traffic flow.Here a moving-bottleneck implies a reduced flow area that moves along the highway stretch such as that created by slow-moving vehicles.Traditionally, moving bottlenecks are assumed to only partially block the highway cross-section thus allowing part of the traffic to pass by.Unlike that, in this work, the CAV-platoons are considered to block the entire flow of traffic at their location.In [5], the authors have proposed a Proportional-Integral (PI)-type feedback regulator to perform traffic control by controlling the speed of CAV-platoons arriving on the considered highway stretch.While PI-based controllers can produce the desired improvements in traffic flow when coupled with certain arbitrary constraints on the vehicle speeds, in general, they do not guarantee optimal control, and as shown in this study can also result in undesirable control if specific arbitrary bounds on the controlled speeds are removed.In [6], the authors propose a model predictive control (MPC)-based speed control algorithm to control the traffic via CAV-platoons subject to the travel time reduction.They solve a nonlinear optimization problem by means of the interior-point algorithm [7] implemented in MATLAB.It considers an extended version of the first-order traffic dynamics [8], [9] considering the capacity drop phenomenon.Their proposed speed control algorithm is optimal and works well with longer prediction horizon lengths.However, solving a nonlinear optimization problem at each time step is highly time-consuming, especially for extensive networks with several links and junctions, as it requires performing the simulation several times, and therefore can be infeasible for real-time control.In both [5], [6], CAV-platoons are assumed to block the entire flow of traffic at their location.An approach for controlling the speed of the moving-bottlenecks to reduce the overall fuel consumption of the traffic stream is presented in [10] which utilizes the wavefront tracking approach to model the interaction between the controlled vehicles and the surrounding traffic described by a first-order traffic model.In comparison to the current study, [10] does not consider the capacity drop phenomenon, and also the fuel-consumption-based control approach cannot be extended for traffic flow improvements.Besides these articles which deal explicitly with the control aspect of moving-bottlenecks in traffic streams, there are also studies that dive deeper into the accurate modeling of traffic flow dynamics in the presence of moving-bottlenecks at the macroscopic level such as [11]- [15].Note that here we are only interested in studies that use CAV-platoons as moving-bottlenecks.Readers are referred to [1] for an extensive review of various other use cases associated with CAVs in the realm of traffic control.
In this work, we utilize the traffic model presented in [6] which incorporates the capacity drop phenomenon as it allows for realistic control.The authors in [6] present an MPC-based controller to address the problem of moving-bottleneck control of traffic using CAVs.To overcome the time requirement issue of the MPC-based control algorithm and to make a balance between the quality of the speed control algorithm and its computational requirements, we formulate the traffic control problem in the form of an LQR-based optimization problem which regulates the states around an equilibrium point while utilizing the structure of the state-space dynamics of the system.To solve the LQR-optimization problem, we use the Gauss-Newton LQR (GN-LQR) algorithm which has a time-varying structure since we have to deal with the nonlinearity of the traffic dynamics model via a linear time-varying (LTV) system obtained from the linearization process.Due to the complicated structure of the nonlinearity of the traffic dynamics model corresponding to certain states, we cannot utilize the classic analytic/symbolic methodology to calculate the Jacobian-based state-space matrices of the linearization process.Thus, in those cases, we utilize a numerical methodology developed by [16], to numerically calculate the Jacobian-based state-space matrices of the linearization process.
The standard LQR approach and its variants have been used for different control problems in traffic engineering for instance in [17]- [19].However, in the context of the present traffic control problem using CAV-platoons as moving-bottlenecks, the aforementioned version of LQR is novel.
Besides this, the traffic control studies that address the moving-bottleneck-based control of traffic such as [5], [6], [10] have only been carried out using macroscopic traffic simulations.While macroscopic traffic models are attractive due to their robustness and scalability, they are not always realistic which imposes questions on whether such controllers which use macroscopic traffic models at their core are useful in the real-world setting.To address this gap, we also present a microscopic traffic simulation-based case study that tests the proposed LQR-based controller under realistic settings and tries to address questions about the usability and corresponding gaps in the application of such controllers in the real world.
Given the main research gap in this area is the absence of an optimal controller offering fast computation of controls for real-time moving-bottleneck control of traffic and the absence of a study on the moving-bottleneck controllers under realistic settings, the present study makes the following contributions: 1) An LQR-based controller design with macroscopic model dynamics is proposed to control the speeds of CAV-platoons allowing for mitigation of the effect of jam-forming bottlenecks in the traffic stream.The LQR-based controller uses the structure of the state-space matrices of the traffic dynamics system and does not require performing repeated simulations for control, therefore requiring less computation time.The impact of various parameters of the LQR-based controller is investigated with respect to its performance in solving the given problem.2) A variant of the LQR-based controller allowing for a penalty on large changes in control inputs over consecutive time steps is developed and shown to reduce the magnitude of fluctuations in the controlled speeds allowing for safe and realistic control.3) We present a comparison of the proposed LQR-based controllers with existing MPC-based [6] and PI-based [5] controllers from the literature in terms of computational tractability and performance using macroscopic simulation.The proposed LQR-based controllers are observed to perform similarly to the existing controllers in terms of improvement in traffic conditions and outperform them in terms of computation time by about two orders of magnitude in the given traffic scenario (with PI-based controllers this is true when the controller requires tuning the controller gains in real-time).
4) The performance of the proposed LQR-based controller is further investigated using a microscopic traffic simulation setup and compared with the application of existing controllers to the same setup to assess its applicability and utility under realistic settings of traffic flow.The remainder of the article is organized as follows-Section II describes the traffic dynamics model used in this work.The problem statement with the LQR-based solution scheme and algorithms is presented in Section III.Section IV proposes research questions related to the problem, analyzes the proposed approach in a macroscopic setting, and compares it with existing approaches from the literature, followed by a microsimulation-based case study on a similar setup using the proposed and existing controllers.The article is concluded with Section V which presents preliminary answers to the proposed research questions and proposes directions for future work.
Notations: We denote the vectors and matrices by lowercase and uppercase bold symbols, respectively.The set of mdimensional real-valued vectors and n × p real-valued matrices are denoted by R m and R n×p , respectively.The identity matrix of dimension q is represented by I q .The vector/matrix transpose is denoted by T .The positive semi-definiteness and positive definiteness are represented by 0 and 0, respectively.The set-theoretical minimum operator is denoted by min.The dependency on the discrete-time time index k is shown by [k].The prefix δ adding to any time-varying quantity represents the linearized LTV dynamics value, i.e., the difference between the nonlinear dynamics value and the corresponding equilibrium value.

II. TRAFFIC DYNAMICS MODEL
Here, we present the state-space formulation for the traffic dynamics model considered in this work.The flow of traffic across a highway stretch with no on-ramps or off-ramps is modeled using the first-order LWR model [8], [9] while accounting for the capacity drop phenomenon [20], [21].The model is implemented using a Godunov scheme [22] which is proposed previously in [6], [23] and is an extension of the classical Cell Transmission Model (CTM) implementation proposed in [24].Within this, the highway stretch is divided into N L segments of equal length L (km) and the time horizon is divided into N T smaller duration of T (sec) each such that the Courant-Friedrichs-Lewy (CFL) condition [25]: T ≤ L/v f is satisfied where v f refers to the free-flow speed of traffic.Let N CAV be the total number of controlled CAV-platoons currently on the modeled highway stretch.The traffic dynamics model is given as follows: ∀i ∈ {1, . . ., N L }, where ρ i [k] represents the traffic density (vehicles per unit length) in Segment i at time index k, u[k] ∈ R NCAV denotes the control input and is given as where u j [k], ∀j ∈ {1, . . ., N CAV } denotes the control speed of CAV-platoon j in the traffic stream.φ i (., .) is the actual traffic flow (vehicles per unit time) that leaves Segment i and is given as assuming the CAV-platoon j is in Segment i at time index k.The demand and supply functions are further defined using minimum functions of the state and input variables respectively as follows: where Here, q cap i denotes the maximum capacity of Segment i, ρ c , ρ m , w c are parameters of the triangular fundamental diagram of traffic flow denoting the critical density, the maximum density, and the maximum congestion wave speed of traffic, respectively, and α ∈ [0, 1] is a coefficient denoting the extent of the capacity drop where α = 1 implies no capacity drop.Here, v i (u j [k]) denotes the maximum speed of traffic in Segment i at time index k which is given by the following conditional: It is noteworthy this is only the maximum possible speed of traffic in Segment i and not necessarily the actual speed since the actual speed will depend on the realized flow which is a function of both the demand and the supply as shown in (2).In the sequel, for convenience, we denote the demand, supply, and actual flow with the function names followed by the time index without mentioning the inputs required to calculate each.The position of CAV-platoon j on the highway is denoted by p j [k] where its evolution over time is given as where ) denotes the speed of CAV-platoon j during time index k.Note that u j [k] is the control speed of the CAV-platoon or the speed prescribed to the CAV-platoon by the controller while vj is the realized speed of the CAV-platoon which depends on the demand and supply conditions besides the control speed.
Here the bar on top of v is used to differentiate the speed of the CAV from the maximum speed of a segment which is also denoted by v. Figure 1 presents a schematic of the highway stretch with the two elements-Segments and CAV-platoons along with their associated states written underneath each label.
In the following, we also denote this final speed by the function name followed by the time index with the CAV-platoon-index as a subscript.If CAV j is in Segment i at time index k and is expected to end up in Segment i at the end of this time step while traveling at its control speed or if that is there is no restriction on the flow wanting to leave Segment i at time k, then its final speed can be set directly as vj [k] = u j [k] and its final position is calculated using (3).On the other hand, if CAV-platoon j is expected to end up in Segment i + 1 at the control speed and D i [k] > S i+1 [k] that is the flow is restricted by the downstream segment, then its final speed and hence final position needs to be calculated according to certain conditions which are presented in detail in [5] and depend on the platoon length denoted by l j (m), and the minimum demand needed for the platoon to pass to the next segment denoted by S min which is assigned an arbitrary value, apart from the variables and functions introduced above.Thus, (3) is, in fact, nonlinear as the calculation of vj [k] requires the evaluation of conditional statements.
The state-space equation can therefore be written as where the state vector at time index k consists of the traffic densities from all the segments and the current positions of the CAV-platoons on the highway, and the input vector is the same as in (1) consisting of the control speeds for all the CAV-platoons on the highway stretch.
Let n x := N L + N CAV be the number of states and n u := N CAV be the number of inputs.The matrix A = I nx , matrix G ∈ R nx×nx is a diagonal matrix representing the coefficients of the nonlinearities in the dynamics as and the vector-valued function f : R nx × R nu → R nx represents the nonlinearities in the evolution of traffic density and the position of the CAVs with time.In particular, the vector f (x[k], u[k]) can be written as The nonlinearity is indeed non-trivial since it consists of differences of nested minimum functions (2) as well as CAV-platoon speeds obtained from nested conditional statements.The presence of such nonlinearity in the state space makes it necessary for control problems based on the model to utilize nonlinear optimization schemes.
In the next section, we formally define the traffic control problem considered in this study along with the control methodology used to address it.

III. PROBLEM STATEMENT AND LQR-BASED TRAFFIC CONTROL ALGORITHMS
The underlying traffic control problem addressed in this work is defined as follows: Problem 1.Given the nonlinear traffic dynamics (4), control the speed of CAV-platoons entering the highway stretch at known time steps to mitigate the adverse effects of a traffic jam formed in the middle of the stretch.
Problem 1 can be defined in the form of an optimization problem as follows: where the cost function J ) is any function whose minimization ensures an improvement in the traffic conditions which can be in terms of an increase in the overall speed of traffic or a decrease in the overall congestion level on the highway in terms of traffic density.Here, the decision variables u[k] are the speeds of the CAV-platoons on the highway stretch.The essential constraints include the state-space dynamics (4) while the speeds of these platoons can also be constrained to an arbitrary set U.
In the present work, the optimization problem ( 6) is formulated in the LQR optimization framework [26].For linear systems, this results in a horizon-based optimization problem that aims to regulate the states and inputs of the system around the zero point taking into account the system dynamics over a given number of future time steps with the help of a state-feedback law for the control input in the form u where K[k] is called the gain matrix and is calculated using existing formulae from the literature.For nonlinear systems, an LQR-based optimization problem can be written by linearizing the system around an equilibrium point over the length of the horizon and regulating the difference between the actual state (respectively input) and the equilibrium state (respectively input) around the zero point which results in the control input trying to bring the system closer to the equilibrium states.In the context of traffic control, these equilibrium states and inputs are assigned values that result in an improvement in the state of traffic.In this case, the control input is defined by the following state-feedback law which takes into account the selected equilibrium states and inputs: where ) denote the time-varying LQR state-feedback matrix and the time-varying equilibrium point of the nonlinear system (4) at time index k, respectively.
To obtain the gain matrix K[k] at any time-step for controlling the nonlinear system within the LQR framework, the Gauss-Newton LQR algorithm [26] can be applied.The same is presented in the remainder of this section along with a variant of the GN-LQR algorithm that penalizes changes in control inputs over consecutive time steps.Various parameters of these algorithms are investigated in the ensuing sections in the context of traffic control using moving-bottlenecks.

A. The Gauss-Newton LQR algorithm
Here, we present an iterative LQR algorithm called the GN-LQR algorithm [26] which can be used to solve the LQR optimization problem (6) for the given nonlinear system (4).We introduce the following notation before presenting the GN-LQR algorithm: N : horizon length.N -step input and state matrices: Corresponding time-varying equilibrium counterparts: Corresponding control input difference matrix: Linearized state-space matrices: where The LQR cost function to be minimized: where 12 for k = 0, . . ., N − 1 do 13 set: The goal of the algorithm is to minimize the above objective function given the state-space dynamics (4) along with physical bounds on the speeds.With the above notation, the Gauss-Newton LQR (GN-LQR) algorithm [26] can be summarized in Algorithm 1.To the standard algorithm, we also add a step to impose a non-negativity constraint and an upper bound on the speed equal to the free-flow speed.

B. The Gauss-Newton LQR algorithm with a penalty on variation in inputs
The controls produced at any time step using the GN-LQR controller are independent of the controls in the previous time steps.Due to this, the optimal controls can vary significantly over consecutive time steps as is observed in Section IV.Since these controls are executed by CAV-platoons that are traveling within a traffic stream comprised of both autonomous and humandriven vehicles, the latter of which can sometimes have high reaction times, large changes in control inputs over consecutive time steps can result in life-threatening collisions due to vehicles not braking in time.To avoid such circumstances, here we present a variant of the LQR optimization problem which applies a penalty on changes in control inputs over consecutive time steps thus preventing large changes in control inputs.The implementation of the optimization problem is derived based on [27] which prescribes the inclusion of an additional term in the LQR objective function penalizing large variations in control inputs.
This is achieved by modifying the state-space formulation of the system by defining a new state which is an augmentation of the original state vector and the original control input vector and a new control input vector that captures the change in control input.For linear systems, the derivation of the new augmented system and a new LQR objective is provided in Appendix A. A new weight matrix R is introduced in the LQR optimization problem that governs the fluctuations in the control inputs.A larger magnitude of elements in R implies a larger penalty on the change in control inputs over consecutive time steps whereas R = 0 implies no penalty is imposed and the resulting optimization is equivalent to the standard LQR optimization problem.The GN-LQR algorithm presented in the previous section is modified in Step 4 to obtain the new algorithm, Algorithm 2, which is referred to as GN-LQR-with-penalty (GN-LQRP) in the remainder of the article.
In the next section, we present the impact of various parameters of the LQR-based algorithms on the performance of the controller and compare it with existing controllers from the literature.
Algorithm 2: The GN-LQRP Algorithm 1 input: State-space matrices A, G, nonlinear function f , initial state x[0], horizon length N , LQR weight matrices Q, R, R , error tolerance , maximum number of iterations M , initial guess for equilibrium control inputs U * , and initial guess for initial equilibrium state

IV. NUMERICAL STUDY AND IMPLEMENTATION
In this section, we investigate the performance of the proposed control algorithms for moving-bottleneck-based traffic control, mainly in the mitigation of the impact of traffic jams on a highway stretch.A primary investigation is carried out using macroscopic simulations performed with the CTM model described in Section II where the best-case performance of the controller is observed, its sensitivity to various parameters of the algorithm is examined, and comparisons are made with existing PI- [5] and MPC-based [6] controllers.Details of the implementation of the latter two controllers are also presented as part of the analysis.This is followed by a microsimulation-based case study using the Transmodeler traffic simulation software to test the near real-world performance of the controller and to learn the advantages and gaps in applying the controller in the real world.All macroscopic simulations applying the CTM model are performed using MATLAB R2021b running on a 64-bit Windows 10 with a 2.2GHz IntelR CoreTM i7-8750H CPU and 16GB of RAM.

A. Numerical study objectives
The goal of this study is to find the answers to the following questions: • Q1: Are the LQR-based controllers, namely GN-LQR and GN-LQRP, able to reduce the impact of bottlenecks on the highway traffic flow?How do they perform compared with PI-and MPC-based controllers proposed in the literature?• Q2: Are the LQR-based controllers computationally feasible for real-time traffic control?How do they compare with the PI-and MPC-based controllers in terms of computational tractability?• Q3: Are the controls produced by the controllers realistic with regard to application in the real world?• Q4: What is the impact of the various LQR-based controller parameters on its performance with respect to traffic control?
How do the horizon length, number of iterations, and LQR weight parameters impact the control speeds of the CAVplatoons?• Q5: How do the controllers perform in a realistic microscopic traffic setting?Is the performance comparable to the macroscopic case?What follows is a description of the traffic flow scenario and evaluation metrics used to test the performance of the controllers and for comparison with existing techniques.

B. Scenario description and evaluation metrics
The traffic is modeled using the dynamics presented in Section II.This section presents the values of the traffic parameters introduced in Section II along with a description of the default traffic scenario without any fixed bottleneck on the highway stretch, the uncontrolled scenario in the presence of a fixed bottleneck, and the evaluation metrics used to quantitatively compare between different scenarios and controllers.We consider an 8 km long highway stretch with no on-ramps or off-ramps which is divided into 16 even segments of length 0.5 km each.A total duration of 2 hr is considered for the example with time divided into steps of the duration of 10 sec each.The following values of traffic flow parameters are considered: ρ c = 60 veh/km, v f = 100 km/hr, w c = 38 km/hr, ρ m = 320 veh/km, q max = 6000 veh/hr, and α = 0.83, similar to [6].We consider a platoon length of 4.5 m which essentially implies platoons of one CAV per lane, and S min = 10.The initial density on all the segments is set to 20 veh/km.The available supply at the downstream end of the highway is set to q max while the demand wanting to enter at the upstream end of the highway has the profile shown in Figure 2 where the starting and ending demand is 1900 veh/hr and the value along the horizontal line is 5490 veh/hr.A reduced flow area is simulated on the highway by reducing the outflow of Segment 13 to 5400 veh/hr for the first hour after which the flow of the segment is restored to maximum capacity.The impact of the control is measured using three metrics, the Total Travel Time (TTT) in veh•hr, the Total Travel Distance (TTD) in veh•km, and the Mean Speed (MS) in km/hr which are defined similarly to [6] as follows: and MS = TTD/TTT, where T, L, N T , and N L are the duration of each time step, the length of each segment, the total number of time steps in the simulation, and the total number of segments in the considered highway stretch, respectively.In general, a lower TTT, a higher TTD, and a higher MS are desirable -The closer the traffic density is to the critical density, the better the values of these metrics as the traffic is free-flowing and at the maximum flow possible.Therefore, at each implementation of the LQR-based controllers we select such equilibrium states for linearization which improves the values of these metrics.In addition to these metrics, in order to compare the computational performance of different controllers, we consider the Average Computation Time (ACT) for each controller which is defined as the average time required to compute the control inputs at any time step during the simulation.It is computed simply as the average of the time consumed over all the runs of the controller during the simulation.
We assume that controlled vehicles enter the stretch every 15 time steps starting from time step 60 to time step 600 of the process horizon.Under normal circumstances, that is in the absence of the reduced flow area, TTT = 790 and TTD = 78, 998 which gives MS = 99.9. Figure 3 presents the simulated traffic densities in the presence of the reduced flow and without any control implementation, that is, u j [k] = v f , ∀j ∈ {1, 2, . . ., N CAV }.Note that here, N CAV is used to refer to the total number of CAV-platoons that will enter the highway stretch during the entire simulation and not the number of CAV-platoons present on the stretch at once which varies with time.In this case, the evaluation metrics are TTT = 1, 019 and TTD = 78, 998, and

C. Impact of LQR parameters
Here, we test the impact of various parameters of the LQR-based controllers in the context of traffic control using CAVplatoons as moving-bottlenecks.A default set of parameters is defined for the proposed controllers and different parameters are varied in isolation to assess their impact on the control performance which is measured using the parameters defined in Section IV-B, namely the TTT, TTD, and MS.
1) Default LQR-based controller implementation: In this section, we describe the default parameter values for the two LQRbased controllers, namely the GN-LQR (Algorithm 1) and the GN-LQRP (Algorithm 2) controllers.In the following sections, which test the impact of different parameters of the algorithm on their performance, the values of individual parameters are varied keeping the other parameters equal to the default values defined in this section.
For the GN-LQR and GN-LQRP algorithms, we select the weight matrices Q and R as 100I NL 0 0 0 NCAV and I NCAV , respectively, where N L is fixed to the number of segments in the considered highway stretch while N CAV varies with time depending on the number of CAV-platoons on the stretch at a given time.Here, the matrix Q indicates that the weight is only applied to the density states and not the position of the CAV-platoons which are also states of the system.The penalty weight matrix R is set to 30I NCAV .An equilibrium density of 59 veh/km which is 1 veh/km less than the critical density ρ c and an equilibrium speed of 99 km/hr which is 1 km/hr less than the free-flow speed v f is set for both controllers.In general, an equilibrium density of ρ c and a corresponding equilibrium speed of v f is desirable to achieve the maximum traffic flow.However, the equilibrium point is set slightly below these values to allow for numerical Jacobian calculation which requires the calculation of the nonlinear function at points around the equilibrium point.For speeds, v f is the upper bound, and for densities, the derivative is undefined at ρ c and changes sharply around that point thus making these exact values unusable for Jacobian calculation.In addition to the above settings, we set N = 3 time steps.The maximum number of iterations for both GN-LQR and GN-LQRP is set to 1 with an = 0.001.Figure 4 shows the density evolution achieved by applying the GN-LQR and GN-LQRP controllers with the default set of parameters.The corresponding values of MS are 94.5 km/hr and 83 km/hr, respectively.It can be observed from the figure that the default GN-LQR controller works well in reducing the congestion level on the highway stretch thus improving the MS of the traffic.This is achieved by creating smaller controlled reductions in segment flows (by reducing the CAV-platoon speeds) upstream of the bottleneck segment (Segment 13).Since the outflow of segments decreases with an increase in density above the critical density, reducing the flow of traffic in small amounts in the upstream segments thereby increasing their density in small amounts while preventing higher densities in the bottleneck segments results in overall higher flows across all the segments.This is the underlying idea behind moving-bottleneck control which is correctly executed by the LQR-based controller.On the other hand, the GN-LQRP controller does not perform as well since the CAV-platoon speeds are not sufficiently reduced prior to reaching the bottleneck segment due to the penalty on speed changes.In the ensuing sections, we present a detailed analysis of the impact of various parameters of the LQR algorithm on its performance including cases in which GN-LQRP performs equivalently to the GN-LQR controller while also preventing large fluctuations in the control speed.2) Impact of horizon length N : In this section, we test the impact of different values of the horizon length N on the performance of the GN-LQR and the GN-LQRP controllers in terms of the achieved MS.The value of N is varied from 1 to 90 with increments of 1 up to 20 followed by increments of 10.All other settings are as defined in Section IV-C1.The corresponding values of MS are presented in Figure 7.The GN-LQR algorithm performs well even with a small horizon length of 1-time step improving the MS by 15.6% to 93%.The value improves further to 94.5% by N = 3 beyond which it does not improve much with N .It is observed that above N = 20 the MS also tends to decrease showing large dips at N = 60 and N = 90.On closely examining the plots of the density evolution, it is observed that above N = 20, the controller prescribes the CAV-platoons to reduce their speeds at the upstream end of the highway stretch thus reducing the flow into the stretch eventually resulting in less vehicle accumulation at the bottleneck and improving the flow.The control makes sense since the controller is now able to look further into the future impact of each CAV-platoon and make the decision to reduce the platoon speeds sooner into the highway.See Figure 5 [left] for the density evolution at N = 40.However, this is not ideal, since spillbacks caused by congestion at the upstream end result in the creation of bottlenecks and the occurrence of capacity drop on previous links which is unaccounted for by this model.Additionally, at N = 60 and N = 90, there are further stoppages in the middle of the highway beside the stop at the entrance which results in reduced MS, for instance, see Figure 5 [right] which shows the density evolution at N = 60.This could be specific to the case and caused by a few stop decisions cascading into more stoppages.To avoid situations with jams created at the upstream end of the highway stretch, one solution is to avoid horizon lengths equal to or longer than the time taken by the CAVs to reach the bottleneck from the upstream end.Another solution is to attach additional weights to the input deviation term in the objective at the time of entry to ensure that CAVs enter the highway at free-flow speed and only reduce the speeds once sufficiently within the highway stretch to avoid spillbacks to previous links.
The performance of the GN-LQRP controller improves more substantially with increasing N up to N = 60 beyond which a degradation in its performance is observed.As also mentioned in the previous section, the reason for the poor performance of the GN-LQRP controller at low horizon lengths is the insufficient time for CAV-platoons to reduce their speeds due to the penalty on speed changes.As the horizon length increases, vehicles are able to start reducing their speeds sooner into  the highway stretch and achieve enough speed reduction to reduce the impact of the bottleneck.Figure 6 presents the density evolution for the case with N = 50 time steps showing the speed reduction which starts from the upstream end of the highway stretch.Note that this case does not result in spillbacks since Segment 1 still has enough capacity to accommodate more vehicles from the previous link unlike the case in Figure 5 [left] which reaches close to the maximum density in Segment 1 for a brief period.Beyond N = 60, we observe similar spillback situations with GN-LQRP as well as situations similar to Figure 5 [right].
The variation in ACT with an increase in the horizon length for both GN-LQR and GN-LQRP controllers is presented in Figure 8.In the case of LQR-based controllers, the largest component of the computation time is dedicated to the computation of the derivatives of the nonlinear function.Therefore, as expected, the ACT increases almost linearly with the horizon length as the number of steps involving derivative calculation increase linearly.Deviation from the linear increase in ACT can be expected in some cases due to the accumulation of CAV-platoons on the highway which can increase the number of calculations per controller run or in cases where the CAV-platoons are blocked upstream of the highway reducing the number of calculations required.The order of magnitude for ACT is still a fraction of a second which makes it suitable for real-time control.
3) Impact of the number of iterations: Here, we test the impact of changing the number of iterations of the GN-LQR algorithm on its control performance.The number of iterations is varied from 1 to 10 while keeping the other parameters equal to the default values.Table I presents the values of the MS achieved at the different number of iterations.It is observed that the best performance of the GN-LQR controller is achieved at the number of iterations = 1.From Table I, it can be seen that increasing the number of iterations degrades the performance of the controller.The main reason for this is a higher reduction in the speeds of CAVs with an increasing number of iterations.The iterations are intended to find a point where the controls used to obtain the derivative of the system are close to the controls obtained by using the derivative at which point the system is said to have converged.However, when the derivative is not significantly affected by the control inputs such that the direction of change in inputs does not change with the control inputs used to obtain the derivative, then the controls continue to grow/reduce over iterations and only converge at the lower/upper bound of the inputs.Since the optimal speeds at any iteration are used as the equilibrium speeds for the next iteration, then if in the first iteration, the optimal controlled speeds are below the equilibrium speed then in the following iterations, the control speeds will continue to be below the equilibrium speed for the respective iterations eventually resulting in a speed equal to the lower bound.In cases where the optimal speed in the first  iteration is above the equilibrium speed, convergence is achieved in the first iteration itself as the controls are capped to the free-flow speed, and the initial equilibrium speed is already set close to the free-flow speed.Therefore, those cases result in the same control even with a higher number of maximum iterations.In general, as the number of iterations increases, the control speeds of the CAV-platoons tend to be lower than with maximum iterations = 1 resulting in less than the best performance.4) Impact of objective weights-Q, R, and R : The objective of the LQR optimization problem defined in ( 9) is different from the MS metric used to judge the performance of the LQR-based controllers.Generally, the MS is expected to improve if the controls cause the states to move close to the critical density.Larger weights on the error terms for either the states or the control inputs (or the change in control inputs in the case of GN-LQRP) incline the controller towards producing controls to reduce the corresponding errors.Here we assess the relationship between the various weights in the LQR objective function and the MS obtained from the resulting control.For this analysis, the weights are defined in the form of diagonal matrices as Q = w Q I NL 0 0 0 NCAV , R = w R I NCAV , and R = w R I NCAV where w Q , w R , w R ∈ R. The weights w Q , w R , and w R are individually varied from 10 to 150 with an increment of 10 while keeping the other parameters equal to the default set of values.Figure 9 presents the plots of MS against the varying objective weights.It is observed that a larger difference between Q and R results in better MS.This is expected as the optimal control is to reduce the speed of the CAV-platoons before the bottleneck segment on the highway and a comparable weight on the speed (control input) error term prevents enough reduction in speed to improve the traffic flow.As also observed in Section IV-C2, the performance of the GN-LQRP controller is worse than the GN-LQR controller for smaller values of horizon length due to insufficient reduction in speeds.Increasing the magnitude of R , naturally results in further degradation in the performance as the reduction in speeds is further restricted.We also consider the variation in the values of R at N = 50 time steps at which the performance is observed to be equivalent to the performance of the GN-LQR controller according to Figure 7.In this case, the performance is equivalent to the GN-LQR controller at the smaller values of R and decreases with an increase in R due to the same reason of insufficient reduction in speeds.Figure 10 presents a plot of changes in control speed over consecutive time steps for CAV-platoon 11 which enters the highway stretch at 210 time-step at different values of R with N = 50 time steps.

D. Comparison of GN-LQR and GN-LQRP with PI-and MPC-based controllers
Two of the most common types of controllers implemented in traffic control systems are PI-and MPC-based controllers.PI-based controllers are much faster in computation and therefore adequate for real-time control, however, they do not offer the guarantee of optimal control.The MPC-based controller on the other hand guarantees optimality for a given horizon length, however when the system is nonlinear such as the system in the current study, the approach used to solve the problem is usually based on some meta-heuristic algorithm such as an evolutionary algorithm which can be inefficient due to repeating simulations and therefore unfit for real-time control.The LQR-based controllers investigated in the current study do not require performing the simulation several times to reach a solution, instead, it exploits the structure of the state-space matrices.In addition, the computed solution guarantees the optimality of the LQR objective which in this case ensures that the system states are as close to the critical density of the system as possible and therefore at the maximum flow.
The PI-based controller used for comparison in this study is implemented based on [5].The equation for obtaining the speed value at each time step is presented in (19).Setting values for the controller gains K p and K I is a challenging problem in  general.The authors in [5] provide certain fixed gain values for the PI-based controller but do not present a formal method to derive them.Since the setup is slightly different from the one used in [5], we obtain optimal gains for the scenario in this study by setting up a nonlinear optimization problem with the objective of minimizing the MS.The details of the fitting are presented in Appendix B. The study [5] also prescribes a lower bound of 60 km/hr for the control speed.This lower bound is implemented by projecting the controller speed to within the bounds.A reason for this lower bound is to avoid the sudden large drops in speed to extremely low values of speed which may lead to accidents due to the low reaction time of drivers.However, with increased connectivity and autonomy in vehicles, it is possible to expect no plausible limit to what the speeds can be dropped to.In this study, we, therefore, also test the controller with and without a lower bound on the speed.The MPC-based controller is also implemented according to [6].The objective and constraints are set exactly as in [6] and are presented in Appendix C for reference.The horizon length for the MPC-based controller is set to 20 time steps as in [6].Again, a lower bound for the value of control speeds equal to 60 km/hr is prescribed.This lower bound can be naturally incorporated into the MPC-based controller as a constraint.
The LQR-based controller investigated in this study does not inherently allow for a lower bound similar to the above controllers.Instead of applying a lower bound similar to the PI-based controller, in this work, we use the GN-LQRP controller which applies a penalty on changes in the speeds.This is different from the implementation for PI-based and MPC-based controllers which do not account for changes in consecutive time steps.All the parameters for the LQR-based algorithms are set to their default values as defined in Section IV-C1 with the exception of the horizon length for GN-LQRP which is set to 50 time-steps as it is observed to be the best setting for GN-LQRP in Section IV-C2.
The obtained values for K P and K I for the PI-based controller with a lower bound of 60 km/hr on the controlled speeds are 0.7944 and 0.1091, respectively.The values obtained without a lower bound are 0.7908 and −8.9832, respectively.Figure 11 presents the density evolution plots for the PI-based controllers with and without a lower bound.The TTT, TTD, and MS for the tested controllers are presented in Table II.It is observed that the PI-based controller with a lower bound reduces the impact of the bottleneck by slowing down the traffic approaching the bottleneck thus creating smaller jams upstream of the bottleneck and reducing the density of the cells at the bottleneck which reduces the effect of capacity drop and improves the MS.On the other hand, the optimal controller gains without a lower bound result in no improvement in the MS over the  uncontrolled case.To further understand the ineffectiveness of the PI-based without a bound, we set the controller gains to the values in [5] instead of their optimal values.Figure 11 also presents the plot of density evolution for this new setting of the PI-based controller.It is seen that the obtained control, in this case, is to stop all the vehicles at the entrance which is possible in this case since the speeds can drop to 0 km/hr.This makes sense for reducing the error term of the controller which only penalizes segments ahead of the controlled platoons that have a density above the critical density and in this case, the densities for all the segments ahead of the first segment are zeros therefore there is theoretically no error for the controller.However, this is not ideal for the traffic flow since it only reduces congestion on the current highway stretch at the expense of creating a spillback upstream of the stretch that results in congestion upstream.It results in a small MS value of 38.7% despite a small TTT value of 413.1 since the TTD value becomes very small equal to 16, 002 due to a smaller number of vehicles entering the stretch.Therefore the restricted speeds offer better results in this case in terms of our evaluation metrics.Figure 12 presents the density evolution plots for the MPC-based controllers with and without a lower bound which are similar in this case.The MPC-based controller tries to minimize the TTT while maximizing the outflow from the bottleneck and keeping the density of the bottleneck segment close to the critical density.Therefore, in both cases, it tries to reduce the density at the bottleneck to reduce the impact of the capacity drop rather than stopping all vehicles upstream of the stretch as in the case of the PI-based controller.In the case of MPC, while stopping all vehicles at the entrance would still minimize the TTT, it potentially creates a larger gap between the critical density and the density of the bottleneck segment and reduces the outflow from the bottleneck thereby making such a solution sub-optimal.
The density evolution plots for the LQR-based controllers are presented in Figures 4 and 6 and the evaluation metrics are  Table II also presents the computation time (CT) in seconds for all the controllers which refers to the ACT in the case of MPC-and LQR-based controllers and to the offline computation time for gain calculation in the case of PI-based controllers.The PI-based controller is the fastest of the controllers as the gain computations are performed offline and there is virtually no computation time for the controller in real-time.Although in cases when the offline gains do not work as expected due to different realization of the traffic conditions than expected, then real-time computation of gains may be required similar to the MPC-based controller with a finite horizon for which the traffic conditions can be reliably known.Since the underlying problem is nonlinear, it will require solving a nonlinear optimization problem in real-time which would also be computationally expensive, only less expensive than MPC-based due to the lower number of control variables which in this case would just be the values of the two gains.The computation time for the LQR-based controllers mostly comprises the time to compute the derivatives of the state space equation with respect to the equilibrium states and inputs.As seen in Figure 8, the computation time of the GN-LQR almost linearly increases with N as the derivative calculations increase.Although since gradients can be computed with very few computations of the nonlinear function of the state-space model, this time requirement is negligible and therefore the overall time for obtaining controls from the LQR-based controller is also quite small.As expected, the computation time for the MPC-based controller is the highest of all the controllers due to the nonlinear optimization performed every time the controller is run.Note that computation times can vary significantly based on implementation and the authors do not claim their implementation of the controllers to be the most efficient.However, given that LQR-based and PI-based computations are expected to be faster due to the presence of only algebraic computations as compared to MPC-based which requires performing the simulation several times to solve the nonlinear optimization problem, the results for the computation times do serve to validate the hypothesis about the expected computational differences between MPC-based and the other controllers.

E. Microsimulation-based case study
In this section, we reproduce the traffic control scenarios presented in Section IV-B using a realistic microscopic traffic simulator and use it to test the performance of the proposed GN-LQR and GN-LQRP control algorithms under a realistic setting.The existing PI-and MPC-based controllers are also tested in microsimulation for the same setting.The micro-simulation is performed using TransModeler 6.1 [28], [29] while the control algorithm is implemented using MATLAB R2021b.The GISDK [30] API in TransModeler is used to interact with the controller.All processes related to the microsimulation-based analysis are run on a 64-bit Windows 10 with a 2.3GHz IntelR CoreTM i7-11800H CPU and 16GB of RAM.
1) Simulation and control pipeline: Note that in the microsimulation, the proposed controllers are tested in a scenario involving a multi-lane highway by controlling CAV-platoons formed by CAVs positioned side-by-side, acting as a rolling roadblock.The simulation framework is shown in Figure 14, consisting of four important modules: the TransModeler testbed, GISDK Python interface, CTM-based state-space model and controller, and visualization.The framework closes the loop for the state-feedback control, where TransModeler provides the testbed to simulate realistic traffic conditions.The simulation framework supports the trajectory-level traffic analysis, which helps us better understand and explain the control mechanisms of the proposed controllers.The ensuing sections provide a detailed overview of the simulation settings.
2) Network and demand: The tested road network is composed of an 8 km long highway stretch with 3 lanes.The same is depicted in Figure 14.In Figure 14, the origin of the considered road stretch is marked using meter markers as K0, and the end of the stretch is marked as K8.To capture the real demand and supply conditions and effectively form a CAV platoon before they enter the considered stretch of the roadway, two buffer zones of length 1 km each are established at both the beginning and the end of the highway segment, hence a 10 km long highway is simulated.The capacity of the highway stretch is set at 2000 veh/lane-hr.The speed limit for the entire stretch is 100 km/hr.The total simulation duration is 2 hours.The demand profile is the same as in Figure 2. The microscopic simulation parameters are carefully tuned to reproduce a bottleneck and capacity drop which are consistent with the scenario described in Section IV-B.A bottleneck is simulated on Segment 13 with the help of a lane-changing guide signal with a 30% compliance rate.This lane-changing guidance system is implemented in the inner lane (top lane in Figure 14) and is expected to prompt 30% of the traffic to switch lanes, resulting in an observed 10% decrease in outflow for Segment 13 which is the same as implemented in the macrosimulation-based case study.Interested readers are referred to [31] for more details on the dynamics model, parameter settings, and tuning for TransModeler, and move to the Appendix D to see more details on the models.In this case, the bottleneck begins at the start of the simulation and ends at the end of the first hour.Figure 15 [top left] shows the evolution of density with a bottleneck without control.3) Control actuator: The control actuators in this control system consist of vehicles (CAV-platoons) on the highway.Each CAV-platoon comprises of three vehicles moving side-by-side on the three lanes and acting as a rolling roadblock thus blocking all traffic behind them and not letting any vehicles overtake them.Since the road is blocked by the CAV-platoon, the control speed of the platoon will be mandatorily enforced on the upstream traffic, which is the key to the effectiveness of the controllers.These CAV-platoons are dispatched to the highway stretch using the AddVehicle() function in TransModeler.The origin, destination, lane, and speed of the platoon vehicles are then customized based on the simulation settings.The three CAVs are positioned separately on Lane 1, Lane 2, and Lane 3 (where Lane 1 is the inner lane and Lane 3 is the outer lane) at the same location.The IDs of the CAV-platoons are recorded and monitored for sensing and control purposes.Upon activation of the controller, the speed of the CAV-platoon is directly regulated to the recommended speed using the SetVehicleInfo() function in TransModeler.The state of the CAV-platoon is tracked using the GetVehicleInfo() function in TransModeler, and the trajectory of the platoon is monitored to serve as both the control input and the input for result visualization.
4) Sensors deployment and output: In this simulation, the sensors are categorized into two types: fixed sensors and mobile sensors.The fixed sensors are positioned along the highway diagram, which is divided into 16 segments of equal length, each spanning 0.5 km same as the space discretization in the state-space model of the controller.The output of the sensors includes the density of each segment.The simulation assumes that the density of each segment can be directly measured, instead of having to be estimated.The mobile sensors refer to the CAV-platoons that are dispatched to the road.The position of the CAV-platoons is used as the sensing input for the controllers.
5) Metrics calculation: For the microsimulation analysis, metrics including TTT, TTD, and MS are calculated using vehicle trajectories, such that T T T = N V i=1 t i , and T T D = N V i=1 x i , where x i and t i are the travel distance and travel time for vehicle i, and N V is the total number of vehicles loaded in the microsimulation.To generate the density dynamics heatmap, according to Edie's definition, the traffic density (ρ Edie ), flow (Q Edie ), and speed (V Edie ) [32], [33] can be defined by the following equations: The 4 parameters t, ∆t, x, ∆x bound a spatio-temporal box that contains multiple trajectory points, where A = ∆x × ∆t.Here, T tot is the total travel time of the vehicles in the bounded boxes, and X tot is the total travel distance.Finally, MS is calculated in the same way as described in Section IV-B.
6) Process update frequencies: Three types of update frequencies are considered in this work which are described as follows: (1) Simulation step update frequency (10 Hz) is the rate at which the simulation progresses.In other words, it's the number of times the simulation updates per second.At a frequency of 10 Hz, the microsimulation updates 1 time per 0.1 seconds.Each update would correspond to a "step" in the simulation, during which the state of the simulation could change based on the inputs and the underlying model.(2) Controller update frequency (0.1 Hz) is the rate at which the state of the controlled system (which could include various parameters or variables representing the highway dynamics and CAV platoon) and the is the rate at which the controlled speed (the output from the controller) is actuated by the CAV platoon.At a frequency of 1 Hz, the suggested speed from the controller is actuated by the CAV-platoons every 1 second.Before the suggested speed is updated, the CAV-platoon will forward at the same speed.This ensures that the platoon is receiving relatively frequent updates about the speed it should be traveling at.7) Results and discussion: In this section, we discuss the results obtained from the implementation of the aforementioned controllers namely GN-LQR, GN-LQRP, PI-and MPC-based.The parameter settings used for the various controllers are the same as in Section IV-D.For the PI-and MPC-based controllers, we only test the case with a lower bound of 60 km/hr on the control speed.For GN-LQRP, we also test two additional runs with different values of N as described later in this section.Table III presents the values of the evaluation metrics obtained from the microscopic traffic simulation both in the presence and absence of a bottleneck on the highway and in the presence of control using the aforementioned algorithms to mitigate the impact of the bottleneck.The computation time for the controllers is omitted in this table as the controllers' implementation is the same as in the above sections and there is no significant difference in computation time.From the table, it can be observed that for the case without a bottleneck, unlike the macroscopic scenario described in Section IV-B, the MS is 82.94 rather than 99.9 (which is almost equal to the free-flow speed).This is because in microsimulation, even though the desired speed of traffic is the free-flow speed which is the same between the macrosimulation and microsimulation, the modeled behavior of drivers and vehicle-vehicle interactions can result in reduced speeds on various occasions in the simulation.The MS is further reduced to 72.75 in the presence of the bottleneck as the bottleneck causes an increase in the TTT due to additional lane changing resulting in a slowing down of upstream traffic.The slight increase in the TTD in the case with no bottleneck is because of the additional CAV-platoons (36 platoons, that is 108 vehicles) that are loaded onto the network in this case but are left uncontrolled.Figure 15 presents the evolution of density in the controlled scenarios for the different controllers similar to those presented for the macroscopic simulations.Plots of the trajectories of vehicles in the simulation from 30 to 80 minutes for the three lanes are presented in Figure 16.The remaining simulation duration is omitted from the plot as it mostly contains traffic in a free-flowing state.Notice, that in the uncontrolled case, the slowing down of vehicles at the bottleneck extends upstream up to around the 2 km mark.The increase in the length of the jam results from the slowdown of approaching vehicles behind the already slowed-down vehicles from lane changing at the bottleneck.As the resulting slowed-down vehicles eventually arrive at the bottleneck, they are again required to change lanes which causes the jam to continue in time.
Compared to the uncontrolled case, the implementation of the GN-LQR controller results in an increase in the MS of traffic to 79.43 by reducing the TTT from 1,089 to 996 while the TTD only changes by a small amount.Figure 17 presents the space-time diagram for the trajectories in the simulation for the scenario with GN-LQR, which helps develop a qualitative understanding of the performance of the controller in a realistic setting.Notice that in comparison to the uncontrolled case, in this case, the jam only extends to around the 4 km mark.The slowdown of CAV-platoons can be observed from the reduction in the slope of the red lines on the plot (depicting the trajectories of the CAV-platoons) which occurs due to the control as well as naturally when the platoons meet the jam wave created by the bottleneck.While the controlled slowdown of CAV-platoons still results in a slowdown of vehicles upstream of the platoons, the resulting jam waves are much less severe and shorter resulting in less disruption to upstream traffic which recovers quickly.This causes the overall jam to reduce in size and increases the speed of traffic in general.This is similar to the observations made in the case of the macroscopic simulation-based analysis and provides preliminary confirmation of the usability of the controller in a realistic setting.
For the implementation of GN-LQRP, we consider three different values of N namely 50, 30, and 10 with all other parameter values the same in Section IV-D.The evaluation metrics for the three cases are presented in Table III.While N = 50 is determined as the best tuning value for the controller in the macroscopic setting, it is found that it is not the best value in the microscopic setting where it leads to stopping of vehicles more upstream of the bottleneck sometimes causing significant jam waves that lead up to the upstream end of the highway stretch (see Figure 19 in Appendix E).While GN-LQRP with N = 50 also results in a slowdown of vehicles more upstream of the bottleneck in the macroscopic setting, it does not lead to severe jams in that case.This difference between the macroscopic and microscopic scenarios for the GN-LQRP controller can be explained by the inherent differences in the impact of the vehicle slowdowns between the macroscopic and microscopic models.The TTD in this case is also smaller because of a reduction in the number of vehicles entering the stretch due to jams at the upstream end of the highway stretch.As found in Section IV-C2, reducing N results in a slowdown of vehicles to less upstream of the bottleneck.Therefore, here we also test the controller with reduced values of N = 10 and N = 30.It is observed that smaller N does prevent jams at the upstream end of the stretch restoring the value of TTD as compared to the case with N = 50.In fact, GN-LQRP with N = 10 is also able to outperform GN-LQR in the microscopic setting.From Figure 18, it can be observed that as compared to GN-LQR, GN-LQRP with N = 10 noticeably results in more gradual changes in the speed of traffic close to the bottleneck which results in reduced disruptions in upstream traffic from the controlled slowdowns.This is expected from GN-LQRP as it inherently penalizes abrupt changes in control speeds which are less realistic and provides optimal control under restricted speed changes.
Finally, the PI-and MPC-based controllers also result in an improvement in the state of traffic over the uncontrolled case by reducing the TTT and as a result the MS as seen from Table III.The plots of vehicle trajectories for the PI-and MPCbased controllers are presented in Appendix E. Between the two controllers, the MPC-based controller performs better and almost comparably with GN-LQRP while the PI-based controller performs worse than GN-LQR in microsimulation.Both the controllers show limited changes in CAV-platoon speeds (prior to joining the jam waves) as seen from the trajectory plots which is due to the lower bound on control speeds.MPC is able to use the limited changes to reduce the size of the jam more significantly as also observed from Figure 15.

V. CONCLUSIONS AND FUTURE DIRECTION
From the previous analysis, we have some preliminary suggestions regarding the questions posed in Section IV-A which are as follows: 1) A1: Both GN-LQR and GN-LQRP controllers are able to reduce the negative effects of fixed bottlenecks on the highway stretch in both macroscopic and microscopic traffic settings.The performance of the GN-LQR controller is comparable to the MPC-based controller (with and without a lower bound on control speeds) and the PI-based controller (with a lower  5) A5: Both GN-LQR and GN-LQRP controllers improve the MS metric of traffic over the uncontrolled case in the microscopic traffic simulation by reducing the speed of the traffic approaching the bottleneck resulting in a reduction in the length of the formed jam waves.While the same tuning parameters as the macrosimulation analysis for both the proposed controllers improve the traffic state in microsimulation as well, it is observed that GN-LQRP works better with smaller values of N = 10 in microsimulation.Larger values of N result in the slowing down of vehicles a long way upstream of the bottleneck resulting in comparatively worse performance than when the CAVs only slow down close to the bottleneck which takes place with a smaller N .Differences in the optimal tuning of controllers between the macroscopic and microscopic simulations are expected due to the inherent differences between the models and the difficulty associated with the precise determination of macroscopic model parameters used within the controller which can affect the traffic dynamics.The existing controllers are also observed to work well in microsimulation.In the current study, GN-LQRP (N = 10) and MPC (with a lower bound on the control speed) marginally outperform other controllers.The current analysis compared the different controllers at the same random seed value for the microsimulation.While understanding the impact of simulator stochasticity on the controllers' performance is out of the scope of the current work which mainly focuses on proposing and analyzing new controllers for traffic control and performing a preliminary test on their usability in microsimulation, performing multiple runs of the simulator with different seed values to account for stochasticity and analyzing them is necessary to develop a deeper understanding of the effectiveness of CAV-based control in the real world.There is also scope for a more in-depth analysis of CAV-based control under different scenarios such as in the presence of different jam/bottleneck triggering factors including but not limited to the existence of curvature, slope, lane-drop, tunnels, bridges, imposed speed limits, or ramps.There are several potential directions of improvement for the controllers mainly with regard to application in the microscopic simulation case which would further improve their performance in the real world.These include the extension of the control approach to account for uncertainty in parameter estimation for the state-space equation used in the controller as well as accounting for the lack of compliance of the CAVs to the control inputs.These changes would be a step in the direction of robust traffic control using CAVs.Also, additional flexibility in the form of lane-wise control of CAVs can be considered wherein the CAVs are no longer restricted to travel side-by-side but can block the traffic in individual lanes in coordination with other CAVs to achieve optimal control.This would require a lane-wise macroscopic traffic model similar to one in [34] to define the state-space model for the controller.Besides, the current work can also be extended to large-scale road networks and consideration of other forms of control such as ramp metering and variable speed limits which can be incorporated into the framework as inputs to the system thus allowing for integrated control.

APPENDIX A LQR OPTIMIZATION PROBLEM WITH A PENALTY ON CONTROL INPUT CHANGES
This section describes the formulation of the modified LQR optimization problem which penalizes changes in control inputs over consecutive time steps.To explain the idea of this controller, we use the equations for a standard linear system of the form where (11) simply describes the current input in terms of the previous input and the change in input.This system can also be written as follows: By defining new augmented vectors and matrices, we can write (12) as follows: Since ( 15) resembles a standard linear system, we can write a new optimization problem in the LQR framework which regulates both the states and the change in control inputs (instead of the control inputs directly) around the zero point.The objective function of this problem is defined as follows: where and R ∈ R (nu×nu) is the weight matrix for the penalty on control input changes.
The same idea can be applied to regulate the states of the nonlinear system (4) around a predefined equilibrium point while keeping the change in the control inputs to a minimum.The GN-LQR algorithm (Algorithm 1) can be applied for this purpose with some modifications.The modified algorithm is presented as Algorithm 2.
For Algorithm 2, the augmented states and control inputs and the corresponding equilibrium points are defined in the same way as in (13) which are further used to obtain the stacked augmented matrices corresponding to X, U , X * , U * .The augmented state-space matrices are defined using the linearized state-space matrices (8) as follows:

APPENDIX B PI-BASED CONTROLLER IMPLEMENTATION
The PI-based controller implemented in this work is based on that presented in [5].The control law is given as follows: where K P and K I are the controller gains, and e[k] is the controller error which defined as follows: where ρj [k] is the average density over segments downstream of CAV-platoon j and upstream of the fixed bottleneck on the highway stretch, and ρ is called the density set-point which is supposed to be the ideal value of ρj [k] and is set equal to the critical density ρ c .Here the average density is calculated using only the segments whose density is above a certain threshold value which in this case is set to the critical density.So if none of the segments between the CAV-platoon and the fixed bottleneck have density above ρ c , then the e j [k] is undefined (since there are no segments to calculate it over) and In this work, the optimal gains for the PI-based controller are obtained by setting up a nonlinear optimization problem with the objective of maximizing the MS.The fmincon() solver of MATLAB which implements the interior point algorithm is used to solve the nonlinear optimization problem as a minimization problem.The state evolution steps for the full duration of the simulation are set as constraints within fmincon() while the objective is set to the negative of MS.The bounds for the gain values are set to [−10, 10] for both gains which are found to be sufficient.The solver is initialized with the solution values 0.8 and 1.6 which are obtained from [5].

APPENDIX C MPC-BASED CONTROLLER IMPLEMENTATION
The MPC-based controller is implemented based on the implementation in [6].The corresponding optimization problem is given as follows: where k is the current time step, T is the duration of a time step, N P is the prediction horizon which is set to 20-time steps as in [6], N is the number of segments on the considered highway stretch, L i is the length of segment i, ρ i [h] is the density of segment i at time step h, ρī[h] is the density of the bottleneck segment at time step h, φī[h] is the outflow from the bottleneck segment at time step h, β 1 , β 2 , and β 3 are the objective weights set to 0.1, 0.1 and 0.8 respectively as in [6], and u min and u max are the upper and lower bound on the control speeds.While we only control the CAV-platoon speeds explicitly in this optimization, the density of highway segments is also a variable since it changes with the value of the control speed.The above optimization problem is solved using the interior point algorithm implemented through the fmincon() solver of MATLAB.

APPENDIX D CAR-FOLLOWING MODEL
The car-following model used in the microsimulation is the intelligent driver car-following model [35], shown in Equations ( 22)-( 24), the detailed parameters are listed in Table IV.In TransModeler, only the desired time gap T and the free acceleration exponent δ are editable.

Figure 1 :
Figure 1: Three segments of the modeled highway stretch along with two CAV-platoons and the corresponding states written underneath.Arrows indicate the direction of traffic flow.

Figure 2 :
Figure 2: Upstream demand profile for the given example.

Figure 3 :
Figure 3: Density (veh/km) evolution in the uncontrolled case with the reduced bottleneck flow.

Figure 5 :
Figure 5: Density (veh/km) evolution on the highway stretch with GN-LQR controller with [left] N = 40 time steps, and [right] N = 60 time steps.

Figure 6 :
Figure 6: Density (veh/km) evolution on the highway stretch with GN-LQRP controller with N = 50 time steps.

Figure 7 :
Figure 7: Variation in MS with horizon length N for GN-LQR and GN-LQRP.

Figure 8 :
Figure 8: Variation in Average Computation Time (seconds) for each run of the controller with horizon length N for GN-LQR.

Figure 9 :
Figure 9: Variation in MS with LQR objective weight matrices for GN-LQR and GN-LQRP.

Figure 10 :
Figure 10: Change in control speed value over consecutive time steps at different values of penalty weight for GN-LQR with a penalty.

Figure 11 :
Figure 11: Density (veh/km) evolution on the highway stretch with PI-based control with [top left] optimal gains and lower bound of 60 km/hr, [top right] optimal gains and no lower bound, and [bottom] arbitrary gains and no lower bound.

Figure 12 :
Figure 12: Density (veh/km) evolution on the highway stretch with MPC-based control with a [left] lower bound of 60 km/hr, and [right] no lower bound.

Figure 13 :
Figure 13: CAV platoon speed profile for platoon 11 with [left] PI-based controller with lower bound, and MPC-based controller with and without lower bound, and [right] GN-LQR controller and GN-LQRP controller with R = 30I.

Figure 14 :
Figure 14: The simulation framework developed in TransModeler to validate the controller.

Figure 15 :
Figure 15: Density (veh/km) evolution on the highway stretch in microsimulation for the different scenarios: [top left] no control with bottleneck, [top middle] with LQR control, [top right] with LQRP control, [bottom left] with PI control, [bottom right] with MPC control.

Figure 16 :
Figure 16: Vehicle trajectory space-time diagram for the uncontrolled scenario (the color of each trajectory point reflects the speed of the vehicle at the time): [top] the left lane, [middle] the middle lane, [bottom] the right lane.

Figure 17 :
Figure 17: Vehicle trajectory space-time diagram for the controlled scenario using GN-LQR controller with N = 3 (the color of each trajectory point reflects the speed of the vehicle at the time, and the CAV-platoons trajectories are labeled with red lines): [top] the left lane, [middle] the middle lane, [bottom] the right lane.

Figure 18 :
Figure 18: Vehicle trajectory space-time diagram for the controlled scenario using GN-LQRP controller (the color of each trajectory point reflects the speed of the vehicle at the time, and the CAV-platoons trajectories are labeled with red lines): [top] the left lane, [middle] the middle lane, [bottom] the right lane.

Figure 20 :
Figure 20: Vehicle trajectory space-time diagram for GN-LQRP (N = 30) (the color of each trajectory point reflects the speed of the vehicle at the time): [top] the left lane, [middle] the middle lane, [bottom] the right lane.

Figure 21 :
Figure 21: Vehicle trajectory space-time diagram for MPC (the color of each trajectory point reflects the speed of the vehicle at the time): [top] the left lane, [middle] the middle lane, [bottom] the right lane.

Figure 22 :
Figure 22: Vehicle trajectory space-time diagram for PI (the color of each trajectory point reflects the speed of the vehicle at the time): [top] the left lane, [middle] the middle lane, [bottom] the right lane.
State-space matrices A, G, nonlinear function f , initial state x[0], horizon length N , LQR weight matrices Q, R, error tolerance , maximum number of iterations M , initial guess for equilibrium control inputs U * , and initial guess for initial equilibrium state x * [0].

Table I :
Variation in MS with the number of iterations for GN-LQR.

Table II :
Comparison metrics over different traffic control scenarios for the given example.Computation time (CT in seconds) refers to ACT for MPC-and LQR-based controllers and offline computation time for PI-based controllers.

Table III :
Evaluation metrics for different scenarios tested in the microsimulation.

Table IV :
Parameter setting for the Intelligent Driver Car-following Model in TransModeler.