# 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 IoT Networks
\begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Description** \\ \hline \(E_{GW}\) & Energy of the GW device before handling the requested task \\ \(E_{HL}\) & Energy of the HL device before handling the requested task \\ \(E_{I\text{-}MEC}\) & Energy of the I-MEC server before handling the requested task \\ \(E_{C\text{-}MEC}\) & Energy of the C-MEC server before handling the requested task \\ \(E_{b\text{-}GW}\) & Total energy required to handle a computing task at the GW device \\ \(E_{h\text{-}HL}\) & Total energy required to handle a computing task at the HL device \\ \(E_{h\text{-}MEC}\) & Total energy required to handle a computing task at the I-MEC server \\ \(E_{h\text{-}C\text{-}MEC}\) & Total energy required to handle the computing task at the C-MEC server \\ \(T_{exc\text{-}IoT}\) & Total execution time of computing task at the IoT device \\ \(T_{exc\text{-}LL}\) & Total time required to execute a computing task at the LL device \\ \(T_{exc\text{-}GW}\) & Total time required to execute a computing task at the GW device \\ \(T_{exc\text{-}HL}\) & Total time required to execute a computing task at the HL device \\ \(T_{exc\text{-}MEC}\) & Total time required to execute the requested task at the I-MEC server \\ \(T_{exc\text{-}MEC}\) & Total time required to execute the requested task at the C-MEC server \\ \(T_{h\text{-}GW}\) & Total time required to handle the computing task at the GW device \\ \(T_{h\text{-}HL}\) & Total time required to handle the computing task at the HL device \\ \(T_{h\text{-}MEC}\) & Total time required to handle the computing task at the I-MEC server \\ \(T_{h\text{-}C\text{-}MEC}\) & Total time required to handle the computing task at the C-MEC server \\ \(T_{tr}\) & Total transmission time of input data of the computing task \\ \(T_{comm}\) & Total communication latency between cellular base station and end device \\ \(T_{rx}\) & Total feedback time of computation results \\ \(I\) & Mode Indicator Variable \\ \(D_{Off\text{-}E\text{-}IoT}\) & Binary energy decision of offloading; decided by the IoT device \\ \(D_{Off\text{-}IoT}\) & Binary decision of offloading, decided by the IoT device \\ \(D_{Off\text{-}E\text{-}I\text{-}MEC}\) & Binary energy decision of offloading; decided by the I-MEC server \\ \(D_{Off\text{-}I\text{-}MEC}\) & Binary time decision of offloading; decided by the I-MEC server \\ \(D_{Off\text{-}HEC}\) & Binary decision of offloading, decided by the I-MEC server \\ \(D_{Off\text{-}E\text{-}CMC}\) & Binary energy decision of offloading; decided by the C-MEC server \\ \(D_{Off\text{-}C\text{-}MEC}\) & Binary decision of offloading, decided by the C-MEC server \\ \(D_{Off\text{-}E\text{-}LC}\) & Binary energy decision of offloading; decided by the LL device \\ \(D_{Off\text{-}TL}\) & Binary decision of offloading, decided by the LL device \\ \(D_{Off\text{-}LL}\) & Binary decision of offloading, decided by the LL device \\ \(D_{Off\text{-}E\text{-}GW}\) & Binary energy decision of offloading; decided by the GW device \\ \(D_{Off\text{-}GW}\) & Binary decision of offloading, decided by the GW device \\ \(D_{Off\text{-}EH}\) & Binary energy decision of offloading; decided by the HL device \\ \(D_{Off\text{-}THL}\) & Binary time decision of offloading, decided by the HL device \\ \(D_{Off\text{-}HL}\) & Binary decision of offloading, decided by the HL device \\ \(P_{IoT}\) & Transmitting power of the IoT device \\ \(P_{S}\) & Transmitting power of the IoT gateway connected to the I-MEC server \\ \(P_{LL}\) & Transmitting power of the LL device \\ \(P_{GW}\) & Transmitting power of the GW device \\ \(P_{HL}\) & Transmitting power of the HL device \\ \(\eta_{IoT}\) & Channel efficiency of the IoT network \\ \(\eta_{S}\) & Channel efficiency of the IoT-cellular \\ \(\eta_{D2D}\) & Channel efficiency of D2D network \\ \(\eta_{C}\) & Channel efficiency of cellular interface \\ \hline \hline \end{tabular}
\end{table} 
Table 2: _Cont._the I-MEC servers.