## 3 The Learning Approach of the Intelligent Algorithm
### Traffic Model  
The vehicle type (or rather its average speed) and the movement direction are not exhaustive information needed to anticipate the vehicle's location since these do not consider the driving behavior on different road segments, for example, near crosswalks and curves, and the intensity of traffic. The software SUMO enables loading of the transport model of the selected highway segment, which considers its coordinates, the route's geometry, traffic lanes, and speed limitations. SUMO also includes many configurable parameters whereby adjusting the ratio of vehicle types moving in the simulated area is possible. It can also manage the traffic stream, individual vehicle speed, the trajectories of movement, and traffic density and initiate non-standard vehicle behavior. SUMO is also an effective tool for testing V2X applications for proof of concept before field experiment [22].  
The traffic intensity, in turn, affects the speed of all road users, creating a short-term trend in vehicle behavior, which affects the preemptive performance of the beamsteering system. To evaluate the sustainability of the designed system, we simulated various traffic situations based on the above parameters, which will be demonstrated in Section 3.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Time** & **Type of** & **Received** & **Vehicle** & **Rotation** & **Antenna** & **Sector** \\
**Delays, \(\mu\)s** & **Vehicle** & **Level, dB** & **Speed, m/s** & **Angle, deg** & **Number** \\ \hline
1.8 & car & \(-75.1\) & \(14.72\) & \(85.74\) & \(1\) & \(2\) \\
1.97 & truck & \(-83.1\) & \(10.8\) & \(0\) & \(2\) & \(4\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Examples of input data and their labels from the generated dataset.  
Since the SUMO application does not implement traffic intensity control directly, it was necessary to identify its dependence on adjustable parameters, such as the number of vehicles and their distribution over the area. The traffic intensity control was performed within the Lighthill-Whitham-Richards (LWR) macroscopic model [51], which assumes that there is a one-to-one relationship between speed and flow rate, and the Tanaka model [52], which is widely used in transport safety research tasks. With the above assumptions, we formulated the following equation:  
\[v(t,x)=V(p(t,x)), \tag{2}\]  
where \(v(t,x)\) is the traffic stream rate, \(p(t,x)\) is the traffic density. For \(V(p)\) the following condition is valid:  
\[V^{\prime}(p)<0 \tag{3}\]  
Thus, the traffic intensity is denoted as:  
\[Q(p)=pV(p). \tag{4}\]  
To determine the dependence \(V(p)\), the following calculations were performed for each lane where the speed cannot exceed the limits set at the site:  
\[p(v)=\frac{1}{d(v)}=\frac{1}{L+c_{1}v+c_{2}v^{2}}. \tag{5}\]  
where \(d(v)\) is the safe distance between vehicles at a given speed \(v\), \(L\) is the average vehicle length, \(c_{1}\) is the time that characterizes the driver's reaction, and \(c_{2}\) is the coefficient of the braking distance proportionality. \(c_{1}\), the average value for which was set as 1.1 s, may vary for individual vehicles or their group. \(c_{2}\) depends on the pavement condition and can be determined from the guidebook data; in the simulation, it was set to 0.0285, corresponding to the normal state of asphalt. The parameter \(L\) was calculated based on the tabulated data [53]:  
\[L=c_{1}v+l_{0}+l_{a}+(l_{m}^{\prime}+l_{m}^{\prime\prime})=c_{1}v+2\bigg{(} \frac{c_{2}v^{2}}{254\cdot\mu}\bigg{)}+7. \tag{6}\]  
where \(l_{0}\) is the safety distance between vehicles (assumed to be 2 m), \(l_{a}\) is the average vehicle length (assumed 5 m), \(l_{m}^{\prime}=l_{m}^{\prime\prime}\) is the braking distance of the front and rear vehicle, and \(\mu\) is the coefficient of adhesion to the road; in the simulation, the value for dry asphalt was set to 0.7.