# Information-Aware Secure Routing in Wireless Sensor Networks
## 6 Simulation Results
### G3 Simulations: Comparative Studies on Algorithms  
Figure 8 shows a comparison between the improved Dijkstra algorithm and the traditional Dijkstra algorithm. As shown in the figure, the packet loss ratio in the improved Dijkstra algorithm (the blue dashed line) is lower than in the traditional Dijkstra algorithm (the red solid line) before 8100 s. The weight in the improved algorithm is not calculated by simply adding the cost of each hop, but by the cost function shown in Equation (9). The cost function is based on the serial-parallel system of reliability theory combined with the characteristics of WSNs, so it is more reasonable and effective than traditional methods. However, the packet loss ratio in the traditional algorithm is lower than the improved algorithm after 8100 s. The reason for this change is that some nodes in the WSN have exhausted their energy because, compared with the traditional algorithm, they deliver more packets in the improved algorithm. Therefore, the key nodes in the late stage of the simulation have exhausted their energy and cannot participate in forwarding packets, resulting in an increase in the packet loss ratio.  
Figure 7: Comparison of packet delivery ratios in two models for different numbers of malicious nodes.  
Figure 9 shows the time-varying number of key nodes with residual energy less than \(\tau\) in the two algorithms. Compared with the key nodes with residual energy less than \(\tau\) in the traditional algorithm (the red solid line), they appear first in the improved algorithm (the blue dashed line) and increase dramatically. After 360 s, key nodes with residual energy less than \(\tau\) show up in the traditional algorithm when the number of these nodes rises to 14 in the improved algorithm. Therefore, in the late stage of the simulation, for more available key nodes, there is a lower packet loss ratio in the traditional algorithm than in the improved algorithm.  
As can be seen in Figures 6a and 9, in the final stage, there are only two malicious nodes (a and b) with residual energy more than \(\tau\), and they consume energy slowly. Both algorithms try not to select a malicious node as a relay node, and malicious nodes do not forward all packets even if they are selected as relay nodes. Therefore, the malicious nodes consume less energy than the other 16 nodes.  
Figure 8: Comparison between the improved algorithm and the traditional algorithm.  
Figure 9: The time-varying number of key nodes with residual energy less than \(\tau\) in the two algorithms.  
Figure 10a,b show the energy consumption of malicious nodes a and b in the two algorithms, respectively. As can be seen from both figures, in the initial period, the energy consumption of malicious nodes a and b in both algorithms is approximate. After a short period, the energy consumption of the nodes in the improved algorithm (the blue dashed line) is significantly lower than that in the traditional algorithm (the red solid line) because the improved algorithm is superior to the traditional algorithm in terms of avoiding malicious nodes. With a lower probability of malicious nodes being selected as the relay node, less energy is consumed by malicious nodes. Hence, the improved algorithm is better than the traditional algorithm.  
Figure 10: Comparison of energy consumption of malicious nodes a and b between the improved algorithm and the traditional algorithm.