Computation offloading and resource allocation for UAV-assisted IoT based on blockchain and mobile edge computing①
2022-04-07ZHAOChengze赵铖泽LIMengSUNEnchangHUORuLIYuZHANGYanhua
ZHAO Chengze(赵铖泽), LI Meng②, SUN Enchang, HUO Ru, LI Yu, ZHANG Yanhua
(*Faculty of Information Technology, Beijing University of Technology, Beijing 100124, P.R.China)
(**Beijing Laboratory of Advanced Information Networks, Beijing 100124, P.R.Chna)
(***Chongqing Key Laboratory of Intelligence Perception and Blockchain Technology,Chongqing Technology and Business University, Chongqing 400067, P.R.China)
Abstract Recently, Internet of Things (IoT) have been applied widely and improved the quality of the daily life. However,the lightweight IoT devices can hardly implement complicated applications since they usually have limited computing resource and just can execute some simple computation tasks.Moreover, data transmission and interaction in IoT is another crucial issue when the IoT devices are deployed at remote areas without manual operation. Mobile edge computing (MEC) and unmanned aerial vehicle (UAV) provide significant solutions to these problems. In addition, in order to ensure the security and privacy of data, blockchain has been attracted great attention from both academia and industry. Therefore, an UAV-assisted IoT system integrated with MEC and blockchain is proposed. The optimization problem in the proposed architecture is formulated to achieve the optimal trade-off between energy consumption and computation latency through jointly considering computation offloading decision, spectrum resource allocation and computing resource allocation. Considering this complicated optimization problem,the non-convex mixed integer problem can be transformed into a convex problem, and a distributed algorithm based on alternating direction multiplier method(ADMM) is proposed. Simulation results demonstrate the validity of this scheme.
Key words: Internet of Things (IoT), unmanned aerial vehicle (UAV), mobile edge computing (MEC), blockchain, alternating direction multiplier method (ADMM), resource optimization
0 Introduction
Based on the continuous advancement of communication technologies, Internet protocols, radio frequency identification (RFID), smart sensors, and so on, the rapid development of the Internet of Things(IoT) has attracted a lot of attention from academia and industry[1]. The emergence of the IoT makes it possible that the information can communicate and interact between different objects without manual operation. At present, IoT is mainly applied in the area of business, industry, and public services[2-3]. Meanwhile, the deployed IoT devices can collect data needed by different services, such as traffic management,environmental monitoring, smart home and wearable devices, which have been widely used in daily life[4].
However, lots of IoT devices just have limited computation capability, so they cannot process the collected data information and implement complicated applications[5]. The emergence of mobile edge computing(MEC) makes it possible to solve the above problems[6]. MEC introduces computing and storage resources into the edge of mobile network, which enables it to process data information with more computing resources and meets the sensitive delay requirements[7].The distributed MEC servers can make computing resources closer to users and avoid the unnecessary energy resources by offloading computation tasks[8-9].
In addition, for the IoT devices deployed at remote area without human control, data interaction or computation tasks offloading is another inevitable problem when the transmission link is destroyed. Fortunately, the emergence of unmanned aerial vehicle (UAV)provides an effective solution to this problem. Recently, the widespread application of UAV also attracts extensive attention in lots of research reports[10-12]. Especially, the mobility of UAV can make it closer to the devices, which brings rapid and convenient network access point for the IoT devices[13]. At the same time,the UAV equipped with micro central processing unit(CPU) can also provide lightweight computing resources. Therefore, the integration of UAV and MEC has been used in many outstanding research work[14-16], which effectively promotes the development of the IoT.
Introducing MEC and UAV into IoT brings the great advantages, however, it has to face huge challenge about the security and privacy of data. As another promising technology, blockchain is considered and introduced in the proposed network architecture.Blockchain is essentially a decentralized and distributed ledger database, which is an Internet system without central server and relying on user groups to exchange information[17-18]. Therefore, it has the characteristics of decentralization, unforgeability and security, which makes it naturally used in the distributed IoT system[19]. For example,in Ref.[20],the blockchain technology is applied in the process of data acquisition,which the data is transmitted to the blockchain of MEC server and saved safely.
Although several excellent work has been done on MEC, blockchain as well as UAV in IoT, they are generally considered separately in the existing work.Nevertheless, the combination of blockchain and MEC in UAV-assisted IoT system still faces great challenges.For example, the offloading decision of computation tasks by the UAV cannot be ignored since the UAV just has limited computational capability. Another important problem is to balance the consumption of energy and time in MEC and blockchain system by considering the allocation of spectrum and computing resources.Moreover, considering the limited hovering time of the UAV and the complex network architecture, the selection of optimization method needs to be decided carefully.
In order to solve the above problems and challenges, a joint resource optimization framework for UAVassisted IoT system with MEC and blockchain is proposed. In the proposed network architecture, UAV is introduced into IoT as a relay to offload computation tasks from IoT devices to base station (BS). In addition, MEC is proposed and employed to offer computing resources and execute complicated computation tasks, however, due to the dispersion of MEC, data information is likely to be abused by malicious MEC servers, resulting in information leakage, so the blockchain technology is introduced and applied to protect data security and privacy. Meanwhile, this paper jointly considers and formulates the optimization problem about the computation offloading decision, resource allocation of spectrum and computation,and achieves the optimal trade-off between energy consumption of MEC system and computation latency of blockchain system.Since the formulated optimization problem is a nonconvex mixed integer problem, the alternating direction multiplier algorithm (ADMM) is adopted to solve this problem efficiently.
The rest of this paper is organized as follows. Section 1 introduces the proposed system model, and the joint optimization problem of computing offloading decision, spectrum resource allocation and computing resource allocation are proposed. Then, ADMM-based algorithm is adopted to solve the problem in Section 2.In Section 3, the simulation results are given and discussed. Finally, the conclusion of this paper and the future work are summarized in Section 4.
1 System model and problem formulation
In this section, the proposed system architecture is introduced at first, and the related models are depicted in detail. Then an optimization problem is formulated to achieve optimal energy consumption of the MEC system and computation latency of the blockchain system.
1.1 System architecture
As shown in Fig.1, an UAV-assisted IoT system is considered, which includes MEC system and blockchain system. For the MEC,Ois defined as the geometric center of all IoT devices. It is assumed that there areMIoT devices in total, and the location of the IoT devices can be denoted by {xm,ym, 0},m∈M= {1,2,…,M}.Meanwhile, there areNUAVs flying above the target area and staying in the fixed positions,and the location of the UAVs can be denoted by {xn,yn,h},n∈N= {1,2,…,N}. Tnis defined as the hovering time of thenth UAV. In addition, the location of the BSs is fixed at {xb,yb, 0}, each BS is equipped with an MEC server. Specially, in this paper, it is assumed that each BS only serves one UAV.IoT devices can offload data to UAVs, or UAVs can transmit data to BS for computation as relay nodes.
Fig.1 UAV-assisted IoT system with MEC and blockchain
Moreover, for the blockchain system, BSs can act as blockchain nodes, which are responsible for the block generation and consensus process to handle the transactions such as computation offloading records from MEC system. Besides, any node in the blockchain system can participate in recording these transactions to achieve data sharing. The new block becomes a valid block when the network reaches a consensus,then the generated block will be broadcasted to the blockchain system.
1.2 Communication model
This paper definesamn∈{0,1},∀m,nas the computation offloading decision of UAVn.If the computation task is executed on the UAV, thenamn= 0.If the data is offloaded and transmitted to the BS via the UAV, thenamn= 1.In this paper, It is assumed that there is no interference between IoT devices served by the corresponding UAV. Since the size of the computation outcome data is much smaller than the size of the computation input data, the time and energy consumption for BS transmitting computation outcome to UAV and UAV transmitting computation outcome to IoT devices are neglected.
LetDmndenote the amount of data that themth IoT device transmits to thenth UAV , andCmnstands for the total number of the CPU cycles required to complete the computation task, thus letWmn(Dmn,Cmn) represent the computation task. Then,the proposed communication model between UAV and BS is discussed and given as follows.
1.3 Computation model
1.3.2 Executing computation task on BS
LetFdenote the total computational capability of an MEC server. The percentage of computing resources allocated to themth IoT devices by BS is expressed as
1.4 Blockchain model
There areNconsensus nodes to complete the block generation and consensus process in the blockchain system. In this paper, practical Byzantine fault tolerance (PBFT) consensus mechanism is adopted. It is assumed that generating or certifying one signature,generating or certifying one message authentication code (MAC) requireϑandθCPU cycles, respectively. The detailed steps are as follows.
First, the nodes in the blockchain collect transactions such as computation offloading records from MEC system. When the primary node receives the transaction, it needs to check the signature and MAC.φis denoted as the number of transactions that can be included in a block, andgis a proportion of the correct transactions. Then the computation cost of the primary node is calculated as
1.5 Problem formulation
where,C1 is proposed to ensure that the UAV must offload the data to the BS, unless it chooses to execute the computation task solely;C2 ensures that the sum of spectrum allocated to all the computation tasks offloaded to the BS cannot exceed the total available spectrum of each BS;C3 ensures that the sum of the computational capability of MEC server required for computation tasks of all related IoT devices and the computational capability of the blockchain node cannot exceed the total computational capability of an MEC server;C4 indicates that the total time consumption of data computation and data offloading should not exceed the hovering time for each UAV.
2 Design of resource allocation and optimi-zation
In this section, the optimization algorithms is designed for computation offloading decision of UAVs,spectrum resource allocation and computing resource allocation to solve Eq.(24).
2.1 Computation offloading decision and resources allocation in the MEC system
For the MEC system, the minimum energy consumption can be obtained by solving the following problems.
2.1.1 Problem transformation
Since the value ofamnis 0 or 1, the proposed optimization problem is not a convex problem, but a mixed integer nonlinear programming problem. Therefore, it
Then the global consensus problem of Eq.(26)can be represented as
It can be seen that the objective function is separable for all UAVs from Eq.(30), which enables each UAV can deal with its own sub-problems independently. And the global association variables are still coupled in the consensus constraints. Next, ADMM will be adopted to solve the problem in a distributed way.
2.1.3 Distributed optimization algorithm based on ADMM An optimization algorithm is proposed to solve the problem of joint computation offloading decision, spectrum resource allocation and computing resource allocation through ADMM. The augmented Lagrangian of Eq.(30) is
20. White: White symbolizes light, innocence78 and purity (Matthews 1986). White is also associated with faith and peace. It is a recurring79 color in this version of the tale and is frequently mentioned. With the exception of the witch s red eyes, it is the only color mentioned.Return to place in story.
Iteration step Eq.(32) can be executed by each UAV because it is completely separable for each UAV.However, the iteration Eq.(33) and iteration Eq.(34)with respect to global variables and Lagrange multipliers need to be executed by the MEC system. Next,each step will be discussed to solve these iterations.
Step 1 Local variables update. In the iteration Eq.(32), the problem is decomposed intonsub-problems, which can be solved by an UAV. At iteration[t+1], each UAV solves the following equivalent optimization problems after removing the constant terms:
Obviously, It can be observed that Eq.(35) is a convex problem.
Step 2 Global variables and Lagrange multipliers update. Since the quadratic regularization term is added in the augmented Lagrange Eq.(31), it can be seen that Eq.(33) is a strictly convex problem, which is unconstrained. The result can be got by setting the gradients to zero, Eq.(36) can be got:
At each iteration, the global variables can be got according to the average value of the corresponding local copies in all UAVs.
2.1.4 Algorithm stopping criterion
In the implementation process of the algorithm, a reasonable stopping criterion is adopted that the residuals of the primal feasible condition and the dual feasible condition should be small in iteration [t+ 1],which are given as
whereυpri> 0 andυdual> 0.It is setυpri=υdual=0.0001.
Based on the above discussion, the optimal decision for computation offloading,spectrum resource allocation and computing resource allocation can be obtained while achieving the minimum energy consumption of MEC system. Algorithm 1 summarizes the details of the proposed distributed algorithm based on ADMM.
Algorithm 1 ADMM-based resource optimization and scheduling algorithm for UAV-assisted IoT system 1: Initialization 1) The MEC system determines the stopping criterion threshold υpri and υdual;2) The feasible global solution is initialized by the MEC system and transmitted to each UAV;3) Each UAV collects information about the IoT devices associated with it;4) Each UAV determines its initial Lagrange multipliers vectors{αn[0],βn[0],ωn[0]},and sends them to the MEC system;t = 0.2: Iterations
Repeat 1) Each UAV updates its local variables {^an,^en,^kn}[t+1]n∈N according to Eq.(35), and the information is transmitted to the MEC system;2) The MEC system updates global variables {a′,e′,k′}[t+1],and the information is transmitted to each UAV;3) The MEC system updates Lagrange multipliers 58, and the information is transmitted to each UAV;t = t +1;Until stopping criteria Eq.(39) and Eq.(40) are satisfied.3: Output the optimal solution{a′,e′,k′}*.
2.2 Computing resource allocation in the blockchain system
After obtaining the optimal decision for computation offloading, spectrum resource allocation and computing resource allocation in the MEC system,Eq.(24) can be simplified as the optimization of CPUcycle frequency of the blockchain node, which is given as
Based on the above discussion and analysis, the optimal CPU-cycle frequency of the blockchain nodencan be obtained in the blockchain system while achieving the minimum computation latency of blockchain system.
3 Simulation results and discussions
In this section, the system performance is considered under the proposed scheme from different aspects.At first, the simulation environment and parameters are described. Then the simulation results and the performance comparison of the proposed algorithm under different parameter settings are given and discussed.
3.1 Simulation parameters
The simulation environment with 4 UAVs, 4 BSs and 16 IoT devices. The BSs and IoT devices are uniformly distributed within a 2D area of 50 ×50 m2, and the position of the UAVs is fixed,with a height of 6 m.Other simulation parameters are shown in Table 1.
Table 1 The simulation parameters
In addition, the following six schemes are mainly considered for comparison. A1 is the joint design of computation offloading decision, spectrum resource allocation and computing resource allocation. A2 is the scheme with spectrum resource uniformly allocated. A3 is the scheme with computation resource uniformly allocated. A4 is the scheme with random offloading. A5 is the scheme with general linear programming. A6 is the scheme with spectrum and computation resource uniformly allocated.
3.2 Simulation results
First, the convergence of the proposed ADMMbased algorithm is discussed. The convergence performance of different parametersρis shown in Fig.2.The four iterative processes correspond toρ= 0.8,ρ= 0.08,ρ= 0.008 andρ= 0.0008.It can be seen that the total utilities decrease dramatically in the first 3 0 iterations and gradually reach a stable state within the first 45 iterations, which indicates that the convergence performance based on the proposed algorithm can converge quickly. It can also be found that these four iterative processes eventually converge to the similar utility values. Moreover, with the increase of the value ofρ,the iterative process converges rapidly.
Fig.2 Convergence progresses of ADMM-based algorithm with different values of ρ
The convergence performance of the different schemes is shown in Fig.3. From Fig.3 it can be observed that as the iteration index increases, the total utility decreases and reaches the stable state, which proves that the proposed algorithm has good convergence performance. Although the scheme with uniform spectrum allocation converges faster than the proposed scheme in the simulation environment, the total utility of proposed scheme is smaller than the other four schemes. The reason is that the reasonable spectrum resource allocation can reduce the loss of communication energy, and reasonable computing resource allocation can reduce the computing energy and the computation delay. In addition, it is also found that the general linear programming scheme is not an optimization scheme based on iterative algorithm, so the performance is worse than other schemes.
Fig.3 Total utility under different schemes
Fig.4 shows the value ofQwith respect to the increasing data size under different schemes. As Fig.4 shows, with the increasing of data size, the values ofQincrease in all schemes. The reason is that the time consumption of data offloading increases with the increasing of data size, and the energy consumption of data offloading also increases accordingly, which affects the value ofQ.In addition, it can be observed that the value ofQin the proposed scheme is always lower than other schemes. The specific reasons are that uniform resource allocation usually cannot reach the optimal trade-off, random offloading ignores the computational efficiency, and the general linear programming ignores the difference of local states.
Fig.4 The value of Q versus the data size of IoT devices under different schemes
In Fig.5, the relationship between the total energy consumption of MEC system and the number of UAVs is presented under different schemes. From this figure it can be observed that the total energy consumption of MEC system increases obviously with the increasing number of UAVs. Meanwhile, the proposed scheme performs better than other schemes reflected by the lower energy consumption. The main reason is that the computation tasks of the system are heavier when the number of UAVs increases, and more energy needs to be consumed.
Fig.5 Total energy consumption of MEC system versus the number of UAVs under different schemes
Next, the impact of different number of UAVs on the total time consumption of MEC system under different schemes is compared. It can be seen from Fig.6 that the total time consumption of all schemes increases as the number of UAVs increases. The reason is that the time cost of data computing and communication increases with the increasing data offloaded from IoT devices. Meanwhile, the proposed scheme has lower time consumption obviously. It can be also noted that the scheme with uniform spectrum resource allocation outperforms the other four schemes. This is because the computation resource allocation usually plays a more important role in time consumption.
Fig.6 Total time consumption of MEC system versus the number of UAVs under different schemes
Fig.7 investigates the impact of the computational capability on the total energy consumption of MEC system. As it can be seen,with the increase of MEC server computational capability, the total energy consumption of MEC system increases dramatically. The main reason is that the energy consumption is directly proportional to the computational capability, so the system consumes more energy as the computational capability increases under the same conditions. In addition, it is found that the growth rate of the scheme with uniform spectrum allocation and general linear programming are smaller than that in the other schemes since the scheme with uniform spectrum allocation achieves the optimal computation resource allocation and the scheme with general linear programming finds a balance between offloading decision and resource allocation, but the proposed scheme consumes less energy than the other schemes.
Fig.7 Total energy consumption versus MEC server computational capability under different schemes
Fig.8 shows the relationship between the total computation latency of blockchain system and the total computational capability of the MEC server. As can be seen from Fig.8, with the increasing of total computational capability of the MEC server, the total computation latency of blockchain system keeps decreasing gradually. Because for a given number of transactions,the computation latency decreases obviously with the increasing CPU-cycle frequency of the blockchain node. Furthermore,the computation latency of the proposed scheme is always lower than other schemes with the variation of MEC server computational capability.
Fig.8 Total computation latency of blockchain system versus MEC server computational capability under different schemes
4 Conclusions
In this paper, a resource optimization framework is proposed for UAV-assisted IoT system with MEC and blockchain technology, where the problem of data interaction and offloading between IoT devices and BSs is solved through introducing UAV technology. Meanwhile, in order to reduce energy consumption and ensure data security, MEC technology and blockchain technology are introduced. The computation offloading decision, computing resource allocation and spectrum resource allocation are jointly optimized to obtain the optimal trade-off between the energy consumption of MEC system and the computation latency of blockchain system. The mixed integer non-convex optimization problem is transformed into a convex problem, and then ADMM optimization algorithm is adopted to solve the problem effectively. Simulation results show the well effectiveness and convergence performance of the proposed scheme. Compared with other baseline schemes, the proposed scheme can reduce the energy consumption of MEC system and the computation latency of blockchain system significantly, as well as has better system performance. Future work is in progress to consider data caching or data sharing of UAV-assisted IoT with blockchain in the proposed framework.
杂志排行
High Technology Letters的其它文章
- Deep convolutional adversarial graph autoencoder using positive pointwise mutual information for graph embedding①
- A joint optimization scheme of resource allocation in downlink NOMA with statistical channel state information①
- Personalized movie recommendation method based on ensemble learning①
- An improved micro-expression recognition algorithm of 3D convolutional neural network①
- Resonance analysis of single DOF parameter-varying system of magnetic-liquid double suspension bearing①
- A load balance optimization framework for sharded-blockchain enabled Internet of Things①