Intelligent Reflecting Surfaces Enhanced Mobile Edge Computing: Minimizing the Maximum Computational Time

Intelligent reflecting surfaces (IRS) and mobile edge computing (MEC) have recently attracted significant attention in academia and industry. Without consuming any external energy, IRS can extend wireless coverage by smartly reconfiguring the phase shift of a signal towards the receiver with the help of passive elements. On the other hand, MEC has the ability to reduce latency by providing extensive computational facilities to users. This paper proposes a new optimization scheme for IRS-enhanced mobile edge computing to minimize the maximum computational time of the end users’ tasks. The optimization problem is formulated to simultaneously optimize the task segmentation and transmission power of users, phase shift design of IRS, and computational resource of mobile edge. The optimization problem is non-convex and coupled on multiple variables which make it very complex. Therefore, we transform it to convex by decoupling it into sub-problems and then obtain an efficient solution. In particular, the closed-form solutions for task segmentation and edge computational resources are achieved through the monotonical relation of time and Karush–Kuhn–Tucker conditions, while the transmission power of users and phase shift design of IRS are computed using the convex optimization technique. The proposed IRS-enhanced optimization scheme is compared with edge computing nave offloading, binary offloading, and edge computing, respectively. Numerical results demonstrate the benefits of the proposed scheme compared to other benchmark schemes.


Introduction
The future networks will support ultra-reliable and low latency communications and connect billions of devices [1]. These networks will consume very low energy and support high-speed data applications [2]. These networks will merge various technologies and systems such as intelligent reflecting surfaces (IRS) [3], mobile edge computing (MEC) [4], backscatter communications [5], blockchain [6], artificial intelligence [7], nonorthogonal multiple access [8], and a new spectrum [9]. These networks connect ground to air and space for global coverage [10]. However, significant research efforts are required to transition these technologies and systems smoothly to the existing networks. In this designing MEC systems for a single user, one of the most important performance metrics is referred to as the computation offloading strategy. For a more detailed explanation, see [31], in which a binary offloading strategy is proposed to determine whether a task is going to compute locally by the user equipment (UE) or executed remotely at the MEC server. For data-partitioning-oriented applications, a partial offloading scheme was developed by Wang et al. [30] as a response to this problem; In this setup, some data are being processed at AP referred to as the edge of the network while the rest is processed locally on the mobile device. In addition, interference from other users in practical multi-user systems can degrade the performance of the MEC system by disrupting the radio communications link of the network and the edge server node. Similarly in the scenario of multi-cell, multi-user, for example, to maximize efficiency, Sardellitti et al. [32] proposed a framework for joint optimization of transmit precoding matrices and users' share of available computing power. On the other hand, in a multi-carrier scenario, Energyefficient resource allocation across terminals, radio access networks (RANs), and ESs is proposed by Sheng et al. [35]. Moreover, Chen et al. proposed a joint framework for computation offloading and policy for the selection of channels using the principles of classical game theory as their inspiration [36]. Offloading decisions are made at the device level in this type of system. Similarly, in recent years, different algorithms have been proposed for both mobility-aware dynamic scheduling and user association approaches for multi-user, multiple-edge computing nodes [34,34]. Both of these schemes are intended to be implemented shortly. Yang et al. [37] developed a federated learning algorithm that can be executed over-the-air. This was done to further decrease latency, decrease power consumption, and safeguard user privacy in the concept of MEC systems. The extensive computing being offloaded onto devices in challenging communications environments is one that is not fully studied in the literature. So, as per the above literature review, in this paper, we provide evidence that IRS is useful in such circumstances. Let us take a look at how these significant IRS contributions to science were implemented, to continue our previous discussion.
IRS has been extensively studied for its potential uses in wireless communications through channel estimation [38], ergodic capacity analysis [39], and phase shift modeling [40], as well as the phase shift control [41][42][43]. Examples include [41] in which authors proposed a joint framework for phase shift control at IRS and also design a matrix for precoding at the AP, which employs complex semidefinite relaxation and alternating optimization methods to lower transmission power such that the desired signal to interference and noise (SINR) is maintained on the receiver. A more realistic discrete phase shift scenario was added to the studies to better reflect reality. The problem with using the algorithm presented in ref. [41,42] for large-scale IRS is that it requires too much processing power to be practical. Since each group of IRS elements uses the same phase shift coefficient, In order to reduce the amount of extra work required for the IRS channel estimation, Yang et al. [43] proposed a framework for optimal allocation of transmission power and phase shift in OFDM-based wireless systems. After that, in light of the significant scientific contributions described above, we concluded that it was imperative for MEC systems to make use of the advantageous function provided by the IRS.

Motivation and Contribution
This work investigates the IRS-enhanced MEC, designed to improve the system's computing performance in terms of computational capability and enhance the communication channel capacity. Following that, the computational capability of the devices is enhanced by the concept of a MEC server, whereas the effectiveness of the communication channel is enhanced by introducing the IRS. UEs generally have a finite battery and a limited amount of processing power. UEs are expected to have some data processing capability, even if the processing capability is much slower than the MEC. To achieve this, in this work, for task placement, a concept of partial offloading is considered, which is the process of partitioning a task into two parts and offloading the latter to the MEC server while leaving the former for the UEs to handle locally. Furthermore, the optimal task segmentation was carried out by taking into account the transmission power, phase shift control, and edge computational resources to reduce the overall computational time required by a task. In order to accomplish this, we formulate the joint task computational time minimization problem, which is non-linear and non-convex and is challenging to solve in real-time. To address this, we decoupled the original optimization problem into sub-problems and solved them iteratively until convergence criteria were met. Additionally, the effectiveness of the proposed scheme is demonstrated through numerical comparisons with an exhaustive search and other benchmark schemes.
As mentioned in this paper, we discuss a dynamic approach for task segmentation within the IRS-enhanced MEC network. In particular, the main contribution of this work is as follows: 1.
We proposed a task's computational time minimization problem with joint optimization of computational and communication resources, such as edge computational resource, phase shift control, transmission power, and task segmentation, under energy and system constraints; 2.
To address the non-linearity and non-convexity that characterize the original optimization problem, we decoupled the original optimization problem into sub-problems and iteratively solved them. Furthermore, we also drive a closed-form solution for task segmentation and computational resource allocation at MEC; 3.
Numerical results are compared to the exhaustive search and other benchmark schemes to demonstrate the efficacy of the proposed scheme. By taking into account, task computational time and energy consumption as performance matrices, numerical results show that the proposed scheme performs epsilon equally to the exhaustive search and outperforms all other schemes.
The rest of the paper is structured as follows. In Section 2, we outline the system model and the problem formulation. In Section 3, we propose the effective framework for optimal allocation of resources. Section 4 contains our simulation results and discussions. The last section of this paper, Section 5, concludes the paper.

System Model
In this work, we considered IRS-enhanced mobile edge computing (MEC), where MEC is located at the access point (AP) to provide computational resources to the N number of single-antenna users (UE), also known as sensor nodes, which are distributed uniformly over a predefined area in a dense urban environment. AP is equipped with an M number of antennas. Sensor nodes typically have limited computational resources and battery life, making them insufficient to handle or compute the massive amounts of data generated by real-time applications. As a result, the system experiences latency. To address this, MEC emerges as a viable solution that offers on-demand extensive computation, allowing these devices to offload their portion of data for extensive computation using binary or partial offloading schemes. In contrast, in a dense urban environment, the communication link between devices and MEC is severely hampered by obstructions such as high-rise buildings. To improve a communication link, we assume an intelligent reflecting surface (IRS) is installed over the building, as shown in Figure 1. The IRS is made up of K reflecting elements that intelligently reflect the signal communicated from the user to MEC. Moreover, We use the most adopted model for the task, i.e., Z n = {s n , c n }, where s n represents the size in terms of bits and c n represents the computational cycle requirement of the task Z n . The partial offloading scheme for the assignment of tasks is taken into account in this study. In a scheme that only partially offloads the task, the total task Z n is split in two. Part of the computation is performed locally, while the rest is offloaded directly to the MEC server over a direct connection (UE-MEC) and assisted by IRS (UE-IRS-MEC).

Communication Model
In this section, we introduce the communication model for both direct and assisted links. Let us assume that g d n ∈ C 1×M , g a,1 n ∈ C 1×K , and H ∈ C M×M as the channel gain coefficients between UE-MEC, UE-IRS and IRS-MEC respectively. Following that θ = diag{φ 1 , φ 2 ...φ K } diagonal matrix satisfying φ k = 1, ∀K to ensure fully reflection of the signal from IRS. Furthermore, we assume that UE mobility is not too high, so the channel remains constant for the entire period T. Denote that p n is the up-link transmission power of the user. Therefore, data rate R n can be expressed as follows: In Equation (1), y n represents the beamforming vector at the receiving side, and it can be calculated easily using the minimum mean square error. Whereas σ 2 represents the additive white gaussian noise with mean zero and variance 1. Therefore, the time required to offload the portion of the task to the MEC server can be mathematically expressed as: In Equation (2), α n represents the portion of the task offloaded to the MEC server for extensive computation. Furthermore, the energy consumed while offloading the task Z n is expressed as follows:

Task Computational Model
Specifically, in this work we considered a partial offloading scheme to carry out the computation. Partial offloading splits a task into two parts, with one part being processed locally and the other being sent to a remote MEC for more intensive processing.

Local Computation
Since each UE in a local computation scheme has a finite computational capacity, or κ l n (cycles/sec), the time spent on the computation can be expressed as: Additionally, the energy consumed while computing the task locally can be expressed as: The constant power consumption of a circuit per CPU cycle is denoted by Γ n , and this value is the same across all devices.

Edge Computing
Access to high-volume computation can be obtained on-demand via MEC, making it a practical solution. Accordingly, users share the server's computational resources at the MEC. For UE n, κ E n represents the computing resources allocated to it by MEC. Alternatively, κ max represents the MEC server's absolute computational limit. Additionally, there are two aspects of the total time spent computing the task at MEC: (1) The time it takes for data to be transferred from the UEs to the MEC server, as specified in (2); (2) Processing time on the MEC server. Therefore, the total amount of time the task took to compute on the MEC server can be expressed as: In addition, we presume that the MEC's battery life is infinite thanks to the constant power from the grid. As a result, the amount of power used by the MEC server while it is processing requests is ignored here. In a similar vein, the authors in ref. [14,16] state that due to the small size of the results, we disregard the transmission time of the results from the MEC server to UE.

Problem Formulation
In this work, we aimed to minimize the computational time of the task by joint optimization of the communication and computational resources among the user and MEC and task segmentation variable. Furthermore, for the ease of simplicity, we define P = {p 1 , p 2 , · · · p n }, κ = {κ E 1 , κ E 2 , · · · κ E n } and α = {α 1 , α 2 , · · · α n }. Following that, the computational time minimization problem can be mathematically expressed as follows: The constraint (7b) guarantees that the total amount of energy used to compute the task will be less than the maximum amount of energy the battery can hold E max n , whereas constraint (7c) states the computational resources allocated to UEs at the MEC server should be less than the maximum computational resources. Similarly, constraint (7d) represents the transmission power constraints of the UEs. Following that, phase shift control of IRS elements is ensured by (7e).
In addition, the optimization problem that is discussed in the (7a)-(7e) is of the mixedinteger, non-convex, and non-linear variety. This is because the rate equation contains a logarithmic function. In order to address this issue, we decoupled the original problem into a series of sub-problems. Moreover, to find the optimal best solution, the sub-optimization problems are then solved iteratively.

Proposed Solution
In this section, we demonstrate a framework for efficient allocation of computational and communication resources, task segmentation variables and phase shift control of IRS.

Task Segmentation
In the MEC framework, task segmentation is a crucial design parameter that significantly affects overall system performance. Our research takes into account a scheme for partial offloading in which parallel computations are performed both locally and on the MEC server. As a result, there is a monotonic relationship between the local and the edge computation time, as perceived from (4) and (6). The task segmentation variable α n affects both the local and edge computational time. When α n is small, most of the work can be carried out locally at UEs, and the time on each edge is negligible (t E n ≈ 0). In contrast, when α n approaches its maximum value of 1, most of the work is carried out on the MEC server, resulting in a local computational time that is roughly equal to zeros, i.e., t L n ≈ 0. A situation exists where the computational edge time is the same as the local computational time or t L n = t E n . The following is a mathematical expression of this: whereas A = R n c n + κ E n s n and B = κ E n + κ L n . Equation (9) represents the task segmentation expression, which depends on local and edge resources as well as phase shift control. Similarly, the optimal values of these variables result in the optimal values of the task segmentation variable.

Edge Computational Resource Allocation
This section computes the close form solution of edge computation resources assigned to the nth UEs task. Lemma 1. Under given optimal value task segmentation α n , transmission power p n and phase shift of IRS θ n , the computational task minimization problem is convex and mathematically can be expressed as follows: Proof. Therefore for the ease of simplicity we can define the objective function of (10) as: whereas the hessian matrix of (11) can be expressed as: After some mathematical calculation, it was perceived that all the elements of matrix H were zeros except for the digital elements, i.e., Equations (13) demonstrate that all of the elements along the diagonal of the matrix H have a positive value. Therefore, in accordance with the theorem [44], the objective function mentioned in (11) is convex in nature. As a results, the optimization problem mentioned in (10) is a convex optimization problem.

Lemma 2.
The optimal allocation of resources at the MEC can be calculated by using Equation (17).
Proof. According to Lemma 1, the Lagrange function of optimization problem (10) can be mathematically represented as: Therefore, according to the KKT condition, if κ E n * and λ * is the optimal value of the solution, then we can say that: Therefore, by solving the above mention equation, the optimal value of computational resource allocation at the MEC can be expressed as follows:

Transmission Power and Phase Shift Control
Under given the optimal value of task segmentation variable, and computational resources at the MEC server The computational task minimization problem is written in a simplified form as: The optimization problem that is mentioned in (18) is a non-linear and still non-convex problem due to log function in R n . Therefore, to tackle this, we transform the optimization problem into a more easily tackled form by introducing the slack variable R n as follows: where Φ n = p n |y H n (g d n + Hθg a,1 n )| 2 and Φ i = ∑ i =n |y H i (g d i + Hθg a,1 i )| 2 p i + y H n σ 2 . Hense the optimization problem mention (19) in convex in nature and thus can be solved by using the convex optimization toolbox, such as CVX, the steps of which are illustrated in Algorithm 1.

Worst Case Per Iteration Complexity Analysis
The optimization problem mentioned in (19) involves N.K.K.N decision variables and N.N.N.K.K convex constraints. Therefore, according to the authors of [45], the worst case per iteration complexity of can be expressed as O N 2 K 2 3 N 3 K 2 . Following that, by assuming the t max as the total iterations of the algorithm, the overall complexity of the algorithm can be expressed as O t max N 2 K 2 3 N 3 K 2 .

Result and Discussion
Here, we show numerical results to prove the effectiveness of the proposed approach. For this, extensive simulations were executed with the simulation parameters from Table 1. The proposed scheme is also compared to other benchmark schemes, such as binary offloading [46], edge computing, and naive offloading, to ensure it delivers the best performance possible. In the binary offloading method, the entire job is either computed locally or on the MEC server. With edge computing, all UEs offload their processing to the MEC server, while with naive offloading, UEs offload their extensive computation in a random manner.
To begin, it was essential to evaluate the proposed scheme's performance with and without the involvement of the IRS [12]. After that, we compared it with an exhaustive search as well as various other benchmark schemes. In order to accomplish this, Figure 2 shows the IRS's effects on the performance of the system. In a dense urban environment, the communication link between the UEs and MEC servers is highly tempered due to blockage, e.g., high-rise buildings. Therefore, as a result of poor channel conditions, achievable data decrease, which has a significant impact on the amount of time required to complete the task. Thanks to IRS, that emerges as a practical solution to assist the existing terrestrial communication system. In order to improve the channel gain, the IRS elements perform an intelligent signal reflection from the UEs in the direction of the MEC servers. As a consequence of this, the achievable data rate increases, and the amount of time required to offload the task decreases, as shown in Figure 2.  The results in Figure 3 demonstrate the comparative analysis of the proposed scheme with exhaustive search and other benchmark schemes by considering computational time as a performance metric. Results show that the proposed scheme produces epsilon equal results as compared to exhaustive search and outperforms all others. Outcomes reveal that, for a small number of users, the performance of the proposed schemes follows one another. In contrast, as the number of users increases in the system, the proposed scheme performs better than others. This trend is because edge computational resources are shared among the number of connected users. For a large number of users, the portion of resources allocated to each user is minute as compared to a small number of users as a result of latency in introducing a system. In contrast, in the proposed scheme, the task is optimally divided into two parts by taking into account the edge computational resources and channel characteristics. One portion of the task is computed locally, while the other is offloaded to MEC for extensive computation. The amount of data being processed is an essential component of the edge computing paradigm and has a considerable impact on the overall performance of the system. In order to demonstrate the usefulness of the proposed scheme, several simulations were carried out using sets of varying data sizes. The effectiveness of the proposed scheme is demonstrated by the results in Figure 4. In addition, the results demonstrate that the time required for edge computation increases at an exponential rate when the data size increases. This is due to the fact that the total computational time in edge computing is primarily determined by the achievable data rate, denoted by R n , as well as the number of bits, as specified in (2). In the context of edge computing, the value of the task segmentation variable is α n = 1. That is to say, all of the bits are offloaded to MEC severe. In that case, an edge computing scheme is not an acceptable method for task computation because of a direct relationship between the amount of time it takes to offload data and the number of bits involved. When compared to other methods, optimal task segmentation always performs better and emerges as a viable solution for problems involving large amounts of data.
Sensors are an essential component of any intelligent control system that collect the necessary data from applications that operate in real-time. The most recent improvement to the 5G/6G communication system has allowed for the deployment of additional sensor nodes. These sensor nodes, in addition to having a limited capacity for computation, also have a finite battery life, which is a factor that bottlenecks the performance of the system. The simulation was carried out so that the efficacy of the proposed scheme can be evaluated with regard to the amount of energy that it would require to compute the task. The effectiveness of the proposed scheme is illustrated by the numerical results in Figure 5. The results show that, for a small number of users, the proposed scheme follows the others. However, as the number of users increases, the proposed scheme begins to perform better due to its optimal task segmentation into two portions. In the proposed scheme, only a small portion of the task is computed locally, resulting in lower energy consumption when compared to binary or edge computation schemes, in which the entire task is offloaded to MEC for extensive computation, resulting in higher energy consumption.

Conclusions
IRS and MEC are the two promising technologies for low latency and high energy efficiency communications in future networks. This paper has provided a new framework for minimizing the maximum computational time of user tasks using an IRS-enhanced MEC network. In particular, this framework has simultaneously optimized the task segmentation and transmission power of users, phase shift design of IRS, and computational resource of edge, respectively. Since the problem was non-convex and coupled with multiple variables, it was hard to obtain the joint solution directly. Therefore, it was decoupled into sub-problems first and then solved through convex optimization methods. The proposed scheme was validated and compared through numerical results. Results show that the proposed IRS-enhanced MEC network performs significantly better than the other benchmark schemes in terms of computational time and energy consumption. This work can be extended in several ways. For example, we can use aerial IRS such that the IRS can be equipped with a drone. Moreover, we can integrate non-orthogonal multiple access to the same system model, where the existing model can act as a benchmark.