# Trust-Aware Routing Mechanism through an Edge Node for IoT-Enabled Sensor Networks
## 4 Proposed Trust-Aware Routing Mechanism
### Trust-Value-Based Route Path Selection
#### 4.2.1 Trust Values Evaluation
It can be seen from the graph that as the percentage of untrustworthy nodes increases in the network, a large number of packets or data flows to the untrustworthy nodes produces a gradual increase in the packet loss rate. However, the proposed trust model offers low packet loss since the distance of the average route length gets reduced resulting in the low untrustworthy nodes encountering the trusted route. It is observed that for a low percentage of untrustworthy nodes, the percentage hike in the packet loss rate is 38.74%, 45.5%, and 59.39% for TEM-MEN, TBSEER, and VFDC methods, respectively, when contrasted with the proposed method. For a higher percentage of trustworthy nodes, the percentage packet loss of the proposed method reduces by 24.86% when compared with TEM-MEN. TBSEER performs better than VFDC and shows an 11.66% decrease in packet loss rate than that in VFDC. Table 4 gives the average route length for the trust evaluation approaches that employ edge nodes. The proposed scheme calculates the shortest route length for the trusted route. The longest route path is given by the VFDC algorithm. TBSEER performs moderately and the TEM-MEN approach performs well after the proposed method. Table 5 shows the comparison between various optimization approaches on the basis of energy usage, data sent to the cluster heads, and cluster load balance factor. It can be clearly observed that the proposed model, which employs a modified GWO algorithm, delivers the highest number of packets to CH--i.e., 1858--whereas the other optimization approaches such as PSO, Cuckoo search, GWO, and whale optimization, respectively, delivered 1124, 1466, 1689, and 1256 packets successfully to CH node. The minimum load balance factor for cluster balance is recorded for modified GWO and is 0.48. The energy consumed during the intra-cluster communication is lower for modified GWO (0.26 J) than for PSO (0.89 J), GWO (0.38 J), CS (0.73 J), and WOA (0.45 J). \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline Deployment area & \(50\times 50\) m\({}^{2}\) \\ Total nodes & 200 \\ Initial energy & 2 J \\ Packet size & 1000 \\ Number of rounds & 5000 \\ Threshold distance of transmission & 20 m \\ CHs percent & 10–15\% \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Network parameters. Besides this, a separate set of experiments are conducted on the two untrusted scenarios, which are mentioned below:

1. Of the total 200 nodes, 25% or 50 untrustworthy nodes are considered to be uniformly distributed in the given area of \(50\times 50\) m\({}^{2}\). 2. Of the total 200 nodes, 50% or 100 untrustworthy nodes are considered to be uniformly distributed in the given area of \(50\times 50\) m\({}^{2}\). The simulation results for network lifetime, throughput analysis, and energy efficiency are presented in Figure 7, Figure 8 and Figure 9, respectively. The proposed method is compared against the untrusted scenarios of TBSEER and VFDC approaches. Figure 7a depicts the network life for the 25% of untrustworthy nodes out of the total 200 nodes. Similarly, Figure 7b gives the network lifetime analysis for 50% of untrustworthy nodes out of the total 200 nodes. It is noticed that the network lifetime of the proposed TARM method is higher than the other two methods. Figure 8 presents the throughput evaluation for 25% and 50% of untrustworthy nodes out of 200 nodes in Figure 8a and Figure 8b, respectively. It is observed that for the first scenario--that is, 25% of untrustworthy nodes out of total nodes, the performance of the proposed method is better and sustains for more iterations compared with the second scenario--that is, 50% of untrustworthy nodes out of 200 nodes. This shows that as the number of untrustworthy nodes increases, the performance starts degrading. Hence, the proposed method works on detecting the faulty or untrustworthy nodes and establishing trust routes using trusted nodes in the sensor network.