## 3 Our Proposal  
AIM5 LA is based on _adv_.RAIM [4]. _adv_.RAIM implements an advanced cooperative AV control system for urban intersections using AI algorithms. Specifically, it uses DRL's TD3 algorithm along with other algorithms designed to accelerate training, such as PER. _adv_.RAIM offers an advanced control policy in an _ego_ way, i.e., it processes all AVs recursively, calculating the speed at which each AV should travel during the next control interval as a function of the _ego_-vehicle's state and the other \"collaborating\" vehicles' states. This process is repeated periodically every timestep for all AVs (250 ms). _adv_.RAIM is included within the collaborative problems and follows the mechanism of centralized training and centralized execution, which allows for the obtaining of the better performance of the experiences performed by the different actors (vehicles) in the environment (intersection). The experiences are centralized in the IM, being the IM in charge of executing the control policy for all the controlled AVs. The experiences that each vehicle sends to the IM are composed of the status of each vehicle (geographic position, speed, route, lane, etc.). When the IM collects all the experiences of all the AVs to be controlled, it has a complete and detailed view of the whole intersection. On these experiences, the DRL algorithm is applied, in which, based on the different actions that the vehicles can perform (speed during the next time interval), it calculates the optimal speeds to be followed by the AVs during the next time interval to minimize the travel time without causing collisions between the AVs. In addition, to solve the problem of independence of the number of AVs in the control algorithm, _adv._RAIM incorporates a recurrent neural network, a Long Short-Term Memory (LSTM). This LSTM encodes the representation of the characteristics (state) of the other AVs with which the _ego_-vehicle collaborates into a fixed-size output variable (256) and captures the long-term spatial and temporal dynamics of the traffic conditions in the network. The output of this LSTM was concatenated with the parameters (state) of the _ego_-vehicle. The main drawback is that _adv._RAIM does not take into account the latency inherent to the communication systems. Communication is necessary for the data exchange (status) between AV and the AIM system in charge of calculating _adv._RAIM. Although originally _adv._RAIM enables accident-free control, this was because it was tested in a traffic simulator without communication latency. Due to the lack of works exploring this problem using DRL, in this work, we proposed to evolve _adv._RAIM to take into account the latency of the 5G communication network and thus improve control in real future scenarios where mobile wireless communication protocols such as 5G will be used. The new proposal, called AIM5 LA, includes the following improvements and modifications compared to _adv._RAIM:  
* Incorporates the previous latency experienced by the _ego_-vehicle to be controlled in the previous interval. * Includes a novel latency prediction module that predicts the latency experienced by the _ego_-vehicle during the next control interval, based on a Transformer deep neural network and the history of latencies experienced, as well as the number of AVs to be controlled simultaneously. * Considers the latency experienced by other AVs at the intersection using an encoder LSTM network. * Finally, we propose the set of messages, the time intervals between each message, as well as the communication protocol, to implement AIM5 LA. In our humble experience, this is the first latency-aware AIM trained entirely by DRL. When we say it is latency-aware of the communications network, we mean that AIM5 LA is able to learn a control policy that can deal with changes in communications latencies and thus internally model the behavior of AVs based on their latency, and therefore adapt the control of these AVs to avoid collisions.