## 3 Proposed Mathematical Model of a Switched Beam Antenna with Beam Steering Abilities
\begin{array}{ll}F(effect\text{ }in\text{ }particular\text{ }vehicle)&=[F(doppler)\\ &-F(Fine\text{ }beam)]/(particular\text{ }angel)\end{array}  \tag{13}\]  
\[ \begin{array}{ll}Coherence=8.78/16.23*pi*(f(total)-f(efected)\end{array}  \tag{14}\]  
\[ \begin{array}{ll}F(doppler)=(V/Co)*Fo*Cos(\alpha+\beta+\gamma)*Finebeam \end{array}  \tag{15}\]  
The mathematical model mentioned above initially calculates the optimum concentration of the beam-to-beam connection from one vehicle to another, taking into account the speed and propagated noise in a specific environment. Additionally, after the beam-to-beam power calculation, it analyzes a specific angle with respect to threshold values for a safe wireless connection. Furthermore, the establishment of a fine connected beam is observed after the power calculation, taking into account the Doppler effect, especially for high-speed scenarios. Mathematical modeling plays a crucial role in making a breakthrough in developing an intelligent testbed for real-time results investigation. After successfully modeling a secure V2V power loss model, a testbed for the algorithm is established. The model is transformed into code, which combines C++ and Python, with the aim to:  
1. Be adaptable to various environments. 2. Contain beam switching with respect to threshold power according to the mathematical model. 3. Be computationally friendly with a low complexity factor. For environmental detectability, two packet rate delivery values are taken into account: a real-time scenario-based PDR and a PDR based on IEEE protocols considering the road's asphalt value. The first value indicates the real-time traffic density of the situation and determines whether it is an urban, suburban, or highway scenario. In an urban scenario, beam switching between two vehicles would be low powered to reduce power losses and address network complexity and channel congestion. Additionally, the second PDR value is considered if the first value fails due to issues in the arrival system. If fundamental time data are not collected due to issues with high-speed traversing, the algorithm will switch from real time to the road asphalt value (which is different for different environments) to adjust to the appropriate levels of power beam, avoiding fatalities. The workflow for the environment settings can be observed in Figure 4. The code flow can be observed in Algorithms 1 and 2. The effective communication range (ECR) or \(R(safe)\) is established based on two parameters that are fed into the algorithm: PDR based on the road asphalt value according to the IEEE 802.11p standard and PDR based on the absolute traffic density. This ensures that the connection reliability is guaranteed when a vehicle moves through a communication area. The PDR value of 0.9 and the vehicle speed \(Z\) are related to the safety range \(R(safe)\). Similarly, the PDR value in this research is set at 0.88 for suburban roads and 0.94 for highways. The exact values for real-time PDR are also set. In the case of disconnection, two PDR values are considered. If there is any disruption and the real-time PDR is miscalculated, the actual road situation is sensed, the PDR based on asphalt value is configured, and surrounding vehicles are shifted to manual sensors to avoid fatalities and establish a controlled environment. The algorithmic structure is described in Algorithms 1 and 2.