# Enabling Heterogeneous IoT Networks over 5G Networks with Ultra-Dense Deployment--Using MEC/SDN
## 4 Energy-Aware and Latency-Aware Offloading Scheme
### Energy-Aware and Latency-Aware Offloading Algorithm for Cellular Network
Figure 12: Total number of handled tasks of heterogenous deployed devices and servers for the three considered cases of the first scenario. Table 5.0 Total number of local executed tasks and offloaded tasks of the first scenario. lake of local computing resources. Figures 10 and 11 present the average latency of GW and HL devices' handling tasks for the three considered cases. For better discussing the results of the first scenario, the total number of handled tasks at each type of device is calculated. Figure 12 indicates the total number of handled tasks, at IoT devices, LLs, GWs, HLs, I-MEC servers and C-MEC servers, for the three considered cases. In the third case, the QoS latency increase, which provides a time for offloading and thus, the probability of offloading increases. This reduces the total number of local executed tasks in case 2 and case 3 compared to case 1. For the I-MEC and C-MEC, the number of handled tasks increases for cases 2 and 3 than that in case 1. This is because the number of offloaded tasks is increased due to decreasing latency constraints. Furthermore, the total number of local executed tasks and offloaded tasks are calculated to better indicate the effectiveness of the proposed structure. Figure 13 illustrates the total number of the local executed tasks and offloaded tasks for the three cases of the first simulation scenario. The number of offloaded tasks increases as the QoS latency increases, i.e., moving from case 1 to case 2 and then to case 3. This unloads end-devices in heterogeneous considered networks and efficiently makes use of network resources. Results for the first case, case I, of the second scenario are introduced in Tables 9 and 10. Table 9 presents the percentage of blocked tasks of the considered LoRaWAN networks with and without edge computing servers, i.e., I-MEC and C-MEC. This is for the three considered values of QoS latency. Results indicate that the percentage of blocked tasks falls from 30% for LoRaWAN without edge computing servers to zero with the deployment of edge computing servers and offloading algorithm. Furthermore, the introduction of edge servers not only improves the percentage of blocked tasks but also improves the overall energy efficiency of LoRaWAN networks through the deployment of the developed offloading algorithm implemented with the developed edge structure. This is reasonable since IoT devices make use of edge computing resources. Table 10 presents the percentage of the average remaining energy, compared to start energy, for LoRaWAN networks with and without edge system with the offloading algorithm; this is after handling the considered tasks in the first scenario for the three considered values of QoS latency. This implies an average improvement of energy efficiency of 24% after deploying edge computing servers with the developed offloading algorithm. In summary, results indicate that the introduction of MEC, D2D and SDN to IoT networks facilitates integrating IoT networks with 5G systems. Furthermore, the proposed framework can be used for dense deployment scenarios with higher network scalability. This fit great and efficient for many applications, especially the announced dense deployment applications for next-generation networks. These applications include smart city applications, smart homes and industrial 4.0. All these applications have a challenge of dense deployment and a massive amount of traffic. Integrating IoT with a 5G system provides a way for realizing such applications with the required QoS and scalability requirements. ## 6 Conclusions and Future Work

Heterogeneous IoT networks can be integrated with 5G systems via MEC servers, using the proposed system structure. Connecting IoT gateways with MEC servers, I-MEC servers provide paths for 5G edge servers, C-MEC servers. Furthermore, the introduction of edge computing servers to the access networks of heterogeneous IoT networks provides computing resources to IoT devices, which unloads the core networks.