# Three-Dimensional Resource Allocation in D2D-Based V2V Communication
## 3 Matching and Resource Block Allocation Scheme
### Optimal Power Allocation
The graph constructed is dynamic, meaning it changes at each iteration due to the moving vehicles. Figure 5: (**a**) Adjacency Matrix (**b**) Independent Interferers. ## 4 Simulations and Results

The main aim of this paper was to check the capacity of the V2I users under different sets of conditions. The simulation in this paper was carried out in MATLAB. First, we consider the speed of the vehicles versus the capacity. Then, the number of V2V users are increased and the capacity is noted. Finally, different transmit powers of the V2I user can result in a different capacity, and we need to check if our optimal power allocation results in optimal capacity. Table 5 shows the simulation parameters used. Initially, 20 users in each category are considered. Eventually, we increased the V2V users and performed the simulation accordingly. ### Vehicular Speed vs. Capacity at Different CUE SINRs

The vehicular speed vs. capacity is shown in Figure 6 under different threshold values of the cellular user (CUE) SINR. As mentioned above, the SINR threshold for the cellular user is supposed to be above a certain threshold; thus, we have taken different threshold values of the SINR--i.e., 5,7,10, and 15 dBs--and plotted the speed vs. capacity graphs. From Figure 6, it is evident that a higher CUE SINR threshold will result in a lower V2I capacity due to interference from the CUE. Therefore, a tradeoff exists while choosing the SINR threshold for the CUE. ### Vehicular Speed vs. Capacity at different Number of Users

In this section, we will investigate the effect of increasing the CUE and V2V users on the capacity of the V2I users. #### 4.2.1 CUE Users

Figure 7 shows the effect of increasing the cellular users on the capacity of the V2I users. From this figure, it is evident that there is no substantial effect on the capacity compared to the speed and SINR. The reason for this effect is that cellular users are randomly scattered throughout the cell. Users close to the highway contribute more to the interference to the V2I users. The threshold SINRs of the CUEs were kept constant in this simulation. #### 4.2.2 V2V Users

The impact of increasing V2V users would significantly affect the V2I capacity due to the fact that the vehicles involved in V2V communication are on the same highway, and therefore high interference results from a lower SINR of V2I links, thus lowering capacity. Figure 8 shows the varying number of V2V users along with capacity at various vehicular speeds. Compared to the cellular users, the V2V users have a significant impact on the capacity of the V2I users. This impact gets more pronounced at higher vehicular speeds. Increasing the V2V users further will result in further degradation. At a moderate speed, the effect is less pronounced compared to that at high speed. The reason for this discrepancy is the change in channel gains for vehicles moving at high speed. Figure 7: Vehicular speed vs. capacity with different numbers of cellular users. ### Transmit Power of V2I vs. Capacity

A higher maximum transmission power would result in a greater SINR and thus greater capacity. However, interference from other users can have a negative impact. Figure 9 shows that a 3 dB decrease in maximum transmit power does not have a significant impact on the capacity. A higher transmission power would result in greater interference, so there is trade-off between power and interference for capacity maximization. ## 5 Discussion and Future Work

Resource allocation in D2D-based V2V communication is dependent on several factors, including the topology of the network, types of the users in the network, and the optimization technique used to solve the problem. In the next paragraph, we will discuss each of these factors. Figure 8: Vehicular speed vs. capacity with different numbers of V2V users. Figure 9: Vehicular speed vs. capacity at different transmission powers. Most of the current research focuses on the in-coverage scenario in V2X. Out of coverage scenario could be an interesting area of research as presented in [17].