1 Introduction

Thanks to their high mobility and flexibility, UAVs can serve as Mobile Edge Computing (MEC) platforms for processing data offloaded by IoTDs (Seid 2021; Wang 2018b; Liu et al. 2022). Additionally, they can act as relay devices to transmit tasks to base stations for computation (Baek and Lim 2019; Zhong et al. 2019). Although traditional fixed relay devices have been extensively studied, it is difficult to meet the communication needs in complex terrain environments (Jing and Jafarkhani 2009; Kim et al. 2015; Gao et al. 2019). Compared to traditional fixed relay devices, UAVs possess the unique capability to adjust their positions based on device locations. This feature is particularly advantageous for delay-sensitive tasks as it enables us to determine the optimal position of UAVs to meet low-delay requirements. Furthermore, UAVs, being aerial platforms, excel at navigating complex terrains. Unlike traditional relay devices that are easily obstructed, UAVs flying at high altitudes can establish Line-of-Sight (LoS) communication with devices (You and Zhang 2020). UAVs can also act as relay devices to forward data from base stations to IoTDs in certain scenarios, such as post-disaster relief. After the base stations in the disaster area are destroyed, the trapped people are unable to receive information from the outside world. Therefore, we can deploy UAVs as temporary communication devices to relay external information and safety instructions to portable communication devices, such as smartphones and smartwatches, carried by the trapped individuals.

In this paper, we proposed a relay system consisting of multiple UAVs and an AP, where the AP is responsible for sending data to the UAVs and the UAVs are responsible for forwarding the data from the AP to IoTDs. To ensure reliable data delivery, we employ the Wireless Power Transmission (WPT) technique, enabling UAVs to charge the IoTDs. Finally, we have maximized the average minimum rate at which IoTDs receive data as the optimization objective. The main contributions are as follows:

  1. (1)

    The NOMA and SIC techniques are used to enhance the communication rate between the AP and UAVs. Additionally, we proposed a parameter optimization problem based on power allocation for the AP. The problem strictly follows the SIC demodulation order. Since this problem is a non-convex problem, we solved it using convex optimization methods such as SCA and obtained an approximate optimal solution for power allocation.

  2. (2)

    To further solve the problem of time slot allocation problem. We divided the entire cycle into multiple sub-slots. Each sub-slots is used for data transmission between the AP and UAV, power transmission between the UAV and IoTDs, and data transmission between the UAV and IoTDs, respectively. Since the problem is a linear programming problem, it was solved by CVX solver.

  3. (3)

    Since multi-UAV trajectory optimization is a nonconvex problem with complex mixed variables, we optimized the trajectory of each UAV step by step while fixing the trajectories of other UAVs by the BCD method. The nonconvex constraint was transformed by introducing relaxation variables and using the SCA technique to obtain an approximate optimal solution for the trajectory.

  4. (4)

    In the simulation results, we not only demonstrated the performance of the algorithm against other optimization methods, but also compared the difference in UAV receiving rate between OFDMA and NOMA schemes. Finally, we also investigated the effect of different parameters such as maximum flight speed, system period, UAV flight altitude, and UAV transmitting power, on the optimization objective.

2 Related work

2.1 UAV-assisted relay system

In the papers (Li et al. 2019; Wang 2018a), the authors discussed the latest advancements and future prospects of UAV communication in the 5 G era and beyond. In Li et al. (2019), the authors discussed the capabilities of UAVs. They highlighted that UAVs can not only perform data forwarding but also transmit energy to users using WPT technology. Furthermore, the authors mentioned that the flight time of UAVs can be extended by equipping them with solar panels to collect energy. In Zeng et al. (2016), Zeng et al. proposed a UAV-supported relay model. The communication from source to destination nodes was achieved by deploying UAVs as relay systems. The transmitting power of the source node and relay, and flight trajectory of the UAV were optimized to maximize the throughput of the system. Ji et al. in Ji (2020) considered the deployment of a UAV relay in the case of difficult communication between the base station and user. The sum of transmission rates of all users was maximized by optimizing the UAV trajectory, speed, acceleration, and scheduling of UAVs and devices. In Liu (2023), Liu et al. considered the worst-case scenario of car and base station communication, taking into account the presence of eavesdroppers. They proposed the deployment of UAVs with reconfigurable smart surfaces as relay systems to assist communication. In Jiang et al. (2019), Jiang et al. designed a UAV-assisted relay system to forward data from multiple ground devices via time division multiple access. The authors optimized the time slot allocation, power allocation, and UAV flight trajectory to maximize the minimum average data rate of each communication pair. In Zhang (2022), Zhang et al. proposed a multi-UAV collaborative relay system to enhance the duration of communication. Specifically, multiple UAVs work one after the other as substitutes. The authors designed heuristic substitution and spectrum effect substitution schemes.

2.2 UAV-assisted NOMA technology

In recent years, there has been extensive research on Non-Orthogonal Multiple Access (NOMA) technology (Yadav et al. 2020; Zeng 2018; Liu et al. 2019). NOMA has garnered significant attention due to its potential for improving spectral efficiency and accommodating a large number of users in wireless communication systems. Due to the limited frequency band resources, many studies on MEC considered the application of NOMA technology. In Diao et al. (2019), Diao et al. proposed a UAV-assisted mobile edge computing system based on NOMA technology to minimize the maximum energy consumption among all users by optimizing trajectories, task data, and computational resource allocation. Katwe et al. in Katwe et al. (2021) designed an unconventional two-stage dynamic user interface. Clustering user nodes to reduce interference between multiple UAVs. In the first step, all user nodes will be divided into groups equal to the number of UAVs using the k-means algorithm. Then, the user nodes are further divided into dynamic number of sub-clusters using elbow method, and k-means method based on their distribution location. Rezvani et al. in Rezvani et al. (2022) proposed globally optimal power allocation strategies to maximize the total rate and energy efficiency as the optimization objectives, respectively, and solved them by the fast water-filling algorithm and the Dinkelbach algorithm. Wang (2020a) proposed a device-to-device-enhanced UAV-NOMA network architecture that allowed ground users who have already received File Blocks (FBs) to reuse the time–frequency resources assigned to NOMA links to share their FBs with other ground users. In Mirbolouk et al. (2022), authors deployed UAVs to act as relay systems for satellites and ground equipment and proposed a hybrid satellite-unmanned aerial vehicle (UAV) relay network (HSURN). Meanwhile, the authors used coordinated multi-point transmission and NOMA techniques to enhance the spectral efficiency.

The work in Ji (2020) and Mirbolouk et al. (2022) are the most relevant with our research work. However, the authors in Ji (2020) did not consider the deployment of multiple UAVs, and the optimization target was the sum of transmission rates for all users. This approach results in low transmission rates for certain users. The work in Mirbolouk et al. (2022) did not apply the WPT technology and did not consider the AP and UAV communication processes in the model. In this paper, we proposed a system that combined a single AP and multi-UAV. The spectrum efficiency was enhanced by using NOMA and SIC techniques during the process of transmitting data from AP to UAVs. In addition we have targeted to maximize the minimum average receiving rate among the IoTDs. Finally, the simulation results showed that our model was superior to other.

The rest of the paper is organized as follows, Sect. 3. introduces our system model and Problem Formulation, and Sect. 4 describes the problem solving process. In Sect. 5, we presented the simulation results and analyze the data. Finally, we concluded the paper in Sect. 6.

3 System model and problem formulation

3.1 System model

Our system includes U rotary wing UAVs, K IoTDs and one AP. As shown in Fig. 1, the workflow of the entire system is as follows: The AP initially sends data to the UAVs, which receive the data and then transmit power to the connected IoTDs before forwarding the data. The UAV receives and forwards the data in frequency-division duplexing (FDD) mode. The horizontal coordinates of the kth IoTD correspond to \({w}_{k}\) = [\({x}_{k}\), \({y}_{k}\)]\({}^{T}\), where k \(\in \) \(\mathcal {K}\) = {1, 2,..., K}, and the ground coordinates of the AP are \({w}_{m}\) = [\({x}_{m}\), \({y}_{m}\)]\({}^{T}\). For quantitative analysis, the entire flight period T of the UAV is divided equally into N time slots. Each time slot has a length of t, calculated as T/N. The value of N is large enough to ensure that the UAV is considered immobile in each time slot. The flight altitude of all UAVs is denoted as H, and the horizontal coordinates of the u \(\in \) \(\mathcal {U}\)={1,2,...,U} UAV at the n-th \(\in \) \(\mathcal {N}\)={1,2,...,N} time slot is \({q}_{u}[n]\)=[\({x}_{u}\)[n],\({y}_{u}\)[n]\({]}^{T}\).

Fig. 1
figure 1

The system model

Notably, we assumed that UAVs fly according to a periodic pattern, so that the initial position \({q}_{u}[1]\) and final position \({q}_{u}[N]\) of the u-th UAV are equal.

$$\begin{aligned} {{q_u}[1] = {q_u}[N]}\quad {\forall u}\in \mathcal {U} \end{aligned}$$
(1)

The maximum flight speed of the UAV is set to \({V}_{max}\), and to prevent collisions of UAVs, we set a safe distance \({d}_{min}\) to ensure that no collisions occur between UAVs, in which all UAVs should satisfy both speed and anti-collision constraints.

$$\begin{aligned}{} & {} \parallel {q_u}[n + 1] - {q_u}[n]{\parallel ^2} \le {({V_{\max }}t)^2}\quad {\forall u\in \mathcal {U}, n \in \mathcal {N}} \end{aligned}$$
(2)
$$\begin{aligned}{} & {} \parallel {q_j}[n] - {q_k}[n]{\parallel ^2} \ge {({d_{\min }})^2}\quad {\forall j,k}\in \mathcal {U}\, j \ne k \end{aligned}$$
(3)

To simplify the analysis, we made an assumption regarding the area of operation for the multiple unmanned systems. We assumed that the area is an open space, where the influence of terrain and obstacles can be disregarded. Additionally, we assumed that there is no occlusion from UAVs to IoTDs and AP. Therefore, our data transmission can be considered as LoS transport. The channel gains from the UAV to the AP and the IoTD are denoted as \({h}_{au}[n]\) and \({h}_{uk}[n]\), respectively. The relevant channel formula is as follows.

$$\begin{aligned} {h_{au}}[n]= & {} {\beta _0}d_{au}^{ - 2}[n] \end{aligned}$$
(4)
$$\begin{aligned} {h_{uk}}[n]= & {} {\beta _0}d_{uk}^{ - 2}[n] \end{aligned}$$
(5)

where \(\beta _0 \) indicates the channel power gain at the unit distance \({d}_{0}\) =1 m. \({d}_{au}\) and \({d}_{uk}\) represent the distance from the u-th UAV to the AP and the k-th IoTD respectively, which can be expressed as

$$\begin{aligned} d_{au}^{}[n]= & {} \sqrt{{H^2} + \parallel {q_u}[n] - {w_m}{\parallel ^2}} \end{aligned}$$
(6)
$$\begin{aligned} d_{uk}^{}[n]= & {} \sqrt{{H^2} + \parallel {q_u}[n] - {w_k}{\parallel ^2}} \end{aligned}$$
(7)

We defined \({a_{uk}}[n]\) as the connection scheduling between the u-th UAV and the k-th IoTD at the n-th time slot. \({a_{uk}}[n]\)=1 indicates that the u-th UAV and k-th IoTD establish a connection at the n-th time slot. 0 means no connection.

$$\begin{aligned}{} & {} {\sum \limits _{k=1}^K {{a_{uk}}[n]} = 1}\quad {\forall n} \in \mathcal {N}, {u \in \mathcal {U}} \end{aligned}$$
(8)
$$\begin{aligned}{} & {} {\sum \limits _{u=1}^U {{a_{uk}}[n]} = 1}\quad {\forall n} \in \mathcal {N},{\forall k} \in \mathcal {K} \end{aligned}$$
(9)
$$\begin{aligned}{} & {} {{a_{uk}}[n] \in \{ 0,1\} } \quad {\forall k \in \mathcal {K},u \in \mathcal {U},n \in \mathcal {N}} \end{aligned}$$
(10)

Constraint (8) indicates that one UAV can only connect to one IoTD at each time slot, and equation (9) means that a UAV can be only connected to one IoTD per time slot.

Fig. 2
figure 2

The communication model

The communication model of the entire system is shown in Fig. 2. We divided each time slot into three subslots: the transmission time \({t}_{d}[n]\) from the AP to UAVs, the transmission time \({t}_{u}[n]\) from UAVs to IoTDs, and the time \({t}_{c}[n]\) for power transmission from UAVs to IoTDs. It was worth noting that AP can send data to multi-UAV at the same time, but UAVs can only send data to one IoTD in single time slot. The relevant constraint can be expressed as follows.

$$\begin{aligned}{} & {} {0 \le {t_d}[n] \le t} \quad {\forall n} \in \mathcal {N} \end{aligned}$$
(11)
$$\begin{aligned}{} & {} {0 \le {t_u}[n] \le t}\quad {\forall n} \in \mathcal {N} \end{aligned}$$
(12)
$$\begin{aligned}{} & {} {0 \le {t_c}[n] \le t}\quad {\forall n} \in \mathcal {N} \end{aligned}$$
(13)
$$\begin{aligned}{} & {} {{t_d}[n] + {t_u}[n] + {t_c}[n] = t}\quad {\forall n} \in \mathcal {N} \end{aligned}$$
(14)

Based on the rules of NOMA in the downlink capacity domain. The NOMA transmitter sends the data of different users overlapping each other, while the receiver distinguishes between the signals of different users based on their respective signal strengths. Therefore, the power level assigned to different users at the transmitter side directly affects the demodulation performance of the SIC receiver and also determines the sum rate of the NOMA system (Islam et al. 2016; Miridakis and Vergados 2012). In our system, we allocated more power to the UAV with a weaker channel gain to ensure the basic data rate requirement. It is assumed that the channel gain satisfies \({h}_{a1}< {h}_{a2}\ldots< {h}_{au} < \cdots {h}_{mU}\), then the transmitted power have \({P}_{1}>{P}_{2}\cdots>{P}_{u}>\ldots {P}_{U}\).

During the data transmission from the AP to UAVs, the amount of data sent by the AP to the u-th UAV in the n-th time slot is

$$\begin{aligned} {D_{au}}[n] =B_u\log _2\left( 1 + \frac{{{P_u}[n]{h_{au}}[n]}}{{{\delta ^2} + \sum \limits _{j = u + 1}^U {{P_j}[n]{h_{aj}}[n]} }}\right) {t_d}[n] \end{aligned}$$
(15)

where \(B_u\), \({\delta ^2}\) and \({P}_{u}[n]\) are the Bandwidth between AP and UAV, noise power and transmitting power from the AP to the u-th UAV, respectively.

From Eq. (15), we can see that we should prioritize demodulating the UAV with the worst channel gain and then remove it from the superimposed signals. Because its assigned power is the largest, it causes more interference to other UAVs. At this point, we considered the signals from other UAVs to be interfering with our signals. Then, the UAV with the second lowest channel gain is demodulated and removed from the superimposed signal. This process is repeated until all UAVs’ data has been demodulated.

The total transmit power of the AP is \(P_{ap}\). The sum of the power allocated by the AP to the UAVs in each time slot should be equal to its total power, and the power allocated to each UAV should not exceed its total power.

$$\begin{aligned}{} & {} {\sum \limits _{u = 1}^U {{P_u}[n]} \le {P_{ap}}}\quad {\forall n \in \mathcal {N}} \end{aligned}$$
(16)
$$\begin{aligned}{} & {} {0 \le {P_u}[n] \le P_{ap}}\quad {\forall n \in N,u \in \mathcal {U}} \end{aligned}$$
(17)

The size of the data volume sent by the u-th UAV to the k-th IoTD in the n-th time slot is

$$\begin{aligned} \begin{aligned} {D_{uk}}[n] =&\log _2\left( 1 + \frac{{{P_{uav}}{h_{uk}}[n]}}{{{\delta ^2} + \sum \limits _{j=1,j \ne u }^U {{P_{uav}}{h_{jk}}[n]} }}\right) \\&\times {a_{uk}}[n]B_i {t_u}[n] \end{aligned} \end{aligned}$$
(18)

where, \(P_{uav}\) indicates the transmitting power of the UAV. \(B_i\) is the bandwidth between the UAV and the IoTD.

Meanwhile, the amount of data forwarded by the UAV to the IoTD at each time slot cannot exceed the amount received from the AP at that same time slot.

$$\begin{aligned} {{D_{au}}[n] \ge {D_{uk}}[n]}\quad n \in \mathcal {N} \end{aligned}$$
(19)

The average receiving rate of IoTD k during the entire duty cycle is the total data volume divided by the total time.

$$\begin{aligned} {R_k} = \frac{1}{{Nt}} {\sum \limits _{u=1}^U \sum \limits _{n=1}^N {{D_{uk}}[n]} } \end{aligned}$$
(20)

We assumed that a UAV charges IoTD with a constant power \(P_{c}\) before transmiting data to the connect IoTD. So the energy collected by the IoTD during the n-th slot can be written as

$$\begin{aligned} {{E_k}[n]= {\varepsilon {P_{c}}a_{uk}[n]{h_{uk}}[n]{t_c}[n]}} \end{aligned}$$
(21)

where \(\varepsilon \) indicates the energy conversion efficiency, which is restricted to (0, 1]. To ensure that IoTDs have enough power to receive data transmitted from UAVs. We required that the energy received by the IoTD at this time slot is greater than the energy consumed by it to receive the data.

$$\begin{aligned} {{{E_k}} [n] \ge a_{uk}[n] {{P_{iotd}}} {t_u}[n] \quad \forall k \in {\mathcal {K},} n \in {\mathcal {N}}, u \in {\mathcal {U}}} \end{aligned}$$
(22)

where \({P_{iotd}}\) is the power of IoTDs when receiving data.

3.2 Problem formulation

Our optimization variables are connection scheduling \({{\varvec{A}}}= \left\{ {a}_{uk}[n], \,\forall k \in \mathcal {K},u \in \mathcal {U},n \in \mathcal {N} \right\} \), UAV’s data receiving rate time \({{\varvec{t}}}_{{\varvec{u}}}=\left\{ {t}_{u}[n], \,n \in \mathcal {N} \right\} \), UAV’s data forwarding time \({{\varvec{t}}}_{{\varvec{d}}}=\left\{ {t}_{d}[n], \,n \in \mathcal {N} \right\} \), UAV’s charging time \({{\varvec{t}}}_{{\varvec{c}}}=\left\{ {t}_{c}[n], \,n \in \mathcal {N} \right\} \), transmitting power of AP \({{\varvec{P}}}=\left\{ {P}_{u}[n], \,n \in \mathcal {N},\,u \in \mathcal {U} \right\} \) and UAV’s flight trajectory \({{\varvec{Q}}} =\left\{ {q}_{u}[n], \,n \in \mathcal {N},\,u \in \mathcal {U} \right\} \). Our object is to maximize the one with the lowest average receiving rate among all IoTDs by optimizing the variables \({{\varvec{A}}}\), \({{\varvec{t}}}_u\), \({{\varvec{t}}}_d\), \({{\varvec{t}}}_c\), \({{\varvec{P}}}\) and \({{\varvec{Q}}}\). For simplicity, we introduced the variable \(\textrm{Z} = \min {R_k}, {k \in \mathcal {K}}\). So, the optimization problem can be formulated as

$$\begin{aligned} \mathbf {(P1):}\nonumber \\&{\mathop {\max }\limits _{A,{t_{u,}}{t_d},{t_c},Q,\textrm{Z},\textrm{P}} }\quad {{\textrm{Z}}} \end{aligned}$$
(23a)
$$\begin{aligned} s.t.\quad&{\mathrm{R_k}} \ge {Z}\quad \forall k \in \mathcal {K} \end{aligned}$$
(23b)
$$\begin{aligned}&{{{E_k}} [n] \ge a_{uk}[n] {{P_{iotd}}} {t_u}[n] \quad \forall k \in \mathcal {K}, n \in \mathcal {N},u \in \mathcal {U}} \end{aligned}$$
(23c)
$$\begin{aligned}&{{D_{au}}[n] \ge {D_{uk}}[n]}\quad n \in \mathcal {N},u \in \mathcal {U},k \in \mathcal {K} \end{aligned}$$
(23d)
$$\begin{aligned}&{{q_u}[1] = {q_u}[n]}\quad {\forall u}\in \mathcal {U} \end{aligned}$$
(23e)
$$\begin{aligned}&{\sum \limits _{k = 1}^K {{a_{uk}}[n]} = 1}\quad {\forall n} \in \mathcal {N}, {u \in \mathcal {U}} \end{aligned}$$
(23f)
$$\begin{aligned}&{\sum \limits _{u = 1}^U {{a_{uk}}[n]} = 1}\quad {\forall n} \in \mathcal {N}, {k \in \mathcal {K}} \end{aligned}$$
(23g)
$$\begin{aligned}&{{a_{uk}}[n] \in \{ 0,1\} }\quad {\forall k \in \mathcal {K} ,u \in \mathcal {U},n \in \mathcal {N}} \end{aligned}$$
(23h)
$$\begin{aligned}&{0 \le {t_u}[n] \le t,0 \le {t_d}[n] \le t,0 \le {t_c}[n] \le t}\quad {\forall n}{\in \mathcal {N}} \end{aligned}$$
(23i)
$$\begin{aligned}&{{t_d}[n] + {t_u}[n] + {t_c}[n] = t}\quad {\forall n} \in \mathcal {N} \end{aligned}$$
(23j)
$$\begin{aligned}&\parallel {q_u}[n + 1] - {q_u}[n]{\parallel ^2} \le {({V_{\max }}t)^2}\quad {\forall u\in \mathcal {U}, n \in \mathcal {N}} \end{aligned}$$
(23k)
$$\begin{aligned}&\parallel {q_j}[n] - {q_k}[n]{\parallel ^2} \ge {({d_{\min }})^2}\quad {\forall j,k}\in \mathcal {U}\ , j \ne k \end{aligned}$$
(23l)
$$\begin{aligned}&{\sum \limits _{u = 1}^U {{P_u}[n]} \le {P_{ap}}}\quad {\forall n \in \mathcal {N}} \end{aligned}$$
(23m)
$$\begin{aligned}&{0 \le {P_u}[n] \le P_{ap}}\quad {\forall n \in N,u \in \mathcal {U}} \end{aligned}$$
(23n)
$$\begin{aligned}&P_{ap}>{P}_{1}[n]> {P}_{2}[n] ...> {P}_{U}[n]\ge 0 \quad {\forall n \in \mathcal {N} } \end{aligned}$$
(23o)

(P1) is a MINLP, NP-hard problem, then we will decompose it into some subproblems and use the BCD method to solve them.

4 Problem solving

4.1 Connection scheduling optimization

To optimize \({\varvec{A}}\) with fixed \({\varvec{t}}_u\), \({\varvec{t}}_d\), \({\varvec{t}}_c\), \({\varvec{Q}}\) and \({\varvec{P}}\), the objective function and the related constraints can be written as

$$\begin{aligned} \mathbf {(P2):}\nonumber \\&{\mathop {\max }\limits _{A,\textrm{Z}} }\quad {{\textrm{Z}}} \end{aligned}$$
(24a)
$$\begin{aligned} s.t.\quad&\text {(23b)}-\text {(23d)}, \text {(23f)}-\text {(23h)} \end{aligned}$$
(24b)

Since \({{a_{uk}}[n]}\) is a binary decision variable. Problem (P2) is a mixed integer programming problem, it is difficult to solve it directly. However, we can define the variable return values as binary variables and solve them with the Moesk solver. The Moesk solver in CVX can solve mixed integer programming problems based on convex optimization algorithms and exhaustive search (such as branch and bound algorithms). Related applications of the solution can be found in the paper in Wang et al. (2020b)

4.2 Time slot allocation optimization

To optimize \({\varvec{t}}_u\), \({\varvec{t}}_d\) and \({\varvec{t}}_c\) with fixed \({\varvec{A}}\), \({\varvec{Q}}\), and \({\varvec{P}}\), the objective function and the associated constraints can be written as

$$\begin{aligned} \mathbf {(P3):}\nonumber \\&{\mathop {\max }\limits _{{t_{u,}}{t_d},{t_c},\textrm{Z}} }\quad {{\textrm{Z}}} \end{aligned}$$
(25a)
$$\begin{aligned} s.t.\quad&\text {(23b)}-\text {(23d)}, \text {(23i)}-\text {(23j)} \end{aligned}$$
(25b)

It is observed that the objective function and the constraints (25a)–(25b) are linear, then we can solve (P3) by CVX.

4.3 UAVs’ trajectory optimization

To optimize \({\varvec{Q}}\) with fixed \({\varvec{t}}_u\), \({\varvec{t}}_d\), \({\varvec{t}}_c\), \({\varvec{A}}\) and \({\varvec{P}}\), the objective function and the associated constraints can be written a

$$\begin{aligned} \mathbf {(P4):}\nonumber \\&{\mathop {\max }\limits _{Q,\textrm{Z}} }\quad {{\textrm{Z}}} \end{aligned}$$
(26a)
$$\begin{aligned} s.t.\quad&\text {(23b)}-\text {(23e)}, \text {(23k)}-\text {(23l)} \end{aligned}$$
(26b)

Although the constraint (23k) is linear with respect to the variable \({\varvec{Q}}\), the presence of the objective functions and constraints (23b)–(23d) and (23l) results in the problem remaining a complex nonconvex problem.

Since equations (23b)–(23d) contain multi-UAV trajectory variables that are coupled with each other, solving them directly is extremely challenging. Therefore, we adopted the BCD method to solve multi-UAV trajectories. We assigned an initial trajectory to each UAV, optimize the trajectory of one UAV while keeping the trajectories of other UAVs fixed, and update this UAV’s trajectory. In this way, each UAV trajectory is optimized. The u-th UAV’s optimization problem can be rewritten as follows.

$$\begin{aligned} \mathbf {(P4.1):}\nonumber \\&{\mathop {\max }\limits _{Q_u,\textrm{Z}} }\quad {{\textrm{Z}}} \end{aligned}$$
(27a)
$$\begin{aligned} s.t.\quad&\text {(23b)}-\text {(23e)}, \text {(23k)}-\text {(23l)} \end{aligned}$$
(27b)

We noted that \({\mathrm{R_k}}\) is convex with respect to the variable \(\parallel {q_u}[n] - {w_k}[n]{\parallel ^2}\), which can be solved by successive convex optimization techniques. In each iteration, we used the Taylor series expansion of \({\mathrm{R_k}}\) to replace itself and obtain an approximate optimal solution. \(\parallel {q_u^{(l)}}[n] - {w_k}[n]{\parallel ^2}\) represents the Taylor series expansion points of the l-th iteration. \({\mathrm{R_k}}\) in each time slot can be replaced by its lower bound, defined as

$$\begin{aligned} \begin{array}{*{20}{l}} \mathrm{R_k^{lb}}= \frac{1}{{Nt}}\sum \limits _{u=1}^U {\sum \limits _{n=1}^N {B{a_{uk}}[n]L_{uk}^{lb}[n]{t_u}[n]} } \end{array} \end{aligned}$$
(28)

To simplify the formula we replaced the constant \(\parallel {q_u^{(l)}}[n] - {w_k}[n]{\parallel ^2}\) in the Taylor expansion with \(\psi \).

$$\begin{aligned}{} & {} L_{uk}^{lb}[n] = lo{g_2}\left( 1 + \frac{{F_{uk}^{(l)}[n]}}{\psi } + {H^2}\right) \nonumber \\{} & {} \qquad - C_{uk}^{lb}[n](\parallel {q_u}[n] - {w_k}[n]{\parallel ^2} - \psi )\nonumber \\{} & {} \quad \le {\log _2}\left( 1 + \frac{{{P_{uav}}{h_{uk}}[n]}}{{{\delta ^2} + \sum \limits _{j = 1,j \ne u}^U {{P_{uav}}{h_{jk}}[n]} }}\right) \end{aligned}$$
(29)

where

$$\begin{aligned} F_{uk}^{(l)}[n]= & {} \frac{{{P_{uav}}{\beta _0}}}{{{\delta ^2} + \sum \limits _{j = 1,j \ne u}^U {{P_{uav}}{h_{jk}}[n]} }}\end{aligned}$$
(30)
$$\begin{aligned} C_{uk}^{(l)}[n]= & {} - \frac{log_2(e){F_{uk}^{(l)}[n]}}{{{{({H^2} + \psi )}^2} + F_{uk}^{(l)}[n]{H^2} + F_{uk}^{(l)}[n] \psi }} \end{aligned}$$
(31)

It is noted that \(\parallel {q_u}[n] - {w_k}[n]{\parallel ^2}\) is a convex function with respect to \(q_u[n]\), so \({\textrm{R}^{lb}}\) is also convex with respect to \(q_u[n]\). Then constraint (23b) is transformed to convex constraint.

It is observed that \({E_k}\)[n] is convex with respect to \(\parallel q_{u}[n] - {w_k}[n]{\parallel ^2}\), so \({E_k}\)[n] can obtain its lower bound \({E_k^{lb}}\)[n] by Taylor series expansion to obtain an approximate optimal solution

$$\begin{aligned} E_k^{lb}[n]= & {} \frac{{\varepsilon {a_{uk}}[n]{P_c}[n]{t_c}[n]{\beta _0}}}{{{H^2} + \psi }}\nonumber \\{} & {} - \left[ \begin{array}{l}(\parallel q_u^{}[n] - {w_k}{\parallel ^2} - \psi )\\ \times \frac{{{{\log }_2}(e)\varepsilon {a_{uk}}[n]{P_c}[n]{t_c}[n]{\beta _0}}}{{{{({H^2} + \psi )}^2}}} \end{array} \right] \end{aligned}$$
(32)
$$\begin{aligned} E_k^{lb}[n]\ge & {} a_{uk}[n]{{P_{iotd}}} {t_u}[n] \end{aligned}$$
(33)

Then constraint (23c) is converted to convex constraint.

For the left-hand side of the constraint (23d) we can obtain its lower bound by Taylor series expansion, and for the right-hand side of the inequality we introduced a relaxation variable to obtain its upper bound. To simplify the formula we replaced the constant \(\parallel q_u^{(l)}[n] - {w_m}[n]{\parallel ^2}\) in the Taylor expansion with \(\rho \), and we have

$$\begin{aligned} \begin{array}{*{20}{c}} {D_{au}^{lb}[n] \ge D_{uk}^{ub}[n]}&{n \in \mathcal {N}} \end{array} \end{aligned}$$
(34)

where

$$\begin{aligned}{} & {} D_{au}^{lb}[n] = B_u{\log _2}\left( 1 + \frac{{F_{au}^{(l)}[n]}}{{\rho + {H^2}}}\right) \nonumber \\{} & {} \qquad - C_{au}^{(l)}[n](\parallel q_u^{}[n] - {w_m}[n]{\parallel ^2} - \rho )\nonumber \\{} & {} \quad \le B_u\log _2\left( 1 + \frac{{{P_u}[n]{h_{au}}[n]}}{{{\delta ^2} + \sum \limits _{j = u + 1}^U {{P_j}[n]{h_{ju}}[n]}}}\right) {t_d}[n]\nonumber \\{} & {} \quad = {D_{au}}[n] \end{aligned}$$
(35)
$$\begin{aligned}{} & {} D_{uk}^{ub}[n] = {a_{uk}}[n]B_i\log _2\left( 1 + \frac{{{P_{uav}}\frac{{{\beta _0}}}{{{H^2} + {\theta _{u,k}}[n]}}}}{{{\delta ^2} + \sum \limits _{j = 1,j \ne u}^U {{P_{uav}}{h_{jk}}[n]}}}\right) {t_u}[n]\nonumber \\{} & {} \quad \ge {a_{uk}}[n]B_i\log 2\left( 1 + \frac{{{P_{uav}}\frac{{{\beta _0}}}{{{H^2} + \parallel q_u^{}[n] - {w_k}[n]{\parallel ^2}}}}}{{{\delta ^2} + \sum \limits _{j = 1,j \ne u}^U {{P_{uav}}{h_{jk}}[n]} }}\right) {t_u}[n]\nonumber \\{} & {} \quad = D_{uk}^{}[n] \end{aligned}$$
(36)

where, \({{\theta _{u,k}}[n]}\) is the slack variable we introduced to make the right-hand side of the constrained (23d) inequality convex obeys the following constraint.

$$\begin{aligned} \begin{array}{*{20}{c}} { {\theta _{u,k}}[n] \le \parallel q_u^{(l)}[n] - {w_k}[n]{\parallel ^2}}&{\forall u \in \mathcal {U},k \in \mathcal {K},n \in \mathcal {N}} \end{array} \end{aligned}$$
(37)

Adopting slack variables does not cause the original problem to lose its optimal solution because the right-hand sides of (23d) and (36) are equivalent when (37) is set to the equal sign. If not, the value of \({\theta _{u,k}}[n]\) can be gradually decreased to obtain an upper bound for \(D_{uk}^{ub}[n]\). The constraint (37) leads to a problem that is not yet a standard convex optimization problem. To address this, we converted (37) into a linear constraint by performing a Taylor series expansion.

$$\begin{aligned}{} & {} \parallel q_u^{(l)}[n] - {w_k}[n]{\parallel ^2} + 2(q_{_u}^{(l)}[n] - {w_k})(q_u^{}[n] - w_{_k}^{(l)}[n])\nonumber \\{} & {} \quad \ge {\theta _{u,k}}[n] n \in \mathcal {N},u \in \mathcal {U},k \in K \end{aligned}$$
(38)

As for (23l), it can be used continuous convex optimization techniques to transform it into a linear constraint.

$$\begin{aligned}{} & {} -\parallel q_u^{(l)}[n] - {q_j}[n]{\parallel ^2} + 2{(q_{_u}^{(l)}[n] - q_j^{(l)}[n])^T}(q_u^{}[n] - {q_j}[n])\nonumber \\{} & {} \quad \ge d_{\min }^2 n \in \mathcal {N},u \in \mathcal {U},j \in \mathcal {U},j \ne u \end{aligned}$$
(39)

Through the above series of transformations. The original problem can be reformulated as

$$\begin{aligned} \mathbf {(P4.2):} \nonumber \\&{\mathop {\max }\limits _{Q_u,\theta {u},Z} }\quad {\textrm{Z}^{}} \end{aligned}$$
(40a)
$$\begin{aligned} s.t.\quad&\mathrm R_k^{lb} \ge {Z}\quad \forall k \in \mathcal {K} \end{aligned}$$
(40b)
$$\begin{aligned}&E_k^{lb} \ge {E_0}\quad \forall u \in \mathcal {U} \end{aligned}$$
(40c)
$$\begin{aligned}&{{D_{au}^{lb}}[n] \ge {D_{uk}^{ub}}[n]}\quad {n \in \mathcal {N}} \end{aligned}$$
(40d)
$$\begin{aligned}&\text {(23e)}, \text {(23k)} \end{aligned}$$
(40e)
$$\begin{aligned}&\text {(38)}-\text {(40)} \end{aligned}$$
(40f)

It can be seen problem (P4.2) has been transformed into a standard convex optimization problem that can be solved by CVX.

4.4 AP’s power distribution

To optimize \({\varvec{P}}\) with fixed \({\varvec{t}}_u\), \({\varvec{t}}_d\), \({\varvec{t}}_c\), \({\varvec{A}}\) and \({\varvec{Q}}\), the objective function and the associated constraints can be written as

$$\begin{aligned} \mathbf {(P5):}\nonumber \\&{\mathop {\max }\limits _{P,\textrm{Z}} }\quad {{\textrm{Z}}} \end{aligned}$$
(41a)
$$\begin{aligned} s.t.\quad&\text {(23d)}, \text {(23m)}-\text {(23o)} \end{aligned}$$
(41b)

The theoretical transmission rate sent by AP to the u-th UAV at the n-th time slot is calculated as

$$\begin{aligned} {R_u}[n] = B_ulo{g_2}\left( 1 + \frac{{{P_u}[n]{h_{au}[n]}}}{{{\delta ^2} + \sum \limits _{j = u + 1}^U {{P_j}[n]{h_{aj}[n]}} }}\right) \end{aligned}$$
(42)

We can see that the transmission rate between AP and UAV is affected by the AP power allocation. So, we can improve its transmission rate by optimizing the power allocation, which will further effect the boundaries of constraints in (23d). Specifically, We can see from Fig. 3 that due to the increase of the rate from APs to UAVs, the time \(t_d\) spent on transmitting data decreases, which leads us to have more time \(t_u\) allocated for UAVs to forward the data to IoTDs. Therefore, \(D_{uk}\) will be improved further leading to the improvement of the objective function.

Fig. 3
figure 3

Problem P5 conversion

Since the objective function does not contain the variable \({\varvec{P}}\), and in order to maximize the transmission rate from the AP to the UAV to allow the UAV have more time \(t_u\) to transmit data to the IoTDs, and thus to maximize the objective function \({\varvec{Z}}\) in problem (P5). We formulated the following problem concerning the maximization of the sum of the transmission rates from the AP to the UAV. The specific optimization objective and constraints can be written as

$$\begin{aligned} \mathbf {(P5.1):}\nonumber \\&{\mathop {\textrm{max}}\limits _{P[n]}}\quad {\sum _{u=1}^{U}{R}_{u}\left[ n\right] } \quad n \in \mathcal {N} \end{aligned}$$
(43a)
$$\begin{aligned} s.t.\quad&\text {(23d)}, \text {(23m)}-\text {(23o)} \end{aligned}$$
(43b)

The object function and constraints (23d) are nonconvex. We firstly splited the expression in (23d) containing the variable \({\varvec{P}}\) into the difference of two concave functions. The process is as follows

$$\begin{aligned}{} & {} {\log _2}\left( 1 + \frac{{{P_u}[n]{h_{au}}[n]}}{{{\delta ^2} + \sum \limits _{j = u + 1}^U {{P_j}[n]{h_{aj}}[n]} }}\right) \nonumber \\{} & {} \quad = {\log _2}\left( {\delta ^2} + \sum \limits _{i = u}^U {{P_i}[n]{h_{ai}}[n]} \right) \nonumber \\{} & {} \qquad - {\log _2}\left( {\delta ^2} + \sum \limits _{j = u + 1}^U {{P_j}[n]{h_{aj}}[n]} \right) \end{aligned}$$
(44)

To further convert (44) to convex, we use SCA to replace the second half in (44) with its Taylor series expansion. The derivation process is as follows

$$\begin{aligned}{} & {} G_{aj}^{lb}[n] = {\log _2} \left( {\delta ^2} + \sum \limits _{j = u + 1}^U {P_j^{(l)}[n]{h_{aj}}[n]}\right) \nonumber \\{} & {} \qquad + (P_j^{}[n] - P_j^{(l)}[n])\frac{{\sum \limits _{j = u + 1}^U {{h_{aj}}[n]} }}{{{\delta ^2} + \sum \limits _{j = u + 1}^U {P_j^{(l)}[n]{h_{aj}}[n]} }} \nonumber \\{} & {} \quad \le {\log _2}\left( {\delta ^2} + \sum \limits _{j = u + 1}^U {{P_j}[n]{h_{aj}}[n]}\right) \end{aligned}$$
(45)

Then we can obtain a lower bound on the transmission rate of the UAV.

$$\begin{aligned} R_u^{lb}[n] = {B_u}\left( {\log _2}\left( {\delta ^2} + \sum \limits _{i = u}^U {{P_i}[n]{h_{ai}}[n]} \right) - G_{aj}^{lb}[n]\right) \end{aligned}$$
(46)

And problem (P5.1) is rewritten as

$$\begin{aligned} \mathbf {(P5.2):}\nonumber \\&{\mathop {\textrm{max}}\limits _{P[n]}}\quad {\sum _{u=1}^{U}{R}_{u}^{lb} \left[ n\right] } \quad n \in \mathcal {N} \end{aligned}$$
(47a)
$$\begin{aligned} s.t.\quad&{R}_{u}^{lb}{t_d}[n] \ge D_{uk}[n]\quad n \in \mathcal {N} \end{aligned}$$
(47b)
$$\begin{aligned}&\text {(23m)}-\text {(23o)} \end{aligned}$$
(47c)

Since the problem (P5.2) is a convex problem, we can obtain an approximately optimal solution to the original problem by solving it with the CVX solver.

4.5 Overrall algorithm

In this section, we proposed an overall iterative algorithm, as shown in Algorithm 1. We optimized variables \({\varvec{A}}\), \({\varvec{U}}\), \({\varvec{t}}_u\); \({\varvec{t}}_d\); \({\varvec{t}}_c\) and \({\varvec{P}}\) by solving subproblems (P2), (P3), (P4.2) and (P5.2). Among them, (P4.2) and (P5.2) are approximately optimal solutions due to the continuous convex approximation technique. Therefore what we get in Algorithm 1 is an approximately optimal solution at least.

Algorithm 1
figure a

: Iterative Alternating Algorithm

dummy

4.6 Complexity and convergence

4.6.1 Complexity analysis

Since the CVX solver is based on the interior point method, its complexity is \(O(n^{3.5}\log (1/\varepsilon ))\), where n represents the number of variables and \(\varepsilon \) represents the target accuracy. Therefore, the complexity of steps 3, 4, (5–7), and 8 are as follows

$$\begin{aligned} L1= & {} O((NK)^{3.5}\log (1/\varepsilon )) \\ L2= & {} O((3N)^{3.5}\log (1/\varepsilon )) \\ L3= & {} O((NU)^{3.5}\log (1/\varepsilon )) \\ L4= & {} O(N(U)^{3.5}\log (1/\varepsilon )) \end{aligned}$$

The overall complexity of the final algorithm can be represented as \(O(l\times (L1+L2+L3+L4))\). where l represents the total number of iterations of the algorithm.

4.6.2 Convergence analysis

The value of the objective function is defined as Z. To simplify the expression, we denote the three optimization variables \(t_u\),\(t_d\) and \(t_c\) by \(T_s\).

$$\begin{aligned}{} & {} Z({A^l},{T_s^l},{Q^l},{P^l})\nonumber \\{} & {} \quad \mathop \le \limits ^{(a)} Z({A^{l + 1}},{T_s^l},{Q^l},{P^l})\nonumber \\{} & {} \quad \mathop \le \limits ^{(b)} Z({A^{l + 1}},{T_s^{l + 1}},{Q^l},{P^l})\nonumber \\{} & {} \quad \mathop \le \limits ^{(c)} Z({A^{l + 1}},{T_s^{l + 1}},{Q^{l + 1}},{P^l})\nonumber \\{} & {} \quad \mathop \le \limits ^{(d)} Z({A^{l + 1}},{T_s^{l + 1}},{Q^{l + 1}},{P^{l + 1}}) \end{aligned}$$
(48)

Firstly, we analyzed the iterative process in a round. Since all our subproblems (P2), (P3), (P4.2), and (P5.2) already satisfy the standard convex problem. Therefore, during the l-th round, the solution of each subproblem leads to a gradual convergence of the objective function, which means that the inequalities (a), (b), (c) and (d) hold.

In order to analyze the convergence between the l-th and the (l+1)-th round, we further denote the optimized results for these two rounds as \(Z^{(l)}\) and \(Z^{(l + 1)}\) respectively. Actually, the \(Z^{(l)}\) equals to \(Z({A^l},{T_s^l},{Q^l},{P^l})\), and \(Z^{(l + 1)}\) equals to \( Z({A^{l + 1}},{T_s^{l + 1}},{Q^{l + 1}},{P^{l + 1}})\) in (48). According to the inequalities (a), (b), (c) and (d), we know that \(Z^{(l)} \le Z^{(l + 1)}\), which means the objective function Z converges between any two rounds. When the difference between any two objective values of adjacent rounds is less than a threshold, the algorithm completes convergence.

5 Numerical results

In this section, we conducted a comprehensive analysis of numerical results to verify the effectiveness of the algorithm. Our system consists of M = 2 UAVs, K = 10 IoTDs and an AP. we assumed that all UAVs fly at an altitude of H = 5 m and all IoTDs are randomly distributed in a horizontal area of 200 m \(\times \) 200 m. For detailed parameter settings we referred to Wang et al. (2020b) and Xu et al. (2018), as shown in Table 1.

Table 1 Parameters settings
Fig. 4
figure 4

The convergence of proposed algorithm

Firstly, Fig. 3 verifies the convergence of our algorithm. It can be seen that the objective function does not increase after several iterations. This indicates the high efficiency of our algorithm. Figure 5 provides a comparison between our optimized trajectory and the initial trajectory. By visualizing these trajectories, we can evaluate the effectiveness of our algorithm in improving the trajectory planning. It is worth noting that when designing the initial trajectory, several aspects need to be considered. Firstly, the initial trajectory should be as simple as possible and cover most IoTDs. Additionally, we need to ensure that the initial trajectory satisfies our collision prevention constraint. Therefore, the initial trajectories of UAV 1 and UAV 2 have the center coordinates (50, 100) and (140, 90) respectively, and the radius of the trajectory circle is set to 45 m. At the same time, we initialized the power allocation of the AP based on the initial trajectory. We initialized 12W and 8W to the UAVs with poor and good channel gain for each time slot, respectively. The optimized trajectory shows that the UAV will be as close as possible to the served IoTDs to obtain a higher channel gain, which will also increase the transmission rate. Figure 5 shows the comparison between the initial and optimized trajectories of the UAV, and it can be seen that UAVs trajectory is optimized to be closer to IoTDs, which is to get a better channel to improve the transmission rate.

Fig. 5
figure 5

Initial and optimized trajectory of UAVs

Figure 6 shows a comparison of the average receiving rates of the different IoTDs in the initial and optimized trajectories. From Fig. 6, it is evident that optimizing the flight trajectory of the UAV results in a significant improvement in the transmission rate. The improvement of IoTD1, IoTD3, and IoTD9 is more noticeable. This is because they are further away from the initial trajectory.

Fig. 6
figure 6

IoTDs receiving rates for initial and optimized trajectories

Figure 7 illustrates the correlation between the speed of the UAV and the variation in time gap. From the data in the figure we can get that UAV 1 will reduce its speed when approaching the IoTD to get a better channel gain and then has traveled faster to the next IoTD.

Fig. 7
figure 7

UAVs flight speed

To evaluate the performance of our algorithm, we optimized \({\varvec{P}}\) and \({\varvec{A}}\) by different methods, respectively. For AP power allocation, we firstly adopted two fixed allocation algorithms, one is to allocate to strong IoTD and weak IoTD according to 20\(\%\) and 80\(\%\) of the total power. this allocation algorithm is defined as “FP1”. The other allocation method is 40\(\%\) and 60\(\%\), defined as “FP2”. In addition, we used a global search method that lists all power allocations with an accuracy of 0.001W, following the NOMA power allocation principle, which is named ’GS’ algorithm. Our algorithm is named the “ICOS” algorithm. Figure 8a, b show the variation of the objective function for different settings of the number of IoTDs and the total AP power, respectively. It can be observed that the objective function decreases as the number of users increases. This is because the number of time slots allocated to each user decreases in each cycle. In addition, increasing the total power of the AP will enhance the transmission rate from the AP to the UAV, thereby further improving the transmission rate from the UAV to the IoTDs. The figure demonstrates that our algorithm surpasses the FP algorithm and is closed to the GS algorithm. However, the GS algorithm takes more time to sample, which we can see from Table 2 that the runtime of the GS algorithm is higher than that of ICOS. Figure 9 shows the power allocated to different UAVs by our power allocation algorithm at each time slot.

Fig. 8
figure 8

Comparison of power distribution algorithms

Table 2 Algorithm Runtime
Fig. 9
figure 9

Power Distribution

For the optimization of connection scheduling, our algorithm is compared with two other methods. One is a random connection(RC), in which the UAV selects a random IoTDs connection at each time slot, and the other is the closest connection(CC), where the UAV selects the closest IoTD to communicate with at each time slot. Figure 10a, b show the variation of the objective function for different settings of the maximum flight speed and the number of IoTDs, respectively. We can learn from the figure that the RC connection algorithm has the worst performance because of its stochastic nature. the CC algorithm is close to our performance, but since our optimization objective is to maximize the minimum average receiving rate of IoTDs, the CC algorithm may result in some of the IoTDs that are far away from the UAV with less number of connections not being able to obtain the optimal solution.

Fig. 10
figure 10

Comparison of connection selection algorithms

To verify the performance of NOMA and SIC technologies, we compared them with conventional OFDMA technologies. We splited the bandwidth and power equally to each UAV. Figure 11 compares the sum of the transmission rates of the UAVs at each time slot for OFDMA and NOMA. It can be seen that NOMA and SIC technologies have better transmission rates compared to traditional OFDMA.

Fig. 11
figure 11

Comparison of OFDMA and NOMA

Figure 12 shows the performance of the algorithm for different maximum flight speeds and total time T. It can be observed that as the maximum \({\varvec{V}}_\textrm{max}\) increases, there is a slight increase in the objective function. This is because the UAV takes less time to fly from the previous IoTD to the next IoTD, resulting in a longer time around the IoTD to obtain a better channel to transmit data, which in turn improves the objective function. Also, it is clearly observed that as the total time increases, the optimization objective also increases. This is attributed to the fact that when the T is large enough, the percentage of UAV flight time will be small, and the UAVs will spend more time around IoTDs to get a more efficient transfer rate.

Fig. 12
figure 12

Receiving rate VS maximum speeds and number of time slots

Figure 13 shows a comparison of the optimization objectives of the UAV at different flight altitudes and transmission power. From the figures, it can be seen that the objective function increases with increasing transmission power. This is because a higher transmission power results in a larger Signal to Interference plus Noise Ratio (SINR), which in turn leads to a higher transmission rate. In addition, as the UAV’s altitude increases, the optimization objective decreases due to a decrease in channel gain and transmission rate.

Fig. 13
figure 13

Receiving rate VS transmission power and flight altitude

6 Conclution

In this paper, we proposed a relay system consisting of an AP and multiple UAVs. The AP is responsible for sending data to the UAVs, and the UAVs assist in forwarding data to the IoTDs and charging them to ensure proper data receiving. We set the optimization goal of maximizing the minimum receiving rate among all IoTDs and utilized NOMA and SIC techniques at the AP side to enhance the receiving rate. The system model is formulated as a nonlinear mixed-integer programming problem which can be further decomposed into subproblems by using the BCD method. For the nonconvex constraints in the subproblem, we used convex optimization methods such as successive convex approximation and relaxation variables and transform them into convex constraints to obtain an approximate optimal solution. Finally, we proposed an overall iterative algorithm. In the simulation results, we demonstrated the convergence of the algorithm and compared it with other benchmark algorithms. In addition, we also compared the effects of different parameters on our optimization objectives, such as the maximum flight speed of the UAV, the flight altitude and the number of IoTDs, etc. In future research work, we will further increase the number of UAVs to cope with huge number of IoTDs and use the reinforcement learning to address this large-scale MEC related problem.