## 3 Proposed Quality of Service Routing Protocol (QoSRP) in UWSNs
### Underwater Acoustic Channel Detection (UWCD) Algorithm
#### 3.2.3 User Selection in Cooperative Mechanism  
In UWSNs, the fusion center cooperating with all users does not essentially attain the optimal performance since the channel fluctuates over time and location due to the harsh nature of the UWEs. This might lead to assigning a poor-quality channel to the \(\mathcal{SU}\) which degrades the performance of the network. Therefore, the selection of \(\mathcal{SU}s\) for obtaining the decisions for specific primary signals plays an important role since it can be used to increase the sensing performance at the fusion center. Thus,  
Figure 3: The parallel sensing mechanism. Figure 2: The channel request, monitoring and decision process. the most appropriate \(\mathcal{S}\mathcal{U}s\) among the others which have better \(\mathcal{D}e\mathcal{T}\) probability by considering a given \(\mathcal{F}\mathcal{A}s\) probability in a region must be given the opportunity to participate in the DCoS. In the UWCD scheme, the appropriate cooperating \(\mathcal{S}\mathcal{U}s\) raise the probability of \(\mathcal{D}e\mathcal{T}\) and minimize the total error probability for the \(\mathcal{S}\mathcal{U}\), and thus improve the total throughput of the network. In addition, it provides sufficient protection to the \(\mathcal{P}\mathcal{U}s\) in terms of interference in the network. A set of secondary users selected \(\mathcal{S}_{\text{e}}(\mathcal{S}\mathcal{U}_{\ell})\) from the rest of the secondary users \(\mathcal{S}\mathcal{U}_{j}\) in the decision-making procedure can be numerically shown as:  
\[\mathcal{S}_{\text{e}}(\mathcal{S}\mathcal{U}_{\ell})=\sum_{\ell=1}^{n}\sum_{ \ell=1}^{\ell}\mathcal{S}\mathcal{U}_{j}-\mathcal{S}\mathcal{U}_{\ell} \tag{12}\]  
subject to:  
\[\mathcal{S}\mathcal{U}_{\ell}\subseteq\mathcal{S}\mathcal{U}_{j }\in\mathcal{R}_{\ell}(\mathcal{C}_{i})<\mathcal{R}_{n} \tag{12a}\] \[\mathcal{S}\mathcal{U}_{\ell}\in\mathcal{I}_{\prec\delta\ell} \Big{(}\mathcal{H}_{1}\big{|}\mathcal{H}_{0}\Big{)}\cong 1\] (12b) \[\rho_{e}\mathcal{S}\mathcal{U}_{\ell}(\mathcal{C}_{i})<\delta\] (12c) \[\mathcal{S}\mathcal{U}_{\ell}\in\mathcal{I}_{\
eq r}\Big{(} \mathcal{H}_{1}\big{|}\mathcal{H}_{0}\Big{)}=0\] (12d) \[\mathcal{S}\mathcal{U}_{\ell}\Big{(}\mathcal{H}_{1}\big{|} \mathcal{H}_{0}\Big{)}\leq\tau_{\text{s}}\,<\tau \tag{12e}\]  
Constraints in (12a) state that the selected secondary users are less than the total number of secondary users involved in the sensing process for the distinct channels in a region in the network. Constraints in (12b) guarantee that the selected secondary users perform the best \((\mathcal{I}_{\
ot\in e\mathcal{A}\ell})\) in terms of channel detections with low error probability \((\delta)\) is satisfied by Equation (12c). Constraints in (12d) state that the secondary users with poor detection probability \((\mathcal{I}_{\
eq e\mathcal{C}\mathcal{C}\mathcal{C}\mathcal{C}  
\[\mathcal{T}(y)=\prod_{\varepsilon=1}^{\mathcal{SU}_{n}}\frac{\rho\big{(}x_{ \varepsilon}\big{|}\mathcal{H}_{1}\big{)}}{\rho\big{(}x_{\varepsilon}\big{|} \mathcal{H}_{0}\big{)}} \begin{array}{c}\mathcal{H}_{1}\\ \gtrdot\mathcal{H}_{0}\end{array} \mathbf{N} \tag{13}\]  
in which \(\mathcal{SU}_{n}\) shows that there are \(n\) number of \(\mathcal{SU}_{3}\) and the observations at each \(\mathcal{SU}\) are indicated by \(x_{\varepsilon}\) such that \(\dot{\varepsilon}=\{1,\ 2,\ 3,\ldots\mathcal{SU}_{n}\}\) at the fusion center \(\varphi\) such that \(\varphi=\{\varphi_{1},\varphi_{2},\varphi_{3},\ldots\mathcal{SU}_{n- \varepsilon}\}\) and \(\mathbf{N}\) is the defined threshold value. This mechanism guarantees the target probability of false alarm while maximizing the probability of detection when making a global decision for the presence or absence of the \(\mathcal{PU}\) on a channel in the MCASNs. To further enhance the probability of detection, the fusion center adds only those \(\mathcal{SU}_{3}\) in a group whose detection probability are higher than others above the defined threshold.