Particle Swarm Optimization-Based Secure Computation Efﬁciency Maximization in a Power Beacon-Assisted Wireless-Powered Mobile Edge Computing NOMA System

: In this paper, we aim to provide reliable user connectivity and enhanced security for computation task ofﬂoading. Physical layer security is studied in a wireless-powered non-orthogonal multiple access (NOMA) mobile edge computing (MEC) system with a nonlinear energy-harvesting (EH) user and a power beacon (PB) in the presence of an eavesdropper. To further provide a friendly environment resource allocation design, wireless power transfer (WPT) is applied. The secure computation efﬁciency (SCE) problem is solved by jointly optimizing the transmission power, the time allocations for energy transfer, the computation time, and the central processing unit (CPU) frequency in the NOMA-enabled MEC system. The problem is non-convex and challenging to solve because of the complexity of the objective function in meeting constraints that ensure the required quality of service, such as the minimum value of computed bits, limitations on total energy consumed by users, maximum CPU frequency, and minimum harvested energy and computation ofﬂoading times. Therefore, in this paper, a low-complexity particle swarm optimization (PSO)-based algorithm is proposed to solve this optimization problem. For comparison purposes, time division multiple access and fully ofﬂoading baseline schemes are investigated. Finally, simulation results demonstrate the superiority of the proposed approach over baseline schemes. M , T ] , respectively. The initial values of the s -th particle’s positions


Introduction
The rapid advances in fifth-generation (5G) wireless networks have improved cutting-edge technology requirements, such as support for massive connectivity due to the proliferation of Internet of Things (IoT) devices and growth in the amount of data in modern society [1]. In this sense, recent technological breakthroughs for next-generation wireless networks have promoted the use of smart applications, such as virtual reality, augmented reality, mobile online games, face recognition, and so on. However, latency sensitivity and high computation intensity are two main features of these applications that represent a challenging task for mobile devices, which have low computing capabilities and a limited battery capacity. To tackle these issues, mobile edge computing (MEC) appears to be a technology that can remarkably decrease the computing burden and improve the computing capabilities of mobile devices [2]. In a MEC system, servers are used by mobile devices to offload tasks for low-latency computing, which can be executed in partial or binary modes. In partial mode, computation tasks can be processed into two parts: one part is executed locally at the mobile device and the other is offloaded to the nearby MEC server. In binary mode, the complete task is executed locally, or the entire task is offloaded to a close-proximity MEC server via uplink [2,3]. Furthermore, future wireless networks should be able to support massive connectivity of devices because of the rapid advancements in the IoT. However, this fact entails the spectrum scarcity issue, which can be handled by the application of a non-orthogonal multiple access (NOMA) transmission strategy that works in the power domain and employs superposition coding and successive interference cancellation techniques. Therefore, NOMA with MEC has aroused attention in recent research work that pointed out the superiority of NOMA in comparison with the conventional orthogonal multiple access (OMA) baseline scheme [4][5][6][7]. In [5], the authors applied NOMA to offload tasks from each user to a MEC server, with the aim being to improve the resource allocation problem in an ultra-dense network. They demonstrated that NOMA outperforms the conventional time division multiple access (TDMA) technique in terms of energy consumption and task delay. A NOMA-based optimization scheme was investigated in cite6 to minimize energy consumption by users in a MEC network through an efficient heuristic algorithm. The simulation results showed significant energy-consumption lowering by applying the NOMA framework. Energy-efficiency maximization in NOMA-enabled massive IoT networks based on resource allocation strategies was investigated by Liu et al. [7]. The paper concluded that NOMA for offloading can save a considerable amount of energy, in comparison with existing baseline schemes such as OMA.
In [2], Lin et al. considered a NOMA-enabled MEC network in which several users perform partial offloading under the presence of an eavesdropper. The authors investigated the maximization of the secure computation efficiency subject to the constraints of minimum computation rate, maximum transmission power allowed by the users, and maximum CPU frequency, where the solution was based on the successive convex approximation (SCA) technique. In [3], Wu et al. considered a MEC system with NOMA composed of two users and one eavesdropper. The authors used a partial offloading set-up with the aim to minimize the weighted sum-energy consumption of the users subject to the constraints of secrecy offloading rates, channel capacity, and maximum tolerable secrecy outage probability. The solution was based on the exhaustive search method and semi-closed form expressions. In [8], Wu et al. studied a multiuser MEC system with NOMA under the presence of an eavesdropper. The partial offloading mode was used and the authors investigated the minimization of the weighted sum-energy consumption subject to the constraints of required bits securely offloaded, channel capacity, and maximum tolerable secrecy outage probability. The solution was based on the bisection method and semi-closed form expressions. However, none of the previous three references have considered a wireless power transfer phase, a PB device, and the presence of an energy harvesting user with its corresponding minimum EH constraint. Therefore, several new variables and constraints are included in the optimization problem proposed in this paper, compared with those in [2,3,8] where the solutions proposed in these references are not suitable for the problem investigated in this paper. For instance, the variable to define the time for the wireless power transfer phase is coupled with the transmission power variables and the variable to define the local computing time is coupled with the variable of the local computing CPU frequency. In addition, the works in [3,8] considered the minimization of the weighted sum-energy consumption which is different to the proposed secure computation efficiency (SCE) maximization in this paper. In [9], Wu et al. considered a NOMA-enabled multi-access MEC system where a single mobile user can offload part of its task to a group of edge-servers. The authors investigated the minimization of the delay in completing the task required by the mobile user under the constraints of maximum available energy at the mobile user and the maximum allowed energy at the edge-server to process the task requirement. However, the authors did not study the physical layer security under the presence of an eavesdropper and did not consider a wireless power transfer phase, a PB device, and the presence of an energy harvesting user with its corresponding minimum EH constraint. Therefore, the solution proposed in [9] cannot be used in the problem proposed in this paper.
Furthermore, wireless power transfer (WPT) has been investigated as a promising solution to deal with the limited battery capacity of wireless devices in MEC networks. WPT can steadily reload the batteries of a large number of low-power wireless devices through a dedicated radio frequency (RF) transmitter. The foremost benefits from WPT are focused on prolonging the wireless network lifetime, reaching sustainability in network operations, and improving the communications capacity in edge wireless devices. In a WPT-aided MEC network, the access point (AP) sends RF energy to customers on downlink. Then, the customers use the harvested energy to perform computation tasks in partial or binary offloading modes. The integration of WPT with MEC is denominated as a wireless-powered MEC system, which has been studied in recent work [10][11][12][13][14] to extend the operational lifetime of the battery in both partial [10] and binary [11,12] offloading modes. In [13], the authors approached energy-efficient computation offloading for a cooperative MEC network where a user near a hybrid AP helps to offload tasks from a distant user, and both users benefit by receiving energy from the hybrid AP through WPT. In [14], a wireless-powered MEC network was studied for local computing and offloading by jointly optimizing energy and task allocation. In addition, the wireless signal experiences attenuation as the distances increase and in the presence of obstacles, where the integration of a power beacon (PB) provides a solution to satisfy energy harvesting (EH) requirements of the users. The PB is a low-cost and low-complexity device that provides wireless energy to users, and it does not need high computational capabilities. In [15], a wireless information and power transfer system aided by a PB was proposed, with the objective being to minimize total transmit power under constraints for QoS and EH requirements. The results showed the benefits from the PB in satisfying the EH requirements of the users.
Although the application of a NOMA system in MEC networks increases the possibilities of meeting 5G requirements, wireless security is still a challenging issue to solve. In particular, confidential information's vulnerability to being trapped by eavesdroppers increases when computation tasks are offloaded from mobile devices to MEC servers over wireless channels. Physical layer security (PLS) has been considered an alternative to the conventional higher-layer encryption techniques that utilize key management and complex algorithms, and risk being broken by high computational capabilities of the eavesdropper. On the other hand, PLS keeps information safe under wireless communications by exploiting physical layer features of wireless channels, such as noise, interference, fading, and so on, without the use of cryptographic keys and regardless of the computing capability of the eavesdropper. In the literature, there are some recent researches that encompass PLS in NOMA-MEC networks to accomplish a boost in secrecy transmission and to improve energy-efficient resource allocation. In this sense, green communication is an essential topic that has been considered for suitable development in future wireless networks due to excessive energy consumption that will bring plenty of environmental problems [2,3,16]. For instance, in [16], the authors maximized the computation efficiency of the NOMA-MEC network in both partial and binary offloading modes. The paper concluded that the computation efficiency achieved by using partial offloading can exceed the performance obtained by applying binary offloading mode. Moreover, this article pointed out the superiority of NOMA over the TDMA scheme. Although this study did not consider PLS, it opened doors for computation efficiency maximization in different next-generation MEC networks. On the other hand, PLS in a NOMA-enabled MEC system in the presence of a malicious eavesdropper was studied [2,3]. The results demonstrated that partial offloading mode with NOMA outperforms fully offloading mode with NOMA and other the baseline schemes, such as OMA. Moreover, Lin et al. [2] highlighted the concept of computation energy-efficiency, which is defined as the ratio of total computation bits to energy consumption. Different from the uplink transmission schemes proposed in [2,3], our proposed scheme consists of uplink and downlink transmission to further optimize the energy efficiency of the system through the application of WPT service of the AP and the energy transmitted from the PB.
None of the research articles discussed above considered the study of PLS in a PB-assisted wireless-powered NOMA-MEC network with a practical nonlinear EH user. In this paper, we demonstrate through simulations that by employing a PB in the proposed MEC network, the secrecy computation efficiency (SCE) is enhanced. The main advantage of PBs is that they can be densely deployed without a backhaul link installation or complex computational capabilities [17]. We investigate the design of a proper low-complexity resource-allocation scheme to block an eavesdropper in a wireless-powered NOMA-enabled MEC network with a practical nonlinear EH user and PB. From this, we provide a solution based on the particle swarm optimization (PSO) algorithm to maximize the SCE while satisfying the QoS requirements of NOMA users in order to successfully compute their tasks in a safe manner under partial offloading mode. Moreover, the optimization problem is subject to minimum EH by the non-linear EH user. In the literature, PSO is considered a powerful optimization method since it has demonstrated high performance in solving optimization problems. For instance, in our previous works [1,18], the PSO technique has been investigated and applied for maximizing the secrecy sum rate and the secrecy energy efficiency of a cooperative NOMA network, respectively. In both cases, the results showed that the proposed PSO-based method accomplished yield very close to that obtained by the optimal exhaustive search method, but with the benefit of low computational complexity. Furthermore, analytical solutions that provide close-form expressions are rigid for new system model designs. Particularly when the system model includes a new network element, such as mobile device or transmitter, we have to reformulate the optimization problem and find a new solution. Moreover, the procedures to transform non-convex problems into convex problems are not the same for all the cases and depend on the constraints and variables of the optimization problem on a case by case basis. Therefore, most of the solutions offered in related references can not be applied to the proposed problem in this paper. Next, we analyze the optimization problems in related references and the reason why those approaches can not be used in this paper. This motivated us to introduce PSO as a potential optimization solution in an innovative wireless-powered NOMA-enabled MEC system with a practical non-linear EH user. Different from the works in [1,18], where the downlink transmission from the transmitter to the receivers is only considered to carry messages, in this paper an uplink-downlink transmission scheme is studied where the AP integrates a MEC server to alieve the burden of the users. Moreover, the AP provides the WPT service and practical nonlinear EH and PB are integrated into the network.
The main contributions of this paper are as follows.
• We focus on PLS to study the SCE maximization problem in a wireless-powered NOMA-enabled MEC network assisted by a PB under partial offloading mode. Moreover, a practical nonlinear EH and power amplifier coefficient are considered in the design of our proposed scheme.

•
We aim to reduce computational complexity. Therefore, we provide a low-complexity PSO-based solution for the proposed challenging non-convex optimization problem, which maximizes SCE by satisfying the QoS requirements of NOMA users and meeting the minimum energy harvested by non-linear EH users. In particular, we jointly optimize the local computing frequency, the computation time for local computing, and the power allocation variables involved in the network. Moreover, we obtain the limits of the search range of each variable to be optimized through mathematical procedures to properly find the global best particle's position.

•
We further investigate SCE maximization for the conventional TDMA-MEC system under partial offloading mode (and for NOMA-MEC system, fully offloading) in order to compare them with our proposed scheme. Numerical results to assess the performance of each scheme show that the SCE obtained under our proposed wireless-power NOMA-enabled MEC scheme is superior to that of other baseline schemes. Moreover, the numerical results show that a system with a PB improves SCE performance.
The rest of the paper is organized as follows. Section 2 presents the proposed system model and two baseline schemes for comparison purposes. Section 3 describes the problem formulation. Section 4 explains the proposed PSO-based solution. The numerical results are given in Section 5. Finally, the conclusions are presented in Section 6.

System Model
We study a wireless-powered multi-user NOMA-enabled MEC system assisted by a PB in the presence of an eavesdropper, as illustrated in Figure 1, where the AP provides the WPT service for M users and a nonlinear EH user. The AP integrates the MEC server and an RF energy transmitter. Moreover, each user device contains an energy-harvesting circuit and a rechargeable battery that is able to store the collected energy for its operations. It is assumed that the communications and power transferred from the PB and the AP are sent over the same frequency band and that all nodes are equipped with a single antenna, similar to the research in [11,19,20]. In this paper, we consider partial offloading. Note that local computations and the downlink WPT transmission from the AP and PB can be performed simultaneously, but the uplink offloading operation and downlink WPT cannot be simultaneously executed [11,[21][22][23][24]. The transmission frame duration, T, illustrated in Figure 2, is based on four phases. First, the AP and the PB broadcast the RF energy to charge the M users and the EH user during the first phase, with duration θT, θ ∈ (0, 1]. Then, users offload tasks to the MEC server by employing NOMA during the second phase, over duration (1 − θ) T. In the third and fourth phases, respectively, the MEC server carries out the computation tasks and downloads the computation outcomes. To that end, computation time τ 1 and downloading time τ 2 belonging to the MEC server are omitted, as the MEC server is considered to have a stronger computation capability than the users, and the number of bits corresponding to the results of the tasks is negligible [16,[19][20][21][22][23][24]. The baseband equivalent channels from the AP and PB to NOMA users are defined as h m ∈ C and f m ∈ C, respectively. Meanwhile, the channel from each of the m users to the eavesdropper is defined as g m ∈ C. It is understood that the same channel, h m , is used for both uplink and downlink due to channel reciprocity [11]. Moreover, we consider the noise variance of the MEC server and the eavesdropper to be the same, denoted as σ 2 = σ 2 mec = σ 2 eav . In this paper, we consider a practical non-linear EH model based on the work in [16,25], which was subjected to experimental evaluations to validate effectiveness. In particular, the proposed EH model satisfies the sensitivity property, which states that when the input RF power does not exceed the sensitivity boundary, the harvested energy is zero. This differs from the works in [10][11][12][19][20][21][22][23][24] that employed the ideally linear EH model. Accordingly, the energy harvested by the m-th user is given by where P AP and P PB are the transmit power from the AP and the PB, respectively. P eh_ max represents the maximum harvested power of the m-th user, m = 1, 2, 3, . . . , M; is the sensitivity boundary; µ and λ are the control parameters for the steepness of the function; and [x] + = max (x, 0) selects the bigger value of x and 0. Based on the work in [16,23], the aforementioned parameters were set to P eh_ max = 0.004927 W, p 0 = 0.000064 W, µ= 274, and λ= 0.29. In addition, we consider the EH user to be a sensor node that is regularly powered by a battery with a limited lifetime [26]. Similar to the m-th user, the EH device follows a non-linear EH model and is expressed as follows, where l AP ∈ C and l PB ∈ C are the channels to the EH user from the AP and PB, respectively.

Local Computing Mode
Each m-th user is able to compute tasks and harvest energy simultaneously, as the computing unit and the energy harvesting circuit are separate [16,27]. This means that the entire frame can be used for local computing. The number of CPU cycles required to compute one bit of raw data at the m-th user is denoted as C m . Let q m denote the CPU frequency (in cycles per second) of the m-th user, which should be lower than the maximum computation speed, i.e., q m ≤ q max . The effective capacitance coefficient of the processor's chip is denoted by α m . Then, the energy consumption of the local computing mode can be expressed as E loc m = α m q 3 m t m , where t m represents the computation time of the m-th user, 0 ≤ t m ≤ T. Thus, the number of locally computed bits for the m-th user in local computing mode is defined as the amount of bits processed in the time frame considered, given by To secure sustainable operation for the m-th user, the utilized energy should not exceed that of the harvested energy, i.e., E loc m ≤ EH m .

Partial Offloading Mode with NOMA
As we consider partial offloading to be separate from local computing, each user can offload tasks to the AP after completing the θT period for harvesting energy, so the (1 − θ) T period can be utilized for offloading. On uplink, multiple users apply the NOMA transmission strategy to offload their computation tasks simultaneously. Following the processes in [11,16], included in the offloaded task of the m-th user is communications overhead (represented by δ), such as a packet header, and it is greater than 1, i.e., δ > 1. Without loss of generality, the distance between the m-th user and the AP is considered to be sorted as follows, d AP,u 1 ≥ d AP,u 2 ≥ . . . ≥ d AP,u M , and then channel gain is in descending order: According to NOMA principles for uplinks employing successive interference cancellation (SIC) techniques, the decoding process is in descending order of channel power, as the received signal power that belongs to the stronger channel's user corresponds to the M-th user, which is decoded first at the AP and contains interference from all users with relatively weaker channel conditions. Thus, the secrecy offloading computation of the m-th user is given by the total number of computed bits at the MEC server minus the total number of computed bits at the eavesdropper, and can be expressed as follows, where [x] + ∆ = max (x, 0) means the higher value between x and zero, B represents the channel bandwidth, σ 2 denotes the power of additive white Gaussian noise (AWGN), and p m denotes the transmission power for the m-th user. The offloading consumed power indicated in Equation (5) considers the amplifier coefficient, the consumed power during the first phase for receive-signal processing, and the constant circuit power consumption for transmit signal processing, which are denoted as ϑ, p r , and p c , respectively [16]: The SCE of the proposed NOMA-enabled MEC WPT system is defined as the ratio of total computed bits to power consumption in both modes, i.e., local computing and offloading mode [2,16], as follows,

Offloading Mode with TDMA
For comparison purposes, we describe the system model of the TDMA benchmark scheme in which time resource (1 − θ) T has to be divided among the M users. Let the offloading time for the m-th user be denoted as w m . Then, the corresponding secrecy computed bits can be given by Consequently, the offloading SCE of each user is given by

Problem Formulation of Partial Offloading Mode in the NOMA-MEC System
In this paper, we develop a low-complexity resource allocation scheme based on the PSO algorithm for SCE maximization in a wireless-powered NOMA-MEC system with a nonlinear EH user and in the presence of an eavesdropper. Specifically, period θ, local computing CPU frequency q m , computation time t m , and power allocation p m are jointly optimized variables subject to the following constraints, where constraint C1 indicates the minimum computed bits required by the m-th user, and this value is targeted by r min . Constraint C2 indicates that the total consumed energy by the m-th user for partial offloading cannot exceed the harvested energy. Constraint C3 establishes the maximum CPU frequency for each user, while constraint C4 indicates that power allocation should be higher than zero. Constraint C5 indicates the minimum harvested energy by the EH user, and this target value is represented by ξ EH . Constraints C6 and C7 define the boundaries for the local and offloading computing times, respectively.

Problem Formulation of Fully Offloading Mode in the NOMA-MEC System
For comparison purposes, the problem formulation for fully offloading was developed. In offloading mode, local computing is omitted, and problem formulation P2 is given as follows, C3: (9e), (9f), (9h),

Problem Formulation of Partial Offloading Mode in the TDMA-MEC System
SCE maximization is formulated as follows when partial offloading mode is applied in the TDMA-MEC baseline scheme, C3 : C5: (9d), (9e), (9f), (9g), (9h), where constraints C3 and C4 define the limits for offloading time, which cannot be longer than 1 − θ, and cannot exceed 1.

PSO-Based Resource Allocation Scheme for SCE Maximization
In this paper, we consider a low-complexity resource-allocation scheme based on PSO to maximize the SCE in the proposed wireless-powered MEC network. The PSO-based algorithm has been applied to various optimization problems in the engineering field because it provides high precision and low computational complexity. This optimization technique focuses on achieving an approximately optimal solution by iteratively updating each particle's position, which leads to the global and local best positions. The position of each particle corresponds to the variables to be optimized. The global best position corresponds to the particle that achieves the best yield in the swarm, while the local best position corresponds to the position that achieves the best yield for that particle. In this context, the global best position is achieved by the particle position that gets the highest value for SCE.
In the following sections, we describe the development of the PSO algorithm for the proposed NOMA-MEC system and the baseline schemes, such as the TDMA-MEC system and the fully offloading MEC system.

PSO-Based Algorithm for Partial Offloading in the NOMA-MEC System
In the proposed NOMA-MEC system, the s-th particle's position is given by the set of 1 + 3M variables to be optimized, as follows, where s = 1, 2, . . . , S, in which S indicates the number of particles in the swarm, and x θ,s , x p,s , x q,s , x t,s represent the resource variables θ, p = {p 1 , . . . , p M }, q = {q 1 , . . . , q M }, and t = {t 1 , . . . , t M }, respectively. Then, we define the search region of the s-th particle according to the boundaries belonging to each variable. For instance, the lower boundary for period θ is given by (28) and is calculated based on constraint (14): The lower boundary for transmission power variable p m is given by (29) and is calculated based on constraint (10): The lower boundary for variables t m and q m are obtained based on constraint (10) as follows, and The upper boundary of variable θ is given by (32), based on constraint (10): The upper boundary of power allocation variable p m is denoted as p max , and the upper boundaries for q m and t m are q max m and T under constraints (12) and (15) are randomly initialized based on the uniform distribution between these limits established for each particle's position. Moreover, a penalty function based on objective function f (x s ) = f (θ, p m , q m , t m ) of problem P1 is used to deal with the constraint as follows, where the penalty value is denoted as γ, and k i is the i-th constraint of problem P1 corresponding to (10), (11), and (14). In addition, the function based on constraint ρ (k i ) = 0 means that the i-th constraint is satisfied; otherwise, ρ (k i ) = 1. Furthermore, the procedures of the proposed PSO-based algorithm to solve SCE maximization problem P1 are described in Algorithm 1, where the input parameters for PSO are the maximum number of iterations, the number of particles in a swarm, the inertia weight for velocity updates, and the cognitive and social parameters, which are denoted as I max , S, I w , c 1 , and c 2 , respectively. The initial values of the m-th particle's velocities are randomly initialized between the boundaries established for each particle's position: [θ min , θ max ], [p min,m , p max ], [q min,m , q max m ], and [t min,m , T]. Accordingly, in each successive b-th iteration, the velocity of each s-th particle is updated towards the relative global best position, gb, and the local best position, pb s , as follows, where n 1 and n 2 are random numbers between zero and one. The update of the particle's position is based on the current particle's position plus the corresponding updated velocity. Therefore, the s-th particle's position is updated as follows, In this paper, the low-complexity PSO-based optimization technique allows us to find the best values of the variables θ, p m , q m , and t m to maximize the SCE by iteratively updating the global and local best particle positions until reaching the stopping criterion.
Regarding the computational complexity of the PSO algorithm in solving problem P1, it is necessary to compute the number of iterations used and the number of particles in the swarm. Therefore, the total complexity is given by O (I max S). We highlight the fact that matrix operations are not needed to solve the proposed optimization problem. Initialize the local best position: pb s = x s , ∀s. Initialize the s-th particle's velocities: v Evaluate the global best position: Result: Set f (g best ) as the maximum SCE in the wireless-powered NOMA-enabled MEC system for problem P1.

PSO-Based Algorithm for Fully Offloading in the MEC
The procedure of the PSO-based algorithm in the fully offloading MEC system is developed in a way similar to that described in Algorithm 1. However, in this case, each particle's position represents a vector of 1 + M elements, (θ, {p m }), for which the limits are θ min , θ max _o f f , p min _o f f ,m , p max , respectively. These boundaries are indicated as follows,

PSO-Based Algorithm for Partial Offloading in the TDMA-MEC System
In the TDMA-MEC system, a particle's position is composed of the following 1 + 4M elements: θ, {w m , p m , q m , t m }. Thereby, the search space is established according to the following limits, Then, the procedure to apply the PSO algorithm is similar to that expressed in Algorithm 1.

Numerical Results
In this section, we numerically evaluate the performance of our proposed wireless-powered NOMA-MEC system with an EH user and PB. The simulations were programmed in Matlab (R2020a, The MathWorks, Inc., USA) by utilizing a Core i7-6700K CPU with 16 GB of main memory. In addition, the application of TDMA and fully offloading mode are considered baseline schemes to be evaluated and compared with our proposed scheme. The results presented in this paper were averaged over 50 independent channel realizations. In addition, the PSO algorithm was executed ten times for each channel realization, where the average value was used to evaluate the results.
In the considered work, the channels follow circularly symmetric, complex Gaussian random variables as follows, where d ij denotes the distance between node i and j and the path-loss exponent is denoted by v. The distances between the nodes were d −v in meters. Moreover, the simulation parameters listed in Table 1 were chosen based on the work in [16,18,[25][26][27][28][29][30][31]. Specifically, the parameters for the nonlinear EH model such as the maximum EH power, sensitivity threshold, circuit parameters were chosen based on the work in [16,25], the communication bandwidth, the minimum computation bits, the number of cycles for one bit, the amplifier coefficient, the constant circuit power were selected based on the work in [16] and the maximum cycles per second was selected based on the work in [26,27]. The simulation parameters for PSO are selected based on the works in [18,[28][29][30][31] which frequently provide good converge behavior. In addition, simulations were carried out to set the suitable PSO parameters such as inertia weight for velocity update, cognitive and social parameters. Figure 3 shows the convergence of the PSO algorithm of our proposed scheme in partial offloading mode with four different combinations of the inertia weight, cognitive and social parameters where typical values in the literature [18,[28][29][30][31] are used. For instance, in [30], the linear decreasing inertia weight is established as I w (t) = I w,max − I w,max −I w,min I max × t, where I w,max = 0.9, I w,min = 0.4, t is the current iteration and I max is the maximum number of iteration. In addition, we set the number of particles S = 40, q max = 10 8 cycles/s, I max = 200, and the rest of the simulation parameters were as indicated in Table 1. We can observe that the case with c 1 = c 2 = 2 and I w = 0.7 achieves the fastest convergence among all the cases. Then, we set c 1 = c 2 = 2 and I w = 0.7 for the rest of the simulations.
In [32], the authors proposed some initialization strategies for the particles' positions in PSO, such as the logarithmic and normal distributions. In the case of the logarithmic, the position of the particle for the variable θ is initialized as exp ln (θ min ) + ln θ max / θ min × rnd , where rnd is a random number from the uniform distribution in [0, 1). In the case of the normal, the position of the particle for the variable θ is initialized based on the normal distribution with mean µ = θ max +θ min 2 and the standard deviation between 1 to 5. From the numerical simulations with a number of particles S = 40 and I max = 200, we obtain a SCE value of 441,342.39 bits/joule for the uniform distribution (used in the proposed approached), a SCE value of 423,160.11 bits/joule with the logarithmic strategy, and a SCE value of 436,509.85 bits/joule for the normal distribution with a standard deviation of 5. We conclude that the uniform distribution strategy achieves a better SCE than the other initialization strategies. Next, we present the PSO convergence behavior with ten runs of the PSO algorithm by using a different number of particles for each scheme, i.e., the TDMA baseline scheme and the wireless-powered NOMA-MEC system in partial offloading mode and fully offloading mode, with the simulation parameters indicated in Table 1. Figure 4 shows the convergence of the PSO algorithm given in Algorithm 1 for our wireless-powered NOMA-MEC system with an EH user and PB, based on four different numbers of particles, S = {15, 25, 30, 40}, and with q max = 4 × 10 8 cycles/s. The rest of the simulation parameters were as indicated in Table 1. We can see that the performance of the SCE was enhanced as the iteration index and the number of particles increased. Moreover, we observe that the SCE achieved steady behavior after about 100 iterations. However, as we reached a greater number of particles and iterations, the computational complexity increased, as each particle evaluated the objective function and constraints for a total time equal to the maximum number of iterations. Similar to Figure 4, Figure 5 shows the convergence of the PSO algorithm of our proposed scheme in partial offloading mode with four different numbers of particles, S = {15, 25, 30, 40}. In this case, we set the value of the maximum CPU frequency parameter at q max = 10 8 cycles/s to verify the convergence of our proposed scheme in a different scenario. From Figure 5, we can see that the SCE showed stable behavior from around 100 iterations, and its highest performance was achieved at S = 40. In order to select a suitable value for the number of particles and the maximum number of iterations, we have analyzed the computation time of the PSO algorithm and the other baseline schemes. Then, in Table 2, we have compared the incidence for the number of particles in terms of the relative error and computation time of our proposed scheme, NOMA-MEC in fully offloading mode, and those of TDMA-MEC system. To compute relative error, we set the one obtained by using S = 40 as the true value for each scheme as this value is correspondent to the highest SCE, and the computation time was calculated with 200 as the number of iterations for the proposed scheme and fully offloading mode. On the other hand, the computation time for the TDMA-based scheme was evaluated with 400 iterations. As a result, we can see that the higher number of particles entails the lower relative error at the expense of a longer computation time.
Therefore, we set I max = 170 and S = 35 for further simulations of our proposed wireless-powered NOMA-MEC system.    Figure 6 shows the convergence of the PSO algorithm for the wireless-powered NOMA-MEC system in fully offloading mode in accordance with four different numbers of particles, S = {15, 25, 30, 40} and with q max = 10 8 cycles/s. From Figure 6, we can see that the SCE is converged after iteration 180, and its highest performance was achieved with 40 particles, followed slightly by using 35 particles. However, the larger number of particles, the longer the computation time required to complete the process of the PSO algorithm, as shown in Table 2. Therefore, we used I max = 180 and S = 35 for the simulations performed in the NOMA-MEC system with the fully offloading scheme.  Figure 6. The convergence behavior of the proposed PSO-based algorithm with different numbers of particles, S, for the wireless-powered NOMA-MEC system in fully offloading mode when q max = 10 8 cycles/s. Figure 7 shows the convergence of the TDMA-MEC system baseline scheme in partial offloading mode. From Figure 7, it is observed that the SCE can be stable after 600 iterations. It is noteworthy that the required number of iterations for convergence of SCE in the TDMA-MEC scheme was higher than those of the previous schemes since an extra variable for offloading time, w m , needs to be optimized to solve the optimization problem in the TDMA-MEC scheme, as shown in problem P3. Moreover, the SCE performance reached a higher value with S = 40. Thus, we used the tradeoff values of S = 40 and I max = 250 for simulations of the TDMA-MEC baseline system in partial offloading mode. Figure 8 shows a comparison of SCE performance from our proposed scheme applying NOMA in the wireless-powered MEC system in partial offloading mode, from the NOMA-enabled MEC system in fully offloading mode, and from the TDMA-MEC scheme in partial offloading mode. In Figure 8, observe that the NOMA-assisted MEC system outperformed the baseline schemes. We can particularly see that the proposed scheme had a much better SCE performance than that obtained by the conventional TDMA-MEC scheme. This is because only one phase is required to offload the tasks from the users to the MEC server in our proposed NOMA-MEC scheme, where the same time interval can be shared by all users. Thus, resources are efficiently used. Using TDMA in the MEC system, more resources are employed to complete offloading the computation tasks, since each user offloads to the MEC server at different times. Accordingly, the eavesdropper has more opportunities to trap messages that are transmitted in the wireless environment. Therefore, the SCE in the TDMA-MEC system was lower than that achieved in the proposed NOMA-MEC system.   Figure 9 shows the SCE achieved with three different values for transmission power P PB . We can see that the SCE performance increased as the transmission power of the AP and PB increased. This is because when transmission power increases, users can harvest a greater amount of energy to be used in the local computing and offloading processes.  Figure 10 shows the SCE versus the number of cycles for one bit, C, for the TDMA-MEC baseline scheme and the proposed scheme with two different transmission power levels at the AP. From Figure 10, we can observe that the SCE performance decreased as C increased. This is because the relation between the number of locally computed bits of the m-th user in local computing mode, γ loc m , is inversely proportional to C, i.e., γ loc m decreases as C increases. This relation is indicated in Equation (3). The main objective in this paper is to maximize the SCE, and it depends directly on γ loc m . Consequently, if γ loc m decreases, the SCE performance also decreases. Moreover, from Figure 10, we verify that our proposed scheme outperforms the TDMA-MEC baseline scheme, and SCE is enhanced with higher values for the wireless power transmitted from the AP to users.

Conclusions
In this paper, we considered a wireless-powered NOMA-enabled MEC system assisted by a PB, with an EH user, and in the presence of an eavesdropper. The objective is to maximize the SCE under the constraints of minimum computation bits required by the users, minimum EH required by the EH user, and a limitation on the consumed energy. We proposed a low-complexity approach based on the PSO algorithm, and achieved high performance with a low computation time. Simulation results demonstrated the superiority of the proposed scheme in comparison with fully offloading mode and TDMA-based mode. The advantages of the NOMA technique were proved, compared with the TDMA method, where NOMA permits more efficient utilization of the spectrum resources. Moreover, numerical results showed that the presence of a low-cost and low-complexity PB allows us to improve the SCE in the studied scenarios.