Secrecy Energy Efficiency Enhancement in UAV-Assisted MEC System

A secrecy energy efficiency optimization scheme for a multifunctional unmanned aerial vehicle (UAV) assisted mobile edge computing system is proposed to solve the computing power and security issues in the Internet-of-Things scenario. The UAV can switch roles between a computing UAV and jamming UAV based on the channel conditions. To ensure the security of the content and the system energy efficiency in the process of offloading computing tasks, the UAV trajectory, uplink transmit power, user scheduling, and offload task are jointly optimized, and an updated-rate assisted block coordinate descent (BCD) algorithm is used. Simulation results show that this scheme efficiently improves the secrecy performance and energy efficiency of the system. Compared with the benchmark scheme, the secrecy energy efficiency of the scheme is improved by 38.5%.


Introduction
With the growing number of intelligent mobile devices, computing intensive applications such as video calling and virtual reality are becoming more common. However, while providing convenience, mobile devices also have the disadvantage of limited computing resources, which makes it a challenge to provide a high level of experience quality. Mobile edge computing (MEC) has also received widespread attention [1]. Mobile edge computing significantly reduces network overhead and task execution delay [2]. Traditional network edge servers are located in base stations all over the communication network. However, fixed base stations still have drawbacks such as limited coverage and severe link loss.
Unmanned aerial vehicles (UAVs) have the characteristics of small size, low cost, rapid deployment on demand, and high-probability air-to-ground line-of-sight (LOS) link, which produces high channel gain in the communication system. Therefore, a large number of studies considered introducing UAVs equipped with computing equipment into mobile edge computing networks to assist ground users in completing computing tasks. Hu et al. [3] established a UAV-assisted mobile edge computing system. The UAV provides computing services for multiple users in the form of orthogonal multiple access. Zhang et al. [4] studied the computational efficiency of a UAV MEC system and maximized the computational efficiency by jointly optimizing the offloading time, CPU frequency, user transmit power, and UAV trajectory. Yu et al. [5] minimized the service delay of all IoT devices and the weighted sum of UAV energy consumption by jointly optimizing UAV location, communication, computing resource allocation, and task splitting decisions. In the research of Shang et al. [6], the ground computing server and the computing UAV provide computing resources for the ground terminal at the same time. To minimize the total energy consumption of the ground terminal, user scheduling, uplink power control, channel allocation, computing task allocation, and the 3D layout of UAVs are jointly optimized. Kumar et al. [7] proposed a drone assisted distributed routing framework focusing on quality of service provision in IoT environments (D-IoT). The aerial drone mobility and parameters are modeled probabilistically, focusing on highly dynamic flying ad hoc networks environments. A comparative performance evaluation attests to the benefits of the proposed drone-assisted routing framework. Kumar et al. [8] developed a complete communication framework for quality of service provisioning in UAV-assisted aerial ad hoc networking (QSPU) based on the aerial ad hoc mobility model and service parameters. Jha et al. [9] presents a noble, innovative idea for designing and developing a blended-wingbody (BWB)-based configuration system for UAVs, especially for next-generation high-speed drone use cases.
Although UAVs assist ground users in completing computing tasks, which greatly reduces computing delays, the process of users offloading computing data from UAVs also has the risk of data leakage, which brings new challenges to the security performance of mobile edge computing systems. Zhou et al. [10] studied the physical layer security of UAV base stations transmitting confidential information to multiple information receivers with the assistance of UAV jammers. By formulating UAV trajectory planning and power control schemes, the minimum average secrecy rate of all receivers was maximized. Zhou et al. [11] used full-duplex legitimate UAVs and non-offloading ground users to transmit jamming signals in order to resist the stealing of the offloading task content by multiple aerial eavesdropping UAVs. In addition, they designed a low-complexity iterative algorithm to maximize the security capacity of the system. Xu et al. [12] studied a dual UAV-assisted mobile edge computing system in which one UAV is used to help the ground terminal equipment computing offloading tasks, and the other is used as a jammer to suppress malicious eavesdroppers. However, two UAVs can complete only one computing and jamming task, and there are limitations to the improvement of system performance.
In addition, the battery capacity of UAVs is limited, which greatly limits the continuous operation time of the system. Zeng et al. [13] established a propulsion power consumption model of a rotary-wing UAV and jointly optimized the trajectory of the UAV and communication time allocation between each ground node to meet the communication throughput requirements of each ground node. In addition, the total energy consumption of the system was minimized. Zhang et al. [14] studied the energy efficiency of a NOMA-based UAV MEC system, mathematically evaluated the energy cost of the system by establishing a utility function, and designed a joint optimization scheme to minimize the energy cost. Zhang et al. [15] studied the task offloading problem in UAV-assisted MEC. To balance user utility and UAV energy consumption, a matching game algorithm with a bilateral preference list was proposed to save energy.
Although research on UAV-assisted mobile edge computing systems has been relatively comprehensive, few studies have considered the system security rate and system energy efficiency at the same time. Although Hua et al. [16] established a system secrecy energy efficiency model and maximized it by jointly optimizing the UAV's trajectory, transmission power, and user scheduling, they only studied the UAV base station communication system. Therefore, this paper establishes a MEC system model based on a multi-functional UAV in which the UAV can switch between the auxiliary computing UAV and active jamming UAV according to the channel conditions. By considering both security and energy consumption issues at the same time, with the goal of maximizing the security energy efficiency of the system, the user scheduling, UAV trajectory, uplink power, and offload task volume are jointly optimized to improve the security energy efficiency performance of the system. Compared with previous studies, the models used in this study are quite different with different constraints, and the algorithm solution ideas are similar, but the differences in models and constraints also make the algorithms different.
The main contributions of this work are summarized as follows: • We propose a MEC system model based on multi-functional UAVs. Two UAVs with both computing and jamming functions cooperate as ground sensor nodes to provide a safe unloading environment and computing services, and UAVs can switch roles between auxiliary computing UAVs and active jamming UAVs according to their geographical locations in different time slots. Under the premise of considering the system energy efficiency, the mathematical model of the communication system security energy efficiency is established. The system security energy efficiency is maximized through the joint optimization of user scheduling, UAV trajectory, uplink transmission power, and computing task allocation in the system. • In order to deal with the complex non-convex problem, we divide the original problem into two sub-problems. However, the sub-problems with non-convex and fractional objectives are still difficult to deal with. Therefore, the sub-problem is converted into a convex form by applying SCA technology, and the Dinkelbach algorithm solves the fractional problem in an iterative manner. For the solution of two sub-problems, we introduce the BCD method to solve the sub-problem iteratively in an alternate manner until the algorithm converges.

•
The system SEE performance and security rate performance of the proposed scheme are verified through simulation, and the UAV trajectory and user scheduling after joint optimization are displayed and analyzed. The comparison of different optimization schemes in the simulation results shows the effectiveness of the proposed joint optimization scheme. Figure 1 depicts a model of a multi-UAV-assisted mobile edge computing system. There are two UAVs in the system, both equipped with transceiver communications and computing devices, which are both capable of assisting in computing and sending signals. According to the channel conditions of its own location, the UAV chooses to act as an auxiliary computing UAV or a friendly jamming UAV, but both kinds of UAVs must exist in the same time slot. Among them, the auxiliary computing UAV is responsible for receiving part of the computing tasks offloaded by L ground nodes to help it complete the calculation work, while the friendly jamming UAV is responsible for sending jamming signals to resist the threat of K ≥ 1 ground eavesdropping nodes. In addition, to obtain a more essential relationship between system indicators and system performance, it is assumed that the positions of ground sensor nodes and eavesdropping nodes are fixed, and the two UAVs know the location information of ground nodes and other UAVs. Table 1 describes the meaning of the symbols used in this document.

Channel Model
In this model, L ground legal sensor nodes are distributed in an area, and a threedimensional Cartesian coordinate system is established with the lower left boundary point of the area as the origin. Let the coordinate of the lth ground sensor node I l be w I l = x I l ,y I l T , and let the coordinate of the kth ground eavesdropper To record the position change of the UAV within the cycle time, the entire cycle time T is discretized into N equal time slots, satisfying T = Nδ, where δ is the length of the unit time slot. Since δ is small enough, it is assumed that the UAV is at a fixed position in each time slot [17]. In addition, it is assumed that the flight height of the UAV is fixed as H, where it can avoid collisions with buildings on the ground. By setting the position coordinates of the UAV in each time slot, the trajectory of the UAV can be approximated as a line segment connected by N discrete points, and the position of UAV U m in the nth time slot can be expressed as Then, the trajectory of the UAV needs to satisfy the following constraints: where the constraints in (1) indicate that the maximum distance of the UAV within time length δ is limited by the maximum flight rate V max of the UAV, (2) and (3) restrict the start and end position coordinates of each UAV, q U m 0 represents the initial position of U m , and q U m F represents the termination position of U m . In addition, due to the small size of the UAVs, collisions between UAVs are ignored.
The study selects a relatively simple path-loss model close to the actual situation, so it is assumed that the Doppler effect caused by high-speed movement can be perfectly compensated, and the two channels other than the ground-ground link are regarded as line-of-sight links, which satisfies the free-space loss model. Therefore, the channel power gain of the link between the ground sensor node and auxiliary computing UAV in the time slot can be expressed as where ρ 0 is the channel power when the distance is referenced d 0 = 1m, and d I l U m [n] indicates the distance between the two nodes in the nth time slot. Similarly, the channel power gain of the link between jamming UAV U m and ground eavesdropping node E k in the nth time slot is where d U m E k [n] represents the distance between the jamming UAV and the eavesdropping node in the nth time slot. The channel power gain of the air-air link of the two UAVs in the nth time slot can be expressed as represents the distance between the two UAVs in the nth time slot. Ground sensor node I l and the eavesdropping node E k obey Rayleigh fading, and the channel gain is where ξ denotes the Rayleigh fading coefficient, which obeys the exponential distribution of the unit mean, and d I l E k denotes the distance between two ground nodes.

Secrecy Rate Model
In this study, a time-division protocol based on time-division multiplexing is used, where each time slot δ is divided into L subtime slots and assigned to each ground sensor node in sequence. Defining the time allocation variable as τ I l [n], the offloading duration of the ground sensor node I l in the nth time slot can be expressed as τ I l [n]δ. To ensure the rationality of the time allocation variables, τ I l [n] shall meet the following constraints: In addition, the power of the UAV to send the jamming signal is defined as P J , and P J > 0. Define the offloaded transmission power of the ground sensor node I l in the nth time slot as P I l [n] and satisfy the following constraints: where P max denotes the maximum transmit power of the UAV. The transmission rate between the ground node I l and the auxiliary computing UAV in the nth time slot can be expressed as where σ 2 denotes the Gaussian white noise at the receiver, and a m [n] denotes whether U m in the nth time slot is working in the auxiliary computing mode; a 1 [n] = 1,a 2 [n] = 0 denotes that U 1 in the nth time slot is the auxiliary computing UAV, and U 2 is the active jamming UAV. a 1 [n] = 0,a 2 [n] = 1 denotes that U 1 in the n th time slot is the active jamming UAV, and U 2 is the auxiliary computing UAV. Similarly, the transmission rate between eavesdropper E k and ground node I l in the nth time slot is expressed as In this study, the secure transmission rate of each link is defined by the difference between the transmission rate of legal links and illegal links. Then, in the nth time slot, the uplink transmission rate of sensor node I l is expressed as where [x] + denotes the larger value in 0, and x, [x] + = max(x,0).

Edge Computing Model
Let c l denote the number of CPU cycles required to calculate 1 bit of data at the lth sensor node, and let D loc l [n] denote the number of bits that the lth sensor node completes the calculation locally in the nth time slot. The following constraints are met: where F max I denotes the maximum CPU frequency of sensor node I l . Assume that the computing UAV executes the computing task immediately after receiving each bit of data and must complete the task within its assigned data upload time δτ I l [n]. Since the amount of data in the calculation results is far less than the amount of data actually unloaded [18], the time for retrieving the calculation results is ignored here. The computing power of the computing UAV should satisfy the following constraints: where B denotes the channel bandwidth, c U indicates the number of CPU cycles required for the UAV to calculate 1 bit of data in the auxiliary computing, and F max U indicates the maximum CPU frequency of the UAV to ensure that the total number of CPU cycles required for UAV calculation in each time slot does not exceed its maximum computing power. Q l is defined to represent the minimum amount of data required by the lth sensor node in each time slot, so the following constraints should be satisfied:

Energy Consumption Model
UAVs can be divided into fixed wing UAVs and rotary wing UAVs according to their mechanical structures [19]. The propulsion energy consumption generated by UAV flight is far greater than the communication energy consumption and computing energy consumption, so only the propulsion energy consumption of UAV flight is considered, and other energy consumption is ignored. The rate of U m in the nth time slot is expressed as follows: The model adopts a rotor UAV, and the total propulsion energy consumption of U m in the whole cycle time can be expressed as [20] where P 0 and P i are the drag power and induced power in the hovering state, respectively; U tip is the blade tip angular velocity of the UAV; v 0 is the average rotor induced velocity of the UAV in the hovering state; and d r and s are the fuselage resistance ratio and rotor firmness, respectively.

Problem Description
The secrecy energy efficiency is defined as the ratio of the sum of the minimum secret rate of each node of the system to the total energy consumption of the UAV. To maximize the secrecy energy efficiency (SEE) of the system, the time allocation variables, UAV trajectory, uplink transmission power, and local computing data volume are jointly optimized. This study also considers the mobility constraints, uplink transmission power constraints, time allocation constraints, computing power, and task volume constraints of two UAVs.
The optimization problem (P1) is described as follows: where τ I ,Q U ,P I ,D loc , respectively, represent the time allocation variables, UAV trajectory, uplink transmission power, and local calculated data volume to be optimized.
Solving problem (P1) has the following difficulties: (1) The objective function of the problem is not smooth at zero. (2) The objective function is a fractional non-convex function.
(3) There are a large number of optimization variables and tight coupling between variables. (4) Multiple constraints are non-convex with respect to the optimization variables.

Joint Optimization Algorithm
A block coordinate descent (BCD) algorithm with an update rate is proposed to solve the coupling problem between variables. The successive convex approximation (SCA) (Appendix A) technique and Dinkelbach algorithm [21] are applied to solve non-convex function and fractional optimization problems. The problem that the objective function is not smooth at zero can be solved by setting P m = 0. Let Z = τ I ,Q U ,P I ,D loc be the set of all optimization variables; then, variables except trajectory can be expressed as Z\{Q U }. Problem (P1) is decoupled into optimization of Z\{Q U } and trajectory optimization of Q U and solved alternately until the algorithm converges.

Optimization of Z\{Q U }
For a given UAV trajectory Q U , the optimization problem of Z\{Q U } can be established as follows: where E total = ∑ m∈M E U m . Since the propulsion energy consumption of the UAV is independent of the node time scheduling, transmission rate, and computation task amount, E total is a constant. We introduce slack variables {η, s 1 I , s 2 I , θ 1 I , θ 2 I } and rewrite the original problem as follows: , independent of the optimization variables of the sub-problems in this section, are constants. Due to the introduction of slack variables, the solution obtained by problem (P2.1) is the lower bound of the optimal solution of the original problem. After r iterations, the time scheduling and transmission power of node I l in time slot n are defined as τ r I l [n] and P r I l [n], respectively. Equations (17d) and (17e) can be rewritten as follows: To convert the constraints in (18) into convex constraints, the second order cone (SOC) method [22] is applied, and two convex constraints in (19) are obtained, which are expressed as follows: where M r l,k [n] = C 2 l,k [n]/ log(2) 1 + C 2 l,k [n]P r I l [n] , T r l,k [n] = log 2 1 + C 2 l,k [n]P r I l [n] . With the above mathematical approximation, problem (P2.2) can be rewritten as follows: (19), (20) Thus far, (P2.2) can be solved with the CVX tools.

UAV Trajectory Optimization
Given time schedule τ I of sensor nodes, transmission power P I , and local computation task D loc , the trajectory optimization sub-problem of the UAV can be expressed as follows: By introducing the auxiliary variables η, z 1 I , z 2 I , X I , Y I , and ϕ I , the original problem can be rewritten as follows: The right-hand function of (22e) is a concave function about u U m E k [n], and its upper bound can be obtained by the first-order Taylor expansion at this point. Let the trajectory of the UAV in the nth time slot after r iterations be q r U m [n]. Expression (22e) can be transformed into the following convex constraints: where F r I l U m E k [n] = Then, (22f) can be replaced by (25).
To solve the non-convex problem in (22g), introduce auxiliary variables ω U 1 U 2 [n] and replace it with (26).

Overall Algorithm Description
To solve problem (P1), the updated-rate assisted block coordinate descent algorithm is applied. The sub-problems in the previous two sections are solved alternately, and the optimal solution of the original problem is obtained. The overall idea is as follows: decouple the original problem into two sub-problems: variable Z\{Q U } optimization and trajectory optimization. Then, fix one set of variables to solve sub-problems (P2.2) and (P3.3) alternately. The optimal solution is used as the reference value for the next iteration.
The overall description of the joint optimization algorithm is shown in Algorithm 2.
In Algorithm 2, each sub-problem can be approximated as a linear problem by firstorder Taylor expansion. Then the interior point method is used to solve problems (P2), and the computational complexity is O √Ñ log 1 ε 0 , whereÑ represents the number of decision variables [16], and ε 0 indicates iteration accuracy. Similarly, the computational complexity of questions (P3) is O C √Ñ log 1 ε 0 , where C represents the number of iterations for the update of µ in Algorithm 1. Therefore, the overall computational complexity of Algorithm 2 . Statements (P2.2) and (P3.3) are the approximate problem of the original sub-problems. Therefore, we prove that Algorithm 2 can converge as follows. Define where χ r τ I , χ r Q U , χ r P I , χ r D loc are values of the optimal solution in Problems (P2.2) and (P3.3), respectively based on τ I ,Q U ,P I ,D loc . In Step 2 of Algorithm 2, it follows that: where (a) holds because the first-order Taylor expansions in (19) are tight at the given local points, respectively; (b) holds since that given τ r+1 I ,Q r U ,P r I ,D locr , the optimal solution τ r+1 I is obtained by solving Problem (P2.2); (c) holds because the optimal solution of (P2.2) is lower bounded by (P2) at τ r+1 I . According to the inequality above, although only one approximate optimization problem (P2.2) is solved, the target value of Problem (P2) is still non decreasing after each iteration. Second, in step 2 of Algorithm 2, given τ r+1 I ,Q r U ,P r I ,D locr , it follows that: where (d) holds, since that by given τ r+1 I ,Q r U ,P r I ,D locr , (P2) can be handled with optimal solution P r+1 I . Then, in step 2 of Algorithm 2, for the given τ r+1 I ,Q r U ,P r+1 I ,D locr , it follows that: Then, in step 3 of Algorithm 2, for the given τ r+1 I ,Q r U ,P r+1 I ,D locr+1 , it follows that: Based on the above inequality, we obtain: It indicates that the target value of Problem (P1) is non decreasing after each iteration of Algorithm 2. Since the objective value of the problem (P1) is bounded by a finite value, Algorithm 2 must converge to a stable point.

Analysis of Simulation Results
In this work, a large number of simulation experiments were carried out to verify the effectiveness of the proposed joint optimization scheme based on multifunctional UAVs in improving the security energy efficiency of the system. First, the parameter settings of the simulation experiment are explained, and then part of the optimization results are shown. Finally, the convergence performance, system security energy efficiency performance, and security rate performance of the proposed joint optimization algorithm are given, and the effectiveness of the proposed joint optimization algorithm is verified.

Simulation Parameter Settings
The settings of each parameter in the simulation experiment are listed in Table 2.  Figure 2 shows the trajectories of two UAVs obtained through the joint optimization algorithm at different cycle times. The positions of four ground sensor nodes and eavesdropping nodes are marked in the figure. We choose to observe the UAV track under three cycle times of T = 30 s, T = 60 s, and T = 90 s. These three situations can represent three actual scenarios: insufficient UAV task time, appropriate UAV task time, and sufficient UAV task time. Comparing the three different cycle times, it can be found that with the increase in the cycle time, the tendency of the auxiliary computing UAV to approach the sensor node and actively interfere with the UAV away from the sensor node is more obvious. To ensure system security energy efficiency, UAVs have more time to obtain a better channel, thus improving the system security transmission rate. Figure 3 shows the trajectory optimization results of the two UAVs under the joint optimization scheme and two other benchmark schemes: the optimization scheme without sensor node transmission power optimization (hereinafter referred to as the noP optimization scheme) and the optimization scheme without UAV trajectory optimization (hereinafter referred to as the noQ optimization scheme) when T = 60. A comparison of the three schemes shows that the noQ optimization scheme greatly limits the maneuverability of the UAV and causes huge losses to the performance of the system. The noP scheme also restricts the trajectory of the UAV to a certain extent. In summary, the joint optimization algorithm is of great help to improve the security and energy efficiency of the system.   Figure 4 shows the time allocation and scheduling of the four nodes in each time slot when the UAV mission time is T = 60 s. Nodes 1-4 in the figure represent four ground nodes. The four nodes are divided into two situations. The first is a situation where the link confidentiality performance represented by Nodes 1, 2, and 3 needs to be maintained, and the second is a situation where the eavesdropper threat represented by Node 4 is low. It can be seen that the time scheduling coefficient of each time slot of Node 4 across the whole cycle time is within the range of [0.4,1]. As the information leakage risk of the node is low, part of the computation task can be offloaded to the auxiliary computation UAV even if the transmission channel condition is general. The three nodes in the first case are closely related to the trajectory and working mode of the UAV. Each index of the joint optimization algorithm affects the other, and the time scheduling coefficient is closely related to the channel condition of legitimate links and eavesdropping links.   Figure 5 shows the convergence of the proposed joint optimization Algorithm 2 and benchmark algorithm when the cycle time T=60 s. Compared with the benchmark scheme, the SEE of the scheme is improved by 38.5%. Figure 5 shows that the SEE of the system increases with the number of iterations, and the algorithm converges after approximately 14 iterations.   Figures 6 and 7 show the curves of the system security energy efficiency and security transmission rate performance versus the UAV task time T under different schemes. The simulation results show that compared with the noP optimization scheme and the noQ optimization scheme of the benchmark schemes, the proposed joint optimization scheme can achieve better performance of the system, and it is an effective means to improve the security performance of the system while taking into account the energy efficiency. Under the two performance metrics of system security energy efficiency and security transmission rate, the performance ranking of the three schemes is joint optimization scheme>noP optimization scheme>noQ optimization scheme. In addition, it can be found from the curve trends in the two figures that, with the increase in cycle time, the security transmission rate performance of the system increases linearly, whereas the security energy efficiency of the system increases slowly. Therefore, it can be concluded that blindly increasing the task time will not only improve the system transmission rate, but also bring more energy consumption, and the system energy efficiency will gradually become stable.

Conclusions
The security energy efficiency of a mobile edge computing system based on a multifunctional UAV was studied. According to the channel environment of the location, the UAV selects a working mode between auxiliary calculation and active interference to maximize the offloading rate of legal links on the premise of ensuring channel security. Under the conditions of time scheduling constraints, UAV maneuverability constraints, uplink maximum transmit power, and computational performance constraints, a block coordinate descent algorithm based on the update rate, continuous convex optimization approximation algorithm, and Dinkelbach algorithm were used to jointly optimize the time scheduling, transmission rate, task amount, and UAV trajectory of each node in order to maximize the security energy efficiency of the system. The simulation results verified the rationality and effectiveness of the joint optimization scheme.

Data Availability Statement:
The data presented in this study are available in Table 2.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

Appendix A. SCA Algorithm
Through continuous convex optimization approximation, the non-convex function in the original problem can be transformed into its convex upper bound or concave lower bound, and finally the sub-optimal solution of the original problem can be obtained through multiple iterations. In each iteration of continuous convex optimization approximation, there needs to be a set of known feasible solutions, which are generally the optimal solutions obtained in the last iteration. For the first iteration, you need to set a set of initial values, and the selection of initial values will also affect the convergence speed of the iteration. The common method for boundary transformation of non-convex functions is first-order Taylor formula. If f (x) is a convex function of variable x, then for any given initial point x 0 has That is, the first order Taylor expansion of f (x) at the initial point x 0 is its affine lower bound. Similarly, if f (x) is a concave function of variable x, the affine upper bound of f (x) can be obtained.