Multi-Scale Model-Based Hierarchical Control of Freeway Traffic via Platoons of Connected and Automated Vehicles

In this paper a novel hierarchical multi-level control scheme is proposed for freeway traffic systems. Relying on a coupled PDE-ODE nominal model, capturing the interaction between the macroscopic traffic flow and a platoon of connected and automated electric vehicles (CAVs) which acts as a moving bottleneck, a high-level model predictive controller (MPC) is adopted to reduce traffic congestion and vehicle fuel consumption. This controller generates, only when necessary, i.e., according to an event-triggered control logic, the most appropriate reference values for the platoon length and velocity. The platoon is in turn controlled, in an energy efficient way, by a distributed medium-level MPC, so as to track the reference speed values for its downstream and upstream end-points provided by the high-level MPC. The mismatch between the dynamics of the CAVs forming the platoon and their nominal dynamics is tackled via the design of local low-level robust integral sliding mode controllers, which have the capability of compensating for the mismatch. In the paper, the controlled platoon of CAVs is assumed to be immersed into a realistic traffic system with traffic demand not known in advance, which differs from the nominal prediction model used by the high-level MPC.


I. INTRODUCTION
T HE PROBLEM of traffic congestion and its impact on energy and environmental resources is becoming more and more critical, so that there is a strong commitment of researchers to find solutions oriented to promote a more sustainable mobility [1]. Traffic congestion phenomena are in fact the main cause of fuel waste, and of unsafe driving behaviours, which implies a significant cost in terms of resources consumption and direct fatalities [2]. As reported in [3], road traffic also considerably contributes to air pollution, with the related consequences in terms of health issues and indirect fatalities. As a matter of fact, an efficient control The review of this article was arranged by Associate Editor Maria Vanderschuren. of road traffic systems can be beneficial to ensure regular traffic conditions, optimizing the throughput, and alleviating all the problems previously mentioned.

A. BRIEF OVERVIEW OF TRAFFIC CONTROL
In the last decades, traffic control has been a widely investigated research topic, both for its applicative importance, and for its highly challenging theoretical issues. The recent advances in computational power and enabling technologies have fostered the development of control methodologies having as main objective that of mitigating traffic congestion. In this context, classical methods were mainly ramp metering, route guidance or variable speed limits (see [4], [5], [6]). These methods were based on the regulation of the vehicle flow entering the mainstream from on-ramps via traffic lights, on the suitable routing of vehicles and on the variation of speed limits via variable message signs (see [7] for a recent detailed overview). Moreover, traffic control strategies were traditionally based on simple feedback control solutions, as also demonstrated in field implementations [8]. For instance, the so-called ALINEA strategy, aimed at keeping the traffic density close to the critical value locally, so as to make the traffic system exploit the maximum local road capacity, was one of the most applied and studied laws in the literature. However, the need to take into account constraints and specific control objectives paved the way to the application of more advanced optimal control strategies (see, e.g., [9], [10], [11], [12], [13]).
As for the methodologies, the typical choice was model predictive control (MPC), in a standalone fashion or combined with other control strategies, in order to enhance robustness or to reduce the computational burden. In [14], for instance, MPC is adopted for traffic regulation through perimeter control and ramp metering in urban and freeway environments. In [15], instead, the total time spent by vehicles is minimized while reducing fuel consumption. In [16], a MPC scheme with end-point penalties in the cost function, to account for the behaviour of the traffic system beyond the prediction horizon, is proposed. Another example is given in [17], where the proposed MPC optimizes the upstream and downstream boundaries of a speed-limited area and the parameters of the ALINEA ramp metering strategy. While these works use as prediction model the so-called METANET model [18], other contributions rely on the popular cell transmission model (CTM), as for instance [19], where a mixed-integer linear finite horizon optimal control problem (FHOCP) is formulated and solved. In alternative, as in [20], a simple but accurate variable-length macroscopic traffic model (VLM) is adopted in [21]. In order to circumvent the implementation problems related to the possibly high computational burden of traffic control strategies, efficient solutions are provided by the adoption of event-triggered control logics. In such cases, the optimization is executed only when a specific triggering condition becomes active, see, e.g., [22], [23], [24].
In this framework, other recent solutions adopt decentralized or distributed hierarchical control strategies. Examples of such control architectures are reported for instance in [25], where a game-theoretic approach for the optimal coordination of ramp metering and variable speed limits is presented, and in [26] and [27], where distributed and decentralized MPCs are designed. Another very recent example is introduced in [28], where the robust control of road traffic is pursued by means of a hierarchical MPC and sliding mode based two-level control scheme.
A highly innovative paradigm in traffic control, which has gained much interest in the last few years, and that has the potential to become the most suitable approach for traffic control in the future, is instead based on the exploitation of connected and automated vehicles (CAVs). These are highly automated vehicles that are expected to become increasingly common in vehicular traffic in the coming years. They are assumed to be immersed in the macroscopic freeway traffic, which is also composed of conventional (i.e., low automation) vehicles, and are controlled so as to produce a regularizing effect on the surrounding traffic flow by acting as "moving bottlenecks." For instance, in [29], a multi-variable MPC is proposed to control the length and the speed of a platoon of CAVs, with the aim of reducing the fuel consumption of the overall vehicular traffic. In [30], macroscopic models accounting for the trajectory of moving bottlenecks have been proposed, as it is also done, in alternative ways, in [31], [32], [33]. In [34], an original micro-macro METANET model for platoon control in freeway traffic networks is formulated and discussed. In [35], instead, a PDE-ODE model is adopted to describe the dynamics of moving bottlenecks constituted by CAVs, the velocity of which is suitably varied since it is regarded as the control variable. Experimental evidence has demonstrated the effectiveness of CAVs control in dissipating stop-and-go waves deriving from human driving behaviour, with benefits also in terms of emissions, as reported for instance in [36].
All the previously cited works concerning CAVs are important because they marked the beginning of a totally new line of research in traffic control. Yet, in all the previous papers, the microscopic/mesoscopic dynamics of the platoon of CAVs is neglected in the model formulation. This fact is justifiable considering that the model formulated as a basis to design a control strategy must be, in general, extremely simple. Nevertheless, if it is true that a platoon of CAVs may have an impact on the surrounding traffic contributing to its regulation, it is also true, vice versa, that traffic density in the freeway stretch along which the platoon moves significantly influences the attainment of the optimal velocity and optimal length by the platoon. In other terms, it is not certain that the optimal speed and the optimal length determined at a certain time step by the controller that solves the optimization problem at high level are then achievable, in practice, by the platoon, since this latter must adapt its speed and inter-vehicular distances to the condition of the traffic in which it moves.
Moreover, it must be considered that there is always a certain degree of uncertainty in any dynamical model, and this is true also for CAVs. More precisely, there may be a mismatch between the individual vehicle expected (i.e., nominal) behaviour and the actual behaviour, so that, if the dynamics of the platoon of CAVs is neglected, the overall traffic model may result in being simple but not sufficiently accurate for control design. This is why, in order to realize a reliable and actually implementable CAV-based traffic control system, the dynamic behaviour of the platoon and that of the CAVs composing it must be explicitly modeled.
Further, just because of the unavoidable inaccuracy in the CAV model, it is advisable that robust control approaches are adopted to control the vehicles forming the platoons. In [37], for instance, a hierarchical MPC with sliding mode control (SMC) has been proposed to keep a safe distance between the vehicles of the platoon in spite of the modelling uncertainties affecting the vehicles description. A genuine sliding mode platoon control has been instead proposed in [38]. SMC is indeed a powerful control methodology in the case of system models affected by uncertainties [39], as the CAVs model considered in this paper. This control methodology relies on the design of a variable, called sliding variable, such that when this variable is steered to zero, the control objective is attained. The SMC law is typically a discontinuous signal which allows to make the sliding variable become zero in a finite time, enforcing the so-called "sliding mode." The controlled system in sliding mode results in being robust to matched uncertainties and, by virtue of the choice of the sliding variable, exhibits the desired dynamic behaviour [39].
Another aspect to mention is that, while many works consider the traffic demand as known, this can determine the generation of erroneous theoretical conclusions since, in real world freeway traffic systems, the traffic demand is not available a priori, and only an estimate can be used in the prediction models upon which optimal control methods rely. Therefore, SMC is a good candidate methodology to enhance the robustness not only of the platooning control layer, but also of the overall traffic control scheme, as seen in [40], [41], [42], [43], [44].
Motivated by the necessity of tackling the uncertainty in the CAVs dynamics and in the freeway traffic system demand, the goal of this paper is to propose a practically applicable robust optimal control architecture to address the problem of CAVs-based traffic control in realistic scenarios.

B. CONTRIBUTIONS
Inspired by [29] and [37], in this paper a novel hierarchical multi-level control scheme is proposed to reduce traffic congestion and fuel consumption in freeway traffic systems. The proposal consists of four key elements: a high-level MPC relying on the nominal model of the freeway traffic with a platoon of electric CAVs; an event-triggered logic to enable the high-level optimization only when it is actually needed; medium-level distributed MPCs, one for each CAV in the platoon, in order to track the reference values provided by the high-level control in an energy efficient way; finally, lowlevel integral sliding mode controllers, acting locally at the level of any single CAV, to enhance the control robustness.
The novelty of the proposal lies in the combination of three different levels of control, acting on a multi-scale traffic system where there is no a priori knowledge of the macroscopic traffic demand and of the modelling uncertainties and disturbances affecting the CAVs microscopic dynamics. Specifically, this paper aims at providing a control architecture suitable for practical implementation with the following features: • It is capable of optimizing, via a high level MPC, a performance index related to both traffic congestion and fuel consumption of vehicles in a freeway stretch with a platoon of electric CAVs. The high level MPC is based on the nominal traffic model, but, differently from [29], it is applied to a traffic system where the traffic demand is not a priori known and where the microscopic/mesoscopic dynamics of the CAVs and of the platoon they form is not neglected. • It is based on an event-triggered control logic, which activates the high level optimizer only when necessary. This contributes to make the proposal applicable in practice, since in spite of the large number of optimization variables involved in the control problem, the number of times the measurements are acquired and transmitted, and the number of times the optimization problem is solved are significantly reduced with respect to a non event-triggered implementation. • It also relies on distributed MPCs, applied to control, in an energy efficient way, an arbitrary number of CAVs during the platoon formation and maintenance. The platoon, differently from [37], is included in a traffic scenario, so that the effect of traffic local density on the platoon dynamics itself is correctly taken into account. • It includes fast local SMC actions, applied at the level of the individual CAV to compensate for the uncertainty affecting the vehicle model dynamics. Note that the overall control scheme for freeway traffic in presence of platoons of CAVs, apart from being hierarchical and multi-level, is a multi-rate architecture, since the highlevel, the medium-level and the low-level control operate with different time rates. As previously mentioned, the highlevel control is asynchronous since it operates driven by the event-triggered control logic. The other two levels are instead time-triggered control loops. As such, they operate in a synchronous way.

C. ORGANIZATION OF THE PAPER
The paper is organized as follows. In Section II, the model of the freeway traffic with the platoon of CAVs is described, and the control problem is formulated. In Section III, the proposed multi-rate hierarchical multi-level control scheme is introduced and each control level is described in details. Simulations carried out in realistic scenarios are illustrated and discussed in Section IV, while some conclusions are drawn in Section V.

II. MODELLING AND PROBLEM FORMULATION
In this section, a macroscopic first-order model of the considered traffic dynamics with a platoon of CAVs is introduced. Differently from [29], a detailed kinematic description of the electric vehicles in the platoon is also introduced and its impact on the other vehicles in the neighbouring traffic is evaluated.

A. FREEWAY TRAFFIC WITH THE PLATOON OF CAVS
The model adopted to describe the traffic flow is the one presented in [45]. This latter represents an extension of the moving bottleneck model studied in [30], where the moving bottleneck was represented as a punctual capacity restriction, with no physical dimension. The platoon model, unlike the moving bottleneck, allows for the platoon to have a physical dimension that can vary in time.
The present model is based on a suitably modified version of the traditional macroscopic Lighthill-Whitham-Richards (LWR) model [46], [47]. The model is given by a partial differential equation (PDE) describing the traffic flow and two ordinary differential equations (ODEs), to track the trajectories of the initial and final points of the platoon, resulting in a strongly coupled PDE-ODE model. The platoon acts as a moving bottleneck [35], thus occupying some lanes and reducing the capacity of the freeway (see, e.g., Figure 1). Therefore, two discontinuities in the flow appear in correspondence of the front-end and back-endpoints of the platoon and suitable numerical methods have to be applied to treat the flow discontinuities, as detailed in [45].
Consider Figure 2 illustrating the flux reconstruction at the downstream end-point of the platoon. Let ρ = ρ(x, t) be the density of cars corresponding to position x at time t, v = v(ρ) be the average speed of the flow of vehicles, while F = F(t, x, ρ) represents the flow function. The downstream and upstream end-points of the platoon are respectively denoted as indicate the cells in which z d and z u are located. The part of freeway between the interval [z u , z d ] is then occupied by the platoon that reduces the road capacity. Then, flow discontinuities arise in correspondence of z d and z u .
The equations capturing the freeway traffic dynamics therefore are where the flow function F is given by Above, α ∈ [0, 1] is a parameter indicating the reduction in the capacity due to the presence of the platoon. The reduced flow is then indicated as f α . Considering the linear speed-density relation one achieves where V and ρ max are the maximum value of speed and density, respectively. An illustrative example of the trends of the normal flow f and the of reduced flow f α is depicted in Figure 3. Making reference to (1), equations (1c) and (1e) indicate the trajectories of the front-end and back-end-points of the platoon. Specifically, the speed of the initial point is given by where V d (t) ∈ [0, V] is the maximal allowed velocity that z d can assume. As indicated in (5), the platoon cannot travel faster than the surrounding flow, then it cannot overcome cars and it has to adapt its speed to the downstream traffic velocity. On the other hand, for the back-end-point, the speed is given by where is the maximal velocity for z u , while constraint (6) is derived from an admissibility condition on the feasibility of the corresponding Riemann problems, see [45]. Now, having in mind the design of a MPC in discrete time domain, we introduce the discrete time step k ∈ N + . The length of the platoon is then indicated with L(k) = z d (k) − z u (k), which can vary over time depending on the speed of the platoon end-points, i.e., with t being a suitably selected sampling time for the high-level optimizer designed in the next section. In our framework, the velocities v d (k) and v u (k) become the control variables, and in such a way the length of the platoon is also controlled. The platoon length depends both on the spacing between its vehicles and on the amount of vehicles joining it. As usual the space-discontinuous conservation law (1a) is solved by means of a discretization, in both time and space. The portion of freeway is therefore divided into N cells, indicated by the index i = 1, . . . , N, and of length x. The choice of t and x must be compliant with the Courant-Friedrichs-Lewy (CFL) condition 2V t ≤ x. The interfaces of a generic cell i are instead indicated as x i−1/2 , x i+1/2 . At each time interval k the dynamics of the density in each cell i is updated as where F i−1 is the flow between cell i − 1 and cell i. The flow F is obtained by applying the standard supplydemand paradigm [48] in all the cells that are not interested by the presence of the initial and final points of the platoon, while the reduced flow f α is considered for the cells inside the platoon. Specifically, the nominal demand and supply of a cell i are given by where the platoon is not present. Above, ρ cr = 0.5ρ max denotes the critical density, while where the platoon is instead present, the demand and supply are computed considering the reduced flux where ρ α cr = 0.5αρ max and f max α = f α (ρ α cr ). Note that, differently from [29] and in analogy with [28], in this work we assume to have only partial information on traffic demand. This is realistic since in freeway traffic systems, the mainstream inflow is not a priori known, and only a nominal value estimate can be usually retrieved from historical data.
Apart from cells i d and i u , the flow between two generic cells i − 1 and i is obtained as the minimum between the demand of the upstream cell i − 1 and the supply of the following cell i, that is In cells i d and i u , where the end-points of the platoon lie, discontinuities in the flow function arise and the solution to the scalar conservation law with moving discontinuities needs a special treatment. In [45], the numerical scheme able to precisely capture the discontinuities has been developed by applying a conservative reconstruction strategy. Let us consider the discontinuities moving with speeds v u (k) and v d (k) for the upstream and downstream discontinuities respectively, so that the positions of the end-points of the platoon are updated as Now, let us start from the discontinuity in the cell i d (k) where the downstream point z d (k) is located at time step k. A discontinuity in the density is expected to appear in cell i d (k). Then, at each time step k, we take into consideration the Riemann-type initial datum ρ l = ρ i d −1 (k) and ρ r = ρ i d +1 (k), expressing the density discontinuity, and we solve the Riemann problem as detailed in [45]. The obtained solutions, denoted asρ α andρ, correspond to the values of density that are expected to appear in cell i d upstream and downstream the position z d (k) at the following time step. At this point, we replace the value of the density ρ i d (k) with a convex combination of the two valuesρ α andρ, by defining The reconstructed discontinuity is then located at position x i d = x i d −1/2 + d i d x, and the numerical flux at the interface x i d +1/2 can then be reconstructed as with being the time for the discontinuity to reach the position x i d +1/2 where the interface between the two cells lies (see Figure 2). We then set At this point, the same approach is used at the back-end interface. By applying the same reconstruction strategy, the flux at the interface between cell i u , i u+1 is also obtained, and, together with the flux at the other discontinuity reconstructed in (12), and with the classical flows defined above, all the fluxes are computed and the state can be updated.

B. THE PLATOON OF CAVS
The previous traffic model is now further detailed adding a model of the electric vehicles (EVs) constituting the considered platoon of CAVs. Assume to have n EVs and the distance between two vehicles is denoted as d ι , ι = 2, . . . , n, with ι = 1 being the index of the leader (see Figure 4 for an example). By adopting a second-order kinematic model, the longitudinal position of each vehicle can be described along the 1-dimensional space coordinate p ι as with m the vehicle mass and F loss ι (v ι (t)) a term encompassing the aerodynamic drag and the rolling resistance forces, described as where is the air density, c a the aerodynamic coefficient, A is the equivalent vehicle surface, while c r and g are the rolling resistance coefficient and the gravitational acceleration, respectively. The term δ ι (t) is introduced to describe the (matched) uncertainty possibly affecting the vehicle dynamics, including for instance unmodeled dynamics in the actuators as well as mismatches in the description of the losses captured by (15). Due to the adoption of EVs as reference vehicles, the input force u ι (t) can be seen as the result of two additive components, i.e., where u 1 ι (t) is the electric force component, positive during acceleration and negative during deceleration (regenerative braking), u 2 ι (t) ≤ 0 is the mechanical braking force, while F min < 0 and F max > 0 are the force bounds. Being the torques on the wheels the actually controlled signals, the assumption that the total force is obtained as the sum of the torques (namely, T in μ ι ) on each wheel is made, i.e., where M is the set of electrically driven wheels (dependent on the power-train configuration), and R e μ is their effective radius. The relationship (17) directly translates into the assumption thatω μι (t) 0, given for instance through the adoption of a fast-enough low-lever slip control scheme (see [49]) and a proper torque vectoring strategy. Finally, to include electric energy spare as a secondary objective, a simple electric power flow model is here adopted, that is In (18) the wheels rotational speeds ω μι (t) can be well approximated as where the gear ratio g r is supposed here constant since the description is referred to EVs. The sign(·) term at the exponent in expression (18) allows to describe the effects of regenerative braking, in which the power flows "backward" from the wheels to the engine. Finally, the total power entering (or exiting) the battery pack is with η b being the mechanical-chemical energy conversion efficiency.

C. THE CONTROL PROBLEM
We are now in a position to introduce the traffic control problem to solve. It consists in minimizing the traffic congestion and the fuel consumption of the overall traffic flow, by acting on the maximum speed of the downstream and upstream end-points of the platoon, which plays the role of the actuator of the considered traffic system. Moreover, assuming that each of the vehicles in the platoon is independently controlled and a short-distance Vehicle-to-Vehicle (V2V) communication is feasible, the objective is also that of enabling a consensus behaviour of all the CAVs, considering a safe reciprocal distance, and taking into account energy efficiency. These goals have to be reached in spite of both unavoidable modelling uncertainties on the vehicle dynamics, and in presence of uncertain freeway demand, which affects the traffic flow surrounding the platoon of CAVs.

III. THE PROPOSED THREE-LEVEL CONTROL SCHEME
In this paper the control problem presented in the previous section is solved by proposing the hierarchical three-level control scheme depicted in Figure 5. It consists of four key blocks: the high-level optimizer, the event-triggered block, the medium-level MPCs, and the local low-level SMCs. More precisely, the high-level optimizer generates, at each triggering event, the desired platoon length and the corresponding reference speed values of downstream and upstream endpoints, thus providing them to the medium-level MPCs. The optimization is indeed determined by the event-triggered block on the basis of a specific condition on the traffic density, which is assumed measurable in correspondence of the cell crossed by the leading vehicle. Then, the distributed MPCs on the vehicles are aimed at generating the control action to achieve a consensus behaviour (that is following the preceding vehicle while keeping a pre-specified safe distance), and to minimize the electric energy consumption. In the following, all these blocks will be discussed in detail.

A. HIGH-LEVEL TRAFFIC CONTROL
From the traffic point of view, the aim of the high-level optimizer is to minimize the congestion and the fuel consumption of the overall traffic flow by controlling the platoon. Specifically, V d and V u , i.e., the speeds of the downstream and upstream end-points of the platoon, are the control variables, and this is equivalent to control the speed and the length of the platoon itself by virtue of (7). The fuel consumption is computed by means of the model presented in [50], already adopted in [29]. The model is based on the fact that vehicle fuel consumption is related to the average velocity of vehicles, and high consumption is related to very low or very high speed. Following [50], a curve obtained by averaging the commercial fuel consumption characteristics of different vehicles is computed and approximated by the sixth order polynomial with K(v) being expressed in L h −1 and v being the traffic speed expressed in km h −1 . Since in the LWR model the velocity is a function of the density, it is possible to derive the trend of the fuel consumption as a function of the traffic density, specifically here a linear relationship is used. The polynomial (21) can be then re-parametrized in terms of the density ρ, to get the function K(ρ) = K(v(ρ)), that is the consumption rate of one car as a function of the traffic density at the vehicle position. At this point, the Total Fuel Consumption (TFC), denoted by F, is given as function of the density as Since we also aim at reducing traffic congestion, definē ρ ∈ R N as the desired density of cars for the considered freeway segment. The considered control problem is then solved by means of a MPC approach, which generates the high-level control inputs u = [V d , V u ] as solution of a FHOCP. Let N p be the number of time steps of the high-level prediction horizon, so that at a fixed time step k, given the current initial state ρ(k), the optimal control sequences u , h = k, . . . , k+N p , are computed by minimizing the objective function (23) subject to the model dynamics (1), to (5), (6), and to the following constraints where L min , L max and V min d are the positive bounds on the platoon length and downstream velocity, while c is a positive bound on the velocity difference between the upstream and downstream velocities. Finally, the scalars γ F and γ ρ are instead positive weights, suitably selected by the designer in order to prioritize the minimization of TFC or the density error.

B. EVENT-TRIGGERED CONTROL LOGIC
Because of the high number of optimization variables, and in order to avoid packet losses or delays in the communication network, an event-triggered logic is introduced in the scheme. Let {t j } j∈N + be the sequence of the triggering instants, generated such that (25) where T is a suitably chosen event function. This is selected by taking into account the density of the cell associated to the leading vehicle in the platoon at the current time instant t. More precisely, letting ρ (t) be the density of the cell associated to the leader position, the event function is defined as with ε ρ > 0 being a design threshold parameter. Therefore, whenever a new event occurs, a flag equal to 1 is sent to the high-level controller, thus closing the control loop, in order to enable a new optimization given the updated initial conditions with p 1 and p n being the actual position of the leading vehicle (ι = 1) and of the last one (ι = n), respectively, and CAV being the vehicle length. If no events occur, the second condition in (25) means that a new event happens whenever the optimal reference sequences, previously generated by solving the FHOCP at t = t j , have been completely used by the medium-level, that is after N p time steps from the last optimization.

C. MEDIUM-LEVEL PLATOON CONTROL
In order to design the medium-level controller, introduce the following nominal model for each vehicle ι (i.e., consider δ ι (t) = 0) relying on (14), that is whered ι (t) is the nominal inter-vehicle distance, defined using nominal positions asd ι (t) =p ι−1 (t) −p ι (t) and available for measurement (supposedly with ideal precision) through the range sensors mounted at the front of the ιth vehicle. Similarly, the velocity v ι (t) can be measured by assumption, and hence v ι−1 (t) can be made available to vehicle ι by vehicle ι − 1, by virtue of the V2V communication infrastructure.
Let κ be the medium-level sampling time instant, sampled with medium-level period t (thus, corresponding to the selected medium-level MPC discretization time). Vehicle ι computes an optimal control sequence u o = κ, . . . , κ + N p , with N p being the medium-level prediction horizon, by solving a specific FHOCP, detailed below.
Before detailing the expression of the cost function, it is needed to introduce the safety policy given by the so-called Constant Time Headway (CTH) approach, which has been proven to be suitable for the case of locally communicating vehicles [51]. Given the reference values provided by the high-level MPC, that is the desired platoon length L and the velocities v d for vehicle 1 (i.e., the leader) and v u for vehicle n, formally, the required distance d i (t) at any time instant corresponds to where d min > 0 is a constant minimum (safety) distance, arbitrarily designed prior to the establishment of the platoon. Furthermore, in (29), differently from [37], e L = L − p 1 + p n − CAV is a term to take into account the reference length provided by the high-level, and K L > 0 is a gain suitably selected by the designer. Hence, the distributed MPC controller of the ιth vehicle solves a FHOCP as where α d ι , α e ι and α b ι are positive weights selected by the designer. As for the coefficient α b ι , it should always be selected large enough so that the use of mechanical brake is discouraged unless inevitable, while suitably enabling a regenerative braking. Moreover, one has while is the net energy outcome from usage and regeneration during the prediction horizon, and is the cost associated with the mechanical braking force, under the constraints where > 0 is a constant which will be specified in the following. Finally, following the receding horizon principle, only the first computed input is taken for the subsequent interval t, giving rise to a piece-wise constant input signal. All the remaining optimal control sequence is instead sent to vehicle ι + 1 which predicts the sequences {v ι (κ + 1), . . . ,v ι (κ + 1 + N p )} and {d ι (κ + 1), . . . ,d ι (κ + 1 + N p )} at time instant κ + 1 applying the received sequence to the stored nominal model of vehicle ι. Note that the physical parameters of vehicle ι−1 are sent to vehicle ι at connection time, i.e., when vehicle ι approaches the last vehicle of the platoon to join it.

D. LOW-LEVEL VEHICLE CONTROL
As already pointed out, the ιth optimal control input u o ι ( ) is obtained relying on the nominal model (28). To overcome the consequent performance and possibly stability issues, a fast local robust controller is introduced to compensate for the matched uncertainty δ ι so that the real system actually behaves as the nominal one (thus, optimally with respect to the distributed MPC strategy).
In particular, a continuous second-order suboptimal sliding mode control approach originated in [52] is locally enforced. This choice is possible by suitably selecting the so-called sliding variable so as to have a system to control of relative degree 1. This has beneficial effects in terms of chattering alleviation since an additional integrator is included, thus making the input actually fed into the plant continuous. Moreover, in order to achieve robustness in front of matched uncertainties from the initial time instant, an integral sliding mode (ISM) technique is adopted in combination with the suboptimal algorithm.
Since the action of the ISM correction must in practice be exerted at discrete time instants, the quantity τ t is defined as the ISM sampling time. The computation of the corrective control terms is then performed at discrete steps κ, each of length τ , where velocity measurements are acquired, while the total control u ι (κ) has to be applied and held for the subsequent τ seconds.
At this point, before defining the ISM law, for every vehicle ι, we assume that there exists a positive constant such that The local sliding variable is then defined as wherev ι (κ) is the nominal velocity of vehicle ι, computed, relying on (28) given the most recent previous MPC sampling time instant. Then, the total control input to be used in the κth time step is while (28) is left evolving under the nominal input The suboptimal second-order sliding mode control law (see [52] for further details) is designed as withσ ι being the extremal values of the sliding variable σ ι . The proof of convergence for the adopted ISM robustification strategy directly follows from [37, Proposition 1]. Since during the sliding phase the condition u ISM ι (t) −δ ι (t) holds (see [39, Ch. 1 and 2]), exploiting (38) and (35), it directly follows that the constant in (34) must be such that .

IV. CASE STUDY
In this section, the proposed control scheme is assessed in simulation considering realistic scenarios with a stretch of freeway of 50 km divided in N = 250 cells, each of them with length equal to 200 m. Moreover, a platoon of n = 20 CAVs is present in the considered freeway segment.

A. SIMULATION SETTINGS AND SCENARIOS
Since in this paper a multi-rate control scheme is proposed, the integration sampling time is chosen as τ = 0.01 s, while the medium-level and high-level MPC discretization times are t = 1 s and t = 5 s, respectively. This means that the model used to describe the process (i.e., the actual traffic system) is discretized in time with τ t < t. The total simulation window is 1 h.
Relying on the quadratic fundamental diagram expressed by (4a), the maximum speed is V = 140 km h −1 , while, given a segment with 3 lanes, the maximum density is ρ max = 400 veh km −1 . The initial density value is set as ρ(0) = 0.3ρ max 1 N . Furthermore, the initial length of the platoon is set equal to 1.42 km, at z d (0) = 4 km, and the initial vehicle velocity is 70 km h −1 . The maximum nominal flux is chosen equal to f max = 14000 veh h −1 . Note that, as discussed in Section II, the traffic demand is only partially known a priori, that is the real traffic demand is equal to an estimate from historical data plus a random unpredictable disturbance, whose amplitude is a percentage of the nominal demand.
The high-level MPC is designed as in Section III, with weights γ F = 10 and γ ρ = 1000 in order to prioritize the traffic congestion reduction. Moreover, the high-level prediction horizon is chosen as N p = 80. The constraints in (24) are instead such that L min = 0.5 km, L max = 10 km, V min d = 40 km h −1 and c = 30 km h −1 . The event-triggered threshold is selected as ε ρ = 180 veh km −1 .
The medium-level MPC is designed according to (30), with prediction horizon N p = 10. In the CTH policy (29), the safe distance is selected as d min = 15 m, t CTH = 1 s, while the other constraints are the maximum distance d max = 120 m and the maximum speed v max = 140 km h −1 . The ISM control gain is instead selected as = 1000, while the input saturations are F min = −6500 N and F max = 6500 N.
The following two control scenarios are therefore simulated and analysed: S1) abrupt narrowing of the freeway segment: in this scenario, the traffic congestion is abruptly affected by a narrowing of the freeway segment at location 50 km (for instance due to a possible accident) for a time interval of 0.6 h. In order to simulate this condition the incoming flow is kept equal to f max , while the outcoming flow is reduced to 0.3f max . Then, after the considered interval, it becomes again equal to f max . S2) continuous increasing of the traffic congestion: in this scenario, the traffic congestion is continuously increased for all the simulation window by considering a reduction of the outcoming flow to 0.5f max at location 50 km. All the simulations have been executed using the MATLAB tool for NLP CasADi, with the primal-dual interior point solver IPOPT.

B. RESULTS AND DISCUSSION
The results obtained by applying the proposed hierarchical three-level control scheme are hereafter illustrated for the scenario S1. The proposal is then applied also to the scenario S2 to further assess its performance in a different traffic condition with respect to the uncontrolled cases. The amplitude of the considered stochastic disturbance with zero mean is realistically considered equal to 5% of the nominal demand.
The evolution of the density with respect to time and space in scenario S1 is illustrated in Figure 6, where the red lines indicate the trajectory of the platoon. Specifically, Figure 6(a) shows the evolution in the uncontrolled case. Figure 6(b) reports instead the density evolution when the proposed hierarchical three-level control scheme is applied. It is evident that congestion is reduced, thus demonstrating the effectiveness of the proposal even in presence of the uncertainty terms affecting the traffic system and the vehicles in the platoon. One can observe that, in the uncontrolled case, cars vary their speed from the maximum one to the minimum speed due to the reaching of the bottleneck, thus implying the worst situation in terms of fuel consumption. In the controlled case, the length and speed of the platoon are instead modified so that slowing down the CAVs allows to avoid abrupt brakes in presence of the bottleneck and, as a consequence, this is beneficial also for the surrounding traffic flow, which smooths its velocity and reduces fuel consumption. Figures 7 and 8 show in the detail the behaviour of the actual platoon in the same scenario, under the control of the medium-level distributed MPCs and low-level ISM controllers. More precisely, Figure 7(a) shows that during the transient the velocities of the following vehicles tend to harmonize towards the one of the leader. Then, the platoon cruises and a consensus is achieved, in spite of the uncertainties affecting the overall system and with benefits in terms of energy consumption. The corresponding vehicles  inputs are illustrated in Figure 7(b). The distances among the vehicles are reported in Figure 8(a). As expected, they are very similar, thus further confirming the effectiveness of the ISM controllers which enhance the robustness features of the overall control scheme. Finally, Figure 8(b) shows the length of the platoon with respect to the reference value provided by the high-level MPC. Moreover, in the same figure, the flag signals indicating the triggering events, whenever a new high-level optimization is enabled, are reported.
To conclude, the comparison in terms of TFC and computational burden achieved with the proposal applied in scenarios S1 and S2 with respect to the uncontrolled cases is shown in Table 2. Specifically, three different subcases for scenario S1 are considered depending on the percentage level of demand uncertainty with respect to the nominal value, namely D % ∈ {0, 5, 10}. The TFC in the uncontrolled and controlled cases are indicated as TFC uc and TFC c , respectively. Its percentage variation with respect to the uncontrolled case (namely TFC % ) is also computed together with the number of triggering events (#ET). Notice that, for instance in the case of no demand variation (that is in the nominal case in which the demand is known a priori), the proposed approach provides a 2.9% improvement with respect to the uncontrolled case, which is consistent with the results in [29], where a 2.63% improvement is achieved in case of a purely nominal condition of the traffic system. This is a success considering that the model used in the present paper is definitely more realistic than that used in [29], since it includes a lot a dynamical effects previously neglected in other papers dealing with CAVs. Because of this additional realism, we could expect a significant performance degradation. Instead, we achieve practically the same performance obtained in the pure nominal case in [29], of course by designing a more complex controller. Specifically, it is worth highlighting that the proposed approach allows to achieve the 2.3% improvement when a 5% variation of the demand uncertainty is present. In the same uncertain condition, but in case of scenario S2, the percentage improvement is 3.4%. Increasing the uncertainty level to 10%, the improvement percentage in scenario S1 reduces instead to 1.6%. Nevertheless, notice that in all the considered cases the uncertainty affecting the dynamics of the platooning CAVs is always present, which makes the overall traffic system further complex and realistic. Finally, it should be noticed that the number of triggering events enabling the high-level MPC re-optimization is very limited with respect to the time-triggered solution (that would require 720 optimizations in 1 h). For instance in the worst case ( D % = 10%) only 227 events occurs, which corresponds to a reduction of the 68% of the number of high-level optimizations. Overall, it is important to notice that the improvement of the performance of the proposed scheme is obtained by slightly increasing the complexity of the architecture. Specifically, the computational and implementation cost of adding an ET block and the low-level SMC components is minor.

C. LIMITATIONS AND EXTENSIONS
The control approach proposed in this paper will be further improved and extended in future works. In particular, the dynamic description of the phenomena involved will be enriched. For instance, it could be appropriate to include the dynamics of the state of charge of the batteries of the CAVs [53], investigate the use of different fuel consumption models (e.g., [54], [55]), and add the description of the pollutant emissions of the traditional vehicles that make up the macroscopic traffic (see for instance [56] and [57]).
As for the implementation point of view, one could enhance the computational aspects related to the MPC components of the control scheme, by using methods which are particularly suitable for the on-line implementation in traffic systems (e.g., fast MPC [58], plug-and-play MPC [59], or regression-tree based MPC [60]).
Finally, it is certainly worth studying how a multi-level approach of the type proposed in this paper can be combined with the more traditional traffic control methods based on ramp metering, variable speed limits and routing, giving rise to a coordinated traffic control system where CAVs suitably cooperate with more conventional control actuators.

V. CONCLUSION
In this paper a hierarchical three-level control scheme has been proposed for a freeway traffic system in presence of a platoon of CAVs. The main objective is to reduce the traffic congestion, while minimizing the fuel consumption of the overall traffic, by using the platoon of CAVs as actuator, which generates a bottleneck moving along the road stretch. The length and the velocity of the moving bottleneck are suitably varied by controlling the electric vehicles constituting the platoon in an energy efficient way, so as to track the reference signals provided by the high-level optimizer. The presence of uncertainties in the CAVs model is dealt with by introducing low-level sliding mode controllers of integral type. They enhance the robustness of the control scheme, which has anyway to operate under the assumption that the actual traffic demand is not a priori known. Due to the high number of optimization variables, the computational load of a three-level control scheme as the one proposed in this paper might be significant. To overcome this drawback, an event-triggered mechanism is designed to reduce the number of state transmissions and optimizations which need to be executed by the high-level controller. The simulation campaign, carried out in realistic scenarios with a priori unknown traffic demand, has shown the effectiveness of the proposal. It appears to be capable of providing an improvement of traffic congestion, while complying with the fuel consumption reduction objective, with performances comparable with those seen in the literature in case of known traffic demand and perfectly known CAVs dynamics.
ANTONELLA FERRARA (Fellow, IEEE) received the M.Sc. degree in electronic engineering and the Ph.D. degree in computer science and electronics from the University of Genoa, Italy, in 1987 and 1992, respectively. Since 2005, she has been a Full Professor of automatic control with the University of Pavia, Italy. She is the author and coauthor of more than 450 publications, including more than 150 journal papers, 2 monographs and 1 edited book. Her main research interests include sliding mode control and other nonlinear control methodologies applied to traffic systems, intelligent vehicles, power networks, and robotics. She is currently a Senior Editor of the IEEE OPEN JOURNAL OF