# Energy-Aware Next-Generation Mobile Routing Chains with Fog Computing for Emerging Applications
## 4 Simulation Environment  
In this section, we provide the parameters used in simulation configurations along with the evaluation of results. The results are conducted through various simulations using Matlab (R2021b). We adopted the free space model in conducting the simulations. All the simulation generated data are recorded in log files, and later, using scripting modules, the required information is extracted to evaluate the performance metrics. The comparisons are performed with the existing techniques, FBSSR and GDTMS. Mobile devices, fog nodes, and sink nodes make up the simulation environment. For mobile devices, the fog nodes are placed closer to the sink node to reduce communication latency and overhead. Mobile devices are in the range of 100 to 500, and they are rotated with the predefined speed in their radius. The transmission range is set to 3m for each device. Each device is assigned a unique address, and no data is allowed for direct transmission in case the distance is higher than the threshold. The initial energy of devices is set to 2j with limited memory and processing resources. We deployed 10 fog nodes in the simulation environment. The packets are sensing with the rate of 1s to 5s. The packet size is up to 100 bytes. We ran 35 simulations to analyze the performance and recorded the average result of each metric. The results were analyzed in terms of varying message generation intervals and the varying number of mobile devices. The parameters used in simulation experiments are described in Table 2. Network throughput, packet drop rate, overhead, reliability, delay, and node level energy consumption are evaluated for performance evaluation. We also perform experimental testing for delay and packet reception in terms of varying times. In this section, we also describe the security analysis of our proposed algorithm against threats. Our proposed algorithm is based on cryptography principles and offers a secure method to support data reliability and authentication. Each time, peer devices need to initiate the connection _CON_ for forwarding the IoT data. This connection is valid for a particular period, and afterward, it needs to be re-initiated by the peer devices if they further require data transmission. Each device is assigned a unique identification _Dev_ID_ and in case any node is identified as having a duplicate identity, then both nodes are declared as malicious. The record of the malicious nodes is sent to neighboring nodes and the affected routes are reformulated. The connection is secured using the session key which is further encrypted using public and private keys. Before forwarding the data on the link, the sessional needs to be verified. The proposed algorithm is based on hybrid cryptography techniques and makes use of encryption methods by exploring the message units and session keys. \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameters** & **Values** \\ \hline Mobile devices & 100–500 \\ \hline Network diameter & 500 m \(\times\) 500 m \\ \hline Deployment & Random \\ \hline Path loss model & Free space \\ \hline Transmission range & 3 m \\ \hline Number of sinks & 3 \\ \hline Number of simulations & 35 \\ \hline Packet size & 100 bytes \\ \hline Message generation interval & 1s to 5s \\ \hline Initial energy & 2j \\ \hline Fog nodes & 10 \\ \hline Malicious nodes & 20 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Simulation parameters. In terms of network throughput, we compared the effectiveness of the proposed algorithm with existing solutions. The proposed protocol has observed that it increases the number of packets transmitted by an average of 11% and 14%, in comparison with FBSSR and GDTMS, as shown in Figure 4a,b. During experiments, it was noticed that as the mobility of devices increases, the congestion also increases and ultimately slows the delivery performance over the communication links. However, the improvement of the proposed algorithm compared to other work is due to the splitting of the network load among the optimal cluster heads.