# NOMA-Based Rate Optimization for Multi-UAV-Assisted D2D Communication Networks
## 3 Problem Formation  
To maximize the system throughput, this study optimizes the channel allocation and trajectory design with power control under spatial constraints, power constraints, channel constraints, and minimum rate constraints. \(H=\{x_{u}(t),y_{u}(t),h_{u}(t),u\in\mathcal{U}\}\) denotes the position of the UAV during the service time of \(0\leq t\leq T\). The channel allocation factor is denoted by \(I=\{I_{i,\mathrm{D}T_{j}}^{u},u\in\mathcal{U},C_{i}\in\mathcal{C}_{u},D_{j}\in \mathcal{D}_{u}\}\). The problem is expressed as: (25a)  
\[\max_{H,I,A}R \tag{25a}\] \[s.t.h_{\min}\leq h_{u}(t)\leq h_{\max}\] (25b) \[x_{\min}\leq x_{u}(t)\leq x_{\max}\] (25c) \[y_{\min}\leq y_{u}(t)\leq y_{\max}\] (25d) \[P_{i}^{u}\geq 0,P_{i,D_{j}}^{u}\geq 0\] (25e) \[P_{i}^{u}+\sum_{D_{j}\in D_{u}}I_{i,\mathrm{D}T_{j}}^{u}P_{i,D_{j }}^{u}\leq P\] (25f) \[I_{i,\mathrm{D}T_{j}}^{u}\in\left\{0,1\right\}\] (25g) \[\sum_{C_{i}\in\mathcal{C}_{u}}\sum_{D_{j}\in\mathcal{D}_{u}}I_{i,\mathrm{D}T_{j}}^{u}\leq\xi_{u}\] (25h) \[\sum_{u\in\mathcal{U}}\sum_{C_{i}\in\mathcal{C}_{u}}I_{i, \mathrm{D}T_{j}}^{u}\leq 1\] (25i) \[S_{i,D_{j}}^{u}\geq 0\] (25j) \[r_{i}^{u}\geq r_{i}^{u,Hr}\] (25k) \[r_{i,\mathrm{D}R_{j,u}}^{u}\geq r_{i,\mathrm{D}R_{j,u}}^{u,Hr}\] (25l) \[a_{i,\mathrm{D}R_{j,u}}^{u}\geq 0\] (25m) \[a_{i,\mathrm{D}R_{j,1}}^{u}+a_{i,\mathrm{D}R_{j,2}}^{u}\leq 1 \tag{25n}\]  
where constraints (25b)-(25d) denote constraints on the 3D position of the UAV, i.e., the UAV must be located in the service area before the airspace within the altitude range can be realized in order to avoid collisions between UAVs. Constraints (25e) and (25f) are the transmit power limitations, where constraint (25f) denotes the total power constraints, i.e., the total power of each channel under UAV \(u\) must not exceed \(P\). Constraints (25g)-(25i) denote the channel multiplexing constraints. Specifically, constraint (25g) is a binary constraint, which denotes a binary variable indicating whether \(D_{j}\in\mathcal{D}_{u}\) occupies the \(C_{i}\in\mathcal{C}_{u}\) channel resource or not; constraint (25h) denotes the maximum number of D2D clusters associated with UAV \(u\)'s constraint; and constraint (25i) denotes that a D2D cluster is allocated at most one channel resource. Constraint (25j) denotes the SIC successful demodulation constraint. Constraints (25k) and (25l) denote the minimum rate constraints, i.e., cellular users and D2D cluster users should satisfy the minimum transmission rates \(r_{i}^{u,Hr}\) and \(r_{i,\mathrm{D}R_{j,u}}^{u,Hr}\), respectively, in order to ensure QoS guarantees for both cellular users' links and D2D clusters' links. Constraints (25m) and (25n) denote the power allocation factor constraints.  
From the above optimization objective function, it can be seen that the optimization of this objective function mainly consists of three parts, the channel multiplexing indicator \(I\), the position variable of the UAV \(H\), and the power allocation coefficient \(A\). Here, the optimization problem is a mixed-integer programming problem and the objective function is non-convex, so it is difficult to solve \(I\), \(H\), and \(A\) at the same time. So in this paper, this study adopts the joint dynamic hypergraph Multi-Agent Deep Q Network (DH-MDQN) to solve it. The problem is decoupled into two subproblems, solving the channel assignment problem by dynamic hypergraph coloring method and then using the MDQN algorithm to solve the trajectory design and power control problem.