Joint Uplink and Downlink Resource Allocation for D2D Communications System

: In cellular networks, device-to-device communications can increase the spectrum efﬁciency, but some conventional schemes only consider uplink or downlink resource allocation. In this paper, we propose the joint uplink and downlink resource allocation scheme which maximizes the system capacity and guarantees the signal-to-noise-and-interference ratio of both cellular users and device-to-device pairs. The optimization problem is formulated as a mixed integer nonlinear problem that is usually NP hard. To achieve the reasonable resource allocation, the optimization problem is divided into two sub-problems including power allocation and channel assignment. It is proved that the objective function of power control is a convex function, in which the optimal transmission power can be obtained. The Hungarian algorithm is developed to achieve joint uplink and downlink channel assignment. The proposed scheme can improve the system capacity performance and increase the spectrum efﬁciency. Numerical results reveal that the performance of the proposed scheme of jointly uplink and downlink is better than that of the schemes for independent allocation.


Introduction
With the rapid popularity of intelligent devices, the cellular systems are suffering an unprecedented pressure imposed by the explosive growth of data traffic and a massive increase of interconnected devices [1][2][3].In order to alleviate this pressure, device-to-device (D2D) communication is introduced to improve the spectrum utilization of cellular networks [4].D2D communication is defined as direct communication between two mobile users without traversing the base station [5,6], which can potentially increase the cellular capacity, improve the user throughput, and extend the battery lifetime of users [7].In addition, the access to the spectrum in D2D communication can be done in two ways: Overlay spectrum sharing or underlay spectrum sharing [8,9].In the overlay case, D2D transmitters can only access the channels which are not used by nearby cellular users.This method cannot improve spectrum utilization since the D2D pairs use separate resource with the cellular users (CUs).On the other hand, D2D transmitters in underlay case can continuously transmit on all channels subject to tolerable interference to the cellular users.This approach has the advantages of not affecting the spectrum of the cellular communication but also achieving the reuse gain in D2D communication [10].Therefore, we focus on the underlay spectrum sharing where the D2D pairs reuse the spectrum of the CUs in this paper.
In D2D underlay cellular network, D2D transmitter sends the signal to the D2D receiver by using the same spectrum resource with the cellular links, which can improve the system capacity and spectrum utilization [11].However, when the spectrum resource is allocated unreasonably, co-channel interference between the cellular users (CUs) and D2D pairs will degrade the system performance.In order to solve this key issue, some resource allocation schemes have been proposed in D2D communications, which are mainly divided into two major categories.One is the uplink resource allocation for D2D communications [12][13][14][15][16][17][18][19][20].Specifically, in order to achieve the maximum total data transmission rate, different types of methods are proposed, such as range division [12], mode selection [13][14][15], and power control [14,15].In reference [16], the authors focus on power control and channel assignment for interference coordination between D2D pair and CU in uplink phase.In reference [17], a dynamic resource allocation scheme for D2D communications in the cellular network is applied to maximize the number of D2D communications pairs and avoid the strong interference of D2D communications with the cellular communication.A game-theoretic scheme [18] is presented to solve the resource allocation problem of multi-cell D2D communications.An optimization problem is formulated to maximize the effectiveness of the D2D user devices, and a novel algorithm [19] is presented based on the many-to-one matching game with companion effects.In reference [20], the maximization method of the weighted system data rate is developed, which can guarantee the minimum individual CU's data rate and proportional fairness among D2D.The other category is the downlink resource allocation for D2D communications [21][22][23][24][25][26][27][28].A distributed resource allocation scheme has been proposed in reference [21] to maximize the number of underlay D2D users.Joint resource allocation and power control are investigated in reference [22] for downlink systems, where multiple D2D pairs are allowed to use the same resource blocks.In references [23][24][25][26], downlink resource allocation schemes maximize the sum data rate via different optimization methods.The original non-convex problem is transformed to a convex problem by the semi-definite relaxation technique and a reformulation of the objective function with first-order approximation in each algorithm iteration [23].In reference [24], resource allocation problem is modeled as a Stackelberg game with pricing.The issue of fair resource allocation in D2D underlaid cellular networks is studied [25] based on orthogonal frequency division multiple access (OFDMA).The joint of time scheduling and power control [26] is a non-convex optimization problem, which is transformed into a nonlinear fractional programming problem.Moreover, to achieve green communication, references [27,28] resolve the energy efficiency (EE) maximization problem of downlink cellular communication system, in which the EE maximization problem for all D2D pairs is considered in reference [27], and the overall system EE maximization problem is considered in reference [28].
However, these methods in references [12][13][14][15][16][17][18][19][20][21] reuse the uplink channel, and in references [21-28] D2D users can share the downlink channel, therefore the total radio spectrum has not been fully utilized.To account for this problem, jointly uplink and downlink channel scheme [29,30] are proposed in cellular networks.A new benefit-aware uplink-downlink (GAUD) resource allocation scheme [29] is proposed to maximize the total data rate of all D2D.The interference management algorithm is presented, which includes admission control, power allocation, and channel assignment in reference [30].However, these two algorithms only maximize the total data rate of D2D, while not being optimal to the overall system data rate.
In this paper, we consider the joint uplink and downlink resource allocation scheme to maximize the total system capacity.The quality-of-service (QoS) of all users of D2D and the co-channel CU should be satisfied by choosing the corresponding transmission power.Based on the above idea, an optimization problem with a binary variable is formulated, which is NP-hard in general.To make the problem better tractable, it can be decomposed into two sub-problems: Power allocation and channel assignment.It is first proved that the objective function of power allocation is convex, and the optimal transmission power is derived.Next, we develop the Hungarian algorithm for joint uplink and downlink channel assignment to maximize the total system capacity.Finally, the performance of the proposed scheme is evaluated through the numerical simulations.
The rest of the paper is organized as follows.Section 2 introduces our system model and formulates the maximization problem of the system capacity.Then, in Section 3, we jointly develop a power allocation and channel assignment scheme.Furthermore, the formulated optimization problem is solved.After that, the simulation results are provided to demonstrate the superiority of the proposed schemes in Section 4. Finally, Section 5 briefly concludes this manuscript.

System Model and Problem Formulation
In this section, we first build the system model and then formulate the joint uplink and downlink resource allocation problem for D2D communications system.

System Model
In this paper, we consider the single cell scenario in Figure 1, in which the cell comprises of M CUs, K D2D pairs and a base station (BS), in here m ∈ {1, 2, . . . ,M} and k ∈ {1, 2, . . . . ,K} denote the index sets of CUs and D2D pairs, respectively.It is assumed that the D2D communications system uses frequency division duplex, where the uplink and downlink channels occupy half of the entire spectrum.Moreover, each of the CU has been pre-allocated one orthogonal uplink channel and one orthogonal downlink channel to reduce the inter-CU-interference.Thus, as to facilitate the management interference problem, we assume that each channel (either uplink or downlink) could be reused by at most one D2D and each D2D link is allowed to reuse no more than one channel.
We consider the slow fading caused by shadowing and the fast fading caused by multi-path propagation.Thus, the channel gain between CU m and the BS can be expressed as where κ is the path loss constant determined by system parameters, β mB denotes the fast fading gain with exponential distribution, ς mB denotes the slow fading gain with log-normal distribution, d mB is the distance between mth CU and the BS, and α is the path loss exponent.
Future Internet 2018, 10, x FOR PEER REVIEW 3 of 16 The rest of the paper is organized as follows.Section 2 introduces our system model and formulates the maximization problem of the system capacity.Then, in Section 3, we jointly develop a power allocation and channel assignment scheme.Furthermore, the formulated optimization problem is solved.After that, the simulation results are provided to demonstrate the superiority of the proposed schemes in Section 4. Finally, Section 5 briefly concludes this manuscript.

System Model and Problem Formulation
In this section, we first build the system model and then formulate the joint uplink and downlink resource allocation problem for D2D communications system.

System Model
In this paper, we consider the single cell scenario in Figure 1, in which the cell comprises of M CUs, K D2D pairs and a base station (BS), in here index sets of CUs and D2D pairs, respectively.It is assumed that the D2D communications system uses frequency division duplex, where the uplink and downlink channels occupy half of the entire spectrum.Moreover, each of the CU has been pre-allocated one orthogonal uplink channel and one orthogonal downlink channel to reduce the inter-CU-interference.Thus, as to facilitate the management interference problem, we assume that each channel (either uplink or downlink) could be reused by at most one D2D and each D2D link is allowed to reuse no more than one channel.We consider the slow fading caused by shadowing and the fast fading caused by multi-path propagation.Thus, the channel gain between CU m and the BS can be expressed as where  is the path loss constant determined by system parameters, mB  denotes the fast fading gain with exponential distribution, mB

System Capacity
The status parameter ρ u mk of the uplink is where ρ u mk is a binary variable.The status parameter ρ d mk of the downlink is where ρ d mk is a binary variable.

Uplink Phase
When the mth CU uses the uplink spectrum, the received signal-to-noise-and-interference ratio (SINR) for the mth CU can be expressed as where P c m and P d k are the transmission power of the mth CU and the transmitter of kth D2D pair, respectively, g mB is the channel gain of the signal link between mth CU and the BS, h kB is the channel gain of the interference link between the transmitter of kth D2D pair and the BS, and σ 2 is the power of additive Gaussian white noise on each channel.
In the uplink, the CU causes the interference to the D2D pair, thus the SINR of the kth D2D pair under channel m is calculated as where g kk is the channel gain of the signal link between the kth D2D pair, and h mk is the channel gain of the interference link between the mth CU and receiver of the kth D2D pair.Then the overall system capacity of CU and D2D pair in uplink phase is written according to Equations ( 4) and ( 5)

Downlink Phase
When the mth CU uses the downlink spectrum, the received SINR for the mthCU can be written as where P c Bm is the transmission power of the BS, g Bm is the channel gain of the signal link between the BS and mth CU, and h km is the channel gain of the interference link between the transmitter of kth D2D pair and mth CU.
In the downlink, the D2D pair is interfered by the BS, thus we can obtain the SINR of the kth D2D pair under channel m where h Bk is the channel gain of the interference link between the BS and the receiver of kth D2D pair.
In downlink phase, combining Equations ( 7) and ( 8), we can give the overall system capacity of CU and D2D pair According to Equations ( 6) and ( 9), the total system capacity can be expressed as

Problem Formulation
In this paper, we propose the joint uplink and downlink resource allocation scheme in a single cell system with both CUs and D2D pairs.In order to maximize the total capacity of the system and guarantee the SINR requirements to both CUs and D2D pairs.The overall optimization problem about system capacity can be expressed as max where γ c min and γ d min denote the minimum SINR requirements of CU and D2D pair, respectively, P c max and P d max are the maximum transmission power of the CU and D2D pair, respectively.Constraints ( 12) and ( 13) are the QoS requirements of CUs and D2D pairs, respectively.Constraint (14) guarantees that transmission power of CUs, BS, and D2D pairs are within the maximum limit.Constraints (15) and ( 16) ensure that each uplink or downlink channel of CU can be shared by at most one D2D pair.Constraint (17) indicates that each D2D can only reuse one uplink or downlink channel.In the next section, joint uplink and downlink (JUAD) resource allocation algorithm is presented to effectively solve the optimization problem (11).

Resource Allocation Algorithm
The built optimization function (11) with both continuous and discrete variables is a mixed integer nonlinear programming (MINLP), therefore it is difficult to directly obtain the close-form solution.To solve the above optimization problem (11), the JUAD resource allocation algorithm is proposed, in which the objective function is transformed into two sub-problems to reduce computational complexity cost.The first one is the power allocation for a single D2D pair and its reuse partner, where we allocate transmission power to maximize the total system capacity for the D2D pair and its reuse partner.The second one is the resource allocation for multiple D2D pairs, where we construct the system capacity matrix and improve the Hungarian algorithm to obtain the optimal channel for each D2D pair.

Power Allocation
When kth D2D reuses only the uplink channel of mth CU, the power allocation problem can be simplified as max In order to satisfy the minimum QoS requirement, the SINR of both CUs and D2D pairs should be larger than the threshold, and the transmission power of CUs and D2D pairs cannot exceed its maximum value.According to constraints (19) and (20), we get the range of where the parameters P u L and P u H are written, respectively.
According to the operational properties of the logarithm function, max * )], the optimization problem (18) can be rewritten as In order to find the optimal values P c * m , P d * k , we first prove the following Lemma 1.
Lemma 1.The optimization problem ( 24) is a convex function with respect to P d k when another variable P c m is fixed at its maximal power.
Proof of Lemma 1.The first-order partial derivative of f P c m , P d k is written as where the four parameters are C = g kk σ 2 P c max g mB + σ 2 − P c max g mB h kB P c max h mk + σ 2 (28) From the above Equation ( 29), it is known that D is always positive.The Equation ( 25) is equal to zero and we can get From Equation (30), we are only interested in real-valued P d k ∈ 0, P d max .According to Equation (30), it is known that a real and non-negative P d k can only occur for C ≤ 0, since A, B > 0. Next, the second-order derivative of f P c max , P d k is obtained as where k is seen to be non-negative if the following inequality is satisfied By checking Equation ( 28), we see C ≤ 0 that implies that Divided by P c max g mB on both sides of Equation (33), we can get Thus, we can obtain Lemma 1 is proved.
According to the property of the convex function, we note that the maximum of a convex function is obtained at the boundary points.f P c m , P d k is a convex function with respect to 0 ≤ P d k ≤ P d max and the optimal power P c * m , P d * k is found in the set of corner points: ∆Ω = P c max , P u L , P c max , P u H .The optimal power allocation can be expressed as Similarly, when D2D pairs reuse the downlink channel resources of CUs, the optimal power solution can be obtained by using the same method where ∆Ψ is the optimal power set of P d k , P d L and P u H are the lower and upper power values of P d k , respectively.

Channel Assignment
In the above analysis, we have solved the power allocation problem for each CU-D2D pair.Now, we can find the optimal reuse partner for a D2D pair when more than one partner users are available.When a CU shares its uplink or downlink channel with the D2D pair, the optimal CU-D2D pairing problem can be transformed to max where R up sum is the total system capacity of CU and D2D pair in uplink phase, and R down sum is the total system capacity of CU and D2D pair in downlink phase.
From the above Equation (40), it is known that the optimal CU-D2D pairing problem is a bipartite matching problem.We can build the system capacity matrix R The traditional Hungarian algorithm can only be used to solve the uplink or downlink channel allocation problem, it cannot be applied to the JUAD channel allocation problem.Thus, a novel Hungarian algorithm is developed for the JUAD channel allocation scheme.
Step 1: Use the big-value matrix minus the system capacity matrix, in which the maximization problem can be solved by Hungarian algorithm; Step 2: The Hungarian algorithm is used for channel allocation at the first time, in which the cost matrix is the new matrix obtained in Step 1.However, allocating resources based on the Hungarian algorithm results in some channel collisions, due to the restriction in Equation ( 43) that a D2D pair cannot reuse both the uplink and downlink channels.Hence, we use conflicting channels and corresponding D2D pairs to form a new capacity matrix; Step 3: We proceed to allocate resources using the Hungarian algorithm until the number of conflicting channels is 0.

Numerical Analysis
In this section, the performance of our proposed algorithm is demonstrated by numerical simulation results.

Simulation Parameters
The simulation area is within radius of 500 m where the BS is deployed in the center of the cell and CUs and D2D pairs are randomly distributed in the simulation cell.In the simulations, the CUs, D2D pairs and BS are set to the maximal transmission power of 21 dBm, 21 dBm, and 27 dBm, respectively.Slow fading with a standard deviation of 8 dB and fast fading subjecting an exponential distribution with unit mean are considered as the channel gain coefficients.The noise power spectral density is assumed to be −144 dB, and the number of CUs and D2D pairs are 10.To the Monte Carlo experiment, the results in each graph are obtained from 2000 channel implementations.Simulation parameters are elaborated in Table 1.
To validate the effectiveness of the proposed JUAD resource allocation scheme, we compare our scheme with only reuse uplink resources (OU) and only reuse downlink (OD) resources schemes.

•
OU: A two-step resource management scheme is proposed to optimize transmission power of D2D pairs and the spectrum efficiency of the network in [31].Firstly, the interaction between BS and D2D pairs is modeled as a two-level Stackelberg game to get the best transmission power for each D2D.Secondly, the uplink resource allocation algorithm based on the Hungarian algorithm is proposed to assign spectrum to each D2D pair.

•
OD: A social-aware jamming allocation for D2D multicast secure communication is proposed in reference [32].Firstly, a novel D2D cluster and jammer formation scheme is designed, which takes account of the physical domain and the social domain.Secondly, a joint optimal power control and jamming allocation is obtained, and the Hungarian algorithm is introduced to provide the final solution.

Simulation Results
Figure 2 illustrates the convergence performance of the proposed scheme under different numbers of users.We can observe that the algorithm converges to a stable solution till four times.In addition, as the number of users increases, the system capacity increases accordingly, which means that our JUAD solution is scalable.The time complexity of traditional Hungarian algorithm is O(n 3 ), while that of the improved Hungarian algorithm is O(Cn 3 ), where C is a constant slightly greater than 1.
control and jamming allocation is obtained, and the Hungarian algorithm is introduced to provide the final solution.

Simulation Results
Figure 2 illustrates the convergence performance of the proposed scheme under different numbers of users.We can observe that the algorithm converges to a stable solution till four times.In addition, as the number of users increases, the system capacity increases accordingly, which means that our JUAD solution is scalable.The time complexity of traditional Hungarian algorithm is  Figure 3 displays the system capacity of the three algorithms versus maximum transmission power.These three algorithms include JUAD, OU, and OD.From Figure 3, it can be seen that the system capacity of the three algorithms are improved with the increasing maximum transmission power.In addition, our proposed JUAD scheme outperforms the other two methods for all channels System capacity(bps/Hz) Figure 3 displays the system capacity of the three algorithms versus maximum transmission power.These three algorithms include JUAD, OU, and OD.From Figure 3, it can be seen that the system capacity of the three algorithms are improved with the increasing maximum transmission power.In addition, our proposed JUAD scheme outperforms the other two methods for all channels (whether uplink or downlink) which can be selected to reuse for the D2D.As maximum transmission power is 17 dBm, the system capacity of the proposed scheme is 176 bps/Hz.The performance of OU scheme is close to that of OD scheme, and it is better than that of the OD scheme.That is because, compared with the OU scheme, in which D2D pairs suffer interference from CUs, the OD scheme brings severe interference to D2D pairs, in which D2D pairs suffer interference from BS.
respectively, in the cell.Figure 5 shows the system capacity of the JUAD algorithm with different size of radius.It can be seen from the Figure 5 that the system capacity of the JUAD algorithm under the radius 1000m R  is better than that of the proposed algorithm under the radius 500m R  .This is because the greater distance between users can reduce the interference between CU and D2D, which can improve output performance.The system capacity of the three resource allocation schemes versus the noise power is displayed in Figure 4. From Figure 4, we note that the output performance of the JUAD scheme is higher than that of the OU and OD schemes for different noise power.Moreover, the system capacity of the three resource allocation schemes decrease as the noise power increases.For the resource allocation schemes, each CU and D2D link decrease its transmission power when the noise power reduces.As a result, the co-channel interference between CU and D2D links also decreases, which improves the capacity of system.The same user density is assumed to be for both R = 500 m, R = 800 m, and R = 1000 m, respectively, in the cell.Figure 5 shows the system capacity of the JUAD algorithm with different size of radius.It can be seen from the Figure 5 that the system capacity of the JUAD algorithm under the radius R = 1000 m is better than that of the proposed algorithm under the radius R = 500 m.This is because the greater distance between users can reduce the interference between CU and D2D, which can improve output performance.The system capacity of the three resource allocation schemes for different distances of D2D pairs is shown in Figure 6.It can be seen that the system capacity decreases with the increasing radius of the D2D pair.As distance of D2D pairs is equal to 70 m, the system capacity that JUAD scheme can achieve is more than 220 bps/Hz, which is about 125% higher than that of the OU and OD schemes.In the range of the distance D2D pairs from 30 m to 90 m, our JUAD resource allocation scheme has superior performance to the other two schemes.The system capacity of the three resource allocation schemes for different distances of D2D pairs is shown in Figure 6.It can be seen that the system capacity decreases with the increasing radius of the D2D pair.As distance of D2D pairs is equal to 70 m, the system capacity that JUAD scheme can achieve is more than 220 bps/Hz, which is about 125% higher than that of the OU and OD schemes.In the range of the distance D2D pairs from 30 m to 90 m, our JUAD resource allocation scheme has superior performance to the other two schemes.The system capacity of the proposed JUAD algorithm versus different maximum transmission power is shown in Figure 7.It is seen that the performance of the proposed JUAD algorithm decreases with the decreasing of the maximum transmission power of the D2D pairs.In addition, with the increasing of the distance of D2D pairs, the improvement of system performance is limited.As the distance of D2D pairs is 60 m and the maximum transmission power 2 Bm 1d P 

System
, the system The system capacity of the proposed JUAD algorithm versus different maximum transmission power is shown in Figure 7.It is seen that the performance of the proposed JUAD algorithm decreases with the decreasing of the maximum transmission power of the D2D pairs.In addition, with the increasing of the distance of D2D pairs, the improvement of system performance is limited.As the distance of D2D pairs is 60 m and the maximum transmission power P max = 21 dBm, the system capacity is about 226 bps/Hz, which is close to that of P max = 27 dBm.The system capacity of the proposed JUAD algorithm versus different maximum transmission power is shown in Figure 7.It is seen that the performance of the proposed JUAD algorithm decreases with the decreasing of the maximum transmission power of the D2D pairs.In addition, with the increasing of the distance of D2D pairs, the improvement of system performance is limited.As the distance of D2D pairs is 60 m and the maximum transmission power max 2 Bm 1d P  , the system capacity is about 226 bps/Hz, which is close to that of max 2 Bm 7 d P  .8, the system capacity of the proposed JUAD scheme can be improved with the increasing cell radius.Moreover, the system capacity of the JUAD algorithm under the radius R = 1000 m is better than that under the radius R = 500 m and radius R = 800 m.

Conclusions
In this paper, we propose the joint uplink and downlink resource allocation scheme for D2D communications system in the cellular networks.To maximize the total system capacity, we

Figure 2 .
Figure 2. The system capacity with different number of iterations.

Figure 2 .
Figure 2. The system capacity with different number of iterations.

Figure 3 .Figure 3 .
Figure 3.The system capacity with varying maximum transmission power, comparison of the joint uplink and downlink (JUAD)/only reuse uplink (OU)/only reuse downlink (OD) resource allocation schemes.

Future
Internet 2018, 10, x FOR PEER REVIEW 12 of 16

Figure 4 .Figure 4 .
Figure 4.The system capacity with varying noise power, comparison of the JUAD/ OU/OD resource allocation schemes.

Figure 4 .
Figure 4.The system capacity with varying noise power, comparison of the JUAD/ OU/OD resource allocation schemes.

Figure 5 .
Figure 5.The system capacity versus different maximum transmission power with different cell radius.

Figure 5 .
Figure 5.The system capacity versus different maximum transmission power with different cell radius.

Future 16 Figure 6 .
Figure 6.The system capacity with different distance of D2D pairs, comparison of the JUAD/OU/OD resource allocation schemes.

Figure 6 .
Figure 6.The system capacity with different distance of D2D pairs, comparison of the JUAD/OU/OD resource allocation schemes.

Figure 6 .
Figure 6.The system capacity with different distance of D2D pairs, comparison of the JUAD/OU/OD resource allocation schemes.

Figure 7 .
Figure 7.The system capacity with different distance of D2D pairs in terms of different maximum transmission power.

Figure 8
Figure 8 displays the output performance of the proposed JUAD algorithm versus different cell radius.The same user density is assumed to be for both 500m R  , 800m R  , and 1000m R  , respectively, in the cell.From Figure 8, the system capacity of the proposed JUAD scheme can be

Figure 7 .
Figure 7.The system capacity with different distance of D2D pairs in terms of different maximum transmission power.

Figure 8
Figure8displays the output performance of the proposed JUAD algorithm versus different cell radius.The same user density is assumed to be for both R = 500 m, R = 800 m, and R = 1000 m, respectively, in the cell.From Figure8, the system capacity of the proposed JUAD scheme can be improved with the increasing cell radius.Moreover, the system capacity of the JUAD algorithm under the radius R = 1000 m is better than that under the radius R = 500 m and radius R = 800 m.

Future
Internet 2018, 10, x FOR PEER REVIEW 14 of 16 improved with the increasing cell radius.Moreover, the system capacity of the JUAD algorithm under the radius 1000m R  is better than that under the radius 500m R  and radius 800m R  .

Figure 8 .
Figure 8.The system capacity versus different distance of D2D pairs with different cell radius.

Figure 8 .
Figure 8.The system capacity versus different distance of D2D pairs with different cell radius.