## 3 Our Proposal
In addition, it includes the internal parameters necessary for the cooperative control of the AVs, which include geographical position (x, y), speed, acceleration, branch of the intersection (north, east, south, west), lane in which it travels (left, center, or right), route it intends to follow (through, left turn, or right turn), type of vehicle, physical characteristics (width, length, weight), and technical characteristics (maximum speed, maximum acceleration, etc.). With this message, the AIM can estimate the latency existing in the wireless communication channel. When the IM receives the message from the AV, it only has to compare the timestamp included in the message with the internal timestamp, so it calculates the latency existing in the complete IM-AV-IM path. In addition, a history of the computed latencies allows for the assessment of an estimate of the jitter, which is also an interesting parameter. Finally, thanks to the random time \(t\), the time that each vehicle takes to gather internal parameters (position, speed, trajectory, etc.) is eliminated in the calculation of the communication channel latency. _-Action:_ This message is sent from the IM to each controlled AV and indicates the _action_ to be performed at that moment until the next control interval. This message may include speed, acceleration, steering wheel position, geographical route to follow, speed and acceleration profile, etc. The calculation of this _action_ already takes into account the possible latency of the wireless communication channel as well as the influence of the other AVs at the intersection. In this case, AIM5 LA predicts the speed to be followed by the _ego_-vehicle during the next control interval. The message exchange diagram can be seen in Figure 3. In that figure, we can observe that, from the AIM's point of view, after sending the _probe_ message (at time T1), the AVs are given enough time to respond, taking into account the communication latency, as well as the random time \(t\) (t_V1, t_V2, and t_V3) that each vehicle waits to respond. The time allotted to listen to control _requests_ (control _request_ messages) is 100 ms. This value takes into account the up to 50 ms that an AV may wait to respond to the _probe_ message and the latency that may exist in the system in the extreme case of a saturated scenario [32; 33]. In order not to leave any request out, the maximum limit was set at 100 ms.  
Consequently, the AIM can calculate the average latency \(Latency_{T_{i+1}}^{Vx}\) for vehicle \(Vx\) during the following time interval \(T_{i+1}\), as shown in Equation (1), where \(T\_{Request}^{Vx}\) is the time instant at which the control _request_ message is received from vehicle \(Vx\), \(t^{Vx}\) the random time \(t\) that vehicle \(Vx\) has waited to send the control _request_ message, and \(T_{i}\) the time instant at which the AIM sent the _probe_ message. \[Latency_{T_{i+1}}^{Vx}=\frac{T\_{Request}^{Vx}-t^{Vx}-T_{i}}{2} \tag{1}\]  
From that moment on, the AIM starts processing the requests to obtain the best actions that AVs should perform in the next control interval. As a result, it will have the most up-to-date information from all vehicles, as well as from other data sources such as cameras, people counters, sensors, etc. In addition, the AIM can already estimate the latency of the communication between each of the AVs using the timestamps included in the _request_ messages and the internal captured timestamps of these messages. This latency is also fed into the vehicle control decision-making process implemented in this work using AIM5 LA,in addition to forecasting the latency behavior. This stage was assigned a maximum time of 75 ms. This time is based on the time required to perform the inference of the deep learning models employed, as well as the remaining time of the self-imposed control period (250-100 ms of the _probe + request_ messages).