## 5 Simulation Results and Analysis
### Comparison of Schemes against Routing Attacks  
The SARA [16] is selected as a comparison algorithm, which is a secure scheme against routing attacks. In the SARA algorithm, the local monitoring strategy is also adopted. However, the difference is that SARA detects malicious nodes by comparing whether the input and output traffic of the monitored nodes are equal. The DOIDS proposed in this paper combines three measures to improve detection accuracy and considers channel information to reduce the false detection rate.  
As shown in Figure 11, it can be concluded that when encountered by a routing attack, e.g., a sinkhole attack, the proposed DOIDS algorithm is more accurate for identifying malicious nodes, and the false detection rate is lower. The main reason for this is that SARA does not consider the influence of packet loss caused by underwater acoustic channel  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Malicious Node Type**} & \multicolumn{2}{c}{**Average Hop Count of Delivered Packets (\#)**} & \multicolumn{2}{c}{**Packet Delivery Ratio (\%)**} & \multicolumn{2}{c}{**Energy Tax (J)**} \\ \cline{2-7}  & **Before** & **After** & **Before** & **After** & **Before** & **After** \\ \hline Sinkhole & 5.47 & 4.38 & 87.65 & 94.61 & 15.98 & 9.87 \\ Sybil & 3.85 & 4.31 & 56.24 & 94.46 & 43.98 & 9.65 \\ Hybrid & 4.86 & 4.32 & 73.04 & 94.81 & 30.27 & 9.65 \\ On–off (Sinkhole) & 4.25 & 4.28 & 92.97 & 94.82 & 10.07 & 9.45 \\ On–off (Sybil) & 3.91 & 4.33 & 69.30 & 94.59 & 23.37 & 9.64 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Experimental results of 10% of malicious nodes before and after DOIDS response.  
conditions on the input and output flow matching. That is, the flow input and output of normal nodes are also prone to mismatch due to channel fluctuation. In order to ensure that the false detection rate is acceptable, the identification rate of the routing attack node is also reduced.  
However, in terms of the decreasing trend of TPR, the scheme proposed in this paper is faster. It is not suitable for many malicious nodes in the network based on the above analysis.  
In the second experiment, we evaluate the change in detection accuracy and false detection rate of four trust models over time in the mixed attack mode. The model mentioned in this paper is compared with ARTMM, TMC, and LTrust, which are all proposed trust models for UASN. The proportion of malicious nodes is set to 25% and randomly distributed in the network. In Figure 12a the detection rate of each trust model is low at the beginning, and gradually increases and stabilizes over time for all trust models. The DOIDS model, with its filtering defense mechanism, separates false recommendations from dishonest recommendations according to the quality of the underwater acoustic link, and punishes dishonest nodes accordingly, reducing the impact of malicious attacks on network performance. Therefore, its detection accuracy rises quickly and always stays at a high position. At the beginning of the simulation, due to the lack of trust evidence, LTrust does not have enough data sets to predict the trust value of the computing node, so its detection is low. As the simulation time increases, the interaction information between nodes increases, more trust evidence is available, the predicted values are more accurate, and the detection accuracy is improving. Moreover, LTrust considers the influence of the underwater environment to reduce its impact on the trust values, so its detection rate is higher than ARTMM and TMC in the later stages. Similarly, as shown in Figure 12b the DOIDS model has the lowest false detection rate and it is always within the controllable range within 10 time stages. However, the other three trust models do not consider wrong recommendations and treat all unreliable recommendations as if they were sent by dishonest nodes, which increases the false detection rate to some extent.  
Figure 11: (a,b) Comparison between DOIDS and SARA.