## 3 Beam Allocation Algorithm Based on MAPPO and Stackelberg Game
### Beam Allocation Algorithm Based on MAPPO
Additionally, sensing information can be shared among vehicles through V2V communication. Sensing domain sharing extends the sensing range of individual vehicles, aiding in achieving optimized agent decisions and joint power allocation. We introduce a Sensing Neighbor List (SNL) in V2V communication [39] to facilitate sensing domain sharing among different vehicles during communication. The SNL stores sensing information, with specific details shown in Figure 3, where \(\hat{P}_{k^{\prime},n}\) represents the sensing position of the target vehicle, \(\hat{v}_{k^{\prime},n}\) denotes the sensing velocity of the target vehicle, and \(\omega_{k^{\prime},n}^{r}\) signifies the sensing SINR of the target vehicle's echo signal, determining the magnitude of sensing noise. During V2V communication, each vehicle broadcasts its own SNL to the target vehicle, which then combines its own sensing information with the SNL and broadcasts it to other vehicles, thereby enabling sensing domain sharing among vehicles. When the target vehicle's communication distance is too far or its line-of-sight link is obstructed by other vehicles, the SNL can be used to switch to the nearest alternative target vehicle to minimize the impact of path loss on sensing performance. During the process of sensing domain sharing, there may be cases where the sensing of target vehicles overlaps. In such instances, the SNL may contain multiple entries with vehicle index \(k^{\prime}\). To resolve this, sorting based on \(\omega^{r}_{k^{\prime},n}\) is performed, retaining only the information corresponding to the highest value of sensing quality. Additionally, due to spectrum conflicts, closer communication distances result in lower path losses but may introduce more severe interference. This issue becomes more pronounced with increasing beamwidth, as larger beamwidths reduce antenna count, weakening the asymptotic orthogonality properties. In summary, the algorithm for target vehicle switching based on sensing domain sharing is outlined as follows. The computational complexity of this algorithm can be represented as \(\Theta\big{(}K^{2}+K\big{)}\). ## 4 Simulation Results

In this section, we validate the effectiveness of the IMSBA algorithm in beam allocation through road vehicle simulation experiments. The real-road trajectory is shown in Figure 4, with the road's latitude and longitude coordinates being \(51^{\circ}25^{\prime}56^{\prime\prime}\) N and \(0^{\circ}03^{\prime}20^{\prime\prime}\) E. We set the road's starting point as the coordinate origin \([0,0]\), with \(K=4\) V2V vehicles and \(M=2\) I2V vehicles moving uniformly along the road. The vehicle speed refers to the speed along the road direction. Table 1 provides other specific simulation parameters. We compare the proposed IMSBA algorithm with other benchmark algorithms, detailed as follows:

* IMSBA w/o switch: This algorithm, based on the proposed IMSBA algorithm, removes the target vehicle switching based on sensing domain sharing. As a result, the direct link is affected by communication distance and obstacles, leading to degraded communication and sensing performance. * IMSBA w/o allocate: This algorithm, based on the proposed IMSBA algorithm, removes the joint power optimization based on the Stackelberg game. Therefore, in this algorithm, the transmit power uses fixed values of 1 W, 10 W, and 20 W.
* ISBBA: In this algorithm, the base station uses the DRL algorithm DQN to allocate beams to mobile drones, aiming to maximize data transmission rates [40]. We apply this algorithm to the scenario in this chapter, replacing the base station with the V2V source vehicle and the mobile drone with the V2V target vehicle. The interaction of actions among multiple agents causes environmental instability, severely reducing the learning efficiency and convergence performance of the agents. Unless otherwise specified, the vertical axis in the result figures represents the sum of the performance across all time slots in an episode, and the horizontal axis represents training duration.