  This paper addresses the optimal control of Connected and Automated Vehicles
(CAVs) arriving from two roads at a merging point where the objective is to
jointly minimize the travel time and energy consumption of each CAV. The
solution guarantees that a speed-dependent safety constraint is always
satisfied, both at the merging point and everywhere within a control zone which
precedes it. We first analyze the case of no active constraints and prove that
under certain conditions the safety constraint remains inactive, thus
significantly simplifying the determination of an explicit decentralized
solution. When these conditions do not apply, an explicit solution is still
obtained that includes intervals over which the safety constraint is active.
Our analysis allows us to study the tradeoff between the two objective function
components (travel time and energy within the control zone). Simulation
examples are included to compare the performance of the optimal controller to a
baseline with human-driven vehicles with results showing improvements in both
metrics.
