Area spectral efﬁciency and energy efﬁciency in underlay D2D cellular networks

Device-to-device (D2D) communication has attracted a great deal of attention in the last few years due to its potential to enhance wireless network capacity and reduce energy consumption, among other beneﬁts. Here, the problem of maximisation of the performance of a D2D network in a scenario in which D2D users share communication channels with users of a cellular network is investigated. Using stochastic geometry tools, the problems of maximisation of the performance metrics area spectral efﬁciency (ASE) and energy efﬁciency (EE) of the D2D network by adjusting the density, transmit power, and link throughput of D2D users are formulated and solved. The maximisation of ASE and EE is performed by imposing that the successful transmission probabilities of both D2D and cellular networks are not below given minimum acceptable levels. Based on the derived formulation, the effects of several parameters on the network performance are assessed. The study shows the existence of three possible operating regimes for the D2D network, according to the behaviours (increasing or decreasing) of ASE and EE when the quality of the D2D links increases.


INTRODUCTION
Device-to-device (D2D) communication has been considered in the last years as one of the 5G wireless networks key technologies. In short, D2D communication allows nearby user devices to directly communicate with each other, that is, without having base stations involved in the message transmissions. Consequently, D2D links usually involve shorter communication distances, requiring reduced transmit power, causing lower interference, and leading to higher spectral efficiency transmission schemes, among other benefits, when compared to conventional cellular communication. Regarding spectrum usage, D2D devices can operate either in the in-band mode, or in the out-ofband mode [1]. In the former mode, D2D links use the cellular spectrum, while in the later, other bands (e.g. the unlicensed 2.4 GHz band) are used by D2D links. Under in-band mode, two sharing modes are possible: overlay mode, when D2D and cellular transmissions use orthogonal channels, avoiding interference between cellular and D2D links, and underlay mode, when cellular and D2D share the available channels, with D2D transmitting opportunistically.
This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited. In the underlay in-band mode, cellular and D2D links cause mutual interference, which may harm the performance of both cellular and D2D networks. This scenario has motivated the investigation of techniques for controlling the mutual interference in order to enhance the performance of both D2D and cellular networks. In this paper, we investigate a scenario in which D2D terminals are allowed to opportunistically use the uplink RF channel used by cellular terminals, as long as the interference caused by D2D transmissions does not cause excessive degradation to the cellular network. One example of this scenario is the case in which machine-to-machine communication terminals are allowed to use the cellular channels to transmit their messages, under the condition that the interference caused to cellular links is limited. We are interested here in maximising the performance of the D2D network by adjusting some of its parameters while guaranteeing the performance of the cellular network remains unchanged. In this study, we are particularly interested in the area spectral efficiency (ASE) and energy efficiency (EE) as performance metrics, as they are related to critical resources of the network, namely, RF spectrum and energy, which are usually limited. ASE measures the number of bits successfully transmitted throughout the network, per unit area. On the other hand, the energy efficiency measures the power spent to successfully transmit bits, per unit area. It should be noted that these two metrics are related to each other, what motivated us to exploit the existence of different regimes of network operation for a D2D network, according to these metrics.
Following other similar works in this fields, we model the cellular and the D2D networks by means of Poisson point processes (PPP), allowing us to derived closed-form expressions and obtain insights about the behaviour of the metrics ASE and EE. These metrics are maximised by adjusting the transmit power, the density of users and the transmission rate (i.e. the link spectral efficiency) of the D2D network, under the condition that the success probability of cellular transmissions does not drop below a given threshold. As will be shown in the following sections, the level of interference caused by D2D transmission to cellular links is directly proportional to the product d × P 2∕ d , where d and P d are the D2D density of users and transmit power, respectively, and is the path loss exponent of the propagation channel model. Therefore, we follow the strategy proposed by Pimentel and Cardieri in [2] and maximise D2D ASE keeping the quantity d × P 2∕ d fixed. For the maximisation of energy efficiency, we employ a different approach in order to capture the intricacies of the function that models the D2D energy efficiency, as discussed in the following sections. In this sense, EE is maximised with respect to D2D transmit power and user density, but imposing a minimum value of the D2D density of users. As will be shown, the maximisation of both ASE and EE comes at the expense of a degradation of the D2D successful transmission probability, requiring therefore an additional restriction in these maximisation problems in order to guarantee a minimum acceptable D2D successful transmission probability.

RELATED WORKS AND CONTRIBUTIONS
In the following, we discuss some works related to the work presented here, with emphasis on those investigating energy and spectrum efficiencies of D2D networks.
Beginning with the energy efficiency maximisation problem, Zhang et al. [3] and Yang et al. [4] derived the optimal D2D transmission power that maximises the energy efficiency in a scenario in which D2D and cellular users share the channel. The maximisation of EE was carried out by taking into account constraints related to D2D transmission rate, transmission power, and successful transmission probability of both the D2D and the cellular networks. Gao et al. [5] determined the D2D transmission power that maximises the energy efficiency in a single cell scenario, by solving an optimisation problem imposing a maximum allowable D2D transmission power. Waleed et al. [6] maximise the D2D energy efficiency regarding the cellular and D2D transmit power levels. They solve the optimisation problem using an adaptive mesh size algorithm. Robat et al. [7] determined the optimum D2D transmission power that maximises D2D energy efficiency. The optimisation problem includes constraints related to the quality of service of both cellular and D2D users. Besides, the maximum D2D transmission power is also restricted. Yu et al. [8] maximise the energy efficiency of a downlink distributed antenna system with D2D underlay communication. The optimisation problem includes constraints on the minimum transmission rate of the cellular user and the maximum power of both D2D and cellular users. Cheng et al. [9] use the Dinkelbach algorithm and Lagrange dual method to maximise the energy efficiency of D2D communications regarding the D2D transmission power.
The maximisation of the ASE of D2D networks was the subject of several papers found in the literature. For instance, Liu et al. [10], Lee et al. [11], and Wen et al. [12] studied the maximisation of the D2D transmission capacity, which is related to the ASE, using stochastic geometry tools. In these papers, the optimisation problems included outage probability constraints for the cellular and/or the D2D networks. Closed-form expressions for the density and the transmission power of the D2D users were derived. Ziyang et al. [13] formulate a similar optimisation problem to the one shown in [10], but solve it using an algorithm. Liu and Natarajan [14] maximised the ergodic capacity of the D2D network in an underlay scenario, and derived expressions for the optimum user density and transmission power of the D2D and the cellular users. Chour et al. [15] maximised the D2D link transmission rate while fulfilling requirements regarding the quality of service of cellular user, by keeping the average interference power at the eNodeB lower than a given threshold. Gou et al. [16] analysed the uplink of a single base station network, in which two pairs of D2D users reuse one channel allocated to a cellular user. The overall transmission rate of the network is then maximised. Pawar et al. [17] proposed an algorithm to find the optimum D2D transmit power that maximises the system throughput in a D2D underlay network. The authors consider power and signal-to-noise ratio (SNR) constraints of both D2D and cellular networks. The proposed algorithm outperforms random and fixed power allocation strategies. Di et al. [18] determined the D2D transmission power that maximises the individual D2D Shannon capacity, in a single base station scenario. Liu et al. [19] obtained the optimum D2D user density and transmit power that maximise D2D capacity under constraints related to cellular successful transmission probability.
The works aforementioned investigated the maximisation of either energy efficiency or spectrum efficiency (or other related metric). However, as will be shown in the next sections, in general, these two performance metrics may be conflicting metrics, in the sense that the maximisation of one of them does not lead to the maximisation of the other one. This has motivated the analysis of wireless networks from the perspective of both efficiency metrics, and some works found in the literature study the relationship between these two metrics. For instance, Zhang et al. [20] studied the trade-off between energy efficiency and spectral efficiency (SE) of a D2D underlay cellular network under different vehicular environments. They formulated optimisation problems in which the objective function is one of the metric (EE or SE) while the other metric is taken into account as a constraint. They also studied the efficacy of this trade-off in terms of economic costs and benefits, using the so-called economic efficiency. Rao and Fapojuwo [21] investigated the energy and spectral efficiencies of a cellular network, and showed the existence of different regimes of network operation. Gao et al. [22] investigated the trade-off between EE and SE in a heterogeneous network with macro-and micro-base stations and D2D terminals. They studied the problem of channel and power allocation for cellular and D2D users, using a utility function of the trade-off between spectral and energy efficiencies. However, the resulting problem is shown to be rather complex, and a solution based on an iterative algorithm is proposed. Zhenyu et al. [23] employed a non-cooperative game to determine the optimum D2D and cellular transmission power levels that maximise the energy efficiency subjected to spectral efficiency, for both D2D and cellular networks. Finally, Bhardwaj et al. [24] determined the D2D transmit power that maximises the D2D energy efficiency in a multi-cast network. The optimum results are used to analyse the trade-off between area spectral and energy efficiency of the D2D network.
All the works aforementioned investigate energy and/or spectral efficiencies of a network with two or more classes of users sharing the RF channel. However, the work shown in the present paper has some differences when compared with those works. For instance, differently from the studies presented in [5, 8, 9, 15-18, 20, 23, 25], we study a multi-cell scenario using stochastic geometry, therefore taking into account inter-cell interference. The optimisation of D2D capacity presented in [10][11][12][13][14][15][16][17][18][19] is carried out with respect to the D2D user density and transmit power only, while we consider in addition the D2D transmission rate in the optimisation problem. In the works presented in [3-5, 7, 9], the authors maximise energy efficiency with respect to transmit power. We extend this analysis by considering additionally the density of users in the maximisation of EE, and, using this extension, we analyse the sensitivity of the optimum D2D energy efficiency to variations of some parameters of the D2D and the cellular network.
As already mentioned, in the present paper, we investigate the maximisation of energy efficiency and ASE of a D2D network, in a scenario in which D2D users share the RF channel with cellular users, by adjusting the density, the transmit power and the data rate of D2D users. The key restriction in these maximisation problems is that the optimised D2D network cannot cause excessive degradation to the cellular network. As we show in the following sections, this restriction can be satisfied by imposing that the product d × P 2∕ d is kept fixed, as proposed by Pimentel and Cardieri in [2]. In the present work, we extend the analysis presented in [2] by further investigating the behaviour of the D2D ASE. More specifically, we investigate the sensitivity of ASE to variations of the required quality of service of cellular users. Also, we investigate the maximisation of the energy efficiency of the D2D network and the interrelationship of these two efficiency metrics. In our analysis, we assume the Shannon capacity for both cellular and D2D links, leading to a more general formulation, which allow us to carry out a more insightful analysis of the effects of several parameters on the network performance.
The main contributions of this paper are summarised as follows: • We formulate and solve the energy efficiency and ASE maximisation problems, which resulted in closed-form analytical expressions for the optimal values of D2D user density, transmit power and bit rate. • We investigate the relationship between the maximum values of energy efficiency and ASEs, showing the existence of three operating regimes when we vary the minimum acceptable success probability of D2D transmissions. • We assess the effects of several network parameters on D2D ASE and energy efficiency. • We analyse the sensitivity of the ASE of the D2D network to variations of the quality of cellular transmissions. We show that, when the success probability of cellular transmissions is high, a slight reduction in this probability can significantly improve the ASE of the D2D network. • We also analyse the sensitivity of EE of the D2D network to the density of D2D users, to show that a small reduction in this density of users results in a significant improvement in the D2D energy efficiency.
The rest of the paper is organised as follows: in Section 3, we present the network model adopted in this work and the key performance metrics; in Section 4, we investigate the maximisation of ASE and energy efficiency of a D2D network sharing a RF channel with cellular users; in Section 5 we study the operating regime of the D2D network regarding energy and ASEs; results of numerical analysis are presented and discussed in Section 6; Section 7 concludes the paper.

Model description
We consider a cellular wireless network in which uplink channels are shared among cellular users and D2D users, operating under the underlay mode, as illustrated in Figure 1.
In any given cell of the network, there exists one cellular transmitter connected to the corresponding base station through one of the uplink channels of bandwidth B. D2D transmitters located in that cell use one of the uplink channels available in the cell, causing co-channel interference among cellular and D2D links. The following assumptions are made: 1. Cellular and D2D transmitters are distributed over an infinite two-dimensional plane according to two homogeneous PPP, denoted as Π c and Π d , with user densities c and d , respectively. 2. All cellular (resp. D2D) transmitters use the same transmit power P c (resp. P d ). The transmitter-receiver separation distances of the cellular (D2D) links, denoted by r c (resp. r d ), are assumed to be fixed. This assumption may be unrealistic in some scenarios, but it simplifies the analysis and does not affect the main conclusions of the work, as shown in [26,27]. links includes deterministic path loss, with path loss exponent > 2, and small-scale Rayleigh fading. Hence, the power levels of the signal at cellular and D2D receivers are where h x is the fading coefficient, exponentially distributed with unit mean. It should be noted that other fading models can be adopted (e.g. Nakagami fading, [28]), but in general leading to more intricate formulation. 5. The performances of both networks are assumed to be interference limited, and the thermal noise power is therefore negligible.
Transmissions are assumed to be successful if the signalto-interference ratio (SIR) of the received signal is larger than given thresholds c and d , for cellular and D2D transmissions, respectively. Therefore, the D2D and cellular successful transmission probabilities, denoted by P s,d and P s,c , measured at typical receivers, are given by [29], where = 2∕ , = ∕[2 sin( )], d = 2 r 2 d d , and c = 2 r 2 c c . According to Slivnyak's Theorem [30], the performance of the typical link can be used to evaluate the performance of all the other links in the network.
As a final remark, in this work we do not exploit the effects of packet re-transmissions, and the resulting packet delay, caused by unsuccessful transmissions.

Area spectral efficiency and energy efficiency
The performance of the D2D network is evaluated in terms of its ASE and energy efficiency. The ASE is defined as the average throughput per bandwidth unit and per unit area, considering only bits successfully transmitted [31]. In this work, we assume that the D2D transmission rate is equal to the link Shannon capacity, given by B log 2 (1 + d ). Therefore, the ASE of the D2D network, denoted by ASE d , is expressed as The ASE defined in (3) is sometimes referred to as the network potential throughput and, as pointed out by AlAmmouri et al. [32], captures the scenario in which information is transmitted at a fixed rate. Note, therefore, that transmissions in which the SIR exceeds d are not exploited.
The energy efficiency is defined here as the ratio of the ASE and the average total power spent per unit area. Thus, for the D2D network, the energy efficiency, denoted by EE d , is Note that as in other similar works (see, e.g. [3,4]), we do not consider the circuit power when evaluating the power spent to transmit messages.
It should be noted that the threshold d defines the link bit rate of successful transmissions. Therefore, d is one of the variables in the maximisation of ASE d .

The D2D performance maximisation strategies
We are interested in maximising the performance of the D2D network but keeping under control the degradation caused by D2D transmissions to the cellular network performance. More specifically, we want to maximise separately ASE d and EE d , by adjusting some D2D network parameters, but keeping the cellular successful transmission probability P s,c above a given minimum acceptable level.
The maximisation of ASE d and EE d are carried out using different approaches. For the maximisation of ASE d , we use the strategy proposed by Pimentel et al. [2], summarised as follows. Expression (2) shows that the interference caused by D2D transmissions to cellular links is expressed by the term d × P d . This means that, if we keep this product fixed while maximising ASE d , the cellular successful transmission probability remains unaffected. Therefore, if the minimum acceptable cellular successful transmission probability is c , then we guarantee the condition P s,c ≥ c is satisfied by imposing the restriction where, using (2), Hence, according to (5), d and P d cannot be adjusted independently, and the maximisation of ASE d should involve either d or P d . For convenience of mathematical manipulation, d is chosen to be the independent variable, together with the SIR threshold d .
Note that the constant C 0 is a measure of the opportunity available in the network to accommodate D2D transmissions, without disturbing cellular transmissions, and depends only on the cellular network parameters. If the value of C 0 evaluated from (6) results negative, then no D2D transmission can be allowed without violating the condition P s,c ≥ c . Therefore, we assume here that C 0 is always strictly positive.
Based on the discussion above, we can use P d = (C 0 ∕ d ) 1∕ to rewrite the expressions of ASE d and P s,d as and where and 1∕ to rewrite the expression of EE d presented in (4), resulting in However, EE d is not an increasing function of C 0 . In fact, the derivative of (10) with respect to C 0 is where = B log 2 (1 + d ), and can be positive, negative or zero. Therefore, the maximisation of the D2D energy efficiency will be carried out by explicitly adjusting the D2D user density d and transmit power P d , using the original expression (4).
In the next sections, we formally present and solve the maximisation of ASE d and EE d by adjusting d , P d , and d . The maximisation of ASE d and EE d will be carried out independently in Sections 4.1 and 4.2, respectively. Then, in Section 5 the interrelationship between the maximum values of ASE d and EE d is investigated.

MAXIMISATION OF AREA SPECTRAL EFFICIENCY AND ENERGY EFFICIENCY
The expression (8) shows that the D2D successful transmission probability P s,d is affected by the optimisation variables d and d , meaning that the resulting value of P s,d when ASE d or EE d are maximised may end up being excessively low. Therefore, we impose in the maximisation problems the additional constraint P s,d ≥ d , where d is the minimum acceptable D2D successful transmission probability.
For ease of presentation and clarity, we show throughout the next sections some numerical examples, using the parameter setting presented in Table 1. These values are consistent with those used in similar works found in the literature [1,[33][34][35].

Maximisation of the D2D area spectral efficiency
Before delving into the details of this maximisation problem, let us briefly analyse the behaviour of ASE d as a function of d and d . Figure 2 shows the ASE d and the location of its maximum value. In Appendix A, we proof that ASE d is a nonconcave function.
According to the Weierstrass Theorem [36], if a real-valued function f (x) is continuous in the closed and bounded interval x ∈ [a, b], then f (x) must attain a maximum and a minimum. Therefore, in order to solve the problem of maximisation of ASE d , we first need to define its domain as an appropriate closed and bounded set, as presented next. As far as the SIR threshold d is concerned, we know that this variable must be larger than zero and cannot be infinite. Therefore, d will be defined in the range l ≤ d ≤ u , where l > 0 and l < u < ∞. The domain of d is determined by recalling that the constraint P s,d ≥ d must be guaranteed, which, according to (8), is achieved by keeping Based on the above, Proposition 1 is presented.
The D2D ASE ASE d must attain an absolute maximum and an absolute minimum.
The ASE d maximisation problem can be expressed as follows: Note that the restriction P s,c ≥ c is incorporated into the maximisation problem formulation by choosing appropriate values of C 0 and C 1 , according to (6) and (9), respectively.
The optimal solution to problem (12) is given in Theorem 1.

Theorem 1.
Given the interference-limited underlay D2D cellular network described in Section 3, the optimal solution ( * A , * A ) to the optimisation problem presented in (12) is given by * and * where Ω is defined as 1 and W 0 (.) is the principal branch of the Lambert function. 2 1 This result was previously obtained by Zaidi et al. [37] and Haenggi [38]. 2 The Lambert function Proof. See Appendix A. □ Note that * A depends only on the path loss exponent . Also, since W 0 (.) in an increasing function, and its argument in (15) is an increasing function of as well, then we can easily show that * A is strictly positive for > 2 and is an increasing function of . This behaviour of * A can be explained by recalling that larger imposes a stronger isolation among links, reducing mutual interference and allowing higher transmission rates in the network.
By applying (13) and (14) in (7), we obtain the maximum ASE, given by Also, using (13) in (8), the success probability at the optimum ASE is The optimal D2D transmit power P * A is obtained by combining (14) and (5), resulting in A closer look at expressions (14), (16)- (28) reveals that the restriction on the successful transmission probability is active only when e −1 ≤ d < 1. In this case, ASE * d decreases as d increases, since d ln(1∕ d ) is an decreasing function in the range e −1 ≤ d < 1. Also, we see that the optimum D2D user density * A and power level P * A are decreasing and increasing functions of d , respectively, in this range of d . These behaviours of * A and P * A can be explained noting that the two constraints in the maximisation problem (12), that is, P s,c ≥ c and P s,d ≥ d , are somewhat conflicting to each other. The first constraint imposes that both * A and P * A should be kept as low as possible. On the other hand, in order to satisfy the constraint P s,d ≥ d , the D2D transmit power should be made sufficiently high, forcing the D2D density to be reduced (recall that the product d P d should be kept fixed). The balance between these two constraints leads to the observed behaviour of * A and P * A . On the other hand, for 0 < d ≤ e −1 , ASE * d is not affected by the minimum acceptable successful probability d . However, for this range of d , the successful transmission probability at the optimum point is P s,d = e −1 ≈ 37%, which is excessively low for any practical interest.
It is worth noting that (14) can alternatively be rewritten as * where c = c ∕ ln(1∕ c ), d = d ∕ ln(1∕ d ), and d = * A . A more detailed analysis of the behaviour of ASE * d is presented in Section 6.

Maximisation of the D2D energy efficiency
Now, we turn our attention to the problem of maximisation of the energy efficiency EE d . As discussed in Section 3.3, the maximisation of EE d cannot follow the same approach adopted to maximise ASE d , since EE d is not an increasing function of C 0 . In addition, the maximisation of EE d with respect to d , P d , and d has shown to be a very complex problem, with a larger number of cases, preventing us from deriving closed-form expressions. This motivated us to follow an alternative approach, in which we assume that D2D terminals transmits at a given constant rate B log 2 (1 + d ), with d > 0, and EE d is maximised with respect to d and P d . As in the maximisation of ASE d , we impose constraints on the successful transmission probabilities of D2D and cellular users, that is, P s,d ≥ d and P s,c ≥ c . In addition, as the energy efficiency decreases with the user density, we set a minimum value allowable for d , that is, we impose the restriction d ≥ min . By setting this minimum allowable density of D2D users, we will be able to analyse the effects of min on the overall performance of the network.
Then, the EE d maximisation problem is presented as Using again the Weierstrass Theorem, as in Section 4.1, we guarantee that there exists an absolute maximum in (20). For this reason, we show that the domain of (20), which is defined by constraints C1, C2, and C3, is a closed and bounded set. From constraints C1 and C2 in (20), the D2D transmit power must be restricted to Expression (21) is only feasible if its upper limit is large than the lower one, that is, The solution to problem (20) is presented in Theorem 2.

Theorem 2.
Given the interference-limited underlay D2D cellular network described in Section 3, the optimal solutions ′ E and P ′ E to the problem presented in (20) are where a = e −(1∕ + min d ) and b = min{1, e −(1∕ + min d −1) }.
Using (22) and (23) in (1), the successful transmission probability at the maximum energy efficiency is A closer look at expression (24) reveals that the optimum D2D energy efficiency EE ′ d depends on the optimum density of the D2D users min , over all the range of values of the D2D success probability P ′ s,d,E . By taking the derivative of EE ′ d with respect to min , it is possible to see that EE ′ d decreases as min increases. In contrast, EE ′ d depends on the minimum acceptable successful transmission probability d only when a < d ≤ b . By analysing the derivative of EE ′ d with respect to d , two conclusions can be drawn: (i) when a < d ≤ b , EE ′ d decreases as d increases; (ii) when 0 < d ≤ a , EE ′ d is not affected by d . Finally, note that when 0 < d ≤ a , then P ′ s,d,E < e −1∕ , which is not of practical interest.
In Section 4.1, we showed that, for d ≥ e −1 , we can increase ASE * d by allowing a lower minimum acceptable successful transmission probability d . On the other hand, expression (24) shows that it is possible to increase EE ′ d by decreasing d when the D2D success probability threshold value satisfies d ≥ a , where a depends on the parameters of the D2D network. Therefore, the ranges of values of d over which the tradeoffs d × ASE * d and d × EE ′ d exist can be different. This issue will be addressed in Section 5.2 when analyzing the trade-off between the maximum of ASE d and EE d .

D2D NETWORK OPERATING REGIMES
In this section, we jointly analyse the trade-offs between the ASE and the energy efficiency of the D2D network, using the results presented in previous sections.
However, we must revisit the maximisation of ASE d , now to carry out this maximisation problem with respect to d and P d only, as done in the maximisation problem of EE d . Therefore, we now assume that the D2D terminals are transmitting at a given bit rate B log 2 (1 + d ), that is, the SIR threshold d is given.

Maximisation of ASE d with respect to d and P d
The maximisation problem of ASE d with respect to d and P d is where ASE d is given by (7). Note that since the condition d P d ≤ C 0 must hold, the maximisation of ASE d is with respect to d only. Theorem 3 presents the solution to problem (26).

Theorem 3. Given the interference-limited underlay D2D cellular network described in Section 3, the optimal solution ′
A to the problem presented in (26) is ln (1∕ d ) By substituting (27) into (5), we obtain (27), then ′ A = * A , given by (14) or (19). Therefore, the way the optimum D2D density varies with the threshold d does not depend on whether this threshold was optimised or not.
Substituting (27) and (28) into (7), we obtain the corresponding maximum ASE, denoted by ASE ′ d , given by In the following subsection, we jointly analyse EE ′ d and ASE ′ d . To carry out this analysis, we set min = ′ A and, using (23), determine the corresponding D2D transmission power that maximises EE ′ d .

A
In this section, we analyse the relationship between the maximum values of energy and ASEs, when we set min = ′ A , with focus on the case of reasonable values of d . To evaluate EE ′ d and ASE ′ d , we need to determine the respective transmit power levels P ′ E and P ′ A , using (23) and (28), respectively. However, a closer look at these two expressions shows that the limits of the ranges of d are different. Therefore, we first need to analyse the relationship between (i) the lower limits (i.e. a and e −1 ) and (ii) the upper limits ( b and one).
To analyse the relationship between the limits, let us define where we use the value of ′ A for the case d = e −1 (see (27)), and where now we use the value of ′ A for the case d > e −1 . In equality (a) we use the restriction ′ b ≤ 1, while (b) results from the fact that exp[(1∕ − 1)∕(1 − c c )] ≥ 1 always holds.  Table 1 Figure 3 shows ′ a as a function of the path loss exponent . For reference, the curve d = e −1 is also presented. Two regions of values of can be identified: Region 1, for which ′ a ≥ e −1 , and Region 2, for which ′ a < e −1 . Within each of these regions, six sub-regions ((a)-(f)) are defined. Based on the analysis of these sub-regions presented next, we determine the values of D2D transmit power that maximises the energy efficiency.

Region 1: This region is defined by the values of for which ′
a ≥ e −1 . Therefore, this region is physically feasible if the inequality exp[−(1∕ − c c + 1)] ≥ e −1 holds (using the definition of ′ a ). In addition, the D2D density must be strictly positive, leading to a second inequality that must hold (using (19)): [1 − c c ] ≥ 0. We can easily show that these two inequalities cannot be satisfied simultaneously, meaning that Region 1 is not physically feasible. 2. Region 2: Three sub-regions are defined, namely (d-f). Using (19) and (23), the values of ′ E and P ′ E that maximise the energy efficiency in each of these sub-regions are presented in Table 2.
The values of { ′ E , P ′ E } presented in Table 2 maximise the energy efficiency for the whole range of minimum acceptable D2D successful transmission probability. On the other hand, the values of { ′ A , P ′ A } that maximise the ASE are given by (27) and (28), recalling that we have set ′ E = ′ A . Now, using (28) and the expressions in Table 2 Note that for reasonable values of minimum acceptable D2D success probability, that is, d > e −1 , the same D2D transmit power maximises both the area spectral and the energy efficiencies. On the other hand, for d ≤ e −1 , it is easy to show that P A ∕P ′ E ≥ 1. Overall, (30) shows that, for the same D2D density, maximising the ASE requires a transmit power that is larger than or equal to the transmit power required to maximise the energy efficiency. In the sequel, we analyse the impact of the threshold d on ASE ′ d and EE ′ d .

Analysis of the operating regimes of
Using the expressions in Table 2, we show in Figure 4 the behaviour of EE ′ d and ASE ′ d as d varies from zero to one (starting at the right-hand side end of the curve).
Based on this figure, three operating regimes of the network can then be identified: • Regime I: This regime corresponds to the range d ∈ (0, ′ a ] and, according to (30) Note that under Regime III the D2D network operates with a reasonable successful transmission probability, but at the expense of reduced energy and ASEs. Therefore, when d is high, the resources transmit power and spectrum are underutilised, since neither ASE d nor EE d reaches their maximum possible values. Interestingly, in Regime III ASE d and EE d reach simultaneously their maximum values, that is, Figure 4 also shows that ASE ′ d and EE ′ d can be improved if we allow the D2D network to operate at a smaller successful probability d , corresponding to Regimes I and II. However, these regimes have little practical interest, since P s,d ≤ e −1 .
It should be noted that the curve ASE ′ d × EE ′ d presents the same behaviour for other values of path loss exponent.

NUMERICAL ANALYSIS AND DISCUSSIONS
In this section, we analyse the performance of a D2D network operating in the scenario presented in Section 3, using the formulation derived in previous sections. Unless otherwise specified, the parameter setting for this numerical analysis is presented in Table 1, which is consistent with that used in similar works found in the literature [1,[33][34][35]. The validation of some theoretical results was carried out by means of simulation. Each simulation result is the average of at least 3 × 10 4 realisations of the corresponding PPP, in a square area of 900 km 2 .
We begin by presenting in Figure 5a ASE d as a function of d when the SIR threshold is adjusted to its optimum value * A using (13), for different values of path loss exponent . The corresponding curves of the D2D successful transmission probability are shown in Figure 5b. Simulation results are also presented, showing the agreement between theoretical and simulation results. Also shown in these figures are the unrestricted and restricted (for d = 0.9) optimum values ASE * d and the corresponding values of successful transmission probabilities. Table 3 summarises the results presented in Figure 5, for = 3.5. The optimum SIR threshold is * A = 3.94 dB, regardless of whether the restriction on the successful transmission probability is active or not, corresponding to a D2D link spectral efficiency of log 2 (1 + * A ) = 1.80 b/s/Hz. The results in Table 3 show that the restriction on the successful transmission probability imposes that fewer secondary terminals are allowed to transmit (in this particular scenario, about 10 times fewer terminals), but using higher transmit power (roughly 50 times higher). Therefore, the transmission power increases faster than the user density decreases. This can be explained by recalling that the product d P d must be kept fixed and that the exponent = 2∕ is always less than unit, causing the faster increase in P * A .  It is interesting to note that the restriction on the D2D successful transmission probability imposes that the density of D2D terminals should be reduced (accompanied by an increase in the D2D transmit power), instead of the other way around. This indicates that, in order to maximise the ASE of the network, while keeping the success probability under control, it is better to have fewer active links transmitting at higher power and, consequently, higher bit rate.
As a final remark regarding Figure 5a, we note that higher path loss exponent leads to higher ASE. This can be explained by the fact that a higher path loss creates stronger isolation among links, allowing for a larger number of concurrent links in the network, transmitting at higher rates. In Figure 5a and b, we have considered the range 3.5 ≤ ≤ 5, in order to better understand the effects path attenuation on network performance. Besides, this range of has been observed in several real-world scenarios [39].

Sensitivity analysis
In this subsection, we analyse the sensitivity of ASE ′ d and EE ′ d to variations of some network parameters. We begin with the sensitivity of ASE ′ d to variations of d and c , by taking the derivatives of ASE ′ d with respect to these two parameters, for e −1 ≤ d < 1 (i.e. for reasonable values of d ), resulting in (after some manipulations) and At this point, it is important to recall that C 1 depends on c (see (6) and (9)). Since the right-hand sides of (31) and (32) are always negative, we conclude that ASE ′ d decreases as d or c increases. Also, the absolute value of the right-hand side of (31) increases as d increases, meaning that ASE ′ d becomes more sensitive to variations of d as d increases. Similarly, for c > e −2 ≈ 13%, the absolute value of the right-hand side of (32) increases with c . This result suggests that for high values of c , which is typically the case of practical interest, it could be a good strategy to slightly reduce the quality of cellular transmissions in terms of successful transmission probability, to significantly improve the ASE of D2D users. This behaviour of ASE ′ d is illustrated in Section 6.2, when we present some numerical results.
We now turn our attention to the maximum energy efficiency. In Section 5.2, we concluded that by setting ′ E = ′ min we maximise EE ′ d . In the following, we investigate the sensitivity of EE ′ d to variations of ′ E . To do so, we recall from sensitivity theory [40] that EE ′ d ∕ ′ E = − , where is the Lagrange multiplier associated with the constraint d ≥ min (see Appendix B). Therefore where T = ln(1∕ d ) + c c − 1. From (33), we note that as the cellular density c or transmit power P c decreases, the optimum D2D energy efficiency becomes more sensitive to changes in the D2D user density ′ E . Note also that EE ′ d ∕ ′ E is always negative, meaning that EE ′ d increases as ′ E decreases. The dependency of the variation of EE ′ d on the density of cellular user density c can be seen in Figure 6,  . This result suggests that it could be a good strategy to reduce the D2D density of users, harming a bit the D2D ASE, to significantly improve the D2D energy efficiency. Physically, this can be achieved by blocking transmissions from some D2D users, allowing the use of a considerably smaller D2D transmission power to achieve the same successful transmission probability.

Comparison with other approaches
As discussed in Section 2, several authors have investigated the maximisation of the network capacity when two or more networks share the same channel. In the following, we compare our results and approach with those presented in references [10,11,13,19], whose works we considered to be the closest ones to our work, in addition the the fact they network models are similar to ours. In the aforementioned works, the authors optimise the D2D capacity defined as C d = d P s,d , that is, the link transmission rate is not taken into account and, therefore, the threshold d is not optimised. Therefore, we can compare our results in terms of ASE d with those presented in aforementioned references by simply making removing the term B log 2 (1 + d ) from our results. Table 4 summarises the scenarios considered in references [10,11,13,19], that is, constraints and optimisation variables.
Using the parameter setting presented in Table 1 and d = 0.9 (when applicable), we show in Figure 7 the maximum D2D capacities according to the approaches proposed in [10, 11, 13 19], along with our results, denoted by C * d . First of all, we note that the maximum achievable capacity using the approach presented in [19], denoted by C * d,d , is Optimum D2D capacity as a function of the minimum tolerable cellular success probability c , using the approaches proposed in [11] (C * d,a ), [13] (C * d,b ), [10] (C * d,c ), [19] (C * d,d ), and our strategy (C * d ) exceeded by the results obtained using the other approaches. This worse performance shows the importance of adjusting the transmit power when maximising the network capacity, as in [19] only the user density is optimised. Figure 7 shows that there exists agreement between the maximum capacity achieved with our strategy and the results obtained using the approaches in [11] and [13]. We should note, however, that the approach proposed in [13] is based on an iterative algorithm, while the approach presented here led to closed-form expressions for the optimum D2D density and transmit power.
We can also see in Figure 7 that for c ≲ 0.84, the optimum D2D capacity obtained with the approach presented in [10] is higher than those obtained using the other approaches. This higher capacity is explained by the fact that in [10] the formulation does not impose a minimum acceptable success transmission probability for D2D transmissions.
Regarding energy efficiency, we compare our approach with that presented by Yang et al. [4], whose constraints and optimisation variable are summarised in Table 4. While in [4] EE d was maximised only with respect to the D2D transmit power, in our work we additionally considered the D2D density of users as an optimisation variable (see Problem (20)). By doing so, we were able to find the operating regimes discussed in FIGURE 8 Maximum D2D energy efficiency as a function of the minimum acceptable D2D success probability, using the approach presented in [4] (EE * d,a ) and our approach (EE ′ d ). Network parameters adjusted according to Table 1 Section 5.3. Besides, using the Lagrange multiplier associated with d in Problem (20), we studied the sensitivity of the maximum D2D energy efficiency.
For comparison purposes, we show in Figure 8 the maximum energy efficiency obtained using our approach (EE ′ d ) and that obtained using the approach in [4], denoted by EE * d,a , for d = ′ A . Since the parameter settings in both problems are the same, the results agree with each other, as shown in the figure.
To conclude this section, we return to Figure 7 to illustrate the sensitivity of ASE ′ d to variations of c , as discussed in Section 6.1. We first recall that C * d shown in this figure is proportional to ASE ′ d , since the term B log 2 (1 + d ) is kept fixed here. We can see in Figure 7 that the rate of variation of C * d increases as c increases, which is in line with our conclusion regarding the sensitivity of ASE ′ d to variations of c . Also, the zoomedin portion of Figure 7 shows that by reducing c from 95% to 94%, we increase C * d in approximately 200%, illustrating the conclusion presented in Section 6.1 that, when the cellular link quality is high, a small degradation in this link quality may result in a significant increase in the capacity of the D2D network.

CONCLUSIONS
Here, we analysed the problem of maximisation of the energy efficiency and the ASE of D2D communication in an underlying cellular network. We derived expressions for the optimal D2D user density, transmission power, and transmission rate, subjected to minimum acceptable successful transmissions probabilities for D2D and cellular transmissions. Our analysis showed the existence of three possible operating regimes for the D2D network, according to the behaviour of its energy efficiency and ASE as the D2D minimum acceptable successful transmission probability varies. We showed that for values of successful transmission probability of practical interest, the energy efficiency and the ASE of the D2D network are maximised at the same values of user density and transmit power of the D2D network.
We also analysed the sensitivity of ASE (resp. EE) of the D2D network to variations of the D2D link quality (resp. density of D2D users). Based on this analysis, we proposed strategies to improve the performance of the D2D network. (2)  We can show that, using L'Hôpital's rule, if d → 0 or d → ∞ (cases C2, C3, C4, and C5), then ASE d → 0, which, obviously, is not of practical interest. Therefore, we have the next two critical points, given by cases C6 and C7: Next, in order to check if these two critical points lead to strict global maximum points of ASE d , we verify if the Hessian matrix of the Lagrangian function, given by (A.3), evaluated at these critical points is definite positive, that is, if the leading principal minors of this matrix are always positive.
• Restriction on P s,d is not active: The first leading principal minor of the Hessian matrix of the Lagrangian function in this case is Δ u,1 = M 1 , with M 1 evaluated at d = Even though Δ u,2 (not shown here for brevity) is a function of only, finding the condition that guarantees that Δ u,2 > 0 is not trivial. However, we can show that Δ u,2 for > 2 is always positive (not shown here for brevity). Therefore, the critical point ( A . Again, finding the values of that guarantee Δ r,2 > 0 is not trivial and we have resorted to numerical analysis (not presented here for brevity) to show that Δ r,2 is always positive for a large range of > 2 and e −1 < d < 1. Therefore, the critical point given by (u) d and (A.7) corresponds to a strict local maximum. Note that if d = 1, then Δ r,2 = 1. However, d = 1 is only achieved when d = 0 or d = 0, both corresponding to invalid practical situations and, therefore, of no interest.
Since the second-order sufficient conditions are satisfied, and the domain is a compact set, then we conclude that the critical points ( where 0 < d ≤ 1 and 0 < c ≤ 1. The objective function of (B.1) is not convex or concave in the entire domain of P d and d . Then, (B.1) is not a convex optimisation problem. However, as mentioned in Section 4.2, the Weierstrass Theorem guarantees the existence of a maximum global in (B.1).
In the following, we find the maximum global of (B.1). The corresponding Lagrangian function is 2) The first-order necessary optimality conditions are: Next, to check if the two critical points of cases (6) and (7) are the global minimum values of −EE d , we verify the secondorder sufficient condition of each critical point, which is given by T Δ 2 L( d , P d ) > 0, where L( d , P d ) is the Hessian matrix of (B.2) evaluated at each critical point { d , P d } of the cases (6) and (7). Besides, is the solution to the system of equations where Δg i ( d , P d ) is the gradient of each inequality active constraint of the corresponding critical point. Note that in our optimisation problem, we have three inequality constraints, namely g i , i = 3. However, in each critical point, there are different active constraints, treated as follows