Latency-aware secure transmission in MEC-assisted HSR communication systems

Mobile edge computing can provide short-range cloud computing capability for the mobile users, which is considered to be a promising technology in 5G communication. The mobile users offload some computing tasks to the edge server through the wireless backhaul link, which can reduce the energy consumption and the time latency. Meanwhile, due to the open characteristics of the wireless channel, the offloading tasks through the backhaul link may face the risk of eavesdropping. Therefore, the secure transmission based on physical layer security for the offloading tasks to the edge server is considered. The optimization problem of minimizing the energy consumption for the vehicular stations (VSs) in mobile edge computing-assisted high-speed railway communication system is studied in this paper. The energy consumption of the mobile users is generated by executing the local computing task and by transmitting the partial offloading task to the edge server. In this paper, a novel joint iterative optimization algorithm is proposed. By jointly optimizing the task scheduling, the task offloading and the transmission power, the energy consumption of all VSs is minimized under the constraint of the time latency. Numerical simulation results verify the effectiveness of the proposed algorithm.

(1) The MEC-assisted HSR wireless communication system is considered, and the energy consumption minimization of multiple VSs based on task offloading is studied. The optimization variables include the amount of the scheduled task of each VS, the task offloading ratio and the transmission power. The constraints conditions include the local computing time, the task offloading time, the security rate, the transmission power, the task offloading ratio and so on. (2) Because the optimization variables task scheduling, task offloading ratio and transmission power are coupled with each other, the optimization problem of minimizing energy consumption is difficult to solve. By fixing two of the three variables, we decompose the original problem into three sub-problems, namely task scheduling sub-problem, task offloading ratio sub-problem and power control sub-problem. (3) For the task scheduling sub-problem, a solution based on interior point method is proposed. For the task offloading ratio sub-problem, we give the closed form expression of the optimal solution. For the non-convex power control sub-problem, by introducing the auxiliary variables and using the successive convex approximation, the non-convex optimization problem is transformed into a convex optimization one, which can be easily solved by CVX. At last, a novel iterative algorithm for minimizing energy consumption is proposed.
The rest of this paper is organized as follows. In Sect. 2, the MEC-assisted HSR communication system model and the latency-aware energy optimization problem are presented. According to the presented system model, Sect. 3 designs an efficient iterative algorithm to minimize the energy consumption problem which is a joint optimization problem of task scheduling, offloading and power control. Then, the simulation results and discussion are given in Sect. 4. Finally, Sect. 5 concludes this paper.

Related work
Although the mobile devices have been very intelligent now, they are still limited by the computing ability and battery capacity. Some applications which need a large amount of computing workload lead to much battery energy consumption. In addition to the limited battery capacity, the CPU processing, memory and storage capacity will also affect the smooth execution of some applications on the mobile devices. The computing-intensive tasks can be offloaded to the adjacent cloud servers or the edge servers, and the servers are all equipped with powerful computing resources. The computing offloading problem in MEC for a single user was investigated in prior works. The minimization of energy consumption of the mobile users under the constraints of the average latency was considered in [21]. Using the dynamic offline programming method, the two solutions of the deterministic one and the random one were designed to find the optimal wireless scheduling and task offloading strategy. Simulation results showed that the dynamic offline programming algorithm could make the mobile users get the optimal energy efficiency. A fine-granularity task offloading method to minimize the system energy consumption was proposed in [22], and the strict latency constraint was also ensured. A practical multi-task application was modeled as a general graph topology. The original task offloading problem was transformed into a mathematical 0-1 programming problem. A binary particle swarm optimization (BPSO) algorithm with a low computational complexity was proposed to solve this problem. Simulation results showed that the proposed algorithm could save more energy than the simple local execution strategy and the traditional rough-granularity task offloading strategy. The base station could transmit energy to the mobile device or receive the computing offloading from the mobile device, and the single mobile device could harvest energy to be local computing or offload data to the base station [23]. Under the constraints of energy harvesting and deadline, the optimization goal of the designed strategy was to maximize the probability of successfully computing the given data. The optimization problem was equivalently transformed into minimizing the energy consumption caused by local computing and maximizing the energy saving caused by offloading, and the closed solution was given. The joint task scheduling and computing offloading for multicomponent applications were introduced in [24], and the component offloading and the scheduling order were studied. The proposed optimization decision strategy changed from the predetermined compiler scheduling order to the radio scheduling order. For some component correlation graph structures, by processing some components in parallel in the mobile device and the cloud, the proposed strategy reduced the execution time of the components. The cooperative task execution between a mobile device and a cloud server in random wireless channel was investigated in [25]. A mobile application consisted of a series of tasks that could be processed on the mobile device or the cloud server. An efficient scheduling strategy was designed to minimize the energy consumption of mobile devices under the minimum latency constraint. For a practical sequentially executed task model, the proposed exhaustive search method obtained the optimal solution, and the proposed adaptive lagrangian relaxation-based aggregated cost algorithm achieved the approximate solution.
The computing offloading and resource allocation for multi-user are further studied in some recent works. Labidi et al. [26] studied minimizing the energy consumption in multi-user small cell network systems through joint radio resource scheduling and computing offloading. An optimal scheduling and offloading method was proposed by using the deterministic method. In this method, only one user was selected for scheduling and computing offloading at each time slot, and the other mobile users were local computing or idle state. Zhang [27] considered the MEC-assisted multi-user multi-task 5G heterogeneous network; an optimization problem to minimize the system energy consumption was formed while satisfying the latency constraint. The system energy consumption was generated by task computation and partial offloading task transmission. In order to reduce the complexity of multi access characteristics, a three-stage computing offloading scheme was designed. This scheme adopted the type classification and priority allocation for the mobile devices; the energy-efficient optimization problem could be solved with polynomial complexity. A computing offloading strategy based on improved particle swarm optimization (PSO) method was proposed for MEC-assisted 5G communication system in [28]. The latency minimization optimization problem was formulated, and the energy consumption was the constraint condition. By introducing the penalty function to balance the time delay and the energy consumption, the proposed computational offloading algorithm could reasonably allocate the offloading task to the related edge server. Simulation results showed that under the same energy constraints, compared with all local execution algorithm, MEC random algorithm that randomly assigns the execution task between the local user and the MEC server, and particle swarm optimization algorithm, the proposed algorithm had lower system cost. A multiple users single edge server computing offloading system was considered, and each user had different computing offloading [29]. Under the constraint of computation latency, the weighted sum of energy consumption of mobile users was a convex optimization problem. For the derived offloading priority function, the optimal algorithm has a threshold based structure. According to the user's channel state information and the energy consumption generated by local computation, the algorithm assigned different priorities to the users and performed different computing offloading. In order to reduce the iterative complexity of the algorithm, a suboptimal resource allocation algorithm was also proposed. The minimizing energy consumption through the resource allocation in wireless cloud access network was researched in [30]. Under the constraints of task execution time, transmission power, computing capacity and front-end transmission data rate, the formulated energy consumption minimization problem was a nonconvex optimization one. The nonconvex optimization problem was reconstructed into an equivalent convex optimization one by the weighted least mean square error method. Simulation results showed that the proposed iterative algorithm reduced energy consumption and improved system performance. Multiple mobile users multi-cell multiple-in multiple-out (MIMO) system with a cloud server was considered in [31]; the energy consumption minimization problem with the latency constraint by jointly optimizing the transmitting precoding matrices and the CPU cycles was studied. The formulated optimization problem was non-convex and intractable to solve. A novel iterative algorithm by using successive convex approximation was proposed to achieve a local optimal solution, and the proposed algorithm could run in a distributed manner at multiple wireless access points.
In this paper, the computing offloading strategy of multiple VSs and multiple edge server in MEC-assisted HSR communication system is considered; under the constraints of the safe computing task offloading, transmission latency and transmission power, a novel iterative algorithm to minimize the total energy consumption of multiple VSs is proposed.

System model
We consider a MEC-assisted HSR communication system that consists of K single antenna VSs installed on the train roof, the roadside base station (RBS) having a MEC server and one eavesdropper. All RBSs are deployed at regular intervals and the set of VSs is defined as K = {1, 2, . . . , K } . All base stations and the eavesdropper are configured with single antenna. Suppose that the running speed of the train is a uniform speed v within a distance. In this region, the running time is equally split into N time slots for the sake of convenience. Thus, we get the equation L = NTv where T is the length of a time slot, L is the running distance and the set of time slots is defined as N = {1, 2, . . . , N } . The system model is illustrated in Fig. 1.
In time slot n, VS k has the tasks m k [n] to be processed. With the partial offloading protocol, the computing tasks are divided into two parts: η k [n]m k [n] offloading tasks that are securely offloaded to the RBS and executed by MEC server and local computing tasks that are computed locally where η k [n] is the offloading ratio. To avoid interference among VSs during tasks offloading, each time block is equally divided into K time slots where each time slot only allows one VS to offload its tasks to the RBS. Thus, for each VS, T K is the time spent on offloading in each time slot n ∈ N . For VS k in time slot n, the local computing time can be expressed as where f k [n] denotes the CPU frequency of VS k and C k [n] is the number of CPU cycles required for VS k to compute one bit of computing tasks locally [32].
For VS k in time slot n, the energy consumption for executing local computing tasks can be represented as where ̟ k is the effective capacitance coefficient which depends on the chip architecture at VS k [33].
We consider the inter-channel interference (ICI) caused by Doppler effect to the highmobility train, which is treated as a part of white noise. Thus, the Doppler interference factor P ICI is expressed as where J 0 (·) is the zeroth-order Bessel function of the first kind, f d is the maximum Doppler frequency and T s is the symbol duration. When VS k needs to transmit the tasks to the associated RBS in time slot n, the achievable data rate of the uplink transmission from VS k is given by where p k [n] denotes the transmission power from VS k to the associated RBS at time slot n, h k [n] represents the uplink channel gain from VS k to the associated RBS at time slot n and σ 2 k is the noise power. The data rate for the eavesdropper to eavesdrop the signal from the VS k can be given as where g k [n] represents the uplink channel gain from VS k to the eavesdropper at time slot n and σ 2 e is the noise power. The secrecy rate is given by [34] where For VS k in time slot n, the offloading time can be expressed as where B is network bandwidth. For VS k in time slot n, the energy consumption for transmitting the computing tasks to the associated RBS can be represented as where P c represents the hardware power dissipated in all other hardware components of the communication system.
It is assumed that the computing capability of MEC server is infinite and the time spending on MEC and the downlink transmission is disregarded. The total energy consumption for VS k in time slot n can be given by

Problem formulation
In this paper, we jointly optimize the task scheduling m {m k [n], ∀k, n} , the offloading ratio η {η k [n], ∀k, n} and the power control vector p {p k [n], ∀k, n} , so that the sum of all VSs' energy consumption during the time T is minimized. The problem can be formulated as where R min k is the minimum quality of service (QoS) requirement for VS k, M k is the task of VS k that needs to be processed in the time T, and p max k represents the maximum transmit power of VS k. Constraint (10b) guarantees the QoS of VS k. Constraint (10c) is to ensure that the total task from VS k is processed within the time T. Constraint (10d) and constraint (10e) indicate that the time spent in local computing and task offloading cannot be more than the maximum tolerance time, respectively.
The joint task scheduling, offloading ratio and power control problem in P1 have some challenges to solve, since three key variables are coupled in P1. To solve P1, we decompose P1 into three kinds of subproblems by fixing two of three classes of variables alternately.

Task scheduling subproblem
When the power control vector p and the offloading ratio η are fixed, the optimization problem P1 can transformed into K task scheduling subproblems, where the subproblem for VS k is given as For convenience, the optimization objective in P2 is simplified as . The constraint (11c) and constraint (11d) can be rewritten as Therefore, the following inequality is obtained.
Since P2 is a linear programming problem, we solve it by using interior point method. By applying the log-barrier method, P2 is transformed into an unconstrained optimization problem where the optimization objective is given by (11b) , The detailed solving process is described in Algorithm 1.

Offloading ratio subproblem
When the power control vector p and the task scheduling m are fixed, P1 can be split to N subproblems, which is equivalently formulated as For convenience, the optimization objective in P3 is rewritten as The constraint (21b) and constraint (21c) can be rewritten as . It is trivial to verify that the optimal solution of the offloading ratio is given as for ∀k ∈ K.

Power control subproblem
When m and η are given, P1 is split to NK subproblems, which is equivalently formulated as

Constraint (25c) can be rewritten as
Since the objective function in P4 is non-convex, P4 is transformed as P4.1 by introducing the auxiliary variables χ k [n], k ∈ K, n ∈ N .
In P4. 1 Constraint (28) is relaxed as the following two constraints by introducing the auxiliary variables ϕ k [n], k ∈ K, n ∈ N . and Since f 1 and f 2 are concave functions, ) is a form of subtraction of two concave functions. We adopt the successive convex approximation (SCA) technique to re-express (29) in the (t + 1)-th iteration, which is given by The first item in inequality (30) is coupled with respect to the optimization variables. Its first-order Taylor expansion around a feasible point (χ t k [n], ϕ t k [n]) at the (t + 1)-th iteration is given as (28)  (29) Thus, constraint (30) is derived as a further tight constraint (33) at the (t + 1)-th iteration.
To convexify (27b), the first-order Taylor expansion of the first two items in (27b) around a feasible point p t k [n] at the (t + 1)-th iteration is given and (27b) is derived as a further tight constraint (34) at the (t + 1)-th iteration.
According to the above analysis, problem P4.1 is reformulated as P4.2, i.e., which is a convex optimization problem and can be solved by CVX effectively. (32)

Algorithm description
In Algorithm 1, the task scheduling m with the given η and p is optimized, and in Algorithm 2, the joint offloading ratio and power control (η, p) with the given m are solved. The joint iterative optimization procedure is presented in Algorithm 3.
In step 5 of Algorithm 2, we can obtain the solution p t to P4.2 with the feasible points p t−1 , χ t−1 and ϕ t−1 . As the iterative number increasing in step 6 and step 7, the feasible points are updated and the feasible region is enlarged with the SCA method. When p t = p t−1 , we have φ 4.2 (p t−1 , m t−1 , η t−1 ) ≥ φ 4.2 (p t , m t−1 , η t−1 ) , where p t is the globally optimal solution for P4.2 with fixed m t−1 and η t−1 . Since P4.2 is equivalent to P4, the inequality φ 4 (p t−1 , m t−1 , η t−1 ) ≥ φ 4 (p t , m t−1 , η t−1 ) holds. In Algorithm 2, the obtained solutions between inner loop and outer loop have the following relationship: In Algorithm 3, the obtained solutions in step 2 and step 3 have the following relationship: It is obviously obtained that φ 1 is monotonically non-increasing with respect to the iteration number and is lower bounded by a finite value. Therefore, Algorithm 3 is guaranteed to converge.

Simulation results and discussion
In this section, numerical simulations are performed by MATLAB software to validate the efficiencies and performance of the proposed algorithm, which is used to solve the joint task scheduling, offloading ratio and power control problem for latency-aware secure transmission in MEC-assisted HSR communication systems.

Simulation configuration
We consider a railway segment of length L = 500 m where B = 2 RBSs are deployed [35]. is ̟ k [n] = 10 −28 [36]. Specifically, simulation parameters and values are listed in Table 1. Unless otherwise specified, these values are used in the sequel.  Figure 3 shows that under the same rate, the more the tasks to be processed, the more the total energy consumed by VSs. When the train speed is 80 m/s, the total energy consumption  in both cases reaches the minimum values, which are 0.32 J and 0.27 J, respectively. When the train speed is 70 m/s, the maximum energy consumption of the above curve is about 0.34 J. When the train speed is 65 m/s, the maximum energy consumption of the following curve is about 0.29 J. Because there are many factors involved in the energy consumption of VSs, the total energy consumption of VSs does not change monotonically with the rate. Figure 4 gives the variation in the total energy consumption versus the speed of train under different distances between eavesdropper and VS, where the tasks are M1 = 2.25 Mbits and M2 = 2.35 Mbits, respectively. The short distance between eavesdropper and VS means that the coordinates of the eavesdropper are [240, 28,10], while the long distance between eavesdropper and VS means that the coordinates of the eavesdropper are [440, 70, 10]. As shown in Fig. 4, for the same rate, the energy consumption in the short distance is more than that in the long distance. This is because the secrecy rate in the short distance is less than that in the long distance. If the same offloading task is transmitted, more energy will be consumed. If fewer tasks are offloaded, the VS itself needs to process more local tasks and consume more energy, so it cannot obtain more task offloading gain. Therefore, offloading tasks need to be allocated according to the specific conditions. Figure 5 illustrates the obtained task scheduling solution and the corresponding offloading ratio by performing the proposed algorithm; the eavesdropper is far away from VSs, where the tasks are M1 = 2.25 Mbits and M2 = 2.35 Mbits, respectively. The left subfigure of Fig. 5 shows the amount of tasks to be processed by each VS in each time slot, and the right subfigure shows the task offloading ratio of each VS in each time slot. In the first time slot, each VS offloads 70% of the tasks to the RBS. In the second slot, VS1 and VS2 offload all tasks to RBS without performing any local computation. In the third time slot, VS1 offloads all tasks to RBS, and VS2 offloads 80% of tasks to RBS. In the fourth time slot, VS1 offloads 95% of the tasks to RBS, and VS2 offloads all the tasks to RBS. Figure 6 gives the obtained task scheduling solution and the corresponding offloading ratio by performing the proposed algorithm; the eavesdropper is far away from VSs, where the tasks are M1 = 2.06 Mbits and M2 = 2.16 Mbits, respectively. As can be seen from the left subfigure of Fig. 6, there are the most tasks in the first time slot, and  Fig. 6 Obtained task scheduling solution and the corresponding offloading ratio when the task size is set to a small value in the time T there are almost the same tasks in the other three time slots. In the first time slot, VS1 offloads 70% of the tasks to RBS and VS2 offloads 75% of the tasks to RBS. In the remaining three time slots, VS1 and VS2 offload all tasks to RBS without performing any local computation. Compared with Figs. 5 and 7 shows the task scheduling solution and corresponding offloading rate obtained when the eavesdropper approaches the VSs, where the tasks are M1 = 2.25 Mbits and M2 = 2.35 Mbits, respectively. In the first time slot and the third time slot, the allocated tasks are the same as that in Fig. 5. In the second time slot, VS1 offloads 95% of the tasks to RBS, and VS2 offloads all the tasks to RBS. In the fourth time slot, VS1 and VS2 offload all tasks to RBS. As shown in Figs. 5, 6 and 7, in each time slot, when the allocated tasks by each VS are less than 0.5 Mbits, the VS offloads all tasks to the RBS. When the assigned tasks to each VS are greater than 0.5 Mbits, some tasks will be computed locally.

Conclusion
In this paper, MEC-assisted HSR wireless communication system was considered, and the energy consumption minimization of multiple VSs based on task offloading was studied. Due to the optimization variables including task scheduling, task offloading ratio and transmission power are coupled with each other; the optimization problem of minimizing energy consumption was intractable to solve. By fixing two of the three variables, we decomposed the original problem into three sub-problems. By introducing the auxiliary variables, the sub-problems were solved by interior point method and successive convex approximation algorithm. On this basis, an iterative energy consumption minimization algorithm was proposed.