A Survey of Resource Management in D2D Communication for B5G Networks

Due to the vast rise of users, the variety of application requirements, and the enormous necessity for ubiquitous connectivity anytime and anywhere, integration of new technologies and ideas are required. Therefore, Device to Device (D2D) communication technology has been regarded as a critical concern for Beyond Fifth Generation (B5G) networks. In the D2D technology, devices in close proximity may connect without using a Base Station (BS). Consequently, improving the capacity and performance of traditional networks. The major objectives are to accomplish a high geared data rate, increase the network coverage with low latency, and improve Energy Efficiency (EE) and Spectrum Efficiency (SE). However, the coexistence of D2D technology in the traditional network can pose many issues and challenges, such as power control, interference, spectrum access, security, and mode selection. Consequently, a comprehensive survey that includes an investigation of the current issues in D2D technology is required. In this survey, we present a new categorization of the most important aspects of resource management in B5G D2D communication, such as power allocation, spectrum allocation, interference management, and mode selection. Furthermore, we discuss the limitations and open issues of the current techniques and propose a model approach and future directions for D2D communication in B5G wireless networks. Our survey aims to assist researchers in exploring and improving D2D communication within the framework of forthcoming wireless networks.


I. INTRODUCTION
The popularity of wireless communication raised in recent years due to the rapid increase in data starving applications and smart devices [1]. Many emerging technologies and services, such as hologram technology and the Internet of Everything (IoE) have needed a massive data rate and low latency [2], [3]. In the 5G networks, the insufficiency of resources is causing a barrier to increase wireless communications capacity [4], [5]. Therefore, Better telecommunications platforms are required to accommodate these enormous data exchanges [6]. Researchers and industries focused on The associate editor coordinating the review of this manuscript and approving it for publication was Faouzi Bouali . developing sophisticated technology [7], [8]. Hence, network densification is a strategy to increase network capacity and area SE by supporting massive data traffic [8], [9]. This densification strategy can be attained by low-power node establishment, such as (femtocells, microcells, etc.) spaced at short distances [10], [11]. This is expressed in a variety of ways in 5G and beyond wireless technologies, such as (heterogeneous networks (HetNets), cognitive radio networks (CRNs) technology, ad-hoc networking, cloud-radio access networks (C-RANs) technology, millimeter-wave (mmWave), D2D technology, etc.) [12], [13], [14], [15], [16], [17]. These technologies have aided B5G networks in meeting current network performance requirements [18], [19]. In B5G, so many infrastructures must be placed within proximity [20], [21].
Researchers have developed an efficient solution in B5G networks by using D2D technology. D2D is a crucial feature of the upcoming B5G wireless network [22], [23]. In a cellular communication network, D2D technology implies data transmission between two devices directly without the involvement of BS or an access point [24], [25]. Peer-to-peer (P2P) communication is another name for D2D communication [26]. It is also seen as a promising technology that could significantly impact increasing capacity and typical data rate, increasing spectral efficiency, extending the network coverage, reducing latency, and enhancing power efficiency and cost [27], [28]. The D2D technology provides high-speed data transmission. Unlike conventional cellular networks, D2D technology can operate with or without the existence of a BS [29], [30]. Moreover, D2D-based B5G network technology emerges as the most appropriate option for offering rapid deployment and self-management communication with peer users during natural disasters such as floods, earthquakes, and tsunamis [31].
Furthermore, D2D communication provides two possible links to associate [32]. First, direct link (line of sight). Second, indirect link or multi-hop communication (non-line of sight) or a hurdle impedes communication between devices. Once the communication is established between two devices, the offloaded data will be shared between the network's devices, mitigating the network load [33], [34], [35]. As a result, the D2D communications functions, properties, and features have provided opportunities for substantial research investigation in the future B5G network community. Fig. 1 shows a common D2D communication scenario in B5G networks. However, the coexisting of D2D technology underlaying cellular networks has many advantages in terms of network coverage [36], [37]. D2D communication and cellular networking services should operate together to support each other [38]. Unmanned ariel vehicles (UAVs) and mobile edge computing (MEC) have been regarded as interesting and promising solutions in B5G communications [39], [40]. In the former, UAVs are utilized as flying base stations to expand the range and capacity of current wireless networks. In order to support wireless networks and improve their Quality of Service (QoS), UAVs may be deployed rapidly and effectively due to their flexibility and mobility [41]. In the latter, MEC allows users to offload computational tasks to the edge server [42], which may reduce device costs and improve QoS [43]. However, the presence of D2D technology in the B5G network plays a vital role in assisting MEC and UAVs to enable communications when conventional terrestrial networks are damaged or infeasible [44].
In addition, Vehicle-to-Vehicle (V2V) and Machine-to-Machine (M2M) are the main communication scenarios that map into the idea of D2D technology. V2V is a type of communication technology that facilitates the exchange of information and signals between vehicles to implement road safety protocols. M2M communication refers to the process by which machines may transmit data to other devices through a network with little involvement from humans such as industrial instrumentation.
Resources management is an important topic that should be considered when D2D communication is designed. In B5G, the resources management of the D2D wireless communication networks, such as (power allocation, resource allocation, interference management, and mode selection) are critical to guarantee the data is effectively received by the destination. Power allocation plays a substantial role in guaranteeing a stable connection for D2D users [45]. Power allocation is a controlling process for the power levels of the BS and user equipment (UE) during Downlink (DL) and Uplink (UL) transmissions [46], respectively. Mobile devices have limited energy resources for their critical data transfer operation [47]. Therefore, when the device's battery runs out, the connectivity suffers from packet losses [48]. In addition, the unpredictable change in the positions of devices increases connection failure probability in the link between the transmitter and receiver devices [49], [50]. Due to a connection failure, the data must be resent via another link, hence additional spectrum is required [51]. Furthermore, frequency reuse might cause significant interference such as (inter-cell and intra-cell) if not controlled effectively [52]. Hence, users are assigned an optimal power level to achieve optimal performance and a larger data rate simultaneously [53], [54].

II. RELATED WORK AND CONTRIBUTION
Thefield of academia has paid extensive attention to D2D communication in the last decade. It is a viable solution for lowering the load on the BS by letting nearby devices communicate directly. In addition, D2D is a viable approach for extending coverage to cell edges and dead zones via relaying. Furthermore, enhancing both the performance of the network and the QoS. On the other hand, in order to effectively deploy D2D communication technology, a number of problems must be resolved. D2D technology needs efficient power and spectrum allocation algorithms, advanced interference mitigation methods, and intelligent mode selection and mobility strategies [67]. Many research investigations in D2D communications have been introduced to realize different aspects of D2D technology. However, many issues and aspects need to be investigated and addressed.
In [68], the authors present a new frequency and controlbased categorization for significant D2D communications research studies. Each category has two subcategories (inband and out-band). then, they address D2D topologies, applications, and protocols. In [69], the authors introduce D2D technology underlaying cellular networks and provide a comprehensive study relative to optimization methodologies utilized for allocating resources in the D2D paradigms. Furthermore, they categorize relevant research based on various optimization goals that are considered. In [70], the authors present an overview of resource allocation strategies used in D2D communication. Then, they address an optimization categorization in terms of goals, limitations, and solutions. In [71], the authors present an overview of use case schemes in D2D communication and classify them into commercial and public safety application services. Moreover, they discuss power efficiency, spectrum allocation, and mode selection as the most important challenges. In [72], the authors introduce a short overview of D2D communication including use cases, framework, and technical issues. In [73], the authors introduce a comprehensive review of the existing research literature by considering power allocation, spectrum allocation, and network security which are responsible for its deployment and implementation. In [74], the authors investigate a comprehensive survey of radio resource management techniques for vehicular applications based on D2D communication. They describe the concept of D2D communication extensively. Furthermore, they highlight the prospective related work issues. In [75], the authors present an extensive review of the literature done on D2D health care applications. They focus on power allocation, resource allocation, and security which are associated with D2D communication. in addition, they conduct an assessment of current solutions, outlining both their advantages and limitations. In [76], the authors introduce a detailed review of existing D2D techniques as well as their features which include security, device discovery, mode selection, power control, and interference cancellation. Furthermore, they provide a summary of the available solutions by identifying the research challenges and recommended solutions.
In [77], The authors investigate the privacy and security of D2D communication, which are both interrelated and fundamental factors of the technology. They provide a comprehensive review of the most recent developments in techniques that improve D2D communication in terms of both security and privacy. They address open issues and indicate potential future directions in system design by providing concise summaries of relevant challenges, objectives, and features across several proposals. In [78], the authors provide a comprehensive review of D2D communication types and their respective supported architectures. They identify hurdles that must be overcome before D2D communication can be fully implemented. Furthermore, they discuss many algorithms in D2D communication. Finally, they suggest an architecture for providing optimum resource allocation to D2D communication underlying cellular networks.
In [79], the authors provide an in-depth survey of the current D2D technologies and their features, such as mode selection, resource management, device discovery, security, and mobility management. The advantages of D2D in future 5G technologies have also been demonstrated. In [80], the authors present a literature review on the topic of social networks and D2D communication convergence. They examine the aforementioned convergence from three distinctly different perspectives: mode selection, relay discovery, and spectrum allocation. In [81], the authors investigate the mobility factors of D2D communication, that are essential for the implementation and deployment of D2D technology. They provide a comprehensive survey of the issues in the existing research as well as the solutions that correspond to these issues in order to encourage the use of mobility to support D2D communication. Particularly, they outline the benefits of mobility-aware D2D communication by distinguishing the mobility models, challenges, objectives, and characteristics of various approaches. Moreover, they highlight open issues and future direction in real contexts applications of D2D communication. In [82], the authors present a detailed review of routing schemes that are used in multi-hop D2D communication. they aim to investigate the characteristics of routing protocols. they present a categorization of routing techniques that will aid in choosing a routing strategy according to a particular user and network demands. The history and the performance advancement of D2D communication are discussed. They provide an analysis of why the uplink frequency range is an appropriate choice for D2D communications. Finally, they discuss and highlight the open issues and future research directions.
Nevertheless, none of the aforementioned surveys focuses on D2D resource management techniques by considering four major aspects: power allocation, spectrum allocation, interference management, and mode selection. Additionally, in our survey, in-band and out-band spectrums are considered, while in the above surveys, the authors investigated the inband spectrum. Furthermore, our survey is up to date and investigates the recent open issues and challenges. In addition, our survey provides new perspectives and classification to previously published studies, which lead us to investigate open issues. Therefore, we introduce an extensive and novel survey in which all the recent work investigating D2D communication is summarized and organized clearly and concisely. Moreover, we propose new solutions to overcome the constraints of D2D communication in B5G wireless networks. Specifically, the following list summarizes the most important contributions presented by our survey: • Introduce an extensive description of D2D spectrum classification and explain the importance of using D2D communication technology for B5G wireless networks.
• Present a comprehensive and innovative categorization of D2D communication considering four aspects of resource management: power allocation, spectrum allocation, interference management, and mode selection.
• Highlight and discuss the major issues in the existing methodologies of the resource management aspects. Thereafter, propose optimal solutions and future directions to tackle the current issues.
• Identify research challenges and open issues that might require future research investigation. In addition, propose a model approach for D2D communication in B5G wireless networks.
The rest of the paper is organized as follows: Section II reviews the recent literature on resource management in D2D communication and the contribution of the survey. Section III explains the spectrum classification of D2D communication. Section IV comprehensively introduces the resource management aspects of D2D communication such as power allocation, spectrum allocation, interference management, and mode selection. In addition, this section provides a discussion about the recent work proposed by various researchers on the resource management aspects. Moreover, this section highlights the open issues of the recent work. Section V presents the open research challenge of D2D communication. Section VI highlights the lesson learned. Section VII explains a proposed model approach of D2D communication in B5G networks. Finally, the conclusion of the survey is introduced in section VIII.

III. D2D SPECTRUM CLASSIFICATION
Licensed and unlicensed spectrums are the two primary types of spectrum utilized in D2D technology, which can also be called in-band and out-band, respectively [83]. Furthermore, resource control is managed in two ways: controlled and independent [84]. Fig. 3 illustrates the spectrum classification in D2D technology.
Controlled communication and autonomous communication are two types of D2D communication [97]. In the former case, the cellular network is in charge of and controls the D2D communication. Thus, the SE, system performance, and network reliability will be improved. In the latter, as opposed to cellular communication, which is handled by the cellular network, D2D link is managed by the transmitter and/or receiver devices is the critical task [98].
On the other hand, mmWave-based D2D communication has grown in popularity due to its high capacity and attainable bandwidth [99]. The mmWave frequencies in the 30 GHz to 300 GHz range are preferable since D2D communication is mainly used over relatively short distances [100]. Smaller antennas operating at such a high range frequency can generate directional beams, which in turn paves the way to effective D2D communication [101]. Nevertheless, mmWaves have very significant attenuation, both in free space and in particular when passing through obstacles. Visible light communication (VLC) has been receiving a lot of interest as a promising technology [102]. Since the visible light spectrum with a frequency range of 400-800 Thz can support highspeed data transmission, VLC is suitable for short-distance D2D communication [103]. VLC has many advantages such as free spectrum utilization and limited propagation [104]. Moreover, VLC may be easily implemented with commonly available, low-cost visible light sources like Light Emitting Diodes (LEDs) [105]. Nevertheless, VLC has drawbacks such as blockage sensitivity and coverage limits [106].

IV. RESOURCES MANAGEMENT ASPECTS OF D2D
Resource management consists of algorithms and techniques, including transmission power, sub-channel allocation, data rate optimization, and handover. D2D communication aims to improve SE and EE by using the cellular network infrastructure [107]. Network performance in terms of SE and EE may be greatly enhanced by the use of appropriate power allocation for DUs and the proper allocation of available subchannels. In addition, selecting the best communication mode also influences network performance and improves the QoS. Furthermore, controlling and mitigating the interference from neighboring DUs and CUs will increase the system throughput. Thus, power allocation, spectral allocation, interference management, and mode selection must be managed properly to implement the D2D technology in the B5G cellular networks. Fig. 4 illustrates the resource management aspects of D2D in B5G networks.

A. POWER ALLOCATION
Power allocation is crucial in D2D communication technology over B5G networks [108]. DUs need an acceptable range of power levels to achieve optimal network performance and increase the data rate simultaneously [109]. In addition, there is a need to improve a device's transmission power since it can also raise link capacity [110]. However, this will cause an increment in the interference among spectrum-shared devices [111]. Power control has many benefits, such as reducing power consumption and improving the system throughput [112]. Many parameters must be considered to obtain an optimal power allocation, such as the number of RBs, channel path loss, maximum transmit power, and battery life [113]. The following is a compilation of current research on the schemes of power allocation in D2D networks for different access strategies.

B. FDD
A full-duplex communications connection may be established using frequency-division duplexing (FDD), which employs two RF signals for transmitting and receiving [114]. The sender and receiver are often assigned to separate channels when using FDD. the following is a review of current research on FDD-based power allocation over the B5G cellular network. In [115], the authors aim to maximize EE in D2D communication while considering both D2D pairs and CUs' QoS. A hybrid network based on FDD has been considered and analyzed. Under the power restrictions and Signal-to-Interference-plus-Noise Ratio (SINR), the authors derive an optimal EE formulation. The optimization problem is posed in the form of a Mixed-Integer Nonlinear Programming (MINLP) issue, which is notably difficult to resolve. Therefore, the optimization issue is broken down into its component sub-problems of power and channel allocation. First, to optimize the energy efficiency of D2D pairings and guarantee CUs SINR, the authors propose a power management technique based on the Lambert W function. Second, they propose a Gale-Shapley-based channel allocation algorithm to improve both CU SINR and D2D EE. The channel allocation technique makes use of the optimal power allocation values to match D2D pairings with CUs. In the underlay in-band mode, D2D pairs are regarded as reusing the uplink channel of CUs. Gale-Shapley algorithm and heuristic algorithm are compared with the presented method. The outcomes of the simulations show that the D2D EE, D2D rate, and the system EE of the proposed algorithm outperform the others. Furthermore, it is observed that the EE reduces with increasing D2D communication distance and rises with increasing D2D communication link. However, the interferences between the D2D receivers do not consider and it will cause network performance degradation.
In [116], the authors investigate relay-assisted D2D communications that include relay selection and power allocation challenges in a two-layer underlying cellular network in which DUs share resources with CUs in the uplink scenario. They investigate the Power allocation issues to improve the energy efficiency of D2D communication enabled by relay assisted in emerging applications of IoT. Furthermore, to enhance the EE of relay-assisted D2D communication transmissions, they propose a power allocation model based on the Particle Swarm Optimization (PSO) algorithm for distributing power between the D2D source and relay. The proposed power distribution technique is shown to significantly increase EE over existing systems in simulations.  Nonetheless, the network's overall power consumption will rise due to power distribution among a variable number of sources.

C. OFDMA
The multi-user variation of the Orthogonal Frequency-Division Multiplexing (OFDM) system is called the Orthogonal Frequency-Division Multiple-Access (OFDMA) which allows for simultaneous data transmission from numerous users by allocating subsets of available resources to distinct users. The following summarizes current research on OFDMA-based power allocation over B5G cellular networks. In [117], the authors propose a distance threshold-limited allocation scheme to establish cellular and D2D links in a mmWave OFDMA cellular network. They use a stochastic geometry model for the suggested allocation scheme to calculate the coverage probability, mean interference, area SE, and network EE. The recommended association system is tested and compared to the performance of two other association schemes: one based on the minimum path loss (Min PL) and another based on having the maximum biased received power (Max BRP). The presented scheme is shown to have the best coverage probability performance in noise-limited networks, whereas the performance of the other three schemes converges in interference-limited networks. Moreover, the proposed approach increases SE and EE by up to 60% in contrast to the next highest-performing Min PL-based solution. On the other hand, to maximize the network's SE and EE, the authors propose a goal-attainment technique. Under the condition of a line of sight (LoS) link, the algorithm takes into account the transmit power of the base station and the users and the allocation of resources between the cellular and the D2D layers. The algorithm's performance is examined under various network load scenarios and compared to a baseline scheme where the BS transmit power, user transmit power, and bandwidth allocations are all kept constant across all tiers. The simulation results show that the proposed algorithm greatly decreases both the objective function and the power consumption. Nevertheless, Non-Line of Sight (NLoS) links are not considered in the proposed scheme.
In [118], the authors investigate a power allocation issue for D2D communication enabling cellular networks to increase spectral efficiency. The power allocation issue is handled by distributing the optimum amount of power to the D2D transmitters with the least amount of interference possible. Furthermore, this efficient power allocation solution enables numerous D2D communications to share the available cellular resources in the uplink scenario. The analysis is expanded to include an EE analysis of the whole system, which considers total circuit power consumption. Based on simulation findings, it is clear that the suggested power allocation strategy boosts EE and network throughput substantially. Future work may include evaluating the total system sum rate. Nonetheless, the effect of interference among multiple D2D pairs needs to be considered to enhance the network performance significantly. Moreover, in [119], a power allocation challenge for energy-harvesting D2D communication enabling a cellular network in the downlink scenario is investigated. The authors aim to improve the network total sum rate by taking into account factors such as the frequency reuse between D2D and cellular communication, QoS, and the limits of energy harvesting for D2D links. In addition, the maximum power of the BS and the sub-carrier is considered. They formulate the issue as MINLP, which results in a hard problem to solve. Energy Harvesting and Gain based Resource Allocation (EHGRA) algorithm is suggested based on the BS power and the energy harvested by the transmitters to distribute the optimum power to the D2D and CU users. Comparing the proposed algorithm to the offline joint optimization algorithm through simulation demonstrates its superior performance. Furthermore, enhanced the total network sum rate with low complexity. However, the proposed algorithm can only be used in a situation in which there is simply one cell and one BS.
In [120], the authors formulate a downlink power allocation and user clustering issue for networks with both NOMA-based CUs and OFDMA-based DUs. The primary purpose of this paper is to maximize the system's total sum rate. Furthermore, they also aim to protect CUs from interference. The problem as stated is a mixed-integer nonconvex optimization problem, which is hard to solve. So, the original formulated issue is broken down into two separate issues. First, the user clustering sub-problem is solved using a low-complexity matching game that operates in a sequential manner using one-to-many matching games. Second, complementary geometric programming (CGP) and arithmeticgeometric mean approximation (AGM) techniques are used to address the power allocation subproblem. Finally, an efficient iterative joint optimization approach is provided to get to a near-optimal solution for the given issue. Scalability, distributed processing, and stability are all features of the proposed architecture. Average sum rate comparisons are made between the proposed algorithm and both conventional OFDMA and general NOMA. Results from simulations reveal that the suggested scheme is superior to both general NOMA and traditional OFDMA schemes. Moreover, the algorithm that has been presented improves the connectivity of the network in terms of the number of users that are permitted access. Nevertheless, the proposed framework does not consider co-tier interference between D2D pairs.

D. NOMA
Non-Orthogonal Multiple Access (NOMA) allows numerous users to access the same frequency spectrum, but each user is given an individual power level. The following is a review of current research on NOMA-based power allocation over the B5G cellular network. In [121], a cellular uplink network with a NOMA-based D2D downlink has been investigated. the authors introduce a resource allocation approach based on joint subchannel allocation, power control, and user pairing in order to reduce the overall transmitted power for the network users. The optimization problem is an MINLP that can be solved in three steps. First, they propose a heuristic algorithm to distribute subchannels for D2D users. Second, they propose a pairing diversity-based method (DBM) to reduce the interference effect on both DUs and CUs. Finally, they maintain the SINR for CUs and DUs while minimizing the overall transmit power of all users. The simulation results demonstrate the significance of subchannel allocation and user pairing in reducing the total transmit power of all users in the network. However, the subchannel allocation algorithm outperforms the user pairing approach in terms of overall network transmit power reduction. In addition, the number of CUs and DUs is limited.
In [122], the authors propose a new joint optimization approach for NOMA-based D2D communication. They aim to improve power allocation and resource block (RB) allocation to boost D2D communication performance. In the case of the NOMA-based CUs, a Successive Interference Cancellation (SIC) decoding procedure is being considered. Using a framework known as Distributed Decision Making (DDM), the original issue formed is divided into two different issues. First, a Differential Evolution (DE) approach has been proposed to attain the RB assignment for D2D pairings and the optimum CUs-based NOMA group for an RB assignment issue with integer variables. Second, they propose a heuristic technique for finding the power allocation of NOMA-based CUEs with fixed D2D power allocation to solve the power allocation issue. Then, near-optimal power allocation for D2D pairings is obtained using DE and the Sequential Convex Approximation (SCA). The findings from the simulation prove that the proposed strategy is effective, scalable, and has a fast rate of convergence. Furthermore, the performance of the presented algorithm is superior to that of conventional orthogonal multiple access (OMA) technology in both EE and sum rate. Nonetheless, no optimization of power allocation occurs during high-power D2D transmissions. Furthermore, in [123], the authors investigate the challenge of power allocation for downlink single-cell scenarios using NOMA-based D2D communication in a cellular network with imperfect Channel State Information (CSI). The authors aim to allocate the optimal power for DUs. With the goal of optimizing power allocation, they present a convex programming-based power allocation method. In the case of imperfect CSI, the authors utilize the Markov inequality and Marcum Q-function to evaluate the channel gains under the outage probability constraints. Then, successive convex programming converts a probabilistic non-convex optimization problem to a standard convex optimization problem. Moreover, the proposed algorithm uses a Lagrangian dual multiplier approach and Karush-Kuhn-Tucker (KKT) conditions to iteratively determine the sub-optimal power allocation coefficients for the optimization issue. from the simulation results, it is clear that the suggested method improves upon the state-of-the-art in terms of both convergence performance and sum-data rate. However, the proposed algorithm does not consider the interferences among DUs. Moreover, the network is restricted to a single cell and single BS.
In [124], the authors investigate the issue of resource allocation for mmWave NOMA-based D2D communication enabling a Multiple Input Multiple Output (MIMO) cellular network's downlink scenario. They aim to enhance the spectrum efficiency of the network while simultaneously guaranteeing QoS for CUEs and D2D pairs and providing interference mitigation for CUEs and DUEs. The formulated problem is MINLP, which is the resource allocation problem. Therefore, they divide the formulated problem into three separate problems: user clustering, power allocation, and beamforming. An algorithm for power allocation based on PSO has been suggested to optimize spectral efficiency while simultaneously protecting CUEs from intra-cluster interference caused by DUETx and ensuring QoS for D2D pairs and CUEs. Compared to conventional D2D communications, the simulation results demonstrate that the proposed method offers better SE and EE. The technique that has been described may be modified in the future to take into account an uplink situation. Nonetheless, imperfect CSI and its effects on the Network are not considered by the suggested method.
Moreover, in [125], the authors investigate a MEC system that uses D2D and NOMA for uplink cellular communication.
To minimize the overall power consumption and transmission delay experienced by all users, the allocations of resources, power, and channels are optimized jointly. Multivariate fractional summation has a complex structure that makes solving the optimization issue challenging. Therefore, in order to better understand how the three variables in the optimization problem interact, they decouple it into three separate issues: computing resources, power allocation, and resource allocation. First, an adaptive method is proposed for determining the optimal solution in terms of computer resource allocation. Second, in terms of power allocation, they provide a unique power distribution strategy based on PSO for a single NOMA group composed of various CUs. Then, they theoretically derive the optimal power allocation interval for the matching group of NOMA and D2D pairings and provide a PSO-based method for resolving it. Finally, they present an algorithm for many-to-one matching that generalizes an earlier algorithm for one-to-one matching that used the Pareto improvement and swapping operations for channel allocation. Lastly, they offer a scheduling-based approach that simultaneously allocates computing resources, power, and channels to maximal joint optimization. The results of the simulation show that the suggested strategy has the potential to successfully decrease the weighted total of all users' power consumption as well as their delay. Nevertheless, it is essential to investigate distributed power and channel allocation algorithms for D2Dassisted and NOMA-based MEC systems to reduce the number of information interactions between base stations and users.
In [126], the authors develop an efficient power allocation technique to improve the network throughput of single-carrier NOMA-based D2D communication in a downlink scenario with imperfect SIC. The optimization objective is to optimize the D2D data rate within the QoS of CUs and trans- mitter power restrictions. Problem formulation is converted to a convex optimization problem. Next, they used a subgradient method to update the dual variables and suggest a dual theory to attain an effective solution. The suggested optimization scheme is compared to NOMA and OMA-based D2D communications. Results from the simulation demonstrate that the suggested method outperforms the baseline and improves fairness among the DUs in the other schemes. Furthermore, as the value of the imperfect SIC component rises, the data rate of D2D communication reduces, demonstrating the necessity for accurate SIC decoding. Moreover, the proposed scheme has low complexity and converges after finite iterations. However, throughput may be improved by considering MUC (multi-user multi-carrier) communication. The recent studies of the power allocation investigations have been summarized in Table 1.

E. SUMMARY
Briefly, some recent works on the power allocation for D2D communication in B5G networks are presented. The techniques, advantages, and limitations of the current research are highlighted. Furthermore, the recent works are categorized based on the frequency access techniques such as FDD [115], [116], OFDMA [117], [118], [119], [120], and NOMA [121], [122], [123], [124], [125], [126] as illustrated in fig. 5. The reviewed articles aimed to enhance the EE, total sum rate and to reduce the network interferences. However, various limitations of the current research such as co-tier interference, perfect CSI, and distributed power allocation still need more attention and consideration.

F. SPECTRUM ALLOCATION
In B5G, D2D technology is utilized to address the challenge of rapidly increasing data traffic. Radio RBs are reused in this technology to improve SE while guaranteeing the QoS in an ultra-dense network [127]. To clarify, D2D communications reduce a BS's traffic load, and the available cellular resources can be reused by a pair of D2D [80]. The most critical aspect of assigning available resources is to reduce the co-channel and cross-channel interferences among nearby UEs [128]. In addition, the D2D performance might be influenced due to the uncontrollable interference caused by some wireless technologies like (Bluetooth and Wi-Fi) [129]. The following is a summary of current research on spectrum allocation in D2D over a 5G network for in-band and out-band spectrum.

G. IN-BAND
In this part, we presented some of the recent studies that consider the in-band spectrum. In [130], the authors propose a resource allocation algorithm. First, they organize a set of DUs by their present distribution, and then by communication needs priority and user mode assignment. The optimal resource allocation has been achieved by evaluating the signal-to-noise ratio in orthogonal, multiplex, and cellular modes. The authors took into account the DUs' channel quality, the variation in distance between DUs, and the distance between the DUs and the BS. Two-mode selection has been considered. First, orthogonal and cellular modes selection, second, multiplexing and cellular modes selections. The Signal to Noise Ratio (SNR) of DUs in the orthogonal mode is shown to be much greater in the simulation results than the SNR achieved in the cellular mode for the first mode option. For the second mode selection, while the SNR in multiplexed mode is often higher than in cellular mode, there are certain users for whom the SNR in cellular mode is larger. Two-mode VOLUME 11, 2023 selection strategies demonstrate higher system throughput than the traditional mode (cellular mode). The multiplexing mode optimizes the spectrum to use as well as maintains high communication quality. Nonetheless, resource multiplexing will cause interference among users and degrades the user experience. Furthermore, the system becomes more complex and time-consuming when several D2D pairings are allowed to use the same resources in a multi-cell environment.
In [131], currently deployed cellular networks are examined based on the performance of cell edge users. Cell edge users suffer when the content is directly uploaded to the BS because of the poor quality of the communication link. This necessitates a larger number of RBs as well as more upload time. Thus, reducing the network throughput. The authors propose an effective resource management scheme in the uplink scenario by taking advantage of D2D communication. The proposed scheme aims to decrease cell edge upload time and RBs. This scheme consists of two cases. First, a multihop (two-hop) communication system involves a new relay selection strategy to enhance communication link quality. Second, an efficient resource allocation strategy is utilized in multi-hop communication to minimize upload time, packet loss, and RBs, while increasing the system throughput. In this paper, two modes of communication are considered: D2D mode from the edge users to the nearby relay device and cellular mode from the relay device to the BS. In the D2D mode, the edge user search for a nearby relay device by broadcasting a beacon signal if nearby devices are accessible. Thereafter, while operating in cellular mode, the relay device connects through the BS. SINR and reliability are considered while selecting a relay. On the other hand, the BS allocates the RBs for CUs and DUs based on their instant CSI. Moreover, a suitable number of RBs are allocated using single carrier frequency division multiple access (SC-FDMA) in the uplink scenario and a Rayleigh fading channel is considered. The proposed scheme is compared to max-min and D2D-Based Uploading Resource Block Minimization (DBU-RBM). Results from simulations reveal that the suggested system has higher throughput than DBU-RBM, max-min, and conventional cellular communication. Nevertheless, the relay should be selected, and the device layer should allocate the resource to decrease the burden on the BS side and improve the network throughput.
In [132], the authors investigate joint spectrum allocation and power allocation issues for D2D communication supporting a cellular network's uplink scenario. This paper aims to improve spectral efficiency and EE while mitigating the interferences between DUs. They formulate the optimization problem as an MINLP joint optimization for the RBs allocation and the power control. Furthermore, the author provides a two-step decomposition technique to address the power control and spectrum allocation problems separately. First, a classical optimization method is used to tackle the power control issue. Second, by applying a matching method, the spectrum allocation issue is solved. Moreover, the two optimization problems are solved iteratively. The simulation results show that this mathematical approach enables us to build the network in such a way that EE is maximized while maintaining rate and power limits. The system's performance is nearly optimal, and the level of complexity is within reasonable limits, in terms of EE. In addition, the proposed algorithm outperformed the exhaustive search and the iterative matching-based algorithms in terms of EE and sum rate. Nevertheless, the proposed method does not consider the CSI at the transmitter to reduce the computational complexity. Moreover, partially or fully distributed implementations of the proposed algorithm need to be investigated. Furthermore, in [133], for the uplink scenario of HetNets, the authors investigate the resource allocation issue for D2D communication. To increase the network's EE and throughput, they formulate a new optimization problem to boost the data rate of D2D and CUs. Since it was formulated as an MINLP problem, it may be divided into two distinct issues: first, the optimization problem considers a shared channel between CU and DU, which results in interference between DUs and CUs. Second, the optimization problem considers separate channels for the D2D pair and CUs, which result in no interference between DUs and CUs. After that, the authors proposed an ϵ-optimal based successive linearization algorithm to solve the optimization above problems. The proposed algorithm provides a near-optimal solution with ensured convergence. The simulation results show that when the channel is not shared between the D2D and CUs, the EE and the network's throughput are increased.
In addition, the proposed algorithm massively increases the network's EE, throughput, and security. Nonetheless, the proposed algorithm does not consider the power constraints for DUs. In [134], the authors propose a NOMA-based D2D communication method that jointly allocates power and subchannels. In the uplink scenario of D2D groups, the proposed method aims to optimize throughput and total EE. Kuhn-Munkres (KM) has been used to associate a channel for each D2D group, in which the D2D groups reuse the sub-channel of CUs by using a maximum matching problem of graph theory. In addition, an optimal power allocation algorithm has been formulated using Karush-Kuhn-Tucker (KKT) conditions to guarantee the transmit power and the communication quality of DUs in the D2D group. CUs connect with BS in orthogonal cellular mode, whereas the D2D transmitter uses NOMA to provide a signal to end-users. The proposed algorithm is compared to traditional D2D-based OMA and the current algorithms. Simulation findings demonstrate the presented technique outperforms conventional and state-ofthe-art methods in throughput and EE under different network environments. Nevertheless, the proposed technique does not consider the impact of various D2D receivers. In [135], for both underlay and overlay modes, NOMA-based cellular machine type communication (MTC) with SIC is proposed. The authors aim to maximize the sum rate and linked devices. Moreover, an uplink scenario with a single cell is considered. To optimize the total sum rate for CUs and MTC devices, the authors formulate a joint RB assignment, user grouping, and power allocation problems. Then, by using Quadratic Fractional Programming (FP), the formulated problem is transformed into a convex problem. After that, Using the augmented Lagrange multiplier (ALM) method, an iterative solution to solving the transformed problem is presented. Also, to alleviate the computation complexity of the FP technique, a low-complexity heuristic approach is provided. Exhaustive search (ES) and a conventional cellular network are used as benchmarks against which the presented algorithms are evaluated. Simulation findings show the new algorithm is better than the traditional methods. In terms of connectivity and total sum rate, the optimization approaches come near ES's optimal solution while consuming less transmission power. However, as the number of devices rises, network performance degrades. In [136], the authors present a D2D multicast (D2DM) scheme for use in cellular communication networks to facilitate local content sharing. By considering physical and social features in D2DM cluster forming, simultaneously improving power and channel allocation among D2DM clusters. In the case of the power allocation problem, a geometric programming optimization has been proposed. The optimized power for DUs and CUs that maximizes the system throughput could be found in a feasible region, which is specified by the limitation of maximum transmission power and minimum SINR. On the other hand, for the channel allocation issue, a bipartite matching algorithm has been presented as a means of determining the optimal allocation strategy. In addition, a Hungarian algorithm to avoid collisions is usually adopted. The simulation findings demonstrate that more D2MD clusters are formed when the social closeness requirement is reduced and that each D2MD cluster makes more efficient use of the spectrum. These facts jointly lead to system throughput enhancement. Nonetheless, they do not consider the caching of contents and the mode selection while performing D2MD content sharing since content recovery is often time and resource-consuming.
In [137], with the goal of optimizing system throughput while maintaining QoS for all CUs, the authors of this paper investigate combined resource and power control problems in a cooperative D2D HetNets. The DUs are considered to reuse the CUs resources in the downlink scenario. Relay selection for an idle user (IU) who functions as a relay node to assist a D2D communication link and RB allocation for IUs, DUs, and CUs are all part of the resource allocation issue. On the other hand, the power control issue attempts to reduce interference among users and boost QoS. The authors propose a quantum coral reefs optimization algorithm (QCROA) to optimize the system throughput of all D2D user and cellular user links while ensuring cellular user communication QoS. Simulation findings show the suggested technique outperforms competing methods for various system parameters. As future work, this study is applicable to a scenario with ultra-dense node diversity and a clustering technique. Furthermore, it is applicable to big data and smart grids. Nevertheless, it is not taken into account by the proposed algorithm that several D2D transmitters might cause interference for a single D2D receiver.
In [138], in order to effectively distribute spectrum resources for D2D multicasting communication enabling a cellular network, the authors investigate the spectrum allocation issue. With the use of important principles from cooperative game theory, they propose a unique two-stage resource allocation strategy based on weighted utilitarian and metabargaining solutions. First, they utilize weighted utilitarian bargaining to efficiently distribute spectrum resources across numerous CUs. In terms of overall system usage, this is the optimal configuration for the BS. Then, they utilize metabargaining to solve the problem of spectrum sharing between cluster header and content requesters. These two bargaining procedures are carried out consecutively and independently in order to discover the most viable solution. The simulation results state that the system performance improved in comparison with the current schemes. Particularly, performance indicators such as user fairness and system throughput are enhanced by around 5% -10% over current schemes. However, the proposed scheme does not analyze the impact of imperfect CSI on the optimum allocation of spectrum resources.
Moreover, in [139], the authors investigate the resource allocation problem for NOMA relaying network including the subcarrier user allocation, subcarrier pair, and power allocation. The relay can communicate with several users on a single subcarrier using NOMA technology. The authors formulate the joint resource allocation problem to improve the total throughput. Since there is a tight connection between the power allocation and the subcarrier assignment, the formulated problem is an MINLP problem that is notably hard to solve. They separate the issue that has been defined into two subproblems, subcarrier assignment and power allocation, to decrease the complexity. First, A heuristic technique for assigning subcarriers based on the simulated annealing (SA) algorithm that optimizes subcarrier-user assignment while maintaining fixed power allocation for each subcarrier pair. Then, the power allocation issue is framed as a DC programming issue. Therefore, they convert the nonconvex optimization problem into convex problems by using Taylor expansion. Finally, the approximation issues are optimized using the DC programming approach based on the Lagrangian dual method. The simulations validate that the proposed algorithm efficiently increases system throughput. Nonetheless, the proposed algorithm does not consider a full-duplex transmission relay.
In [140], the authors propose an algorithm for allocating resources in downlink NOMA-based D2D communication. The authors aim to increase system throughput while reducing NOMA-based cellular network interferences. The proposed algorithm consists of three algorithms: user scheduling, power allocation, and link selection algorithms. First, due to the complexity of the exhaustive search algorithm (ESA), a suboptimal strategy is presented to match the VOLUME 11, 2023 CUs and the DUs into different subchannels. Then, in order to minimize the interference caused by NOMA, a tree-based search method for allocating power has been developed. In particular, the data rates' geometric and arithmetic mean values are employed as objective functions in the tree-based search algorithm. Finally, it is proposed to ensure QoS for CUs and DUs by the use of a distance-aware link selection algorithm. Briefly, in addition to increasing system throughput, the presented resource allocation method has low computational complexity. In terms of data rate improvement, the simulation results demonstrate that the proposed method is superior to the conventional techniques. Furthermore, the authors examine the complexity cost and the convergence of the joint algorithm. However, the proposed method has no investigation of D2D receiver interference from multiple D2D transmitters.

H. OUT-BAND
In this part, we introduced some of the recent work that considers the out-band spectrum. In [141], the authors investigate the spectrum allocation and the optimal transmit antenna allocation in mmWave D2D communication underlaying cellular networks. The aim of this paper is to maximize the overall data rate of D2D users. They convert the MINLP into a continuous form, and then a new issue with linear constraints is designed by applying Lagrangian multiplier. A relaxing approach for Lagrange multiplier is proposed to achieve this goal of finding optimum transmit antennas and allocating appropriate channels to the UEs. Furthermore, a low-complexity greedy-based resource allocation and antenna selection are devised to verify the performance of the proposed algorithm. The simulation results show the efficiency of the proposed algorithm in terms of total data rate. In addition, the overall performance of the network is greatly boosted when each D2D pair is allowed to use multiple active antennas. However, the effective chosen antenna causes the underlay cellular user to experience an increased level of interference. In [102], the authors investigate the resource allocation problem for each D2D user in a hybrid RF-VLC network with the coexistence of CUs and DUs. they propose a game of exploratory coalition formation to increase the D2D total sum rate while satisfying the QoS demands of the CUs and DUs. First, they devise a priority sequence to help DUs choose the most suitable resources. Then, each D2D user has the option of achieving the switch operation based on the transfer criteria of the greedy strategy and the cooperative game. The simulation results show that the proposed algorithm achieves an efficient performance when compared to the exhaustive algorithm and outperforms various other realistic schemes when considering the throughput of the D2D communication. Nevertheless, users that do not adhere to the QoS criteria decrease the coalition utility, resulting in a negative impact on the choice to switch operations.
In [142], the authors investigate the resource allocation problem of D2D and multi-hop VLC in HetNets, where one or more mobile users may act as a relay to send data to other users that are in close proximity. The aim of this paper is to optimize data packet size, service pricing, and data rate of relays. they present a hierarchical game model and study the distributive tactics of the relays, the VLC service provider, and the cellular service provider. Sequential equilibrium solutions are identified for the data packet size, the data rates in various data transmission paths, and the service pricing. Moreover, each VLC transmitter chooses the most reliable path for transmitting data. The simulations demonstrate the great performance of the suggested solutions when combining VLC and D2D. Nonetheless, as the total number of users acting as relays rises, the optimum path for data to be transmitted from the VLC transmitter to the end mobile user changes in an unpredictable manner. In [103], the authors investigate the data transmission route problem for multihop VLC-based D2D HetNets. They propose a distributed reinforcement learning-based approach to find optimum datatransfer routes. By modeling the exchange of information between mobile users as an equilibrium issue with equilibrium constraints and using the alternating direction technique of multipliers to identify a solution, they obtain benefits for the reinforcement learning-based approach. simulation results demonstrate that the proposed approach improves the attributes of a typical indoor VLC-D2D HetNet in a downlink scenario. Moreover, the transmission data rate is improved with a minimized time delay. However, adding more entities and more learning steps will raise the processing time correspondingly.
In [143], the authors investigate the challenge of deciding whether to employ VLC or RF for single D2D pairings in a multi-user environment to minimize outage probability while increasing the sum rate of D2D pair. Based on inter-pair interference, they devise a centralized, low-complexity heuristic algorithm to decide whether a given D2D pair should use the RF or VLC band. They use directed weighted graphs obtained from graph theory to make sense of the interference between the D2D pairings. Based on the simulation findings, the suggested algorithm is superior to the state-of-theart methods in terms of outage probability, total sum rate, and energy efficiency. Furthermore, the proposed algorithm has substantially lower complexity costs than the exhaustive search approach. Nevertheless, the complexity of the network increases in direct proportion to the number of D2D pairs. The recent studies of the spectrum allocation investigations have been summarized in Table 1.

I. SUMMARY
In summary, some recent works on the spectrum allocation of D2D communication in B5G networks are outlined. The techniques, advantages, and limitations of the current research are highlighted. Moreover, the recent works are classified based on the frequency bands that have been used such as in-band [130], [131], [132], [133], [134], [135], [136], [137], [138], [139], [140] and out-band [102], [103], [141], [143] as shown in fig. 6. The reviewed papers aimed to enhance the SE, user fairness and improve the spectrum reuse. Nevertheless, several limitations of the current research, such as centralized spectrum allocation, computational complexity, and interference management, still need more attention and consideration.

J. INTERFERENCE MANAGEMENT
Another essential aspect of attaining robust and reliable communication is interference management [144]. Neighboring devices may be affected by data transmissions in B5G D2D communication, and they can use either licensed or unlicensed spectrum. As a result, the cellular network is harmed by disruptive interference from neighboring communication devices which degrade the system performance. An effective interference control strategy is needed when the devices are communicated in a licensed spectrum [145]. On the other hand, inter-system interference affects devices operating in the unlicensed spectrum, although it may be simply managed by allocating orthogonal channels in the industrial, scientific, and medical band (ISM). Interference may be mitigated by reducing the device transmit power level; however, this may have an impact on the QoS [146]. In addition, power control also mitigates interference as well as improves EE. Furthermore, Transmission scheduling is also an important technique for minimizing interference. The interference in D2D can be classified into co-tier interference and cross-tier interference [147].
Co-tier interference is the interference between two devices on the same tier. When the D2D technology coexists with cellular communication in a multi-tier communication system, an Interference takes place between two DUs. When a D2D transmitter and a D2D receiver are both using the same frequency band in close proximity, interference occurs.
In addition, when two D2D devices are in close proximity to one another, they will experience co-tier interference. Crosstier interference happens between two devices from different tires. Particularly, when D2D communication is merged into cellular communication, interference occurred between them. There is a dissimilarity between the receiver and the transmitter with this form of interference. in which the crosstier interference occurs in two separate cases: uplink case and 'downlink case. In the uplink case, there are two communication links [148]. First, the cellular link is established to transmit the data from a cellular device to BS. Second, the D2D link is formed to transmit the data between two nearby devices. There is interference between the cellular tier transmitter and the D2D tier receiver because of the shared spectrum and between the D2D and the macro BS. Macro BS power is greater than the interference signal power, therefore, the interference is negligible on the macro BS side [149]. In the downlink case, there are two communication links. first, the cellular link when the data is transmitted from the macro-BS to the cellular device. second, the D2D link when the data is transmitted from the D2D transmitter to the D2D receiver. DUs share the downlink spectrum for communication. There is interference in the macro-tier between the base station (transmitter) and the D2D user (receiver) and also between the D2D user (transmitter) and the cellular user (receiver) [150]. Fig. 7 shows co-tier and cross-tier interferences of D2D communication in B5G networks. This section provides a concise overview of the studies conducted on the topic of interference management in 5G D2D communication networks.

K. SUM RATE
In a D2D technology, the sum rate is a critical network performance indicator since it considers the source rates. The sum rate is increased within the restrictions of an actual network. Managing D2D interferences in a cellular network is critical for increasing the sum rate. In this part, we presented the recent work that has been done to increase the system sum rate.
In [151], to address the combined resource allocation and interference cancellation issue in uplink D2D communication supporting a cellular network, the authors suggest an overlapping coalition formation game (OCFG). The proposed algorithm is meant to improve the sum rate of D2D communications links while simultaneously ensuring the QoS for both the CUs and the D2D communication links. The proposed algorithm has two stages: the first is an overlapping coalition, and the second is a cooperative game with an overlapping alliance. In the first stage, depending on the interference between the D2D link and the CUs, each D2D link selects the best RBs to reuse. Then, each cellular user and D2D connection that shares an RB will be placed in its own coalition, and D2D links may simultaneously be members of many coalitions. In the second stage, each D2D link can choose whether or not to quit the existing coalition to join a new one. Besides, after each D2D link movement is accomplished, the system utility improves. Furthermore, the coalition's size is considered throughout the formation process, which might help reduce mutual interference. The properties of the suggested algorithm are reviewed. These properties include convergence, stability, and complexity. It has been shown via simulation using the provided strategy effectively to build a stable and efficient coalitional structure with overlapping coalitions. Also, compared to other existing techniques, the proposed overlapping coalition formation game outperforms them. However, the proposed algorithm does not consider the D2D transmit power constraints.
In [152], the authors examine the interference issue of the D2D connection supporting the cellular network in the uplink scenario. Their goal is to boost network performance and reduce the interference impact that D2D links have on CUs. Then, an interference-limited area and power control mechanism are proposed for both controlling the activation zones of D2D transmitters and reducing the significant interference caused by D2D links. First, for both cellular and D2D links, the closed-form expressions of the coverage probability are derived. Thereafter, a resource allocation technique is proposed that is constrained by a power control mechanism. In terms of total data rate and coverage probability, simulation results demonstrate that the suggested interference-limited area algorithm performs better than the conventional interference mitigation scheme. Specifically, when the D2D density and the SINR are high. Nevertheless, the network is restricted to a single base station and single cellular user. In [153], to decrease the interference of the D2D communication that coexists in a cellular network, the authors examine the complicated interference issue of D2D communication under a cellular network in a single cell uplink scenario. They propose a Stackelberg game-based interference alignment technique and power allocation to decrease the complex D2D interference. An effective interference alignment approach is established by extracting the pre-coding matrix from the reference vectors and creating two sub-post-processing matrices to minimize interference from DUs and CUs, respectively. The simulation results show the efficiency of the presented algorithm. In addition, when compared to current systems, the proposed method has a higher sum rate. Nonetheless, the proposed algorithm is limited to a single cell and single BS network.
Then, in [154], the authors investigate the interference management problem of D2D communication underlying cellular networks in the uplink scenario. The authors aim to mitigate the interferences between CUs and DUs. A radio resource allocation technique called fractional frequency reuse (FFR) and a Hungarian algorithm are proposed to control network interference. The proposed algorithm is decomposed into three parts. First, The FFR method divides the cell (inner and outside region) into several frequency bands for cellular and DUs to minimize interference. Then, Hungarian weighted bipartite matching is used to allocate resources to DUs to preserve the total system sum rate while minimizing interference to other nodes. Finally, a mechanism called local search swapping is used for further allocation to reduce interference. According to the simulation findings, the suggested method is superior to the benchmark approach in terms of both total sum rate and interference minimization. Furthermore, the throughput of a system is significantly affected by FFR. Moreover, in contrast to traditional methods, edge users were mostly covered when the FFR scheme was performed using our suggested algorithm. The proposed algorithm may be improved in the future to increase the overall sum rate by distributing several D2D pairs to a single cellular user and a single D2D pair to multiple CUs. However, the proposed algorithm does consider D2D user fairness.
In [155], within a single-cell uplink scenario, the authors investigate the interference problem of D2D mobile groups using power domain nonorthogonal multiple access (PD-NOMA). This paper focuses on improving the sum rate of D2D mobile networks while maintaining the QoS for the CUs. The problem is formulated as an MINLP and decoupled into two subproblems to solve it. First, they form the D2D mobile groups between the D2D transmitter and DUs based on the SIC to mitigate inter-user interference. Second, a many-to-many matching algorithm is presented to allocate the RBs among the CUs and the D2D mobile group to reduce the co-channel and cross-channel interference. Finally, to maximize the D2D group, a heuristic approach is given for reusing the CUs' RBs. Compared to the joint spectrum and power allocation and joint user clustering and power allocation schemes, the simulation results demonstrate that the suggested algorithm achieves a greater sum rate while still satisfying the minimal SINR requirements for CUs. To further decrease inter-cell interferences, the proposed approach might be expanded to encompass multi-cell scenarios in the future. Nevertheless, the ability of D2D groups to reuse the best RBs gets more complicated as the number of D2D groups grows.

L. NETWORK CAPACITY
The network capacity of a D2D communication system affects the total network performance. The network capacity causes interferences issues. Therefore, interference mitigation issues need to be considered to expand the system's capacity. In this part, we introduced the current research that has been done to increase the network capacity. In [156], the authors propose a new greedy-based channel assignment algorithm to reduce interference for D2D communications supporting cellular networks in the uplink scenario. First, to describe the interference that happens when two communication links utilize the same channel simultaneously, they create a unique interference bidirected graph. Then, they propose a novel channel assignment technique called the greedy-based graph coloring algorithm, which reduces system interferences by assigning the best channel to each link. The main concept of the proposed algorithm is to use the color vertices in the interference graph to identify a suitable color for each communication channel. Finally, in order to develop a near-optimal solution for lowering system interferences, they transform the channel assignment issue into a robust graph coloring problem. Simulation findings reveal that the recommended strategy enhances network capacity and fairness. Furthermore, the complexity is low when compared to existing techniques. However, a centralized scheduler base station is considered, which will degrade the network performance.
In [157], the authors investigate the downlink scenario of a heterogeneous cellular network and analyze the interference control challenge of D2D communication. First, they Analyze transmission link performance in challenging communication modes. Then, they provide a D2D feasible set-based interference control technique for a heterogeneous network that guarantees QoS on both cellular and D2D links. Thereafter, they analyze the small cell deployment issue to control interference in a multi-tier heterogeneous network. Finally, as a means of increasing ultra-dense network (UDN) capacity and satisfying QoS standards for communication links across a variety of modes, they offer a method of deployment that is both efficient and effective. The results of the simulations show that their suggested strategy is better than the neighbor-based method. In addition, the proposed scheme may effectively mitigate transmission link interferences while meeting QoS requirements. Moreover, the suggested deployment method has the potential to maximize throughput while maintaining link QoS. Nevertheless, the proposed approach does not investigate the power constraints of the DUs.
In [158], the authors investigate interference management for D2D communication supporting a heterogeneous cellular network in an uplink scenario. This paper aims to mitigate the interferences between D2D and CUs. The authors provide a mathematical model to assess system performance. In addition, they evaluate the outage probability of D2D, small-cell, and macro-cell links to analyze network performance. Furthermore, they present an analysis and evidence demonstrating how small cell density and D2D pairings affect communication quality. Finally, the authors propose an Acceptance Interference Region (AIR) dynamic algorithm to solve the challenge of ensuring stringent QoS for D2D links. Moreover, they introduce an effective ON/OFF algorithm to solve the challenge of maximizing network transmission capacity. The simulation results state that the proposed algorithm reduced outage probability by 35% and 49% in the BS and small cell BS links, respectively, when compared to conventional neighbor-based techniques. In addition, they observed that at lower small-cell densities, transmission capacity is maximized. Nonetheless, to further verify the system's performance, a test-bed measuring system need to be investigated.
In [159], the authors propose a D2D-assisted uplink Coordinated Direct and Relay Transmission (CDRT) based on NOMA to increase system SE while simultaneously reducing inter-user interference from cellular and D2D communication networks. Closed-form formulations of the outage probability, the outage throughout, and the ergodic SR are developed for the purpose of analyzing the system performance. Compared to NOMA-based uplink CDRT, the simulation findings demonstrate that the suggested method improves both the ergodic SR of the system and the throughput during outages, with only a small reduction in uplink performance. In future work, with massive MIMO enabled at the base station, there is a chance of achieving a further capacity boost. However, performance analysis of the proposed system becomes difficult when the impact of a direct link between the BS and the CU is taken into account. VOLUME 11, 2023 M. COVERAGE PROBABILITY In this section, many researchers focused on maximizing the coverage probability by using interference mitigation techniques. In [160], for OFDMA-based heterogeneous cellular networks, the authors present a one-to-many matching algorithm. The proposed algorithm aimed to optimize network performance while simultaneously minimizing interference caused by resource sharing. By allocating sufficient cellular resources to D2D communications and meeting the QoS requirement, interference has been reduced to acceptable levels. The downlink cellular sub-channels are used for D2D communications in the underlay in-band mode. Furthermore, it is assumed that UEs and sub-channels that want D2D communication are rational, self-centered entities. The Poisson Point Process (PPP) is used to distribute both UEs and BSs, and Rayleigh fading is assumed to be the channel fading. In addition, Macro User (MU) and Femto User (FU) have fixed transmission power and density. D2D communication is enabled when the SINR condition is met and the interference to other network communication is below a specific level. The performance of the suggested matching approach is better than that of random and exhaustive matching. The simulation results indicated that the suggested method could provide network performance that is close to 93% of the optimal with considerably less complexity and overhead. Nevertheless, as the number of FBSs increases, the overall network sum rate decreases for a given number of DUs. Furthermore, the proposed method considers a fixed power level.
In [161], the authors propose an interference management algorithm to optimize D2D communication performance while achieving cellular communications QoS needs in both uplink and downlink scenarios. First, they derive the throughput for D2D pairs and CUs. Then, they formulate the objectives as an MINLP problem. The problem with optimization may be broken down into three distinct subproblems. First, to determine which CUs may share the channel with each D2D pair without degrading their performance, they evaluate the admission set for each D2D pair. Second, to maximize D2D throughput, the BS, CUs, and CUs are all coordinated in their use of transmit power. Finally, a shared channel assignment algorithm is proposed for CU and D2D pairs to improve the total throughput for all D2D pairs. Moreover, the algorithm that has been suggested has low complexity and may be applied in a distributed manner. The throughput of the ideal algorithm may be achieved with the suggested technique to an extent of fifty percent. The results of the simulations show that the suggested strategy is effective. In addition, D2D pair throughput may be increased by thoroughly investigating all potential pairs of D2D and CUs. Furthermore, since the D2D pair multiplex channel uses several CUs, it is possible to significantly increase throughput when the number of D2D pairs is smaller than the number of CUs. Nonetheless, checking all the possible assignments requires huge computations in the base station. Hence, the CUs are involved in controlling the maximum number of active D2D connections at any given time.
In [162], the authors investigate the interference control problem of D2D in HetNets based on OFDMA in the uplink scenario. This paper aims to minimize the interference associated with D2D communication in HetNets. To tackle the problem with D2D-based HetNets, an interference management strategy based on combined power control and mode selection is presented. First, in order to dynamically control the interference-limited area, they suggest combining a power control scheme. Reducing transmitter-receiver distances reduces interference. Second, Users may choose different communication modes in accordance with their interference-limited area to tackle the problems of spectrum waste. When compared to existing techniques, simulations show that the coverage probability is greatly raised by using the suggested method. Particularly when the SINR is high. Furthermore, the proposed method efficiently uses the limited spectrum and has low computational complexity. However, spectrum allocation to boost D2D communication performance does not take into account in the proposed approach. The recent studies of the interference management investigations have been summarized in Table 3.

N. SUMMARY
In brief, some recent works on the interference management of D2D communication in B5G networks are introduced. The techniques, advantages, and limitations of the current research are highlighted. In addition, the recent works are categorized based on the performance metrics that have been considered such as sum rate [151], [152], [153], [154], [155], network capacity [156], [157], [158], [159], and coverage probability [160], [161], [162] as explained in fig. 8. The reviewed papers aimed to improve the throughput, network coverage, and network capacity and to reduce the outage probability, computational complexity, and signaling overhead. Nonetheless, many limitations of the current research such as transmit power constraints and network heterogeneity still need more attention and consideration.

O. MODE SELECTION
Choosing the best transmission mode for prospective DUs once they have discovered each other is another difficult challenge in D2D communication. Although prospective DUs may be in close proximity to one another, it is possible that operating in the D2D mode is not the most efficient option for them from a performance standpoint [163]. Mode selection describes the process by which a network (eNB) and/or DUs decide whether to use D2D or cellular communication, based on certain selection parameters such as spectral efficiency and path loss, the difference in the distance among users, channel condition, D2D pairs interference, and EE [164]. Since it produces less signaling overhead and has a lower level of implementation complexity, channel quality, and the SINR is the most often used decision factors. Based on a preset SINR threshold, the mode selection criteria are utilized to decide which D2D will use the direct mode in order to maximize system throughput while simultaneously   enhancing system capacity. On the other hand, users may switch to cellular mode if the D2D pair is too far apart for practical D2D communication or if an interference problem prevents them from reusing any of the available resources. Based on user-reported channel quality, the BS in networkcontrolled D2D decides when to switch between D2D and cellular mode [165]. If the D2D link quality degrades or the D2D proximity criteria are no longer met, the BS will switch to cellular mode, since cellular mode provides higher throughput. Conversely, with autonomous D2D, DUs decide which mode to operate in [166]. Selecting the mode may be done statically during the process of establishing the  connection, or it can be done dynamically for each time slot [167]. Static mode decreases power consumption and signaling overhead, but dynamic mode provides the benefit of capturing and using the wireless channels' quick fading effect opportunistically. The right mode selection, in essence, significantly impacts how well D2D links over mobile networks perform generally. As the reuse factor increases with suitable D2D mode selection, harmful interference is generated inside the system with improper mode selection. Cellular, dedicated, and reuse modes are the primary modes of operation for D2D communication in cellular networks. Fig. 9 shows mode selection scenarios of D2D communication in B5G networks. Communication device location and/or transmission power may influence the modes chosen for operation [167]. In this part, we will provide a brief summary of each mode.
• Cellular Mode: this mode allows devices to communicate in the same way as they would in a traditional cellular network [82]. The data is sent via the BS as an intermediary node. Two links are needed from the transmitter to the receiver (uplink and downlink).
• Dedicated Mode: in this mode, D2D communication occurs when a single link is established between a D2D transmitter and a D2D receiver [168]. Due to the dedicated spectrum, D2D communication does not interfere with cellular communication.
• Reuse Mode: in this mode, uplink and downlink bandwidth are shared between D2D and cellular communications [169]. It allows the reuse of a cellular communication channel already in use. This mode makes effective use of the network resources that are available.
In the reuse mode of operation, resource and interference management are the main obstacles to be conquered.
This section highlights current research on mode selection schemes for D2D communication over 5G networks.

P. ENERGY EFFICIENT
In this part, we presented the recent work on the mode selection aspect for D2D communication from an EE perspective.
In [170], the authors investigate a mode selection based on the energy efficiency for D2D communication. Stochastic geometry is used to analyze the success probability and ergodic capacity of cellular and D2D networks. First, using a stochastic geometry algorithm, they evaluate the success probability for links in three modes (reuse, dedicated, and cellular). Then, the Shannon formula is used to determine the ergodic capacity. Finally, they calculate the EE and then pick the mode accordingly. In this scenario, every D2D pair is characterized as either Line of Sight (LoS) or NLoS based on the distance between nodes. If the D2D pair is in LoS, the attenuation of the signal along the link will be referred to as Rician fading; otherwise, it will be referred to as Rayleigh fading. Furthermore, transmitting power in cellular VOLUME 11, 2023  and D2D networks is multilevel. Results from simulations show how various variables affect the suggested mechanisms. One particularly intriguing finding is that, across all possible communication modes, the success probability of a highertier cellular connection is somewhat higher than that of a lower-tier link due to the need to ensure the needed signal to interference ratio. However, as the transmit power increase, the formula's nominator increases, which will cause EE degradation. In [171], the authors propose a combined mode selection algorithm that provides optimal RB allocation while also enabling a seamless switch for users between cellular and D2D communication modes. Predictive Distance-based Mobility Management (PDMM) has been proposed for all users based on their current communication mode. Avoiding the unpleasant ''ping-pong'' handoff between two modes is the goal of PDMM, which is given based on anticipating the future distance between D2D users. D2D pair locations are estimated using the Levenberg-Marquardt technique, and their next areas are predicted by utilizing the Recursive Least Squares (RLS) algorithm, both of which are dependent on the received signal strength (RSS). On the other hand, according to their chosen mode of communication, users can be categorized as either cellular users or DUs. To maximize throughput in cellular and D2D modes, the best available RB is chosen, subject to meeting the CU's minimum SINR requirement and it is achieved by controlling the D2D pair's transmission power. Variations in the speed of all users, the network users, and the SNR limitation are examined as potential implications for system performance. The proposed algorithm was proven to increase system throughput in simulations by selecting the appropriate mode with a minimal handoff rate. When compared to the standard RSS-based algorithm, the proposed algorithm performs well. Nevertheless, the computational complexity rises as the number of expected RSS samples rises.
In [172], the authors investigate the mode selection problem of energy harvesting D2D HetNets in the uplink scenario to optimize system throughput while also considering the QoS and power constraints of CUs. System throughput maximization is formulated as a problem of mode selection and resource allocation. The formulated issue is then solved using convex optimization theory and a greedy approach. The authors presented a Lagrangian dual decomposition algorithm. Furthermore, they compared the mode selection and resource allocation algorithm to different algorithms to demonstrate its advantages. In addition, they analyzed mode selection and resource allocation convergence and system throughput in different configurations. Simulation findings demonstrate that the proposed algorithm may greatly boost system throughput. Nonetheless, the proposed algorithm does not consider the interference management between the D2D and CUs. Furthermore, in [173], the authors investigate the mode selection problem of D2D-based multi-tier HetNets in a downlink scenario to improve the EE of the D2D communication. The mathematical formulation of the mode selection problem is that of an NP-hard problem. Various optimization methodologies are used to simplify the optimization issue according to the network traffic load. A novel dynamic mode selection algorithm based on fuzzy clustering is proposed. The proposed algorithm enables DUs to switch dynamically and in real-time (through a transmission time intervals) between dedicated mode (DM) and/or reuse mode (RM) depending on the availability of the network RBs. The algorithm identifies DUs appropriate for DM and RM operations based on two parameters (the power of the received signal and interference). Moreover, whenever the RB's availability changes, users will switch to the mode that will keep the network performance optimality. Analyses and comparisons of the suggested method's performance to the baseline method are conducted. According to the simulation findings, the proposed method has better EE and more linked DUs compared to the baseline method. Furthermore, the deployment of the D2D underlaying multi-tier heterogeneous network increases the EE of the downlink transmission. However, when further users move to reuse mode, they must boost their transmission power to meet the minimal QoS requirements. Moreover, users may get banned because of strong interference or increasing separation distance.
In [174], the authors investigate the mode selection issue in D2D communication and multi-hop cellular communication underlaying HetNets in the downlink scenario. They propose a novel mode selection approach for HetNets that incorporates opportunistic multi-hop cellular network communications to select the optimal mode. Communication modes are selected based on the balance between advantages and risks in the proposed system. Furthermore, the suggested scheme is capable of selecting between traditional cellular mode, multi-hop cellular mode, and opportunistic multi-hop cellular mode. In addition, the proposed approach includes the choice of the optimal number of hops in the mode selection procedure. Multiple cellular modes, including single-hop and multi-hop, are compared with the proposed approach. Opportunistic multi-hop cellular network communications may considerably improve the performance of future cellular networks, as shown by the simulation findings. Furthermore, with the suggested technique, the best communication mode may be chosen to improve system throughput, energy consumption, and overall network capacity. Nonetheless, a significant signaling overhead results from this method.
In [175], the authors investigate the mode selection problem for D2D-based HetNets in the uplink scenario in order to increase EE while maintaining the QoS for both D2D and CUs. To allow users to dynamically switch between conventional cellular mode and D2D mode, a Markov Decision Process (MDP) approach is employed. As a model-free deep reinforcement learning approach, a deep deterministic policy gradient (DDPG) is used to solve the MDP problem in continuous state and action space. The proposed approach uses a two-network architecture with one critic network and one actor network. The former uses Q networks based on value functions to evaluate the performance of the actor network, while the latter employs a deterministic policy gradient approach to directly build deterministic activities for the agent. As can be shown in the simulation results, the proposed algorithm has superior convergence properties and improved EE compared to the other benchmark algorithms. Nevertheless, the proposed algorithm allocates dedicated spectrum resources to the DUs, hence reducing the total SE of the network.

Q. SPECTRUM EFFICIENT
In this part, we focused on recent advances in maximizing SE via mode selection in D2D technology. In [176], the authors investigate a joint resource allocation and relay selection strategy in a relay-based D2D communication network. They aim to improve the system sum rate while ensuring that both CUs and DUs obtain minimal QoS requirements. They evaluate the data rates of D2D in both direct and relay modes and draw comparisons between them. Afterward, the optimization issue is categorized into three smaller issues: relay selection, power control, and a combined resource allocation and relay selection issue. In the case of relay selection, the authors propose an algorithm that considers social awareness to choose relay nodes (RNs) for the D2D links. Furthermore, they use the regional delineation method to select the candidate group of RNs for D2D communication links, wherein the algorithm's complexity is decreased. In addition, in order to determine the best RNs for D2D links, they develop the node degree of interest by considering user likelihood and social factors. On the other hand, a Power control scheme is proposed to determine the optimal transmit power for both D2D direct and relay mode, hence maximizing the achievable data rates of all devices. Finally, they present a greedy channel allocation and mode selection algorithm. This algorithm selects the optimal channel resource and makes D2D mode switching more flexible. the proposed algorithm is compared with the benchmark algorithms. Results from the simulations reveal that the proposed algorithm may greatly boost the system's total sum rate and the D2D network's overall performance. However, the proposed algorithm does not investigate all D2D user social attributes.
In [177], as a means of improving SE in the uplink scenario of a cellular network, the authors examine the mode selection issue for two-way D2D communication enabled with fullduplex (FD). They consider four modes of communication: FD underlay, FD overlay, Half-duplex (HD) underlay, and HD overlay modes. Authors optimize SE for D2D and CUs while maintaining minimal data rate and the maximum power requirements for each mode. To efficiently solve the optimization issue in the FD underlay mode, it may be transformed into a difference of convex functions programming problem, which can then be solved using the concave-convex process approach. Then, in the case of HD and FD overlay modes, they overcome the optimization issue by search plus concave-convex procedure algorithm. Lastly, they just need to find an optimal solution in HD underlay mode. The mode selection can be based on the four modes' maximum SE. The results of the simulations show how the channel gain and interference cancellation capabilities affect the maximum SE of four different transmission modes. In addition, poor interference links are better served by underlay mode, but FD mode is preferable when interference cancellation is excellent. Nevertheless, the proposed algorithm does not investigate the EE perspective and imperfect CSI.
In [178], the authors investigate the mode selection problem for D2D communication to improve the system throughput while maximizing user access. Based on the statistical features of the channel probability distribution, they present a probabilistic integrated resource allocation method and a quasi-convex optimization algorithm. As can be seen from the simulation results, the presented algorithm can dramatically improve system throughput, provide a better user experience, and eliminate interference among users, this demonstrates the rationale and effectiveness of the communication strategy. Nonetheless, the proposed strategy does not pre-serve the equilibrium between channel utilization and user experience in the heterogeneous network. Furthermore, the proposed system becomes more complicated and computationally time-intensive when many D2D pairings are allowed to utilize the same resources.
In [156], the authors investigate a mode selection problem for D2D communication to enhance the user experience and QoS. Three selection modes are considered: cellular, direct reuse, and relay modes. In order to develop a distributed D2D mode selection method that can be used across several nodes, the authors suggest using an evolutionary game-based approach. A utility function is used to formulate the strategy, and it takes into account both the achievable throughput of DUs and the use of radio resources. By adapting the formulation of the evolutionary game, they implement selection dynamics in a device-controlled mode selection algorithm. A maximum SINR approach, a distance-based method, and a random approach served as benchmarks against which the proposed algorithm was evaluated. The results of the simulations prove that the suggested algorithm is more beneficial than the three reference methods. Furthermore, the proposed algorithm rapidly converges to an optimal solution and maximizes spectrum efficiency over a variety of D2D modes. Nevertheless, the suggested method does not take into account the possibility of frequency reuse in the downlink scenario or in relay mode with the micro base station.

R. DISTANCE BASED
In this part, we presented the most up-to-date work on mode selection in D2D communication, which takes into account the D2D distance constraint. In [179], the authors investigate the mode selection issue for D2D communication under uplink and downlink scenarios to optimize network performance. They present a novel strategy of mode selection where the D2D mode is activated depending on the average distance between two provided users to decrease the network's signaling overhead across various nodes. In addition, the two devices' relative motion is considered via a tractable analytical method for mode selection in such dynamic D2D scenarios. Moreover, the authors derive the formulations of the D2D average threshold distance, D2D mode using probability, successful transmission probability, and the minimal residence time. These parameters are the main parameters for evaluating the D2D performance with mobility. The analytical results were evaluated, and the advantages of the proposed approach were assessed using Monte Carlo simulations. However, In the proposed scheme, the potential for D2D and CU interference is ignored.
In [180], the authors investigate the mode selection problem in D2D communication. They propose novel mobility management and vertical handover method for handling transmission mode switches during D2D communications to optimize overall throughput. The proposed algorithm is derived analytically and uses border distance and a crucial direction set as mobility factors. The proposed vertical handover manages transmission mode transitions between cellular, reuse, and dedicated modes for DUs' transmission. In addition, they provide an analytical technique for estimating the distance from the borders, which is employed in the critical direction set and the handover algorithm. Furthermore, Analytical methods are used to determine the handover rate and sojourn duration, which are used as performance measures for the handover technique. Moreover, the mode selection map technique has the benefit of simplifying and speeding up the handover procedure. When compared to numerical approaches, the suggested analytical approach greatly saves execution time and boosts map accuracy. Nevertheless, the proposed method does not consider the mobility of DUs.
In [181], the authors investigate the mode selection problem for D2D communication and multi-hop cellular communication underlaying HetNets in the downlink scenario. They provide a context-aware mode selection method to determine each device's optimal communication mode. Based on the UE density and BS-UE distance, the advantages and drawbacks of each communication channel are determined. When compared to conventional cellular systems, the proposed mode selection technique dramatically enhances UE throughput levels. Results from the simulation show how important it is to take in exact UE context information during decision-making for optimal system performance. In addition, the suggested approach may adjust its mode selection choice to dynamic cell operating conditions. Nonetheless, the proposed approach does not investigate the social ties among the users. The recent studies of the mode selection investigations have been summarized in Table 2.

S. SUMMARY
In summary, some recent works on the mode selection of D2D communication in B5G networks are discussed. The techniques, advantages, and limitations of the current research are highlighted. Furthermore, the recent works are classified based on the performance metrics of the mode selection that have been considered such as energy efficient [170], [171], [172], [173], [174], [175], spectrum efficient [176], [177], [178], and distance based [179], [180], [181] as shown in fig. 10. The reviewed papers aimed to improve the network performance, user experience, and the optimal resource selection. However, various limitations of the current research such as signaling overhead, and time consumption still need more attention and consideration.

A. POWER ALLOCATION
Power control is an important aspect to achieve reliable and efficient communication. With the limited resources and the increasing burden on the BS, users experience QoS degradation in terms of network coverage, latency, and speed. In B5G D2D communication, DUs in close proximity communicate easily and hence consume significantly less transmission power than CUs. To use resources more effectively, it's important to control the power of user equipment. Hence, DUs should reduce their transmit power to meet the SINR requirement and improve system performance. Power control techniques are modified to improve the total sum rate with energy constraints.
In B5G D2D communications, future research needs to focus on efficient power allocation, which is essential for maximizing energy and SE and delivering QoS to various applications. Many solutions are proposed to overcome the power allocation issues by using the energy harvesting concept. There are two types of RF energy harvesting: interference signal energy harvesting, and adjacent source energy harvesting. In interference signal energy harvesting, the D2D relay user is able to send the data to the D2D receiver by capturing the energy of the interference signal. In adjacent source energy harvesting, the D2D user harvests the energy from nearby sources. In summary, the use of energy harvesting extends the battery life of the D2D relay user, which in turn extends the network's lifespan. So, efficient and intelligent energy harvesting schemes need to be developed.
Furthermore, future studies also need to focus on the optimal power of the transmission. Power allocation may be classified as static or dynamic. In static, the transmission power is constant and unaffected by the situation changing. While in dynamic, the transmission power could be changed based on how close the devices are to each other. There is a permanent requirement to identify the optimal power level for the D2D connection in order to avoid interference and guarantee link quality. Thus, more investigation needs to perform to determine the optimal power.

B. SPECTRUM ALLOCATION
In B5G, D2D communication is important for increasing cellular network spectrum usage. The effective distribution of spectrum resources inside the cellular system is a significant challenge. In order to fulfill the purpose of D2D communication, spectrum allocation must be adjusted following close device discovery and mode selection. Moreover, when allocating resources, interference management and power control must be considered. Two kinds of spectrum access are considered: underlay and overlay [182]. In the former, DUs and CUs share the same resources. D2D communication is given a fraction of the network's resources in the latter. This has the potential to lower resource utilization since even if D2D devices do not utilize the resources, they are still not available for usage by cellular communication. Therefore, results in reduced scalability and network efficiency. Hence, for underlay and overlay scenarios, developing efficient and intelligent resource allocation strategies is a crucial demand. In addition, most of the research that has been done considers the centralized spectrum allocation which is done by the macro BS. So, this will degrade the QoS of the network. Therefore, the spectrum allocation for the next generation should be fully distributed and intelligent to overcome the burden on the BS as well as optimize the SE.

C. INTERFERENCE MANAGEMENT
Due to the spectrum reuse of cellular resources, interference management is the primary issue with the D2D technology supporting HetNets. D2D pairs may operate in either in-band (licensed) or out-band (unlicensed) spectrum, where the signals of others may alter the transmitted signal of one device. Thus, CUs are harmed by the disruptive interference caused by the other communication devices, which led to degradation in the network performance. the interference among D2D, small cell, and macro cell links must be taken into account and controlled effectively in order to maximize SE. Effective spectrum sharing and power control strategies may considerably enhance network performance and reduce interference and they are often used in cooperation with the mode selection schemes. Many interference management approaches were studied for D2D communication in spectrum sharing scenarios. In B5G, the integration of the D2D technology and heterogenous cellular network leads to sophisticated interference. Therefore, the interference mitigation issue of D2D with HetNet is an open topic for future research. By using effective and intelligent solutions for interference reduction, the attainable data rate and the QoS for end users may be significantly enhanced. An effective strategy to handle these problems and make interference management more efficient would be introducing distributed interference management. Moreover, beamforming, Coordinated Multi-Point (CoMP), and Inter-Cell Interference Coordination (ICIC) are efficient technologies to mitigate interference issues. On the other hand, the coexistence of mmWave and VLC bands can significantly decrease network interference.

D. MODE SELECTION
Mode selection is the procedure of deciding whether to use cellular or D2D communication. [183]. After selecting the proper mode, the device must choose between reusing the direct link and the cellular link. There are two mode selections to perform: static (before the establishment of the D2D connection) and dynamic (according to the time slot) [184]. Many factors affect the mode selection: CSI, the time scale of mode selection, the distance devices, SINR, path loss, and battery life [185]. Many challenges and issues are identified and need to be investigated. Mode selection overhead is one of the major challenges. The mode selection procedure might result in a huge amount of overhead. The mode selection overhead includes the control signal and channel estimation based on CSI. To be more specific, it is critical to reducing overhead to improve the device's battery life. Moreover, dynamic mode selection is another open issue in the mode selection process. Most of the studies considered static users and static networks. So, fully dynamic mode selection techniques for users and networks are the open area for research.

E. DEVICE DISCOVERY
During the device discovery level, DUs attempt to identify potential candidate users within a specific location to form a direct link [186]. Thereafter, synchronization between users is exploited to make optimal utilization of the spectrum of resources and user energy [187]. there are two strategies of device discovery: distributed (direct) and centralized (BSassisted) [188]. In the former, users transmit discovery signals (beacons) frequently. Then, neighboring users can recognize their existence and decide if a D2D link should be established. Nevertheless, the user's battery drains, and the power consumption increases because the receivers continue looking for beacons and do not synchronize with each other [189]. Consequently, unauthorized users may access information throughout D2D communication because of the distribution strategy of device discovery. Another disadvantage of this strategy is the free use of the licensed frequency spectrum [190]. In the latter, users notify the BS of their intention to communicate and subsequently transmit beacons [191]. BS sends user messages containing links and identity information to initiate a D2D communication link [192]. Users only listen when informed by the BS because of the centralized strategy [193]. Consequently, less energy is consumed. Nonetheless, this solution has more costs, scalability, and privacy constraints.

F. SIGNALING OVERHEAD
In ultra-dense networks, the large number of connected devices poses a risk of increasing signaling overhead [194]. In these kinds of scenarios, network performance might decrease substantially in terms of SE, EE, time delay, etc.
Consequently, the creation of rapid device discovery techniques is crucial. Furthermore, various channel prediction techniques that may considerably reduce the signaling overhead. In [195], the mapping between the cellular channel gains of any pair of UEs and the gain of the D2D channel between these UEs has been obtained using a supervised learning-based strategy that takes use of deep neural networks. A significant Pearson correlation coefficient between the predicted and actual D2D channel gains is achieved using the proposed prediction strategy. Moreover, when applied to practical radio resource management algorithms, the suggested prediction strategy is shown to drastically reduce the signaling overhead in the networks. In [196], the authors investigated the capability of AI-based deep learning models (long short-term memory networks, feedforward networks, gated recurrent units, and one-dimensional convolutional neural networks) to predict variations in received signal strength for the channels of D2D communications. Comprehensive research was conducted in order to assess the accuracy of the models' ability to predict the various output lengths that were selected in accordance with the time correlation function and the coherence time of the channel. In [197], the authors provided an innovative calculating method, which significantly accelerates Raytracing predictions. The method involves doing an in-depth analytical investigation of a scenario and performing a preliminary calculation of the visibility between all static surfaces. For even higher levels of reflection, it is possible to efficiently calculate the new propagation routes of moving devices.

VI. LESSON LEARNED
In this section, the most significant lessons are highlighted from our extensive research and analysis of D2D communication for the anticipated B5G networks. In fact, D2D communication is a promising future technology for shortrange communication. In contrast to traditional wireless cellular networks, in which devices must relay information signals through a BS, devices in D2D technology can connect directly. D2D communication has several benefits, including spectrum efficiency, low latency, reduced network congestion, power efficiency, and high connectivity. D2D has many applications such as M2M, video streaming, voice and data services, and emergency networks. B5G enables huge device network connectivity. The transmission delay of D2D communication can be significantly enhanced by deploying several small cells. Furthermore, to meet the high data rate and low latency requirements of B5G networks, there are a few important issues that need consideration and analysis.
Evidently, most of data traffic is generated indoors. To improve the performance of the B5G network, D2D could be integrated with MEC, VLC, UAV, M2M, THz, mm-Wave, C-RAN, and IoE. Many issues with D2D communication, such as power allocation, spectrum allocation, interference management, communication security, and mode selection, might be resolved by integrating these technologies. Furthermore, HetNets, which allow for the connecting of various users and devices, have grown rapidly due to the expansion and improvement of mobile technologies. Consequently, devices compatibility is vital for supporting the variety of numerous communication systems, which is necessary for facilitating the connecting of D2D in HetNets.

VII. PROPOSED MODEL APPROACH
Traditional approaches of network management and optimization will be inadequate for B5G ultra-dense HetNets due to their increased complexity and dynamic nature. Therefore, developing novel approaches to managing network resources is still required. D2D communication is expected to gradually evolve B5G wireless communication systems due to the massively reduced transmission distance that would be achievable with B5G. Consequently, support a much greater and more varied set of users and applications. To meet the various QoS needs, interference and energy consumption solutions, as well as NOMA-based communication, intelligent spectrum allocation and network management, and dynamic mode selection with mobility will need to be employed.
The B5G approach should employ NOMA-based communication as an emerging access technique. By incorporating NOMA into CRNs, spectrum efficiency, user fairness, and network connectivity may all be improved. Using NOMA in combination with D2D enables a single D2D transmitter to communicate with several D2D receivers. Hence, achieve better D2D performance gain. In addition, due to the spectrum sharing between the D2D users and the cellular users which caused a robust co-tier and cross-tier interference, an intelligent distributed spectrum allocation and interference management need to be employed to guarantee QoS demands. Meta-learning, reinforcement learning, and deep Q learning-based techniques are recommended for B5G networks. Besides, Integrating AI and Machine Learning (ML) is a crucial and promising technique for the B5G networks. AI and ML can aid network operators to overcome the resource management challenges of D2D communication by improving the QoS [198]. AI and ML enable the network operators to estimate the resource utilization, analyze the network traffic, and optimize the network parameters. Moreover, a dynamic mode selection approach with mobility based on spectrum efficiency and energy efficiency must be considered to cope with the B5G emerging application in order to improve the network performance and QoS.

VIII. CONCLUSION
The incorporation of advanced technologies and strategies is necessary due to the exponential growth in devices and users, the variety of application requirements, and the extreme demand for ubiquitous access anywhere and anytime. Subsequently, for B5G wireless networks, D2D communication is seen as a crucial solution technology. The existence of D2D technology in cellular networks leads to improvements in network coverage and QoS. Particularly, D2D technology achieves a higher data rate, expands coverage with minimal delay, and maximizes spectrum and EE. Nonetheless, the presence of D2D technology in conventional networks causes several issues and challenges in terms of power control, spectrum allocation, interference, mode selection, and security. This survey presents an exhaustive explanation of D2D spectrum categorization, and the significance of D2D communication technology in the B5G wireless communication is highlighted. An extensive and novel classification of resource management in D2D communication is provided by taking four aspects into account power allocation, spectrum allocation, interference management, and mode selection. Furthermore, the major issues in the existing resource management techniques and methodologies are analyzed and discussed. In conclusion, considering the comprehensive survey of current literature, power control, and spectrum allocation are critical issues in maintaining QoS. Meanwhile, interference is a crucial issue in preserving network performance. While mode selection continues to be one of the most significant challenges to overcome to ensure the reliable transmission of data in B5G D2D communication networks. In future research, improved methodologies will be necessary to solve power control, spectrum allocation, interference, and mode selection challenges. Finally, this survey will assist the researchers in obtaining a better knowledge of D2D communication in terms of technologies, open issues, challenges, and future directions that have been mentioned within the context of D2D technology in B5G cellular networks.