# Multi-Objective Optimization for EE-SE Tradeoff in Space-Air-Ground Internet of Things Networks
## 3 Problem Solution
### Sub-Problem 1: Sub-Channel Selection  
First, we consider the establishment of communication between IoT devices and UAVs. Appropriate sub-channels need to be selected, so the first sub-problem is called sub-channel selection, which is related to the integer variable \(\mathbf{A}\). We fix the variable \(\mathbf{D}\), \(\mathbf{P}_{I}\), and \(\mathbf{P}_{U}\), the problem can be described as  
\[\mathcal{SP}_{1}: \max_{\mathbf{A}}\frac{\sum_{u}r_{us}}{\sum_{i}p_{i}+\sum_{u}p_{u }+UP_{\text{h}}}\] (13) s.t. \[C1,C2,C3,C6,C7.\]  
Observing \(\mathcal{SP}_{1}\), we can see that the value of the objective function is fixed for any \(\mathbf{A}\) that meets the constraint conditions. Therefore, when meeting the constraints, we consider optimizing the throughput of the IoT devices, which can be described as  
\[\mathcal{SP}_{2}: \max_{\mathbf{A}}\sum_{i}r_{iu}\] (14) s.t. \[C1,C2,C3,C6,C7.\]  
Due to the presence of integer variables, the problem is complex to solve. A matching algorithm is used to solve \(\mathcal{SP}_{2}\), as shown in Algorithm 1. IoT devices and UAVs construct preference lists based on descending communication rate between IoT devices and UAVs, respectively. Taking the selection of the UAV sub-channel by IoT device \(I_{1}\) as an example. Assume the preference list of \(I_{1}\) is \(\{r_{12},r_{13},\ldots\}\), where \(r_{12}\) means the communication rate between IoT device \(I_{1}\) and UAV \(U_{2}\). \(I_{1}\) first selects \(U_{2}\) and calculates the number of devices \(N_{2}\) that have communicated with \(U_{2}\). If \(N_{2}\) is less than \(K\), the match is successful. Otherwise, look at the preference list of \(U_{2}\), and assume the list is \(\{r_{12},r_{32},r_{22},r_{42},\ldots\}\). Based on the preference list of \(U_{2}\), compare the lowest priority of the \(K\) devices \(I_{2}\) that already match \(U_{2}\) to \(I_{1}\). If \(I_{1}\) has a higher priority, match \(I_{1}\) with \(U_{2}\). Meanwhile, delete \(U_{2}\) from the preference list of \(I_{2}\) and rematch \(I_{2}\). If \(I_{1}\) has a lower priority, delete \(U_{2}\) from the preference list of \(I_{1}\) and rematch \(I_{1}\). If there is communication between UAV \(u\) and IoT device \(i\), \(a_{iu}=1\), otherwise \(a_{iu}=0\). According to the matching algorithm, we can obtain \(\mathbf{A}\).  
```
1:Input: Power allocation \(\mathbf{P}_{I}\) and \(\mathbf{P}_{U}\), UAVs positon \(\mathbf{D}\).
2: Let the set of IoT devices to be matched be \(\mathcal{I}\) and the set of devices that have been matched UAV \(u\) be \(\mathcal{U}_{u}\).
3: Initial all \(a_{iu}\) to be zero.
4: Calculate \(r_{iu}\). Construct preference lists of IoT devices \(PL_{i}\) and UAVs \(PL_{u}\).
5:while\(\mathcal{I}\
eq\emptyset\)do
6:for IoT device \(i\)\(\subseteq\)\(\mathcal{I}\)do
7:if\(PL_{i}\
eq\emptyset\)then
8: Select the most preferred UAV \(u\in PL_{i}\).
9: Count the number of devices that have been matched to UAV \(u\), denoted as \(N_{u}\).
10:if\(N_{u}=K\)then
11: Select the worst matched IoT \(i^{\prime}\) in \(\mathcal{U}_{u}\).
12:if\(i\) has a higher priority than \(i^{\prime}\) in \(PL_{u}\)then
13: Replace \(i^{\prime}\) with \(i\) in \(\mathcal{U}_{u}\) and \(\mathcal{I}\), then delete \(u\) from \(PL_{i^{\prime}}\).
14: Swap \(a_{i^{\prime}u}\) and \(a_{iu}\).
15:else
16: Delete \(u\) from \(PL_{i}\).
17:endif
18:else
19: Add \(i\) into \(\mathcal{U}_{u}\), and delete \(i\) from \(\mathcal{I}\).
20:\(a_{iu}=1\), \(N_{u}=N_{u}+1\).
21:endif
22:endif
23:endfor
24:endwhile
25:Output: Subchannel selection \(\mathbf{A}\).
```  
**Algorithm 1** A matching algorithm for solving subchannel selection.