# A Failure Risk-Aware Multi-Hop Routing Protocol in LPWANs Using Deep Q-Network
## 6 Simulation Results and Analysis
### Performance Analysis  
The performance metrics employed in our simulation are packet delivery rate (PDR), mean transmission delay (MTD), mean number of transmission hops (MTHs), mean energy consumption for delivering a data packet (MECP), and network lifetime. The network lifetime can be commonly measured in terms of the first node dead (FND), half node dead (HND), and the last node dead (LND). However, only HND is adopted in our simulation as the network was disabled long before LND, while the death of the first EN had little impact on network performance. We randomly select an experimental scenario with 300 ENs from our simulations and use the routing process of the first data packet after network deployment to visually demonstrate the FRDR protocol in Figure 5. To clarify the relay selection mechanism of FRDR, Figure 5 further illustrates the spatial distribution of candidate ENs for Router1. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Transmit Power Level** & **Routing Decision Mechanism** \\ \hline PFRS & Transmit with \(l_{tx}^{\max}\) & Random selection \\ PFRD & Transmit with \(l_{tx}^{\max}\) & Algorithm 3 \\ PFRS & PRM & Random selection \\ FRDR & PRM & Algorithm 3 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Self-contrasting algorithms. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **Value** & **Parameters** & **Value** \\ \hline \(N\) & 300/350/400 & \(e_{th}\) & 100 mJ \\ \(R_{change}^{-}\) & 0.5 & \(n_{pr}\) & 8 symbols \\ \(n_{pl}\) of ADV/REQ & 1 B & \(n_{pl}\) of data packet & 300 B \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Network parameters. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **Value** & **Parameters** & **Value** \\ \hline \(N_{eps}^{max}\) & 100 & \(N_{iter}^{max}\) & 1000 \\ \(\alpha\) & 0.009 & \(\gamma\) & 0.95 \\ \(|M|\) & 5000 & \(B\) & 64 \\ C\({}_{\text{exp}}\) & 10 & \(C_{t}\) & 400 \\ \(R_{\max}\) & 1 & \(\tau\) & 0.2 \\ \(\eta\) & 2 & \(H_{\max}\) & 10 \\ \(\varepsilon_{start}\) & 0.5 & \(\varepsilon_{end}\) & 0.01 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Parameters of DQN. Specifically, the source EN first adjusts its transmission power level according to PRM, thereby optimizing the EN activation range based on the average SNR of received signals from neighbors. In this case, the source EN broadcasts an ADV packet at Level 6. Subsequently, ENs that receive the ADV packet and satisfy pre-selection rules form the candidate set for Router1. Table 9 quantitatively summarizes their critical attributes, including ID, RFRV, distance to the GW, and residual energy. Then, by utilizing the DQN-based routing decision mechanism (Algorithm 3), the source EN determines Router1 from the candidates. Experimental result indicates that EN167, the candidate EN exhibiting the lowest RFRV and shortest distance to the GW, is selected as Router1. This outcome is consistent with the relay selection objective of FRDR defined in Equation (14). With the identical configuration as Figure 5, Figure 6 further compares routing processes across different multi-hop routing algorithms. As shown in Figure 6, both FRDR and PRRS exhibit fewer candidate ENs for Router1. This reduction is primarily attributed to the PRM, which adjusts EN activation ranges based on the average SNR of received signals from neighbors. By utilizing PRM, the source EN in FRDR and PRRS reduces transmission power to Level 6, thereby confining the ADV broadcast range. In contrast, non-PRM protocols broadcast ADV packets at maximum power (Level 7), which can easily cause redundant EN activation (e.g., EN263 and EN244). Following candidate screening, each algorithm applies distinct criteria for final relay selection. Notably, PFRS and PRRS exhibit higher hop counts due to random relay selection, whereas FRDR, MHR, DQIR, and PFRD achieve lower hop counts through effective selection rules.