## 5 Simulations and Discussions
### Evaluation of Detection Capability
Reputation is the belief that nodes establish by iterations, actions, or information exchange between them. * InDReS [34] considers QoS Metrics and uses a constraint-based specification model to detect SH attacks. The comparison of SH detection capabilities is shown in Figure 16. It can be seen that the proposed method performs well in terms of accuracy (99.3%), precision (98%), and recall (100%). Therefore, it can be considered that the proposed method has a good detection ability for the SH nodes caused by SDC errors. We also note that there are two false alarms in Table 6. In the SH detection algorithm, we use two parameters (\(\overline{DLY_{iol}}\)) and (\(\overline{DLY_{iol}}\)). For satellite constellations, the delay in an inter-orbital link is usually a fixed value. However, the \(DLY_{iol}\) varies with the latitude of the satellite. Therefore, (\(\overline{DLY_{iol}}\)) can be seen as an adjustable parameter and an important parameter for maintaining FN and FP balance. To improve our chances of detecting a SH as much as possible, we increase the \(\overline{DLY_{iol}}\) appropriately. However, this leads to false alarms in the detection results. (2) Evaluation of GH detection capability  
We select 300 RTs from the data set, which include 100 cases with GH, 100 normal cases, and 100 cases with the next hop changing to other connected nodes to evaluate the accuracy of the proposed GH detection algorithm. The confusion matrix of the results is shown in Table 7. We also compare the proposed method with the following GH detection methods:  
* CEBD [6] is an extensible GH detection framework, which collects and analyzes data exchanged between nodes and constructs neural-network-based behavior classifiers to distinguish Blackhole behaviors from rational behaviors. * Other classifiers, including SVM, CART, and ID3, can also be exploited in the CEBD framework as a comparative method. The comparison of GH detection capabilities is shown in Figure 17. It can be seen that the proposed method performs well in terms of accuracy (100%), precision (100%), and recall (100%). Therefore, it can be considered that the proposed method has a good detection ability for GH nodes caused by SDC errors. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & & \multicolumn{2}{c}{**Actual Value**} \\ \hline \multirow{3}{*}{**Predicted value**} & & Positives & Negatives \\  & Positives & TP:100 & FP:2 \\  & Negatives & FN:0 & TN:198 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: The confusion matrix of SH detection results. executing \(K\) instances of RIB check, \(N\times M\) instances of routing table detection, \(p\) instances of RIB generation, and \(p\times\frac{N\times M}{K}\) instances of routing table generation. Total time cost of the routing update process  
The total time cost consists mainly of propagation delay, transmission delay, and program running time. Compared with propagation delay, transmission delay, the running time of the program, is much shorter. Therefore, in this example, only propagation delay and transmission delay are considered to evaluate the communication time cost of the proposed framework. The propagation delay can be expressed as \(Dly_{Prop}\), as shown in Equation (7), where _Dis_ is the distance between the two sides of the communication and \(Vel_{wave}\) is the propagation speed of the wave in the vacuum (About \(3\times 10^{5}\) km/s). \[Dly_{Prop}=Dis/Vel_{wave} \tag{7}\]  
We use the STK tool to simulate the Iridium constellation described in Section 5.1 and obtain the link propagation delay of IOLs and AOLs, as shown in Figure 18. In this scenario, the link propagation delay of IOLs is about 13.5 ms.