{'fraction_non_alphanumeric': 0.05067845591471933, 'fraction_numerical': 0.013932747698608638, 'mean_word_length': 4.04411622743508, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimal Control of Connected Automated Vehicles with Event/Self-Triggered Control Barrier Functions

We address the problem of controlling Connected and Automated Vehicles (CAVs) in conflict areas of a traffic network subject to hard safety constraints. It has been shown that such problems can be solved through a combination of tractable optimal control problem formulations and the use of Control Barrier Functions (CBFs) that guarantee the satisfaction of all constraints. These solutions can be reduced to a sequence of Quadratic Programs (QPs) which are efficiently solved on-line over discrete time steps. However, the feasibility of each such QP cannot be guaranteed over every time step. To overcome this limitation, we develop both an event-triggered approach and a self-triggered approach such that the next QP is triggered by properly defined events. We show that both approaches, each in a different way, eliminate infeasible cases due to time-driven inter-sampling effects, thus also eliminating the need for selecting the size of time steps. Simulation examples are included to compare the two new schemes and to illustrate how overall infeasibilities can be significantly reduced while at the same time reducing the need for communication among CAVs without compromising performance.


I. INTRODUCTION
The emergence of Connected and Automated Vehicles (CAVs) along with new traffic infrastructure technologies [1], [2] over the past decade have brought the promise of resolving long-lasting problems in transportation networks such as accidents, congestion, and unsustainable energy consumption along with environmental pollution [3], [4], [5]. Meeting this goal heavily depends on effective traffic management, specifically at the bottleneck points of a transportation network such as intersections, roundabouts, and merging roadways [6].
To date, both centralized and decentralized methods have been proposed to tackle the control and coordination problem of CAVs in conflict areas; an overview of such methods may be found in [7]. Platoon formation [8], [9], [10] and reservation-based methods [11], [12], [13] are among the centralized approaches, which are limited by the need for powerful central computation resources and are typically prone to disturbances and security threats.
In contrast, in decentralized methods each CAV is responsible for its own on-board computation with information from other vehicles limited to a set of neighbors [14]. Constrained optimal control problems can then be formulated with objectives usually involving minimizing acceleration or maximizing passenger comfort (measured as the acceleration derivative or jerk), or jointly minimizing travel time through conflict areas and energy consumption. These problems can be analytically solved in some cases, e.g., for optimal merging [15] or crossing a signal-free intersection [16]. However, obtaining such solutions becomes computationally prohibitive for realtime applications when an optimal trajectory involves multiple constraints becoming active. Thus, on-line control methods such as Model Predictive Control (MPC) techniques or Control Barrier function (CBFs) are often adopted for the handling of additional constraints.
In the MPC approach proposed in [17], the time is normally discretized and an optimization problem is solved at each time instant with the addition of appropriate inequality constraints; then, the system dynamics are updated. Since both control and state are considered as the decision variables in the optimization problem, MPC is very effective for problems with simple (usually linear or linearized) dynamics, objectives, and constraints [18]. Alternatively, CBFs [19] [20] can overcome some shortcomings of the MPC method [21] as they do not need states as decision variables, instead mapping state constraints onto new ones that only involve the decision variables in a linear fashion. Moreover, CBFs can be used with nonlinear (affine in control) system dynamics and they have a crucial forward invariance property which guarantees the satisfaction of safety constraints over all time as long as these constraints are initially satisfied.
An approach combining optimal control solutions with CBFs was recently presented in [22]. In this combined approach (termed OCBF), the solution of an unconstrained optimal control problem is first derived and used as a reference control. Then, the resulting control reference trajectory is optimally tracked subject to a set of CBF constraints which ensure the satisfaction of all constraints of the original optimal control problem. Finally, this optimal tracking problem is efficiently solved by discretizing time and solving a simple Quadratic Problem (QP) at each discrete time step over which the control input is held constant [20]. The use of CBFs in this approach exploits their forward invariance property to guarantee that all constraints they enforce are satisfied at all times if they are initially satisfied. In addition, CBFs are designed to impose linear constraints on the control which is what enables the efficient solution of the tracking problem through a sequence of QPs. This approach can also be shown to provide additional flexibility in terms of using nonlinear vehicle dynamics (as long as they are affine in the control), complex objective functions, and tolerate process and measurement noise [22].
However, in solving a sequence of QPs the control update interval in the time discretization process must be sufficiently small in order to always guarantee that every QP is feasible. In practice, such feasibility can be often seen to be violated due to the fact that it is extremely difficult to pick a proper discretization time which can be guaranteed to always work. In this paper, an eventtriggered and a self-triggered approach are considered as two solutions to remedy this issue. We note that the idea of synthesizing event-triggered controllers and BFs or Lyapunov functions has been used in [23] with the goal of improving stability, while a unified event-driven scheme is proposed in [24] with an Input-to-State barrier function to impose safety under an input disturbance.
The contribution of this paper is to replace the timedriven nature of the discretization process used in the OCBF approach which involves a sequence of QPs by an event-driven mechanism, hence achieving QP feasibility independent of a time step choice. In the event-triggering scheme, given the system state at the start of a given QP instance, we extend the approach introduced in [25] for a multi-agent system to define events associated with the states of CAVs reaching a certain bound, at which point the next QP instance is triggered. On the other hand, in the self-triggering scheme, we provide a minimum interevent time guarantee by predicting the first time instant that any of the CBF constraints in the QP problem is violated, hence we can determine the triggering time for the next QP instance. Both methods provide a guarantee for the forward invariance property of CBFs and eliminate infeasible cases due to time-driven inter-sampling effects (additional infeasibilities are still possible due to potentially conflicting constraints within a QP; this separate issue has been addressed in [26]).
The advantages of these event-driven schemes can be summarized as follows: (i ) Infeasible QP instances due to inter-sampling effects are eliminated, (i i ) There is no longer a need to determine a proper time step size required in the time-driven methods, (i i i ) The number of control updates under event-driven schemes is generally reduced, thereby reducing the overall computational cost, and (i v) Since the number of QPs that need to be solved is reduced, this also reduces the need for unnecessary communication among CAVs. This reduced need for communication, combined with the unpredictability of eventtriggering relative to a fixed time discretization approach, results in the system being less susceptible to malicious attacks.
The paper is organized as follows. In Section II, we provide an overview of the decentralized constrained optimal control for CAVs in any conflict area setting, along with a brief review of CBFs to set the stage for the OCBF approach. We also review the time-driven approach for solving such optimal control problems, motivating the proposed solutions to the problem. In Section III, both methods are separately presented, including the formulation and solution of QPs in both frameworks. In Section V, simulation results compare time-driven, eventtriggered, and self-triggered schemes, in terms of their performance metrics, computational load, and infeasible cases to show how constraint violations can be reduced through the proposed approaches.

II. PROBLEM FORMULATION AND TIME-DRIVEN CONTROL SOLUTIONS
In this section, we review the setting for CAVs whose motion is cooperatively controlled at conflict areas of a traffic network. This includes merging roads, signalfree intersections, roundabouts, and highway segments where lane change maneuvers take place. We define a Control Zone (CZ) to be an area within which CAVs can communicate with each other or with a coordinator (e.g., a Road-Side Unit (RSU)) which is responsible for facilitating the exchange of information (but not control individual vehicles) within this CZ. As an example, Fig. 1 shows a conflict area due to vehicles merging from two singlelane roads and there is a single Merging Point (MP) which vehicles must cross from either road [15].
In such a setting, assuming all traffic consists of CAVs, a finite horizon constrained optimal control problem can be formulated aiming to determine trajectories that jointly minimize travel time and energy consumption through the CZ while also ensuring passenger comfort (by minimizing jerk or centrifugal forces) and guaranteeing safety constraints are always satisfied. Let F (t ) be the set of indices of all CAVs located in the CZ at time t . A CAV enters the CZ at one of several origins (e.g., O and O in Fig. 1) and leaves at one of possibly several exit points (e.g., M in Fig.  1). The index 0 is used to denote a CAV that has just left the CZ. Let N (t ) be the cardinality of F (t ). Thus, if a CAV arrives at time t , it is assigned the index N (t ) + 1. All CAV indices in F (t ) decrease by one when a CAV passes over the MP and the vehicle whose index is −1 is dropped.
The vehicle dynamics for each CAV i ∈ F (t ) along the lane to which it belongs in a given CZ are assumed to be of the form where x i (t ) denotes the distance from the origin at which CAV i arrives, v i (t ) denotes the velocity, and u i (t ) denotes the control input (acceleration). There are two objectives for each CAV, as detailed next.
where L i (·) is a strictly increasing function of its argument. Constraint 1 (Safety constraints): Let i p denote the index of the CAV which physically immediately precedes i in the CZ (if one is present). We require that the distance where ϕ denotes the reaction time (as a rule, ϕ = 1.8s is used, e.g., [27]) and δ is a given minimum safe distance. If we define z i ,i p to be the distance from the center of CAV i to the center of CAV i p , then δ depends on the length of these two CAVs (generally dependent on i and i p but taken to be a constant over all CAVs for simplicity). Constraint 2 (Safe merging): Whenever a CAV crosses a MP, a lateral collision is possible and there must be adequate safe space for the CAV at this MP to avoid such collision, i.e., where i c is the index of the CAV that may collide with CAV i at merging point m = {1, ..., n i } where n i is the total number of MPs that CAV i passes in the CZ. The determination of CAV i c depends on the policy adopted for sequencing CAVs through the CZ, such as First-In-First-Out (FIFO) based on the arrival times of CAVs, or any other desired policy. It is worth noting that this constraint only applies at a certain time t m i which obviously depends on how the CAVs are controlled. As an example, in Fig. 1 under FIFO, we have i c = i − 1 and t m i = t f i since the MP defines the exit from the CZ. Constraint 3 (Vehicle limitations): Finally, there are constraints on the speed and acceleration for each i ∈ F (t ): where v max > 0 and v min ≥ 0 denote the maximum and minimum speed allowed in the CZ for CAV i , u min < 0 and u max > 0 denote the minimum and maximum control for CAV i , respectively. Optimal Control Problem formulation. Our goal is to determine a control law achieving objectives 1-2 subject to constraints 1-3 for each i ∈ F (t ) governed by the dynamics (1). Choosing L i (u i (t )) = 1 2 u 2 i (t ) and normalizing travel time and 1 2 u 2 i (t ), we use the weight α ∈ [0, 1] to construct a convex combination as follows: Letting β := α max{u 2 max ,u 2 min } 2(1−α) , we obtain a simplified form: where β ≥ 0 is an adjustable weight to penalize travel time relative to the energy cost. Note that the solution is decentralized in the sense that CAV i requires information only from CAVs i p and i c required in (3) and (4). Problem (8) subject to (1), (3), (4), (5) and (6) can be analytically solved in some cases, e.g., the merging problem in Fig. 1 [15] and a signal-free intersection [16]. However, obtaining solutions for real-time applications becomes prohibitive when an optimal trajectory involves multiple constraints becoming active. This has motivated an approach which combines a solution of the unconstrained problem (8), which can be obtained very fast, with the use of Control Barrier Functions (CBFs) which provide guarantees that (3), (4), (5) and (6) are always satisfied through constraints that are linear in the control, thus rendering solutions to this alternative problem obtainable by solving a sequence of computationally efficient QPs. This approach is termed Optimal Control with Control Barrier Functions (OCBF) [22].
The OCBF approach. The OCBF approach consists of three steps: (i ) the solution of the unconstrained optimal control problem (8) is used as a reference control, (i i ) the resulting control reference trajectory is optimally tracked subject to the constraint (6), as well as a set of CBF constraints enforcing (3), (4) and (5). (i i i ) This optimal tracking problem is efficiently solved by discretizing time and solving a simple QP at each discrete time step. The significance of CBFs in this approach is twofold: first, their forward invariance property [22] guarantees that all constraints they enforce are satisfied at all times if they are initially satisfied; second, CBFs impose linear constraints on the control which is what enables the efficient solution of the tracking problem through the sequence of QPs in (i i i ) above.
The reference control in step (i ) above is denoted by The unconstrained solution to (8) is denoted by u * i (t ), thus we usually set u ref However, u ref i (t ) may be chosen to be any desired control trajectory and, in general, we use u ref Thus, in addition to the unconstrained optimal control and position u * i (t ), x * i (t ), observations of the actual CAV state x i (t ) provide direct feedback as well.
To derive the CBFs that ensure the constraints (3), (4), and (5) are always satisfied, we use the vehicle dynamics (1) Each of these constraints can be easily written in the form of b q (x(t )) ≥ 0, q ∈ {1, ..., n} where n stands for the number of constraints and x(t ) = [x 1 (t ), x 2 (t ), ..., x N (t ) (t )]. The CBF method (details provided in [22]) maps a constraint b q (x(t )) ≥ 0 onto a new constraint which is linear in the control input u i (t ) and takes the general form where L f , L g denote the Lie derivatives of b q (x(t )) along f and g , respectively and γ(·) stands for any class-K function [22]. It has been established [22] that satisfaction of (9) implies the satisfaction of the original problem constraint b q (x(t )) ≥ 0 because of the forward invariance property. It is worth observing that the newly obtained constraints are sufficient conditions for the original problem constraints, therefore, potentially conservative. We now apply (9) to obtain the CBF constraint associated with the safety constraint (3). By setting where the class-K function γ(x) = k 1 x is chosen here to be linear. Deriving the CBF constraint for the safe merging constraint (4) poses a technical challenge due to the fact that it only applies at a certain time t m i , whereas a CBF is required to be in a continuously differentiable form. To tackle this problem. we apply a technique used in [22] to convert (4) to a continuous differentiable form as follows: where Φ : R → R may be any continuously differentiable function as long as it is strictly increasing and satisfies the boundary conditions Φ(x i (t 0 i )) = 0 and Φ(x i (t m i )) = ϕ. In this case, a linear function can satisfy both conditions: where L is the length of road traveled by the CAV from its entry to the CZ to the MP of interest in (4). Then by setting proceeding as in the derivation of (11), we obtain: The speed constraints in (5) are also easily transformed into CBF constraints using (9) by defining This yields: for the maximum and minimum velocity constraints, respectively.

Inclusion of soft constraints in (8).
As a last step in the OCBF approach, we can exploit the versatility of the CBF method to include soft constraints expressed as terminal state costs in (8), e.g., the CAV achieving a desired terminal speed. This is accomplished by using a Control Lyapunov Function (CLF) to track specific state variables in the reference trajectory if desired. A CLF V (x i (t )) is similar to a CBF (see [22]). In our problem, 2 we can express the CLF constraint associated with tracking the CAV speed to a desired value v ref i (t ) (if one is provided) as follows: where > 0 and e i (t ) makes this a soft constraint. Now that all the original problem constraints have been transformed into CBF constraints, we can formulate the OCBF problem as follows: subject to vehicle dynamics (1), the CBF constraints (11), (15), (18), (19), the control constraint (6), and CLF constraint (20). Note that this is a decentralized optimization problem, as it only requires information sharing with a small number of "neighbor" CAVs, i.e. CAV i p and i c (if they exist). We denote this set of CAV neighbors by R i (t ) at time t : Note that R i (t ) in general can change over time, i.e., i c (t ) changes when dynamic "resequencing" (discussed in [28]) is carried out and i p (t ) changes in the case of lane changing maneuvers. It is worth mentioning that in the single lane merging example in Fig. 1 i p cannot change.
A common way to solve this dynamic optimization problem is to discretize [t 0 .. with equal length ∆ and solving (21) over each time interval. The decision variables u i ,k = u i (t i ,k ) and e i ,k = e i (t i ,k ) are assumed to be constant on each interval and can be easily calculated at time t i ,k = t 0 i + k∆ through solving a QP at each time step: subject to the CBF constraints (11), (15), (18), (19), and control input bounds (6) and CLF constraint (20) where all constraints are linear in the decision variables. We refer to this as the time-driven approach, which is fast and can be readily used in real time.
The main problem with this approach is that a QP may become infeasible at any time instant because the decision variable u i ,k is held constant over a given time period ∆. Since this is externally defined, there is no guarantee that it is small enough to ensure the forward invariance property of a CBF, thereby also failing to ensure the satisfaction of the safety constraints. In other words, in this time-driven approach, there is a critical (and often restrictive) assumption that the control update rate is high enough to avoid such a problem. There are several additional issues worth mentioning: (i ) imposing a high update rate makes the solution of multiple QPs inefficient since it increases the computational burden, (i i ) using a common update rate across all CAVs renders their synchronization difficult, and (i i i ) the predictability of a time-driven communication mechanism across CAVs makes the whole system susceptible to malicious attacks. As we will show next, the two event-driven solutions proposed in this paper alleviate these problems by eliminating the need to select a time step ∆.

III. EVENT-DRIVEN SOLUTIONS
There are several possible event-driven mechanisms one can adopt to invoke the solution of the QPs in (23) subject to the CBF constraints (11), (15), (18), (19) along with control input bounds (6). One approach is to adopt an event-triggering scheme such that we only need to solve a QP (with its associated CBF constraints) when one of two possible events (as defined next) is detected. We will show that this provides a guarantee for the satisfaction of the safety constraints which cannot be offered by the time-driven approach described earlier. The key idea is to ensure that the safety constraints are satisfied while the state remains within some bounds and define events which coincide with the state reaching these bounds, at which point the next instance of the QP in (23) is triggered. Another idea is to create a self-triggering framework with a minimum inter-event time guarantee by predicting at t i ,k the first time instant that any of the CBF constraints in the QP problem (23) is subsequently violated. We then select that as the next time instant t i ,k+1 when CAV i communicates with the coordinator and updates the control.

A. Event-triggered Control
Let t i ,k , k = 1, 2, ..., be the time instants when the QP in (23) is solved by CAV i . Our goal is to guarantee that the state trajectory does not violate any safety constraints within any time interval [t i ,k , t i ,k+1 ) where t i ,k+1 is the next time instant when the QP is solved. Define a subset of the state space of CAV l at time t i ,k such that: where is a parameter vector whose choice will be discussed later. Intuitively, this choice reflects a trade-off between computational efficiency (when the s i values are large and there are fewer instances of QPs to be solved) and conservativeness (when the values are small). We denote the set of states of CAV i that satisfy (24) at time t i ,k by In addition, let C i ,1 be the feasible set of our original constraints (3), (4) and (5) defined as Next, we seek a bound and a control law that satisfies the safety constraints within this bound. This can be accomplished by considering the minimum value of each component in (9) for every q ∈ {1, 2, 3, 4} as shown next.
Let us start with the first of the three terms in (9), L f b q (x(t )). Observing that not all state variables are generally involved in a constraint b q (x(t )) ≥ 0, we can rewrite this term as L f b q (y i (t ), y r (t )) with y i (t ) as in (25) and where r stands for "relevant" CAVs affecting the specific constraint of i , i.e., r ∈ R i (t ) in (22) whereS i (t i ,k ) is defined as follows: Similarly, we can define the minimum value of the third term in (9) For the second term in (9), note that L g b q (x i ) is a constant for q = {1, 3, 4}, as seen in (11), (18) and (19), therefore there is no need for any minimization. However, in (15) is state-dependent and needs to be considered for the minimization. Since x i (t ) ≥ 0, note that L g b 2 (x i ) is always negative, therefore, we can determine the limit value b min 2,g i (t i ,k ) ∈ R, as follows: where the sign of u i ,k , i ∈ F (t i ,k ) can be determined by simply solving the CBF-based QP (23) at time t i ,k . Thus, the condition that can guarantee the satisfaction of (11), (15) and (18), (19) for q = {1, 2, 3, 4}. In order to apply this condition to the QP (23), we just replace (9) by (31) as follows: It is important to note that each instance of the QP (32) is now triggered by one of the following two events where k = 1, 2, . . . is a local event (rather than time step) counter: In this case either r = i p or r = i c (e.g., in the merging problem i c = i − 1 = i p if such a CAV exists). Thus, Event 2 is further identified by the CAV which triggers it and denoted accordingly by Event 2(r ), r ∈ R i (t i ,k−1 ).
As a result, t i ,k , k = 1, 2, ... is unknown in advance but can be determined by CAV i through: where t i ,0 = t 0 i . Note that k is a local event counter for each i so, strictly speaking, we should use k i . Instead, the index k can be dropped and we can write x i (t i ,last ) rather than x i (t i ,k−1 ). However, when there is no ambiguity, we will simply write x i (t i ) to indicate that t i is the "last event" occurring at i .
The definition above is based on events which directly affect CAV i (leading to i solving a QP) whether they are triggered by i or r = i . Alternatively, we may think of any CAV i as generating Event 1 leading to a new QP solution by CAV i itself and Event 2(i ) which affects some j ∈ {l |i ∈ R l (t )}, i.e., i is relevant to some j = i . In this case, a violation of the bound of S i (t i ,k−1 ) or S i (t j ,k−1 ) by the evolving state of CAV i triggers events relevant to CAV i or j , respectively. Events 1,2(r ) can be detected through the dynamics in (1) or from on-board state measurements, if available, along with state information from relevant other CAVs (e.g., CAVs i p and i c in Fig. 1) through the coordinator. Finally, note that because of the Lipschitz continuity of the dynamics in (1) and the fact that the control is constant within an inter-event interval, Zeno behavior does not occur in this framework.
The following theorem formalizes our analysis by showing that if new constraints of the general form (31) hold, then our original CBF constraints (11), (15) and (18), (19) also hold.
Proof: The proof follows along similar lines as Theorem 2 in [25]. By (25), we can write: for q ∈ {1, 2, 3, 4}, by adding these inequalities which have the same direction it follows that i.e., (9) is satisfied. By Theorem 1 of [22] applied to (9), if x i (0) ∈ C i ,1 , then any Lipschitz continuous controller u i (t ) that satisfies (9) ∀t ≥ 0 renders C i ,1 forward invariant for system (1). Therefore, C i ,1 is forward invariant for the dynamic system defined in (1). Remark 1: Expressing (31) in terms of the minimum value of each component separately may become overly conservative if each minimum value corresponds to different points in the decision variable space. Therefore, an alternative approach is to calculate the minimum value of the whole term.
Selection of parameters s i . The importance of properly selecting the parameters s i is twofold. First, it is necessary to choose them such that all events are observed, i.e., given the sensing capabilities and limitations of a CAV i , the value of s i must be large enough to ensure that no events will go undetected. In particular, the variation of the states of CAV i within the sensor sampling time must not be greater than bounds s i . Therefore, letting T s be a given sensor sampling time, the maximum state (position and speed) variation during this sampling time must satisfy: where v max , u max , and u min are given CAV i specifications. Therefore, we need to pick lower bounds given by the maximum state variations in (39) and (40) as follows: Second, the choice of s i captures the trade-off between computational cost and conservativeness: the larger the value of each component of s i is, the smaller the number of events that trigger instances of the QPs becomes, thus reducing the total computational cost. At the same time, the control law must satisfy the safety constraints over a longer time interval as we take the minimum values in (27)-(30), hence rendering the approach more conservative.
Communication Scheme. As mentioned earlier, a coordinator is responsible for exchanging information among CAVs (but does not exert any control). To accommodate event-triggered communication, the coordinator table in Fig. 1 is extended as shown in Table I so that it includes "relevant CAV info" data for each CAV i . In particular, in addition to the states of CAV i in column 2, denoted by x i (t i ), the states of CAVs r ∈ R i (t i ) are included, denoted by x r (t i ), in column 3, where CAV r affects the constraints of CAV i , i.e., r ∈ R i (t i ). In an event-driven scheme, frequent communication is generally not needed, since it occurs only when an event is triggered. CAV i updates its state in the coordinator table and re-solves a QP in two cases depending on which event occurs: (i ) Event 1 triggered by i . The first step is state synchronization: CAV i requests current states from all relevant CAVs and the coordinator updates these (column 3), as well as the state x i (t i ) (column 2). CAV i then solves its QP while the coordinator notifies all CAVs r ∈ R i (t i ) of the new CAV i state so they can update their respective boundary set S r (t i ). This may trigger an Event 2(r ) to occur at some future event time as in (33); such an event cannot be triggered instantaneously, as it takes some finite time for a bound in S r (t i ) to be reached because of Lipschitz continuity in the dynamics. In addition, the coordinator notifies all CAVs j such that i ∈ R j (t i ) (i.e. i is relevant to j ) so that they can update their bounds S j (t i ) respectively.
(i i ) Event 2(r ) is triggered by r ∈ R i (t i ). When CAV r reaches the boundary set S r (t i ) it notifies the coordinator to update its state (column 2). The coordinator passes on this information to all CAVs j where r ∈ R j (t i ), which includes i since r ∈ R i (t i ), and the corresponding state of r is updated (column 3). Then, CAV i re-solves its QP and the coordinator updates t i to the current time and the state x i (t i ) (column 2) and the state x r (t i )(column 3). The rest of the process is the same as in case (i ). Table  Index CAV Info Relevant CAV info Lane 0

Extended Coordinator
x 0 (t 0 ) -Main 1 x 1 (t 1 ) -Main 2 x 2 (t 2 ) x 1 (t 2 ) Merging 3 x 3 (t 3 ) x 1 (t 3 ) ,x 2 (t 3 ) Merging 4 x 4 (t 4 ) x 1 (t 4 ) ,x 3 (t 4 ) Main 5 x 5 (t 5 ) x 4 (t 5 ) Main Last control input of CAV i . Note that any update in CAV i 's state due to a triggered event can immediately affect only CAVs l > i such that i is relevant to l . If an "event chain" ensues, the number of events is bounded by N (t i ). Remark 2: It is possible to simplify the communication scheme by assuming that each CAV can measure (through local sensors) the state of its relevant CAVs (i.e. in the case of CAV i , the states of the CAV r ∈ R i (t i ) ). Thus, CAVs can check for violations not only in their own state boundaries S i (t i ) but also in their relevant CAV state boundaries, S r (t i ). The same applies to the case where CAVs have a direct vehicle-to-vehicle (V2V) communication capability.

B. Self-Triggered Control
As an alternative to event-triggered control, a selftriggered asynchronous control scheme can be used where each CAV i communicates with the coordinator at specified time instants {t i ,k }, k ∈ Z + . At each such instant t i ,k , CAV i uploads its own state information x i (t i ,k ), the calculated control input u i (t i ,k ) that is going to be applied over the time interval [t i ,k , t i ,k+1 ), and the next time when CAV i will communicate with the coordinator and resolve its QP, denoted as t i ,next . The data stored at the coordinator for all vehicles are shown in Table II. We denote the most recent stored information of the i -th CAV at the coordinator as The goal is to develop a self-triggered asynchronous algorithm to determine the sequence of time instants t i ,k and the control input u i (t ), t ∈ [t i ,k , t i ,k+1 ) for each CAV to solve the problem formed in (21). Providing a lower bound for the inter-event time interval is an imperative feature in a self-triggered scheme. It is worth mentioning that since Zeno behavior never occurs under Lypschitz continuity, such a guarantee is not necessary for the eventtriggered control algorithm. To provide such a guarantee for the generated time instants t i ,k , there should exist some T d > 0 such that |t i ,k+1 − t i ,k | ≥ T d . This is a design parameter which depends on the sensor sampling rate, as well as the clock of the on-board embedded system on each CAV. For the same reason, the time-instants t i ,k are calculated such that (t i ,k mod T d ) = 0 where mod denotes the modulo operator. In contrast to the timedriven scheme with a fixed sampling time ∆, each CAV i ∈ F (t i ,k ) calculates the time instant t i ,k in which the QP problem must be solved in a self-triggered fashion. As in the event-triggered scheme, at each time instant t i ,k , CAV i solves its QP problem to obtain u i (t i ,k ). However, unlike the event-triggered scheme, CAV i also calculates the next time instant t i ,k+1 at which it should resolve the QP problem. Note that similar to the time-driven scheme, the newly obtained control input, u i (t i ,k ) is held constant over the time interval [t i ,k , t i ,k+1 ) for CAV i .
We address two problems in the following. First, it will be shown how a lower bound T d on the inter-event time interval can be ensured. Second, we will show how each CAV i ∈ F (t i ,k ) specifies the time instants t i ,k .

1) Minimum Inter-event Time, T d :
In this subsection, it is shown how the CBF constraints (11), (15), (18), and (19) for the CAV i should be modified to ensure a minimum inter-event time T d . This is achieved by adding extra positive terms to the right hand side of these constraints. First, consider the maximum speed CBF constraint (18) to be satisfied when solving the QP problem at t i ,k with feasible solution u i (t i ,k ). Thus, we have: However, the CBF constraint should be satisfied over the entire time interval [t i ,k , t i ,k +T d ] to ensure the minimum inter-event time. Therefore, for all t ∈ [t i ,k , t i ,k + T d ]: By defining τ = t − t i ,k as the elapsed time after t i ,k , and recalling that the acceleration is kept constant over the inter-event time, we can derive an expression for the velocity v i (t ) as follows: Now by using (18), (42), and, (44) we can rewrite (43) as follows: In what follows, we show that if C i ,1 (t i ,k , u i (t i ,k )) ≥ σ i ,1 (T d ) holds, then: where σ i ,1 (T d ) := k 3 u M T d and u M = max(|u min |, u max ) > 0.
To prove (46), we can rewrite C i ,1 (t i ,k , u i (t i ,k )) ≥ σ i ,1 (T d ) as follows: By combining (47) with (45), for all t ∈ [t i ,k , t i ,k + T d ] and τ ∈ [0, T d ] we have: where the non-negativity of the inequality follows from the definition of Hence, in order to ensure the minimum inter-event interval T d , the CBF constraint (18) should be modified to: Following a similar derivation of the modified CBF constraint for the minimum speed (18), it follows that (19) should be modified to: where Next, let us consider the safety CBF constraint (11) to be satisfied when solving the QP problem at t i ,k with a feasible solution u i (t i ,k ). It follows that Once again, we need to ensure that the CBF constraint is satisfied over the entire time interval [t i ,k , t i ,k + T d ] as follows: For ease of notation, we use the following definitions: Similar to the procedure of deriving the lower bound for constraints (18) and (19), by using (11), (54), and (55), we rewrite (53) as follows: To further ease up the notation, we define which will be used later on. Similarly, in the following we intend to show that if C i ,3 (t i ,k , u i (t i ,k )) ≥ σ i ,3 (t i ,k , T d ) holds, it follows: where To demonstrate (58), we follow the same procedure as before by starting with and then rewrite (60) in the following form: Then, combining (57) and (61), for t ∈ [t i ,k , t i ,k +T d ] follows that: , is chosen such that the left hand side of the inequality is always positive: hence, by modifying the CBF constraint (11) to: one can enforce (53). Following a similar approach, to provide a minimum inter-event time T d , the CBF constraint (15) should be modified to, where Finally, since the CLF constraint (20) is added optionally for an optimal trajectory, it can be relaxed in the presence of safety constraints and there is generally no need to ensure that it is satisfied during the whole time-interval t ∈ [t i ,k , t i ,k + T d ] with the same relaxation variable value e i (t i ,k ). Therefore, there is no need to modify it as was necessary for the CBF constraints. In conclusion, to ensure the minimum inter-event time T d , at each time instant t i ,k , CAV i needs to solve the following QP: subject to the modified CBF constraints (49), (50), (64), and (65), the control input bounds (6) and the CLF constraint (20). In the next subsection, it will be shown how the time-instant t i ,k should be obtained for CAV i .

2) Self-Triggered Time Instant Calculation:
The key idea in the self-triggered framework is to predict the first time instant that any of the CBF constraints (11), (15), (18) or (19), is violated and select that as the next time instant t i ,k+1 . CAV i then communicates with the coordinator and requests the necessary information to solve its next QP and obtain a new control input u i (t i ,k+1 ) and update its stored data in the coordinator table. Note that it is not required to consider the modified CBF constraints (49), (50), (64), and (65) here, since these are obtained purely for ensuring the minimum inter-event time T d , while the original CBF constraints (11), (15), (18), and (19) are sufficient for satisfying constraints 1, 2, and 3 (state limitation constraint) in problem (8).
For the speed constraint (18), it is clear that if u i (t i ,k ) ≤ 0 (decelerating), then this constraint always holds, hence there is no need to check it. However, for u i (t i ,k ) > 0 (accelerating), the constraint (18) can be violated. To calculate the time instant, t 1 i ,k , when this occurs we need to solve the following equation: Recalling that the acceleration is held constant in the inter-event time, (68) can be rewritten as and its solution yields: Observe that at t i ,k , the QP in (67) is solved, therefore the constraint (49) is satisfied at t = t i ,k and we have For the second speed constraint (19), it is clear that if u i (t i ,k ) ≥ 0 (accelerating), then this constraint is satisfied, hence there is no need to check it. However, for u i (t i ,k ) < 0 (decelerating), the constraint (19) can be violated. Similar to the previous case, we can solve the following equation for t to obtain t 2 i ,k as the first time instant that constraint (19) is violated: (70) Solving (70) leads to and it can be shown, similar to the previous case, that For the rear-end safety constraint (11), we need to find the first time instant t > t i ,k such that C i ,3 (t , u i (t i ,k )) = 0 in (56). This leads to the following quadratic equation: The least positive root of the above equation is denoted as τ i ,3 and we define t 3 i ,k = t i ,k +τ i ,3 . The case of having both roots negative corresponds to the constraint (11) not being violated, hence t 3 i ,k = ∞. Moreover, due to the added term in (64), it follows that t 3 i ,k ≥ t i ,k + T d . Similarly for the safe merging constraint (15), the first time instant t > t i ,k such that C i ,4 (t , u i (t i ,k )) = 0 can be obtained by solving the following cubic equation: The least positive root is denoted as τ i ,4 and we define t 4 i ,k = t i ,k +τ i ,4 . Moreover, due to solving QP in (67) subject to the modified CBF constraint derived in (65), it follows that t 4 i ,k ≥ t i ,k + T d . The case of having all roots negative corresponds to the constraint (15) not being violated, hence t 4 i ,k = ∞. 3) Self-Triggered Scheme: First, it should be noted that the time instants t q i ,k , q = 1, . . . , 4 are obtained based on the safety constraints (3) and (4), as well as the vehicle state limitations (5). However, this choice can compromise the optimal performance of CAVs in the CZ. In particular, it is possible that the acceleration of a CAV stays constant for a long period of time if there are no safety constraints or vehicle state limit violations, whereas, as shown in [22], the optimal acceleration trajectory of the CAV in fact changes linearly. Therefore, in order to avoid this issue and minimize deviations from the optimal acceleration trajectory, one can impose a maximum allowable interevent time, denoted by T max . To accomplish this, we can define The next update time instant for CAV i , i.e. t i ,k+1 = t i ,next should now be calculated. Towards this goal, consider the case where t min i ,k ≤ min(t i p ,next , t i c ,next ), which corresponds to the next update time instant of CAV i occurring before the next control update of the preceding vehicle i p or the conflict CAV i c . Then, we can set t i ,k+1 = t i ,next = t min i ,k from (71).
The only remaining case is when t min i ,k > min(t i p ,next , t i c ,next ), which corresponds to either CAV i p or i c updating its control input sooner than CAV i , hence CAV i does not have access to their updated control input. Consequently, checking the constraints (11) and (15) is no longer valid. In this case, t next i = min(t i p ,next , t i c ,next ) + T d which implies that CAV i 's next update time will be immediately after the update time of CAV i p or i c with a minimum inter-event time interval T d .
By setting t min r,next = min(t i p ,next , t i c ,next ), we can summarize the selection of the next self-triggered time instant as follows: Finally, in order to have (t i ,k mod T d ) = 0, we set t i ,next = It should be noted that the case of t i ,next = t i c ,next or t i ,next = t i p ,next corresponds to having identical next update times for CAV i and CAV i c or CAV i p so that they need to solve their QPs at the same time instant. However, in order for CAV i to solve its QP at the time instant t i ,k+1 = t i ,next , it requires the updated control input of CAV i c or CAV i p , i.e. u i c (t i ,k+1 ) or u i p (t i ,k+1 ); this is practically not possible. In order to remedy this issue, whenever t i ,next = t i c ,next or t i ,next = t i p ,next , CAV i solves its QP at t i ,k+1 by using u M instead of u i c (t i ,k+1 ) and u i p (t i ,k+1 ) in (64) and (65). This corresponds to considering the worst case in σ i ,3 (t , T d ) and σ i ,4 (t , T d ). Moreover, since calculating the next update time t i ,k+2 also depends on u i c (t i ,k+1 ) and u i p (t i ,k+1 ), CAV i in this case acts similar to the time-driven case with assigned t i ,k+2 = t i ,k+1 +T d . Then, at the next time instant t i ,k+2 , CAV i can obtain the updated control inputs of CAV i c and CAV i p from the coordinator and follows the proposed self-triggered scheme.
Communication Scheme. In view of the constraints (11) and (15), CAV i requires knowledge of t i p ,l ast , v i p (t i ,k ), x i p (t i ,k ), t i c ,l ast , v i c (t i ,k ), and x i c (t i ,k ) at time instant t i ,k . Hence, at each time instant that it accesses the coordinator, it needs to download the recorded data of CAV i p and i c . Then, the required updated information at t i ,k for CAV i p can be calculated as with similar information calculated for CAV i c . Note that the information for CAV i p may also be obtained from the on-board sensors at CAV i if such are available. There are two key differences between the event-triggered and self-triggered approaches in the communication scheme as follows: (i). In the self triggered approach in addition to the states of the CAVs x i (t i ,l ast ), control input u i (t i ,l ast ), current time instant t i ,l ast , and the next time instant of solving QP t i ,next have to be shared. Whereas in the eventtriggered only states of the CAVs and the states of the relevant CAVs at the time of the QP solving is needed.
(ii). In this scheme, unlike the event-triggered scheme, the coordinator does not notify other relevant CAVs when a particular CAV solves QP and updates its data since the next QP solving time is known and stored in the coordinator table. For example, when CAV i solves its QP there is no need for the CAVs j where i ∈ R j (t i ) to be notified as they are already aware. Instead, the coordinator only receives and stores the current time instant, states, control input, and the next time instant of solving QP of the CAV i . Also upon download request from a particular CAV at the time of solving QP, access to the data of the relevant CAVs r will be given to that particular CAV by coordinator.

IV. SIMULATION RESULTS
All algorithms in this section have been implemented using MATLAB. We used QUADPROG for solving QPs of the form (23), (32) and (67), LINGPROG for solving the linear programming in (27), (29) and (30), FMINCON for a nonlinear optimization problem arising when (27) and (29) become nonlinear, and ODE45 to integrate the vehicle dynamics.
We have considered the merging problem shown in Fig. 1 where CAVs are simulated according to Poisson arrival processes with an arrival rate which is fixed for the purpose of comparing the time-driven approach and the event-driven schemes (over different bound values in (33) for the event-triggered scheme and with different T max for the self-triggered scheme). The initial speed v i (t i ,0 ) is also randomly generated with a uniform distribution over [15m/s, 20m/s] at the origins O and O , respectively. The parameters for (21), (32), and (67) are: L = 400m, ϕ = 1.8s, δ = 0m, u max = 4.905m/s 2 , u min = −5.886m/s 2 , v max = 30m/s, v min = 0m/s, k 1 = k 2 = k 3 = k 4 = 1, λ = 10 and T d = 0.05. The sensor sampling rate is 20Hz, sufficiently high to avoid missing any triggering event as discussed earlier. The control update period for the time-driven control is ∆t = 0.05s. For the event-triggered scheme, we let the bounds S = [s x , s v ] be the same for the all CAVs in the network and vary them between the values of {[0.5, 1.5], [0.5, 2], [0.5, 2.5]}. For the self-triggered scheme, we set T max ∈ {0.5, 1, 1.5, 2} to allow a comprehensive comparison.
In our simulations, we included the computation of a more realistic energy consumption model [29] to supplement the simple surrogate L 2 -norm (u 2 ) model in our analysis: where we used typical values for parameters ω 1 , ω 2 , ω 3 , r 0 , r 1 and, r 2 as reported in [29].
Our results from several simulations corresponding to the three different methods under the same conditions with different values for the relative weight of energy vs time are shown in Tables III and IV: the timedriven method, the event-triggered scheme, and, the selftriggered scheme. We observe that by using the eventtriggered and self-triggered approaches we are able to significantly reduce the number of infeasible QP cases (up to 95%) compared to the time-driven approach. At the same time, the overall number of instances when a  (7)) for different selection of bounds in eventtriggered approach (see Sec III.A).
QP needs to be solved has also decreased up to 68% and 80% in the event-triggered and self-triggered approaches, respectively. Note that the large majority of infeasibilities is due to holding acceleration constant over an inappropriate sampling time, which can invalidate the forward invariance property of CBFs over the entire time interval. These infeasible cases were eliminated by the eventtriggered and self-triggered schemes. However, another source of infeasibility is due to conflicts that may arise between the CBF constraints and the control bounds in a QP. This cannot be remedied through the proposed eventtriggered or self-triggered QPs; it can, however, be dealt with by the introduction of a sufficient condition that guarantees no such conflict, as described in [26].
In Tables III and IV, we can also observe some loss of performance (i.e. average travel time increases hence road throughput decreases) in both approaches as the values of the bound parameters in the event triggered approach and T max in the self triggering approach increases, hence increasing conservativeness. On the other hand, this decreases the computational load expressed in terms of the number of QPs that are solved in both methods, illustrating the trade-off discussed in previous sections. There is also an apparent discrepancy in the energy consumption results: when the L 2 -norm of the control input is used as a simple metric for energy consumption, the values are higher under event-triggered and self triggered control, whereas the detailed fuel consumption model shows lower values compared to time-driven control. This is due to the fact that u 2 i penalizes CAVs when they decelerate, whereas this is not actually the case under a realistic fuel consumption model.
We can also visualize the results presented in Tables III and IV by showing the variation of the average objective functions in (7) with respect to α for different choices of [s x , s v ] and T max respectively. As seen in Fig. 3, by selecting higher values for bounds in the event-triggered scheme and for T max in the self-triggered scheme (being more conservative) the objective functions will also attain higher values, while the lowest cost (best performance) is reached under time-driven control.
Constraint violation. It is worth noting that an "infeasible" QP does not necessarily imply a constraint violation, since violating a CBF constraint does not always imply the    violation of an original constraint in (3), (4), and (5). This is due to the conservative nature of a CBF whose intent is to guarantee the satisfaction of our original constraints. In order to explicitly show how an infeasible case may lead to a constraint violation and how this can be alleviated by the event-triggered and self-triggered schemes, we simulated 12 CAVs in the merging framework of Fig. 1 with the exact same parameter settings as before and with S = [0.5, 1.5] in the event-triggered scheme, T max = 1 in the self-triggered scheme and β = 5. Figure 4 shows the values of the rearend safety constraint over time. One can see that the satisfaction of safety constraints is always guaranteed with the event-triggered and self-triggered approach as there is no infeasible case and the value of the constraint b 1 (x(t ))) is well above zero. In contrast, we see a clear violation of the constraint in the time-driven scheme in the cases of CAVs 8 depicted by the blue line.

Robustness.
We have investigated the robustness of both schemes with respect to different forms of uncertainty, such as modeling and computational errors, by adding two noise terms to the vehicle dynamics:ẋ i (t ) =  v i (t ) + w 1 (t ),v i (t ) = u i (t ) + w 2 (t ), where w 1 (t ), w 2 (t ) denote two random processes defined in an appropriate probability space which, in our simulation, are set to be uniformly distributed over [−2, 2] and [−0.2, 0.2], respectively. We repeated the prior simulation experiment with added noise and results shown in Figs. 5 and 6. We can see that the event-triggered and self-triggered schemes with almost similar performance because of their conservativeness keep the functions well away from the unsafe region (below 0) in contrast to the time-driven approach where we observe constraint violations due to noise, e.g., CAV 8 in Fig. 5 and CAVs 3, 4, and, 9 in Fig. 6.

V. CONCLUSIONS
The problem of controlling CAVs in conflict areas of a traffic network subject to hard safety constraints can be solved through a combination of tractable optimal control problems and the use of CBFs. These solutions can be derived by discretizing time and solving a sequence of QPs. However, the feasibility of each QP cannot be guaranteed over every time step. When this is due to the lack of a sufficiently high control update rate, we have shown that this problem can be alleviated through either an eventtriggered scheme or a self-triggered scheme, while at the same time reducing the need for communication among CAVs, thus lowering computational costs and the chance of security threats. Ongoing work is targeted at eliminating all possible infeasibilities through the use of sufficient conditions based on the work in [26] added to the QPs, leading to complete solutions of CAV control problems with full safety constraint guarantees.