## 3 Proposed Quality of Service Routing Protocol (QoSRP) in UWSNs
### Underwater Acoustic Channel Assignment Algorithm (iiwca)
Therefore, the statistical model of the \(\mathcal{PU}s\) behavior must be simple enough that describes precisely how the \(\mathcal{PU}s\) are envisioned to operate in the network. The widely considered model that accurately describes the behavior of the \(\mathcal{PU}\) in an ON-OFF model. In this model, there exist two states, namely ON state and OFF state are used to describe the activity of each channel, indicating the channel is occupied by a \(\mathcal{PU}\) and the channel is idle, respectively. The \(\mathcal{SU}\) can use the oFF period of the \(\mathcal{PU}\) channel to transmit its own data in the network. However, if the OFF period of the \(\mathcal{PU}\) channel is too small then the spectrum state may not change for the \(\mathcal{SU}_{\mathit{3}}\) due to not utilizing the channel in case the primary user is absent. Generally, the exponential model provides a good approximation to measure the duration of the \(\mathcal{PU}\) states. In this model, the durations of both ON and OFF periods is considered as exponentially distributed and independent with means \(1/\mathcal{I}_{\mathcal{d}\epsilon}\) and \(1/\mathcal{B}_{u\,\mathit{sig}}\), respectively. The PDF function for both ON and OFF states is numerically computed as:  
\[\mathcal{F}_{\mathcal{B}_{\mathit{sig}}}(\ell)=\omega e^{-\omega(\ell)},\ \ell\geq 0, \tag{15}\]  
\[\mathcal{F}_{\mathcal{I}_{\mathcal{d}\epsilon}}(\ell)=\omega e^{-\delta(\ell)},\ \ell\geq 0, \tag{16}\]  
in which \(\omega\) and \(\delta\) represent the behavior of the \(\mathcal{PU}\) transition rate from ON state to OFF state and from OFF state to ON state, respectively. The channel steady state probability for both the busy and idle can be numerically computed as:  
\[\rho_{(\mathcal{B}_{\mathit{sig}})}=\frac{\delta}{\omega+\delta} \tag{17}\]  
\[\rho_{(\mathcal{I}_{\mathcal{d}\epsilon})}=\frac{\omega}{\omega+\delta} \tag{18}\]  
in which \(\rho_{(\mathcal{B}_{\mathit{sig}})}\) and \(\rho_{(\mathcal{I}_{\mathcal{d}\epsilon})}\) indicate the busy probability and idle probability, respectively. In the channel-modeling problem of the designed scheme, a suitable channel \(\mathcal{C}_{i}\) from the available channel list \(\mathcal{C}_{n}\) is occupied by each secondary user \(\mathcal{SU}_{\mathit{j}}\) opportunistically when a \(\mathcal{PU}_{\mathit{i}}\) goes silent for \(\tau_{\mathrm{off}}\) seconds in order to maximize the total channel utility in UWSNs. In the designed mechanism, the impact of the noise factor (\(\mathcal{N}_{o}\)) on the channel selection in a specific time \(\tau_{\mathit{i}}\) interval in the underwater environments is computed as:  
\[\mathcal{N}_{o}=\sum_{\mathit{i}=1}^{n}(\mathcal{AN}_{o}+\mathcal{MN}_{o}+ \mathcal{T}\mathcal{N}_{o}+\mathcal{NN}_{o})^{\tau_{\mathit{i}}} \tag{19}\]  
in which \(\mathcal{T}\mathcal{N}_{o}\), \(\mathcal{TN}_{o}\), \(+\mathcal{NN}_{o}\) and \(\mathcal{MN}_{o}\) are, the thermal noise, the acoustic channel noise factors due to signal internal interferences, nature noise contains factors like seismic, rain, wind and marine animals, and man-made noise like shipping and a motor on a boat in the UWEs. All these factors affect the acoustic signal, which results in reducing the signal quality in UWSNs. In the underwater environment, the signal strength of association between each secondary user \(\mathcal{SU}_{\mathit{j}}\) and, primary or secondary user \(\left(\mathcal{PS}_{\mathit{j}}\right)\) is highly correlated to the capacity of data transmission of a channel (\(\mathcal{C}_{\mathit{i}}\)) in the network. However, occasionally it leads to power spectral density \(\left(\mathcal{S}_{\mathit{p},\mathit{d}}\right)\) issue in the network.