A Novel Interference Avoidance Based on a Distributed Deep Learning Model for 5G-Enabled IoT

The co-existence of fifth-generation (5G) and Internet-of-Things (IoT) has become inevitable in many applications since 5G networks have created steadier connections and operate more reliably, which is extremely important for IoT communication. During transmission, IoT devices (IoTDs) communicate with IoT Gateway (IoTG), whereas in 5G networks, cellular users equipment (CUE) may communicate with any destination (D) whether it is a base station (BS) or other CUE, which is known as device-to-device (D2D) communication. One of the challenges that face 5G and IoT is interference. Interference may exist at BSs, CUE receivers, and IoTGs due to the sharing of the same spectrum. This paper proposes an interference avoidance distributed deep learning model for IoT and device to any destination communication by learning from data generated by the Lagrange optimization technique to predict the optimum IoTD-D, CUE-IoTG, BS-IoTD and IoTG-CUE distances for uplink and downlink data communication, thus achieving higher overall system throughput and energy efficiency. The proposed model was compared to state-of-the-art regression benchmarks, which provided a huge improvement in terms of mean absolute error and root mean squared error. Both analytical and deep learning models reached the optimal throughput and energy efficiency while suppressing interference to any destination and IoTG.


Introduction
The fifth generation (5G) is considered a basic and emerging technique for the Internetof-Things (IoT). IoT is a communication environment where a massive number of devices communicate with each other. IoT devices can be included in smart homes, healthcare, and industrial and autonomous vehicles, which improve people's daily life [1]. 5G networks address the major challenges that exist in cellular networks. They enable all devices to communicate with each other without the need for a base station (BS) which is known as device-to-device (D2D) communication. Furthermore, they enable machine-to-machine (M2M) and device-to-everything (D2E). In addition, 5G authorizes secure, low-latency, reliable and efficient connectivity, also supporting mobility [2]. One of the most important systems that deploy D2D communication nowadays is 5G-enabled IoT which is considered a promising future technique. 5G-enabled IoT communication to supports a large number of applications such as self-driving cars, drones, virtual reality, security surveillance, and many more applications [3]. All the devices used in these applications communicate with each other or with an access point or infrastructure using wireless or wired links [4]. Compared to wired, wireless links are more suitable and efficient to be used for IoT devices. Additionally, wireless links provide a high rate and reliability with low latency. 5G-enabled IoT is expected to face many challenges such as security, privacy, data control, latency, interference, resource allocation and power consumption. In the literature, diverse solutions have been proposed to overcome those potential problems, yet some challenges still need further investigation [5]. IoT generates an enormous amount of data that have to be processed using machine learning and data analytics [6]. Machine learning, which is a branch of Artificial Intelligence (AI), focusses on how to extract hidden information in the provided data and to help to make decisions. One of the famous machine learning techniques, which has gained a lot of interest lately, is deep learning. For the past decade, deep learning has gained a lot of attention as its tremendous powers have built models that can learn tough problems and achieve high performance. Various recent 5G-enabled IoT applications have adopted deep learning since it can provide higher level of analytical processing, and thus dramatically enhancing results [7,8].
IoT devices (IoTDs) and cellular users equipment (CUEs) transmit and receive data while sharing the same spectrum in 5G-enabled IoT. Usually IoTD communicates with an IoT gateway (IoTG): However CUE communicates with base station (BS) or other CUE which is known as D2D communication. All devices send data using the same spectrum, causing interference at BS or any CUE receiver and IoTG. This interference affects the system reliability and efficiency. In this work, an interference avoidance scheme using a deep learning model is proposed. The main goal of the proposed model is to increase the overall system throughput and energy efficiency. The contributions of this article are summarized as follows: • The proposed approach developed an efficient method to enhance the overall system performance in terms of system throughput and energy efficiency. • An optimization problem using an analytical and deep learning model was formulated to ascertain the reliability and efficiency of communication among 5G and IoTs.

•
The proposed approach aims to decrease or eliminate the interference in 5G networks and IoT systems. This was achieved through determining the optimum distance between CUE-IoTG and IoTD-D for the uplink (UL) data communication and between BS-IoTD and IoTG-CUE for the downlink (DL) data communication. This can be achieved based on different parameters, which affect the system performance such as transmission power, distance between CUE-D and IoTD-IoTG, path loss and signal-tointerference-plus-noise ratio (SINR th ).

•
The proposed approach allowed the transmission of CUE and IoTD, using a deep learning model, to predict the suitable acceptable distance between CUE-IoTG and IoTD-D (uplink) and between BS-IoTD and IoTG-CUE (downlink) thus avoiding severe interference.

•
The proposed deep learning model was compared to state-of-the-art benchmark methods and it provided a marked improvement in the results. • The proposed model can be used in the design phase for interference prediction and circumvention.

•
The proposed approach was investigated in terms of overall system throughput and energy efficiency under different conditions, such as the path loss exponent, transmission power, different SINR th values, and different transmission ranges. The whole network can be optimized by these findings in a vibrant environment.
The upcoming sections are organized as follows: First the related work of IoT and 5G networks will be presented in Section 2. The proposed analytical and deep learning models will be thoroughly discussed in Section 3. Section 4 will show the details of all the experimental work and analytics of the results. Finally, the presented work will be summarized and concluded in Section 5.
In [9], a stochastic optimization problem for a network of IoT devices and cellular users sharing the same frequency spectrum with drones was formulated to obtain the optimized transmission power and maximize energy efficiency given lower interference constraints. In addition, the proposed idea in [10] was based on optimizing the randomaccess procedure, which allowed users to send messages to the base station using one of the target receiver powers according to which the base station could differentiate between different users using successive interference cancellation. Furthermore, the authors of [11] proposed an approach for the resource allocation and placement of multiple unmanned aerial vehicle base stations in an uplink IoT network. Their approach was divided into three main steps: k-means clustering algorithm to group devices served by the same base station, subchannel assignment allocation for devices to diminish interference, and optimization of the transmission power of the IoT devices and the altitudes of the unmanned aerial vehicles. Moreover, an analysis of a hybrid transceiver design problem was presented in [12] for the maximization of the energy efficiency of multiple-input multiple-output interference channels for IoT power constraint devices. The authors of [13] proposed a utilization of Piece-Wise and Forward Non-Orthogonal Multiple Access (PF-NOMA) in a cooperative communication based on an optimization problem. Their proposed model acquired the optimal power and time splitting factors to achieve the maximum rates. Additionally, [14] proposed a new framework called the interference control model. This proposed model aimed to control the interference among IoT and 5G networks based on an optimization technique to maximize the system efficiency and reliability.
The deployment of deep learning for the minimization of interference was presented in [15] where spectral efficiency was enhanced using a scheme based on deep reinforcement learning, which reused the spectrum resources in the communication of the D2D and cellular user equipment (CUE). Similarly, the authors of [16] aimed to enhance spectral efficiency. They proposed the deployment of multiple concurrent frequency bands instead of one channel where deep leaning was used to dynamically select the most suitable channel based on quality requirements such as the signal-to-interference-plus-noise-ration. In addition, in [17], an interference control scheme based on reinforcement learning was proposed to allow the base station to optimize its downlink transmission power while being oblivious of the distribution of the inter-cell interference. The application of Deep Reinforcement Learning (DRL) in which each subcarrier power allocation could be adjusted among D2D pairs was proposed in [18] to reduce latency and increase reliability in D2D communication while rigorous interference constraints were satisfied. Furthermore, the authors in [19] considered deep learning to highlight the interference problem among D2D communications in cellular-enabled IoT networks. The proposed model highlighted the delayed latency and burden on enhanced node base station nodes. Moreover, [20] proposed a scheme to protect energy efficient video transmission in an IoT system against interference using reinforcement learning. In the proposed scheme, a base station managed the IoT transmission action such as transmission power, rate of encoding and scheme of modulation and coding with no knowledge of the transmission channel model. An investigation of different scenarios for channel access management of indoor IoT communication was presented in [21], in which a distributed coordination scheme, based on reinforcement learning, allowed devices to learn to control their activity patterns based on the deep learning. The effect of imperfect inference cancelation and constraint transmission power requirements were studied in [22] where NOMA and packet diversity were jointly adopted.
Other approaches have been adopted, such as in [23], where a modulation scheme was used for 4G and 5G to obtain the required frequency offset to ensure their coexistence with minimal interference among adjacent channels. In addition, in [24], a multiplexing technique was presented for D2D communication to enhance resource utilization and minimize interference of the D2D users with the cellular users. The proposed technique divided each cell into two regions and spectrum resources were allocated to each region to reduce interference among adjacent cells. Finally, in [25], the authors proposed a novel scheme based on the Nash noncooperative power game for a multiuser multiple-input multiple-output power downlink for handling the interference among IoT devices.
A lot of research has been proposed for the performance enhancement of 5G-enabled IoT systems, yet there still is room for further investigations focusing on how IoTDs, CUEs, BS and IoTG interact to decrease the interference occurrence at D and IoTG for uplink and CUE and IoTG for downlink. The main goal of this work is to determine the required conditions to decrease or eliminate the interference in 5G networks and IoT systems. This can be achieved by establishing the minimum appropriate predicted distance between CUE-IoTG and IoTD-D for uplink data communication and between BS-IoTD and IoTG-CUE for downlink data communication in order to decrease interference at any D and IoTG. The proposed model deploys deep learning and analytical optimization in which a distributed deep learning model for IoT and 5G networks is used to learn how all of IoT and CUE devices, BS and IoTG can avoid interference by adapting the distance between CUE-IoTG and IoTD-D for uplink and the distance between IoTG-CUE and BS-IoTD for downlink. This enhances the system reliability and efficiency. The assessment of the overall system performance is determined in terms of system throughput and energy efficiency.

Proposed Model
In this section, the proposed model for controlling the interference affecting each destination is described by a numerical optimization technique. Next, the dataset generation based on the proposed analytical model is demonstrated followed by a proposed deep neural network architecture that would be applied to sending devices, base stations and IoT gateways in real life.

System Model and Problem Formulation
The proposed network assumes that there are N number of CUEs, K number of IoTDs, a BS for cellular communication and an IoTG for IoT communication sharing the same spectrum as shown in Figure 1. Figure 1a shows the uplink (UL) data communication for cellular network and IoT communication. There are two means of communication for the cellular network: (i) the CUE communicates with other CUEs, which is known as D2D communication, or (ii) the CUE communicates with the base station, which is the standard known cellular communication. Additionally, there are a number of IoTDs communicating directly with IoTG. Assume that at least one CUE and IoTD sharing the same spectrum have information that needs to be transmitted to the destination makes the BS and any destination node suffer from interference caused by all the transmitted sources. During the downlink (DL) as shown in Figure 1b, BS and IoTG transmit data to CUEs and IoTDs, respectively; in this case, the interference occurs at any CUE and IoTD. The aim of the proposed model is to control the interference among all destinations to enhance the overall network performance by optimizing the system throughput (S) and energy efficiency (EE) for both the uplink and downlink as shown in the following equations: where S ij UL , EE ij UL , S ij DL and EE ij DL are the overall system throughput and the total system energy efficiency for the uplink and downlink, respectively, of the i-th path between a CUE-D and the j-th path between IoTD and IoTG. Symbols d CG , d ID , d BI , and d GC are the uplink interference distance between CUE-IoTG and IoTD-D and the downlink interference distance between BS-IoTD and IoTG-CUE, respectively. Symbols P C and P I are the uplink CUE and IoTD transmission power, respectively. Symbols P B and P G are the downlink BS and IoTG transmission power, respectively. For the proposed model, non-orthogonal multiple access (NOMA) was considered, NOMA can serve a large amount of devices and allow them to access the channel at the frequency/time and with the same transmission power [5,26]. Moreover, a Rayleigh fading channel with additive white Gaussian noise (AWGN) was considered for the proposed model [27]. Furthermore, for different links, it was assumed that the channel fading coefficient was statistically mutually independent.

Uplink Data Communication
During the uplink data communication CUE transmits data to any destination whether it is BS or other CUEs. Furthermore, IoTD transmits its data to the IoTG. Thus, the received signal between the CUE-D (r CD ) and IoTD-IoTG (r IG ) links can be expressed as follows [28]: where H CD and X 1 are the channel gain coefficient and the transmitted symbol of the CUE-D link, respectively. Symbol P I j is the transmission power of the j-th IoTD. H I jD is the channel gain coefficient between IoTD-D. Symbol Y 1 represents the noise symbol received by D. Symbols H IG and X 2 are the channel gain coefficient and the transmitted symbol of the IoTD-IoTG link, respectively. Symbol P Ci is the transmission power of the i-th CUE. Symbol H CiG is the channel gain coefficient between CUE-IoTG. Symbol Y 2 represents the noise symbol received by IoTG. Symbols n 1 and n 2 are the independent and identically distributed (i.i.d.) additive white Gaussian noise (AWGN) of the CUE-D and IoTD-IoTG, respectively. The signal-to-noise-plus-interference for CUE-D (SI NR thCD ) and IoTD-IoTG (SI NR thIG ) can be represented as follows: where N o is the thermal noise power spectral density per Hertz. Symbol B is the channel system bandwidth. Symbols H CD , H I jD , H IG and H CiG can be represented as: where |h CD | 2 , |h IG | 2 , |h CiG | 2 and h I jD 2 follow a complex normal distribution CN (0, 1).
Symbols γ CD, γ IG , γ CiG, and γ I jD represent the path loss model of CUE-D, IoTD-IoTG, i-th CUE-IoTG and the j-th IoTD-D, respectively. The path loss between CUE-D, IoTD-IoTG, i-th CUE-IoTG and the j-th IoTD-D can be expressed as [29,30]: where γ o is the path loss constant of any transmission link symbol. Symbols d CD and d IG are the transmission distance between CUE-D and IoTD-IoTG, respectively. Symbol α is the path loss exponent. It is worth mentioning that the path loss will going to be changed based on the CUE communication with other CUEs or BSs. This is due to the difference between CUE-CUE or CUE-BS. Accordingly, Equations (7) and (8) can be written as: Therefore, the overall system throughput (S) and the energy efficiency can be expressed as follows for the uplink data communication: where P o is the internal circuitry power.
Consequently, the objective function and constraints can be derived as: and where d CGmin and d IDmin are the minimum required distance between CUE-IoTG and IoTG-D, respectively, for avoiding interference and enhancing the system performance. Symbols P Cmax and P Imax are the transmission power of the CUE and IoTD, which helps improving the system performance.

Downlink Data Communication
During the downlink data communication BS and IoTG transmits their data to the i-th receiving CUE and j-th IoTD, respectively. Thus, the received signal between BS and any receiving CUE (r BC ) and IoTG and any receiving IoTD (r GI ) links can be expressed as follows [28]: where H BC and X 3 are the channel gain coefficient and the transmitted symbol of the BS-CUE link, respectively. H GC is the channel gain coefficient between IoT and any receiving CUE. Symbol Y 3 represents the noise symbol received by any receiving CUE. Symbols H GI and X 4 are the channel gain coefficient and the transmitted symbol of the IoTG-IoTD link, respectively. Symbol H BI is the channel gain coefficient between BS-IoTD. Symbol Y 4 represents the noise symbol received by IoTD. Symbols n 3 and n 4 are the independent and identically distributed (i.i.d.) additive white Gaussian noise (AWGN) of the BS-CUE and IoTG-IoTD, respectively. The signal-to-noise-plus-interference for BS-CUE (SI NR thBC ) and IoTG-IoTD (SI NR thGI ) can be represented as follows: where H BC , H GC , H GI and H BI can be represented as: where |h BC | 2 , |h GC | 2 , |h GI | 2 and |h BI | 2 follow a complex normal distribution CN (0, 1). Symbols γ BC, γ GC , γ GI , and γ BI represent the path loss model of BS-CUE, IoTG-CUE, IoTG-IoTD and BS-IoTD, respectively. Thus, the path loss between BS-CUE, IoTG-CUE, IoTG-IoTD and BS-IoTD can be expressed as [29,30]: where d BC and d GI are the transmission distance between BS-CUE and IoTG-IoTD, respectively. Therefore, Equations (25) and (26) can be written as: Therefore, the overall system throughput (S) and the energy efficiency can be expressed as follows for the downlink data communication: Consequently, the objective function and constraints can be derived as: and where d BImin and d GCmin are the minimum required distance between BS-IoTD and IoTG-CUE, respectively, for avoiding interference and enhancing the system performance. Symbols P Bmax and P Gmax are the maximum transmission power of BS and IoTG, which helps improve the system performance. For the proposed model, for fairness, it is assumed that the required signal-interferenceplus-noise for uplink and downlink for a 5G network (SINR thCiB, SINR thBCi ) and IoT system (SINR thIjG , SINR thGIj ) has the same value, which is SINR th.

Dataset Generation
The datasets used in this work were generated using MATLAB simulations based on the equations previously explained in Section 3.1.1 for the uplink and Section 3.1.2 for the downlink communication. The parameters in the equations were substituted for by the values declared in Table 1. Two datasets were generated, one for the uplink and the other for the downlink communication. The datasets will be used to train a model that is to be placed on all sending devices in the case of uplink and another to be placed on BS and IoTG in the case of downlink communication. For the uplink communication, the outputs were generated for different combinations of SINR th and distances of CUE-D and IoTD-IoTG using the Lagrange optimization technique to generate the optimal distances of IoTD-D and CUE-IoTG for each input. The experiments were run for different values of SINR th ranging from 0 to 20. For each value of SINR th , the value of the CUE-D distance was initialized to 1 and incremented by half a meter for each record until the throughput and energy efficiency of the calculated distances of IoTD-D and CUE-IoTG were unacceptable.
Considering the downlink communication, the output distances IoTG-CUE and BS-IoTD were generated for different values of SINR th, along with distances of BS-CUE and IoTG-IoTD. The output distances were evaluated for each record to make sure that they meet the required throughput and energy efficiency.
The statistical description of all features in the two generated datasets showing the minimum, maximum, mean, standard deviation and total number of records are shown in Tables 2 and 3. The spearman correlation of all input and output features for both the uplink and downlink communication was calculated and is presented in Figure 2. In the results section, the effect of the correlation will be further explained.

Proposed Deep Learning Model
One of the main deep learning architectures most commonly used is the convolutional neural networks (CNN), which has become almost a standard in a variety of two-dimensional (2D) data applications, especially image and video processing. Recently, a modification of the traditional 2D-CNN, namely the 1D-CNN, was proposed in [35] and later showed outstanding performance in numerous studies given a limited amount of signal data. Examples of such applications are biomedical classification, speech recognition, fault detection in a motor and several others [36].
There are several advantages that could be achieved when using 1D-CNN. Compared to ordinary deep learning methods, it has proved to generate good results even if the training records are scarce. 1D-CNN has a low computational complexity, making it much easier and faster to train. It is very well suited for being used in real-time applications on mobile devices as they consume minimal processing and battery power [36]. Consequently, 1D-CNN was deployed in this research work to be the feature extraction methodology for the proposed model. In this section, the proposed deep learning model is introduced. The presented model is to be implemented on sending devices, BS and IoTG separately to calculate the optimal distance required to reduce the interference.

Network Structure
In this work, a distributed deep learning network is proposed having two sub-models each comprising the input, 1D CNN, and fully connected and output layers. The proposed trained network is intended to be used by each device independently thus predicting the optimal distance for minimal interference and therefore the best throughput and energy efficiency. Two models are to be trained, one for uplink communication and the other for downlink communication, each using one of the generated datasets.
The choice of the number of hidden layers was based on multiple experiments leading to the network depicted in Figure 3. The figure shows the input at a single time to the proposed model knowing that any device using this model will need to input new entries each time it needs to calculate the optimal distance to avoid interference. Each sub-model is inputs the values of SINR th , input distance 1 (I-Dist1) and input distance 2 (I-Dist2). I-Dist1 represent the CUE-D for uplink communication and BS-CUE for downlink communication while I-Dist2 denotes IoTD-IoTG for uplink communication and IoTG-IoTD for communication. • An abstract input layer that takes the current values of the input and passes it to the 1D-CNN layers • The first 1D-CNN is 3 × 1 having 32 filters, with a kernel size of 3 • The second 1D-CNN is 1 × 1 having 16 filters, with a kernel size of 1 • A flattening layer to reshape the 1D CNN can be input to the fully connected layers • A 32-neuron fully connected layer • A 16-neuron fully connected layer • An output layer to produce the regression distance result

Data Scaling
To achieve the best results in learning the deep learning network parameters, data must be normalized. In this work the data were normalized using the min-Max normalization, which applies the following equation to each feature where x represents the data to be normalized, x min is the minimum value, x max is the maximum value in the feature addressed, and x scaled is the output normalized value ranging from 0 to 1.

Activation Function
Since the presented network aims to predict the distance between devices, it cannot have a negative output. This led to the choice of the Parametric Rectified Linear Unit (PReLU) activation function, which was first proposed in [37] as a generalization of the traditional Rectified Linear Unit (ReLU), which applies the equation: where F(w i ) represents the output of the activation function, w i represents the ith input and a i is the ith alpha. PReLU manages to adaptively learn the suitable alpha to fit values below zero propagating through the network from the training data.

Optimization Function
The optimization method applied in this network is the adaptive moment estimation (Adam), which was proposed in [38] as an improvement to the stochastic gradient descent (SGD) since it adaptively handles gradients in sparse data. The loss function chosen with Adam was the mean absolute error as it gives a real estimate of how far the average distance prediction is from the actual data, thus helping the network minimize it.

Parameter Optimization
Optimum parameter choice was based on the grid search function using different values of batch sizes [64,128,256,512] and epochs [50,100,150,200,250] for both sub-models. The parameters that were most suitable to both sub-models were a batch size of 128 and 100 epochs, but the experiments were performed for 200 epochs to ensure the models learned sufficiently.

Results and Discussion
In this section, the performance evaluation of the deep learning architecture when compared to selected benchmarks is presented. Furthermore, the performance of the proposed approach was examined in terms of optimized energy efficiency, and optimized overall system throughput through MATLAB and Python simulations.

Deep Learning Model Results Evaluation
In order to evaluate the goodness of fit of the proposed model, 10-fold cross validation is used to compare the average results produced by the proposed model to those of other benchmarks based on the following metrics: • Mean Absolute Error (MAE), which measures the average differences between actual and predicted values.
• Root Mean Squared Error, which calculates the square root of the average of the squared differences between actual and predicted values as given that the number of records in the test subset is represented by n, y i is the actual value, andŷ i is the predicted value. Multiple grid search experiments were performed to obtain optimal parameters for the models used in the benchmark comparisons. Tables 4 and 5 show the generated optimal parameters for each benchmark using both the uplink and downlink datasets, respectively.
The benchmarks used in our comparisons were the support vector regressor, random forest regressor, Adaboost regressor and multilayer perceptron. Table 4. Optimal parameters generated for the benchmarks used in the uplink model evaluation.

Benchmarks
IoTG  Table 5. Optimal parameters generated for the benchmarks used in the downlink model evaluation.  Table 6 shows the average of all folds' results when comparing the trained uplink model to support the vector regressor, random forest regressor, Adaboost regressor, and multilayer perceptron using their optimal parameters. The results show that the random forest regressor tended to produce an overfitted model as the training error was much lower than the testing error. The proposed model outperformed all the other methods in testing while maintaining a small difference from the training error thus showing no signs of overfitting. It can be noted that the results produced for the IoT-D distance tended to have a higher error that that of the CUE-IoTG in all the models. This can be related to the correlation presented in Section 3.2 where the correlation of the of the IoT-D with the inputs was lower than that of the CUE-IoTG making it harder to predict.  Table 7 shows the same comparison but using the downlink dataset to calculate the distances IoTG-CUE and BS-IoTD that minimize interference. It can be deduced from the results that the proposed model in this comparison resembles the performance of the support vector regressor, random forest regressor, and the multilayer perceptron when applying the optimal parameters previously declared in Table 5. Another experiment involved splitting the dataset into a two-third training and onethird testing schema to train a single network to further analyze the results. The training data were used to build the model while keeping 20% for validation. Figure 4a,b shows the mean absolute error produced while training and validating for both models. Both figures show that after epoch 100, the results were hardly changing, thus not requiring any further training. It can be noted from the figures that the models were not overfitted since the training and validating errors were around the same values for each output independently.

Analytical Evaluation
In this section, further analytical evaluation of the results obtained when splitting the dataset into two-thirds training and one-third testing was performed. The records used for training the model were not used in the testing phase to assure that the analysis of results was not over-rated by data that the model had already learned from. The conditions for predicting the optimal required distance for controlling interference were revealed by analyzing the results obtained. Same experimental assumptions as in [14] were considered. The network parameters considered for simulation are listed in Table 1. Figure 5 depicts the predicted required distance between any IoTD-D link for the uplink data communication and between BS-IoTD for downlink data communication with different values of SINR th for the proposed model using the analytical and deep learning model. For the uplink data communication, it was assumed that all the transmitted devices, whether they were CUEs or IoTDs, always had a maximum transmission power equal to 23 dBm. Thus, it can be noticed from Figure 5a, for the analytical and deep learning model, the optimum required distance between IoTD-D (d ID ) to decrease the interference at the destination increased when the distance between CUE-D (d CD ) increased. In addition, it can be mentioned that in order for d CD to reach the maximum value, SINR th decreased gradually since increasing the transmission distance led to increasing the losses in the communication link. Consequently, decreasing transmission distance increased SINR th -for example, to have a communication link with SINR th equal to 0 dB the transmission distance d CD remained effective until it exceeded 836 m. Additionally, when d CD was 600.5 m, d ID must be greater or equal to 647.33 m analytically and 646.8 m using the deep learning model. On the other hand, when the required SINR th for any communication link was 20 dB, the maximum transmission distance for reaching effective communication was 261.5 m. It can also be noticed that, the required distance between IoTD-D was equal to 317.2 and 316.72 assuming that d CD was 99.64 m, using analytical and deep learning model, respectively. For the downlink data communication, the transmission power of BS and IoTG was 46 dBm and 43 dBm, respectively, which is considered high when comparing it with the CUE and IoTD transmission power. Therefore, it can be observed from Figure 5b that increasing the required SINR th led to an increase in the required distance between IoTG-CUE to avoid interference. For example, when SINR th was 0 dB and the downlink transmission distance (d BC ) was 600.5 m, the required distance between IoTG-CUE (d GC ) to avoid interference was 505.52 m numerically and 506.95 using deep learning, while when SINR th was 5 dB, d GC must be 677.5 m and 677.8 m for numerical and deep learning, respectively. On the other hand, when SINR th was 20 dB and d BC was 99.5 it can be found that d GC must be in the range of 265 m to avoid interference.
It is worth mentioning from Figure 5 that when comparing the results of the uplink and downlink, the highest transmission power of BS and IoTG and the shortest distance between IoTD-IoTG led to decreased interference at its destination. On the other hand, decreasing the transmission power led to increasing interference, which required an increase in the distance between any interference device and transmission link.
The same result was obtained when the IoT system performance is evaluated through uplink and downlink data communication, as demonstrated in Figure 6, to decrease the interference at IoTG (uplink) and IoTD (downlink). For increasing the system reliability, the distance between any transmission CUE and IoTG for the uplink (d CG ) and for downlink (d GC ) must be greater than the distance between IoTD and IoTG for uplink (d IG ) and for downlink (d GI ) -for example, as shown in Figure 6a in the case of uplink, when dIG was equal to 240.2 m; the distance dCG should be 240.6 m analytically and 241 m using deep learning when the required SINRth is 0 dB. While, when dIG was equal to 44 m and SINR th was 20 dB, d CG was 139.17 m analytically and 139.63 m using deep learning. On the other hand, in case of the downlink as demonstrated in Figure 6b, when the required SINRth was 0 dB and dGI was equal to 240.2 m the distance d GC should be 285.48 m analytically and 286.35 m using deep learning. While, when d GI was equal to 44 m, d GC should be 165.37 m analytically and 165.33 m using deep learning when SINR th was 20 dB. Additionally, it can be noticed that decreasing the distance between any source and destination links leads to decreasing the path loss and increasing the SINR th . Based on the proposed model, it is assumed that the transmission distance between CUE-BS (uplink) and BS-CUE (downlink) is greater than the transmission distance between IoTD-IoTG (uplink) and IoTG-IoTD (downlink). It has been concluded from Figure 6 that, the interference distance (d GC ) during the downlink must be greater than the interference distance (d CG ) during the uplink, this due to the highest transmission power of IoTG and the nearest distance between IoTG-IoTD, which increases the interference at CUE. That is why the interference distance during the downlink (d GC ) should increase compared with the interference distance during the uplink (d GC ). The predicted required dID and dGC distance for decreasing the interference at any D (uplink) and decreasing the interference at CUE (downlink) was examined again in Figure  7 for the analytical and deep learning model for different transmission distances and against SINRth. Different uplink (dCD) and downlink transmission (dBC) distance values were assumed such as 66, 140, and 260 m and against SINRth, which varied from 0 to 20 dB to predict dID and dBI. As can be observed, when SINRth increases the predicted required uplink dID and downlink dBI must be greater than or equal to uplink dCD and downlink dBC, respectively, for decreasing the interference and at the same time satisfying the system requirements in term of SINRth-for example, as shown in Figure 7a when dCD was 260 m, the optimum required dID was 260.6 m analytically and 264.24 using deep learning when SINRth = 0 dB, while when SINRth = 18 dB for the same distance dCD, the predicted required distance dID was 907.72 m analytically and 903.74 using deep learning. On the other hand, when dID was 66 m and SINRth = 4 dB, dCD must be 83.09 and 85.75 analytically and based on deep learning, respectively. Furthermore, for the downlink data communication as The predicted required d ID and d GC distance for decreasing the interference at any D (uplink) and decreasing the interference at CUE (downlink) was examined again in Figure 7 for the analytical and deep learning model for different transmission distances and against SINR th . Different uplink (d CD ) and downlink transmission (d BC ) distance values were assumed such as 66, 140, and 260 m and against SINR th , which varied from 0 to 20 dB to predict d ID and d BI . As can be observed, when SINR th increases the predicted required uplink d ID and downlink d BI must be greater than or equal to uplink d CD and downlink d BC , respectively, for decreasing the interference and at the same time satisfying the system requirements in term of SINR th -for example, as shown in Figure 7a when d CD was 260 m, the optimum required d ID was 260.6 m analytically and 264.24 using deep learning when SINR th = 0 dB, while when SINR th = 18 dB for the same distance d CD , the predicted required distance d ID was 907.72 m analytically and 903.74 using deep learning. On the other hand, when d ID was 66 m and SINR th = 4 dB, d CD must be 83.09 and 85.75 analytically and based on deep learning, respectively. Furthermore, for the downlink data communication as shown in Figure 7b, for SINR th = 0 dB and d BC = 260 m, the required distance to avoid interference d GC was 218.77m and 219.24 using analytical and the deep learning algorithm, respectively, while for the same transmission distance d GC should be in the range of 619 m to avoid interference and fulfil the required SINR th , which is 18 dB. Additionally, when d BC was 66 m, the required distance for avoiding interference should be in the range of 55.6 m if SINR th is 0 dB and 176 m when SINR th = 20 dB. Furthermore, Figure 8 demonstrates the predicted required uplink and downlink distances (d CG and d BI ) for decreasing the interference at IoTG (uplink) and IoTD (downlink), respectively. A different scenario is proposed to evaluate the system performance for the uplink and downlink data communication, assuming that d IG and d GI are 104 m, 56 m, and 26.4 m for different values of SINR th . As shown in Figure 8a, in case of uplink, when the required SINR th increased, for different transmission d IG , the distance between d CG increased-for example, when d IG was equal to 104 m and SINR th was equal to 7 dB, the optimum required d CG for the analytical and deep learning model was 155.65 m and 155.54 m, respectively. However, for the same transmission distance when SINR th was equal to 18 dB, d CG was 294.2 m analytically and 294.46 m using the deep learning model. The same performance was obtained when the system was evaluated during the downlink as shown in Figure 8b, e.g., when SINR th was equal to 7 dB and d GI was equal to 104 m and, the optimum required d CG for the analytical and deep learning model was 185 m. However, for the same transmission distance d CG is 348 m and 348.86 m for the analytically and deep learning model, respectively, when SINR th was equal to 18 dB. Figures 7 and 8 show that the required SINR th is an important parameter that should affect the predicted required interference distance for decreasing the interference at any destination. Additionally, using these results and based on the system requirements and environmental conditions, an adaptive smart system should be engaged to enhance the system performance for both CUE and IoT networks. (a) Signal-to-interference-ratio-plus-noise (SINR th ) versus predicted distance between CUE-IoTG (uplink) (b) Signal-to-interference-ratio-plus-noise (SINR th ) versus predicted distance between BS-IoTD (downlink).
As mentioned earlier, since the dataset used in the analysis was split into two-thirds training and one-third testing, the results shown in Figures 9 and 10 are based only on records available in the testing data. As a result, some of the SINR th values did not exist in testing records. Figure 9 demonstrates the optimized system throughput for the proposed approach for the uplink and downlink data communication using the analytical and deep learning model for different randomly chosen SINR th values. For fair performance evaluation three different scenarios were considered. Assuming that the distance combinations between the uplink distances (d CD and d IG ) and the downlink distances (d BC and d GI ) were considered to be the same; they were 260 m and 104 m, 140 m and 56 m, and 66 m and 26.4 m, respectively. The chosen distances represented long, intermediate, and short distances. As observed for the uplink and downlink data communication represented in Figure 9a,b, respectively, for the three different scenarios when the SINR th increased, the optimized system throughput increased. Additionally, it can be noticed that for the three scenarios for any SINR th , the optimized system throughput value was approximately identical for the analytical and deep learning models. This means that the proposed approach is capable of reaching the maximum system throughput regard less of the transmission was (long-intermediate-short), as the aim of the proposed model is to predict the interference transmission distance between any interfering node and any destination, for trying to prevent interference and increase system reliability.
The same performance was obtained when the optimized energy efficiency for the uplink and downlink was examined for the assumed three different scenarios in Figure 10. As depicted from Figure 10a uplink data communication and Figure 10b downlink data communication, the optimized energy efficiency always increased with the increased of SINR th for the analytical and deep learning models. The proposed model succeeded in keeping the optimized energy efficiency approximately the same for the three different assumed transmission distances. Figure 10 is correlated with the results obtained in Figure 9. These two results show the effectiveness of the proposed model in predicting the position of the interference nodes, as by knowing the distance between them and any destination helps prevent the interference, thus increasing the system performance. (a) (b) Figure 10. Signal-to-interference-ratio-plus-noise (SINRth) versus optimized energy efficiency (a) uplink (b) downlink.
The same performance was obtained when the optimized energy efficiency for the uplink and downlink was examined for the assumed three different scenarios in Figure  10. As depicted from Figure 10a uplink data communication and Figure 10b downlink data communication, the optimized energy efficiency always increased with the increased of SINRth for the analytical and deep learning models. The proposed model succeeded in keeping the optimized energy efficiency approximately the same for the three different assumed transmission distances. Figure 10 is correlated with the results obtained in Figure  9. These two results show the effectiveness of the proposed model in predicting the position of the interference nodes, as by knowing the distance between them and any destination helps prevent the interference, thus increasing the system performance.
As an extra assessment of the proposed model, the distances obtained from both the analytical and deep learning models were both input to Equations (20) and (21) to calculate the throughput and energy efficiency for different values of transmission power. The  As an extra assessment of the proposed model, the distances obtained from both the analytical and deep learning models were both input to Equations (20) and (21) to calculate the throughput and energy efficiency for different values of transmission power. The optimized system throughput for the proposed approach was evaluated once again in Figure 11 for four different randomly chosen SINR th values with different transmission powers for CUE (P C ) and IoTD (P I ). It was assumed that the values of SINR th were 5, 10, 15 and 20 dB, respectively. As depicted in Figure 11, for any SINR th increasing the transmission power leads to increasing the system throughput for the analytical and deep learning model. As the system is always limited by channel noise, pathloss and interference that is why the transmission power is one of the parameters, which can overcome the channel conditions. Thus, increasing or decreasing the transmission power must be considered according to the channel conditions and the required system QoS. Furthermore, by comparing the four different SINR th values it can be found that increasing the SINR th increases the overall system throughput, which is correlated with the results obtained in Figure 9. Moreover, the optimized energy efficiency is analyzed in Figure 12 for the same chosen SINR th stated in Figure 9 and with different P C and P I . As shown in Figure 12 each value of SINR th yields a maximum transmission power that leads to an optimum energy efficiencyfor example, when SINR th = 0 dB, the maximum transmission power for any sender node to reach the optimum energy efficiency is 2 or 4 dBm, while when SINR th = 5 dB, the maximum power is 4 or 6 dBm to reach the maximum energy efficiency. On the other hand, when SINR th is 20 dB, the maximum transmission power is energy efficiency is 8 dBm. It can be deduced from this figure that increasing the transmission power may lead to a decrease in the energy efficiency as the increment of the transmission power incr11eases the system cost and decreases the system energy efficiency. By comparing Figures 11 and 12, increasing the transmission power increases the overall system throughput and at the same time may decreases the energy efficiency. Thus, for obtaining the maximum system throughput with the highest energy efficiency, the two performances can be jointly considered in order to obtain the required system performance based on the two metrics.

Conclusions
A novel interference avoidance system was proposed for a 5G network and IoT using analytical and deep learning techniques. First an analytical model was created and simulated using MATLAB to calculate the optimal distances required between IoTD and D. In addition, the model calculated the optimal distance between CUE and IoTG. A deep learning model was then proposed that adopted the 1D-CNN. 1D-CNN was recently introduced and has been proven to have low computational complexity, and thus managing to conserve processing and battery, which make it very suited to be deployed in devices in real-time applications. Consequently, the deep learning model on CUE and IoTD for uplink and on BS and IoTG for downlink could generate the appropriate interference distance to meet the near-optimal result. This model was assessed by a 10-fold cross validation data split using data generated from the MATLAB simulations and produced very low mean absolute error and root mean square error when compared to various benchmarks. Next, the analytics of the results of predicting the minimum acceptable interference distance between IoTD-D and CUE-IoTG for uplink and the distance between BS-IoTD and IoTG-CUE for downlink resulting in achieving near-optimal throughput and energy efficiency were demonstrated. Based on the results obtained in terms of system throughput and energy efficiency, it has been shown that the proposed model can exhibit the best performance under different environmental conditions. The problem of interference has been discussed and solved using the Lagrange optimization technique and deep learning. Both techniques have been used to predict the optimum interference distance between CUE-IoTG and IoTD-D for uplink and the optimum interference distance between IoTG-CUE and BS-IoTD for downlink. Additionally, based on the analytical and deep learning, it has been proven that the interference distance must be greater than the transmission distance between the CUE-D and IoTD-IoTG links to avoid or decrease the interference among any destination (BS or CUE receiver). In addition, it has been shown how during the downlink data communication, the high BS and IoTG lead to a decrease the interference distance, as increasing the transmission power leads to overcoming the interference at any communication link. Furthermore, the effect of SINR th and the transmission power on predicting the maximum required interference distance was investigated. It was shown that increasing SINR th leads to increasing the interference distance between CUE-IoTG, IoTD-D, IoTG-CUE and BS-IoTD. Moreover, it has been shown that increasing the transmission power increases the overall system performance. Additionally, among different values of transmission power, one can reach the maximum energy efficiency. The obtained results show that the proposed model can achieve the maximum system throughput and energy efficiency with suitable system reliability.