Three-Dimensional Resource Allocation in D2D-Based V2V Communication

Device-to-Device (D2D) communication is the major enabler of Vehicle-to-Everything communication in 3rd Generation Partnership Project (3GPP) Release 14. The user equipment/device can engage either in direct communication with the infrastructure, use a relay node, or it can communicate directly with another device with or without infrastructure support. The user equipment can be either a hand-held cellular device or a moving vehicle. The coexistence of cellular user equipment with the vehicular user equipment imposes different Quality of Service (QOS) requirements due to the rapid mobility of the vehicles and interference. Resource allocation is an important task by which the user equipment is allocated the required resources based on different QOS parameters. In this paper, we introduced the case of three types of users which share uplink resources: two types of vehicular users, and a third user that acts as a handheld cellular phone, which is nearly static. By keeping in mind, the differential QOS requirements for the three types of users, we have calculated the optimum power and then applied a 3-dimensional graph-based matching and hypergraph coloring based resource block (RB) allocation.


Introduction
Vehicular communication has received a great deal of attention from the research community in the recent past. The Dedicated Short-Range Communication (DSRC)-based Vehicular Adhoc+82 Networks (VANETs) have been thoroughly researched, and with the advent of Long-Term Evolution (LTE) Release 12 and onward, the research community's focus has been shifted to LTE-based vehicular communication, or Long-Term Evolution Vehicle to Everything (LTE V2X), specifically. LTE V2X, which is based on Device-to-Device (D2D) proximity-based services (Prose), is said to be a major cornerstone for the establishment of an Intelligent Transport System (ITS) and will facilitate autonomous driving in the future.
D2D communication, which is the enabler of V2X, has a large number of applications in terms of increasing spectral efficiency, cellular offloading, emergency communication, and IoT enhancement, to name a few. It allows devices in the proximity of each other to communicate directly with each other, with or without the support of the infrastructure. The operating modes in D2D communication are divided into inband and outband. Inband allows the devices to communicate in the licensed spectrum in which the cellular users are the primary users, whereas D2D users become the secondary users. Inband D2D communication has mostly been used in recent research due to its better control over the licensed spectrum. In contrast to the inband communication, outband communication allows the devices to communicate in an unlicensed spectrum. Furthermore, both inband and outband are divided into underlay and overlay modes. With underlay communication, both D2D and cellular users Recently, several articles have been published for resource management in D2D. Several factors have been put forward for the design of an efficient resource allocation algorithm for D2D communication. The authors in [1] have given an in-depth review of the resource management techniques in D2D communication from an optimization perspective and presented a methodical way of first identifying the problem and constraints and then applying the relevant optimization technique. Also, in [1], the three major techniques used for resource allocation were determined: game theory, graph theory, and heuristic approaches. One aspect of resource management is the selection of the mode between D2D and cellular users. For this purpose, in [2], a multi-mode scheme is presented.
Graph theory has been applied for resource allocation in D2D communication in several research works in the past. Interference-aware graphs have been proposed in [3,4]. Joint power and RB allocation using graph theory was studied in [5]. However, in traditional graph theory, the relationship is restricted to pairs of edges and is not sufficient to model multiple-user relationships. In order to model the relationship between multiple users more accurately, a hypergraph theory-based resource allocation is proposed in [6]. A detailed analytical study for radio resource management in D2D based V2V is presented in [7].
D2D-based V2V communications with latency and reliability constraints are presented in [8], with the author highlighting the requirements for vehicular users and proposing a separate resource block allocation and power control (SRBP) algorithm. In [9], the author extends the work in [8] by transforming the latency and reliability constraints in optimization constraints and solving them using a new Separate Resource Block and Power Allocation (SOLEN) algorithm. Resource allocation for D2D-based vehicular communication is presented in [10]. In this paper, the author investigated the capacity maximization problem by finding the optimal power for D2D-based vehicular communication by taking into account the differentiated quality of service requirements for vehicular users to build the optimization problem, while also taking into account the slowly varying large-scale fading information only. A set of three types of user equipment (UEs) in a vehicular scenario with a cellular user, and safety and non-safety based V2V communication is presented in [11]. It uses a local search-based 3D matching approach for resource allocation in V2X communication by using the 3D matching model based on the hypergraph and greedy algorithm. Joint power and user pairing for maximizing the ergodic capacity is presented in [12].
Recently, several articles have utilized graph theory for resource allocation in D2D [13][14][15]. Hypergraphs being one of the most important topics among all these articles. Most of the work on hypergraphs have been limited to a 2-dimensional problem, where two different kinds of user equipment are present in the network.
In our paper, we have extended the power allocation strategy presented in [10] for a case with three user types. Secondly, we have extended the work in [6] into resource block allocation using signal-to-interference ratio (SIR) thresholds for two to three types of users. Graph coloring based on the adjacency matrix has been used to color the graph.
The paper is divided into six sections. Section 2 introduces the network architecture and system model. Section 3 gives a detailed overview of the steps involved in resource allocation. Section 4 gives the simulation and results. Section 5 presents the discussion and future directions. Finally, Section 6 concludes the paper.

Network Architecture and System Model
We consider an LTE-based V2X scenario, where the vehicular user equipment (VUE) is present in the network along with the cellular user equipment (CUE) and both share the uplink resources available. We assume that the VUE and CUE are distinct in terms of their requirements and applications, and hence we have a different set for CUE. The VUE is split into V2V and V2I for safety and non-safety applications, respectively. Let j = (1 . . . ...., J} be the set of CUE, k = {1 . . . ., K} be the set of VUE involved in V2I, and l = {1 . . . , L} be the set of VUE involved in V2V communication. All the communications occur simultaneously, and we assume there is a single antenna for both transmission and reception. Let χ = {1 . . . ., X} denote the uplink resource blocks (RBs) available.

Network Architecture
We consider a one-cell environment with a single Evolved Node B (eNB). The network consists of a D2D-based V2V along with a conventional cellular user and a V2I link, as shown in Figure 1. The three users interfere with each other on the uplink. While earlier works have mostly considered the conventional cellular users (CUE) and V2I links as the same, we have considered them as two different types of users for the reason that V2I links are mostly mobile and hence encounter large-scale fading and the channel state information (CSI) is delayed at the base station [10], whereas, the CUEs are mostly either in a static position or moving very slowly; hence, they encounter small-scale fading. hypergraphs have been limited to a 2-dimensional problem, where two different kinds of user equipment are present in the network. In our paper, we have extended the power allocation strategy presented in [10] for a case with three user types. Secondly, we have extended the work in [6] into resource block allocation using signal-to-interference ratio (SIR) thresholds for two to three types of users. Graph coloring based on the adjacency matrix has been used to color the graph.
The paper is divided into six sections. Section 2 introduces the network architecture and system model. Section 3 gives a detailed overview of the steps involved in resource allocation. Section 4 gives the simulation and results. Section 5 presents the discussion and future directions. Finally, Section 6 concludes the paper.

Network Architecture and System Model
We consider an LTE-based V2X scenario, where the vehicular user equipment (VUE) is present in the network along with the cellular user equipment (CUE) and both share the uplink resources available. We assume that the VUE and CUE are distinct in terms of their requirements and applications, and hence we have a different set for CUE. The VUE is split into V2V and V2I for safety and non-safety applications, respectively. Let j = (1…...., J} be the set of CUE, k = {1…., K} be the set of VUE involved in V2I, and l = {1…, L} be the set of VUE involved in V2V communication. All the communications occur simultaneously, and we assume there is a single antenna for both transmission and reception. Let χ = {1…., X} denote the uplink resource blocks (RBs) available.

Network Architecture
We consider a one-cell environment with a single Evolved Node B (eNB). The network consists of a D2D-based V2V along with a conventional cellular user and a V2I link, as shown in Figure 1. The three users interfere with each other on the uplink. While earlier works have mostly considered the conventional cellular users (CUE) and V2I links as the same, we have considered them as two different types of users for the reason that V2I links are mostly mobile and hence encounter largescale fading and the channel state information (CSI) is delayed at the base station [10], whereas, the CUEs are mostly either in a static position or moving very slowly; hence, they encounter small-scale fading.

Requirements for Different User Equipment (UE)
For a V2I link, the aim is to have high capacity; i.e., a high data rate for a range of applications from infotainment services to traffic-related services. In the case of V2V, security communication between the vehicles requires an ultra-reliable link since it is the most crucial type of communication.
In case of CUE, we assume a minimum required signal-to-noise ratio (SINR) for voice communication. Furthermore, the instantaneous channel state information (CSI) is available in the case of CUE at the eNB, but in the case of VUEs, conventional resource management techniques are rendered infeasible due to the high mobility of the vehicles, which makes it hard to track the channel variations in a short time [10]. The channel power gain consists of both small-and large-scale fading parameters denoted by g and α, respectively. It is assumed that the base station has the information of large-scale fading components (pathloss + shadowing) since they vary slowly compared to smallscale fading components. Table 1 shows the requirements of different UEs. For the V2V case, the high reliability means that that the probability of an outage is less than a certain threshold (p0) [10]. In the case of V2I, we need a high data rate, and thus we need to maximize capacity; for CUE, we need the SINR to be above a certain threshold to provide the best effort service.

System & Channel Model
The received signal-to-noise ratios (SINRs) at the base station (BS) from the jth, kth, and lth user equipment are given by Equations (1)-(3), respectively. Let 'x' be a binary value which takes the value of 1 when two UEs are allocated the same resource block.

Requirements for Different User Equipment (UE)
For a V2I link, the aim is to have high capacity; i.e., a high data rate for a range of applications from infotainment services to traffic-related services. In the case of V2V, security communication between the vehicles requires an ultra-reliable link since it is the most crucial type of communication.
In case of CUE, we assume a minimum required signal-to-noise ratio (SINR) for voice communication. Furthermore, the instantaneous channel state information (CSI) is available in the case of CUE at the eNB, but in the case of VUEs, conventional resource management techniques are rendered infeasible due to the high mobility of the vehicles, which makes it hard to track the channel variations in a short time [10]. The channel power gain consists of both small-and large-scale fading parameters denoted by g and α, respectively. It is assumed that the base station has the information of large-scale fading components (pathloss + shadowing) since they vary slowly compared to small-scale fading components. Table 1 shows the requirements of different UEs. For the V2V case, the high reliability means that that the probability of an outage is less than a certain threshold (p0) [10]. In the case of V2I, we need a high data rate, and thus we need to maximize capacity; for CUE, we need the SINR to be above a certain threshold to provide the best effort service.

V2V ( ) V2I(k) CUE(j)
High reliability (probability of outage under a certain threshold) Large capacity Best effort (minimum SINR guaranteed)

System & Channel Model
The received signal-to-noise ratios (SINRs) at the base station (BS) from the jth, kth, and lth user equipment are given by Equations (1)-(3), respectively. Let 'x' be a binary value which takes the value of 1 when two UEs are allocated the same resource block. Table 2 shows the different channel power gains including the desired and the interference power gains. We assume a log-normal shadowing distribution for all UEs. In [16], channel modeling in vehicular communications has been presented. Table 3 shows the channel model used to model the three different UEs. We used different path loss models for each type of UE. The channel is modeled as a Rayleigh fading channel with different shadowing standard deviation. The channel power gain between a and b for a VUE is given by Equation (4a). The channel power gain is in turn-dependent on the path loss and shadowing given by Equation (4b), where PL is the path loss, Y is the log-normal shadowing component, is the distance between transmitter and receiver, and γ is the decay exponent.

Matching and Resource Block Allocation Scheme
The first step in maximizing capacity is to calculate the optimum power. The optimum power for the case of V2I-V2V users has been evaluated in [10]; we have modified that method for the case of three types of users since the case of three types of users cannot be solved directly. We tried to offer the minimum required SINR for the CUEs as an assumption; another assumption we had made while deriving is that the interference is much greater than Additive White Gaussian Noise (AWGN), and hence we have dropped AWGN from the equations for SINR.

Optimal Power Allocation
First, we will find the optimal power allocation for single V2V, V2I, and CUE cases reusing the subcarrier; that is, the lth V2V sharing band with the kth V2I and j th CUE. For the sake of simplicity, we drop the subcarrier index x and rewrite Equation (5) as follows: Here, we assume that the CUE gets the minimum required SINR such that Equation (5e) becomes: and Initially, setting the Pk and Pl as Pk_max and Pl_max in Equation (5g) will give us the numerical value of Pj. Applying Equation (5e) for the reliability, we get Equation (6): For the sake of simplicity in deriving the expression for the powers, we assume that the interference is much greater than the additive noise-i.e., σ 2 << interference-and hence we drop σ 2 from the calculation. Since we know that h a,b = α a,b g a,b Equation (6) will become g l ≤ γ 0 P j g j , l α j , l +P k g k , l α k , l P l α l We use Equation (7) and apply the Lemma 1 proposed in [10] (for the case two types of UE), and extend it for the three UEs case.

Lemma 1:
Considering the reliability constraint for V2V and a minimum guaranteed SINR for the CUE, the power allocation problem becomes (proved in the Appendix A) For the zero-crossing point Pl ≥ 0, Equation (9) will become The plot of Equation (8) is shown in Figure 3. In order to find the optimum values for Pk and Pl, we use the Newton-Raphson method for the graph in Figure 3. The red point on the graph shows the optimum points. Once we get Pk opt and Pl opt, these values are inserted back in Equation (5g), and the whole process is repeated iteratively until we get stable values for all three powers, as shown in Algorithm 1.

Hypergraph-Based Matching and RB Allocation
A graph G is denoted by G = (V, E), where V is set of vertices and E is the set of edges that connect those vertices. In the interference hypergraphs, the edges denote the interference and the vertices denote the user equipment. There are two types of interferers here: independent and cumulative [6]. The independent interferers are the pairwise interference between two users connected by a simple edge, whereas cumulative interferers are connected by a hyper edge. Once the hypergraph is

Hypergraph-Based Matching and RB Allocation
A graph G is denoted by G = (V, E), where V is set of vertices and E is the set of edges that connect those vertices. In the interference hypergraphs, the edges denote the interference and the vertices denote the user equipment. There are two types of interferers here: independent and cumulative [6]. The independent interferers are the pairwise interference between two users connected by a simple edge, whereas cumulative interferers are connected by a hyper edge. Once the hypergraph is constructed, it is colored using different colors, where each color denotes a RB. Therefore, two neighbors with the common edge cannot have the same color in both the simple and hyper edge case. For example, a CUE acts as an independent interferer to another CUE and thus forms an edge. If a CUE satisfies the equation in Table 4, it forms an edge with a V2V and V2I link. Table 4. Independent and cumulative interferer thresholds.

Independent Interferers Cumulative Interferers
In order to find the independent and cumulative interferers, we first define the signal-to-interference ratio (SIR) to be under a threshold. Table 4 summarizes the equations used for the construction of a graph. The threshold SIR is selected in order to determine the severity of the interference at the eNB.
The groups in hyper edges can be of varying size. In the example shown in Figure 4, a group of three vertices is considered in a hyper edge. constructed, it is colored using different colors, where each color denotes a RB. Therefore, two neighbors with the common edge cannot have the same color in both the simple and hyper edge case. For example, a CUE acts as an independent interferer to another CUE and thus forms an edge. If a CUE satisfies the equation in Table 4, it forms an edge with a V2V and V2I link. In order to find the independent and cumulative interferers, we first define the signal-tointerference ratio (SIR) to be under a threshold. Table 4 summarizes the equations used for the construction of a graph. The threshold SIR is selected in order to determine the severity of the interference at the eNB.
The groups in hyper edges can be of varying size. In the example shown in Figure 4, a group of three vertices is considered in a hyper edge.   The next step is to apply the coloring algorithm to the vertices. Since the problem is non-convex due to the presence of constraints in the optimization problem, it is an NP-hard problem. Using the greedy coloring algorithm, we can assign the RB to the UE.

Matching Using Hypergraphs
In order to solve the matching problem, we need to know that it is a k-dimensional matching problem which is NP-hard. In [11], a local search-based 3D matching method was presented which solved the 3D matching problem using a hyper and conflict graph with a local search based on k-claw. In [15], a graph-based resource sharing mode in vehicular communication is presented. The author proposes 3-dimensional matching with the clustering of highly interfering V2V users. Furthermore, the authors considered slow-fading channel state information (CSI). A comparison between greedy, randomized, and baseline graph resource allocation had been drawn. However, this paper considers RB and two types of users for 3-dimensional matching.
In our paper, we have used 3-dimensional matching among the three different types of users by first creating an adjacency matrix, which is a weighted 3-dimensional matrix that looks for resource block sharing among the three types of users, where each RB is not assigned twice to a user of the same type. Figure 5a is a visualization of the adjacency matrix; the black diagonal shows that the same types of users cannot occupy one RB simultaneously. We call this adjacency matrix the indictor matrix 'W'. This matrix is multiplied with the rate matrix 'R'. Unlike [11], we have already obtained the optimal power in the last section, and we used that to obtain the rate matrix 'R'. The multiplication of the rate matrix with the indicator matrix will result in all possible rates. between greedy, randomized, and baseline graph resource allocation had been drawn. However, this paper considers RB and two types of users for 3-dimensional matching. In our paper, we have used 3-dimensional matching among the three different types of users by first creating an adjacency matrix, which is a weighted 3-dimensional matrix that looks for resource block sharing among the three types of users, where each RB is not assigned twice to a user of the same type. Figure 5a is a visualization of the adjacency matrix; the black diagonal shows that the same types of users cannot occupy one RB simultaneously. We call this adjacency matrix the indictor matrix 'W'. This matrix is multiplied with the rate matrix 'R'. Unlike [11], we have already obtained the optimal power in the last section, and we used that to obtain the rate matrix 'R'. The multiplication of the rate matrix with the indicator matrix will result in all possible rates.

RB Allocation Using Graph Coloring
In this section, we have performed graph coloring based on the adjacency matrix. The adjacency matrix is a 3-dimensional matrix created by using Table 4. Figure 5 shows the adjacency matrix and the independent interferers. The all-black diagonal region shows that users of the same types act as independent interferers to each other (hence causing interference), and the white and black region shows that the user can either be an independent interferer to another type of user or it has no relation (no interference) to another user. Users who are independent interferers are connected to each other through an edge and assigned a different color, as shown in Figure 5b, along with the frequency of the colors used for the coloring. This ensures that the users never share the same color (same RB). The graph constructed is dynamic, meaning it changes at each iteration due to the moving vehicles.

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.

RB Allocation Using Graph Coloring
In this section, we have performed graph coloring based on the adjacency matrix. The adjacency matrix is a 3-dimensional matrix created by using Table 4. Figure 5 shows the adjacency matrix and the independent interferers. The all-black diagonal region shows that users of the same types act as independent interferers to each other (hence causing interference), and the white and black region shows that the user can either be an independent interferer to another type of user or it has no relation (no interference) to another user. Users who are independent interferers are connected to each other through an edge and assigned a different color, as shown in Figure 5b, along with the frequency of the colors used for the coloring. This ensures that the users never share the same color (same RB). The graph constructed is dynamic, meaning it changes at each iteration due to the moving vehicles.

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 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 15dBs-and plotted the speed vs capacity graphs. From Figure 7, 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.

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. 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.

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.

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.

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

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. compared to that at high speed. The reason for this discrepancy is the change in channel gains for vehicles moving at high speed.

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.

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.
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]. Topology of the network and the differential Quality of Service (QoS) of the users can make different sets of optimization problems with varying constraints. Methods used to solve these vary from matching theory [18] to machine learning-based methods [19][20] , which have been investigated recently. Hybrid resource allocation architecture in [21], where cellular V2X is combined with IEEE 802.11p is an interesting area of future

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.
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]. Topology of the network and the differential Quality of Service (QoS) of the users can make different sets of optimization problems with varying constraints. Methods used to solve these vary from matching theory [18] to machine learning-based methods [19,20], which have been investigated recently. Hybrid resource allocation architecture in [21], where cellular V2X is combined with IEEE 802.11p is an interesting area of future research. Other optimization techniques like the one proposed in [22], based on the Lyapunov optimization and heuristic techniques like cluster-based resource block sharing and power allocation [23] can be used to solve the resource allocation problem.
Future work on Vehicle to Pedestrians (V2P) communication scenarios could be an interesting area of research for D2D-based resource allocation along with the impact of using multiple antennas.

Conclusions
This paper is based on the resource allocation in D2D-based V2V with a network scenario consisting of three types of users with different QoS requirements. An optimization problem has been proposed in which the objective is to increase the capacity of the V2I links while keeping the constraints in mind. The optimal power for the V2V and V2I links is calculated, keeping in mind the minimum required QoS for the cellular users. Matching using hypergraphs and RB allocation using hypergraph coloring has been presented. The impact of the SINR of the CUE on the capacity of the V2I link has been studied along with the impact of increasing the V2V users on the V2I capacity. In future, more network scenarios could be studied with users with varying requirements and using different optimization techniques to solve the problem. Out of coverage scenarios and relays can bring a whole new challenge in terms of resource allocation in D2D-based V2V communication.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
Considering the reliability requirement of the V2V users and minimum guaranteed SINR of CUE. The probability of outage becomes: Pr P l h l P j h j , l +P k h k , l ≤ γ 0 ≤ p0 where, P j = γ th P k h k , j +P l h l , j h j and h a,b = α a,b g a,b Replacing the channel power gain with small-and large-scale fading parameters and assuming that the small-scale fading parameter is independent and identically distributed (i.i.d.) exponential random variables. The integral becomes: e −(g j , l +g k , l ) − e −γ 0 (P j g j , l α j , l +P k g k , l α k , l ) P l α l −g j , l −g k , l dg j , l ∞ 0 −P l α l γ 0 P j α j , l +P l α l e −γ 0 P k g k , l α k , l −P l α l g k , l P l α l + e −g k , l dg k , l −P 2 l α 2 l γ 0 P j α j , l +P l α l (γ 0 P k α k , l +P l α l ) + 1 ≤ p0 P 2 l α 2 l γ 0 P j α j , l +P l α l (γ 0 P k α k , l +P l α l )