Analytical offloading design for mobile edge computing-based smart internet of vehicle

In this paper, we investigate how to analytically design an analytical offloading strategy for a multiuser mobile edge computing (MEC)-based smart internet of vehicle (IoV), where there are multiple computational access points (CAPs) which can help compute tasks from the vehicular users. As it is difficult to derive an analytical offloading ratio for a general MEC-based IoV network, we turn to provide an analytical offloading scheme for some special MEC networks including one-to-one, one-to-two and two-to-one cases. For each case, we study the system performance by using the linear combination of latency and energy consumption, and derive the analytical offloading ratio through minimizing the system cost. Simulation results are finally presented to verify the proposed studies. In particular, the proposed analytical offloading scheme can achieve the optimal performance of the brute force (BF) scheme. The analytical results in this paper can serve as an important reference for the analytical offloading design for a general MEC-based IoV.

Another promising technique is the intelligent reflecting surface (IRS), which installs a lot of reflection units on the transmitter and receiver [3,14]. In the IRS systems, the transmission phase, amplitude and frequency can be adjusted to enhance the system performance significantly [15][16][17]. Moreover, the caching can be integrated into the wireless transmission system, which can help enlarge the dimension of the system resources [18]. In addition, resource allocation based on novel technologies can improve the system performance [19,20]. In further, some intelligent algorithms, such as the channel state information (CSI) feedback [21], federated learning [22], and reinforcement learning [23] can be applied to enhance the communication quality.
Besides the communication techniques, some new computing techniques should be developed to support the development of IoV systems. Cloud computing was proposed to help compute the intensive computational tasks through offloading the tasks to the cloud server, which however, causes a heavy overload and a severe issue of information leakage. Accordingly, mobile edge computing (MEC) has been proposed to set the computational access points (CAPs) nearby the users, which can effectively reduce the system latency and energy consumption [24,25]. In this direction, the authors in [26] investigated the impact of outdated CSI on the performance of MEC networks, through analyzing the system outage probability by taking into account the latency and energy consumption. Moreover, the performance of MEC networks in eavesdropping environments was studied in [27], where the deep Q-network (DQN)-based intelligent algorithms was proposed to devise the offloading strategy. In further, for the training networks with a large number of parameters, the network parameters can be split to be computed on different nodes in the network [28]. However, these approaches require high overhead of space and time to obtain offloading strategy. Different from reinforcement learning scheme, the analytical solutions have no exploration overhead, and can directly obtain the offloading strategy with the complexity of O (1). Moreover, to the best of our knowledge, there has been little work on the study of analytical methods to solve the offloading design for the MEC networks. In further, analytical method can provide theoretical basis for other offloading optimization schemes. It can help better understand the offloading mechanism and the influence of each parameter on the system performance. Therefore, the above views motivate the work in this paper. However, there are some difficulties in providing analytical solutions to offloading strategy. Specifically, when there are multiple CAPs and multiple users, it is difficult for us to devise an offloading strategy, taking into account the complexity from the increasing number of users and CAPs.
In this paper, we investigate how to analytically design an analytical offloading strategy for a multiuser MEC-based smart IoV, where there are multiple CAPs which can help compute tasks from the vehicular users. As it is difficult to derive an analytical offloading ratio for a general MEC-based IoV network, we turn to provide an analytical offloading scheme for some special MEC networks including one-to-one, one-to-two and two-toone cases.
For each case, we study the system performance by using the linear combination of latency and energy consumption, and derive the analytical offloading ratio through minimizing the system cost. Simulation results are finally presented to verify the proposed studies. In particular, the proposed analytical offloading scheme can achieve the optimal performance of the BF scheme. The analytical results in this paper can serve as an important reference for the analytical offloading design for a general MEC-based IoV. The main contributions of this paper are summarized below.
• We investigate how to optimize the linear combination of latency and energy consumption by making offloading decision in vehicular MEC network. We theoretically analyze the system cost for one-to-one, one-to-two and two-to-one vehicular MEC system, which can serve as an important reference for later studies for a general vehicular MEC network. • According to the analytical results for two-to-one and one-to-two cases, we propose an optimization based on the linear programming method, which can directly achieve the optimal offloading ratio at computational complexity O(1) . Moreover, compared to the learning-based methods, the proposed strategy can avoid the incentive computational cost. • We also conduct simulations to verify the effectiveness of the proposed strategy.
Specifically, both the simulated and theoretical results are provided and show the superiority of the proposed strategy over the learning-based solutions.
The rest of this paper is organized as follows. After the introduction, we will discuss the system model of MEC-based IoV network in Sec. II. Then, we give the optimization problem in Sec. III, and provide the analytical solution for the offloading design in order to minimize the system latency and energy consumption. We further give some simulation results and discussions in Sec. IV, and finally conclude the work of this paper in Sec. V. Users need to execute some computation-intensive and latency-sensitive tasks, which can be partitioned into several subtasks by some reasonable task partition method and then offloading to the CAPs for computing. Specifically, in our model, at the beginning of each time slot, different users generate computational tasks, which can be partitioned into several subtasks. After that, the users offload some subtasks to the same CAP in parallel, where the users access the CAP through the some orthogonal spectrum resources. When the tasks of all users are completed, one time slot is used up. For user m ∈ M , it needs to offload its subtasks through wireless links characterized by the offloading decision α m , which can be written as where α m,n ( n > 0 ) is offloading ratio from user m to CAP n, while α m,0 is local computational ratio for user m.

System model
(1) α m = [α m,0 , α m,1 , α m,2 , . . . , α m,n ], In the following subsections, we will firstly present the local computational model, the communication model and the offloading computational model, respectively. Then, we will discuss the optimization problem according to the proposed model.

Local computational model
In the local computational model, let f m denote CPU cycles per second at the user m. Then, the local computational latency can be expressed by where ω denotes the number of cycles required for the CPU to compute per bit of tasks and l m is the task size of user m. Thus, the local computational energy consumption for user m can be given by where P local m is the local computational power for user m. In summary, the local computational energy consumption of M users can be summarized as

Communication model
In the communication model, according to the Shannon theory, we can obtain the transmission rate from user m to CAP n as [29][30][31] (2) where h m,n ∼ CN (0, β) is the channel parameter of the link between user m and CAP n, W m,n is the communication bandwidth of user m allocated by CAP n, P trans m is transmission power at user m, and σ 2 is the variance of the additive white Gaussian noise (AWGN) at CAP n, where the noise effect on the wireless transmission is detailed in the literature [32,33]. Then, the latency of user m offloading some subtasks to CAP n can be given by The associated energy consumption can be given by In summary, the total transmission energy consumption of M users can be given by

Offloading computational model
When the subtasks have been transmitted to the CAPs, they can be computed by the CAPs with a more powerful computational capability. The computational latency at CAP n can be given by where F m,n is the computational capability assigned by CAP n to user m.
Since the users perform the local computing and offloading in parallel, the system total latency is the maximum value among the latency executed at local and CAPs. Then, we can obtain the total latency for user m as, In addition, each user uses its individual computational resource to calculate the tasks. And the offloading is implemented in parallel among M users, as each user employs an orthogonal spectrum resource for the wireless transmission. Hence, the total system latency can be given by, Similarly, we can obtain the total system energy consumption as, Considering that both the latency and energy consumption have a significant impact on the system, we should optimize both the energy consumption and latency for the system. Therefore, we use a linear combination of T total and E total to measure the system cost, given by where ∈ [0, 1] is a weight factor between the latency and energy consumption. We can get a flexible form of the system cost for the MEC system, by adjusting the value of , according to the practical requirements.

Problem formulation
As the offloading strategy can directly affect the system latency and energy consumption, we should take into account the offloading parameter {α m,n |1 ≤ m ≤ M, 0 ≤ n ≤ N } , and devise the optimization objective to minimize the system cost, given by where constraint C 1 represents that each user can partition its tasks and partially offload to the CAPs, and constraint C 2 denotes that the sum of the offloading ratio of each user should be unity.

Optimization of offloading strategy
For the offloading strategy in the MEC networks, many researchers have employed to use some intelligent algorithms, such as reinforcement learning, to obtain a feasible offloading decision. However, these approaches require a large number of iterations in the training and cause a heavy overhead. Therefore, in this paper, we intend to provide an offloading strategy that can directly obtain the offloading ratio by using some analytical method, which can significantly reduce the computational complexity. However, it is generally difficult to obtain an analytical offloading strategy for a large scale MEC network with M users and N CAPs. Hence, we turn to study some special cases to help deal with the tricky problem, which includes one user to one CAP case (called one-to-one), two users to one CAP case (called two-to-one), and one user to two CAPs case (called one-to-two). Specifically, for the one-to-one case, we will get the optimal offloading ratio by deriving the objective function. For the two-to-one and one-to-two cases, based on the characteristics of the max function in the latency formula, we will partition the analytical domain into several regions, and then use the linear programming (LP) method to find the local optimal offloading solution in each feasible region. The three special cases are detailed one by one in the following.

One-to-one
In the one-to-one case, the single user accesses and offloads its task to the single CAP. Consequently, the offloading ratio is α 1 = [α 1,0 , α 1,1 ] , where we can see that α 1,0 = 1 − α 1,1 . Thus, we can rewrite the system cost for the one-to-one case with respect to α 1,1 only, given by In order to minimize the system cost 1 and obtain the optimal offloading ratio for the one-to-one case, we consider three cases, which are = 1 , = 0 , and 0 < < 1 , for (15).

= 1
When = 1 , the system cost of the linear combination of latency and energy consumption degenerates into latency only. In this case, minimizing the linear combination is equivalent to minimizing the latency. The system cost can be given by From (16), we can see that decreases with the increase of α 1,1 , while increases with the increase of α 1,1 . In order to facilitate the analysis, we remove the max operation in (16) and convert � 1 (α 1,1 ) into (17), we can obtain the optimal offloading ratio of a * 1,1 as,

= 0
When = 0 , the system cost of the linear combination of latency and energy consumption degenerates into energy consumption only. In this case, minimizing the linear combination is equivalent to minimizing the energy consumption. The system cost can be given by (15)  We can see that (19) is a linear function with α 1,1 . So, we can get the optimal offloading ratio by comparing When 0 < < 1 , the system cost is the linear combination of latency and energy consumption. In this case, we have to consider both energy consumption and latency and we can find the optimal offloading ratio by studying the monotonicity of the system cost. Specifically, the case 0 < < 1 is the combination of = 0 and = 1 , and from the above analysis, we can see that the system cost of the case = 1 is a piecewise function, while the system cost of the case = 0 is a monotonic function. Consequently, the system cost of the case 1 < < 1 is also a piecewise function, which is given by Then, to study the monotonicity of the system cost, we take the derivative of (21) with respect to a 1,1 that is given by where Hence, we can analyze the optimal offloading ratio as

Two-to-one
In the two-to-one case, two users can access and offload their tasks to the single CAP at each time slot. Consequently, offloading ratios of user 1 and user 2 are α 1 = [α 1,0 , α 1,1 ] and α 2 = [α 2,0 , α 2,1 ] . We can simplify the system cost and rewrite it with respect to α 1,1 ∈ [0, 1] and α 2,1 ∈ [0, 1] by using α 1,0 = 1 − α 1,1 and α 2,0 = 1 − α 2,1 , given by For convenience, we use the following notation, Then, the system cost can be rewritten into As (30) includes some max operations, it is hard to perform to analysis. To remove the max operation, we convert (30) into a piecewise function in . Therefore, the domain of α 1,1 and α 2,1 can be partitioned into four regions, as shown in Fig. 2a. Without lose of generality, we then analyze the case of α 1,1 < Y 1 and α 2,1 < Y 2 . In this case, the system cost is given by To remove the max operation in (32), we convert it into a piecewise function in Then, we further partition the region into two parts as shown in Fig. 2b. For the part , and α 2,1 < Y 2 , the system cost can be expressed as Then, the corresponding problem optimization can be written as (34) We can observe that (37) is a linear programming problem and thus it can be solved by using some linear programming methods. Specifically, for non-integer linear programming, if the optimal solution exists, the optimal solution will be falling at the point of intersection. So, we only need to collect all points of intersection in this part and compare the associated costs to find the local optimal offloading decision. We can perform a similar operation for the other parts and get the global optimal offloading decision.

One-to-two
In the one-to-two case, the single user can access and offload its task to the two CAPs at each time slot. Consequently, the user offloading ratio is α 1 = [α 1,0 , α 1,1 , α 1,2 ] . We can simplify the system cost and rewrite it with respect to α 1,1 + α 1,2 ≤ 1 by using (44) (45) (1 − α 1,1 ), intersection in this region and compare the associated system costs to find the local optimal offloading decision. We can perform a similar operation for the other regions and finally get the global optimal offloading decision.

Simulation
In this section, we will demonstrate some simulations to verify the effectiveness of the proposed analytical method for the three special cases including one-to-one, two-toone, and one-to-two cases. In the following, we will firstly introduce the environment setup of these simulations. Then, we will give some related discussions, based on the simulations.

Environment setup
The local computational capabilities of the two users are set to f 1 = 3 × 10 8 cyc/s and f 2 = 2.2 × 10 8 cyc/s, respectively, and the computational capabilities at the two CAPs are set to F 1 = 16 × 10 8 cyc/s and F 2 = 13 × 10 8 cyc/s, respectively. In addition, the task sizes of the two users are set to l 1 = 60 Mb and l 2 = 120Mb, respectively, and the variance of the AWGN is set to 0.01. Moreover, the wireless bandwidth for the two CAPs is set to 5 MHz, and the local computational powers of the two users are set to P 1 = 2 W and P 2 = 3 W, respectively. In further, we simulate the experiments on the Python platform. Figure 4 demonstrates the impact of the weight factor on the system cost of the proposed analytical method for the one-to-one case, where the wireless bandwidth is set to 5MHz, the task size of user 1 is set to 60Mb, the computational capability of CAP 1 is set to 16 × 10 8 cyc/s, the computational capability of user 1 is set to 3 × 10 8 cyc/s, and the weight factor varies from 0.0 to 1.0. For comparison, we also provide the system cost of the BF approach in solving the offloading strategy. From this figure, we can find that for Fig. 4 System cost of the analytical method and BF versus the weight factor for the one-to-one case various values of the weight factor , the proposed analytical method matches well with the BF approach. As the BF approach gives the optimal offloading ratio for each , the proposed analytical method can calculate the optimal offloading ratio for a wide range of . Moreover, for the special cases that the system only considers the energy consumption or the latency, i.e., = 0 and = 1 , both the proposed analytical method and BF approach can effectively reduce the system cost to about 2.2 and 7.5. Figure 5 illustrates the impact of the wireless bandwidth on the system cost of different offloading schemes for the one-to-one case, where the weight factor is 0.5, the task size of user 1 is 60Mb, the computational capability of CAP 1 is 16 × 10 8 cyc/s, the computational capability of user 1 is 3 × 10 8 cyc/s and the wireless bandwidth varies from 2 MHz to 9MHz. Besides the proposed analytical method and BF approach, we also study the system cost of the All-CAP offloading scheme and the All-Local offloading scheme, where the All-CAP offloading scheme and the All-Local offloading scheme indicate that all the tasks are computed at the CAP and local, respectively. We can find from Fig. 5 that the analytical method and the BF approach outperform the All-CAP offloading scheme and the All-Local offloading scheme, indicating that the proposed analytical method can effectively exploit the bandwidth resources to obtain an offloading strategy similar to the BF approach. Moreover, we can observe that for various values of the wireless bandwidth, the system costs of the analytical method and BF are almost the same, which further validates the effectiveness of the proposed analytical method. In further, the system cost of the All-CAP offloading scheme, BF approach and our analytical method is reduced when the wireless bandwidth increases, while the system cost of the All-Local offloading scheme remains unchanged for various wireless bandwidth settings. This is because that the transmission rate increases with a larger bandwidth, which can result in a reduction in both transmission latency and transmission energy consumption, while the All-Local offloading scheme does not involve any data transmission. Figure 6 shows the system cost of the proposed analytical method versus the weight factor varying from 0.0 to 1.0 for the two-to-one case, where the task size of the two users is set to l 1 = 60 Mb and l 2 = 120 Mb, the wireless bandwidth is set to W 1,1 = 5 MHz and W 2,1 = 5 MHz, and the computational capability of the CAP is set to F 1,1 = 7 × 10 8 cyc/s and F 2,1 = 9 × 10 8 cyc/s, and the computational capabilities of the two users are set to f 1 = 3 × 10 8 cyc/s and f 2 = 2.2 × 10 8 cyc/s. To demonstrate the correctness of our proposed analytical method, we use the BF approach for comparison. As shown in Fig. 6, we can find that for different values of the weight factor , the performance of our proposed analytical method is very close to that of the BF approach, which validates the correctness of the proposed analytical method. Moreover, we can see that when ∈ [0, 0.3] , the system cost of the BF method and the proposed analytical method increases with a larger , since the latency plays a more important role than the energy consumption. In contrast, when ∈ (0.3, 1] , the system cost of BF method and the proposed analytical method decreases with a larger , since the energy consumption plays a more important role than the latency. Figure 7 performs the comparison of four offloading schemes with = 0.5 for the two-to-one case, where the wireless bandwidth varies from 2 MHz to 9MHz, the task sizes of the two users are set to l 1 = 60 Mb and l 2 = 120 Mb, the wireless bandwidth is set to W 1,1 = 5 MHz and W 2,1 = 5 MHz, the computational capability of the CAP is set to F 1,1 = 7 × 10 8 cyc/s and F 2,1 = 9 × 10 8 cyc/s, and the computational capabilities of the two users are set to f 1 = 3 × 10 8 cyc/s and f 2 = 2.2 × 10 8 cyc/s. Figure 7 shows that the system cost of All-CAP, analytical method and BF gradually decreases as the wireless bandwidth increases, as the transmission rate of the users become larger, resulting in a reduced system cost. In contrast, the system cost of the All-Local offloading scheme remains unchanged across different bandwidths. Moreover, the performance of the analytical method is better than that of All-CAP and All-local, which indicates the superiority of analytical method. In further, the analytical method and BF have almost the same cost for various values of the wireless bandwidth, indicating that the proposed analytical method can find the optimal offloading strategy. Figure 8 illustrates the system cost of the proposed analytical method and BF versus the weight factor varying from 0.0 to 1.0 for the one-to-two case, where the task size of the user is set to l 1 = 60 Mb, the wireless bandwidth is set to W 1,1 = 5 MHz, the computational capability of the CAP is set to F 1,1 = 7 × 10 8 cyc/s, and the local computational capability is set to f 1 = 3 × 10 8 cyc/s. We can see from Fig. 8 that for various values of , the system cost of the analytical method and BF matches well. This also indicates that the performance of the analytical method is similar to that of the BF. In addition, we can find that when = 0.2 , the system cost of the BF approach and the proposed analytical method is higher than that with other values of , indicating that the linear combination of latency and energy consumption at this point will dramatically affect the system performance. Figure 9 depicts the system cost of four offloading strategies versus the wireless bandwidth with = 0.5 for the one-to-two case, where the bandwidth varies from 2 MHz to 9MHz, the task size of the user is set to l 1 = 60 Mb, the computational capability of the CAP is set to F 1,1 = 7 × 10 8 cyc/s, and the local computational capability is set to f 1 = 3 × 10 8 cyc/s. By observing Fig. 9, we can find that the system cost of the All-CAP offloading scheme, the analytical method, and the BF approach decreases with a larger bandwidth, while the system cost of the All-Local remains unchanged. This is because that the transmission rate of the All-CAP offloading scheme, the analytical method, and the BF approach is significantly affected by the wireless bandwidth, while All-Local performs the calculation locally, and it is not affected by the wireless resources. In addition, as the bandwidth increases, the downward trends of All-CAP, analytical method, and BF all decrease. This indicates that the improvement is gradually becoming saturated. Most importantly, it is evident from Fig. 9 that the analytical method and BF are consistently lowest among the four offloading strategies, which further illustrates the effectiveness of the proposed analytical method. Moreover, the system cost of proposed analytical method is similar to that of the BF approach, indicating that the performance of the proposed analytical method can achieve the optimal performance of the BF approach.

Conclusion
In this paper, we investigated how to analytically design an analytical offloading strategy for a multiuser vehicular MEC network, where there were multiple CAPs which could help compute tasks from the users. As it is difficult to derive an analytical offloading ratio for a general vehicular MEC network, we turned to provide an analytical offloading scheme for some special vehicular MEC networks including one-to-one, two-to-one and one-to-two cases. For each case, we studied the system performance by using the linear combination of latency and energy consumption, and derived the analytical offloading ratio through minimizing the system cost. Simulation results were finally presented to verify the proposed studies. In particular, the proposed analytical offloading scheme can achieve the optimal performance of the BF scheme.