# Cluster Design and Optimization of SWIPT-Based MEC Networks with UAV Assistance

Authors: Xuefei E; Zhonggui Ma; JunFeng Huang
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

In recent years, service isolation and service miniaturization have become very popular. The large services are dismantled into multiple low-cost and simple small services to improve the scalability and disaster tolerance of the entire services. A service network composed of unmanned aerial vehicles (UAVs) and MEC servers is proposed in this paper, which aims at decoupling multiple services of the SWIPT-MEC network. In this network, UAVs take charge of energy transmission and calculation task scheduling and MEC servers are focused on task calculation. To meet the resource requirements of the ground nodes (GNs) in the network, we designed a distributed iterative algorithm to solve the resource allocation decision problem of GNs and used the modified expert bat algorithm to complete the UAV’s trajectory planning in a two-dimensional space. The results show that the algorithm can formulate a more fair resource allocation strategy, and its performance is improved by 7% compared with the traditional bat algorithm. In addition, the algorithm in this paper can also adapt to changes in task length and has a certain degree of stability.


---

## Body

## 1. Introduction

In the past few decades, the Internet of things (IoT) technology has attracted widespread attention from the academic and commercial circles [1, 2]. It is worth mentioning that the communication technology in IoT is one of the current research hotspots [3]. Generally, devices in IoT have low computing ability and energy storage. Most of them cannot perform high-intensity calculations without external auxiliary equipment [4]. Meanwhile, these devices do not have enough energy to undertake the massive data interaction requirements in the intelligent age [5].Cisco estimates that in 2023, at least 8.7 billion communication devices are connected to the 5G networks [6]. In addition, the data transmission rate in the 5G networks can reach up to 10 Gb/s and the transmission success rate can be maintained at 99.99999% [7]. To support all devices to enjoy real-time and high-throughput services, researchers and engineers proposed a simultaneous wireless information and power transfer- (SWIPT-) based mobile edge computing (MEC) networks.


## 2. Related Work

MEC was proposed by the European Telecommunications Standards Institute (ETSI) to improve the performance of cloud computing services. It has higher quality of service (QoS), lower cost delay, and faster calculation speed [8, 9]. Compared with mobile cloud computing (MCC), the signal transmission distance between the MEC server and the access device is shorter, which can effectively reduce the transmission energy consumption of the devices [10]. Unlike the uplink, the SWIPT technology allows the networks to return the calculation result and energy to the device simultaneously via the downlink. Furthermore, this technology can make up for the problem of excessive attenuation in traditional long-distance wireless power transfer (WPT) [11]. There are currently two mainstream SWIPT transmission modes: time switching (TS) and power switching (PS). Devices that use the TS mode must have a time-division receiver and those that use PS the mode must equip a frequency-division receiver [12]. Although the energy transmitted by the MEC server is sufficient for devices close to the base station (BS), it is unsatisfactory for devices that are always at the edge of the MEC service range. Due to insufficient power, the device will be unexpectedly out of service, which is fatal to human-embedded devices or safety detection devices. To make up for this shortcoming, some scholars proposed device-to-device (D2D) networks based on SWIPT [13–16]. This network allows devices with sufficient energy to transmit energy to insufficient ones. However, this method requires each device to be equipped with additional sending and receiving equipment, which causes unnecessary waste of funds. Therefore, it is necessary to design a network that can solve this problem in a low-cost way.In recent years, more and more scholars have begun to use unmanned aerial vehicles (UAVs) to assist communication [17–19]. Its unique advantages of cheapness and flexibility enable the networks to provide better services to devices at a very low cost. UAVs are divided into two types: fixed-wing UAVs and rotary-wing UAVs. With its vertical takeoff and hovering functions, many scholars have integrated rotary-wing UAVs into their research [20–22]. At the same time, the variability and flexibility of the rotary-wing UAV’s trajectory allows the networks to be applied to various scenarios with insufficient BSs (e.g., disaster areas, mountainous areas, and densely populated cities) [23]. Therefore, in this paper, we attempt to introduce a UAV into the SWIPT-based MEC networks of densely populated cities to improve the QoS of the networks and avoid waste of funds.Compared to fixed BSs, UAVs have a higher probability of establishing better quality communication links with ground nodes (GNs): line-of-sight (LOS) links [24]. Reference [25] assumes that the link between the UAV and GNs is LOS links and the UAV is equipped with a distributed charging device, which can charge multiple GNs at the same time. Both LOS and non-LOS (NLOS) links are considered in [26]. Moreover, the authors assume that a UAV works in urban areas and proposes a hybrid offline-online method to maximize the transmission rate of drones. Reference [27] improves the fading model of the LOS link, so that the model can more accurately express the link in the environment with large obstacles.The SWIPT-based MEC networks has two main services: computing services and energy services. In terms of computing services, a UAV can be used as a mobile MEC server to meet the computing needs of GNs. In [28], a rotary-wing UAV equipped with an MEC server is used to provide charging and computing services for GNs in a time-division multiple access (TDMA) mode. And the authors design the UAV flight trajectory to minimize the energy consumption of the UAV. Although reference [29] also regards a UAV as a mobile BS, it uses the OFDMA technology instead of the TDMA technology, so that each GN can simultaneously enjoy UAV services. Likewise, reference [30] uses the ant colony system (ACS) algorithm to design the trajectory of the rotary-wing UAV. It is undeniable that the service capability of the MEC server attached to the UAV is far from that installed on the base station. The idea of letting multiple UAVs cooperate to undertake the computing tasks of GNs was proposed by [31]. Due to not requiring BS, this method is indeed very suitable in the disaster area. But this method will inevitably cause waste of BSs already installed in each cities.In terms of energy services, a UAV can assist the SWIPT-based MEC networks by acting as a relay node. To overcome the huge fading problem with the target node, reference [32] proposes a method for a UAV to relay energy to bypass large obstacles. Reference [33] is to relay energy through the hovering UAV to reduce the overall energy consumption of the networks. However, this relay method will cause two consecutive attenuations, resulting in that the energy received by the GNs is much less than the energy emitted by the source. In [34–36], the self-collecting function is added to the UAV, so that it can supplement the energy that needs to be forwarded during the relay process, thereby indirectly increasing the energy received by the GNs. But this method is still based on the model of two consecutive attenuations and does not change the essence of the problem.In addition, although many of those papers mentioned above have studied the flight trajectory of UAVs, most of them assume that GNs are stationary. This is obviously not in line with the reality. Therefore, the SWIPT-based MEC networks in areas where communication is in malfunction in the city need a better solution to solve the shortage of computing services and energy services.A SWIPT-MEC service network is proposed in this paper that separates computing and energy services to solve the two service problems mentioned above. And GNs in this network are divided into three categories: vehicle-mounted equipment, human equipment, and household equipment, all of them moved randomly. We assume that GNs can sense the location of the UAV and actively initiate a connection. To solve the problem of time slot allocation and UAV flight trajectory, a distributed iterative algorithm and an expert bat algorithm are proposed. The solution can reuse a large number of MECs in the city, thereby saving improvement costs and making service points flexible. The specific contributions of this paper are as follows:(i)
Compared to the traditional MEC networks, a service cluster network composed of multiple UAVs and one MEC has been proposed in this paper. In order to make the MEC server focus on completing computing tasks, the network allows UAVs to schedule computing tasks and formulate energy distribution strategies. In addition, MEC uses the orthogonal frequency-division multiple access (OFDMA) technology to allocate the spectrum to the UAV, allowing it to communicate with GNs in the time-division multiple access (TDMA) mode through this spectrum(ii)
Since user information is frequently changed, if the networks apply a centralized algorithm, it will inevitably spend a lot of time to update the data. But the distributed algorithm cannot know global information. Therefore, this paper adopts a semidistributed algorithm and the UAV needs to forward environmental information in the area that it is responsible for. For each GN, the decision information of other GNs can be used as environmental information(iii)
In order to plan the UAV path more accurately, we use the bat algorithm to dynamically select the best location point within the maximum range of motion. According to the model in this paper, an elite bat colony is introduced to further optimize the algorithm(iv)
Through the analysis of the results, the distributed iterative algorithm proposed in this paper can maintain stable fairness after the environment is stable. At the same time, the bat algorithm proposed in this paper can improve the performance of the networks by 7% compared with the traditional algorithm. In addition, in the results part, the sensitivity of each parameter of the system is analyzed. The results show that the algorithm in this paper can adapt well to the change of task length, which enables the networks to better adapt to changes in the environmentThe rest of the paper are structured as follows. In Section3, the system model and problem formulation are discussed. In Section 4, the path planning algorithm for the UAV is designed. In Section 5, the distributed iterative algorithm is used to solve the time allocation problem of GNs. Numerical results and analysis are presented in Section 6. Finally, Section 7 makes a summary of the paper.


## 3. System Model and Problem Formulation

The SWIPT-based MEC networks in this paper within a single base station in areas of communication paralysis are shown in Figure1. Its service range is RMEC=1km×1km [37], and divide RMEC into M parts; each part is assigned a UAV for cruise work, defined as RmMEC. This network consists of one MEC server, N GNs, and M UAVs. The BS’s MEC server with multiple antennas is equipped at height hMEC, while the working height of UAV is at HUAV. The MEC server can simultaneously receive the GN calculation tasks relayed by each UAV and return the calculation results to the GNs through the UAV. UAVs and GNs are only equipped with a full-duplex (FD) antenna and communicate in the MEC networks by TDMA. At the beginning of each slot, GNs will actively send a connection request to the MEC server. After that, the communication address and some basic information in the GN request will be forwarded to the UAV by the MEC server. Finally, GNs will establish a communication link with the corresponding UAV.Figure 1
Illustration of SWIPT-based MEC networks with UAV assistance.The UAV in the networks can not only relay computing tasks but also charge GNs. We assume that the UAV is a mobile energy source so that the energy received by GNs is directly obtained from the energy source, rather than being relayed by the UAV. However, the portable energy of UAV is limited and they cannot work for a long time without charging. Therefore, this paper innovatively installs the UAV charging pile at thehsUAV of the BS and allows the UAV to have an autonomous navigation function. When the UAV senses that its power is insufficient, it will automatically design a trajectory to return to the charging pile and continue to work after replacing the battery. With the popularization of 5G in the future, base stations will become denser [38] and UAV charging will become more and more convenient. Besides, the interference between different UAVs and between different GNs can be ignored [39]. The energy consumption of transmitters, receivers, and optimized calculations is also not considered [40].


### 3.1. Mobile Model of GNs and UAVs

We assume that the total working time of the networks isT and divide it into NT time slots. The GNs on the ground are divided into three categories: fixed in position, moving with humans, and mounted on cars, expressed as GNH, GNH, and GNC, respectively. GN moves continuously in the plane without interruption. To simplify the analysis, this article only samples the position of the GN at the beginning of the time slot. The maximum moving speed of the GN belonging to category GNH is VH and GNC is VC, and the remaining GNs are always stationary. Similarly, the maximum speed of the UAV is Vmax. In the three-dimensional space of the SWIPT-based MEC networks, both GNs and UAVs perform a two-dimensional motion in their respective horizontal planes. The specific motion model is shown in Figure 2. At the end of each time slot, GNs and UAVs will randomly select a point in circle O as the starting position of the next time slot. This point is determined by two random numbers. The first is the angle θ with the horizontal axis X. The second is the length d of the movement.Figure 2
Illustration of the mobile model of GNs and UAVs.


### 3.2. Binary Computation Offloading Mode

The computational offloading strategy of GNs under the binary offloading mode will be discussed in detail in this section. In this mode, the task is not required to be split and has a wider scope of application. Each GNs in the network will make decisions based on its energy storage and uplink energy consumption. The specific decision plan is as follows:(1)bn=0,EnLC≤EnRandEnLC≤EnUL1,else,where EnR is the GN remaining energy, EnLC is the energy consumption of local computation, and EnUL is the upload energy consumption. Let B=bn∣bn∈0,1∀n∈N represents the offloading decision of each GN. When bn=1, GNs use local calculation. Otherwise, GNs will offload calculation to the MEC server. GNs select local calculation only when the local calculation energy consumption is lower than the transmission energy consumption and the local remaining energy.


### 3.3. Mobile Model of GNs and UAVs

There are both LOS attenuation and NLOS attenuation during the operation of the UAV. However, since the occurrence probability of NLOS is much lower than that of LOS [41, 42], the attenuation problem of NLOS can be ignored. Therefore, the channel attenuation between UAVs, MEC, and GNs can be expressed as [43] follows:
(2)hnEr=kLrαL,where r is the distance between the UAV and the communication target. kL is the intercepts of the LOS and αL is the path loss exponents for LOS.


#### 3.3.1. Energy Harvesting

Since the transmission time of the downlink is usually short, it is inefficient to use it to transmit energy. The uplink is more suitable for energy transmission because its transmission time is much longer than the one of the downlinks. Thus, the FD-SWIPT technology [44] is introduced to the networks so that GN can obtain energy from the UAV while offloading computing tasks. The energy collected by GNs can be defined as
(3)EnEH=bnαnTnGNPmUAVhnEr,where αn is the energy conversion rate of the receiving equipment used by GNs and PmUAV represents the power of the transmitter equipped with the UAV. To simplify the model, the energy consumption of the receiving device is ignored in this network [45]. TnGN is the length of the time slot allocated to GN.


#### 3.3.2. Local Computing

The GNs that select local calculation will no longer upload any calculation tasks to the MEC server, and all calculation tasks are completed locally. In order to prevent the locally calculated GNs from being exhausted, the UAV will also transfer energy to such GNs. Assume that the CPU of GNs needsX revolutions to calculate one bit and the task length is D bits. Then, the local computational energy consumption of each GN can be expressed as
(4)EnLC=1−bnDnXκLCFnLC2,FnLC=DnXNTT,where FnLC is the calculation frequency of local calculations and the meaning of κLC is the correlation coefficient of the CPU of GNs. We assume that the task can be undertaken by GNs.


#### 3.3.3. Computing Offloading

In each time slot, the UAV will dynamically allocate timeTnGN to the GNn within its service range. Similarly, the UAV also needs to transfer the received tasks to the MEC server at the BS in this time slot. BS will use different antennas to connect to each UAV, so there is no need to worry about conflicts between UAVs. However, conflicts between GNs cannot be ignored, so we use a dynamic TDMA [46] scheme shown in Figure 3 to provide services for GNs. Also, we assume that the length of the returned calculation result is much smaller than the calculation task, so the downlink transmission time can be ignored. Then, we have.
(5)C2:∑n∈NTnGN+TmUAV=TNT,∀m∈M,∀n∈RNMEC,where TmUAV is the time required for the UAV to relay the computing task to the MEC server and can be denoted as
(6)TmUAV=∑n∈RmMECDnBlog21+PmUAVhnEr/σ2.Figure 3
Communication interaction model of each device.Here,σ2 represents the power of the Gaussian white.Thus, the transmission energy consumption of the UAV can be defined as(7)EmUAV=PmUAVTmUAV.GNs in the computing offloading mode need to offload their computing tasks to the UAV and forward them to the MEC server for computing. In this process, the transmission rate of the GN transmission task is an identity, as shown below(8)DnTnGN=Blog21+PnULhnEr/σ2,where B represents the bandwidth of the channel occupied by the transmission task. After some simple mathematical transformations, the transmission power of GNs in the uplink can be written as
(9)PnUL=σ22Dn/TnGNB−1hnEr.Since the transmitter power of GNs in the networks is limited,PnUL must meet the following constraints
(10)C3:σ22Dn/TnGNB−1hnEr≤Pnmax.Here,Pnmax represents the maximum transmission power that the transmitter can withstand. C3 can also be written as
(11)C3:DnBlog21+PnmaxhnEr/σ2≤TnGN.According to (9), the energy consumption of GNs when transmitting calculation tasks can be written as
(12)EnUL=bnTnGNσ22Dn/TnGNB−1hnEr.


### 3.4. UAV Flight Trajectory Design

The flight trajectory design of the UAV should consider not only the overall situation of the current time instant but also the positions of the previous time. It must be ensured that the service period of each GN is approximate. A fair and high-quality service can ensure that the GNs served by it maintain sufficient power. We believe that the UAV can establish a long-term connection with MEC and GNs until it returns to the charging pile. The UAV can sense its own remaining power and return to the charging pile when the power is low. When the UAV is charging, another fully charged UAV will continue to complete the remaining work.According to the survey in [47], we conclude that the flight energy consumption of the rotary-wing UAV used in this paper can be modeled as
(13)EmVVt=12MmVm2,where Mm means the weight of the UAV and Vm represents the UAV flight speed with the maximum value of Vmax which can be expressed as follows:
(14)C4:Vt≤Vmax.In addition, the position of the UAV cannot exceedRmMEC and the corresponding constraint is written as
(15)C5:0≤OUTt,where OUT· is an out-of-bounds determination function. If the UAV is out of the bound, the result of the function is negative, otherwise, positive. This function can be easily implemented through programming, so there are no more explanations here. And the autonomous back-to-home charging function of the UAV can be realized by the following constraints
(16)t=rMECVmax+,C6:0≤EmR−tEmVVmax,where ·+ is the round-up function and rMEC represents the distance between the UAV and the MEC server. t is the prejudgment time; the UAV can judge whether it can fly back to the charging station after t. And EmR is the remaining energy of the UAV. Because tEmV increases monotonically when V increases, tEmVVmax is the maximum energy required for the UAV to return to the charging station.


### 3.5. Utility Function of SWIPT-Based MEC Networks

In this paper, we aim to maximize the remaining energy of GNs and UAV energy consumption in each time slot, meanwhile jointly optimizing the uplink time of GNs and the flight position of the UAV. We assume that the position of the UAV in each time slot isZmUAV and the specific model of each time slot can be expressed as
(17)maxZmUAV,TnGN,bn∑n∈NEnEH−EnLC−EnUL−∑m∈MW1EmVVt+W2EmUAVs.t.C1:bn∈0,1,∀n∈NC2~C6,where W1 and W2 are the weight coefficient used to maintain the same order of magnitude of each variable in the objective function. The position of the UAV is represented as ZUAV=ZmUAV∣m∈M.


## 3.1. Mobile Model of GNs and UAVs

We assume that the total working time of the networks isT and divide it into NT time slots. The GNs on the ground are divided into three categories: fixed in position, moving with humans, and mounted on cars, expressed as GNH, GNH, and GNC, respectively. GN moves continuously in the plane without interruption. To simplify the analysis, this article only samples the position of the GN at the beginning of the time slot. The maximum moving speed of the GN belonging to category GNH is VH and GNC is VC, and the remaining GNs are always stationary. Similarly, the maximum speed of the UAV is Vmax. In the three-dimensional space of the SWIPT-based MEC networks, both GNs and UAVs perform a two-dimensional motion in their respective horizontal planes. The specific motion model is shown in Figure 2. At the end of each time slot, GNs and UAVs will randomly select a point in circle O as the starting position of the next time slot. This point is determined by two random numbers. The first is the angle θ with the horizontal axis X. The second is the length d of the movement.Figure 2
Illustration of the mobile model of GNs and UAVs.


## 3.2. Binary Computation Offloading Mode

The computational offloading strategy of GNs under the binary offloading mode will be discussed in detail in this section. In this mode, the task is not required to be split and has a wider scope of application. Each GNs in the network will make decisions based on its energy storage and uplink energy consumption. The specific decision plan is as follows:(1)bn=0,EnLC≤EnRandEnLC≤EnUL1,else,where EnR is the GN remaining energy, EnLC is the energy consumption of local computation, and EnUL is the upload energy consumption. Let B=bn∣bn∈0,1∀n∈N represents the offloading decision of each GN. When bn=1, GNs use local calculation. Otherwise, GNs will offload calculation to the MEC server. GNs select local calculation only when the local calculation energy consumption is lower than the transmission energy consumption and the local remaining energy.


## 3.3. Mobile Model of GNs and UAVs

There are both LOS attenuation and NLOS attenuation during the operation of the UAV. However, since the occurrence probability of NLOS is much lower than that of LOS [41, 42], the attenuation problem of NLOS can be ignored. Therefore, the channel attenuation between UAVs, MEC, and GNs can be expressed as [43] follows:
(2)hnEr=kLrαL,where r is the distance between the UAV and the communication target. kL is the intercepts of the LOS and αL is the path loss exponents for LOS.


### 3.3.1. Energy Harvesting

Since the transmission time of the downlink is usually short, it is inefficient to use it to transmit energy. The uplink is more suitable for energy transmission because its transmission time is much longer than the one of the downlinks. Thus, the FD-SWIPT technology [44] is introduced to the networks so that GN can obtain energy from the UAV while offloading computing tasks. The energy collected by GNs can be defined as
(3)EnEH=bnαnTnGNPmUAVhnEr,where αn is the energy conversion rate of the receiving equipment used by GNs and PmUAV represents the power of the transmitter equipped with the UAV. To simplify the model, the energy consumption of the receiving device is ignored in this network [45]. TnGN is the length of the time slot allocated to GN.


### 3.3.2. Local Computing

The GNs that select local calculation will no longer upload any calculation tasks to the MEC server, and all calculation tasks are completed locally. In order to prevent the locally calculated GNs from being exhausted, the UAV will also transfer energy to such GNs. Assume that the CPU of GNs needsX revolutions to calculate one bit and the task length is D bits. Then, the local computational energy consumption of each GN can be expressed as
(4)EnLC=1−bnDnXκLCFnLC2,FnLC=DnXNTT,where FnLC is the calculation frequency of local calculations and the meaning of κLC is the correlation coefficient of the CPU of GNs. We assume that the task can be undertaken by GNs.


### 3.3.3. Computing Offloading

In each time slot, the UAV will dynamically allocate timeTnGN to the GNn within its service range. Similarly, the UAV also needs to transfer the received tasks to the MEC server at the BS in this time slot. BS will use different antennas to connect to each UAV, so there is no need to worry about conflicts between UAVs. However, conflicts between GNs cannot be ignored, so we use a dynamic TDMA [46] scheme shown in Figure 3 to provide services for GNs. Also, we assume that the length of the returned calculation result is much smaller than the calculation task, so the downlink transmission time can be ignored. Then, we have.
(5)C2:∑n∈NTnGN+TmUAV=TNT,∀m∈M,∀n∈RNMEC,where TmUAV is the time required for the UAV to relay the computing task to the MEC server and can be denoted as
(6)TmUAV=∑n∈RmMECDnBlog21+PmUAVhnEr/σ2.Figure 3
Communication interaction model of each device.Here,σ2 represents the power of the Gaussian white.Thus, the transmission energy consumption of the UAV can be defined as(7)EmUAV=PmUAVTmUAV.GNs in the computing offloading mode need to offload their computing tasks to the UAV and forward them to the MEC server for computing. In this process, the transmission rate of the GN transmission task is an identity, as shown below(8)DnTnGN=Blog21+PnULhnEr/σ2,where B represents the bandwidth of the channel occupied by the transmission task. After some simple mathematical transformations, the transmission power of GNs in the uplink can be written as
(9)PnUL=σ22Dn/TnGNB−1hnEr.Since the transmitter power of GNs in the networks is limited,PnUL must meet the following constraints
(10)C3:σ22Dn/TnGNB−1hnEr≤Pnmax.Here,Pnmax represents the maximum transmission power that the transmitter can withstand. C3 can also be written as
(11)C3:DnBlog21+PnmaxhnEr/σ2≤TnGN.According to (9), the energy consumption of GNs when transmitting calculation tasks can be written as
(12)EnUL=bnTnGNσ22Dn/TnGNB−1hnEr.


## 3.3.1. Energy Harvesting

Since the transmission time of the downlink is usually short, it is inefficient to use it to transmit energy. The uplink is more suitable for energy transmission because its transmission time is much longer than the one of the downlinks. Thus, the FD-SWIPT technology [44] is introduced to the networks so that GN can obtain energy from the UAV while offloading computing tasks. The energy collected by GNs can be defined as
(3)EnEH=bnαnTnGNPmUAVhnEr,where αn is the energy conversion rate of the receiving equipment used by GNs and PmUAV represents the power of the transmitter equipped with the UAV. To simplify the model, the energy consumption of the receiving device is ignored in this network [45]. TnGN is the length of the time slot allocated to GN.


## 3.3.2. Local Computing

The GNs that select local calculation will no longer upload any calculation tasks to the MEC server, and all calculation tasks are completed locally. In order to prevent the locally calculated GNs from being exhausted, the UAV will also transfer energy to such GNs. Assume that the CPU of GNs needsX revolutions to calculate one bit and the task length is D bits. Then, the local computational energy consumption of each GN can be expressed as
(4)EnLC=1−bnDnXκLCFnLC2,FnLC=DnXNTT,where FnLC is the calculation frequency of local calculations and the meaning of κLC is the correlation coefficient of the CPU of GNs. We assume that the task can be undertaken by GNs.


## 3.3.3. Computing Offloading

In each time slot, the UAV will dynamically allocate timeTnGN to the GNn within its service range. Similarly, the UAV also needs to transfer the received tasks to the MEC server at the BS in this time slot. BS will use different antennas to connect to each UAV, so there is no need to worry about conflicts between UAVs. However, conflicts between GNs cannot be ignored, so we use a dynamic TDMA [46] scheme shown in Figure 3 to provide services for GNs. Also, we assume that the length of the returned calculation result is much smaller than the calculation task, so the downlink transmission time can be ignored. Then, we have.
(5)C2:∑n∈NTnGN+TmUAV=TNT,∀m∈M,∀n∈RNMEC,where TmUAV is the time required for the UAV to relay the computing task to the MEC server and can be denoted as
(6)TmUAV=∑n∈RmMECDnBlog21+PmUAVhnEr/σ2.Figure 3
Communication interaction model of each device.Here,σ2 represents the power of the Gaussian white.Thus, the transmission energy consumption of the UAV can be defined as(7)EmUAV=PmUAVTmUAV.GNs in the computing offloading mode need to offload their computing tasks to the UAV and forward them to the MEC server for computing. In this process, the transmission rate of the GN transmission task is an identity, as shown below(8)DnTnGN=Blog21+PnULhnEr/σ2,where B represents the bandwidth of the channel occupied by the transmission task. After some simple mathematical transformations, the transmission power of GNs in the uplink can be written as
(9)PnUL=σ22Dn/TnGNB−1hnEr.Since the transmitter power of GNs in the networks is limited,PnUL must meet the following constraints
(10)C3:σ22Dn/TnGNB−1hnEr≤Pnmax.Here,Pnmax represents the maximum transmission power that the transmitter can withstand. C3 can also be written as
(11)C3:DnBlog21+PnmaxhnEr/σ2≤TnGN.According to (9), the energy consumption of GNs when transmitting calculation tasks can be written as
(12)EnUL=bnTnGNσ22Dn/TnGNB−1hnEr.


## 3.4. UAV Flight Trajectory Design

The flight trajectory design of the UAV should consider not only the overall situation of the current time instant but also the positions of the previous time. It must be ensured that the service period of each GN is approximate. A fair and high-quality service can ensure that the GNs served by it maintain sufficient power. We believe that the UAV can establish a long-term connection with MEC and GNs until it returns to the charging pile. The UAV can sense its own remaining power and return to the charging pile when the power is low. When the UAV is charging, another fully charged UAV will continue to complete the remaining work.According to the survey in [47], we conclude that the flight energy consumption of the rotary-wing UAV used in this paper can be modeled as
(13)EmVVt=12MmVm2,where Mm means the weight of the UAV and Vm represents the UAV flight speed with the maximum value of Vmax which can be expressed as follows:
(14)C4:Vt≤Vmax.In addition, the position of the UAV cannot exceedRmMEC and the corresponding constraint is written as
(15)C5:0≤OUTt,where OUT· is an out-of-bounds determination function. If the UAV is out of the bound, the result of the function is negative, otherwise, positive. This function can be easily implemented through programming, so there are no more explanations here. And the autonomous back-to-home charging function of the UAV can be realized by the following constraints
(16)t=rMECVmax+,C6:0≤EmR−tEmVVmax,where ·+ is the round-up function and rMEC represents the distance between the UAV and the MEC server. t is the prejudgment time; the UAV can judge whether it can fly back to the charging station after t. And EmR is the remaining energy of the UAV. Because tEmV increases monotonically when V increases, tEmVVmax is the maximum energy required for the UAV to return to the charging station.


## 3.5. Utility Function of SWIPT-Based MEC Networks

In this paper, we aim to maximize the remaining energy of GNs and UAV energy consumption in each time slot, meanwhile jointly optimizing the uplink time of GNs and the flight position of the UAV. We assume that the position of the UAV in each time slot isZmUAV and the specific model of each time slot can be expressed as
(17)maxZmUAV,TnGN,bn∑n∈NEnEH−EnLC−EnUL−∑m∈MW1EmVVt+W2EmUAVs.t.C1:bn∈0,1,∀n∈NC2~C6,where W1 and W2 are the weight coefficient used to maintain the same order of magnitude of each variable in the objective function. The position of the UAV is represented as ZUAV=ZmUAV∣m∈M.


## 4. Algorithm Design for Path Planning

The model in this paper is composed of two kinds of agents. The GNs have no way to know the location of the UAV in the next time slot; it can only formulate a strategy based on the environment of the current time slot. However, the UAV needs to weigh the overall situation and find the optimal position of the next time slot. This section aims at designing an algorithm for the UAV, and the algorithm design of GNs will be discussed in the next section. According to the above analysis, the submodel required in this section can be written as(18)maxZmUAV,TnGN,bn∑n∈NEnEH−EnLC−EnUL−∑m∈MW1EmVVt+W2EmUAVs.t.C2~C6.However,C2 and C3 in the model are both restrictive conditions for a single time slot. If the algorithm simultaneously considers the transition of the next time slot and the optimization of the next time slot, the complexity of the algorithm will greatly increase. In fact, in C2 and C3, only hnEr is related to the position of the next UAV slot. After slightly modifying hnEr, the submodel in this section can be written as
(19)maxZmUAVW3∑n∈Nrn−∑m∈MW1EmVVt+W2EmUAVs.t.C4~C6.The specific process will be elaborated in the next section. Furthermore, in the preparation phase of each time slot, MEC will sense the location of the GNs and send the GN list of each area to the corresponding UAV.Since the position of GNs in this model is constantly changing, reinforcement learning or convex optimization theory cannot achieve good results. Therefore, we consider using the bat algorithm as the basis of the algorithm in this section. It can find the optimal solution while exploring the unknown environment. But this algorithm is not capable of considering multiple time slots jointly. In addition, path planning is also very important, which can help the UAV save flight energy. In order to solve those problems, we introduce the function of path planning and multislot joint consideration in the objective function part. The formula of the objective function can be expressed as (20).The formulas beforeHnW7r are all converted from the submodels in this section, where Hn is the magnification weight coefficient. The heavier weight range is n, and the specific selection method is shown in Figure 4. For the leftmost hunger GN, its weight Hn value is n. The subsequent GN’s value of Hn decreases in turn (the Hn of the next hungry GN is n−1) until Hn reaches the minimum value or the edge of heavier weight. It is worth mentioning that since GNs move randomly, the satisfied GNs may appear after the hungry GN. In order to ensure that the requirements of each GN are met, the high weight range will not change when there are some satisfactory GNs inside.
(20)ObjmB=W3∑n∈Nrn−∑m∈MW1EmVVt+W2EmUAV+W4aVt−Vmin+W4bVmax−Vt+W5OUTt+W6EmR−tEmVVmax+HnW7r.Figure 4
Communication interaction model of each device.Different from the traditional bat algorithm, we try to reduce the overall number of iterations by adding efficient exploration in each iteration. The best bat in each iteration is regarded as an expert bat with self-intelligence. This expert bat can use the bat algorithm in a small area to find a better optimal position to indirectly optimize the movement direction of the nonexpert bat. The specific algorithm is shown in Algorithm1. Although this algorithm is not fair in each time slot, it is fair in average time because the path of the UAV is cyclically flying h.Algorithm 1: Expert bat algorithm.
InputJ,Jc: maximum of iterations;NUMB/NUMCB:Number of bats/child bats;AB/rB:Sonic loudness/pulse of bat;αA/αr: Loudness/pulse update factor;1: Use criterion (20) to find the best bat in the initial environment;2:fort<Jdo3:for each bat do4:   Randomly move each bat;5:   Generate a random numberP;6:ifP>rBthen7:    Randomly move this bat;8:if better than the original then9:     Adopt current position;10:else11:     Adopt original position;12:end if13:end if14:if better than the better than the optimal bat and P<ABthen15:   Update optimal bat position;16:AB=αAAB;17:rB=1−e−αrtrB;18:end if19:end if20:  AddNUMCB child bats as the best bat copy;21:fortc<Jcdo22:for each child bats do23:    Randomly move child bats;24:if better than the best then25:     Update the optimal solution;26:end if27:end for28:tc+=129:end for30:t+=131:end for


## 5. Algorithm Design for Time Slot Management

This section mainly solves the optimization problem of the time occupied by each GNs in each time slot. After separating the relevant content of this section from the main model, the following submodels can be obtained as follows(21)maxbn∑n∈NmaxTnGNEnEH−maxTnGNEnUL⏟P1−EnLCs.t.C1,C2P1,C3P1.The separated submodel is split into two parts, one part optimizes the time variable, denoted asP1, and the other part optimizes the decision variable. But the hnEr in C2 and C3 is related to the location of the UAV, which will make the bat algorithm reallocate time every time it evaluates the location of the bat. So, we consider separating the UAV position and time in P1 to reduce the complexity of the algorithm. After taking the logarithm of the objective function, it can be written as
(22)logEnEH=logαnTnGNPmUAV+loghnEr,−logEnUL=−logTnGNσ22Dn/TnGNB−1+loghnEr.After removing formulas that have nothing to do with optimization variables,P1 can be written as
(23)maxTnGNWP1αnTnGNPmUAV−TnGNσ22Dn/TnGNB−1s.t.C2,C3.The simple process of delogarithmization and merging the maximum function is omitted here. In order to keep the two items in the objective function at the same order of magnitude, we introduce an auxiliary variableWP1. On the other hand, in the C2 constraint, only TUAV is related to the UAV position. According to the maximum speed limit of the UAV, the r of hnEr in TUAV can be expressed as
(24)r′=r2−H2UAV+VmaxTNT2+H2UAV≥r.BecausehnEr is inversely proportional to r and TUAV is inversely proportional to hnEr, so, C2 can be shown as
(25)C2:∑n∈NTnGN+TmUAVr′=TNT,∀m∈M,∀n∈RmMEC.According toTmUAVr′≥TmUAVr, it can be known that the spent time will not exceed the time specified by each endpoint, so the transformation will not affect the next time slot. Similarly, C3 can also be safely transformed into
(26)C3:DnBlog21+PnmaxhnEr′/σ2≤TnGN.Based on the above analysis, it can be simply concluded that the constraints ofC3 after the transformation are more stringent than the original one. Besides, to facilitate subsequent processing, we decompose the transformed C2 in the submodel into two constraints.
(27)C2a:∑n∈NTnGN+TmUAVr′≤TNT,∀m∈M,∀n∈RmMEC,C2b:∑n∈NTnGN+TmUAVr′≥TNT,∀m∈M,∀n∈RmMEC.This section considers using the KKT algorithm as the basic algorithm, and the Lagrangian function of P1 can be written as (21), where WC2a,WC2b,WC3 are the auxiliary variables introduced and the updated formulas are
(28)WC2a+=∇C2a∑n∈NTnGN+TmUAVr′−TNT,(29)WC2b+=∇C2bTNT−∑n∈NTnGN−TmUAVr′,(30)WC3+=∇C3DnBlog21+PnmaxhnEr′/σ2−TnGN.LetLP1′=0 can be obtained
(31)LP1′=TnGNBαnPmUAVWP1+σ2+WC3−WC2a+WC2bσ22Dn/TnGNB−TnGNB+ln2Dn−ln2Dnσ2=0.Theorem 1.
EquationLP1′=0 has a one solution and it is unique.Proof Of Theorem 1.
Since this equation is a transcendental equation, the answer cannot be calculated directly, so Newton’s iteration method is used to find an approximate solution. The iterative step can be expressed as(32)ΔTnGN=LP1′LP1′′,where
(33)LP1′′=BαnPmUAVWP1+σ2+WC3−WC2a+WC2b−σ22Dn/TnGNBBln2DnTnGN2−Bln2DnTnGN+B2.☐Furthermore, bothWC2a and WC2b need to collect all GN information before they can be calculated, while WC3 only needs GN itself. This feature makes this paper more suitable for using centralized and distributed algorithms. In order to minimize the GNs’ information stored at UAV, this paper allows GN to update WC2a and WC2b according to its own situation, while UAV only plays an auxiliary role. The specific algorithm is as Algorithm 2.Algorithm 2: Centralized and distributed algorithm of UAV and GN collaboration.
Input:ε: Tolerance errorTG: Number of independent calculationsWnC2a/WnC2b: A copy of the auxiliary variable ateach GN1:forT/NT−TmUAV−Ttemp>εdo2:• GNs3:  UpdateWnC2a,WnC2b according to the received result;4:fori<TGdo5:for The change in TnGN is more than εdo6:for each GNs do7:TnGN−=ΔTnGN;8:end for9:end for;10:  UpdateWnC2a,WnC2b,WC3 with (28), (29), (30);11:end for12: SendWnC2a,WnC2b,TnGN to UAV13:• UAV14:WC2a/WC2b= Add and average the WnC2a/WnC2b of all GNs in this part;15:Ttemp=∑n∈NTnGN16: Send all GNs’TnGN and WC2a,WC2b to each GN;17:end for


## 6. Simulation and Numerical Results

The numerical evaluation results of the time allocation algorithm and path planning algorithm are shown in this section. Unless specified, the network parameters are set up in Table1.Table 1
Simulation parameters.
ParametersValueUAV weight (Wm)9.65 kgNoise (σ2)10−13 WUAV/MEC height (HMEC,HUAV)100/10 mBandwidth (B)106 HzCPU correlation coefficient (k0)10−28Bit length of the task (D)1.5~2 MbitOperational capability (X)1000 cycles/bitMaximum transmission power of GNs (Pmax)1 WTransmission power of UAV (PUAV)10 WMaximum speed (Vmax)50 m/sWhen the GNs is stationary, the flight trajectory of the UAVs is shown in Figure5. Sub-pictures a, b, and c correspond to different UAV numbers. The red dot in the figure represents GNs, the blue line represents the UAV’s flight trajectory, and the red line represents the area boundary. It can be seen that the UAV in this paper adopts a dynamic and autonomous way to specify the time used for a service cycle. When the service area of a UAV increases, its service cycle will also increase. And the algorithm of this paper can dynamically change the path with the change of the environment. The environment in which the UAV starts to serve from the base station and from the end of the previous service cycle is different. So, each area in Figure 5 will show two slightly different flight paths. The trace in Figure 5 has protrusions at the corners. This is because UAVs in the networks will consider the needs of every GNs, including GNs in remote corners.Figure 5
The trajectory of UAVs. (a) 2 UAVs; (b) 3 UAVs; (c) 4 UAVs.
(a)(b)(c)In order to make the performance analysis more realistic, Figure6 adds the function of random motion to the GNs. In addition, the performance of the system under different GNs and UAV numbers and different bat algorithms is shown in Figure 6. It can be seen that the remaining energy of the GNs in this network increases with time. This is because the network in this paper can guarantee that the received energy of GNs is greater than the consumption in each time slot. When the number of the UAV decreases, the total energy obtained by GNs will also decrease. And when the number of GNs in the networks increases, the total energy obtained by the GNs will decrease by 20%. In addition, Figure 6 also proves that the bat algorithm of this paper improves the network performance by 7%. Therefore, the number of UAVs in the network can be changed according to the energy requirements of the GNs, thereby avoiding unnecessary waste of resources.Figure 6
The sum of the remaining energy of all GNs in a period.It is not rigorous to only analyze the sum of energy acquired by GNs, because it is very likely that the sum of energy acquired by GNs is very large, but some GNs in the networks have insufficient energy. For this reason, Figure7 uses the method in [48] to analyze the fairness of energy obtained by GNs under different conditions. It can be seen in Figure 7 that the fairness coefficient in the networks gradually tends to a fixed value through the slow stabilization of the networks. This is because in the previous time slot, the UAV has just entered the networks and has not yet formed a stable circular orbit. In addition, the change in the number of GNs has an impact on fairness of only about 0.01, but when the number of UAVs is reduced by one, the decrease is 0.1. This is because the decrease in the number of UAVs will increase the service area of each UAV, which will make the period for UAVs to provide high-quality services to each GN longer, resulting in uneven energy held by GNs.Figure 7
Fairness factor of each time slot.The correlation analysis of the model’s sensitivity to power, task length, and power is shown in Figure8. When the mission length increases, the remaining energy of the GNs in the system decreases slightly, only a 7% decrease each 1 Mbit. It shows that the algorithm designed in this paper can be well applied to actual scenarios, because the length of the user’s task is generally variable and unpredictable. However, it is very sensitive to the power and working height of the UAV. Therefore, it is necessary to lower the working height of the UAV and increase the transmission power of the UAV as much as possible.Figure 8
Fairness factor of each time slot.Figure9 shows the working path of the UAV when there are 3 UAVs performing tasks at the same time and the power is insufficient. We deliberately modulate the UAV reserve power to be very low to show that the UAV charging process and the time slot of each point are marked. According to the constraints of C6, when the UAV senses that it is running out of power, it will enter the return state in advance and continue to work after charging, as shown in Figure 9(b) and the UAV will continue to complete the tasks that were not completed in Figure 9(a) after charging.Figure 9
Examples of UAV automatic charging: (a) the first charge; (b) the second charge.
(a)(b)


## 7. Conclusion

This paper proposes a SWIPT-based MEC network composed of multiple UAVs and one MEC server. The main task is to provide computing assistance and energy transmission services for GNs. In order to ensure the flexibility of the networks, we proposed a distributed iterative algorithm and designed an expert bat algorithm to ensure the freedom of the UAV’s trajectory. Experimental results show that compared with the traditional bat algorithm, this algorithm can guarantee the fairness of network services and can improve the network performance by 7%. In addition, the distributed iterative algorithm in this paper can also be well adapted to fluctuations in task length, ensuring the stability of the networks.



---

*Source: 6745460-2021-11-03.xml*