5G D2D Transmission Mode Selection Performance&Cluster Limits Evaluation of Distributed Artificial Intelligence and Machine Learning Techniques

5G D2D Communication promises improvements in energy and spectral efficiency, overall system capacity, and higher data rates. However, to achieve optimum results it is important to select wisely the Transmission mode of the D2D Device to form clusters in the most fruitful positions in terms of Sum Rate and Power Consumption. Towards this end, this paper investigates the use of Distributed Artificial Intelligence (DAI) and innovative to D2D, Machine Learning (ML) approaches to achieve satisfactory results in terms of Spectral Efficiency (SE), Power Consumption (PC) and execution time, with the creation of clusters and backhauling D2D network under existing Base Station/Small Cell. Additionally, one of the major factors that affect the creation of high-quality clusters under a D2D network is the number of the Devices. Therefore, this paper focuses on a small (<=200) number of Devices, with the purpose to identify the limits of each approach in terms of number of devices. Specifically, to identify where it is beneficial to form a cluster, investigate the critical point that gains increases rapidly and at the end examine the applicability of 5G requirements. Additionally, prior work presented a Distributed Artificial Intelligence (DAI) Solution/Framework in D2D and a DAIS Transmission Mode Selection (TMS) plan was proposed. In this paper DAIS is further examined, improved in terms of thresholds evaluation, evaluated, and compared with other approaches (AI/ML). The results obtained demonstrate the exceptional performance of DAIS, compared to all other related approaches in terms of SE, PC, execution time and cluster formation efficiency. Also, results show that the investigated AI/ML approaches are also beneficial for Transmission Mode Selection (TMS) in 5G D2D communication, even with a smaller (>=5) number of devices as a lower limit.


I. INTRODUCTION
Device-to-Device (D2D) Communication is expected to be a contributing factor in achieving the demanding requirements of 5G Mobile Communication Networks [1], [2]. The main reasons are that D2D communication is not constrained by the licensed frequency bands and that it is transparent to the This research is part of a project that has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement Nº739578 and the government of the Republic of Cyprus through the Directorate General for European Programmes, Coordination and Development. cellular network. Also, it permits adjacent User Equipment (UE) to bypass the Base Station (BS) and establish direct links between them, either by sharing their connection bandwidth and operate as relay stations, or by directly communicating and exchanging information. For the aforesaid reasons, D2D can improve spectral efficiency, data rates, throughput, energy efficiency, delay, interference and fairness [2]- [5].
However, in order to achieve optimum results, it is important, among others, to select wisely the Transmission Mode of the D2D Device in order to form clusters in the most fruitful positions in terms of Sum Rate and Power Consumption. The main reason is that the Transmission Mode selection for a device can affect the creation of the clusters, the way data will be communicated between the D2D Devices, and it can also optimize backhauling links between disconnected/disjointed clusters by forming better paths.
Additionally, for higher Sum Rate (Total Spectral Efficiency) and reduced total Power Consumption there are factors that affect the quality of Cluster forming in D2D. The major contributing factors in the successful realization of a D2D cluster under a network are the following: i) number of devices; ii) backhauling Data Rate achieved by a link; iii) position of Cluster Head (CH); iv) Data Rate of CH; and v) QoS & QoE. In this paper the factor of number of devices is examined in terms of limits evaluation, in the direction of the small number of devices network. Also all factors are examined for the investigation approaches.
Towards this end, our previous work [2] proposed: i) a BDIx (BDI extended) agents based Distributed Artificial Intelligence (DAI) Framework that can achieve D2D communication in an efficient and flexible manner by focusing on the local environment rather the global environment. A BDIx agent is an agent that has Believes (i.e., knowledge about the environment), Desires (i.e., it has some objectives to achieve) and Intentions (i.e., objectives that are currently executed through selected plans). Note that the Desires of a BDIx agent, and thus its intentions, can change with the raising of an event (i.e., a new D2D Device entering the Mobile Network). More specifically, an event may update believes, trigger plans or modify goals (believes) and intentions. With the examined approach the BDI agents concept is extended, by utilizing AI techniques (e.g., Fuzzy Logic, Deep Learning Neural Networks etc) to form the agent Believes; ii) an autonomous and intelligent Transmission Mode selection approach, called "DAIS", to be executed as a plan of DAI Framework towards the Intention (realized from Desire) of selecting the transmission mode of the D2D Device (in the event of "entering the Mobile Network"), in a distributed, flexible and efficient manner.
In this paper, the efficiency of DAIS is further examined, evaluated, and compared with other related approaches, like Distributed Random, Sum Rate Approach, Centralized non-D2D-UE (shown in [2]) and other, currently introduced to D2D and Transmission Mode Selection Artificial Intelligence/Machine Learning (AI/ML) techniques (i.e., FuzzyART [6], [7], DBSCAN [8], [9] and MEC [10], [11]) in a 5G D2D communication network with a reduced number of devices (<= 200 UEs/D2D candidates). Note that FuzzyART, DBSCAN and MEC are centralized unsupervised learning clustering techniques that, for the purposes of this research, we utilized for D2D communication. These approaches do not require a learning process in order to be used in the D2D communications and they provide good clustering results. The underlying reasons for selecting unsupervised learning clustering techniques are the following: i) the Transmission Mode Selection is directly associated with the selection of best Cluster Head, therefore the clustering techniques must be used; and ii) due to the dynamic nature of mobile communication network the training part of supervised learning can not conclude to the best results because of the devices movement and due to the fact that in D2D communication the best data are the current data.
For assessing the efficiency of the DAIS approach, threshold values affecting spectral efficiency and power usage of the network, like the Weighted Data Rate (WDR) and the Battery Power Level (see Section III) of the D2D Device, have been employed. In addition, those achieving strong performance have been determined. The effect of the Transmission Power (TP) variation of each Device on the investigated approaches, in terms of total Spectral Efficiency (SE), Power Consumption (PC) and Execution Time (ET) was also examined. This investigation focuses on D2D communication network with a small number of devices for the following reasons: i) applicability of 5G requirements; ii) investigate the critical point that gains increases rapidly; iii) coverage expansion; and iv) find the limits of the approaches.
The results obtained demonstrate that with the right tuning of the thresholds, DAIS could provide significant improvement in the network. Furthermore, from the results obtained from the comparison of the investigated approaches it was observed that DAIS outperforms all other approaches, except Sum Rate Approach, in terms of total SE and total PC. The reason that Sum Rate Approach achieved better results than DAIS is because Sum Rate Approach has a global knowledge of the network and thus can select the best transmission mode. Even so, DAIS approaches the performance of the Sum Rate Approach, acting on only local information. In addition, it was observed that Transmission Power (TP) alteration of the D2D Devices with a small number of UEs (<=200) can affect SE and PC for all investigated approaches.
The rest of the paper is structured as follows. Section II provides some background information and related work associated with transmission mode selection approaches. Section III presents the problem that this paper tackles and provides some specifics about the investigated approaches. Specifically, the implementations, assumptions, constraints, thresholds and metrics utilized are provided. The efficiency of the investigated approaches, is examined, evaluated and compared in Section IV. Finally, Section V contains our Conclusions and Future Work.

A. Background Knowledge
This section provides background knowledge regarding the main characteristics of D2D communications. More specifically, the types of control that can be exploited for the establishment of D2D communication links, as well as the types of transmission modes that a D2D Device can operate, are outlined in this section.
1) Types of Control in D2D Communication: The types of control that can be used for the establishment of D2D Communication links can be categorized as follows: i) Centralized: The Base Station (BS) completely oversees the UE nodes even when they are communicating directly; ii) Distributed: The procedure of D2D node management does not oblige to a central entity, but it is performed autonomously by the UEs themselves; iii) Distributed Artificial Intelligence (DAI): All control processes run in parallel and begin at the same time through collaboration in an intelligent manner; and iv) Semi distributed/hybrid: A mix of centralized and distributed schemes.
2) Types of Transmission Modes in D2D Communication: The different transmission modes in D2D Communication are the following: i) D2D Direct: Two UEs connect to each other by utilizing licensed or unlicensed spectrum; ii) D2D Singlehop Relaying: Contribution of bandwidth between a UE and other UEs [12]. One of the D2D UEs is connected to a BS or Access Point and provides access to an additional D2D UE; iii) D2D Multihop Relay: The single-hop mode is extended by empowering the connection of more D2D UEs in chain. This chain can be one to one relationship or one to more [13]; iv) D2D Cluster [14]: D2D Cluster is a group of UEs (D2D Devices acting as clients) connected to a D2D relay node performing as a Cluster Head (CH) [15]; and v) D2D Client: D2D Client is the selection of UE to participate in a D2D Cluster and act as client.

B. Related Work
This section provides a brief description of the DAI Solution/Framework along with its Desire Plan DAIS together with Sum Rate and Distributed Random algorithms that perform Transmission Mode Selection as shown in [2]. Additionally, this section provides information regarding FuzzyART, DB-SCAN, and MEC unsupervised learning Machine Learning (ML) clustering techniques, and other related approaches from open literature on Transmission Mode selection in D2D Communication. It is important to highlight here that the aforesaid AI/ML techniques were not designed for application in D2D communication but they are utilized and applied to D2D communication by us, for the purposes of this research, due to their scalability, metric used, parameters and way of calculation of labels of clusters.
1) Distributed Artificial Intelligent Solution/Framework: In this section, the paper explains in brief the DAI Framework that as concept it was introduced in the [2]. The main objective of the DAI framework is to implement 5G D2D communication with the purpose to achieve the D2D challenges (as shown in [2]). By enabling D2D UEs through BDIx agents that instantiate through BDIx framework, the investigation aims for the devices to act independently, autonomously and as a self-organizing network. More precisely, in order to achieve the aforementioned characteristics, the framework it utilizes software agents and especially BDI (Belief-Desire-Intention) agents with extended Artificial Intelligence/Machine Learning capabilities (ex. Neural networks, Fuzzy logic) named as BDIx Agent. The framework acts as a glue in the employment of more than one of successful, optimized intelligent technologies (e.g. Neural Networks, Fuzzy Logic). Therefore, the BDIx framework will be modular and the believes and desires can be substituted, added by any proposed approach that will have as target to achieve the D2D communication in 5G, as long the stability of the agent is achieved. Additionally, such agents in the framework can be implemented at the UEs as a software and there is no need to change how BSs operate or to change the hardware at BSs or UEs.
In this paragraph we will show the inner workings of DAI Framework, how it achieves D2D communication in 5G. More specifically, the DAI Framework utilizes the networks events (i.e. Device entering in a D2D network) and thresholds (Data Rate is acceptable by the user) that are derived from the Desires and an agent must monitor in order to achieve the tasks of implementing 5G D2D communication. More precisely, the events and thresholds can trigger the Desires to become Intentions with the use of priority values (from 0% to 100%). For the aforementioned task the Fuzzy Logic (FL) is used as the Plan library in order to assign priority values to Desires (the framework can let 10 concurrent intentions to run at the same time). Additionally, the DAI Framework flowchart of execution of the BDIx agents, supports queue of running Intentions that are realised from Desires with priority value of 100% (as shown in the Figure 1). Also, at the Intentions there are assigned Plans that act as algorithms for the purpose to achieve the selected Desires.
The Believes represent the understanding of the agent or the environment around. The events are actively affecting the Believes and then Desires are converted to Intentions and satisfied based on the affected Believes. The events can be prespecified with the declaration of thresholds. These thresholds, if exceeded, can raise events at the event system Plan Library (FL). The set of Believes in terms of D2D communication that a BDIx agent can use, that are derived from the D2D  Thus, the DAI Framework can achieve D2D communication by focusing on the local environment rather than the global environment with the use of LTE Proximity Services (LTE ProSe). The plan that this research investigates is DAIS as shown in the [2] and is executed in the network event of "D2D Device entering in D2D communication network".
2) DAIS, Sum Rate Approach and Distributed Random [2]: DAIS is a distributed, autonomous and intelligent Transmis-sion Mode Selection approach, implemented in a BDIx agent based DAI Framework, that selects the transmission mode of a D2D Device in a distributed artificial intelligence manner. More specifically, the DAIS approach exploits software agents and especially Believe-Desire-Intention (BDI) agents with extended Artificial Intelligence/Machine Learning (AI/ML) capabilities (BDIx), to select the transmission mode that will be used by a a new D2D Device. For the Transmission mode selection, the WDR (Weighted Data Rate), a new metric that we introduced in [2], is considered. Sum Rate Approach, is a distributed intelligent approach which uses the sum rate of the network as a metric for the UE Device to select the best Transmission mode. Note that in the Sum Rate Approach the D2D Device selects the most appropriate Transmission Mode by having all the knowledge of the network (i.e., D2D Relays, D2D Multi Hop Relays, D2D Clients, connection links). On the other hand, the Distributed Random approach is a distributed approach which performs Transmission mode selection in a random manner (e.g. the algorithm for Transmission Selection selects randomly a mode of the entering device).
3) FuzzyART [6], [7]: FuzzyART is an unsupervised learning algorithm that uses structure calculus based on fuzzy logic and Adaptive Resonance Theory (ART), for the purpose of pattern recognition and to enhance generalization. The FuzzyART consists of a comparison field and a recognition field composed of neurons, a vigilance parameter (threshold of recognition), and a reset module. The comparison field takes an input and transfers it to its best match to a single neuron whose set of weights most closely matches the input vector in the recognition field. Each recognition field neuron outputs a negative signal to each of the other recognition field neurons. Additionally, in FuzzyART the computation of choice function value consists of fuzzy "AND" operator. The aforementioned procedure allows each neuron in it to represent a category to which input vectors are classified. After classification, the reset module compares the strength of the recognition match to the vigilance parameter, if it has greater strength it adjusts weights, elsewhere the search procedure is carried out. The vigilance parameter has considerable influence on the system (e.g., more categories). So, FuzzyART provides a unified architecture for binary and continuous value inputs. The consequential number of clusters depends on the distances between the investigated elements that we want to cluster (this also depends on the metric chosen for the approach, i.e., Gaussian distance) amid all input patterns, introduced in the direction of the network for the period of training cycles. For FuzzyART the algorithmic complexity is of order O(N 2 )+O(MN), N being the number of categories, and M the input dimension. Because it can have maximum N x N recursive iterations and form clusters based on the period of training cycles (MN). 4) DBSCAN [8], [9]: The DBSCAN algorithm depends on a density-based concept of clusters, which is outlined to determine clusters of unacquainted shape. In DBSCAN, for each point of a cluster, the neighborhood of a prearranged radius has to enclose at least a minimum number of points (MinPts in DBSCAN). DBSCAN starts with an arbitrary starting point that has not been visited. Afterwards, the surrounding points, called neighborhood, are retrieved. If the examined point contains a sufficient number of points around it then a cluster is initialized and the identified neighborhood points are added in the cluster. Otherwise, the investigated point is labeled as noise, note that this point might be a part of another future examined cluster. This process continues until the cluster is completely found or unvisited points are retrieved and processed. The algorithmic complexity is mostly governed by the number of area Query requests. DBSCAN executes one area query for each point, in the case of utilization of indexing structure executing a neighborhood query, the resulting algorithmic complexity achieved to be O(N), where N is the maximum number of points that can be involved in the neighboring query. However, by taking under consideration all the cases an overall algorithmic complexity of O(N 2 ) is achieved.
5) Minimum Entropy Clustering (MEC) [10], [11]: The MEC algorithm proficiently minimizes the conditional entropy of clusters. By analyzing given samples consequently, at the end it concludes with the clusters. In MEC, the clustering criterion is based on the conditional entropy H(C|x), where C is the cluster label and x is an observation. MEC with Fano's inequality, C can be estimated with a low probability of error only if the conditional entropy H(C|x) is small. This algorithm utilizes mathematical facts, such as Havrda-Charvat's structural. The replacement of Shannon's entropy with Havrda-Charvat's structural α-entropy is selected for the purpose of achievement of the generalization of the clustering criterion, α-entropy indicates if the probability error is equal to the nearest neighbor method when α=2. Additionally, Fano's inequality and Bayes probability of error is utilized with the Parzen density estimation, a non-parametric approach. The method performs very well even when the correct number of clusters is unknown, with the utilization of maximum distance as input. It can also accurately reveal the structure of data and efficiently identify outliers simultaneously. However, this approach is an iterative algorithm initialized with a partition set by any other clustering approaches (e.g., K-Means) and random initialization should not be used. The resulting algorithmic complexity achieved is O(N 2 ), where N is the number of all points that can be involved in the neighboring query, in the formula the calculation of the entropy is included. However, by taking under consideration all the cases an overall algorithmic complexity of O(N 3 ) is achieved.

C. Related work on Transmission Mode Selection in D2D Communication
Approaches related to the Transmission mode selection investigated in this paper, are provided in a plethora of articles [2], [16]- [21]. The metrics considered for selecting the transmission mode to be adopted are: power, interference, resource blocks (RB), SINR, distance, power, frequencies and WDR. In the literature one can find approaches with a focus on: i) D2D Device Selection [16], [17], [22]; ii) Relay selection only [18], [19], [23]; and iii) D2D multi-hop relay forming by selecting as modes the D2D or D2D Multihop [20], [21]. In our work we are examining all of the possible transmission modes that can be assign to a UE, by itself (e.g. BDIx Agent) or by other entities (e.g. BS).
A classification on the related approaches based on the type of control (see Section II-A1) is: i) Centralized [16]- [18], [20], [21], where the decision is taken by the BS; ii) Semi-distributed approaches [22], where the decision is taken by both the BS and the D2D Devices in collaboration; iii) Distributed [19], where the decision is taken by the D2D Devices; however in this case the D2D Devices need some information from the BS; and iv) Distributed Artificial Intelligent (DAI) [2], where the decision is taken by each D2D Device independently; however, in this case they may share information with other D2D Devices.
It is evident from the above preliminary survey that most works use the Centralized approach and only a few use Semi or Fully Distributed algorithms. Additionally, we could not identify any other approach in the open literature that tackles the problem of having a D2D Device utilizing all transmission modes (D2D Relay, D2D Multi-Hop Relay and D2D Cluster) in a distributed AI manner. Furthermore, to the best of our knowledge, there is not any other D2D transmission mode selection approach in the literature that is utilizing unsupervised learning AI/ML clustering techniques. Therefore, the usage of unsupervised learning AI/ML approaches for the Transmission mode selection in D2D communication, is also a contribution of this paper.

III. PROBLEM FORMULATION
In this paper we aim to use DAI and ML in order for a D2D Device to select a Transmission Mode and create a D2D communication network with for the purpose to reduce the distance to the Access Point, reduced the latency, increase SE and reduced PC in a small (<=200) number of Devices D2D Network. The number of UEs examined is small, due to one of the major contribution of the paper, because we aim to calculate the investigated approaches lower limits in an environment of small number of devices in order to to show where is fruitfully to achieve cluster with drones, other relay devices and an operator should consider not change the topology of the network.Additionally, please note that similar problems,even with the same number of devices, are resolved with the use of small cells [24], [25]. Therefore, the problem that this paper tries to tackle is threefold: • It tries to maximize the total SE (i.e, sum rate) and reduce the total PC of the DAIS algorithm as well as the other investigated unsupervised learning AI/ML clustering techniques, in the case of a small number N of devices (<=200 UEs) under a BS. Therefore, this paper have the following constrains about the physical link: -The D2D network consists of N devices under the Base Station (BS) -Our approach focuses on the mobile and wireless networks with a single-antenna and point-to-point scenario -Our approach uses the Free Space Model and Free Space Path Loss -Our approach uses the Additive White Gaussian Noise (AWGN) as the basic noise model -The Transmission Power (TP) is known -The Spectral Efficiency is calculated per link More specifically, the following paragraph will show the equations used in order to do the problem formulation, the parameters description is shown in the Table I. Starting from Shannon-Hartley theorem, the spectral efficiency is shown in Equation 1, measured in (bits/s/Hz).
Therefore, with the use of the aforementioned model the spectral efficiency calculated from channel capacity is used with the power-limited and bandwidthlimited scheme and is indicated below in Equation 2 (SE/SE Link ), measured in (bits/s/Hz).
Also, the average received power (in W) is calculated asP , Transmission Power (TP) is known to the channel (TP), Power Consumption is shown in Equation 3, SNR is the received signal-to-noise ratio (SNR) and lastly the noise is N 0 (W/Hz).
Therefore, the problem is based on the Equations 4 and 5 which is the maximization of Total SE with as result the reduction of the Total PC. This is a NP-hard problem to solve (e.g. see [24]- [26]), this is the reason that a heuristic algorithm is implemented for the utilized ML algorithms.  With the implementation of DAIS and the use of BDIx agents, there are some assumptions, constraints, thresholds, and a new metric that are introduced. However, in order to show how the BDIx Agents framework can be optimized in terms of threshold investigation, only the "Weighted Data Rate" (WDR) 1 metric has been analyzed and utilized. Basically, the aim of the DAIS approach is to maximize the WDR (i.e., WDR = max(min(Link Rate))) for each path. In this paper an investigation of the DAIS thresholds is executed with the purpose to increase the Total SE and Total PC.
Additionally, a heuristic algorithm (see section IV) has been developed that utilizes the clustering results extracted by FuzzyART, DBSCAN and MEC approaches to select the best D2D Device in the identified cluster to be set as a D2D Relay node. Note that the metric used to perform the selection is the Data Rate (as described in Algorithm 1). Likewise, the feature set used for all the unsupervised learning clustering approaches is the same and it is the set composed with latitude and longitude (coordinate). Additionally, note that the aforementioned approaches does not form backhauling more than one hop and the selection of D2D Multi Hop Relay is not provided as selection option of Transmission Mode in the approaches.
It is worth mentioning that in order to apply the Fuzz-yART, DBSCAN and MEC approaches to the needs of D2D Communication, we utilized these approaches and set the constraints/settings set out below: • For all approaches, we set the maximum radius distance to form a cluster to 200 meters (WiFi Direct). • For FuzzyART we do not limit the maximum number of clusters allowed (maxClusterCount=-1). • For DBSCAN we set the minimum points (minPts) of the cluster to 2. • For MEC we set the number of clusters (k) to 100 (note that the final number of clusters may be less).
Note that except from the aforesaid constraints/settings set, all other default settings and constraints provided by the "SMILE" framework are the same [27].

A. Methodology
First, the performance of DAIS for a scenario with a small number of D2D Devices (<= 200), as compared to the number of D2D Devices in [2] which rose up to 1000, is investigated, while varying the device Battery Power Level and the WDR thresholds. For this, a "brute force" investigation of the aforesaid thresholds was executed with values from 0% to 100% using a step of 5%. Device in its proximity, and act as a D2D Relay. In addition, the effect the Transmission Power (TP) has on the investigated approaches, in terms of overall total PC and total SE achieved, is also investigated and demonstrated. For the communication power a "brute force" investigation was executed with values from 160 mW to 60 mW using a decreasing step of 10 mW.
The FuzzyART, DBSCAN and MEC AI/ML unsupervised learning clustering techniques are compared with the DAIS algorithm, the Random clustering approach and the Sum Rate Approach (shown in [2]) in a D2D communication network. The case where D2D communication is not used is also compared (we refer to this as non-D2D-UE approach). The FuzzyART, DBSCAN and MEC AI/ML are unsupervised learning clustering techniques that separates UEs into clusters (hence implement ultra-dense networks) under the BS, by utilizing distances, like the Euclidean Distance, as a metric. Then, the heuristic algorithm, that we developed (and presented in Algorithm 1), utilizes the clustering results extracted by these approaches, and selects the D2D Device in the identified clusters with the best Data Rate to be set as D2D Relay node and made D2D Relay Cluster Head (CH). Once the D2D Relay CH is selected, the algorithm assigns the UEs within a radius of 200m (WIFI Direct) from the D2D Relay CH, to become D2D Clients of the cluster and connect to it. Also, UEs not within the radius will stay connected to the BS (non-D2D-UEs).
The Sum Rate Approach is utilizing distributed control. With this approach, each node adds the data rate of the connections (that is the Sum Rate) that each D2D Device has in the D2D communication network. Then it decides the best transmission mode, best link and best path to the BS or other Gateway, in order to achieve the maximum Sum Rate of the whole network. The Random approach is a simple approach that selects the Transmission mode of each node in a random manner. The non D2D UE approach describes the current approach used in Mobile Networks. This approach keeps all the UEs connected directly to the BS and a constant predefined transmission power, that is specified for the UEs that are directly connected to the BS, is used.

B. Simulation Environment
In order to investigate how to achieve the best results in a network with a low number of D2D devices, a range of 1 to 200 D2D Devices were used. The devices are placed in a cell range of 1000 meter radius from the BS using a Poisson Point Process distribution model. In our simulation environment we keep the same comparison measurements of performance and these are the Total SE (Sum rate), Total PC and Execution Time as in [2]. Also, the Channel State Information (CSI) used in the investigation is the Statistical CSI. In addition we keep the same formulas for D2D UEs battery power level estimation and WDR and the same simulation constraints and simulation parameters. However, we introduce new constraints and parameters as in section III. The simulation environment is implemented in Java (i.e. Java 11.0 with Apache Netbeans 11.6 IDE) using the JADE Framework [28], LTE/5G Toolbox libraries from Matlab (2020a) and also the SMILE library that is used for AI/ML implementation. The hardware used for the simulation is the following: i) an Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz; ii) 24 GB DDR4; iii) 1TB SSD hard disk; and iv) NVIDIA GeForce GTX 1050 Ti graphics card with 4GB DDRS5 memory.

1) Evaluation of DAIS Approach:
The results related to the performance of DAIS are illustrated in Fig. 2 and Fig. 3. Note that for the results provided, a "brute force" investigation was executed, by varying the Device Battery Power Level (in %) and the Weighted Data Rate (WDR) Thresholds with values from 0% to 100% using a step of 5%. During this investigation the optimum thresholds were also selected. As observed from the results (see Fig. 2), varying the Device Battery power level threshold does not cause noticeable changes on the total PC nor the sum rate (i.e., total SE).
On the other hand, by varying the WDR Threshold, we observe that the results are considerably affected, in terms of SE and PC. More specifically, as shown in Fig. 3, with a different number of D2D Devices and different values for the WDR threshold there are major changes in the resulting total PC and total SE. However, in order to achieve these results at least a number of 75 D2D Devices must exist under the BS. Furthermore, as depicted in Fig. 3, the WDR threshold value achieving optimized results is 20% (see section IV-A for an explanation on the use of this threshold). More specifically, by altering (decreasing) the transmission power, the following observations are made: i) for the scenarios with low number of UEs (i.e., up to 100 UEs), there is noticeable improvement on the total network PC (i.e., up to 64.10% for DAIS; Fig. 5), with a small decrease on the SE (i.e., a maximum of 20% decrease for DBSCAN shown in Fig.  4); ii) for the scenarios with more than 100 UEs, significant gains are also observed on the total PC (i.e., up to 66.10 % decrease for MEC; Fig. 5) but with minor decrease on the SE (i.e., a maximum of 13% decrease of Random; Fig. 4).
In addition, as shown in Fig. 5, for all approaches compared (except the non-D2D-UE), the values of total PC change rapidly from 0 UEs to 200 UEs, but they do not have a large scale of difference in each approach. On the other hand, for the non-D2D-UE approach the total PC used compared to all other approaches is significant. The reason is that with this approach, all the UEs have direct connections with the BS, which are power consuming.
3) Performance Comparison of the Investigated Approaches: In this section, the performance of the approaches is compared in terms of total SE (Sum Rate) and total PC achieved. For this comparison a predefined transmission power of 160 mW is used for all approaches as shown in Fig. 6. As depicted in Fig. 6, in terms of total power needed (i.e., power consumption), the best results are provided by the Sum Rate Approach, while the worst performance is observed for the non-D2D-UE approach. In addition, all approaches are relatively close, in terms of total SE from a range of UEs of 0 to 50. Beyond 50 UEs, the DAIS and Sum Rate Approach, approaches start to show increased SE and they conclude to have better SE than other centralized AI approaches as shown in Fig. 6.  In terms of SE, DAIS seems to under-perform compared to the other approaches for a network with a small number of devices (i.e., 10 UEs as shown in Fig. 4 at 160 mW). However, from 50 UEs and above, DAIS is better than the DBSCAN, Random and non-D2D-UE approaches as shown in Fig. 4 and in Fig. 6. Finally, at 200 UEs (maximum number of UEs examined) DAIS really shows its benefits by reaching the results provided by the Sum Rate Approach shown in Figure 6. Continuing our examination on total PC, DAIS outperforms the non-D2D-UE approach for all number of devices examined. Furthermore, at 200 devices the DAIS is better than DBSCAN, MEC, non-D2D-UE approach and Random, but it has the same total PC with FuzzyART; Fig. 6.
The non-D2D-UE approach has the worst performance in terms of total PC, compared to all other related approaches (the change percentage in total PC for non-D2D-UE approach is 12.50% for 5 devices and 4% from 5 devices to 200 devices), as shown in Fig. 6. In terms of SE, it provides better performance than other approaches only when the number of UEs in the Network is 10 or less (as shown in Fig. 4). However, for more UEs it provides the worst results in terms of SE. Additionally, below 50 UEs, the non-D2D-UE approach has better SE than DAIS. However, in the examined range of numbers of UEs (0 until 200) DAIS has better total power usage for communications rather than non-D2D-UE approach; this is shown in figure 6.
Random approach is always the worst than all other approaches in terms of SE (as shown in Fig. 6). However, Random provides better performance in terms of total PC compared to the non-D2D-UE approach (as shown in Fig. 6).
Additionally, in our examination we investigated some extra characteristics of each algorithm and compared the performance of the different approaches in terms of number of messages 2 exchanged, number of resulting non-D2D UEs, number of clusters formed and total number of devices under cluster. The results are provided in Table II. Regarding the number of messages that each approach needs to exchange in order to conclude on the Transmission mode selection for all runs 3 , from the worst to best performance is provided by Sum Rate Approach, FuzzyART, MEC, DB-SCAN, DAIS, non-D2D UE and Random.
Additionally, for all runs, with the only approaches that all UEs finally conclude to become D2D Devices are DAIS, Sum Rate Approach and Random approach. For the rest of the approaches, FuzzyART has the least number of resulting non-D2D UEs followed by MEC and DBSCAN.
In terms of the created clusters, the total number of users that are served by cluster (D2D Relay/D2D Multi Hop Relay that are directly connected to BS are not included) and number of clusters created per approach are investigated. The benefits of having a large number of D2D Devices under a cluster are significant for the SE and PC. More specifically, by having a large number of D2D Devices under a cluster the total SE is increased, total PC is reduced and the number of direct links to BS are decreased. On the other hand, in the case of a large number of Clusters the links to BS are reduced but SE may not be affected effectively. Moreover, balancing of both metrics can be achieved with maximum SE, minimum PC and reduced number of links to BS for large towards medium number of clusters with equal assigned D2D Client Devices. Therefore, by investigating the clusters density and number of clusters the following results are provided: i) for 50 UEs the maximum number of devices that can be included in a cluster is provided by DBSCAN (10) and then MEC (9) with those establishing 1 and 5 clusters respectively. The MEC is the second in order, but DBSCAN is in the last approaches in terms of Total SE/PC; ii) for 100 UEs the maximum number of devices that can be included in a cluster is provided by DAIS (97) with 19 clusters established and then by DBSCAN (25) with 1 cluster. The DAIS is the third in order, but DBSCAN is in the last approaches in terms of Total SE/PC; and iii) for 200 UEs the maximum number devices that can be included in a cluster is provided by DAIS (146) with 26 clusters and then DBSCAN (49) with 1 cluster. The DAIS is the second in order, but DBSCAN is in the last approaches in terms of Total SE/PC.
In our analysis, we examine the mean time of execution of each approach (centralized, distributed, semi distributed and DAI) in terms of the duration of the calculation of Transmission Mode Selection of a D2D Device. More precisely, we calculate for each approach the mean time when the algorithm started to compute the transmission mode until the conclusion of the algorithm in each run (for different numbers of UEs). For example with 50 Devices in centralized and semi-distributed mode, the procedure computes the sum of execution time from 1..50 UEs of each iteration when the approach examines 1,2,3,4..,50 Devices and then it divides the result with the number of devices (50). However, for the distributed mode the time is calculated in each D2D Device 3 Run is the execution of the algorithm with a different number of UEs in each instance of the scenario  FuzzyART DBSCAN GMEANS MEC  50  0  0  1  0  0  1  0  15  100  1  1  12  0  2  7  1  36  200  1  1  12  0  2  7  1  36 and at the end the sum of the calculated times divided with the number of devices is the resulting execution time. Note that in Sum Rate Approach there is a need to investigate for each D2D Device all transmission modes and links in order to achieve the best sum rate (this is the reason it is slow). On the other hand for centralized approaches the duration depends on the calculation of the transmission mode selection of the whole network. Overall, the faster approach is the DAIS (DAI) with 100 ms with any UE (from 1..200 UEs), the second faster is the DR with the non-D2D UEs, the most slowest approaches are MEC, DBSCAN (centralized) and Sum Rate Approach (distributed) as shown in the Table III.

4) Overall Remarks:
In the performance comparison provided above the different investigated approaches are evaluated in terms of SE and PC. The results illustrated that the worst performance is provided by the Random approach, while the best performance is provided by Sum Rate Approach, FuzzyART and DAIS. On the other hand, in terms of total PC, the worst performance is provided by non-D2D-UE approach, while best is provided again by the Sum Rate Approach, DAIS and FuzzyART.
Additionally, the paper shows that unsupervised learning approaches such as FuzzyART can be used for transmission mode selection in D2D Communication. In addition, by considering Table II, we observe that Sum Rate Approach needs to exchange a lot of messages before a decision is established, this is the reason that is taking a lot of time to conclude.
Also, another observation that is made in this investigation is that, compared to all other investigated approaches, DAIS creates the greatest amount of clusters with the greatest amount of D2D Clients in each cluster, however without always providing the best performance in terms of SE and PC (e.g., for 50 UEs, Sum Rate Approach provides the best performance with 6 D2D Clients and 12 clusters in contrast to DAIS with 6 D2D Clients and 13 Clusters). Also, it is observed that even if DBSCAN creates only one cluster 4 , it achieves better results than the non-D2D UE approach. In addition, it is shown in Table II and in Figure 6 that all investigated approaches except Random and non-D2D-UE approaches create clusters in the most accurate positions (increased SE/reduced total PC) with the use of WDR (i.e. DAIS) and sum rate (i.e. Random, FuzzyART, MEC, DBSCAN, Sum Rate Approach) measurements under the mobile network in the D2D network. Therefore, the approaches are good alternatives to be used for Transmission mode selection in the D2D communication.
In addition, the following findings extracted from Fig. 6 and Table II: i) Some of the 5G requirements are achievable through Transmission Mode Selection (i.e. High Data Rates, Low Power Consumption); ii) The critical point that SE, PC gains increases rapidly is 100 UEs for all approaches; iii) coverage expansion is achieved; and iv) the lower limit of all approaches is 5 UEs.

V. CONCLUSIONS AND FUTURE WORK
The research objective on this paper is threefold. Firstly, it examines the performance of the DAIS algorithm with the proposed changes in threshold (i.e., WDR Threshold), in terms of SE and PC, considering scenarios with a small number of Devices (i.e., <= 200). During this examination, the WDR and the BPL DAIS' thresholds, affecting the SE and PC of the network, have been examined and values achieving best performance have been determined. Secondly, it introduces the use of unsupervised learning AI/ML approaches in Transmission mode selection in D2D Communication and compares the performance of DAIS with FuzzyART, DBSCAN and MEC as well as other related approaches (i.e., Distributed Random, Distributed Sum Rate Approach, Centralized non-D2D-UE). Last, it examines the effect the transmission power has on the investigated approaches, in terms of PC and SE achieved. The results obtained demonstrated that DAIS, compared to all other related approaches, with the right tuning of WDR and BPL threshold values, can provide significant gains in terms of SE, PC, and cluster formation efficiency. Precisely, the results showed that DAIS and Sum Rate Approach outperformed all other approaches in terms of SE. FuzzyART, DAIS and Sum Rate Approach outperformed all other related approaches in terms of PC. Additionally, our findings showed that, by reducing the transmission power of communication, the SE and PC of the network is significantly affected (SE in a negative way and PC in a positive way) when the amount of UEs is less than 100. On the other hand, from 100 to 200 UEs the effect on SE becomes smoother while on PC the gains remain the same. Also, results showed that the investigated AI/ML approaches are also beneficial for Transmission mode selection in D2D communication, even with a small number of Devices. As future work we will investigate the performance of the same AI/ML approaches in scenarios with large number of UEs (i.e., up to 1000 UEs under the same BS) considering non ideal CSI in D2D communication network.