## 3 Proposed Quality of Service Routing Protocol (QoSRP) in UWSNs
### Underwater Acoustic Channel Assignment Algorithm (iiwca)
The \(\mathcal{SU}\) and \(\mathcal{PU}\) could transmit data simultaneously only if they are far from each other and have low interference effect computed by the signal-to-interference ratio \((\mathcal{S}_{\varepsilon r})\) in the UWSNS. The interference range based on the minimum distance \((\mathcal{D})\) information between the \(\mathcal{SU}\) transmitter and \(\mathcal{PU}\) receiver away from each other can be computed as:  
\[\mathcal{F}_{\mathcal{B}_{\mathit{sig}}}(\ell)=\omega e^{-\omega(\ell)},\ \ell\geq 0, \tag{15}\]5 \[\mathcal{F}_{\mathcal{B}_{\mathit{sig}}}(\ell)=\omega e^{-\omega(\ell)},\ \ell\geq 0, \tag{15}\]6 (28c) \[\mathcal{F}_{\mathcal{B}_{\mathit{sig}}}(\ell)=\omega e^{-\omega(\ell)},\ \ell\geq 0, \tag{15}\]7 (28d) \[\mathcal{F}_{\mathcal{B}_{\mathit{sig}}}(\ell)=\omega e^{-\omega(\ell)},\ \ell\geq 0, \tag{15}\]8 (28e) \[\mathcal{F}_{\mathcal{B}_{\mathit{sig}}}(\ell)=\omega e^{-\omega(\ell)},\ \ell\geq 0, \tag{15}\]9 (28f) \[\mathcal{F}_{\mathcal{I}_{\mathcal{d}\epsilon}}(\ell)=\omega e^{-\delta(\ell)},\ \ell\geq 0, \tag{16}\]0 (28g) \[\mathcal{F}_{\mathcal{I}_{\mathcal{d}\epsilon}}(\ell)=\omega e^{-\delta(\ell)},\ \ell\geq 0, \tag{16}\]1 (28h) \[\mathcal{F}_{\mathcal{I}_{\mathcal{d}\epsilon}}(\ell)=\omega e^{-\delta(\ell)},\ \ell\geq 0, \tag{16}\]2 (28i) \[\mathcal{F}_{\mathcal{I}_{\mathcal{d}\epsilon}}(\ell)=\omega e^{-\delta(\ell)},\ \ell\geq 0, \tag{16}\]3  
Constraints in (28a) and (28b) ensure that the internal \((\,\mathbb{I}_{n\ell})\) and external \((\mathbb{E}_{\ell n})\) interferences of the primary or secondary users belong to a different regions \(\mathcal{R}_{i}\) and \(\mathcal{R}_{J}\) using different frequency channels \(\mathcal{C}_{i}\) and \(\mathcal{C}_{J}\) at time \(\tau_{s}\) is less than the defined threshold level. Constraints in (28c) and (28d) guarantees that the \(\mathbb{I}_{n\ell}\) and \(\mathbb{E}_{\ell n}\) of the primary or secondary users belong to the different regions \(\mathcal{R}_{i}\) or \(\mathcal{R}_{J}\) using the same frequency channels \(\mathcal{C}_{i}\) at time \(\tau_{s}\) must be less than the defined threshold level. Constraints in (28e) state that the \(\mathcal{I}_{n\ell f}\) for the primary or secondary users belong to a region \(\mathcal{R}_{i}\) or \(\mathcal{R}_{J}\) using the same frequency channel at time \(\tau_{s}\) must not be greater than the defined threshold value. Constraints (28f) is the supporting constraints for (28e) guarantees that at the same time \(\tau_{s}\) primary and secondary users in a region \(\mathcal{R}_{i}\) or \(\mathcal{R}_{J}\) cannot use the same channel \(\mathcal{C}_{i}\) to avoid harmful interference while the constraints in (28g) confirm that different channels are assigned to each primary and secondary users in the network. Constraints from (28h) to (28i) are the supporting constraints for Equation (28a) to (28g). Further, to maximize the channel utilization with minimum interference effect during channel selection in a region \(\mathcal{R}_{i}\) in UWSNs. Considering the interference issues, the maximum utility for each user's channel selected for the information transmission is computed numerically in Equation (29) as  
\[\mathcal{F}_{\mathcal{I}_{\mathcal{d}\epsilon}}(\ell)=\omega e^{-\delta(\ell)},\ \ell\geq 0, \tag{16}\]4  
This maximum utility function, i.e., \(\phi_{\mathcal{SU}_{J}}\Big{(}\varphi_{\mathcal{C}_{i}}^{\mathcal{SU}_{J}} \Big{)}=\phi_{\mathcal{SU}_{J}},\log\!\left(1+\varphi_{\mathcal{C}_{i}}^{ \mathcal{SU}_{J}}\right)\) is assumed to be proportional to the Shannon capacity biased by priority parameter \(\phi_{\mathcal{SU}_{J}}\) of the secondary user \(\mathcal{SU}_{J}\) by using channel \(\mathcal{C}_{i}\) in the network. As stated above, to achieve a longer idle probability for \(\mathcal{SU}_{J}\), the desired channels are assigned by considering the previous channels history values saved in the channel table. The proposed scheme to achieve high throughput and data rates for longer time, arranges the channel information in the table in a systematic manner.