Spectrum-Aware Energy Efficiency Analysis in K -tier 5G HetNets

: In future multi-tier cellular networks, cognitive radio (CR) compatible with device-to-de-vice (D2D) communication can be an aid to enhance system spectral efficiency (SE) and energy efficiency (EE). Users in proximity can establish a direct connection with D2D communication and by-pass the base stations (BSs), thereby offloading the network infrastructure and providing EE improvement. We use stochastic geometry to model and analyze cognitive D2D communication underlying a multi-tier/multi-channel cellular network where the D2D transmitters are capable of harvesting RF energy from ambient interference resulting from simultaneous cellular downlink transmissions. For further improvement in EE, small cells (SCs) can be put into a power-saving mode by specifying a load-dependent transmission power coefficient (TPC) for SC BSs. In addition, to consider practical D2D communication scenarios, we propose a wireless video sharing framework where cache-enabled users can store and exchange popular video files through D2D communication. We investigate the potential effects of the TPC and the introduced D2D layer on the network EE and SE. We will also observe that the energy-harvesting CR-based D2D communication network design will not only ease the spectrum shortage problem but will also result in a greener network thanks to its reliance on ambient energies.


Introduction
Traditional designs in cellular networks have concentrated on spectral efficiency (SE) or on achieving some quality of service (QoS) criteria rather than enhancing energy efficiency (EE) [1,2]. More recently, however, with the rise in the use of wireless data applications, EE has become one of the key design considerations for next-generation 5G/6G systems to accommodate the ever-increasing demand for traffic with the desired QoS, to mitigate operational costs, and also to limit greenhouse gas (GHG) emissions from wireless cellular networks [2]. Indeed, energy costs and the carbon footprint, together with the exponential rise in mobile subscribers, have led to an emerging research field called "green cellular networks", which aims to address EE amongst network operators and regulatory organizations. The key objective of developing green cellular networks is therefore to minimize overall energy consumption and hence to reduce GHG emissions without a substantial change in throughput, as opposed to traditional communication systems, where the only consideration is to attain optimum throughput. With the evolution to Long-Term Evolution (LTE) and 5G, the cellular network has developed as a multi-tier network that comprises a conventional cellular network (i.e., macrocell network) with multiple low-power base stations (BSs) (i.e., small cells (SCs)). Massive use of SCs in such heterogeneous networks (HetNets) is one of the promising techniques to cater for the ever-increasing huge demand for future wireless data. Several studies on energy-efficient

Related Work
One way to enhance EE in a HetNet is to turn off or hold the SC BSs in energy-saving mode while retaining the user-experienced QoS. Notice that it is difficult to terminate the operation of a macro-BS (MBS) since the coverage of an MBS is wide, meaning that the effect of switching off would be enormous. In our previous work [11], in a stochastic geometry-based HetNet, we proposed a fuzzy Q-learning-based energy-efficient sleep/wake-up mechanism for BSs. The aim was to save energy by switching off the redundant BSs according to the local traffic profile and based on the required area coverage and cell EE, without compromising the provided QoS. Sleep/wake-up mechanisms were also investigated in [12][13][14] in stochastic geometry-based HetNets. In [12], both random and dynamic (i.e., traffic load-based) sleep policies for MBSs were proposed by the authors. In fact, to develop the optimal sleeping strategy for MBSs, they considered EE maximization. In [13,14], random sleep/wake-up mechanisms were also evaluated for BSs. The optimum probability of switch-off for MBSs was obtained in [13], based on the minimization of BS energy consumption. In [14], the authors suggested the energy-efficient design of a two-tier HetNet by incorporating an activity-conscious sleeping technique in cognitive MBSs and femto-BSs (FBSs). Indeed, with different sleeping strategies for the BSs, they used stochastic geometry to obtain the coverage probability, overall power consumption, and EE of the network. Several multilevel sleep modes were suggested in [15][16][17][18] instead of traditional sleep/wake-up (i.e., OFF/ON) strategies. Two power-saving techniques were proposed by IEEE 802.16 m [15], i.e., sleep mode for user equipment (UE) and low duty operating mode for FBSs. In [16], for a heterogeneous mobile network, active, listening, and sleep schemes were used. Four sleep modes were further proposed in [17], which jointly optimize the power usage and wake-up time in a femtocell network. In [18], in a HetNet where SC BSs have four different power-saving modes, the authors attempted to quantify the trade-off between energy consumption and throughput. BSs (particularly MBSs) cannot be flexibly turned off under the traditional network architecture due to the coverage guarantee requirement. Instead of the traditional sleep/wake-up mechanisms, a continuous power control/adjustment mechanism for SC BSs can be considered to tackle this problem, which is much simpler than switching OFF/ON SC BSs from the perspective of implementation. This can be accomplished by specifying for SC BSs a load-dependent transmission power coefficient (TPC) (0 ≤ ≤ 1). In fact, a power control/adjustment mechanism can be viewed as a generalization of sleep/wake-up strategies, where BSs may go into sleep and wake-up modes as special cases when = 0 or = 1, respectively.
In the context of D2D communication, D2D has recently received considerable research interest owing to its planned incorporation into future releases of LTE-Advanced (LTE-A) in future 4G and 5G cellular systems. Owing to the spectrum multiplexing in D2D underlying a network [19,20], there is no doubt that network throughput would certainly improve. The effect of D2D on the network energy consumption is, however, still open to study. In this work, it will be seen how D2D communication will affect the network EE. In addition, to consider D2D requirements under the practical application scenarios and relevant business requirements, we use a wireless video sharing framework where users can store popular video files and exchange files through D2D communication. Cache-enabled D2D transmission implies that data can be cached at the terminal devices for content sharing through D2D [21][22][23][24][25].
Few studies have exploited cognition in cache-enabled D2D communications underlying multi-tier cellular networks. In other words, modeling and analyzing the performance of multi-tier/multi-channel cellular networks embedded with the cognitive and cache-enabled D2D communication have not been investigated enough. In [10], the authors exploited cognition for assistance-free communication. Without the aid or supervision of the BS, the D2D transmitter and receiver can create a direct communication link via the PC5 interface, which is specified by the LTE standard. For CR-assisted D2D communications in a cellular network where devices sense the spectrum based on energy detection, a mixed overlay-underlay spectrum sharing approach was proposed in [26]. In [27], considering a constant D2D link distance and single-tier cellular network scenario, the cognitive D2D transmitters can communicate through the cellular channel with the harvesting energy from ambient interference. They investigated two strategies for spectrum access, namely, random and prioritized spectrum access policies. In [28], the authors introduced cognition to femto access points to exploit the idle channels of the MBSs via spectrum sensing, avoiding severe interference. The authors of [29] applied the spectrum trading method to the coexisting cognitive D2D and cellular network system, inspired by game theory and learning algorithms. Note that the majority of these works ignore the imperfections associated with spectrum sensing. It is important to note that, as common to all schemes, errors in the form of false alarms and misdetections occur in spectrum sensing, and such errors can lead to degradation in the performance.
Recently, owing to its simplicity in providing energy self-sufficiency for a low-power communication system [7], the harvesting of energy from ambient RF signals has gained growing interest. With recent advancements in the technology of low-power devices in both industry and academia, the harvesting of energy from RF signals is expected to provide a technically feasible solution for future applications, particularly for networks with low-power devices. However, the research of EH-aided D2D links is in its infancy, despite having a few pioneering studies [27,30]. Specifically, in a traditional single-tier macrocell deployment, Sakr and Hossain [27] proposed beneficial spectrum access policies for RF EH-aided cognitive D2D communication (with constant D2D link distance) underlying the uplink and downlink channels. Liu et al. [30], on the other hand, designed wireless power transfer policies for D2D communication underlying a cognitive cellular network, where wireless energy is harvested from power beacons and secure transmission is carried out using the spectrum of the primary BS. Note that most of these studies analyze the impact of RF EH on the SE, while its impact on the network EE is not considered. Based on the above discussions, the key contributions in this paper are summarized as follows: • We use tools of stochastic geometry to model and analyze D2D communication underlying a multi-tier and multi-channel cellular network where the D2D transmitters are capable of harvesting RF energy from ambient interference arising from concurrent cellular downlink transmissions. Note that we analyze the impact of RF EH on both the SE and EE of the D2D-aided HetNet. In addition, we propose a framework for wireless video sharing to consider D2D requirements under realistic application scenarios and specific business requirements, where users are equipped with cache memory to store popular video files and exchange files through D2D communication.

•
Our analysis is conducted for two D2D spectrum sharing scenarios (will be discussed later): overlay and underlay in-band D2D. In underlay in-band D2D, we consider cognitive D2D communication, where cognition is integrated into the cache-enabled D2D communication underlying the multi-tier/multi-channel cellular network. Specifically, by incorporating CR techniques, the cache-enabled D2D transmitter performs spectrum sensing to provide opportunistic access to a predefined non-exclusive D2D channel. As common to all schemes, errors in the form of false alarms and misdetections occur in spectrum sensing, and such errors can lead to degradation in the performance. Thus, the impact of sensing errors by the D2D transmitters is studied in our work.

•
Considering the described model, we use tools from stochastic geometry to evaluate the performance of the proposed communication system model in terms of SE and EE. In general, we derive simple and closed-form expressions for the coverage probability of cellular and D2D users under the overlay and underlay in-band D2D, and also the probability of harvesting sufficient energy is obtained; finally, the EE expression of the cache-enabled cognitive D2D-aided HetNet with EH is derived. In our derivations, in contrast to previous related studies in which a traditional single-tier macrocell deployment is assumed, we consider a cellular network that consists of tiers of BSs with distinct and general network parameters in each tier, which enables us to discover further insights into the behavior of the SE and EE in dense HetNets. Furthermore, unlike those works, in our analysis, we consider more general D2D scenarios by randomly modeling the distance between D2D pairs instead of assuming a fixed distance between the pairs. • The possible impact of the TPC (identified for SC BSs) as well as the D2D layer added on the network EE and SE will be studied. Furthermore, we demonstrate that EH can effectively power D2D communications underlying cellular networks. A higher SE under various parameter settings of the proposed system model is also corroborated. Finally, we will observe that cognitive channel access will help to increase the QoS of D2D users under the same network conditions as in the non-cognitive situation. As will be shown in the simulations, the proposed framework brings a considerable advantage in terms of EE and SE. More specifically, the power control/adjustment strategy of SCs, the caching placement, D2D establishment, and cognition and EH capabilities altogether can lead to a considerable improvement in the achieved network EE and SE.

Network Topology
We assume a stochastic multi-cell network topology (as in [11,[31][32][33]) for a -tier HetNet consisting of a macrocell tier overlaid with an extremely dense tier of SCs with underlying D2D communications. The spatial distribution of BSs of all tiers is assumed to be captured using collocated and independent homogeneous Poisson point processes (HPPPs), i.e., Φ with intensity λ ( ∈ = {1, … , }). Similarly, according to another independent HPPP Φ with density , users are spread across the area. Users are grouped into two categories: regular UEs, with density , and cache-enabled D2D UEs, with density = − . The former do not have the caching ability, whereas the latter are cache-enabled. The transmit power of BSs of tier and users are also assumed to be and , respectively. Furthermore, we consider an open access network where a user can unrestrictedly connect to the BSs of any tier [34]. In addition, it is assumed that the user connects to the strongest BS, i.e., the one that delivers the highest average received power. Finally, a Rayleigh fading channel is considered for all the communication links in the network with mean ( ∈ ) for each tier's desired/interfering links. Thus, channels all are independent and identically distributed (i.i.d.) and follow an exponential distribution with mean (usually set to 1). We notice that more general fading/shadowing distributions can be accommodated as in [35] and several subsequent articles, but with a loss of tractability and without much modification to the findings and system design insights. A D2D-enabled two-tier macrocell/femtocell overlaid HetNet is depicted in Figure  1.

Spectrum Allocation
The main problem is how to share spectrum resources between cellular and D2D communications. D2D can be categorized into two types depending on the spectrum sharing form: in-band and out-of-band D2D [36]. In-band corresponds to D2D using the cellular spectrum, while out-of-band refers to D2D using bands (e.g., 2.4 GHz ISM band) rather than the cellular band. The analogous interpretation of out-of-band D2D is that D2D is given a proportion of the orthogonal frequency-division multiple access (OFDMA) resource blocks, while cellular uses the remaining resource blocks. In-band D2D can be further classified into two categories: overlay and underlay. Overlay means that cellular and D2D transmitters use orthogonal time/frequency resources, while underlay means that D2D transmitters opportunistically access the time/frequency resources occupied by cellular users. With this approach, our analysis is conducted for two D2D spectrum sharing scenarios: overlay and underlay in-band D2D. In addition, in underlay in-band D2D, we consider cognitive D2D communication. The term "cognitive D2D communication" is used in the sense that spectrum sensing is conducted at each cache-enabled D2D transmitter prior to transmission to ensure that the interference received from any adjacent cellular BS on a predefined non-exclusive D2D channel is less than a predetermined sensing threshold ; otherwise, the channel cannot be used by the D2D transmitter. Note that, different from the majority of the related studies, we do not ignore the imperfections associated with spectrum sensing at the D2D sides. Errors in the form of false alarms and misdetections occur in spectrum sensing, and such errors can lead to degradation in the performance.
Furthermore, the total available bandwidth for each macrocell is divided into a set of orthogonal channels, Ϲ = { , , … , |Ϲ| }, where |. | denotes the set of cardinality. Note that a macrocell is composed of one single macro-BS (MBS) and a set of SC BSs. While a cellular user can be served over any channel ∈ Ϲ depending on the channel availability at the serving BS, all D2D transmissions take place on the same channel ∈ Ϲ. As will be discussed later, the channel is not exclusive for D2D transmissions and can be used for cellular communication based on the adopted spectrum access policy. It should be mentioned that at every BS, only one channel at most is used to serve each associated cellular user. In addition, there is no intra-cell interference in each tier, assuming that no more than one user is served by each BS in each channel. In each macrocell, the set of orthogonal channels Ϲ = { , , … , |Ϲ| } is randomly allocated to BSs of different tiers (as depicted in Figure 1) in such a way that ∑ |Ϲ | = |Ϲ|. Note that the number of assigned channels to each tier is considered to be fixed in each macrocell. Moreover, the tier to which the channel belongs to (inside that macrocell) will be responsible for performing the adopted spectrum access policy discussed in Section 3.5.

Multi-Tier EH Model
All D2D transmitters (i.e., cache-enabled D2D UEs) are powered by energy harvested from ambient interference induced by simultaneous network cellular transmissions (i.e., downlink transmissions in this work) [27]. Each D2D transmitter is presumed to be equipped with an EH circuit which harvests RF power from all downlink channels. The total power available for a D2D transmitter located at a generic location ∈ ℝ for harvesting can therefore be expressed as where this term represents the amount of RF power harvested from the concurrent cellular downlink transmissions of all tiers. It is worth noting that does not take into account the amount of power received from other concurrent D2D transmissions at the harvesting unit. ( ) is a PPP of -th tier with intensity , that represents the set of BSs of tier using channel ∈ Ϲ, where , is the probability that a BS in tier uses this channel. The efficiency of the conversion from RF to DC power is also denoted by 0 < ≤ 1 [27,37]. is the channel between a cellular BS of tier located at ∈ ℝ and the D2D transmitter, and is the path loss exponent.

Spectrum Sensing Model of D2D Users
As mentioned, all cache-enabled D2D transmitters are assumed to be cognitive (in the underlay in-band D2D scenario). In other words, before deciding whether or not to use the channel for transmission, each cache-enabled D2D transmitter senses the state of this channel. The key goal of spectrum sensing in this work is to prevent interference arising from the nearby cellular transmissions on channel : that is, if the interference received from any neighboring cellular BS on channel is greater than a predefined sensing threshold , a typical D2D transmitter does not use this channel; otherwise, the channel is available to be used by that D2D transmitter. Note that increasing the sensing threshold raises the probability of accessing the channel while also increasing the aggregate interference. On the other hand, lowering the sensing threshold offers more protection for D2D transmission by minimizing the aggregate interference; however, it decreases the possibility of access to the channel. In other words, cognition offers a protection area around each D2D transmitter in which, if there is at least one cellular BS using channel within this region, the D2D transmitter will not use this channel. In general, the protection region around a generic D2D transmitter (located at position ∈ ℝ ) has a random shape. Indeed, it is straightforward to show that, on average, the radius of the protection region centered around a generic D2D transmitter is given as follows where As mentioned earlier, in the underlay in-band D2D, the imperfections associated with the spectrum sensing at the D2D side have to be considered, as errors in the form of false alarms and misdetections occur in spectrum sensing, and such errors can lead to degradation in the performance. The probability of detection is the probability that a typical D2D transmitter will correctly judge the presence of at least one nearby active cellular BS on when at least one cellular BS exists. The probability of a false alarm is the probability that a typical D2D transmitter judges the presence of a nearby active cellular BS on when no cellular BS exists. Note that the signals received from other possible D2D transmissions (on ) are not considered because of their low transmit powers. Therefore, the and can be, respectively, expressed as [38] where denotes the sensing SNR of the -th D2D transmitter on the channel , and = is defined as the sampling quality where is the sampling frequency and represents the sensing time. Here, represents the target and represents the target . (. ) is the complementary distribution function of the standard Gaussian, i.e., Thus, in the underlay in-band D2D, depending on the absence and presence of active transmissions on channel (inside the D2D protection region), there are four possible cases:

•
The D2D channel is used by nearby cellular BSs, and a typical D2D transmitter correctly detects the presence of cellular transmissions. The probability of this situation is (1 − ) , where is the probability that the D2D channel (i.e., ) is free, and therefore (1 − ) indicates the probability of the presence of nearby cellular transmissions on channel . In this case, the typical D2D transmitter cannot utilize the channel to transmit information.

•
The channel is in use by nearby cellular BSs, but the typical D2D transmitter misdetects the presence of cellular transmissions. The probability of this situation is In this case, the typical D2D transmitter attempts to utilize the occupied channel for data transmission. However, to avoid any severe interference, the typical D2D transmitter should not be allowed to perform data transmission.

•
The channel is not being utilized by nearby cellular BSs, and the typical D2D transmitter falsely detects the presence of cellular transmissions. The probability of this situation is . Further, in this case, the typical D2D transmitter does not utilize the channel to transmit data.

•
The channel is not in use by nearby cellular BSs, and the typical D2D transmitter correctly detects the absence of cellular transmissions. The probability of this situation is (1 − ). In this case, the typical D2D transmitter utilizes to transmit information.
It is important to note that for the underlay in-band D2D scenario, we mainly focus on the fourth case, i.e., when the cellular network, inside the D2D protection region, is absent on and the typical D2D transmitter correctly detects the absence of cellular transmissions and therefore uses for D2D transmission.

Spectrum Access Model for Cellular Transmissions
In the proposed -tier HetNet, we consider two policies on spectrum access, namely, random spectrum access (RSA) and prioritized spectrum access (PSA) policies, as set out in [27]. Such policies show how the spectrum is allocated to downlink transmissions to serve cellular users. More precisely, in RSA, in each macrocell, any channel ∈ Ϲ (including the channel which is used for D2D transmission) can be assigned independently and randomly, with the same probability, to serve one of the cellular users (users connecting to either an MBS or SC BSs). On the other hand, in PSA, any channel ∈ Ϲ\{ } can be assigned independently and randomly to a cellular user as long as the number of cellular users is less than that of available channels |Ϲ|. When the number of cellular users in each macrocell is larger than |Ϲ| − 1, only then will be assigned to a cellular user. As a result, for the RSA policy, it can be shown that the probability that a BS of tier uses a generic channel ∈ Ϲ to serve one of its associated cellular users is obtained as |Ϲ| is the probability that belongs to the channels allocated to the -th tier, and ℙ{ = } is the probability mass function (pmf) of the number of users served by a generic BS in tier , which is obtained as follows [28,39]: The above expression is obtained by approximating the area of a Voronoi cell by a Gamma-distributed random variable with a shape parameter = 3.575 and a scale parameter [39]. Note that this expression is applicable only when cellular users are considered to be spatially distributed according to an independent PPP and their association with cellular BSs is based on the maximum average received signal power, i.e., each user is associated with its nearest BS. Since we consider single-antenna systems, i.e., spatial multiplexing and multi-user MIMO schemes are not taken into account, each BS will only schedule one user. Moreover, users can only access one BS at a time (the BS is either an MBS or an FBS). Indeed, users' association with cellular BSs is based on the maximum average received signal power. In addition, is the average number of users associated with a BS in tier , and it is obtained as follows: Proof: See Appendix A.1. Note that = because, in each macrocell, any BS of tier randomly and independently assigns any channel ∈ Ϲ with the same probability in the RSA policy. We denote by the probability that a generic BS assigns the D2D channel to serve one of its associated users. For the PSA policy, on the other hand, the probability that a BS of tier uses a generic channel ∈ Ϲ \{ } to serve one of its associated cellular users is obtained as while the probability that a BS of tier has to use to serve one of its associated cellular users is as follows:

The Load-Dependent TPC
A BS typically consists of different power-consuming components. Components such as the rectifier, microwave link, and air conditioning fall into the first category because their power consumption is independent of the load. The number of users and the services they use in the BS's cell determine the load on a BS. The greater the number of users and the greater the requirements for the services, the greater the load. These load-independent components' power consumption is thus constant over time. The equipment that has a load-dependent power consumption, such as the power amplifier, transceiver, and digital signal processing, falls into the second category. The authors of [40] summarized the typical power consumption of the macrocell and SC BS components for the technologies considered (mobile WiMAX, HSPA, and LTE).
As stated, SCs provide a promising and feasible solution to meeting the rising demand for wireless applications with high data rates and the rapid growth of data traffic. With the expected rise in the number of SC deployments, EE is a key parameter of system design that needs consideration. The dense deployment of SC BSs, indeed, inevitably causes a tremendous rise in energy consumption. We therefore consider a continuous power control/adjustment technique for SC BSs, which is much simpler from an implementation perspective than switching OFF/ON SC BSs. This can be achieved by specifying for SC BSs a load-dependent TPC (0 ≤ ≤ 1). In general, in the proposed -tier Het-Net, the power consumption of a BS in the -th tier can be expressed as where and = are, respectively, the static power consumption and loaddependent transmit power of a BS in the -th tier. Note that is the fixed transmit power of a BS in the -th tier, and is a load-dependent TPC, which accounts for power consumption that scales with the traffic load of a -th tier BS. Since is proportional to the traffic load of a BS in the -th tier, we set = ∑ (see Equation (9)). We use tools from stochastic geometry in the following subsections to evaluate the performance of the proposed communication system model in terms of SE and EE. More specifically, we derive simple and closed-form expressions for the coverage probability of downlink cellular and D2D users under the two D2D spectrum sharing scenarios, i.e., overlay and underlay in-band D2D, and then the proposed wireless video sharing framework for the cache-enabled D2D network is analytically evaluated. In addition, the probability of harvesting sufficient energy for a typical cache-enabled D2D transmitter is obtained, and, finally, we derive an analytical expression for the network EE both in the overlay and underlay inband D2D taking into account the imperfections associated with the spectrum sensing at the D2D transmitters.

Overlay Mode: Downlink Cellular and D2D Coverage Probabilities
For any typical user in a -tier HetNet, we now present analytical expressions of the downlink cellular/D2D coverage probability. Notice that we will be paying attention to the special case of two-tier (femto-macro) HetNets in the simulations, as seen in Figure 1. As mentioned, our analysis is conducted for two D2D spectrum sharing scenarios: overlay and underlay in-band D2D. We first begin with the overlay in-band D2D, where cellular and D2D transmitters use orthogonal time/frequency resources, and therefore no interference occurs between cellular and D2D transmissions. In other words, cellular links are not affected by D2D links, and vice versa. Following similar analysis and derivations in [11,33], we present the cellular coverage probability formula, which is defined as the probability that a typical user in the network is in coverage, i.e., the signal-to-interference-plusnoise ratio (SINR) is greater than a threshold value , conditioned on the fact that it is served by a -th tier BS ( ∈ , = {1, … , }).

Theorem 1:
The per tier downlink cellular coverage probability in overlay mode is expressed as where denotes the random distance between the tagged user at the origin and its corresponding -th tier BS, and = ( ) / ∑ ( ) is the association probability, i.e., the probability that a user associates with the -th tier using the maximum received power cell association policy [34]. In addition, assuming a Rayleigh fading channel for all the network communication links with mean ( ∈ ) for each tier's desired/interfering links, In the above expression, the intensity of the interfering BSs from the -th tier is denoted by . Therefore, , λ is the intensity of BSs of tier that use channel , where , is the probability that a BS of tier uses this channel (given in Equations (7) and (10)). Г( ) denotes the standard Gamma function, is the path loss exponent, is the noise power, and Proof: For a proof and to check the validity of the presented theoretical expressions, please refer to [11] Appendices A and B.

Remark 1:
If the tagged user under consideration is served by a -th tier BS, then the nearest interferer in the -th tier is at least at a distance of ⁄ ⁄ [34]. If the initial density of BSs in tier is , then in the case that a fraction of them are using channel , a thinning factor, i.e., , , will affect the original BSs' density. We note that if each BS in tier uses channel with probability , , the thinned process is HPPP. Other thinning processes, nevertheless, are not necessarily HPPP [41], yet we assume the thinned process to be HPPP for tractable analysis in this paper. Notice that ℎ in ℙ ( ) > is the exponentially distributed channel between the tagged user and its serving BS from theth tier. The term ( ) = ∑ ∑ ∈ ( )\ , ∈ is the aggregate interference at the tagged user from all tiers' interfering BSs that use channel . We denote by , the serving (tagged) BS of tier . Further, is the exponentially distributed channel between the i-th interfering BS in the j-th tier and the tagged user, and is the distance of the -th interferer in the -th tier (i.e., captured by the point process Φ ) from the tagged user. Note that Φ ( ) represents the point process of BSs (in tier ) that use channel . (13) can be further simplified, as seen in the special case below.

Corollary 1: Consider
→ 0, i.e., operating in an interference-limited regime, then we have In the same way, we have the following analysis for a D2D link: In overlay mode, the D2D coverage probability is expressed as where for in which is the D2D transmit power. is a random variable representing the D2D distance, is defined as the maximum allowable D2D distance, and is the portion of the cache-enabled D2D UEs involved in active transmission that interferes with the tagged D2D link, i.e., the one that is being considered. Note that = , where , which will be presented later in Section 4.4, is the expected number of active D2D links in the network, and represents the area of the cellular system. In addition, we denote by the predetermined D2D SINR threshold, and represents the exponentially distributed channel (with mean ) between the tagged D2D user and its serving D2D transmitter.

Remark 2:
For the D2D network, the aggregate interference (i.e., ) in overlay mode comes only from other D2D transmitters that have sufficient energy to communicate with their corresponding receivers. The interfering D2D transmitters thus no longer constitute a homogeneous point process and interference analytical characterization is not possible. Therefore, the correlation among the locations of the interfering D2D transmitters is neglected for analytical tractability and the point process is approximated by an HPPP with the same intensity of . Note that the interfering D2D transmitters may be arbitrarily near the tagged D2D. In other words, the nearest D2D interferer can be at a distance of 0 from the tagged D2D connection in the derivation of , and thus the integration limit would be from 0 to ∞ when measuring the aggregate interference.

Corollary 2: Consider
→ 0, then we will have

Underlay Mode: Downlink Cellular and D2D Coverage Probabilities
We now consider the underlay in-band D2D scenario, where the time/frequency resource occupied by cellular users (i.e., the predefined non-exclusive D2D channel ) is opportunistically accessed by D2D transmitters with cognition capabilities, and therefore cellular links are affected by D2D links, and vice versa. In fact, interference will occur not only among cellular links and within D2D links but also between cellular and D2D links. Note that we take into account the imperfections associated with the spectrum sensing at the D2D transmitters.

Theorem 3:
The per tier downlink cellular coverage probability in underlay mode is expressed as where is obtained as follows: in which is the indicator function, which is equal to 1 only when is true and 0 otherwise. In the above expression, represents the intensity of the interfering BSs from the -th tier. Therefore, ( , )λ is the intensity of BSs of tier that use channel , and it is , for ∈ \{ } and , for = . Proof: Similar analysis to that in the proof of Equation (14) can be applied hereplease refer to [11] Appendices A and B. Note that, here, each user suffers from two sources of interference, i.e., the cellular network and the D2D network which is a product of two Laplace transforms, whereas in [11], there exists only one source of interference which gives a single Laplace transform.

Remark 3:
In the underlay mode, for the cellular interference, i.e., ( ), if the tagged user under consideration is served by a -th tier BS, then the closest interferer in the -th tier is at least at a distance of ⁄ ⁄ . For , the interfering D2D transmitters can be arbitrarily close to the tagged user under consideration and there is no protection region, and thus the integration limit when calculating the aggregate interference will be from 0 to ∞. Moreover, in the underlay mode, results from other D2D transmitters that have sufficient energy (to communicate with their corresponding receivers) and can transmit on . Hence, we assume the thinned process to be HPPP for tractable analysis with the same intensity , where = . As mentioned, , i.e., the expected number of active D2D links in the network, will be presented in Section 4.4.

Corollary 3:
Consider → 0, i.e., operating in an interference-limited regime, then we have where = 2 sin 2 . and in which , and , are given for both the RSA and PSA policies in Equations (7), (10) and (11). Similarly, we have the following analysis for the D2D link:

Theorem 4:
The D2D coverage probability in underlay mode is expressed as where ( ) = ℙ SINR > = ℙ > is obtained as follows: and Ω , , = Г( + 1)( ) Proof: Similar statements to that in the proof of Theorem 3 can be reused here. Please also see the following remark.

Remark 4:
In underlay mode, each D2D receiver suffers from two sources of interference, i.e., the cellular network and the D2D network. For the cellular network, the aggregate interference results from all BSs of different tiers that use channel . Thus, , λ represents the set of BSs in tier that use channel , where , is given for both the RSA and PSA policies in Equations (7) and (11). For the D2D network, the aggregate interference (i.e., ) results only from other D2D transmitters that have enough energy to communicate with their corresponding receivers and can transmit on . Hence, we assume the thinned process to be HPPP for tractable analysis with the same , where = .
For the cellular interference, i.e., , since the D2D transmitters perform spectrum sensing before transmission on , then the closest interferer is at least at a distance of (given in Equation (2)) from the tagged D2D receiver. For better analytical tractability, we assume that the closest interferer is at least at a distance of ( is the random variable representing the D2D distance), where = . Therefore, the integration limit when calculating the aggregate interference will be from to ∞. Notice that the protection region is basically centered around the receiver rather than the transmitter to protect the D2D transmissions. However, we assume that the protection region is centered around the D2D transmitter for simplicity. For , the interfering D2D transmitters can be arbitrarily close to the tagged D2D receiver under consideration and there is no protection region, and thus the integration limit when calculating the aggregate interference will be from 0 to ∞.

Cellular and D2D Links Coexistence
In 2022, video traffic is expected to account for more than 82% of the global consumer traffic, with wireless and mobile devices accounting for the majority of this traffic [42]. Therefore, efficient mechanisms for sharing multimedia content in cellular networks are extremely necessary. It has been shown that D2D communication can greatly increase the throughput of multimedia content by optimizing the resource utilization through direct communication of the devices, eliminating the need for assistance from the cellular infrastructure. Since the two devices involved in D2D communication are typically close to each other and have a small interference range, the BS may offer services to other users on the same channel at the same time. Indeed, D2D technology will offer more capacity enhancement than traditional cellular networks between devices that desire to exchange multimedia content.
Mobile devices are nowadays mostly equipped with memory modules of large storage capacity. This allows users to store popular multimedia files on their devices and, upon request, exchange such files with other users, resulting in traffic being offloaded from the cellular network and reducing duplicate data transmission. In our D2D-enabled HetNet, users can request popular content (files) via D2D communication from neighboring users, although they can also request content from the BSs (either SC BSs or MBSs) through traditional cellular communication. Note that a D2D link can be successfully established between a user requesting file (i.e., D2D receiver) from a set of files and the user storing file (i.e., D2D transmitter) only when (1) there exists one D2D transmitter storing file in the area (| | = ) centered around the D2D receiver: note that is defined as the maximum allowable D2D distance; (2) the D2D transmitter harvests sufficient energy to establish a communication link with the receiver; and (3) the D2D channel is free, i.e., the received interference from any neighboring cellular BS on the channel designated for D2D transmission ( ) is smaller than the predefined sensing threshold ; otherwise, the user receives the file through the traditional cellular network (i.e., via the BSs). In addition, we denote by the D2D transmission probability, i.e., the probability that is available and the amount of energy harvested is adequate for D2D transmission, where, from the viewpoint of the cognitive D2D transmitters, is the probability that there is a channel available for D2D transmission, i.e., the probability that the D2D channel (i.e., ) is free, and the probability that a D2D transmitter harvests adequate energy to create a communication link with the receiver is denoted by . As mentioned previously, in the absence of the cellular network on channel (inside the D2D protection region), if the typical D2D transmitter correctly detects the absence of the cellular activities, the probability of this situation is denoted by (1 − ) . Obviously, = 0 when the D2D spectrum sharing scenario is considered to be the overlay mode.
i. Calculation of : In a -tier HetNet, for a generic D2D transmitter, the probability that the D2D channel (i.e., ) is free inside the D2D protection region is given by and , is the probability that the D2D channel is used by a generic BS of tier for cellular communication, which is given by Equations (7) and (11) for the RSA and PSA policies, respectively. Proof: For a proof and the detailed derivation, please refer to [27] Appendix B where a single-tier (macro tier) cellular network was studied whose macro-BSs are underlaid with D2D transmitters. ii.
Calculation of : Although the random variable (0 ≤ ≤ ) is the distance between each D2D transmitter and its receiver, we consider the worst-case scenario for the calculation of , where the receiver is at the boundary of the circle (i.e., at a distance ). Notice that this presumption gives an upper bound on the amount of transmission power needed for the communication link to be established, thus providing a lower bound on the probability of sufficient energy being harvested. Relaxing this presumption, without providing further insights, complicates the derived expressions [43]. We define the probability that a D2D transmitter harvests sufficient energy as follows: in which (defined in Equation (1)) is the total power available to be harvested by a D2D transmitter from the ambient interference caused by the simultaneous downlink cellular transmission of all tiers, and is a predetermined EH threshold. The next theorem provides an expression for : Theorem 5: In a -tier HetNet, the probability that a typical D2D transmitter harvests sufficient energy for transmission is Proof: See Appendix A.2. It can be shown that the above expression can be presented in a closed-form expression in the special case when = 4. In summary, according to [33,44] and based on the above explanations, the number of successfully activated D2D links for delivering file can be given as follows: where is the probability that a user stores the file , denotes the probability that file is requested by a user, and (1 − ) represents the number of users who may request file in the network, where is the area of the cellular network. The expected number of active D2D links for all files is then given by If establishing a D2D communication link is a failure, a cellular communication link with the reference user is fixed. In other words, if the reference user is unable to find the corresponding user who stores the desired file within the maximum transmission range of D2D links (i.e., ), a traditional cellular connection must be established. As a result, the expected number of cellular connections for all files (or the expected number of users receiving their desired files from the cellular network, i.e., from either SC BSs or MBSs) is where is the probability that a typical cellular user is assigned a channel by a BS in tier , and it is presented as follows: where is the association probability. In Figure 2, we show the probability that the reference user would find its requested files cached within a certain region vs. the maximum allowable D2D distance . The greater means that the probability of finding the requested files increases, resulting in further D2D connections being established. It should be stated that the probability of successfully establishing a D2D link remains constant as increases further. This is because when the maximum allowable D2D distance becomes greater than a particular value, users will locate all of their requested files in the network virtual cache. We set to 200 m in the other simulations as D2D is a short-distance communication technology. In addition, the effect of the number of network cache files, i.e., , can be seen in Figure 2 on the probability of finding the requested files. We know that each cache-enabled D2D UE has a cache memory of size . From our simulations, we can observe that there is a unique optimal number of cache files, namely, , for a fixed size of cache memory (here = 10) and a constant . Therefore, we can obtain , given the system parameters. Obviously, as also seen in the figure, the probability of finding the requested file from the adjacent cache-enabled D2D UEs will increase first with the rise in and then decrease since the cache-enabled D2D UEs' cache memory size has been set to a fixed number (i.e., = 10) and does not increase with the rise in . In fact, when becomes greater than a specific value, if the cache memory size of the cache-enabled D2D UEs remains unchanged, the increase in not only cannot contribute to a further increase in the probability of finding the requested file in the region but it also decreases the related probability. This is due to the imposed cache memory size constraint of the cache-enabled D2D UEs.

Cellular and D2D Data Rate Analysis
Our main objective in this subsection is to obtain the average transmission rate for both the cellular and D2D links under the two D2D spectrum sharing scenarios: overlay and underlay in-band D2D.
Overlay Mode: Firstly, if a typical user obtains data via the traditional cellular network, i.e., directly from a BS in the -th tier, the average achievable rate is given as follows: where an expectation, i.e., [•] operation, is placed on both the spatial PPP and the fading distribution. We assume that any channel ∈ Ϲ (including the channel) has the average bandwidth . Considering an interference-limited regime ( → 0), and following the derivation in Appendix A.3, can be written as where ℒ ( ) (•) is the Laplace transform of the random variable ( ) and is characterized as Equation (43). Note that ( ) is the aggregate interference at the tagged user from all tiers' interfering BSs that use channel .
Secondly, the average achievable D2D rate can be derived as a result of a similar analysis as follows: where ℒ (•) is as follows: Underlay Mode: Firstly, if a typical user receives data via the traditional cellular network, can be written as follows (considering an interference-limited regime ( → 0) and following the derivation in Appendix A.3) where ℒ . ℒ is characterized as .
The average achievable D2D rate can be obtained as follows as a result of the similar analysis: where ℒ . ℒ is characterized as follows

Network EE Metric
In most similar studies in the literature, the influence of D2D communications on the overall EE, which can alleviate the traffic load of both macrocells and SCs in densely deployed HetNets, is not discussed through the EE network analyses. The overall network EE for the proposed network model, measured in terms of bit/joule, is defined as the ratio of total achievable HetNet throughput to total HetNet power consumption, i.e., in which = ∑ represents the total power consumption of the BSs in the HetNet, and = ∑ (1 − ) 1 − is the total power consumption of the network's D2D communications.
has been defined earlier in Equation (12).
denotes the power consumption of a D2D connection which is denoted as = + , where and , respectively, denote the D2D transmit power and constant power consumption of a D2D link. denotes the total achievable throughput of the entire HetNet that can be obtained as where and are, respectively, the total achievable throughput of the cellular and D2D networks. Based on the above discussions, the overall network EE expression is obtained as follows: As explained, our analysis is conducted for two D2D spectrum sharing scenarios: overlay and underlay in-band D2D. Accordingly, from the EE expression in Equation (51), the overall network EE expression for both the overlay and underlay in-band D2D can be obtained as follows: Overlay in-band D2D mode: In Equation (51), and , i.e., the average cellular and D2D coverage probability expressions, are, respectively, taken from those in Equations (16) and (19). In addition, the and are, respectively, taken from those in Equations (42) and (44). Moreover, in the expression, = . Underlay in-band D2D mode: In Equation (51), and expressions are, respectively, taken from those in Equations (22) and (29). In addition, the and are, respectively, taken from those in Equations (45) and (47). Further, in the expression, = (1 − ) .

Simulation Results
We henceforth consider a two-tier (femto-macro) HetNet (i.e., = 2) for easier exposition and without loss of generality, as seen in Figure 3. Note that such case, i.e., the macrocell being overlaid with femtocells, remains of great importance, and by focusing on it, we still do not lose any generality of the analysis/results. In the presented results, unless stated otherwise, we consider the underlay in-band D2D mode, where the D2D channel occupied by cellular users is accessed opportunistically by D2D transmitters with cognition capability, and therefore cellular links are affected by D2D links, and vice versa. Although overlay in-band D2D can usually provide better system performance without co-channel interference (CCI) under dedicated resources, it is not as efficient as underlay in-band D2D in terms of SE. In addition, in what follows, we consider the PSA policy unless explicitly stated otherwise. The simulation parameters are summarized in Table 1.  In Figure 4, we observe the impact of the FBSs' TPC (i.e., ) on the , and , in the underlay in-band D2D mode. Note that for the macro tier (i.e., when = 1), = 1 because no power control is considered for the MBSs. Only for tier = 2, i.e., the FBSs, is the power control mechanism considered. As it was expected, with the increase in , , and , increase while the , and , decrease. In fact, = 1 implies that all FBSs transmit with their maximum allowable transmitting power, raising the probability that a user is associated with the femto tier (according to the definition of association probability in Section 4.2). In other words, the use of the TPC factor to modify the transmit power of the FBSs in the association phase will expand the femtocell coverage area, therefore forcing more users to associate with the FBSs and less users with the MBSs, as compared to a fixed femtocell coverage area. Thus, the probability that a BS of tier 2 (the femto tier) uses a generic channel ∈ Ϲ \{ } (i.e., , ) or channel (i.e., , ) to serve one of its associated cellular users will rise. Obviously, , and , decrease as a result. However, as depicted in the figure, since MBSs always transmit with higher power, they support more users than FBSs; therefore, , and , are more than , and , .
In Figure 5, we can see the impact of varying the total number of available channels |Ϲ| in each macrocell on the , and , in the underlay in-band D2D mode. It is obvious that increasing |Ϲ| will lead to the decrease in , and , in both the macro and femto tiers. This is because the probability that a BS uses a generic channel ∈ Ϲ to serve one of its associated cellular users will decrease when the total number of channels increases. As mentioned, more users are served by MBSs (as compared to FBSs) due to their high transmission power. Therefore, , and , are higher than , and , , as depicted in the figure. Figure 5. The , and , in the underlay in-band D2D mode vs. the total number of available channels |Ϲ| in each macrocell. Figure 6 depicts , i.e., the probability that the D2D channel (i.e., ) is free inside the D2D protection region, as a function of the spectrum sensing threshold for different scenarios. As explained earlier, for all depicted scenarios in the underlay in-band D2D, increasing the sensing threshold raises the likelihood of accessing the channel while, at the same time, increasing the aggregate network interference. This is because the channel is available to be used (from the viewpoint of a D2D transmitter) whenever the received interference from the neighboring BSs on this channel is less than the chosen sensing threshold. On the other hand, lowering the sensing threshold provides more protection for D2D transmission by reducing the aggregate interference; however, it decreases the possibility of access to the channel. This finding highlights the importance of carefully selecting the threshold of spectrum sensing for D2D transmitters. In addition, it can also be seen that in the PSA policy is higher than that of the RSA policy for all values of . This is because the goal in PSA is to prevent the use of as much as possible, as explained in Section 3. Obviously, is always 1 in the overlay in-band D2D mode, as it is independent of the spectrum sensing threshold . The figure also shows a close matching between the analysis and the simulation. Figure 7 shows the effect of varying the density of users (i.e., ) on when both the PSA and RSA policies are considered. From Equation (32) and its related equations, it can be noticed that , is an increasing function of . As a result, decreases with the increase in , : that is, increasing the number of users forces the network to schedule more users at the same time slot which in turn increases the probability of the D2D channel being occupied for cellular communication. It can also be seen from this figure that the PSA policy always outperforms the RSA policy for any value of . This is intuitive since the PSA policy offers improved performance in terms of by avoiding the use of as much as possible, as described before.  vs. the density of users for the prioritized spectrum access (PSA) and random spectrum access (RSA) policies in the -tier HetNet. Figure 8 shows the fraction of the D2D links in the network with the desired QoS. In this paper, the QoS is related to the throughput obtained by the D2D receiver. Specifically, the QoS is the proportion of D2D receivers with a throughput greater than the target threshold of 100 Mbps. As explained, raising the sensing threshold increases the probability of accessing the channel while, at the same time, increasing the aggregate interference, for both the PSA and RSA policies in the underlay in-band D2D. This will result in a decrease in the number of D2D links with the desired QoS in the network. Reducing the sensing threshold, on the other hand, provides further protection for the D2D transmissions by decreasing the aggregate interference on the channel. Obviously, this will increase the number of D2D links with the desired QoS. Moreover, for all values of , the percentage of D2D links with the desired QoS is always higher when the PSA policy is used. It is worth mentioning that setting the spectrum sensing threshold needlessly very high can be interpreted as a scenario where the network D2D transmitters are all noncognitive so that they can access the channel without caring about the presence of the cellular network. This implies a high probability of interference between cellular and D2D networks. Thus, cognition plays an important role in determining all QoS-related measurements. In Figure 9, it can be seen that , and , are increasing functions of user density (this can also be observed in Figure 7). It is also seen that in each tier, , always has higher values when compared to , . In other words, the probability of the D2D channel being occupied by the cellular network is always lower when the PSA policy is used. This is intuitive because in the PSA policy, the objective is to avoid the use of as much as possible. In addition, for the same reasons mentioned for Figures 4 and 5, the probability of channel being occupied by the macro tier ( , and , ) is higher for all values of when compared to the femto tier ( , and , ). Figure 10 depicts the effect of varying the density of users on , . As it can be seen, the probability that a BS of tier uses a generic channel ∈ Ϲ \{ } to serve one of its associated cellular users is an increasing function of . Similar reasons and arguments to those we had for the previous figures hold here as well.   ( ∈ {1,2}) in the underlay in-band D2D mode and when the PSA policy is used. It can be seen that as increases, the , and , in both tiers decrease. In other words, for a fixed number of users, the increase in will contribute more available channels in the network (as each MBS is assigned a set of orthogonal channels Ϲ = { , , … , |Ϲ| }) and hence lower the probability that a BS of tier uses a generic channel ∈ Ϲ (including ) to serve one of its associated cellular users. Furthermore, as seen in the figure, , and , are higher for all values of when compared to the femto tier (i.e., when = 2). Figure 12 provides the average probability that a given SINR target on the x-axis can be achieved (see Equations (22) and (29)). As expected, the macro tier (the first tier) provides a higher coverage area over all possible SINR targets. Figure 11. The , and , in the underlay in-band D2D mode vs. the density of MBSs when the PSA policy is used. In Figure 13, we use simulations to show the fraction of D2D links in the network with the desired QoS as a function of the misdetection probability (i.e., = 1 − ). As explained earlier, the case when the cognitive D2D transmitters incorrectly detect the channel to be idle for transmission is considered to be misdetection. Under this case, the D2D and cellular transmissions may severely interfere with each other (on channel ) with a misdetection probability (1 − ). As a result, the higher the misdetection probability, the lower the percentage of D2D links with the desired QoS will become. In addition, increasing the number of available channels in each macrocell (i.e., |Ϲ|) decreases the probability that is being occupied for cellular communications, which in turn reduces the aggregate interference on this channel. Thus, a larger proportion of D2D links in the network can achieve a throughput higher than the target throughput. To have a full picture of the network metrics and to evaluate the performance of the proposed communication system model, the corresponding three dimensional (3D) simulations are presented from Figure 14. The effect of the predefined EH threshold on the D2D transmission probability is depicted in Figure 14. The larger the value of , the lower the D2D transmission probability. This is because the probability that a D2D transmitter harvests sufficient energy (i.e., ) decreases as increases (see Equation (34)), and as a result, we will observe a lower D2D transmission probability (see Equation (31)). We also observe the relationship between , the predefined sensing threshold , and the EH threshold in Figure  15. Clearly, a higher D2D transmission probability can be achieved for the larger values of and smaller values of . Figure 15. The D2D transmission probability ( ) vs. the predetermined EH threshold (i.e., ) and the predefined sensing threshold (i.e., ) of the cognitive D2D transmitters.
In Figure 16, the total network power consumption (i.e., + ) is depicted vs. the total number of available channels in each macrocell (i.e., |Ϲ|) and the probability of false alarm . An interesting observation is that for large values of and |Ϲ|, the total network power consumption reaches high values at approximately 10 kW. The reason is that when is large, the D2D transmission probability and therefore the number of D2D links will decrease. As a result, less traffic can be offloaded from the cellular network, as less D2D transmissions can be set up. In addition, the larger the size of |Ϲ| (i.e., the bandwidth), the higher the number of active users that can be supported in the cellular network. The lower number of D2D links and more supported cellular users translate into growth in the overall network power consumption. Further, as it is observed in Figure 17, the total network power consumption will increase at large values of and small values of . As can be noticed in Equation (38), when is relatively small, a lower number of D2D links can be set up, and thus less traffic can be offloaded from the cellular BSs, which in turn raises the total power consumed by the network. Figure 16. The total network power consumption vs. the total number of available channels in each macrocell (i.e., |Ϲ|) and the probability of false alarm . Figure 17. The total network power consumption vs. the maximum allowable D2D distance and the probability of false alarm .
As described above, spectral and energy efficiencies (SE and EE) are considered to be key indicators in wireless cellular networks. It is therefore important to research the impact of the network parameters on the trade-off between SE and EE. We use simulations to characterize the sensitivity of SE and EE with respect to variations of the network parameters, as shown in Figure 18. One can notice that choosing the proper values of the network parameters, including |Ϲ|, , , , ℙ{ ∈ Ϲ } (for = 2), the cache size , and , is important in order to achieve a good SE-EE curve. Indeed, we examine the effect of changing one parameter on the network SE and EE while holding the other parameters constant. As shown in the figure, we define a region called the "Green Area" where we can achieve the network EE of at least 2 Mbit/joule and SE values greater than 100 bit/s/Hz. This rectangular region can provide a numerical reference standard for the network operators to choose the appropriate values of the network parameters from the perspective of both the SE and EE. In other words, any value of each parameter that achieves a network SE and EE inside the rectangular region can be considered as an appropriate value for that parameter. However, deriving the optimal value of a parameter can depend on the other network parameters and metrics as well. In Figure 19, we see the relationship between the achievable sum of D2D rates (i.e., ), the maximum allowable D2D distance , and the total number of available channels in each macrocell (i.e., |Ϲ|). When is relatively low, with the rise in , the number of D2D links and hence the achievable D2D sum rate would increase. However, if we keep raising the maximum allowable D2D distance , due to the increase in distance and the increase in aggregate interference caused by the increments of D2D connections, the achievable amount of D2D rates would decrease. On the other hand, as mentioned before, when the total number of available channels in each macrocell (i.e., |Ϲ|) increases, the probability that is being used for cellular communications becomes lower. Indeed, an increase in |Ϲ| reduces the probability of cellular users to access the D2D channel; hence, it reduces the number of active cellular interferers on this channel, and, consequently, the achievable sum of D2D rates will rise. Figure 19. The impact of varying the maximum allowable D2D distance (i.e., ) and the total number of available channels in each macrocell (i.e., |Ϲ|) on the achievable sum of D2D rates (i.e., ). Figure 20 shows the variations of the network SE as the maximum D2D communication distance and EH threshold vary. Clearly, as grows, users would have more possibilities in the broader region to detect available content providers. As a result, as more D2D transmissions can be set up, more cellular network traffic can be offloaded. Furthermore, since D2D often occurs over shorter distances, it is expected to yield higher data rates for the users than cellular-based communications, leading to a higher network SE. However, the network achievable D2D rate and hence the network SE will decrease when the D2D distance is further increased (see Figures 19 and 20). In fact, within a certain distance, the achievable data rate in the D2D link is higher than the cellular link with the BSs. However, it would lead to worse performance than the cellular network if we continue to increase the maximum distance for D2D communication. This is because users are unable to have the same transmitting power as BSs. It can also be mentioned that the associated users' costs (e.g., power consumption) can also increase as the D2D communication distance increases. Moreover, from the figure, we can observe that the smaller the value of the EH threshold , the higher the network SE becomes. This is because, as becomes smaller, the probability of a D2D transmitter harvesting enough energy ( ) increases. More D2D transmissions will be set up when more energy is harvested at the D2D transmitters, thereby enhancing the network SE. This finding implies that when D2D communications are powered by EH, a higher network SE can be achieved. In the simulation result shown in Figure 21, we see the relationship between the network SE, the maximum allowable D2D distance , and the cache size (i.e., ) of each cache-enabled D2D UE. The impact of on the network SE is explained in Figure 20. In addition, for a given , changing the size of the cache memory will also cause changes in the value of SE. Generally, the probability that requesting users can obtain a file from the cache-enabled D2D UEs increases with larger cache memory sizes. This, in turn, results in more established D2D connections and hence a higher network SE. However, as it is shown in Figure 21, the network SE depends simultaneously on both the maximum allowable D2D distance and the cache memory size . This figure represents how the and parameters are performing in terms of achieving a good SE. The yellow area indicates a region with the highest network SE. Thus, the appropriate values of these two parameters should be chosen within that area so that the network SE is maximized. In Figure 22, we can observe the impact of varying the FBSs' TPC (i.e., ) and ℙ{ ∈ Ϲ } = |Ϲ | |Ϲ| on the network SE and EE. As explained in Equations (7), (10) and (11), ℙ{ ∈ Ϲ } is the probability that the D2D channel belongs to the channels allocated to the -th tier, which is equal to ℙ{ ∈ Ϲ } = |Ϲ | |Ϲ| . In all previous figures, for the special case of two-tier (femto-macro) HetNets ( = 1: macro, = 2: femto), we set ℙ{ ∈ Ϲ } = |Ϲ | |Ϲ| = 0.4 and ℙ{ ∈ Ϲ } = |Ϲ | |Ϲ| = 0.6. In other words, only 40% of the total bandwidth (allocated to each macrocell) is given to the femto tier. However, according to our analysis, to achieve the maximum network SE and EE, the value of ℙ{ ∈ Ϲ } = |Ϲ | |Ϲ| , i.e., the bandwidth allocated to the femto tier, should be higher, particularly for the EE curve (see Figure 22). Note that femtocells can greatly lower power consumption and achieve a higher SINR due to the short transmit-receive distance. These are translated into enhanced EE and higher network SE. Further, it should be noted that the flexibility of sharing the spectrum, enabled through an adaptive resource partitioning, is seen as an effective way to balance the load among different tiers in the network and improve overall trunking efficiency. While the femto tier provides a higher network SE and EE, the macro tier provides coverage in a wide area, and therefore this should be taken into consideration in any adaptive resource partitioning scheme. The impact of varying the FBSs' TPC (i.e., ) on the network SE and EE has also been illustrated. As previously stated, the increase in would expand the femtocell coverage area, thereby forcing more users to associate with the FBSs. This increases the network SE by improving the total achievable throughput (sum rate). Moreover, there is an optimal TPC for the FBSs (i.e., * ) as shown in the figure, which maximizes the EE network. Indeed, with the growth of , the network EE curve will first rise and then decrease due to the increase in power consumption caused by the higher transmission power of the FBSs. Notice that, particularly in a network with a low and fixed user density ( ), the increased network power consumption by the FBSs outweighs the increased network sum rate. It is worth noting here that as the density of users in the network grows higher, the * value increases.
(a) (b) Figure 21. The relationship between the network SE, the maximum allowable D2D distance , and the cache size (i.e., ) of each cache-enabled D2D UE; (b) shows a high-angle view of (a).
is set to be 100 here.
Finally, in Figure 23, we evaluate the impact of the total number of available channels in each macrocell (i.e., |Ϲ|) and the density of users ( ) on the overall network EE. For a fixed value of |Ϲ|, the network EE increases with . The reason for this is that with the growing number of users, the network sum rate and, therefore, the EE of the network are increased assuming that the QoS is met for all users. It is interesting to note that for very large values of , the simulation curve is expected to no longer change with the increase in . This is because the bandwidth available to each macrocell is limited, and at one point, the increase in user density can no longer increase the sum rate and EE of the network. Furthermore, as it can be seen, for a low user density, the network EE enhances with the increase in |Ϲ|. However, in the case of a high user density, the network EE first increases with |Ϲ|, then eventually drops due to increased aggregate interference in the network (this reduces the sum rate) as a result of an increasing number of newly connected users on a large set of available channels.

Conclusions and Future Research Directions
We used stochastic geometry tools in this paper to model and analyze D2D communication underlying a multi-tier/multi-channel cellular network where D2D transmitters can harvest RF energy from ambient interference resulting from concurrent cellular downlink transmissions. In addition, we used a framework for wireless video sharing to consider D2D requirements under realistic application scenarios and specific business requirements, where users are equipped with caches to store common video files and exchange files through D2D communication with other nearby users. Our analysis was conducted for two D2D spectrum sharing scenarios, namely, overlay and underlay in-band D2D. We considered cognitive D2D communication in the underlying in-band D2D, where cognition is applied to the cache-enabled D2D communication. Note that the impact of spectrum sensing errors in the form of false alarms and misdetections which can lead to performance degradation was also studied in this paper. For SC BSs, we also considered a continuous power control/adjustment method by specifying a load-dependent power coefficient for transmission. With the aid of the technical tools of stochastic geometry, we evaluated the performance of the proposed system model in terms of SE and EE. As shown in the simulations, the proposed framework offers advantages in terms of EE and SE. More specifically, the power control/adjustment strategy of SCs, the caching placement, D2D establishment, and cognition and EH capabilities altogether can lead to a considerable improvement in the achieved network EE and SE.
As for the specific research directions in the future, apart from what have been discussed and presented in the previous sections, there are a number of other issues that should be thoroughly explored in this research study. One important point is about the ultra-low latency aspects [45]. Delay-sensitive mission-critical-type applications are gaining traction in 5G networks. Remote surgery, autonomous driving, and vehicle transportation, and other mission-critical applications and services, require ultra-reliable low-latency communications [46]. Low latency and low energy consumption at the same time will be difficult to attain. Shannon capacity has been used to assess the system capacity/throughput in traditional wireless networks, and it is regarded as a suitable metric for SE at the physical layer when the constraints on the buffering delay at the upper layers are ignored [47]. However, a high throughput on the physical layer basically means a high upper layer buffering delay as well, making high throughput and low latency seem to be two opposing targets. Therefore, to support mission-critical delay-sensitive applications with a high downlink data rate, very low link latency, and high reduction in network energy usage, effective mechanisms to address these conflicting goals are needed, which can be explored in future studies. It is worth noting that D2D communication will increase spectral utilization and reduce latency by allowing direct communication between nearby mobile devices. It can also help to increase the EE by reducing the communication distance. As a result, D2D communication is well suited for low-power, delay-constrained communications [48,49].
Another issue to consider is related to coordination in terms of power allocation and interference management. The performance gains of HetNet systems are largely due to two aspects, i.e., decreasing the outage probability and increasing the system capacity. The newly installed HetNet transmission nodes (BSs) can, however, increase the amount of CCI. To minimize CCI between transmission nodes in the LTE-A system, the inter-cell interference coordination (ICIC) and the enhanced ICIC (eICIC) schemes are used [50]. These schemes prohibit undesirable scenarios such that adjacent nodes allocate the same time and frequency resources with full radiation power to UEs located near coverage boundaries. As a result, for the management of time, frequency, and power resources, they use static or semi-static coordination among transmission nodes through X2 interface backhaul. Coordinated multipoint transmission (CoMP) is a promising approach for intercell CCI mitigation, which has been included in Third Generation Partnership Project (3GPP) Release 11 specifications [50]. On the other hand, power control/allocation can be applied to reduce the interference among concurrent D2D transmissions and consequently improve the total network EE. In addition, it can be utilized to mitigate the crosstier interference between D2D and cellular users. There are different methods that can be used to perform joint power allocation in HetNets. In [51], the power allocation problem in HetNets was formulated as a Stackelberg game with MBSs as leaders and FBSs as followers. The authors of [52] proposed a power allocation algorithm in HetNets with uncertainty of channel gains. They adopted the framework of a non-cooperative game among FBSs considering constraints on the expected SINR at each macro-user terminal. The authors of [53,54] stressed the power allocation problem of HetNets. The authors of [53] studied the downlink power allocation problem of HetNets consisting of FBSs and MBSs. They formulated the power allocation problem of the FBSs as a non-cooperative game model under the constraint of the outage probability of macro-UEs. In [54], the authors jointly investigated time domain and power domain optimization of a two-tier macro-pico HetNet. The authors of [55] proposed a distributed BS association and power control scheme for HetNets with the aim of maximizing the sum rate across the network.
Finally, the decoupling of user data and the practical control system is an essential design principle for future wireless access. The latter includes the requisite information and procedures for a device to obtain access to the system. The use of a software-defined radio access network (SoftRAN) [56][57][58] can increase efficiency in the management and control of the networks. For the management of ongoing D2D communications in each BS's coverage area, our proposed approach can use one or more SoftRAN controllers in the cellular infrastructure. Each controller keeps track of users' registrations and details about their locations, as well as possible establishment of D2D communication. Such information allows the controller to determine the beginning of a D2D communication and send messages to the devices involved, allowing them to begin/establish a direct communication, and allocating network resources. The status of D2D communication is also monitored by the controller. It reconfigures the UE and network entities to return the communication to the cell infrastructure and ensures the sessions' consistency if the link is lost (for example, due to a change in location).

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

Denoting
, , , and as the area of the entire network, number of users in the entire network, and average number of -th tier BSs and -th tier users, respectively, we obtain = and = . As defined earlier, is the association probability. From the relations, the number of users per BS in the -th tier is given by

A.2. Derivation of
We begin with obtaining the Laplace transform of the random variable , i.e., the aggregate interference power from the concurrent cellular downlink transmissions of all tiers received at the D2D transmitter located at the origin, Using the definition of the Generating functional for the PPP [41], and by translating the point process into polar coordinates, the above expression will become in which , λ is the set of BSs in tier that use channel and = Г( Then, following the proof in [27,59,60], and according to the definition of , Equation (35) can be easily verified.

A.3. Derivation of
Overlay mode: From the expression of in Equation (41), we have = 2 exp (− ) ln 1 where ℎ represents the exponentially distributed channel between the tagged user and its serving BS from the -th tier. We denote by , the serving (tagged) BS of tier . The term ∑ … ∈ = ( ) is the aggregate interference from all tiers' interfering BSs (that use channel ) at the tagged user. In addition, is the exponentially distributed channel between the -th interfering BS in the -th tier, and is the distance of the -th interferer in the -th tier (i.e., captured by the point process Φ ) from the tagged user. Notice that Φ ( ) is the point process of BSs (in tier ) that use channel . According to the fact that [ ] = ℙ[ > ] d when > 0, the above expression is rewritten as follows: where ℒ ( ) is the Laplace transform of the random variable ( ), and it is given in Equation (43) (please refer to [11]: Appendix A, for the detailed derivation of ℒ ( ) ). Finally, having considered an interference-limited regime ( → 0), we obtain the expression in Equation (42). Underlay mode: Similarly, from the expression of in Equation (41) where ℒ . ℒ is given in Equation (46). Finally, considering an interference-limited regime ( → 0), we obtain the expression in Equation (45).