# Fog Computing: Enabling the Management and Orchestration of Smart City Applications in 5G Networks
## 5 Evaluation Results
### Fog-Cloud Infrastructure Analysis  
In the fog-cloud infrastructure evaluation, the communication between a fog node and the cloud node is via the Internet, where the upload speed is 5 Mbps and the download speed is 2.5 Mbps. Furthermore, a 500-m communication range has been considered between a fog node and an IoT sensor. The communication between a fog node and an IoT sensor is performed by a LPWAN technology. An IEEE 802.11 ah [41] wireless network has been considered as the LPWAN technology, because it is one of the most promising LPWAN technologies with very high data rates. High data rates are an important requirement of the evaluation use case, because timely alerts need to be sent to the IoT sensor if a malfunction is already detected on a fog node. This way, an upload data rate of 2 Mbps and a download data rate of 1 Mbps have been considered based on IEEE 802.11 ah. Although the maximum throughput of IEEE 802.11 ah is higher, with this lower limitation, it has been assumed that good channel conditions are always achieved and that all IoT sensors can communicate at these data rates. Other LPWAN technologies, such as LoRaWAN [42] and Sigfox [43], have not been considered because very low data rates and duty cycle restrictions make it impossible for these LPWAN technologies to send a data sample every minute. Considering that for our use case, each upload message is composed of a string of 12 chars (GPS location, geohash) equal to 12 bytes, a 32 bit integer (timestamp) equal to 4 bytes and 5 floating point 64-bit numbers (particle matter indicators, temperature and humidity) equal to 40 bytes, the total number of payload bytes to be transmitted per minute from the IoT sensor to the fog node is 56 bytes. On the other hand, each download message to be transmitted from the fog node to the IoT sensor in case of unusual behavior or malfunction is composed of a string of 12 chars (GPS location, geohash) equal to 12 bytes and a byte defined by 3 alarm bits and 5 bits for 32 types of predefined messages. Therefore, each upload message is transmitted with at least 56 bytes, which is equal to 448 bits and each download message with 13 bytes, which is equal to 104 bits. Moreover, the fog node will send 1% of the total data samples to the cloud node for global analysis operations. However, in a traditional centralized cloud solution, all data samples need to be transported from the IoT sensor to the cloud node. Based on these assumptions, our fog-based framework has been evaluated and compared with a traditional centralized cloud solution in terms of response time in case abnormal samples are detected and in terms of network bandwidth usage. The comparison is presented in Table 6. \begin{table}
\begin{tabular}{c c} \hline \hline
**Variable** & **Fog-Cloud** & **Centralized Cloud** \\ \hline \(C\) & 500 m \\ \(N_{upload}\) & 448 bits \\ \(N_{Download}\) & 104 bits \\ \hline \(U_{LPWAN}\) & 2 Mbps \\ \(D_{LPWAN}\) & 1 Mbps \\ \(T_{upload\_Sensor-Fog}\) & 0.224 ms \\ \(T_{Download\_Sensor-Fog}\) & 0.104 ms \\ \hline \(U_{Fog}\) & 5 Mbps \\ \(D_{Fog}\) & 2.5 Mbps \\ \(T_{upload\_Fog-Cloud}\) & 0.090 ms \\ \(T_{Download\_Fog-Cloud}\) & 0.041 ms \\ \hline \(R_{Sensor-Fog}\) & 70,000 data samples \\ \(R_{Fog-Cloud}\) & 700 data samples (1\%) & 70,000 data samples (100\%) \\ \(N_{Fog-Cloud}\) & 72.8 Kbps & 31.36 Mbps \\ \hline \multicolumn{2}{l}{Transporting Data Samples to the Cloud} & 14.56 ms & 6.27 s \\ \multicolumn{2}{l}{Network Bandwidth Usage (\%)} & 1.46\% & 627.2\% \\ \multicolumn{2}{l}{End-to-End delay for Alert/Notification} & 0.33 ms & 0.46 ms \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Performance evaluation of our fog-cloud infrastructure. Our results show that to send all data samples to the CN, 6.27 seconds are needed, while in our fog computing approach, only 14.56 milliseconds are required since only 1% of the data is transmitted to the cloud node.