# Information-Aware Secure Routing in Wireless Sensor Networks
## 5 Simulations
### Simulation Setup  
We ran several simulations to verify the validity of the proposed routing scheme. We calculated the packet loss ratio and delivery ratio in the WSN as follows:  
\[P_{LR}=\frac{S-R}{S}, \tag{12}\]  
\[P_{DR}=\frac{R}{S}. \tag{13}\]  
In the two equations, \(S\) is the number of packets sent by the source nodes, and \(R\) and \(S-R\) are the number of packets received by the sink node and the number of lost packets, respectively. We conducted five groups of simulations to verify the safety and reliability of the proposed routing scheme. In the simulations, we considered two packet-forwarding schemes used by malicious nodes: (1) Random packet loss (RPL), in which a malicious node randomly discards some packets that are supposed to be relayed, and (2) full packet loss (FPL), in which all received packets are dropped. RPL is more confusing and not easily detected (such as a selective forwarding attack). FPL is more harmful but easy to identify. In the G2 simulations, malicious nodes adopted both RPL and FPL schemes, while they adopted RPL in the other simulation groups. In the simulations, under the circumstance of the minimum forwarding threshold \(\tau\) set, a node with residual energy of less than \(\tau\) can receive packets but cannot forward them. Simulations were divided into five groups according to the proportion \(\delta\) of the malicious nodes in the WSN. The details about each group are as follows: \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Description** \\ \hline \(E_{ini}\) & Initial energy \\ \(M\times M\) & Simulation area \\ \(N\) & Number of nodes \\ \(SN\) & Location of sink node \\ \(E_{slce}\) & Energy consumption of electronic devices for accepting and transmitting 1-bit data \\ \(\varepsilon_{fs}\) & Free space factor \\ \(R\) & Transmission radius \\ \(\eta\) & Adjustment factor \\ \(\tau\) & Minimum forwarding threshold \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters in the model. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline \(E_{ini}\) & 1 J \\ \(M\times M\) & \(100\times 100\) m \\ \(N\) & \(100\) \\ \(SN\) & \(50,125\) \\ \(Channel\) _model_ & \(Free\) _space_ \\ \(E_{slce}\) & \(50\) nJ/bit \\ \(\varepsilon_{fs}\) & \(10\) pJ/bit/m\({}^{2}\) \\ \(R\) & \(50\) m \\ \(\eta\) & \(1000\) \\ \(\tau\) & \(0.1\) J \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The setting of parameters. G1 Simulations: The aim of the first group of simulations was to examine the defense (tolerance) ability of the proposed routing scheme (IASR) against the malicious behavior of sensor nodes. Nodes in the WSN were randomly chosen as malicious, and we examined three levels of the proportion \(\delta\) of malicious nodes: 20%, 40%, and 60%. G2 Simulations: In this group of simulations, we compared the performances of the proposed secure routing model (IASR) and the RBMSC model. The packet delivery ratios of the two models were compared under different conditions by varying \(\delta\) to 10%, 20%, 30%, 40%, 50%, and 60%. G3 Simulations: The aim of the third group of simulations was to compare the performances of the improved Dijkstra algorithm and the traditional Dijkstra algorithm. We evaluated the ability of the two algorithms to defend against attacks from malicious nodes when \(\delta\) was set to 20%. G4 Simulations: This group contained a set of simulations for examining the defense capability comparison of the improved Dijkstra algorithm and the traditional Dijkstra algorithm while \(\delta\) was dynamically changing over time. Initially, \(\delta\) was 20%, and then it gradually climbed to 40% and 60% during the simulations. In this case, the historical communication behaviors of the node are unreliable. The information obtained earlier is less reliable. Therefore, this dynamic simulation, which refers to recent historical behaviors, is distinct from the other simulations that reference all historical communication behaviors.