Abstract
Device-to-device (D2D) communication with direct terminal connection is a promising candidate for 5G communication, which increases the capacity of cellular networks and spectral efficiency. Introducing D2D communication to cellular users (CUs) will increase system capacity, and CUs will provide reusable channel resources for D2D users (DUs). However, the sharing of channel resources between CUs and DUs will lead to cofrequency interference and affect the communication quality of user terminals. As a means of improving spectrum utilization and solving cofrequency interference problems, a one-to-many D2D communication system model is established in cellular networks. Through model analysis, the interference between CUs and DUs is correlated with their distance from one another. Considering the different interference of CUs to DUs at different distances, an algorithm for resource allocation based on distance grouping is proposed. With this algorithm, DUs will reuse channel resources of CUs within a reasonable distance in the group, and interference between DUs and CUs will be minimized. The improved particle swarm optimization algorithm is used to solve the optimal power, to achieve the maximum transmission rate of the system. Simulated results show that the algorithm will significantly improve system throughput and performance while also lowering the computational complexity of the algorithm, enabling the whole system to have better communication quality.
1. Introduction
In recent years, as mobile users and communication services have grown rapidly, the demand for wireless bandwidth has significantly increased. Wireless communication systems can no longer meet their long-term development needs because of the limited spectrum resources [1]. In the R12 standard of the 3rd Generation Partnership Project (3GPP), direct terminal technology is proposed for cellular networks. It was created to solve the high demand on the base station and to overcome the traditional concept of transmission through the central base station (BS). Direct communication is between two mobile devices within a certain range without going through the base station (BS) [2–4]. In addition to improving the performance of edge users, the network can also be extended [5–7]. With the increasing complexity of research, D2D communication has slowly become an important technology in the fifth-generation (5G) mobile communication system and has also been widely accepted. D2D communication is low latency and highly reliable, which makes it perfect for vehicle-to-vehicle (V2V), UAV, and emergency communications [8–13]. Academic and industrial researchers are becoming increasingly interested in this topic, so much research has been done on mode selection, power control, and resource allocation [14–31].
1.1. Related Work
D2D communication is mainly divided into cellular, dedicated, and reuse. In the dedicated mode, part of the spectrum resources is allocated to D2D communication, so users of D2D and cellular do not interfere with each other. In the multiplexing mode, there is no difference in frequency usage between D2D and cellular communication. Despite the interference problems between D2D and cellular communication, the multiplexing mode has received more attention and research due to its higher-frequency spectrum utilization. This paper introduces the notion that D2D links can work in the hybrid mode under resource multiplexing. It is also discussed how independent decoupling and optimization of mixed-mode allocation and resource allocation can be achieved using energy-splitting variables [32]. In the literature, the throughput of the whole system is maximized under the premise of ensuring the SNR of the D2D link and cellular link. An innovative approach is presented in the paper [33], which decomposes the multicell interference minimization problem into two subproblems, introduces a two-stage game theory to solve the RB and power allocation problem, and evaluates the proposed approach in terms of spectral efficiency and energy efficiency. An alliance game model has been proposed in the literature to make D2D links with the same transmission mode form coalitions. By using the cooperative game method, under the premise of meeting the data rate requirements of each link, all D2D links in the alliance cooperate to select the channel, so as to minimize total transmission power, but the transmission power in this paper is not dynamic, which resists the transmission quality of the system [34]. The literature studies the problems of dual mode selection, channel allocation, and power control of D2D communication to maximize the overall throughput of the system while ensuring the minimization of interference generated [35]. D2D communication improves spectrum utilization and lowers the base station load. A significant problem with the multiplexing of spectrum resources is that it will cause serious cochannel interference between users. To reduce interference, reasonable control of user transmission power is particularly important. A joint power control algorithm was proposed, which combines two parameters, and calculates the path loss compensation factor by utilizing the distance factor [36]. The adaptive power control Q-learning algorithm is proposed to maximize system efficiency under optimal transmission power conditions, but Q-learning is flat, does not capture task structure well, and is particularly constrained by dimensional disasters [37]. To solve the optimization problem, a two-step distributed method is proposed in [38]. The RB allocation problem is expressed as a noncooperative game, and it is shown to be an accurate potential game. Distributed autonomous game theory is also used to solve the uplink transmission power control problem. Under a pure D2D communication model, power control and resource allocation is proposed. It groups D2D users reasonably, allocates resources by vertex coloring, and maximizes system throughput on the premise of ensuring signal quality for cellular users and edge cellular users [39].
At present, D2D communication in cellular networks is optimized using a variety of methods, such as the Hungarian algorithm, Gale-Shapley algorithm, particle swarm optimization algorithm (PSO), and game theoretic approach. Among them, PSO is a famous intelligent algorithm that can solve -dimensional optimization problems. With orthogonal frequency division multiple access (OFDMA), the total bandwidth can be divided into smaller subcarriers for better and more adaptive resource allocation. The PSO algorithm is used to distribute the rate and subcarriers optimally to more users and, hence, maximize the system throughput. As a result of the tests, the algorithm shows good convergence under the condition of minimal transmission power allocation [40]. A power allocation algorithm based on particle swarm optimization is proposed to solve the interuser interference when D2D communication is introduced in cellular networks. The algorithm can effectively allocate transmission power between each user while meeting the minimum rate requirements of each user to maximize the overall throughput of the cellular network [41]. However, the basic particle swarm optimization algorithm is prone to local optimality. The improved particle swarm optimization algorithms are utilized to solve the above-mentioned problem.
According to reference [42], in order to increase the spectral efficiency and system throughput, the cellular user allows different D2D pairs to share spectral resources. Simulation results show that NR-PSO is effective at solving the mixed-integer programming problem (MINLP).
1.2. Paper Contribution
There is a great deal of research being done on one-to-one D2D communication; even though it has been shown to be effective, they do not allocate all cellular user resources, resulting in low spectrum utilization. For improving the system throughput and effectively using spectrum resources, a one-to-many mode is proposed, and a resource allocation algorithm based on distance grouping is implemented to solve the channel allocation problem. Additionally, the particle swarm optimization algorithm is improved to solve the objective function. The following is a summary of the main contributions of this work: (1)A one-to-many D2D communication model is designed to ensure flexibility and fairness and improve the spectrum utilization of D2D users’ multiplexing of cellular users. Meanwhile, the maximization of network throughput in mixed-integer nonlinear programming is solved(2)By taking mutual interference into account, a signal-to-noise ratio formula for D2D users is derived, the correlation between distance and interference is discovered, and a system model for distance grouping is constructed to improve resource allocation efficiency and system transmission capacity(3)A dynamic power control strategy is proposed to reduce interference between users, and an improved particle swarm algorithm is presented for solving MINLP. Simulation results demonstrate the effectiveness of the proposed method
The following is a summary of the remainder of this paper: Section 2 introduces the D2D communication model based on the D2D basic theory. In Section 3, a resource allocation algorithm based on distance grouping is proposed, which can get reasonable resource allocation. Section 4 presents simulation results demonstrating the effectiveness of the proposed algorithm. In the final section, conclusions are wrapped.
2. D2D Communication Network Model
In the first section, the D2D one-to-one base system model is introduced. The second section introduces the one-to-many system model proposed in this paper. The third part introduces the dynamic power control strategy.
2.1. Resource Allocation for D2D Communication
D2D resource allocation involves allocating channels to D2D users, which can be divided into dedicated and multiplexing. The dedicated mode obtains channel resources through orthogonal allocation, but the spectrum resources are limited. Currently, most D2D users use multiplexing to share resources. The interference of a D2D user when multiplexing cellular user channel resources is in Figure 1.

(a)

(b)
D2D users’ multiplexing of cellular users’ uplink and downlink results in interference, as shown in Figures 1(a) and 1(b). It can be seen that D2D users are interfered by cellular users and base stations are interfered by D2D users when multiplexing the uplink. When multiplexing downlinks, interference to D2D and cellular users comes mainly from base stations. Since cellular users transmit less power than base stations, they generate less interference, and base stations are better able to handle interference. Therefore, this work mainly considers the reuse of cellular user uplink resources by D2D users.
2.2. System Model
A single-cell cellular network consists of base stations (BS), cellular users (CUs), and D2D users (DUs), with the BS being at the center of the cell, as shown in Figure 2.

Consider the system as fully loaded, meaning all spectrum resources are occupied by CUs, and there is no mutual interference. Generally, each subcarrier can be assigned to only one cellular user. CUs are denoted as , and DUs are represented as .
DUs’ reuse of CUs’ uplink subcarriers are allowed in this paper. Since the one-to-one model does not fully utilize the cellular resources, the one-to-many model is considered in order to maximize spectrum resource multiplexing gains. From the D2D mode’s flexibility perspective, allowing one DU to reuse multiple CU resources improves D2D performance greatly. The constraints of this reuse mode are given in Eq. (17).
It is assumed that intercell interference can be effectively reduced through interference management. As such, we only analyze the interference within the cell. The BS is assumed to be capable of acquiring perfect channel state information (CSI) for all relevant links. As described in [43], there is path loss between the transmitting and receiving nodes, which makes up the channel gain, fast fading induced by multipath fading, and slow fading induced by shadow fading, which are obeyed by the exponential normal distribution and log-positive distribution, respectively. where is the path loss constant, stands for the fast fading factor, denotes the slow fading factor, is the distance, and represents the path loss exponent.
Similarly, the definition could derive , , , and as and BS, transmitter and BS, transmitter and receiver, and and receiver channel gain, respectively. The multiplexing factor is a binary variable. If multiplexes the uplink subcarrier of , then is 1; otherwise, it is 0. Hence, we can denote the signal-to-interference-plus-noise ratio (SINR) of to BS and the SINR from the transmitter to receiver as
The transmission power of is denoted by , the transmission power of is represented by when multiplexing cellular channel resources, and stands for variance of zero mean Additive White Gaussian Noise (AWGN).
Therefore, based on Shannon’s formula, the transmission rates (unit: bit/s) of and are as follows:
Consequently, the total data rate of the system is
2.3. Dynamic Power Control Strategy
The base station deals with interference received in communication by adjusting the transmission power and resource allocation of DUs. In traditional D2D communication, the static power mode is used, which leads to large interference between the CUs and DUs and low resource utilization. In order to solve the problem of cochannel interference caused by the reuse of channel resources, a dynamic power control strategy is proposed that adjusts the power based on channel environment and user location changes. To maintain good communication between DUs and CUs, Eqs. (2) and (3) should be greater than the minimum SINR. According to the formula, CUs and DUs should have a maximum transmit power of Eqs. (7) and (8) and a minimum transmit power of Eqs. (9) and (10).
2.4. Problem Formulation
Previously, only the D2D user rate optimization problem was studied, ignoring cellular user rates. Through power control and joint channel resource allocation, we aim to maximize transmission rates across the entire system to ensure a great user experience. Here, we formulate the optimization challenge as follows:
The maximized system throughput is expressed in Eq. (11). Equation (12) represents the minimum requirement for the transmission rate. Equation (13) represents the minimum requirement for the transmission rate. Equation (14) limits the maximum transmission power range of . Equation (15) limits the transmission power range of . A single CU can be multiplexed by a single DU as indicated in Eq. (16). A DU may reuse multiple CUs’ resources, as illustrated in Eq. (17). It is worth mentioning that the D2D user reuse constraint can only be less than or equal to 1 in the one-to-one model. In this paper, the D2D user reuse constraint can be greater than 1. Equation (18) indicates that the reuse parameter is a binary variable. In Eqs. (11)–(18), the problem with a MINLP shows up: it cannot directly solve this problem in mathematics. Therefore, the improved particle swarm algorithm is proposed to arrive at an approximate optimal solution. In the following chapters, further details about this method are provided.
3. Resource Allocation Algorithm Based on Distance Grouping
In the first section, the distance-based grouping strategy in the one-to-many system model is proposed. The second section introduces the improved particle swarm optimization algorithm which is proposed to solve the mixed-integer programming problem.
3.1. Distance-Based Grouping Strategy
In D2D communication, as a result of interference from obstacles such as path loss, the channel resources selected by the base station are not the optimal ones, which decreases the system transmission rate. This situation is more complex in one-to-many communication. Considering the correlation between user distance and interference size, a resource allocation algorithm based on distance grouping is proposed in this paper, which allows D2D users to select the optimal channel resource multiplexing when the threshold condition is met. It not only ensures the reasonable allocation of channel resources but also improves the efficiency of algorithm execution and maximizes the transmission rate of the system. The model diagram based on distance grouping is shown in Figure 3.

According to the analysis of the system model, the user SNR is obtained, namely, Eqs. (2) and (3). Equation (1) is substituted into Eqs (2) and (3) to give birth to the following equations, respectively.
It is found that the distance between CUs and DUs is inversely proportional to the interference of CUs to DUs. The longer the distance between CUs and DUs, the less interference will be generated. Therefore, within each group, D2D users select appropriate cellular user link resources for reuse, based on the distance between them.
3.2. Improved PSO Algorithm
3.2.1. Problem Transformation
The PSO algorithm is improved in a tractable constraint problem in this paper. The objective function and constraints of the system model are converted into the sum of penalty terms, which is used as the fitness function of the improved PSO algorithm. In order to facilitate the processing of PSO, we convert the constraints into penalty terms, which are expressed as follows: () represents the penalty term, where is the number of the divisor. The expression is the following constraint:
Then, according to the objective function Eq. (11) and the penalty term Eqs. (21)–(26), the fitness function of the improved PSO algorithm can be expressed as
The () represents the factor of the penalty term, which is introduced to avoid infinite expansion of the sum of the penalty terms.
In the traditional particle swarm optimization algorithm, the inertia weight of the updated particle velocity is fixed, so it is challenging to converge. The inertia weight will change according to the gradient descent function in this paper. As the number of update rounds increases, the inertia weight will become smaller and eventually stabilize to the set minimum value, causing the particles to stabilize in the final update stage. Furthermore, the learning factor in the traditional particle swarm optimization algorithm is manually set and fixed. The size of the learning factor can ensure the ability of particle detection. In order to improve the accuracy of the resource allocation algorithm and ensure the precise convergence of the later particles, the fixed value to an adaptive one is changed in this paper. Every particle in the search space is updated with its position and velocity through improved particle swarm optimization as follows:
denotes the inertia weight (inertia weight) and and represent nonnegative constant learning factors.
3.2.2. The Improved Inertia Weights
The inertia weight coefficient is introduced to control the speed of the drop in inertia weight. This prevents particles from falling into the local optimal solution. A gradient descent function is used for inertia weight, and its expression is
In this formulation, stands for the minimum inertia weight, denotes the maximum inertia weight, represents the current iteration number, and denotes the inertia weight coefficient.
The coefficient of inertia can be dynamically adjusted according to the following equation: where denotes a random number uniformly distributed in the range and represents a positive integer.
3.2.3. The Improved Learning Factor
The fixed value to an adaptive one is changed in this paper, and the improved expression is
and stand for the maximal learning factors, and and are the minimum learning factors. Then, sort the particle fitness over all iterations. As a result of sorting, 50% of the particles are retained and the rest are modified by adaptive mutation.
and are the velocity and position of particles that have a 50% fitness value, respectively. The and are denoted the positions and velocities of the poorer 50% particles in the swarm, corrected by adaptive mutation, respectively. denotes a random number uniformly distributed Gaussian in the range of . α and β are two positive numbers given. At the same time, the algorithm constrains the position and velocity of each particle within the given range. Furthermore, by introducing the mutation factor , the algorithm will be better able to deal with mutations. Not only can the algorithm be prevented from falling into local minima, but it can also jump from local minima effectively. The expression of mutation factors is described as follows: where is the mean value of the optimal particle position obtained in the th iteration and is the global position value of the optimal particle obtained so far.
It is worth mentioning that this paper uses the improved particle swarm optimization algorithm to solve the optimal solution through an iterative process.
3.2.4. Resource Allocation Algorithm Based on Distance Grouping
The resource allocation algorithm based on distance grouping is shown in Algorithm 1.
|
3.2.5. Complexity Analysis
The complexity analysis of the D2D channel selection and power control strategy is divided into two stages, which effectively solves the mixed-integer nonlinear programming problem produced by the original problem. As part of DUs’ channel selection, both parties’ communication link selection problems must be calculated and matched. Therefore, the algorithm complexity required in the DU channel selection stage is . The computational complexity of the KM algorithm is . At the optimal power control stage of DU and CU, each iterative operation must resolve at most power control problems. At this stage, the algorithmic complexity is , where is the number of iterations. Particle swarm algorithms are computationally complex , where is the particle swarm size. Overall, the channel selection and power control strategy proposed in this paper is of level algorithmic complexity.
4. Simulation Results
The performance of a proposed resource allocation scheme for distance-based grouping is proven in this section. The simulation model considers a single-cell system with a base station, a D2D pair, and cell users evenly distributed within the cell. To verify the feasibility of the resource allocation algorithm proposed in this paper, the modified particle swarm algorithm in the ungrouped one-to-one model, the adaptive mutation particle swarm algorithm in the ungrouped one-to-one model, and the traditional resource allocation algorithm in the ungrouped one-to-one model are compared. The main parameters of this paper are summarized in Table 1.
The change trend of system throughput and DUs under different resource management schemes is shown in Figure 4. As plotted in the curve trend, a rise in D2D users is accompanied by an increase in cellular users. CUs provide reusable resources for D2D users, so the system throughput increases for all four algorithms. Under any number of DUs, compared to the three comparison algorithms, the proposed algorithm obtains better throughput, since the improved particle swarm algorithm is more able to get out of the local optimal solution and find the global optimal solution. It is shown that D2D communication significantly boosts cellular network throughput.

Fixed D2D users numbering 20 under four different algorithms are depicted in Figure 5. Increasing the number of cellular subscribers gradually increases system throughput. As plotted in Figure 5, as the number of CUs increases, so does the throughput of the system, since CUs provide more reusable resources for DUs. With 30 CUs, the reusable resources provided are the smallest, and the system throughput is the smallest. With 50 cellular users, the most reusable resources are provided, and the system throughput is the highest. The system throughput increases the most with the proposed scheme.

With the number of DUs gradually increasing, the system throughput will also rise, as depicted in Figure 6. D2D users reach a certain number; since the number of cellular users is fixed, there will be no subcarriers available for D2D users to choose from or use; hence, the system throughput will decrease. Compared to the other three algorithms, the proposed algorithm has a higher system throughput, indicating that it can reasonably allocate cellular user resources and control interuser interference.

The variation of the D2D user system throughput under different maximum transmission powers is shown in Figure 7. An increase in transmission power will lead to more D2D communications and higher system throughput, as shown by the change trend. With transmission power of any DU at maximum, the algorithm achieves the highest system throughput. Moreover, D2D users’ increasing transmission power will cause cellular networks to suffer more interference. As shown in the figure, the system throughput shows a slight downward trend. Thus, the D2D users’ maximum transmission power will slightly limit the increase of system throughput.

Figures 8 and 9 show the results of the system throughput and running time analysis of the four algorithms with varying iteration times in order to analyze the search capability and convergence speed of the improved algorithm. As the number of iterations increases, the figure shows that the system throughput increases accordingly. After a certain number of iterations, the system throughput reaches a maximum and remains constant because all D2D users reuse cellular user channel resources. The algorithm converges before the 50th iteration. According to this algorithm, it converges in the shortest time possible, and the maximum system throughput is achieved. Based on the change curve in Figure 9, increasing the number of iterations also extends the operation time of the four algorithms, but the operation time of the algorithm in this paper is the shortest. In the initial convergence, it took 16 seconds. By comparison, using the algorithm has the fastest convergence speed and system throughput is greatly improved.


5. Conclusion
In this paper, D2D communication can enable flexible multiplexing of cellular users’ uplink resources. To ensure fairness, a DU may multiplex multiple CU uplink resources. While meeting the QoS requirements of CUs and DUs, it solves the problem of maximizing system throughput by taking into account the constraints of rate, transmission power, and reuse factor. The problem presented here is a MINLP problem. A distance-based resource allocation algorithm is proposed, based on the relationship between user distances and interference levels, that allocates channel resources in a moderate and efficient manner. According to the simulation results, the proposed scheme has better performance than other benchmark schemes. How to investigate the joint problem of information transmission and power control is our future work. The method proposed in this paper is employed to bring the chance of extending D2D communication.
Data Availability
The data that support the findings of this study are available from the corresponding author upon reasonable request.
Conflicts of Interest
We declare that we have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Authors’ Contributions
Jing Gao was responsible for the investigation, software, visualization, data curation, writing of the original draft, and project administration. Xiao Meng was responsible for the conceptualization; methodology; writing, review, and editing; and resources. Chen Yang was responsible for the validation and visualization. Bo Zhang was responsible for the validation, investigation, and resources. Xin Yi was responsible for the validation, investigation, and resources.