## 2 Downlink Beamforming Design and Uplink Power Allocation
### Methodology: Deep Learning-Based Downlink Beamforming Design and Uplink Power Allocation  
#### 2.2.1 Limitations of the Conventional Approaches  
The optimization-theoretic approaches described in the previous section yield the solutions in almost all situations (as long as the problems (P1\({}^{\prime}\)) and (P2\({}^{\prime}\)) are feasible). However, such approaches require high computational complexities increasing proportionally to the total number \(N_{s}\) of time slots, which practically prohibited in the UAV wireless communication system because \(N_{s}\) is typically large (for example, \(N_{s}=4096\) when \(SF=12\), meaning that the optimization problem (P1\({}^{\prime}\)) or (P2\({}^{\prime}\)) must be re-solved 4096 times). Specifically, in the downlink, solving the SOCP problem (P1\({}^{\prime}\)) requires a large computational complexity of \(\mathcal{O}\big{(}K^{1.5}M^{4}\log\left(1/\epsilon\right)\big{)}\) for every time slot \(n\)[24], and, thus, the total computational complexity even becomes grower to \(\mathcal{O}\big{(}N_{s}K^{1.5}M^{4}\log\left(1/\epsilon\right)\big{)}\), where \(\epsilon\) is accuracy for interior-point method (typically, set \(\epsilon=1\times 10^{-6}\)) [25]. Meanwhile, in the uplink, solving the LP problem (P2\({}^{\prime}\)) requires a computational complexity of \(\mathcal{O}\big{(}M^{2}K\log K\log\left(1/\epsilon\right)\big{)}\) for every time slot \(n\)[26], and thus, the total computational complexity even becomes \(\mathcal{O}\big{(}N_{s}M^{2}K\log K\log\left(1/\epsilon\right)\big{)}\). In order to address such complexity issues, in this paper, we propose a new data-driven cutting-edge approach for the downlink beamforming design and uplink power allocation in the UAV wireless communication system based on deep learning, which requires a low and controllable computational complexity of \(\mathcal{O}\big{(}K(D_{in}D_{1}+\sum_{i=1}^{L-1}D_{i}D_{i+1}+D_{L}D_{out}) \big{)}\) (at the online deployment stage after an offline training), and thus, enables a real-time computation [27]. Here, \(D_{i}\), \(D_{in}\), and \(D_{out}\) denote the number of nodes in the \(i\)-th layer, the number of nodes in the input layer, and the number of nodes in the output layer, respectively, of the deep neural network (DNN) constructed in the next section. Additionally, \(L\) is the number of hidden layers. It is worth noting that, if the values of \(D_{i}\)'s are properly chosen, the proposed scheme requires much lower computational complexity than the conventional scheme (e.g., if we select \(D_{i},i=1\) to \(L\) that satisfy \(\frac{1}{6}\Big{(}D_{in}D_{1}+\sum_{i=1}^{L-1}D_{i}D_{i+1}+D_{L}D_{out}\Big{)} \geq K^{0.5}M^{4}\) in the downlink or \(\frac{1}{6}\Big{(}D_{in}D_{1}+\sum_{i=1}^{L-1}D_{i}D_{i+1}+D_{L}D_{out}\Big{)} \geq M^{2}\log K\) in the uplink). In addition, the practical merit of the proposed approach is that the constructed DNN can be _universally_ applied to _both_ the downlink beamforming design _and_ the uplink power allocation (i.e., it is usable regardless of whether the scenario is the downlink or the uplink), although the conventional approach relies particularly on whether the scenario is the downlink or the uplink. To conclude, the proposed scheme has low computational complexity and is thus more efficient compared to the conventional schemes for both scenarios in almost all practical situations (see Tables 1 and 2 for detailed comparisons in various situations. We used bold to the comparatively lower complexity). \begin{table}
\begin{tabular}{c c c} \hline \hline \(\mathbf{(M,K)}\) & **Conventional Scheme (Uplink)** & **Proposed Scheme** \\ \hline \((4,6)\) & **448** & 7104 \\ \((8,6)\) & **1793** & 7872 \\ \((16,8)\) & **11,097** & 12,544 \\ \((32,8)\) & 44,389 & **16,640** \\ \((64,10)\) & 245,760 & **31,040** \\ \((128,10)\) & 983,040 & **51,520** \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Computational complexities for the various \((M,K)\) pairs in the uplink. The network architecture of the proposed scheme will be elaborated in the next section.