## 6 Simulation and Evaluation of Results
### Network Lifetime  
Figure 5 presents an evaluation of network lifetime in various routing approaches. As shown in this figure, CTSRD has the longest network lifetime compared to others. On average, it reduces the number of dead nodes by 20.92% and 61.57% compared to EEMSR and E-BEENISH, respectively. In this figure, CTSRD has the longest first node die (FND)  
Figure 4: Evaluation of the trust value in normal and hostile nodes.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Simulator & NS2 \\ \hline Network environment & \(100\times 100\,\mathrm{m}^{2}\) \\ \hline BS location & \((50,100)\) \\ \hline Number of IoT nodes & 100 \\ \hline Types of IoT nodes & Four types \\ \hline Energy of IoT nodes & \(E_{1}=2J\), \(E_{2}=2E_{1}\), \(E_{3}=25E_{1}\), \(E_{4}=3E_{1}\) \\ \hline Connection radius of IoT nodes & 20 m \\ \hline Trust threshold (\(T_{threshold}\)) & 0.5 \\ \hline Packet size & 500 Byte \\ \hline Maximum transmissions & 100 packet/round \\ \hline Energy consumed by the electrical circuit of & 50 nl/bit \\ receiver/transmitter (\(E_{idc}\)) & 50 nl/bit \\ \hline Signal amplifier coefficient in the free space (\(\varepsilon_{fs}\)) & 10 pl/bit/m\({}^{2}\) \\ \hline Signal amplifier coefficient in the multi-path space (\(\varepsilon_{mp}\)) & 0.0013 p/bit/m\({}^{4}\) \\ \hline Population size & 80 \\ \hline Stop condition & 300 iterations \\ \hline \hline \end{tabular}
\end{table}
Table 3: Simulation parameters.  
time, and EEMSR has the second rank. However, the performance of E-BEENISH is not satisfactory. The most important reason is that CTSRD and EEMSR have taken into account energy efficiency and security simultaneously, but E-BEENISH is just an energy-efficient method that ignores the security of IoT nodes. As a result, malicious nodes have a negative effect on this method and reduce its lifetime. On the other hand, CTSRD and EEMSR use a multi-hop routing technique between CHs. This maintains and balances energy consumption between network nodes. However, in E-BEENISH, each CH sends their data directly to BS. This does not balance the consumed energy of network nodes and reduces network lifetime. Another reason is that CTSRD considers several parameters, including trust, energy, intra-cluster traffic, distance, and hop count when designing a fitness function to form an energy-efficient and secure routing tree (DA-Tree) between CHs in the network. However, EEMSR has only taken into account the square of the distance between CHs for designing the fitness function. As a result, the path formed between CHs in EEMSR may not be energy-efficient. The effect of this issue is clear on network lifetime in CTSRD and EEMSR.  
In another experiment, the location of BS is changed to evaluate the adaptability of different methods. A routing method is adaptable if the position of BS changes without affecting the network performance. In Figure 6, the location of BS is \((0,0)\). Furthermore, in Figure 7, the location of BS is \((50,50)\). When the location of the base station is \((0,0)\), CTSRD reduces the number of dead nodes by 26.38% and 77.65% compared to EEMSR and E-BEENNISH, respectively. In addition, when the location of the base station is \((50,50)\), CTSRD lowers the number of dead nodes by 35.36% and 74.78% compared with EEMSR and E-BEENISH, respectively. These experiments indicate that CTSRD and EEMSR are adaptable but E-BEENISH is not adaptable.  
Figure 5: Comparison of different methods related to network lifetime.  
Figure 6: Comparison of different methods with regard to the network lifetime, and the coordinates of the base station are equal to \((0,0)\).