## 5 Improved Double-Threshold Co-Operative Detection Algorithm  
In view of the fact that most double-threshold detection algorithms are difficult to judge or temporarily difficult not to judge, or these algorithms directly discard signals for which the energy values are between double thresholds, a re-sensing algorithm based on historical sensing information is proposed.  
The algorithm is implemented as follows:  
1. A random signal is generated, and the following parameters are calculated: * Attenuation: The fading effect has mainly fast fading and slow fading, and this paper analyzes and calculates mainly the fading caused by the multipath effect. * Delay: This leads to a broadening of the received signal compared to the original signal and also causes frequency-selective fading. * Doppler shift: This is caused by the relative motion of the transmitter and receiver or the flow of seawater. The Doppler frequency shift expression is as follows: \[\rm{\Delta f}=\frac{v}{c}fcos\varphi\] (17)c is the velocity of sound, \(\
u\) is the relative velocity of the motion between the transmitter and the receiver, and \(\varphi\) is the angle between the relative motion velocity and the signal transmission direction at the transmitter. \(\bullet\) Ocean noise with stack variance \(\sigma_{\rm x}^{2}\). Primary and random components are generated. (2) The energy value of the signal is calculated according to Formula (2). The high and low thresholds can be obtained by Formulas (11) and (12). The specific expression is as follows: \[\rho_{\rm h}=Q^{-1}(P_{\rm f})\sqrt{2N\sigma_{\rm n}^{2}}+N\sigma_{\rm n}^{2}\] (18) \[\rho_{\rm l}=(\sigma_{\rm n}^{2}+\sigma_{\rm x}^{2})\Big{(}N-Q^{-1}(P_{\rm m })\sqrt{2N}\Big{)}\] (19)
3 The calculated energy statistics are compared with the two thresholds. The algorithm flow chart is shown in Figure 6. (4) If the energy value of the signal is between the two thresholds, the N1 sampling points are added, the energy value and two threshold values are recalculated, and re-sensing is performed. The decision rule selection is based on the OR criterion. The specific calculation method of the energy value and the high and low thresh- olds is as follows: \[y1=\frac{1}{N+N1}\sum_{n=1}^{N+N1}|x(t)|^{2}\] (20) \[\rho_{\rm h}1=Q^{-1}(P_{\rm f})\sqrt{2(N+N1)\sigma_{\rm n}^{2}}+(N+N1)\sigma_ {\rm n}^{2}\] (21) \[\rho_{\rm l}1=\Big{(}\sigma_{\rm n}^{2}+\sigma_{\rm x}^{2}\Big{)}\bigg{(}(N+N1 )-Q^{-1}(P_{\rm m})\sqrt{2(N+N1)}\bigg{)}\] (5) The detection probability is computed. Firstly, the single-threshold energy detection algorithm is compared with the double-threshold energy detection algorithm, and the analysis verifies whether the double-threshold energy detection algorithm is more advantageous in the signal-to-noise environment simulated in this paper. Secondly, the traditional collaborative detection algorithms that currently exist are simulated to analyze their respective advantages and disadvantages and to analyze whether the OR criterion collaborative detection algorithm can achieve better results. Finally, the improved two-threshold collaborative detection algorithm proposed in this paper is compared with the traditional two-threshold collaborative detection algorithm to verify the feasibility of the proposed algorithm.