Device-To-Device Communication in 5G Environment: Issues, Solutions, and Challenges

: Device-to-device (D2D) communication produces a new dimension in the mobile environment, easing the data exchange process between physically neighboring devices. To achieve an e ﬀ ective utilization of available resources, reduce latency, improve data rates, and increase system capacity, D2D communication utilizes nearby communicating devices. The mobile operator’s action to collect the short-range communications for maintenance of the proximity-based services and improve the performance of networks drives the development of D2D. This paper presents an extensive review of proposed solutions aiming to enhance the security in D2D communication. The main goal of the research is to present an extensive review of the recent advances in various D2D domains such as the discovery process, mode selection schemes, interference management, power control techniques and ﬁnally the mode selection for D2D applications for 5G technologies. Additionally, we highlight the open problems and identify the challenges with regard to the D2D communication problem.


Introduction
New technologies fundamentally change the way people exchange information with each other, especially in wireless communication and mobile computing. Despite this, cellular mobile environment is still infrastructure-dependent. The mobile users' connection is restricted depending on the base station (BS) coverage, and does not permit direct communication among mobile devices [1]. Even though the source and the destination are in close proximity to each other, the routing traffic is routed through the core network. Due to this inability, the possibility of exchanging data among mobile users is limited, especially considering the transformation process of personal computing from desktop computers to laptops and finally to mobile devices. Due to the trend of shifting toward mobile devices, the traffic for mobile data is expected to increase to 30.6 exabytes per month by 2020, estimated an eight-time increment over 2015 [2].
New communication technologies must be capable of exchanging data on-demand over proper network connections, and must be able to scale the network capacity. Device-to-device (D2D) communications are considered to be a promising technique that allow mobile devices to communicate with one another directly without going through access points or BSs [1]. There are several studies that have been conducted to analyze the use of D2D in cellular networks. For example, the authors in [3] proposed a machine-learning-based code dissemination (MLCD) scheme to reduce the costs of ground control stations (GCSs) arising from the need to organize vehicles in large quantities as code disseminators. The scheme works by selecting the higher coverage ratio and reliability of vehicles ahead of this survey. We have eliminated some previous outdated papers that have been cited in other existing surveys, and present the latest directions related to the domain in the 5G environment in which D2D communication will play a pivotal role. The main objective of this paper is to equip readers with the latest and state-of-the-art papers of proposed solutions (proposed schemes, outcomes, and limitations) on D2D communications and the challenges that still need to be addressed. To be more specific, the contributions of this paper are as follows: 1.
Presenting an extensive literature review of the recent advances in specific D2D domains, which are security and privacy, discovery process, interference management, power control techniques and mode selection schemes for D2D applications in 5G technologies; 2.
Highlighting open research issues or challenges that need further potential research studies in the future.
The remaining sections of the paper are organized as follows. Section 2 provides an analysis and review on D2D device discovery techniques. Section 3 presents a review of interference management in D2D communication. In Section 4, we discuss the security techniques and mechanisms along with recent advances in D2D security. Section 5 provides a review of power control schemes in D2D communications. In Section 6, we discuss mode selection schemes and the recent advances in the mode selection works. We provide discussion on challenging D2D issues for D2D communication in Section 7, and lastly we summarize the observation conclusion in Section 8.

Device Discovery
The device discovery process occurs when the devices transmit a discovery signal through a base station to discover the neighboring devices. There are several integrating technologies related to communication that are being considered by 5G as having potential in helping the discovery process. A device discovery procedure can be divided into centralized and distributed device discovery [16]. These categories are the basis of all the remaining technique functions [17]. For the centralized device discovery, a centralized entity will assist the devices in discovering one another, usually at an access point or a base station. The intended device informs the base station about its purpose to connect with adjacent devices. The base station needs to acquire specific information such as channel conditions, power and also the interference control policy that depends on the system prerequisites.
The full or partial participation of the BS during device discovery depends on the predesigned protocols. The device is not permitted to initiate device discovery with another device if the BS is also included. The BS facilitates all the discovery signals among each device. For this situation, to start the device discovery process, the devices use the discovery signals that had been transmitted by BS and transmitted the discovery signal back to the BS. For the partial involvement of BS, the device transmitted the discovery signal without obtaining prior authorization from the BS. Nonetheless, BS is included to exchange the quantity of Signal-to-Interference Noise Ratio (SINR) and gain path of each device. This mechanism will assist the BS in deciding the communication plausibility for each device. Finally, both devices will be asked by the BS to begin the correspondence.
For the distributed device discovery, the devices have permission to discover other devices without including the BS. The device communicates with the control signals in irregular intervals for the purpose of discovering the neighboring devices. However, the problems that always associate in the distributed mode are interference, power of discovery signal and synchronization issues. That is why the in-band device discovery is considered to be more efficient in D2D design. There are many device discovery schemes that have been proposed based on centralized and distributed device discovery. The in-band category includes network-assisted discovery, beacon-based discovery, and direct discovery, while the remaining is for the out-band category. Table 2 shows the comparative summary of device discovery schemes in D2D communications.

Recent Advances in Device Discovery
Kaleem et al., in [24], proposed an energy-efficient device discovery for a public safety scenario. The proposed solution works in D2D networks where the authors considered a simultaneous user access of resources and major constraints on overlay interference. The results produce a great number of energy-efficient discovered devices and increased the number of discovered devices over static or random back-off patterns. The authors in [25] suggested a D2D neighborhood device discovery by a device where, out of network, static device discovery is discussed, and the times of discovery are examined. The authors developed a mathematical model that can be used by moving D2D devices. The results were verified by Monte-Carlo simulations. Sun et al.,in [26], suggested an authentication method for D2D and privacy-preserving device discovery in a 5G heterogeneous network. The authors proposed an authentication scheme using identity-based and integrated privacy protection for device discovery using Elliptic-Curve Diffie-Hellman (ECDH) methods. The performance analysis showed that the proposed scheme protects the privacy with an ideal efficiency. The authors in [27] proposed a public safety full duplex device discovery for the D2D system that is empowered time-efficiently using the IB-FD framework. The proposed framework emphasizes the aim to increase the spectral efficiency and minimize the delay in device discovery on public safety devices. The transmission mode of the proposed framework is able to switch to a full-duplex from half-duplex. The results from the simulation are then verified and compared with the typical random-access technique. The result shows that around 37 percent of the device discovery time is saved using the public safety priority method instead of the random-access technique. Masood et al., in [28], suggested a device discovery and localization in public safety systems that is supported by UAVs. The direct discovery used a proximity service, and in the case of core network failure such as in a disaster situation, the discovery signal to the device link is transmitted over UAVs. The MUSIC algorithm is applied to achieve the optimum accuracy in simulation results. Furthermore, the throughput and the packet error rate are calculated for the performance results. The authors in [29] analyze various device discovery algorithms for D2D communication to produce performance analysis where the accuracy and RMSE metrics are defined. Results from the simulation show that all the algorithms studied maximize the accuracy and minimize the discovery error and complexity of the algorithm. Kaleem et al.,in [14], suggested a public safety full-duplex device discovery for a D2D system that is based on priority. The results showed that in-band full-duplexing performs well on the radio resources in comparison to the half-duplex. The results also showed that the proposed scheme decreases the discovery time by about 37 percent.

Interference Management
The interference from cellular users is one of the major weaknesses affecting D2D communication. The coexistence of CUs and D2D pairs that use the same cellular resources leads to an interference issue. Depending on the D2D network's operation mode such as uplink and downlink situations, the D2D users will suffer from intracellular and intercellular interference. The transmission success can be damaged by interference that compromises the signal-to-interference-plus-noise ratio (SINR) [30]. There are various proposed interference management techniques discussed in this section. The interference management scheme can be broken down into three categories, which are interference cancellation, interference avoidance and interference coordination. Table 3 shows the brief summarization of the management of interference in D2D communications. Interference avoidance techniques are used to avoid interference between D2D links and cellular links. Chui et al. in [37] embrace the simultaneous D2D transmissions and proposed a multiuser D2D system that is called "MD2D". The authors also leverage MIMO techniques to eliminate the interference across multiuser D2D environments. The system checks the antenna combinations whether it is able to eliminate the cross-pair interference and then applies a bucket-based degree of freedom (DoF) algorithm for an effective antenna usage configuration to eliminate the interference. The result shows that by using MD2D, the throughput was improved by 87.39 percent and for the large-scale simulations, the improvement is up to 218.84 percent compared to the traditional interference avoidance scheme. Zihan et al., in [38], chose a distributed scheme as a proper interference control mechanism because it has advantages in terms of responsiveness to traffic demands and smaller control overhead. The authors then proceeded by proposing a fully distributed random-access protocol for D2D links in cellular networks. The proposed interference avoidance mechanism works by prohibiting the interferers from transmitting a signal around the D2D receiver. The result shows that the proposed distributed D2D scheme performs better than the conventional distributed D2D scheme by a very large margin. However, for this simulation, the authors only considered the locations of devices in order to follow a Poisson point process. The authors in [39] highlighted the confidentiality aspect of the security problem between the cellular users and D2D users. The authors proposed a security-embedded interference avoidance scheme by modifying the constellation rotation technique to mitigate these issues. In the testing, the authors did not explore situations where there might be multiple D2D pairs and CUs in the same environment. Furthermore, the evaluation performance of the proposed scheme does not consider channel estimation errors in the evaluation calculation. Melki et al., in [40], proposed a radio resource allocation scheme for multihop D2D links that is based on interference avoidance techniques in LTE-A networks. The authors stated that the concept is to expand the components of the key enabling technology of a single-hop D2D to multi-hop D2D communications. The results demonstrate that by using the proposed mechanisms and proper power control, the established D2D links can reuse the cellular band and still produce minimum interference for the cellular communication.

Interference Coordination
Interference coordination schemes have significant advantages in Inband D2D communication.
For the Centralized Interference Coordination (CIC) scheme, this involves the monitoring from the BS. However, for the Decentralized Interference Coordination (DIC) scheme, the monitoring from the BS is minimized due to the participation of D2D nodes in the coordination mechanism. Interference coordination techniques are used to mitigate interference between cellular links and D2D links. Yang et al. in [41] used the full-duplex communication technique in D2D communication environment. The authors presented the interference issue for devices operating in full duplex mode. To solve the joint optimization problem with a minimum complexity, the authors proposed a graph-coloring-based resource sharing (GCRS) scheme. The scheme was adopted to optimize the spectrum utilization. Xu et al., in [42], presented the interference management for D2D communication in heterogenous networks. The authors proposed a feasible set scheme to handle the interference in the D2D communication link and to guarantee the QoS requirements. The proposed scheme shows that it can reduce the average outage probability by up to 92 percent. In [43], Sun et al. proposed a D2D management scheme that is based on the interference limited area (ILA) combined with a power control algorithm to mitigate the interference that may be inflicted on the cellular users caused by activated D2D links. Under the proposed ILA scheme, the authors produced a mathematical expressions of the average coverage probability for D2D links and cellular links. Then, the authors proposed a resource allocation algorithm that depends on the changes in the power control mechanism. The results show that the proposed scheme is able to outperform the conventional scheme especially in a high D2D density and signal-to-interference-plus-noise ratio in terms of the sum data rate and coverage probability.

Interference Cancellation
Interference cancellation techniques use advanced decoding and coding schemes for the cancellation of interference signals at the DUE or CUE. The techniques used can enhance the cellular network's capacity. In [44], Lv et al. proposed an interference mitigation algorithm that is based on the guard zone by allowing the capabilities of successive interference cancellation at the BSs. The D2D users are obligated to use the original cellular mode when they are in the range of a specific geographical area inside a cell. The result shows the improvement in the average throughput of a user equipment (UE) and the successful transmission probability achieved using the proposed scheme. Ni et al. in [45] investigated the performance analysis of interference cancellation and beamforming with multiple antennas equipped at the BS. However, the authors equipped the users with a single antenna. For the system analysis, the ergodic process is used with some appropriate approximations. The result is quite similar to the Monte-Carlo results. In [46], Wu et al. proposed a peer-to-peer (P2P) system called "Lunius" that is based on a harvesting data approach in a multihop D2D communications community. The system improves the user experience, optimizes P2P local-file-sharing in the D2D communications, and offloads traffic from the BSs. The system features cross-layer integration of the application layer P2P protocols based on interference cancellation scheme, Bittorrent protocol, and also an enhanced multihop D2D routing scheme called the Greedy Parameter Stateless Routing Protocol (GPSR), in order to maintain Radio Resource Management (RRM) mechanism and multihop communications to increase the total throughput while, at the same time, assuring the QoS requirements of user equipment. Gandotra et al. [47] investigate nonorthogonal multiple access (NOMA) in a D2D 5G environment. The authors proposed an improved NOMA-based approach that uses multiple interference cancellation (MIC) techniques instead of the successive interference cancellation (SIC). The results show that MIC is better than SIC in terms of providing better performance and low complexity. The proposed MIC scheme demonstrates its effectiveness by optimizing the power consumption of the overall circuit. However, the authors did not highlight the reduction in the latency of the network. In [48], Ni et al. study the D2D communication using a two-way decode-and-forward relay node. Beamforming and Interference Cancellation (IC) strategies were analyzed for asymmetric and symmetric outage probabilities. The result shows that there are some factors that correlate with the system performance, such as the installation of a large number of antennas in the BS, which will lead to outage probability of the cellular link prone to be zero.

Security and Privacy in D2D Communications
To date, many of the standardization efforts and research studies are mainly focused on resource management, interference management and the architecture in D2D communication. Both industry and academia largely ignored the security aspect of the D2D communication environment. D2D communications offers a hybrid framework where the centralized and the distributed approaches are paired together. That is why it is risky to some of the privacy and security threats that are being identified by both the ad-hoc wireless and the cellular networks. Some of the security threats faced by D2D communications can affect the confidentiality, authenticity, availability, and also integrity of the network. Furthermore, the need for efficient security solutions to allow private, secure, and also trusted data exchange among cellular network and devices including direct proximity-based communication without any help from the cellular network. Table 4 shows the overview of security issues and, recently, solutions proposed by the researchers in D2D communications. [50] Lack of protection for cellular users against eavesdropping.
Optimization-Based Access Assignment Scheme for D2D users.
Eavesdropping Improves the physical-layer security of cellular users and achieved maximum secrecy throughput with the optimal threshold.
Consider protecting only single cellular user in the presence of multiple eavesdroppers.

Ref. Problem Algorithm Attack Addressed
Findings Limitations [51] Lack of trusted devices to execute secure data aggregation without a base station.
Security protection mechanism of private data based on homomorphic encryption.

Packet Sniffing
Improves the security and optimizes the resources allocation in D2D network.
Further studies on election factors and the impact of the dynamics of wireless devices on D2D networks. [52] Lack of privacy-preserving and secure scheme in D2D group communications.
Key Agreement and two privacy-preserving authentication protocols.

Replay Attack
Improves the security, efficiency, and effectiveness of the protocols.
No real applicability evaluation in a 5G D2D communication. [53] Maturity of key generation in the physical layer security (PLS) technique.
Eavesdropping Improves information confidentiality.
Need to combine authentication of higher layer and information confidentiality. [54] Unassisted third-party devices mutual communication.
Dynamic group key agreement protocol.

Masquerade Attack
Achieves high entropy group session key for D2D group communication and improved the security.
No real applicability evaluation in a 5G D2D communication.

Recent Advances in Security Schemes
Ying He et al. (2018) [15] investigate the effect of recent advances of content-centric networking, device-to-device (D2D) communication, and mobile edge computing on Mobile Social Networks (MSNs). The authors found that in order to improve the sharing, efficiency and the security of data exchange, and delivery in the MSN, the knowledge of social relationships among users are ignored. The authors proposed a social trust scheme that enhances the security of the MSN by applying a novel deep reinforcement learning approach to automatically make the decision to optimally allocate the network resources. The solutions begin with an agent receiving a set of observations including the value of trust for each node, the cache contents, the conditions of wireless channel, and the capacity of vacant computation from the integrated network. Then, the agent transmits the parameters to the deep neural network and produces the optimal actions. The revenue of resulting operators is then observed and retransmitted as a reward to the agent. Based on the obtained reward, the agent trains and updates the deep neural network model. The step is repeated until the optimal actions are delivered. The authors use uncertain reasoning to derive trust values due to the uncertainty in trust evaluation. The trust evaluation from direct observations and indirect observations is derived by using the Bayesian inference approach and Dempster-Shafer theory. Ferrag et al. (2017), in [55], examine various existing authentication and privacy-preserving schemes for 4G and 5G cellular networks to present a comprehensive survey regarding that topic. The issue that the authors identify in the 4G and 5G environment is the lack of restriction in the network and the fast-vertical handover, which leads the devices likely to vulnerabilities like privacy, data confidentiality, communication security, access control, and availability. The reason for this is that the devices will be exposed to all the vulnerabilities that are IP-specific since the environment of 5G cellular networks is IP-based. The authors also identify the countermeasures in the form of cryptography methods, intrusion detection methods, and human factors. The authors investigate six different types of privacy-preserving and authentication schemes and proposed six open directions on how to secure communication in 4G and 5G cellular networks in the future, which focus on the privacy-preserving and authentication schemes. Cao et al. in [56] considered battery-powered wireless devices to designed a secured lightweight D2D system using multiple sensors in the wireless devices. For securing the D2D communications by leveraging the sensors in the devices, the authors proposed a lightweight and efficient key distribution scheme. The experiments show that the communications with low energy consumption and computing resources can be achieved using the proposed scheme. Hsu et al. [57] study the problem of group information exposure when the devices in proximity identify other devices in the same group by their group identity. The exposure will lead the eavesdroppers to analyze the usage of the applications. From the study, the authors proposed the network-covered and the network-absent protocol using the authenticated key exchange for D2D communications. The aim is to guarantee end-to-end security to network operators, accountable group anonymity, revocability, and traceability for management and accounting requirements. The performance analysis shows that the cost of both communication protocols is low even after providing the new security properties. Jiang et al., in [58], proposed a new data sharing framework using the blockchain technology named the D2D blockchain. The proposed framework works by deploying Access Points (APs) that will verify the transactions of end users. The authors proceed with designing a two-stage contract theory-based joint optimization scheme for the transaction relaying phase and the block verification phase. The testing result shows that the proposed framework can improve privacy and security protection in D2D data sharing. The result also indicated that the proposed scheme could improve the local AP utility while reducing the delay under information asymmetry.

Power Control
Power control can be defined as the process of adjusting the BS's power levels during DownLink (DL) transmissions and the user equipment (UE) during UpLink (UL) transmissions. The need to increase the transmission power of a device exists because it can also increase the link capacity. However, this will lead to incremental interference among the devices that share the same resources. One of the benefits of power control techniques is its help protecting energy resources. These techniques allocate radio resources that have been used in resource allocation to different users or devices. Examples of the radio resources are time slots in Time Division Multiple Access (TDMA) or frequency bands in Frequency Division Multiple Access (FDMA). The role of resource allocation is important in fulfilling the immediate increase in resource demand. To improve the overall system throughput and system capacity, resource utilization and joint optimization are considered crucial. This section presents resource management techniques and various power control schemes that highlight the importance of combining power control and mode selection together with link adaption techniques to achieve an optimal system performance. Power control algorithms can be split into two broad categories, which are centralized and distributed. For centralized algorithms, the BS is responsible for making the decisions for resource allocation and power control, while for distributed algorithms, user equipment is responsible. One of the examples for the centralized algorithm is LTE power control. Important parameters that need to be considered to produce a structured power control algorithm are maximum transmit power, target-received power per resource block, number of resource blocks, and path loss. Table 5 offers a summary of the power control issues and proposed solutions in D2D communications. Table 5. Summary of power control issues and proposed solutions.

Ref.
Problem Proposed Method Findings Limitations [59] Power control distribution.
Theoretic framework using Mean Field Game (MFG).
Achieves higher energy efficiency compared with the blind power control scheme.
Increasing the energy means increasing the interference power and decreases the spectrum efficiency. [60] Imperfect wireless Channel State Information (CSI) power control.
Truncated channel inversion and ON-OFF power control scheme.
Imperfect CSI and misinformation lead to the degradation of performance especially for high target SINR.
Estimation error is a key parameter that should be consider during network design. [61] Contamination and training sequence overhead reduction in D2D underlay massive MIMO networks.
Pilot overhead is reduced and the effect of pilot contamination is cancelled.
The sum power monotonically decreases and converges rapidly for different value. [62] Sparse Code Multiple Access (SCMA) power allocation.
Graph theoretic approach.
Energy efficiency performance is enhanced and network capacity is upgraded.
Need to compare the algorithms with different schemes. [63] Power control under different constraints.
Power control scheme using Particle Swarm Optimization (PSO).
Achieves higher throughout than the optimal strategy.
Combine the admission control into power control scheme and the joint channel allocation. [64] Power control is non-convex and intractable.
D2D transmit power control schemes.
D2D rates converge to a rate ceiling at high signal-to-noise ratio.
The energy signal transmission is less effective when performance gaps are small. [65] Non-convex mixed-integer fractional program.
The network EE first increases and then decreases when the transmit power increases.

Recent Advances in Power Control Schemes
The benefits of the D2D technique are obscured with the interference problem over D2D links and cellular links. That is why there are plenty of proposed methods and schemes to minimize the interference, such as using resource allocation, power control, signal processing, mode selection, etc. Wang et al. in [66] used the interior point scheme to assess the optimal power of D2D communications. By approximating the interior point method, the authors are aiming to reduce the computation complexity. To achieve the goals, the inversion of the Hessain matrix will be replaced with a diagonal metric. This simplified process causes the updating of the Newton method. The results show that by using lower computational complexity, near-optimal throughput can be achieved. The authors in [67] highlight the problem of nonconvexity of sum-rates maximization to power constraints. The authors then emphasize this problem using the problem of power allocation model as a potential game. The authors proposed two iterative algorithms using the potential games convergence properties. The proposed solutions are better than the traditional rate maximization scheme because the solutions are confluent with the objective function local maxima. Abdallah et al., in [68], proposed a channel allocation (CA) scheme and a set of three power control (PC) schemes to manage the interference in D2D as a random network model based on stochastic geometry. According to the authors, it is possible to obtain a closed-form analytical expression for ergodic sum-rates and coverage probabilities, which shows the interactions of various network parameters that affect the link performance and the service quality. However, the proposed schemes are examined in single-cell scenarios only. The authors in [69,70] use Peukert's Law (which shows the capacity of batteries changes at different discharging rates) to model the battery lifetime and to distinguish the nonlinear effects in batteries. Multiple D2D pairs are allowed to simultaneously share the same channel, which leads to the increase in channel utilization. From the test results, it shows that the D2D user equipment (UE) battery life is lower than the cellular UE if the distance of D2D UEs is more than 0.8 of the cell radius. When the UE is at a certain distance, it is advantageous to control the devices by communicating directly. Memmi et al. in [60] highlight that the main shortcoming in most of the papers in the literature is that the consideration of unrealistic assumptions. For example, most of the authors rely on deterministic values such as fixed transmission power, fixed distance between the receiver and D2D transmitter, and fixed SINR targets. Furthermore, they typically consider only just one cellular user that shares the resources with the D2D links. That is why in this paper, the authors present a centralized and distributed power control algorithm in a one-cell random-network model. Ding et al.,in [71], aim to maximize the energy efficiency (EE) collection of cellular users' equipment (CUEs) and the D2D user equipment (DUE) using a network-centric method. For the objectives of DUE, the authors present a price-based cost function to protect the CUE's uplink transmission. The result from the testing shows the proposed scheme performs fast converging and a better than nominal solution for network-centric and user-centric problems.

Mode Selection
The user equipment can communicate with the BS directly in the D2D cellular network. This capability is beneficial, and it significantly improves the network performance in terms of delay and network throughput. Nevertheless, D2D also creates other new challenges in terms of resource management and network overloading. Besides, the network management becomes more complex as two or more pieces of user equipment use the same mode, hybrid mode, and different mode to communicate. Table 6 shows a brief summary of mode selection issues and proposed solutions in D2D communication. Generally, there are four modes of communication for the user equipment:

1.
Pure cellular mode-used when low resources are available and there is high interference because there is no D2D communication. This does not allow D2D users to transfer their data; 2.
Partial cellular mode-without sharing the co-channel spectrum, this mode allows the UEs to communicate through the BS; 3.
Dedicated mode-allows the user equipment to communicate with other user equipment using dedicated spectrum resources; 4.
Underlay mode-allows D2D users and cellular user equipment to share the uplink and downlink resources. Table 6. Brief summary of mode selection issues and proposed solutions in D2D communication.

Ref. Problem Solutions
Contributions Limitations [72] Joint mode selection, power control problem, and resource group (RG) assignment for D2D underlaid cellular networks.
RG assignment, joint optimal mode selection, and power allocation design for D2D.
Improves the system sum rate significantly compared to the conventional schemes.
Focus more on optimizing the communications mode in relay-based D2D communication. [73] The effects of network interference profile to D2D mode selection and vice versa.
IA-based coding strategy and DoF-based mode selection.
Better performance than in high SNR regime, low interference environment, large MIMO systems, and small-cell networks.
Further analysis on small/medium antenna systems and large-cell networks. [74] Link allocation and mode selection problem under coalition formation game.
Distributed coalition formation algorithm.
Achieves better performance for cellular users.
Need to extend the single cell scenario to a multi-cell scenario, and implement some joint optimal solutions. [75] Problem in evolutionary game formulation in mode selection.
Evolutionary game-based distributed D2D mode selection algorithm.
Achieves higher utilities than the baseline schemes.
Need to consider other D2D communication modes. [13] Spectrum partition and mode selection problem from physical layer.
Theoretical framework for optimization of both D2D pairs and cellular users (CUs), and the performance modeling.
PLS performances of the CUE and D2D pair can be flexibly controlled by mode selection and spectrum partition.
Need to consider the performance evaluation for the case with two CUEs and two D2D pairs. [76] Resource allocation and joint relay selection problem for relay-assisted D2D.
Greedy-based mode selection and channel allocation algorithm.
Transmission data rates is maximized while guaranteeing the minimum QoS requirements for both CUs and D2D users (DUs).
Study the impact of social attributes among users on the performance of D2D communication networks.
[77] Quality of service in mode selection.
Mode selection scheme based on greedy heuristic algorithm.
Improves sum rate and average UE SINR, with no increase in signaling overhead or complexity.
UEs with very low SINR (both modes of operation) not benefit from the increase in DUE number.

Recent Advances in Mode Selection
Wu et al., in [78], proposed an optimal content sharing mode selection scheme for socially aware D2D communications. The authors exploit social reciprocity in order to encourage mutual cooperation, and also refining the average link rate to achieve a successful content delivery. To ease the optimal matching between potential providers and demanders, the authors used the attributes of total unimodularity to develop a number of online implementations according to the existing linear programming algorithms. However, the authors did not take into consideration the sharing mode selection scheme under different popularity distributions, individual QoS constraints, etc. The authors in [79] present a novel partial channel state information (CSI) model that has a lower overhead of feeding back the cross-link CSI. The authors proceed to propose a throughput-optimal, joint mode selection scheme, user scheduling, and the rate adaptation policy called CLISAA for D2D systems that exploit information about interference statistics from cross-links and integrate inter-cell interference. The authors produce the closed-form expressions to be used for feedback-conditioned goodput in the underlay mode that drives this optimal policy. However, the authors only consider single antennas at the BS and the user equipment in the simulation scenarios. Chen et al., in [80], identify the challenges of selecting the suitable communication modes for all user equipment pairs in the D2D network. The authors analyzed the problem in the mode selection aspect for a multipair and multimode D2D network, in which the eNB is able to select one of the three modes in D2D communication (direct D2D mode, relay D2D mode, and local route mode) for each D2D pair. The authors proceeded to propose an optimal mode selection algorithm to achieve the maximum capacity. This paper aims to share the uplink channels of cellular users. The optimal mode selection issue can be replicated using an integer programming problem. The authors in [81] proposed an interlay mode for the nonorthogonal multiple access (NOMA) system, which allows power domain multiplexing of cellular users and D2D pairs using successive interference cancellation (SIC) decoding to eliminate interference between them. The authors proposed a resource allocation scheme and a joint D2D mode selection that makes up as a combinatorial optimization problem to increase the system sum rate and at the same time fulfill the SIC decoding constraint. Haider et al., in [82], proposed an optimal mode selection scheme for full-duplex D2D cognitive networks that depends on its impact towards primary users. The authors study the impact towards D2D users in the proximity of active cellular users using the stochastic geometry tools. The authors then proceed with defining the crucial region where, if the receiver is inside of the guard zone, D2D links are able to operate in the half-duplex mode, whereas if the transmitter and receiver are both outside of the guard zone, D2D link can operate in the full-duplex mode.

Challenges in D2D Communication
There are various open issues and challenges that need attention in securing a D2D communication in 5G environments. Even though there extensive work has been carried out regarding interference management for D2D communication according to the previous legacy networks (LTE, WiMAX, and LTE-A), interference management for D2D communication in 5G cellular networks however is still considered as a new research topic. The open issues and challenges are highlighted in the following discussion.

Challenges in Device Discovery
Some of the challenges identified in devices discovery are presented as open research issues.

Synchronization
The synchronization in D2D communication occurs between devices in the system and the BS. The time frame and the scheduling will be shown by the BS. However, the device discovery will face a challenge when the secondary device that are associated with the primary devices are outside of the BS coverage. The devices in the asynchronous discovery situation require continuous searching for different devices in proximity [10].

Initial Device Discovery Signal
This refers to the devices communicating with an initial discovery signal to discover the neighboring devices. However, any proximal device can effectively obtain this signal. The unsuitable scheduling allows the initial discovery of signals information to influence other devices. In certain situations, such as designing parameters, constructing the initial signal for the radio resources is considered a critical job.

Multicell Device Discovery
The device discovery will become a big challenge if a device belonging to a different cell in the cellular network has that device mobility, as a result of how the radio resources are being provided and who will benefit from it. The authors in [83] proposed one multicell DD scheme for the solution. The proposed method made involve core network along with the BS. Thus, it is essential and critical to propose the discovery of signal scheduling.

Discovery Messages Frequencies
Device synchronizations and the frequencies of discoveries are considered the common challenges that need to be well-addressed [8]. The amount of discovery messages has a direct impact to the performance of D2D users. Even though there are discovery messages with prespecified designs and structures, the distribution of devices can lead to significant interference to the network for other devices. On the contrary, the information about the neighboring devices will become stale when the number of discovery messages is very low. To mitigate this issue, an appropriate scheduling scheme can be proposed to minimize the discovery message frequencies.

Challenges in Interference Management
This paper also highlights the challenges in interference management for D2D communications in the 5G environment for future studies.

Cell Densification and Offloading
Network densification can be defined as a simple but important instrument that is used in increasing the capacity of network capacity in 5G cellular networks [84]. This approach has been used over several cellular generations to enhance the network capacities [85]. Furthermore, ultra-dense networks make resource allocation more challenging because of the massive number of devices and the random device locations. Due to the frequent recurring movements that lead to change of device positions, it is essential to develop an efficient resource allocation scheme that can ensure the QoS of conventional network users [86]. Generally, the idea for performance enhancement in network densification proposes small coverage cells, such as picocels and femtocells, to be deployed into close range with the intended devices, which leads to multiple favorable channel conditions between receivers and transmitters. As a result, the transmission power can be reduced, which results in reduced interference with other network elements that co-exist. However, the main issue in the integration of small cells and D2D technology that supports in-band D2D communication is the interference management. Resource allocation and interference management issues in multi-tier heterogeneous networks are considered more challenging compared to the proposed solution in the literature that caters to traditional single-tier systems due to the different transmission power of each BS. Additionally, different tiers produce different levels of interference due to the different access restrictions (private, public, hybrid, etc.). The interference among small-cell cellular links, macro-cell cellular links, and D2D links all need to be considered and managed efficiently to enhance the spectrum efficiency. Besides, the algorithms that are used in the mode selection need to be modified for this heterogeneous environment so that it can make a dynamic decision depending on the condition of the networks. Therefore, it is important to consider how effective interference management can be obtained.

D2D in mmWave Communication
One of the features that are considered crucial in 5G cellular networks that recently gained notable attention is the mmWave band communication [87]. It is fully anticipated that for future 5G cellular networks, mmWave mesh networks will replace the traditional structure that used copper or fiber, in order to offer mesh-like connectivity and rapid deployment [88]. An mmWave communication has the capacity to offer exceptionally high data rates, which lead to significant network capacity because mmWave communication runs on a larger frequency band. However, it can lead to interference management challenges due to some important propagation characteristics in the mmWave band communication that are inconsistent with the microwave band. Different interference conditions are initiated inside each cell in D2D-enabled mmWave cellular networks. The majority of previous studies focused on enhancing resource sharing algorithms to maintain the interference. However, the requirement for interference management schemes that consider the direction in mmWave 5G cellular networks is crucial in order to allow multiple D2D communication.

Challenges in Security
Research challenges for D2D security that need to be highlighted in the future are also discussed.

Balancing Security-Energy Trade-off
It is impractical to utilize security techniques that use a lot of energy in a limited resource D2D devices. Therefore, to ensure the optimal device resources usage, a secure energy-efficient protocol needs to be implemented. In order to secure authentication and message integrity, a cryptographic scheme, which usually depends on the key generation complexity, is put into work. The provision of the security and privacy by using just one type of algorithm is not considered best practice in terms of the energy point of view. For that reason, future research should focus more on the hybrid protocols that work for dynamic algorithm selections depending on network conditions.

Nonrepudiation
In the D2D network, it is crucial to maintain nonrepudiation so that data integrity is preserved. However, the current research on D2D communication lacks a complete security architecture that can be used for the device authentication and users. What is more, the cooperation from mobile nodes that leave and join the network with current network members is required to optimize network performance. Specifically, it is necessary to create a flexible and scalable authentication framework that supports a rapid authentication for mobile users when they are joining or leaving the network.

Lack of Standardization
To ensure the secure communication of D2D user equipment, there are no global standards or policies available. Furthermore, the mechanism that is used to authenticate different applications could vary, which makes it is difficult to guarantee interoperability. Therefore, there is a vital need for standardized documentations that highlight issues like the procedure in securing an interaction between a user and a particular application, and the amount of the user's data that needs to be shared to protect the security and privacy of the information database management. Especially in the decentralized D2D network environment, these issues are becoming crucial and need to be mitigated.

Decentralized Anonymity Schemes
Due to the nature of D2D communications, which are peer-to-peer, opportunistic, and self-organizing, an anonymity scheme that is independent and not reliant on centralized third parties is required. Additionally, these schemes are required to highlight the problem of anonymity abuse without the presence of a single trusted center. There is an author who proposed distributed privacy scheme in ad-hoc and vehicular networks [84]. However, the issue is not being fully explored in D2D communications.

Privacy and Security
Elliptic Curve Cryptography, AES-128, and access points are some of the cryptography techniques that are traditionally used for protecting privacy and security [89]. These cryptography techniques are not suitable for a distributed network and heterogenous network environment. Since D2D communication allows mobile users to directly connect with other devices, it will create privacy and security concerns due to malicious users that pose threats to the privacy of users. This issue raises the demand for trust management schemes that are efficient and effective, which assess the merit of trust in every device before establishing a connection.

Challenges in Power Control
Several challenges of the power control aspect that can be used as a reference for future studies are identified as follows.

One Large Network or Multiple Small Networks
The resource management challenges such as power control are associated directly with the user volume in the network. Power and frequency resources can be managed equally in small networks. However, it has become very hard for a single network to serve all users as the number of users keep growing. To be exact, the performance of networks usually degrades due to the increasing number of antennas, high complexity of decoding, CSI feedback large overhead and precoding metrics. Some of the crucial issues that need to be highlighted are the total number of users that should be allowed in the network, the methods used to allocate the resources in a subnetwork and the ways to come up with a decision, whether it is centralized or distributed.

Optimal Transmission Power
Making sure that the transmission power of D2D devices is well maintained is extremely crucial. For example, the transmission power should not be too low in order to attain a superior quality of D2D links [90]. There are certain requirements to minimize the transmission power if the users want to obtain higher battery life for the equipment. Researchers are interested in the area where the transmission power is set to the optimum because the power allocation can be divided into dynamic and static power allocation. For static power allocation, the transmission power is static and does not change with any situation. However, for the dynamic power allocation, the transmission power is flexible and can be changed depending on the proximity between the devices. In the case of uplink transmission, power management plays an essential part in minimizing the co-channel interference and near-far effect [91]. The QoS of the cellular users can be maintained if the upper power level is set to the D2D users in the network. Mitigating interferences in underlaying D2D cellular networks can be done using an effective power control method. There is a constant need to determine the D2D link optimum power level to minimize the interference and maintain the link quality.

Challenges in Mode Selection
Some of the research challenges in the mode selection of D2D communication is highlighted in the next part.

Mode Alterations Volume
One of the specific challenges in mode selection is the frequencies of the mode alteration that have to be done. Due to the wireless channel random nature, the mode alteration can happen as frequent depending on the mobility of devices and the number of scatterers. Furthermore, most of the papers related to D2D studied a single-cell scenario (D2D pairs and a single BS are attached to each other) to make the analyzing process easy to follow and straightforward. Therefore, there is a need for more research studies that focus on provisioning lasting solutions so that the number of alterations can be minimized in the mode selection process.

Mode Selection Overhead
A high amount of overhead can be incurred by the mode selection process. The overhead includes control signaling and channel estimation. Channel estimation can be generated based on the CSI of the links. However, when the CSI becomes outdated, it can greatly affect the network performance. To be exact, it is important to minimize the selection mode overhead to increase the device's lifetime.

Dynamic Mode Selection
The majority of studies consider the static network scenario. These studies primarily focus on the downlink scenarios in which the BS becomes the mediator for the D2D pairs to communicate. It is obvious that the modes that switch dynamically, either using brute force or heuristically, can bring suboptimal changes to the network performance gains. These observations show the need for a more complex mode selection scheme so that it can be dynamically used in realistic scenarios.

Conclusions
There are many benefits that are expected to be provided by the D2D communication when compared to the traditional cellular networks. D2D technologies show great potential to be the most favorable and promising paradigm for future networks. We have highlighted, in the survey, a detailed review of the current existing D2D technologies together with their characteristics, such as device discovery, interference management, security, mode selection, and power control. We review various proposed solutions with a goal to achieve a secure Device-to-Device (D2D) communication in 5G. We summarize the existing solutions by highlighting the issues or problems of the research and the proposed solutions. Based on the comprehensive analysis, we further identified the open problems and challenges that deserve future research. Even though D2D communication is considered a relatively new idea, the remarkable amount of studies and research in D2D has triggered various aspects of related research problems and challenges that can be explored in the future. The detailed discussion in this extensive review hopefully will help the future reader to gain a better understanding of D2D technologies, concepts, research gaps and future works that have been highlighted within the scope of D2D communication domain.