A Novel Subchannel and Power Allocation Algorithm in V2V Communication

College of Electrical Engineering and Automation, Shandong University of Science and Technology, Qingdao 266590, China Department of Mathematics and Information Engineering, Dongchang College of Liaocheng University, Liaocheng 252000, China China Aerospace Science & Technology Corporation No. 5 Academy No. 513 Institute, Yantai 264000, China Department of Computer Science and Engineering, Korea University, Seoul 02841, Republic of Korea


Introduction
Vehicle-to-vehicle (V2V) communication has potential to improve traffic safety, reduce energy consumption, and realize new services related to intelligent transportation systems [1]. In the 5G new radio vehicle-to-everything (NR-V2X) standard, the available resources [2] for direct communication between vehicles can be either dedicated or shared by vehicle-to-infrastructure (V2I) communication. V2V communication can be performed by the NR sidelink [3]. Document [4] points out that NR-V2X may be deployed in a carrier dedicated to intelligent transport systems services or a carrier shared with cellular services. It is claimed in [5] that the underlay sidelink communication has higher priority than the dedicated model to achieve higher spectrum utilization efficiency by reusing the spectrum resources of V2I communication. However, it also brings interference problems to the resource allocation of V2X network.
The resource allocation of V2X network is the subject of many research works in recent years. The resource allocation schemes of dedicated short range communications and cellular vehicular network were summarized by Noor-A-Rahim [6]. Bazzi et al. focused on a highway scenario and identified two algorithms to be used as a minimum and maximum reference in terms of the packet reception probability [7]. With the goal of maximizing the system sum rate and maximizing the minimum achievable rate, Ren et al. proposed a V2V grouping, channel selection, and power control strategy based on the geographic characteristics of V2V system [8]. Sun et al. [9,10] took outage probability as a constraint condition and proposed a heuristic resource allocation algorithm for V2V communication, but they did not consider the number of accessed V2V links. Under the premise of ensuring that V2V met the communication outage probability constraint, Liang et al. proposed a resource allocation scheme based on slowly changing large-scale fading information of the channel [11], which optimized the system sum rate when V2I communication occurred. In the case that each V2I link and each V2V link could only share one resource block, Liang et al. also proposed a graph-based resource allocation algorithm [12], which optimized the sum rate of V2I links, but did not consider the transmission latency and the number of accessed V2V links. Mei et al. proposed a convex optimization-based resource block reuse and V2V link power allocation algorithm [13]. This algorithm assumed that each cellular user occupied a preallocated resource block, and each resource block was reused by at most one V2V link. Moreover, the transmitting power of the cellular user was not optimized. Under the energy harvesting constraints of V2V links, Xiao et al. described resource allocation as an optimization problem of energy efficiency through joint optimization of channel reuse and power allocation of V2V links [14]. Gao et al. studied access control and resource allocation in cellular V2V networks [15], and the optimization goal was to maximize the number of accessed V2V links. Firstly, the interference graph was constructed based on the interference between vehicles, and then, the original problem was modeled as the graph coloring problem. Finally, a resource sharing and access control algorithm was proposed. However, this algorithm is only aimed at maximizing the number of accessed V2V links and did not consider the transmission rate constraints of V2V users. A joint optimization problem of transmission mode selection and resource allocation for cellular V2X communication was investigated by Zhang et al. [16]. In order to exploit the spectral efficiency of full-duplex communication to fulfill the reliability constraints of V2V links, Siddig et al. [17] proposed a resource allocation scheme for vehicular communication networks. In order to optimize resource utilization efficiency, Yang et al. [18] investigated the resource allocation and interference management based on clustering mechanism in D2D communication.
Most studies directly explain the quality of service requirements from the point of view of signal to interference plus noise ratio (SINR) [19][20][21][22][23], that is, the obtained SINR should be higher than a certain target value. How to obtain this target value from the original requirements of V2V communication is not intuitive and clear and usually involves reliable transmission of a certain amount of data within a certain frequency band and time period. Most papers assume that each subchannel can only be reused by one V2V link. In this paper, we take transmission latency of V2V links as constraint condition instead of SINR. In addition, we assume that each subchannel can be reused by multiple V2V links. We jointly optimize subchannel and power allocation of V2V communication, in order to guarantee the minimum transmission rate requirements of V2I links and transmission latency are requirements of V2V links while maximizing the system sum rate. Specifically, the main contributions of this paper are listed as follows.
(1) A nonlinear mixed integer programming problem aiming at maximizing system sum rate is constructed under the constraints of minimum transmission rate of V2I links, latency of V2V links, and maximum transmitting power of V2I and V2V links (2) Firstly, two-sided exchange matching theory is used to solve the problem of subchannel allocation. Then, based on the monotonicity of the constraint conditions and the objective function, the poly-block approximation (PBA) algorithm is used to solve the power allocation problem. In order to reduce the computational complexity of power allocation problem, a power allocation algorithm based on iterative convex optimization (ICO) is proposed. The convergence of the resource allocation algorithm is also proved (3) Finally, simulation results show the effectiveness of proposed algorithms. The proposed algorithms can guarantee transmission latency requirements of V2V links and improve the access ratio of V2V links and the system sum rate

V2V Communication Model
The system model is shown in Figure 1. There are M vehicles communicating with eNodeB (eNB) through V2I links. V2I links transmit data through the Uu Interface of NR. In order to simplify the analysis, each V2I link occupies a single resource block (RB) [5,12,13]. RB is allocated orthogonally to reduce the interference among adjacent V2I links. Due to the fact that the uplink resources of V2I links are not used intensively by vehicles and V2V links usually cause small interference to eNB, the uplink resources of V2I links are reused by V2V links [5,12,13]. M = f1, ⋯, 2, ⋯, Mg represents a set of subchannels; C = fC 1 , ⋯, C m , ⋯, C M g represents a set of V2I links. V2I link C m occupies subchannel m(m ∈ M). D = f1, 2, ⋯, Dg represents the V2V link set, the set of all links is L = C ∪ D, and there are L = M + D links. In order to improve spectrum utilization efficiency, each subchannel assigned to one V2I link can be multiplexed by multiple V2V links simultaneously. Therefore, cochannel interference occurs not only between V2V links and V2I links but also between V2V links that share the same subchannel [5,12,13]. In order to make more V2V links access the network, spectrum reuse between V2V links is necessary when the number of V2V links is greater than the number of V2I links in a fully loaded network [12].
The data transmission rate of V2V link d over all subchannels is The SINR of V2I link C m on subchannel m is h C mm represents the channel gain between V2I link C m and eNB on subchannel m, and σ C m represents the noise power of V2I link on subchannel m; h m md represents the channel gain between V2V link d and V2I link m on subchannel m; ∑ d∈D ρ m d p m d h m md represents interference from the V2V link set that each V2V link shares the same subchannel with the V2I link. Thus, the data transmission rate of V2I link C m is The sum rate of all V2I links and V2V links is In order to guarantee the transmission latency requirement of V2V links, its minimum data transmission rate R min d is the same as that in reference [13] and the proof is described in the appendix.
where N d represents the mean size of the data packet, d max represents the maximum tolerable transmission latency in one time slot of 1 ms, ε represents the outage probability caused by the packet latency exceeding the maximum latency, and λ d represents the packet arrival rate subject to Poisson distribution, W −1 ðxÞ: Our objective is to maximize the system sum rate with constraints for both V2V and V2I links. The resource allocation problem can be formulated as P: Constraint condition (9) means that the transmission rate of each V2V link should not be lower than the minimum transmission rate, and (10) means that the transmission rate of each V2I link should not be lower than the minimum transmission rate. The constraint conditions (11) and (12), respectively, mean that the transmitting power of each V2V link and V2I link cannot be higher than the maximum transmitting power. The constraint conditions (13) and (14) mean that each V2V link can only occupy one subchannel. q max is a positive integer, and the constraint (15) means that each subchannel is multiplexed by q max V2V links at most.

Problem Transformation
The above problem belongs to nonlinear mixed integer programming, and it is difficult to find the optimal solution in polynomial time. In order to find the suboptimal solution of this problem, we decompose it into two subproblems. Firstly, the subchannel allocation under given power allocation is solved by two sided exchange matching. Then, the

Wireless Communications and Mobile Computing
power allocation problem is solved by PBA algorithm according to the obtained subchannel matching. The problem is solved iteratively until it converges. In order to reduce the computational complexity of power allocation problem, a power allocation algorithm based on ICO is proposed.
3.1. Subchannel Allocation. Assume that transmitting power of V2I links and V2V links is fixed. Then, the subchannel allocation problem is formulated as SP1: Because there are interference terms in the objective function, the problem is nonconvex optimization. The computational complexity of the exhaustive method increases exponentially with the number of V2V links and subchannels. In order to deal with the matching problem between V2V link set and subchannels, this section utilizes the many-to-one matching algorithm [24], and the relevant mathematical symbols and basic definitions are as follows. Positive integer q max represents the maximum number of V2V links that can be matched with each subchannel. All V2V links and subchannels represent two sets of agents. The set of preference sequence of all V2V links and subchannels is defined as represents the preference sequence of the V2V link d on all the subchannels, and pðch m Þ(m ∈ M) represents the preference sequence of the subchannel m on all the V2V links. The preference sequence can be arranged in descending order of utilities of both sides of agents. The utility functions of V2V links and subchannels are defined as follows. The utility function of V2V link d on the subchannel m is defined as Due to cochannel interference, the utility of a V2V link depends not only on the channel it matches but also on the set of V2V links occupying the same subchannel. According to the utility function of V2V link, the preference relation of V2V link d on the subchannel can be obtained.
U d ðm, μÞ represents the utility function under the matching state μ when the V2V link d occupies the subchannel m. The utility function of subchannel m on V2V link d is the sum rate of V2I links and V2V links occupying the same subchannel.
D 0 represents the set of V2V links occupying the same subchannel. According to the utility function of the subchannel m, the preference relation of the subchannel m on the V2V link set D 0 and D 0 ′ can be obtained.
U m ðD 0 , μÞ represents the utility function of the subchannel m on the V2V link set D 0 under the matching state μ. Once the V2V link matches with the subchannel, the preference sequence of the other agents may change because the utility function varies with the interference. In order to solve the above matching problem, this section adopts exchange matching algorithm.
For a given matching μ, m = μðdÞ, and m′ = μðd′Þ, an exchange matching is defined as V2V link d and d′ exchange positions, while the matching of other V2V links and subchannels remains unchanged. It should be noted that one of the V2V links involved in the switching can be a vacancy, thus allowing a single V2V link to move to the available vacancies of the subchannels. When μðdÞ = ∅, one of the subchannels participating in the switching may be a vacancy.
Subchannel allocation based on matching theory is shown in Algorithm 1.

Wireless Communications and Mobile Computing
Proposition 3. The final matching is two-sided exchange stable matching.
Proof. Suppose that in the final matching μ * , there is a swap blocking pair ðd, d′Þ which satisfies ∀i ∈ fd, d′, m, m′g, The subchannel algorithm does not stop until all swap blocking pairs are deleted. This contradicts with the fact that μ * is the final matching. Therefore, there is not a swap blocking pair in the final matching, and it can be concluded that the algorithm finally reaches two-sided exchange stable matching.

Power Allocation
Based on PBA Algorithm. After the subchannel matching problem is solved, ρ * is obtained. In order to solve the power allocation vector p, the problem is transformed into SP2: Because ρ * is determined, V2V link d and the subchannel m form a match. Due to the cochannel interference, the problem is nonconvex. Through the analysis, we can find that the objective function is not a monotonic increasing function of p, but it has implicit monotonicity. Define a variable z C m for V2I link m, a variable z m d for V2V link d, and a vector Then, the optimization problem can be transformed into SP2-1: where P = fp | p m d ≤ P max , p C m ≤ P max ,∀d ∈ D,∀m ∈ Mg. The objective function (25) is a monotonic increasing function. For the convenience of algorithm description, G represents the normal set of problem SP2-1 satisfying (26) and (27); H represents the inverse normal set of problem SP2-1 satisfying (28) and (29), and Z ∈ G ∩ H represents the feasible region of problem SP2-1. After transformation, the above problem is a monotonic optimization problem, and the global optimal solution can be obtained by using PBA algorithm. PBA-based power allocation algorithm is described in Algorithm 2.
In the second step of PBA-based power allocation, we need to determine the projection of G on the boundary of z ðnÞ . The projection vertex of z ðnÞ on the boundary of G is Input: D, M Output: μ * , ρ * Initialization: D 1 = f1, 2, ⋯, Dg While jD 1 j > 0 V2V link d (∀d ∈ D 1 ) constructs the preference sequence. Repeat V2V link d selects the most preferred channel. The number of V2V links matching with this preferred channel is less than or equal to q max .
Until V2V link d matches with one subchannel or refused by all subchannels.
Remove d from D 1 End while After initialization, the sequence corresponding to the number of V2V link matching with each subchannel Q = fq 1 , q 2 , ⋯, q M g, q m ∈ Q, and q m ≤ q max (m ∈ M), the initialized subchannel reusing matrix ρ I are obtained. Swap operation: Repeat. ∀d ∈ D, ∀d′ ∈ fD \ fdg, og, and o are available vacancies, IF ðd, d′Þ is a swap blocking pair, then μ = μ d ′ d . Until there is no swap blocking pair.
The right half of (34) and (35) belongs to standard fractional programming, which can be solved by Dinkelbach's algorithm.
The above analysis process, respectively, gives the solution of subchannel allocation and power allocation. Now, we combine subchannel allocation and power allocation to maximize the system sum rate. PBA combined with many to one matching-(PBAMTO-) based resource allocation is described in Algorithm 3 below.
In each iteration, the computational complexity of subchannel allocation is OðDMq max Þ. PBA algorithm is used to solve transmitting power of the V2V links and V2I links. I represents the number of iterations of the PBA algorithm. The complexity of the first step of power allocation algorithm is OðWÞ which is related to the dimension of the optimization vector. The complexity of the second step is OðL 3:5 Þ which is related to fractional programming. The complexity of power allocation based on PBA algorithm is OðIðW + L 3:5 ÞÞ. The computational complexity of PBAMTO algorithm in each iteration is OðIðW + L 3:5 Þ + DMq max Þ. Let B represents the number of PBAMTO, so the polynomial time computational complexity of PBAMTO algorithm is OðBðIðW + L 3:5 Þ + DMq max ÞÞ.

Low-Complexity Power Allocation Algorithm Based on
ICO. PBA algorithm has relatively high computational complexity. In order to reduce the computational complexity, a calculation method based on ICO is proposed. Since R l ðρ * , pÞ (∀l ∈ C ∪ D) is a nonconvex function, problem SP2 is a nonconvex optimization problem. In order to perform convex approximation, R l ðρ * , pÞ is converted into the form of the difference of two concave functions: Step 2: Determine the projection of G on the boundary of z ðnÞ , that is Π G ðz ðnÞ Þ.
Algorithm 2: PBA-based power allocation. 6 Wireless Communications and Mobile Computing For ∀l ∈ C, For ∀l ∈ D, The first-order Taylor approximation of g l ðρ * , pÞ is ∇g T l ðp t Þ represents the subgradient of g l ðρ * , pÞ at p = p t . The lower bound of transmission rate of each link can be obtained.
Given initial power, the power allocation problem SP2 can be approximated as problem ASP2: Eðp, p t Þ is lower bound of EðpÞ at p t . It can be proved that the problem ASP2 is a convex optimization problem, which can be solved by the standard convex optimization method. The calculation process of the power allocation problem is described in Algorithm 4.
Then, we get another algorithm called ICOMTO, which combines ICO and many to one matching. The difference between ICOMTO and PBAMTO is that ICOMTO solves power allocation by means of ICO algorithm rather than PBA algorithm. The number of iterations of ICO algorithm is T, and the complexity of calculating SP2 using the interior point method is OðL 3:5 Þ. Computational complexity of ICO algorithm is OðTL 3:5 Þ. The computational complexity of iterative convex optimization combined with many to one matching (ICOMTO) algorithm in each iteration is OðTL 3:5 + DMq max Þ. Let B represents the number of ICOMTO, so the polynomial time computational complexity of ICOMTO algorithm is OðBðTL 3:5 + DMq max ÞÞ.
To further reduce the computation complexity, we set the number of iterations of ICOMTO algorithm to one. This suboptimal algorithm is called SUBICOMTO and its computation complexity is OðTL 3:5 + DMq max Þ.
Proposition 4. ASP2 gives a series of feasible solutions to problem SP2. The objective function value of SP2 is monotonically increasing.
Proof. The optimal solution p t−1 of problem ASP2 at p t−2 is the feasible solution of problem SP2, and it is the feasible solution of problem ASP2 at p t−1 . Suppose that p t−1 and p t are results of problem ASP2 in the first and second iteration, respectively.
Step 1: Set n = 1, initialize the transmit power p C m 0 , p m d 0 , ∀m ∈ M. According to the initialization process in the subchannel allocation algorithm, ρ 0 is worked out. According to the obtained ρ 0 , power allocation vector p 0 is solved by the poly-block approximation algorithm.
Calculate the objective function value R sum ðρ 0 , p 0 Þ of problem P according to (6).
Step 2: Repeat the following operations n = n + 1 For given p n−1 , ρ n is obtained according to subchannel allocation algorithm. Then, according to ρ n , p n is obtained by means of PBA algorithm. Until jðR sum ðρ n , p n Þ − R sum ðρ n−1 , p n−1 ÞÞ/ðR sum ðρ n−1 , p n−1 ÞÞj < δ p t−1 satisfies constraints (45) and (46), so p t−1 is a feasible solution of ASP2 at p t−1 . According to the optimized objective function, we can get p t = arg max pÊ ðp, p t−1 Þ; therefore,Êðp t , p t−1 Þ ≥Êðp t−1 , p t−1 Þ. According to (40), we obtain In addition, we can also get Therefore, it can be deduced that p t is a feasible solution of problem SP2 and Eðp t Þ ≥ Eðp t−1 Þ holds. So, ASP2 gives a series of feasible solutions to problem SP2 and the objective function value is monotonically increasing.

Proposition 5.
In the iteration process of subchannel allocation and power allocation algorithm for V2V communication, it generates a set of feasible solutions which makes the value of the objective function monotonically increase.
Proof. After n − 1 iterations, the objective function is formulated as For given p n−1 , the subchannel allocation is So, we obtain For given ρ n , if power allocation based on PBA is carried out, we obtain According to (54), we obtain For given ρ n , if power allocation based on ICO is carried out, we obtain Input: p Output: p * Initialize power allocation vector p 0 , calculate ∇g T m ðp 0 Þ, ∀l ∈ C ∪ D, t = 0. Repeat t = t + 1 p t is solved according to interior point method, update ∇g T m ðp t Þ, ∀l ∈ C ∪ D. UntilÊðp t Þ −Êðp t-1 Þ < θ

Simulation Results
In order to compare the performance of the proposed approaches, we conduct the simulation based on MATLAB.
All performance results are obtained on Intel i5-2400 CPU running at 3.1 GHz. In an outdoor single-cell uplink communication scenario, the simulation parameters are shown in Table 1. The maximum tolerable latency for V2V users is 100 ms, the outage probability caused by the data packet    [5,13]. Document [5] gives power allocation for each possible V2I and V2V reusing pair by geometric analysis, and it adopts bipartite matching to solve subchannel allocation. Document [13] assumes that transmission power of V2I links is fixed, which adopts the Lagrange dual decomposition method and the binary search method to solve transmitting power of V2V links and subchannel allocation. Different channel gains lead to different resource allocation results. The resource and power allocation varies with channel gain. Each point of the figures is obtained by averaging the channel gains of 1000 random realizations. The algorithm is executed immediately after the channel gain is generated in each simulation. The average time in seconds of different algorithms is shown in Table 2. PBAMTO has the highest polynomial time computation complexity, so its computation time is the longest, followed by ICOMTO and SUBICOMTO. Computation complexity of algorithm in document [5] is OðD 3 + LMÞ, and its computation time is lower than that of SUBICOMTO. I denotes the number of iterations of the algorithm in document [13], its computation complexity is OðIMDÞ, and its computation time is lower than that of the algorithm in document [5].
V2V access ratio and system sum rate versus packet arrival rate are shown in Figures 2 and 3, respectively. In this paper, the access ratio refers to the ratio of the accessed V2V links to all V2V links. As the packet arrival rate increases, the V2V link access ratio and system sum rate of these algorithms decreases. The access ratio of ICOMTO algorithm is 3.89% lower than that of PBAMTO algorithm. The access ratio of ICOMTO algorithm is increased by 9.07% on average compared with that of SUBICOMTO algorithm. The access ratio of SUBICOMTO algorithm is 14.98% higher than that of algorithm in document [13]. The system sum rate of ICOMTO algorithm is reduced by 3.75% on average compared with the system sum rate of PBAMTO algorithm. The system sum rate of ICOMTO algorithm is 6.26% higher than that of SUBICOMTO algorithm. The system sum rate of SUBICOMTO algorithm is increased by 15.61% on average compared with the system sum rate of algorithm in document [13].
V2V access ratio and system sum rate versus vehicular speed are shown in Figures 4 and 5, respectively. With the increase of mobile speed, the channel environment between V2V becomes bad, which leads to the decrease of V2V link  access ratio and system sum rate. PBAMTO still has the highest V2V link access ratio and the highest system sum rate. The access ratio of ICOMTO algorithm is 3.60% lower than that of PBAMTO algorithm. The access ratio of ICOMTO algorithm is increased by 10.02% on average compared with that of SUBICOMTO algorithm. The access ratio of SUBICOMTO algorithm is 23.01% higher than that of algorithm in document [13]. The system sum rate of ICOMTO algorithm is reduced by 2.96% on average combined with that of PBAMTO algorithm. The system sum rate of ICOMTO algorithm is 8.46% higher on average than that of SUBICOMTO algorithm. The system sum rate of SUBICOMTO algorithm is 12.82% higher than that of algorithm in document [13]. The access ratio and system sum rate versus the number of V2V links are shown in Figures 6 and 7, respectively. As the number of V2V links in the network increases, the access ratio of V2V links decreases. The probability of V2V links   (5) Algorithm in (13) Figure 9: System sum rate versus minimum rate requirement of V2I links. reusing the subchannel of the V2I link increases, and the network will admit a greater number of V2V links under the premise of meeting the minimum rate requirement of the V2I link, which makes system sum rate increase. PBAMTO algorithm has the highest sum rate, followed by ICOMTO, SUBICOMTO, and algorithm in document [5]. Algorithm in document [13] has the lowest sum rate. When the number of V2V links is 8, average time consumption of PBAMTO, ICOMTO, SUBICOMTO, algorithm in document [5], and algorithm in document [13] [5], and algorithm in document [13]. The execution time depends on the hardware configuration. Field Programmable Gate Array (FPGA) and Application Specific Integrated Circuit (ASIC) can be used to realize the hardware acceleration of the algorithm. V2V access ratio and system sum rate versus minimum rate requirement of V2I links are shown in Figures 8 and  9, respectively. It can be seen that with the increase of the V2I link rate requirement, the number of accessed V2V links decreases, and the system sum rate also decreases. Figures 10  and 11 show average latency and outage probability versus packet arrival rate, respectively. When packet arrival rate is 0.04 and the number of V2V links is 8, time latency of PBAMTO is reduced by 30.41% and 20.43%, respectively, compared with algorithm in document [5,13]. Compared with ICOMTO and SUBICOMTO, time latency of PBAMTO is reduced by 7.59% and 15.35%, respectively. PBAMTO has the lowest outage probability, followed by ICOMTO, SUBICOMTO, and algorithm in document [5] and document [13]. It can be seen that the proposed algorithm has lower latency and outage probability compared with traditional algorithms.
Because PBAMTO algorithm adopts optimal power allocation based on PBA, it has the highest V2V link access ratio, the highest system sum rate and the lowest latency and outage probability. ICOMTO algorithm adopts iterative convex optimization to solve power allocation, which maximizes the lower bound of system sum rate. The performance gap between PBAMTO and ICOMTO is mainly attributed to the suboptimality of power allocation in ICO algorithm. The number of iterations of SUBICOMTO algorithm is less than ICOMTO, so its performance is less than ICOMTO. Power allocation of document [5] is simplified into geometric analysis. Document [13] assumes that transmitting power of V2I links is fixed and just optimizes the transmitting power of D2D links. These two traditional schemes cannot give better solution of power allocation. As a result, they limit the improvement of system performance.
Although PBAMTO has the highest performance, its computation time is the longest. The performance of ICOMTO is close to that of PBAMTO, and its computation time is much shorter than that of PBAMTO. The performance of SUBICOMTO is lower than that of ICOMTO, and its computation time is shorter compared with ICOMTO. Compared with SUBICOMTO, two traditional algorithms in document [5] and document [13] have shorter computation time, but their performance is lower. In practice, ICOMTO can be a better scheme to tradeoff the performance and computation time.

Conclusions
In order to meet the low latency requirement of communication between vehicles, the minimum transmission rate requirement of V2I links, and the transmitting power requirement of V2I and V2V links, a nonlinear mixed integer optimization problem aiming at maximizing system sum rate is constructed by comprehensively considering the subchannel allocation and transmitting power of cellular and V2V links. Firstly, the subchannel allocation problem is solved by many-to-one two-sided exchange matching. Then, according to the implicit monotonicity of the objective function, an optimal power allocation algorithm based on PBA is proposed. In order to tradeoff the performance and complexity, a convex optimization problem is constructed by expressing the nonconvex function as the difference of two concave functions, and a power allocation algorithm based on ICO is proposed. The simulation results show that the proposed algorithms can guarantee transmission latency requirements of V2V links and improve the system sum rate and access ratio of V2V links.