# Optimization of Effective Throughput in NOMA-Based Cognitive UAV Short-Packet Communication
## 3 Solutions of the Formulated Problems
### Sensing Time Optimization with Fixed \(p_{1}\), \(p_{2}\), and \(I\)  
When the power allocation and information bits are given, we only need to optimize the sensing time \(N_{s}\). In the following theorem, it is proved that \(\Phi_{2}(N_{s})\) is a concave function with respect to \(N_{s}\).  
Theorem 3.1: _Given the power allocation \(p_{1}\), \(p_{2}\) and the information bits \(I\), \(\Phi_{2}(N_{s})\) is a concave function with respect to \(N_{s}\)._  
Proof: Given the power allocation \(p_{1}\), \(p_{2}\) and the information bits \(I\), \(\varepsilon_{2}\) is determined by \(N_{s}\). Therefore, we employ \(\varepsilon_{2}(N_{s})\) instead of \(\varepsilon_{2}\). The first- and second-order derivatives of \(\Phi_{2}(N_{s})\) are, respectively,  
\[\Phi_{2}^{\prime}(N_{s})=P(H_{0})\frac{I}{N}\Big{[}P_{f}^{\prime}(N_{s})( \varepsilon_{2}(N_{s})-1)+\varepsilon_{2}^{\prime}(N_{s})\Big{(}P_{f}(N_{s}) -1\Big{)}\Big{]}, \tag{13}\]  
\[\Phi_{2}^{\prime\prime}(N_{s})=P(H_{0})\frac{I}{N}\Big{[}P_{f}^{\prime\prime} (N_{s})(\varepsilon_{2}(N_{s})-1)+\varepsilon_{2}^{\prime\prime}(N_{s})\Big{(} P_{f}(N_{s})-1\Big{)}+2\varepsilon_{2}^{\prime}(N_{s})P_{f}^{\prime}(N_{s}) \Big{]}. \tag{14}\]  
In addition, the first- and second-order derivatives of \(P_{f}(N_{s})\) are given by  
\[P_{f}^{\prime}(N_{s})=-\frac{1}{2}Ae^{\frac{-D^{2}}{2}}<0, \tag{15}\]  
\[P_{f}^{\prime\prime}(N_{s})=\frac{1}{4}Ae^{\frac{-D^{2}}{2}}(N_{s}^{-\frac{1}{ 2}}+\gamma_{p}f_{s}^{\frac{1}{2}}B^{-\frac{1}{2}}D)>0, \tag{16}\]  
where \(A=\gamma_{p}f_{s}^{\frac{1}{2}}(2\pi BN_{s})^{-\frac{1}{2}}\), \(D=(2\gamma_{p}+1)^{\frac{1}{2}}\mathcal{Q}^{-1}(P_{d})+\gamma_{p}(N_{s}f_{s}) ^{\frac{1}{2}}B^{-\frac{1}{2}}\). (15) shows that the first-order derivative of \(P_{f}(N_{s})\) is less than or equal to zero. (16) shows that the second-order derivative of \(P_{f}(N_{s})\) is greater than or equal to zero.  
Then, to simplify the notation, we denote \(f(N_{s})=f(\gamma_{2},N_{s},R_{2})\), and the first- and second-order derivatives of \(\tilde{\varepsilon}_{2}(N_{s})\) are  
\[\tilde{\varepsilon}_{2}^{\prime}(N_{s})=-\frac{1}{\sqrt{2\pi}}e^{-\frac{P_{2} (N_{s})}{2}}f^{\prime}(N_{s}), \tag{17}\]\[\xi_{2}^{\prime\prime}(N_{\rm s})=\frac{1}{\sqrt{2\pi}}e^{-\frac{f^{2}(N_{\rm s})}{ 2}}\Big{[}f(N_{\rm s})(f^{\prime}(N_{\rm s}))^{2}-f^{\prime\prime}(N_{\rm s}) \Big{]}, \tag{18}\]  
where the first- and second-order derivatives of \(f(N_{\rm s})\) are given by  
\[f^{\prime}(N_{\rm s})=C\Big{[}I(N-N_{\rm s})^{-\frac{3}{2}}+\log_{2}(1+\gamma_ {2})(N-N_{\rm s})^{-\frac{1}{2}}\Big{]}<0, \tag{19}\]  
\[f^{\prime\prime}(N_{\rm s})=C\Big{[}\frac{3}{2}I(N-N_{\rm s})^{-\frac{5}{2}}+ \frac{1}{2}\log_{2}(1+\gamma_{2})(N-N_{\rm s})^{-\frac{3}{2}}\Big{]}<0 \tag{20}\]  
and \(C=-\frac{1}{2}\ln 2(1/\sqrt{V_{2}})\), \(V_{2}=1-(1+\gamma_{2})^{-2}\).  
According to (19) and (20), we can obtain that \(f^{\prime}(N_{\rm s})<0\) and \(f^{\prime\prime}(N_{\rm s})<0\). Then, we have \(\xi_{2}^{\prime}(N_{\rm s})>0\) and \(\xi_{2}^{\prime\prime}(N_{\rm s})>0\). In addition, we have \(P_{f}(N_{\rm s})<1\) and \(\bar{\epsilon}_{2}(N_{\rm s})<1\). Combining the above analyses, it is easily derived that \(\Phi_{2}^{\prime\prime}(N_{\rm s})<0\). Theorem 1 is proved.  
Based on Theorem 1, we can obtain the optimal sensing time \(N_{\rm s}^{*}\) via the bisection method by solving the following equation:  
\[\Phi_{2}^{\prime}(N_{\rm s})=0. \tag{21}\]