## 2 System Model and Problem Formulation  
### System Model  
In this paper, we consider a double-layer cooperated network involving one HAP and mutiple UAVs. As shown in Figure 1, the users are divided into \(M\) clusters, each of which is served by a UAV in an independent channel. The ID set of UAVs and channels are denoted by \(\mathbf{M}=\{1,2,\ldots,m,\ldots,M\}\) and \(\mathbf{K}=\{1,2,\ldots,k,\ldots,K\}\), respectively. The total channel bandwidth is \(B\), and the bandwidth of subchannel \(k\) is \(B_{t}=B/K\). In order to improve the spectrum utilization of the system, we form the adjacent user and the distant user with respect to the UAV as a NOMA pair who transmit data in the same subcarrier \(B_{p}\), where \(B_{p}=B_{t}/N_{p}\) means there are \(N_{p}\) NOMA pairs in a cluster and each pair links to only one subcarrier. The data is first transmitted from users to the UAV in the first phase, and then the UAV forwards it to the HAP using decode-and-forward (DF) protocol in the second phase. Because of the broadcast and vulnerability of wireless channel, we consider a case that there is a passive EVE attempting to make wiretap and spoof threats during the two phases. The 3D position of the HAP, UAV, EVE, the adjacent user, and the distant user are denoted by \([x_{h},y_{h},H]\), \([x_{u},y_{u},h_{u}]\), \([x_{e},y_{e},h_{e}]\), \([x_{a},y_{a},0]\), and \([x_{d},y_{d},0]\), respectively. The low-altitude air-to-ground (ATG) channel in the first phase is more complex than the high-altitude channel and traditional terrestrial mobile access channel due to its variability. Therefore, this paper considers a practical urban macrocell (UMa) model measured by our team to express the path loss (PL) in users-UAV links [21], i.e.,  
\[\mathrm{PL}_{\mathrm{DU}} =28.0+22\lg(d_{\mathrm{DU}}[\mathrm{m}])+20\lg(f_{c}[\mathrm{GHz} ])\] \[+1.0005\times 10^{-4}h_{u}^{2}-0.0286h_{u}+10.5169, \tag{1}\]  
where \(d_{\mathrm{DU}}\) is the Euclidean distance from the user to the UAV, and \(f_{c}\) is the center frequency of the signal. In addition, due to the strong line-of-sight (LOS) propagation in the UAV-HAP phase, the pass loss in this stage can be expressed based on the 3 GPP UMa model [22], i.e.,  
\[\mathrm{PL}_{\mathrm{UH}}=32.44+20\lg(d_{\mathrm{UH}}[\mathrm{m}])+20\lg(f_{ c}[\mathrm{GHz}]), \tag{2}\]  
Figure 1: An HAP and UAVs collaboration framework in NOMA-enabled networks. where \(d_{\text{UH}}\) is the Euclidean distance from the UAV to HAP. The achievable rate from the adjacent user and the distant user in NOMA pair to the UAV or EVE can be expressed as  
\[r_{a}^{D\to X}=B_{p}\text{log}_{2}\Bigg{(}1+\frac{P_{d}G_{a}^{D\to X}}{P_{d}G_{d}^{D \to X}+\sigma_{1}^{2}}\Bigg{)}, \tag{3}\]  
and  
\[r_{d}^{D\to X}=B_{p}\text{log}_{2}\Bigg{(}1+\frac{P_{d}G_{d}^{D\to X}}{ \sigma_{1}^{2}}\Bigg{)}, \tag{4}\]  
where \(P_{a}\) and \(P_{d}\) are the transmit power of adjacent user and distant user, respectively. \(X=\{\text{U},\text{E}\}\) represents UAV or EVE, respectively, \(\sigma_{1}^{2}=B_{p}N_{0}\) is the variance of the additional white Gaussian noise in the first phase. Similarly, the achievable rate from UAV to EVE or HAP can be respectively expressed as  
\[r^{U\to X}=B_{t}\text{log}_{2}\Bigg{(}1+\frac{P_{u}G^{U\to X}}{\sigma_{2}^{2}} \Bigg{)}, \tag{5}\]  
where \(P_{u}\) and \(G^{U\to X}\left(X=\{\text{H},\text{E}\}\right)\) are the UAVs' transmission power and the channel gain from UAV to HAP or EVE, respectively, and \(\sigma_{2}^{2}=B_{t}N_{0}\) is the variance of the additional white Gaussian noise in the second phase. Therefore, as discussed in [23], the secure rate of adjacent user and distant user can be expressed as  
\[r_{x}^{\text{sec}}=\min\{\left[r_{x}^{D\to U}-r_{x}^{D\to E}\right]^{+}, \left[r^{U\to H}-r^{U\to E}\right]^{+}\}, \tag{6}\]  
where \(\left[\Lambda\right]^{+}\overset{\Delta}{=}\max(\Lambda,0)\) and \(x=\{\text{a},\text{d}\}\) represents the adjacent user and distant user, respectively.