# Optimization of Effective Throughput in NOMA-Based Cognitive UAV Short-Packet Communication
## 3 Solutions of the Formulated Problems
### Power Allocation with Fixed \(N_{\rm s}\) and \(I\)  
Given the sensing time and information bits, the optimization problem in (12) can be transformed into the following subproblem:  
\[\max_{p_{1},p_{2}} \Phi_{2} \tag{22a}\] \[s.t. (12b),(12c),(12f). \tag{22b}\]  
**Theorem 2**. : \(\epsilon_{2}\) _is a monotonically decreasing function with respect to \(\gamma_{2}\)._  
Proof. : The first-order derivative of \(\epsilon_{2}\) with respect to \(\gamma_{2}\) is derived as  
\[\frac{{\rm d}\epsilon_{2}}{{\rm d}\gamma_{2}}=-\frac{1}{\sqrt{2\pi}}e^{-\frac {f^{2}(\gamma_{2})}{2}}f^{\prime}(\gamma_{2}), \tag{23}\]  
where  
\[f^{\prime}(\gamma_{2})=\frac{\sqrt{N-N_{\rm s}}}{\sqrt{(1+\gamma_{2})^{2}-1} }\bigg{[}1-\ln 2\frac{\log_{2}(1+\gamma_{2})-R_{2}}{(1+\gamma_{2})^{2}-1} \bigg{]}. \tag{24}\]  
Let \(\lambda=1+\gamma_{2}\) define the function as \(Y(\lambda)=\frac{\log_{2}(\lambda)}{\lambda^{2}-1}\). The first-order derivative of \(Y(\lambda)\) is given by  
\[Y^{\prime}(\lambda)=\frac{y(\lambda)}{\lambda(\lambda^{2}-1)^{2}}, \tag{25}\]  
where \(y(\lambda)=\frac{1}{\ln 2}(\lambda^{2}-1)-2\lambda^{2}\log_{2}(\lambda)\). We calculate the first-order derivative of \(y(\lambda)\) as \(y^{\prime}(\lambda)=-4\lambda\log_{2}(\lambda)\). Since \(\lambda\geq 1\), we have \(y^{\prime}(\lambda)\leq 0\). Hence, \(y(\lambda)\) is a monotonically decreasing function with respect to \(\lambda\) and \(y(\lambda)\leq y(1)=0\). When \(y(\lambda)\leq 0\), we can obtain \(Y^{\prime}(\lambda)\leq 0\). Since \(Y(\lambda)\) is a monotonically decreasing function with respect to \(\lambda\), \(Y(\lambda)\leq Y(1)=\frac{1}{2\ln 2}\). Based on the above analysis, we can derive  
\[f^{\prime}(\gamma_{2})\geq\frac{\sqrt{N-N_{\rm s}}}{\sqrt{(1+\gamma_{2})^{2}-1 }}[1-Y(\lambda)\ln 2]\geq\frac{\sqrt{N-N_{\rm s}}}{2\sqrt{(1+\gamma_{2})^{2}-1}} \geq 0. \tag{26}\]  
Following (26), it is easily derived that \(\frac{{\rm d}\epsilon_{2}}{{\rm d}\gamma_{2}}\leq 0\). Therefore, we can conclude that \(\epsilon_{2}\) is a monotonically decreasing function with respect to \(\gamma_{2}\). Theorem 2 is proved. From Theorem 2, we know that the effective decoding error probability of \(x_{2}\) at \(u_{2}\) is decreased by increasing the value of \(\gamma_{2}\). Therefore, in order to maximize the value of \(\Phi_{2}\), the value of \(\gamma_{2}\) should be as large as possible under the constraints of the transmission power and effective decoding error probability. Next, we prove Theorem 3 based on Theorem 2. Theorem 3: _To maximize \(\Phi_{2}\), the equality of Constraint (12b) should be guaranteed._  
Proof: Suppose that the optimal power allocation that maximizes the effective throughput of the far secondary users is \(p_{1}^{*}\) and \(p_{2}^{*}\), satisfying \(p_{1}^{*}+p_{2}^{*}<P\). Define \(\beta=\frac{P}{p_{1}^{*}+p_{2}^{*}}\). The new power allocation can be obtained as \(p_{1}^{o}=\beta p_{1}^{*}\) and \(p_{2}^{o}=\beta p_{2}^{*}\), satisfying \(p_{1}^{o}+p_{2}^{o}=P\). Since \(p_{1}^{*}+p_{2}^{*}<P\), we have \(\beta>1\). It is easily derived that \(\gamma_{2}^{*}<\gamma_{2}^{o}\). According to Theorem 2, we have \(\varepsilon_{2}^{*}>\varepsilon_{2}^{*}\). Since \(\Phi_{2}\) is a monotonically decreasing function with respect to \(\bar{\varepsilon}_{2}\), it is obtained that \(\Phi_{2}^{*}>\Phi_{2}^{*}\). This contradicts the supposition that \(\Phi_{2}^{*}\) is the maximum effective throughput; hence, the optimal effective throughput is achieved when \(p_{1}+p_{2}=P\). Theorem 3 is proved. In order to reduce the complexity of the calculation, we investigate the feasible region of \(p_{1}\). Due to \(\bar{\varepsilon}_{1}=\varepsilon_{1}+\varepsilon_{2,1}(\varepsilon_{1}^{ \prime}-\varepsilon_{1})\geq\varepsilon_{1}\), we can obtain \(\varepsilon_{1}\leq\varepsilon_{\max}\) based on Constraint (12f). Then, we have \(p_{1}\geq\frac{f^{-1}(\mathcal{Q}^{-1}(\varepsilon_{\max}))\delta_{1}^{2}}{h_{ 1}}\).