Delay Minimization for Massive MIMO Based Cooperative Mobile Edge Computing System With Secure Offloading

Mobile edge computing (MEC) has been envisioned as a promising technology for enhancing the computational capacities of mobile devices by enabling task offloading. In this paper, we present a novel framework for a cooperative MEC system by employing Massive Multiple-Input Multiple-Output (MIMO) and non-orthogonal multiple access (NOMA) technologies, including security aspects. Specifically, in the proposed cooperative MEC system, there is no strong direct transmission link between the cell-edge user and the MEC server; consequently, the user sends their tasks to the MEC server through the helpers at the cell-centers. In the proposed framework, we minimize the overall delay, including secure offloading under the constraints of computing capability and transmit power. The proposed algorithm minimizes the overall delay in downlink and uplink transmission while satisfying security constraints to solve the formulated problem. The simulation results show that Massive MIMO based NOMA improves the performance of the secure MEC system by employing more than one helper.


I. INTRODUCTION
Recently, increasing mobile computation-intensive applications and the finite computation capacities of devices have generated new challenges in the sixth-generation (6G) networks. Mobile edge computing (MEC) is one of the promising solutions for computation-intensive and latency-critical applications such as virtual reality (VR), augmented reality (AR), autonomous driving, telesurgery, unmanned aerial vehicles (UAVs) and the Internet of Things (IoT). Since these applications have strict latency requirements and heavy computation needs, the computing capability of the devices may be insufficient. Compared with cloud computing, in MEC systems, users offload computation-intensive tasks to the powerful MEC servers in proximity to users for execution, which reduces latency. Thus, MEC can considerably decrease computation latency and significantly reduce the traffic loads on the backhaul networks [1]. In the MEC system, the achievement of edge computing operations also depends on transmission data rates. One of the key technologies for wireless systems is Massive Multiple-Input Multiple-Output (MIMO), which is being increasingly adopted in different frameworks. Utilizing a large number of antennas at the base station (BS), Massive MIMO simultaneously serves a higher number of users and dramatically enhances the system's spectral and energy efficiencies.
The Massive MIMO based MEC strategy has greatly assisted the offloading in the MEC system due to the significant gains in both spectral and energy efficiencies [2]. Massive MIMO can yield higher transmission rates for offloading in MEC. Besides, since Massive MIMO can simultaneously support a larger number of users in offloading, the wireless data transmission delay, especially in the uplink, is reduced.
Apart from Massive MIMO and MEC technology, nonorthogonal multiple access (NOMA) has also been envisioned as a crucial radio access technique for 6G networks by enabling multiple users to access the same time-frequency resource simultaneously. Compared with orthogonal multiple access (OMA), NOMA not only increases the system's spectral and energy efficiency but also supports more users [3]. The combination of NOMA and Massive MIMO yields great potential in MEC systems, such as higher spectral and energy efficiencies, massive connectivity and lower delay.
While the advantages of MEC technology are in decreasing computation latency and traffic loads on the backhaul networks, secure offloading in MEC systems is of critical importance. Due to the broadcast nature of wireless communications, the computation tasks offloaded from users to the MEC server may be overheard by nearby eavesdroppers, leading to security threats to users [4]. Without proper security mechanisms, the advantages of MEC technology will be diminished by the damage caused by eavesdroppers [5]. Therefore, a secure task offloading scheme is essential for successfully completing computing tasks [6]. To address this, the physical layer security (PLS) technique has been a promising solution to ensure the security of task offloading in MEC networks. Specifically, PLS exploits the nature of wireless channels to achieve secure information transmission with affordable complexity [7].

A. RELATED WORKS 1) MASSIVE MIMO ASSISTED MEC SYSTEMS
Inspired by the facts mentioned above, several studies have been performed on Massive MIMO assisted MEC systems in the literature.
Many works in [8], [9], [10], [11], [12], [13], [14] have focused on energy consumption and energy efficiency for Massive MIMO based MEC systems. The authors of [8] have explored an edge computing-enabled, cell-free multicell Massive MIMO system. They have analyzed the impact of the successful computation probability on the total energy consumption using queuing theory and stochastic geometry. In [9] and [10], the authors have formulated an energy optimization problem at both the users and the MEC server for a delay constrained Massive MIMO based MEC network. In the work of [11], the minimization of the user's total energy consumption has been considered by jointly optimizing the user's offloading data, transmission power and offloading rate for a Massive MIMO based MEC system. Furthermore, the authors of [12] have considered an energy minimization problem for a Massive MIMO-enabled heterogeneous network (HetNet) with MEC to show that the energy consumption can be reduced by employing Massive MIMO with a maximumratio combing detector. In [13], the authors have studied the computation offloading techniques for MEC with mmWave communications to design an energy-efficient system for the joint optimization of computation and communication resources. Moreover, in [14], the user association, sub-channel allocation and computation offloading have been investigated in multi-user uplink fog-computing based radio access networks (F-RANs) with mmWave communication to minimize the total energy consumption.
The delay minimization problem has been investigated in studies [1], [15], [16], [17], [18] for Massive MIMO based MEC systems. In [1], the authors have examined efficient joint hybrid beamforming and resource allocation design for multiuser mmWave based MEC systems to minimize the maximum system delay subject to an affordable communication and computing budget. In [15], the overall delay minimization among all users has been studied for a Massive MIMO assisted MEC system with a joint allocation of wireless and computational resources considering the perfect and imperfect channel state information (CSI) cases. The authors of [16] have investigated a delay minimization problem for a singlecell, Massive MIMO assisted MEC network. It is shown that the delay can be reduced by employing Massive MIMO with a maximum-ratio combing detector. The authors of [17] have designed a single-cell multi-user Massive MIMO MEC system based on the joint resource allocation to minimize the maximum delay consisting of pilot transmission delay, data transmission delay and server computation delay. Moreover, the joint offloading and scheduling problem has been studied in a multi-user, multi-server MEC system in [18] to minimize task execution latency.

2) SECURE MEC SYSTEMS
Since the offloading data may be intercepted and overheard by eavesdroppers due to the broadcast nature of wireless communications, the MEC system brings security challenges. Thus, some studies have focused on designing a secure task offloading scheme to avoid information leakage. The authors in [6] and [19] have considered a multi-user uplink offloading scenario with one eavesdropper. The authors have examined a joint optimization of the computing task allocation, local central processing unit (CPU) frequency, offloading power and time slots to minimize the total energy consumption. In [7], secure computation offloading has been studied for multi-user multi-server MEC-enabled IoT. The joint optimization of communication and computation resource allocation, a partial offloading ratio have been performed to maximize the total secrecy offloading data considering offloading latency and secrecy constraints. In [20], the computation efficiency maximization problem has been studied in a multi-user NOMA-enabled MEC network with PLS. The secure computation efficiency problem has been formulated by jointly optimizing the transmission power and the CPU frequency of local computing. In [21], a NOMA-assisted secure computation offloading has been investigated under the eavesdropping attack, in which a wireless user forms a NOMA pair with an edge-computing user to provide cooperative jamming to the eavesdropper while gaining the opportunity of sending its data. In [22], an optimization problem has been introduced to minimize the weighted sum of the execution latency and energy consumption subject to communication and computation resource constraints for a MEC system consisting of one MEC server, multiple mobile devices and one eavesdropper. In [23], the authors have examined a deep reinforcement learning-based mobile offloading scheme for edge computing against jamming attacks and interference. A safe reinforcement learning has been used to avoid choosing the risky offloading policy that fails to meet the computational latency requirements of the tasks.
The studies in [24], [25], [26], [27] have investigated the latency minimization problem for secure offloading MEC system. Specifically, in [24], a power allocation algorithm has been provided to achieve an optimal secure data rate and reduce the whole task latency of both communication and computation. The authors in [25] have investigated PLS in a NOMA-based MEC system with hybrid SIC decoding. A latency minimization problem has been formulated by jointly designing computational resource allocation, task assignment and power allocation. In the study of [26], an uplink NOMA-based MEC system has been considered with one eavesdropper. The task completion time minimization problem has been studied subject to the worst-case secrecy rate, the transmit power and secrecy outage probability constraints. A secure and low-latency offloading MEC system with one eavesdropper has been presented in [27]. The minimization of total latency has been formulated by jointly optimizing the users' transmit power, computing capacity allocation and user association subject to security and computing resource constraints.
In our previous work in [28], a multi-helper cooperative MEC system based on NOMA has been examined to maximize the total offloading data under latency and power constraints. Motivated by the above background, this work presents an overall delay minimization problem in the Massive MIMO-NOMA based cooperative MEC system for the scenario as shown in Fig. 1 where there is a cell-edge user with a computation-intensive and latencycritical task (i.e., AR, VR, real-time online gaming, or remote healthcare applications). The cell-edge user may experience a low signal-to-interference-plus-noise-ratio (SINR) or there may not be a strong direct transmission link to the BS. Hence, it is needed to execute this cell-edge user's computation-intensive task with low latency. In this case, all cell-center users, termed helpers, assist in executing this task using a cooperative communication strategy based on Massive MIMO and NOMA technologies. In this framework, the overall delay is determined by taking into account both downlink and uplink transmissions. NOMA is performed in the downlink transmission between the cell-edge user and helpers. On the other hand, a Massive MIMO channel is employed for the uplink transmission, including data transmission between helpers and the MEC server. In addition to that, we consider the computation delay at the MEC server by executing the offloaded tasks. Furthermore, these computation-intensive and latency-critical tasks may include private, financial and identity information such as medical records or payments. Thus, secure offloading in the MEC system is investigated in uplink transmission, where the eavesdropper might intend to overhear the offloaded tasks from the helpers. Different from the existing works, in this paper, we present a cooperative MEC system including secure offloading. In the proposed framework, we aim to minimize both offloading and computing delay by providing cooperation through Massive MIMO and NOMA while satisfying security constraints. To be specific, the main contributions of this paper are summarized in the following.
r We investigate a secure Massive MIMO based cooperative MEC by considering the overall delay, including both offloading and computing. To the best of the authors' knowledge, this is the first work of its kind in the area that Massive MIMO and NOMA have been introduced into a cooperative MEC system to minimize the overall delay. r In the overall system, NOMA and Massive MIMO communication are performed in the downlink and uplink transmission, respectively. We propose efficient algorithms for both the downlink and uplink transmission in the proposed framework.
r The overall delay minimization problem is formulated in the secure MEC system considering both the secrecy rate and the uplink delay.
r The performance results show that the proposed Massive MIMO-NOMA based cooperative MEC system significantly reduces the overall delay through multiple helpers. Furthermore, Massive MIMO and NOMA technologies facilitate secure offloading in a cooperative MEC framework. The rest of this paper is organized as follows. We introduce the proposed system framework in Section II. The optimization problem formulation and proposed solutions are given for both the MEC framework and secure MEC system in Section III. Then, performance results are given in Section IV. Finally, Section V concludes the paper.

II. SYSTEM MODEL
In this paper, we consider a Massive MIMO based cooperative MEC system model consisting of one BS with M antennas, K single-antenna helpers, and one user with a single-antenna, under the assumption of M >> K >> 1, as illustrated in Fig. 2. NOMA is applied in the downlink transmission between the user and the helpers. On the other hand, in the uplink transmission between the helpers and the BS, a Massive MIMO is employed.
In this work, it is assumed that the perfect CSI between all nodes is available at the BS. The BS is connected to a MEC server by an optical fiber link to provide computing service for the users in its coverage. In Massive MIMO, a uniform linear array (ULA) antenna model where neighboring antennas are spaced by D = λ/2 with λ, which is the wavelength of the carrier frequency is employed.
Let K = {1, 2, . . . , K} denote the set of helpers. In the system, all helpers have the same hardware specifications. These helper nodes can be a laptop, or a tablet, which have certain computation and communication resources.
The user has computation tasks with a data size of L. It is assumed that there is no strong direct transmission link between the user and the MEC server since the user is at the cell edge. Thus, for the offloading phase, the user sends a certain part of its tasks to the MEC server through the helpers. It is assumed that these helpers are at the cell-center as shown in Fig. 2. The BS is integrated with the MEC server to execute the computation-intensive tasks that are offloaded by the helpers. Upon receiving the data, the MEC server applies computing to these tasks.
We consider partial offloading on the helper side, where helpers' resources are partitioned into two parts: one part is processed locally and the remaining is offloaded to the MEC server. In the proposed framework, these computational tasks, which depend on various parameters, are partitioned based on offloading decision factor, α k . After the user simultaneously offloads a certain part of its own data, L, to the helpers, the Helper k uses α k factor to decide the portion of data offloading and data computing. That is, for a particular time instant, the Helper k can have 0 < α k < 1 to act in the double modes. In the proposed system, α k is determined as a result of the optimization algorithm. It cannot be 0 or 1, which leads to the helpers working in cooperative mode while executing a certain portion of the tasks and establishing transmission to offload the remaining portion of the tasks.
In downlink transmission, NOMA based scheme is used to offload the cell-edge user's tasks to the K helpers simultaneously. K helpers are sorted as g 1 ≥ g 2 ≥ · · · ≥ g K , where g k is the channel gain between the user and the Helper k , ∀k ∈ K. The channel amplitude is modeled by the Rayleigh distribution with a variance of distance-dependent path loss coefficient. Then, the data rate R D k is defined as follows: where P D k is the downlink transmit power for the Helper k . σ 2 d is a variance of zero-mean complex additive white Gaussian noise (AWGN), where σ 2 d = N 0 B with N 0 is the noise power spectral density and B is the bandwidth.
In the uplink transmission, in a Massive MIMO system, K helpers simultaneously transmit their symbols to the BS. Then, the received data vector y ∈ C Mx1 at the BS is given by is the transmitted symbol vector, ∀k ∈ K. P U k is the uplink transmit power of the Helper k , h k ∈ C Mx1 is the channel vector between the k th helper and the BS, and z is the AWGN vector with zero mean and [29] is denoted by where ξ k is the path loss coefficient between the k th helper and the BS, N is the number of paths from the BS to the k th helper. c kn is the propagation gain coefficient between the k th helper and the BS associated with each path which is modeled as Rayleigh fading by CN (0, 1). a(φ k,n ) ∈ C Mx1 is the steering array vector at the BS, which is given by The azimuth angle can be expressed as φ k,n φ k + δ n with a nominal angle φ k ∈ [−90, 90] and a random deviation, , from the nominal angle with the angular standard deviation (ASD), σ φ .
The data rate R k for Helper k is defined as: where γ k is the received SINR for the k th helper after applying linear detector. The uplink average sum data rate of K helpers is computed as: The minimum mean square error (MMSE) detection scheme is used at the BS to detect the uplink data. To compute γ k for each helper, a linear MMSE detector scheme is employed by, We detect the data symbol for the k th helper by where v k is the k th row vector of V MMSE . We obtain the received symbol belonging to the k th helper as: where the first term represents the received data symbol of the k th helper, while the second and the third terms represent the interference from other helpers and noise, respectively. Thus, the SINR of the k th helper at the MMSE detector output can be calculated as

III. PROPOSED FRAMEWORK AND PROBLEM FORMULATION
In this section, we first introduce the offloading and computing scheme within the scope of the proposed framework and then formulate the corresponding optimization problem. Then, we investigate the secure offloading in the proposed MEC system. In the proposed framework, the cell-center helpers assist the cell-edge user in offloading the user's tasks to the MEC server since there is no strong direct transmission link between the cell-edge user and the MEC server. We cannot consider the helpers as pure relays since they can compute some parts of the offloaded tasks from the cell-edge user and at the same time, they can offload the remaining parts of these computation tasks to the MEC server. Moreover, we assume that there is no energy restriction on the helpers. Fig. 3 shows the overall delay scheme for offloading and computing in the system. The overall delay, T k , consists of the downlink data offloading, t u k , uplink data offloading, t k , and computing at the MEC server, t c k , for each helper.
Accordingly, the overall delay for each helper can be expressed as follows: The downlink transmission delay for the user to offload a certain part of its data, L, to the K helpers can be expressed as, (12) where k = L K , ∀k ∈ K. The required uplink transmission delay for offloading data from each helper to the MEC server is given by, For a given offload task α k k by the k th helper, the delay of computing this task at the MEC server is given by: where θ is the density/complexity of the task computing (i.e., the number of CPU cycles/bit) and represents the amount of CPU cycles needed for computing one bit. The computing resource assigned to k th helper is f k by the MEC server.
Since the helpers have to wait for all downlink data to perform computation and offloading, the uplink transmission is performed after the downlink transmission is completed. The solution to minimization of the downlink transmission delay, t * u , is obtained through Algorithm 1, which is given in the following section.
In this study, the aim of optimization in a Massive MIMO based cooperative MEC system is to minimize the overall delay for both offloading and computing. Toward this end, we jointly optimize the offloading decision factors, transmit powers and the MEC server's computing resources to minimize the overall delay.
The overall delay of offloading and computing for each helper can be expressed by w k (.) as a function of P D , P U , f, α as follows: where Hence, our optimization problem can be formulated as the minimization of the overall delay subject to the given constraints as: where P u is the maximum total transmit power of the cell-edge user. f h is local computation capability of each Helper k . In addition, the available computing resource at the MEC server defined by the maximum CPU operating frequency is f s . At the MEC server, its computational capacity, f s , is shared among all helpers. Constraint (16a) gives the minimum data rate constraint that the achievable rate in downlink transmission should be equal to or higher than a given threshold rate R D th,k . Constraint (16b) represents the power constraints in the NOMA downlink transmission. (16c) is the computing resource constraint of the MEC server. (16d) denotes the required time for the local computation of the remaining tasks at Helper k . (16e) represents the maximum transmit power of Helper k . (16f) gives the range of α k , which gives the ratio of tasks offloaded to the MEC server and computed locally at each helper.

A. PROBLEM SOLUTION
In this section, we derive the solution to Problem (16) for the proposed framework with K helpers Massive MIMO based cooperative MEC.
The constraint (16c) can be rearranged as the sum of the computing resources allocated to helpers is equal to the maximum CPU operating frequency of the MEC server as: Thus, the computing resources allocated to each helper are shared equally, such as f k = f s K , ∀k ∈ K. Furthermore, α k shows the ratio of tasks offloaded to the MEC server and the tasks executed locally at each helper. For the case of the α k is 0 or 1, the tasks can be executed either at the helpers or at the MEC server without any cooperation. In order to guarantee cooperation in the proposed MEC framework, the value of α k in (16f) is determined between 0.3 and 0.7. In this way, the helpers execute some tasks regarding their computing resources while offloading the remaining tasks to the MEC server. Then, we re-write the constraint (16f) as: Accordingly, in order to solve the optimization problem (16), the auxiliary variable τ is introduced. In this way, it is considered that the overall delay T k for each helper is equal to each other and denoted by τ . Thus, the optimization Problem (16) becomes the minimization of τ and can be rearranged as follows: min P D ,P U ,α τ (19) s.t. (16a), (16b), (16e), (17), (18), Constraint (19b) shows that the overall delay for each helper should be equal to or less than a constant, τ .
Firstly, we give the solution for the case of K = 2 and then generalize it to the K helpers.
In this way, firstly, we focus on the solution for the downlink transmission part. The constraint (16b) associated with the downlink transmit power for helpers can be written as P D 1 + P D 2 = P u . Thus, β ∈ (0, 1) is determined as the power allocation factor and becomes one of the optimization parameters. Then, the allocated downlink transmit power, P D 1 , for the Helper 1 is determined by βP u while the allocated downlink transmit power, P D 2 , for the Helper 2 is calculated as (1 − β )P u . The achievable rate of the Helper k in an OMA system is given by where the factor 1 2 is due to the fact that conventional OMA results in a multiplexing loss.
The achievable rate in the NOMA system should be no less than in the OMA system [30]. In this case, R D th,k is set as R OMA k . Then, the range of β can be obtained directly from the constraint related to the new optimization problem (19), (16a).
Then, we can extend the downlink power allocation factors to the K helpers as in [28]. Assume that n, k represents each helper's index, which provides cooperation between the user and the MEC server. The superscript of β n,k k denotes the indices of the pairing helpers and the upper bound of β n,k k is given as z k . Thus, it is written as Algorithm 1: Solution of the Downlink Transmission Delay for K Helpers. Input: g k , k ; ∀k ∈ K • Step 1: Solve (25) to find solution β by using derivative-free method with the optimization tool. • Step 2: Calculate the delay for each helper, t u k as in (12). • Step 3: Find the solution for downlink transmission delay as in (26).
Considering the magnitude of the channel gain in the downlink transmission, the order of z k in (21) for ∀k ∈ K is given as where In this way, the range of the power allocation factors, β k , of each helper is determined as: (23) where 1 ≤ k ≤ K − 1, K ≥ 3 and z 0 denotes 0. Therefore, the downlink transmit power for each helper is written as β k P u while the downlink transmit power for Helper K is calculated as P u − ( K−1 k=1 β k P u ). In order to minimize the overall delay in (19), firstly, the maximum downlink transmission delay, t u k , is minimized for a given range of the power allocation factors, β: where β = {β 1 , . . . , β K }.
To solve the problem (24), we use the approximate approach that minimizes the summation of downlink transmission delay belonging to all helpers. Then, the objective function is re-written by (25) s.t. (23).
Thus, the minimum of the unconstrained multi-variable function of (25) is obtained by the optimization tool using the derivative-free method. After obtaining the values of β, we find the solution for the downlink transmission delay, t * u , and the downlink transmit power for helper k, P D k * . The downlink transmission delay, t * u , is determined by, The details of the solution for the downlink transmission delay, t * u for K helpers are summarized in Algorithm 1.
After the downlink transmission delay, t * u , is determined through Algorithm 1, we focus on the uplink transmission to solve the corresponding optimization problem (19) efficiently by using standard nonlinear programming optimization tools [31]. Accordingly, the constraint (19a) is rewritten as: ( Similarly, we can also write the overall delay constraint (19b) for each helper as follows: Then, we reformulate the problem (19) for the uplink transmission part as the minimization of τ under P U , α with the constraints (16e), (17), (18), (27) and (28). Thus, the minimum of a constrained nonlinear multivariate function can be obtained using the interior-point method where a log-barrier term is used to transform the problem with the inequality constraints into the equality constraints [32]. Barrier functions are generally logarithmic functions to transform a constrained problem into a sequence of unconstrained problems. These functions prevent the iterates to be out of the feasible region by acting as a barrier.
The interior-point method for the solution of the overall delay is given in Algorithm 2. In this minimization problem, x is defined as a vector of the components; x = [α k , P U k ], ∀k ∈ K. The vector x satisfying all the constraints is called a feasible solution for the Problem (19). The initial values x 0 are defined through lower and upper bounds for each component τ, α k and P U k in x. As a result of Algorithm 2, the output values are obtained as α * k , P U k * , ∀k ∈ K to obtain minimum overall delay, τ * , under the given constraints. Thus, the uplink delay, t h , is calculated as the summation of uplink transmission delay, t * , and computing delay at the MEC server, t * c as: where the uplink transmission delay and computing delay at the MEC server are given, respectively: The complexity of the interior-point method in Algorithm 2 can be given as O( √ n 1 ε ) iterations [33], where n is the number of variables in the problem, depending on mostly the number of helpers, K, in the system. Thus, the number of helpers and the choice of the convergence tolerance, ε, affect the complexity.

B. SECURE OFFLOADING IN MEC SYSTEM
As shown in Fig. 4, we consider a secure MEC offloading scenario where an eavesdropper with a single antenna near the BS can overhear the messages transmitting from helpers to the BS [24]. Specifically, this eavesdropper is passive and never Algorithm 2: Solution of the Overall Delay based on Interior-Point Algorithm for K Helpers.
Input: g k , h k ; ∀k ∈ K and t * u , K • Initialization Step: 1: Select a growth parameter, η > 1. 2: Select a stopping parameter, ε > 0. 3: Set j=1. 4: Select an initial value of the barrier parameter μ j > 0. 5: Rearrange the inequality constraints in (27) and (28) as . . , 2K. 6: Choose initial feasible points x j with G(x j ) < 0. 7: Reformulate the objective function as an auxiliary function by, where P(.) is an interior penalty function as: • Iteration Step: 8: Starting from x j , use an unconstrained search technique to find the point that minimizes S μ j (x) and call it as the new starting point, x j+1 • Stopping Criterion Step: 9: if x j+1 − x j < ε, stop then 10: x j+1 is an estimate of the optimal solution 11: else 12: μ j+1 = ημ j 13: Reformulate the S μ j+1 (x) with j = j + 1 14: Go to iteration step Output: τ * , P U k * , α * k ; ∀k ∈ K transmits signal and attempts to intercept communications between helpers and the MEC server. Thus, the eavesdropper passively listens to uplink communications. The aim of the helpers is to offload their computation tasks to the MEC server partially while satisfying secrecy constraints. Therefore, we consider PLS technology to ensure that the computing tasks are securely offloaded to the MEC server.
With the partial offloading, α k k bits of computing tasks are securely offloaded to the MEC server and the Helper k can compute the remaining (1 − α k ) k bits locally. During the uplink transmission, where the helpers send their data to the BS, the received signal at the eavesdropper is given by, where h e,k is the channel between the k th helper and the eavesdropper, which is modeled by the Rayleigh distribution with a variance of distance-dependent path loss coefficient and n is AWGN with zero mean and σ 2 e = N 0 B variance. The achievable secrecy rate of each helper, R k,s , is given by where R k is defined in (5) and R k,e denotes the data rate belonging to k th helper at the eavesdropper: Then, the total secrecy rate is given by In order to avoid information leakage to the eavesdropper, the PLS technique is adopted in the offloading process. The achievable secrecy rate of any helper should be non-negative; otherwise, this helper would stop offloading tasks to the MEC server. When the channel gain of the helper is higher than the channel gain of the eavesdropper, secure transmission is guaranteed. Otherwise, the helper does not offload its computation task to the MEC server since the channel gain of the helper is lower than the channel gain of the eavesdropper. Specifically, if R k ≤ R k,e , we cannot ensure secure transmission, and (33) results in the value of 0. Thus, in this work, we assume that the channel gain of the helper is higher than the channel gain of the eavesdropper.
While designing a secure offloading mechanism in the proposed MEC framework, we define a constraint based on secrecy rate to diminish the offloading information leakage to the eavesdropper. According to [6] [19] [22] and [24], the transmission delay by considering the security constraint is expressed as follows: Thus, we change the uplink transmission delay for offloading, t k , in (13) into (36) as uplink secure transmission delay. The uplink delay, t h , is calculated as in (29) where t k is given in (36).
For the Problem in (37) with its given constraints, we perform Algorithm 2 to determine the uplink transmission delay under secrecy constraints.

IV. PERFORMANCE EVALUATION
In this section, the performance of the proposed framework is evaluated through the simulation parameters listed in Table 1.
The distance between the cell-edge user and the BS, d, is set at 750 meters. The cell-center helpers are located at d u,1 = d 3 and d u,2 = 2d 3 for the K = 2 case. We assume that helpers are at least 50 m away from the cell-edge user and the MEC server. For the case of K = 3 and K = 4 helpers, their distances are distributed between d u,1 = d 3 and d u,2 = 2d 3 . As performance metrics, the overall delay performance for different number of helpers, K, different number of antennas, M, and different amount of user's offloaded data, L are provided. In addition, the uplink sum data rate is obtained for different parameters.
The channel is modeled using Rayleigh fading components with distance-dependent path loss, whose parameters depend on whether the receiver is the BS or the helper. In the case where the receiver is the BS, the path loss model conforms to

A. PERFORMANCE RESULTS OF COOPERATIVE MEC
The uplink delay performance for the different numbers of antennas and the number of helpers at the fixed data amount of L = 1.2 Mbits is shown in Fig. 5. As the number of BS antennas, M, increases, the offloading delay decreases. The reason is that since the data rate of helpers increases with the number of antennas, the uplink transmission delay for offloading reduces. It results in a lower uplink delay since the uplink transmission delay is more dominant than the computing delay at the MEC server. Moreover, the higher number of helpers, K = 4, reduces the uplink delay by an average of approximately 35% and 15% compared to K = 2 and K = 3, respectively. Fig. 6 illustrates the overall delay performance versus the user's offloaded data, L, which is equally distributed to each helper for the different number of helpers and M = 32. The overall delay increases with an increase in the amount of the user's offloaded data, L. The reason is that the higher  amount of offloaded data leads to an increased transmission delay. In addition, the computing delay increases due to the higher amount of data that needs to be processed by the same server computing resources. The cooperative MEC with K = 4 reduces the overall delay by 16.4 ms and 11.1 ms compared to the case of K = 2 and K = 3, respectively for L = 1 Mbits. On the other hand, for L = 1.4 Mbits, this difference increases and the cooperative MEC with K = 4 reduces the overall delay by 22.7 ms and 15.9 ms compared to the case of K = 2 and K = 3, respectively. Fig. 7 provides the uplink sum data rate performance of the different number of helpers and antennas for L = 1.2 Mbits. When we increase the number of antennas, the sum data rate of all schemes increases. Besides, the cooperative MEC with K = 4 has the highest sum data rate for all cases. Specifically, the cooperative MEC with K = 4 achieves 62.8% and 87% higher sum data rate compared to the case of K = 2 at N = 32 and N = 256, respectively.    Table 2 gives overall delay, τ * , downlink transmission delay, t * u and uplink delay, t h , as a result of the proposed algorithm for different K and M values at fixed L = 1.2 Mbits. It is shown that downlink transmission results in a higher delay than uplink transmission. In addition, the computing delay at the MEC server, t * c , is the lowest. The downlink transmission delay increases when the number of helpers is increased since the power allocated per helper is reduced. It is observed that the cooperative MEC with K = 4 has a lower overall delay and the highest sum data rate and when the number of antennas is increased from M = 32 to M = 256, the uplink delay decreases. Table 3 shows the outputs of the proposed algorithms including α * k , P D k * [dBm], P U k * [dBm], ∀k ∈ K for M = 32 and L = 1.2 Mbits. It is observed that the value of α * k is slightly decreased when the number of helpers are increased. Also, the downlink and uplink transmit powers of helpers are allocated inversely proportional to their distances to the users and the MEC server, respectively. The downlink transmit powers of the cooperative MEC with K = 2 are higher than the case of K = 3 and K = 4, which results in lower downlink transmission delay.

B. PERFORMANCE RESULTS FOR SECURE OFFLOADING IN MEC SYSTEM
The performance results of the secure offloading MEC system are obtained for the case of K = 2 helpers. The eavesdropper is positioned at two different distances from the helpers. Table 4 shows the distances between the helpers and the eavesdropper, in which d e,1 is the distance to the Helper 1 and d e,2 denotes the distance to the Helper 2 .
We provide simulation results to evaluate the uplink delay for the proposed framework in various locations of the eavesdropper. In addition to that, we provide comparison results with the Secure full offloading where all helpers offload all their tasks to the MEC server for computing. In the system model, it corresponds to the case of α k = 1, ∀k ∈ K. In order to provide fair comparison results, the same uplink transmit power of each helper is used in both the proposed secure MEC and secure full offloading systems. Then, the average sum secrecy rate for both the partial and the full offloading MEC systems will be the same. Fig. 8 demonstrates the average sum secrecy rate versus the number of antennas for the proposed secure MEC scheme at L = 1.2 Mbits. It is shown that Case 1 has a higher sum secrecy rate compared to Case 2 since the wireless channel deteriorates when the distance between the helpers and the eavesdropper is increased.
In Fig. 9, the uplink delay performance versus the number of antennas is depicted for L = 1.2 Mbits. It is shown that we provide a secure task offloading at the expense of increasing uplink delay. As the distance between the helpers and the eavesdropper is increased, the uplink delay reduces accordingly. The proposed cooperative MEC outperforms the secure full offloading for any number of antennas, which shows the efficiency of the partial offloading in secrecy.

V. CONCLUSION
In this study, we have proposed a Massive MIMO based cooperative MEC system where cooperation is established through the cell-center helpers. The overall system has been investigated as downlink transmission by applying NOMA technology and the uplink transmission by performing Massive MIMO communication. We have formulated the overall delay minimization for the proposed framework under computing capability and transmit power constraints. In addition, we have investigated the proposed algorithm for secure offloading MEC system. The simulation results indicated that the overall delay is reduced when the number of antennas and helpers is increased in the proposed framework, which also achieves secure offloading. Moreover, the proposed secure MEC system decreases the uplink delay compared to the secure full offloading scheme while having the same secrecy rate, which shows the superiority of cooperative schemes. As a result, in this paper, we have demonstrated that Massive MIMO and NOMA technologies facilitate secure offloading in cooperative MEC systems.