STAR-RIS-aided UAV NOMA Mobile Edge Computing Network with RF Energy Harvesting

In the ultra-reliable, low-latency next-generation mobile network (beyond 5G or 6G), a resource-constrained unmanned aerial vehicle (UAV) user needs continuous energy-providing and mobile edge computing (MEC) facilities. In this study, we deploy the radio frequency (RF) power station to provide energy to the UAV, accompanied by simultaneous transmitting and reﬂecting reconﬁgurable intelligent surfaces (STAR-RIS) to assist a UAV user in oﬄoading its tasks. In particular, this system consists of a power station, a UAV, and two access points, each of which has an MEC server and a STAR RIS installed within the building. The power station can transfer wireless power to the UAV via RF waves. A UAV user can apply the non-orthogonal multiple access (NOMA) schemes to oﬄoad its tasks to access points via STAR-RIS. In order to evaluate and optimize the performance, we derive the approximately closed-form expression for successful computation and energy outage probabilities by using the statistical characteristics of channel gains. Moreover, we introduced PRGA, a real-coded genetic algorithm-based algorithm, to determine the optimal resource parameters and attain the highest system performance. Based on these criteria, we investigate the behaviors of a proposed system according to the system’s critical parameters, such as time switching ratio, transmit power, power allocation coeﬃcient, data dividing ratio, number of elements of STAR-RIS, and altitude of the UAV. We also provide computer simulation results to validate our analysis. Finally, the research results have revealed that STAR-RIS can improve the performance of MEC networks by creating a smart communication environment.


Introduction
In the next generation (beyond 5G or 6G) networks, mobile devices are not only deployed on the 2D plane but also in 3D space, such as unmanned aerial vehicles (UAVs) distributed in the sky or unmanned underwater vehicles (UUVs) distributed in the water.The density of devices in volume units is a metric in a 6G network, such as 10-100 million devices per km 3 [1].The proliferation of mobile users and the explosion of real-time applications and services consume considerable transmitting and computing resources [2].The increasing need for mobile data processing presents challenges for traditional cloud computing, as the central servers face more significant congestion on their backhaul links.In this context, the mobile edge computing (MEC) technique has occurred as one of the most efficient solutions to mitigate the congestion at the central cloud and improve the real-time quality of local area services [3].The MEC technique moves the servers to the network's edge, assisting the computing resource-constrained wireless devices.By deploying this technique, users offload their tasks to edge servers via wireless channels to reduce the latency and meet the requirements of real-time applications, such as autonomous systems, virtual reality, augmented reality, and tactile IoT.
Meantime, non-orthogonal multiple access (NOMA) is a technique used in wireless communication systems to allow multiple users to share the same timefrequency resource block, such as a frequency band or a time slot, without orthogonality constraints [4].In NOMA, users are distinguished by allocating different power levels to their signals.Users with weaker channel conditions are assigned higher power levels, while those with stronger ones are allocated lower ones.It allows users to share the same resource block non-orthogonally, with the receiver decoding the signals from multiple users based on their power levels and channel conditions using successive interference cancellation (SIC).NOMA presents several benefits over traditional orthogonal multiple access (OMA) techniques, including increased spectral efficiency, better utilization of resources, and improved system fairness.Thus, it is considered a promising technology for B5G/6G networks, especially in scenarios with heterogeneous users and varying channel conditions [5].Most mobile devices use batteries, which limit their connection life.RF energy harvesting (EH) captures and converts ambient radio frequency (RF) electromagnetic energy into usable electrical power.This technique utilizes RF signals already present in the environment, such as those emitted by Wi-Fi routers, cellular base stations, television broadcasts, and other wireless communication systems [6].
Furthermore, the simultaneous transmitting and reflecting reconfigurable intelligent surface (STAR-RIS) is a novel wireless communication technology that combines transmitting and reflecting signals using passive electronic elements [7].RIS, which stands for intelligent reflecting surfaces (IRS) or intelligent reflecting arrays (IRA), are flat surfaces made up of many passive reflecting elements, like meta-material or programmable antennas, that can change the phase and amplitude of electromagnetic waves that come in.By adjusting the configuration of these reflecting elements, RIS can control the reflection of signals, thereby enhancing wireless communication performance.Thus, STAR-RIS holds great potential to revolutionize wireless communication systems by enabling more efficient and flexible utilization of the wireless spectrum, improving coverage, and enhancing communication performance [8].
According to Gu et al. [9], unmanned aerial vehicles (UAVs) have emerged as a promising solution for rapidly deploying temporary connections to enhance wireless communications, provide processing support, facilitate surveillance, aid in disaster relief, and assist in delivery situations.Unfortunately, UAV-based communication systems usually face challenges, such as limited onboard computing resources and energy, channel impairments, mobility complexity, and interference management [10].Several proposed solutions have recently dealt with these problems, i.e., RF EH, NOMA, RIS, MEC, or by combining these techniques [2].
This study aims to investigate how the integration of RF EH, NOMA, STAR-RIS, and MEC techniques allows for better real-time service to UAV users with considering the energy consumption.The main contributions of our work are stated as follows: -We propose a STAR-RIS-aided task offloading model for UAV-user in MEC networks that utilizes time switching-based RF energy harvesting and downlink NOMA schemes.-We derive the approximately closed-form expression for successful computation probability (SCP) and energy outage probability (EOP) by using the statistical characteristics of channel gains.-The optimization problem is formulated and solved based on a real-coded Genetic algorithm, namely PRGA, to find the optimal set of critical system parameters, i.e., time switching coefficient, power allocation ratio, task dividing ratio, distribution ratio of transmitting/reflecting elements of STAR-RIS, and altitude of the UAV.-Based on these criteria, we investigate the behaviors of the proposed system according to the system key parameters, such as time switching ratio, transmit power, power allocation coefficient, data dividing ratio, number of elements of STAR-RIS, and altitude of the UAV.
The remainder of our paper is organized as follows: Section 2 presents the related works.Section 3 describes the system and channel models.Section 4 presents the performance analysis.The optimization problem and solution are proposed in Section 5. Numerical results and discussion are provided in Section 6.Finally, Section 7 concludes our work.

Related Works
Recent literature has explored the integration of UAV, RF EH, NOMA, STAR-RIS, and MEC techniques.In [11], they specifically propose the combination of IRS and NOMA.Next, the work [12,13] focused on the performance analysis and optimization for a STAR-RIS-assisted NOMA network.The results demonstrated that STAR-RIS and NOMA techniques can improve the performance of this considered system.Furthermore, the performance analysis of the UAV-assisted NOMA relay short packet communication system in terms of block error rate is presented in [14].Specifically, in an EH-enabled UAV system, the NOMA technique is utilized to transmit finite block length packets from a source to two destinations, and the performance of the system can be enhanced by optimizing the time switching ratio, UAV coordinates, as well as the number of information and training bits.
In order to enhance the performance of MEC networks, the utilization of STAR-RIS and NOMA techniques has been proposed in the work [15].The study results have confirmed that the applied STAR-RIS with the NOMA scheme can significantly reduce energy consumption under a stringent latency constraint.In the study [16], Qin et al. focus on examining a wireless-powered MEC system aided by STAR-RIS.The system involved users harvesting RF energy from hybrid access points, and three operating protocols, namely energy splitting, mode switching, and time splitting, were investigated.In order to maximize the overall computation rate of all users, an optimization problem is formulated and solved by jointly optimizing the energy transfer time, transmit power, CPU frequencies of user equipment (UEs), and the number of elements in the STAR-RIS.However, this study did not consider UAV users and the NOMA scheme.The authors in [17] investigated the RIS-assisted UAV-enabled NOMA MEC systems.In this setup, a UAV serves as an access point and is equipped with an MEC server that offers computing services to users.Nevertheless, this work does not consider RF energy harvesting.In [18], Xiao et al. investigated a model that encompasses a MEC system enabled by UAV and assisted by STAR-RIS.The network consists of multiple users, a ground base station (BS), and a UAV equipped with a signal antenna and integrated with a STAR-RIS, respectively.In this configuration, users simultaneously offload their workload to the MEC servers and UAV.However, this work did not consider RF energy harvesting or the NOMA scheme.
Motivated by the above literature, we consider an RF energy harvesting UAVuser STAR-RIS-aided MEC network with the NOMA protocol.In this setup, the UAV user utilizes RF energy harvested from a power station to offload its tasks to two MEC servers located at access points (AP) by employing the NOMA scheme.

System and channel models
Our work considers an RF energy harvesting UAV-user STAR-RIS-aided NOMA MEC system model, depicted in Fig. 1.The proposed system consists of one power station (PS), one UAV user, a STAR-RIS mounted on the wall, and a pair of access points (APs), each equipped with a server.The UAV user hovers in the sky to collect data and execute tasks.Due to constrained resources, i.e., limited battery and processing ability, the UAV user needs to harvest the RF energy from the PS and utilize this harvested energy for offloading to APs.The edge servers at access points help users execute their tasks within the required time.Due to the absence of direct links between UAV and APs, a STAR-RIS is deployed on the ground between UAV and APs to assist UAV-user offloading.Assuming that all transceivers in {PS, UAV, AP} of this considered system are provided with one antenna and work in half-duplex mode.
Without loss of generality, a 3D Cartesian coordinate system was employed to accurately position each node {PS, UAV, STAR-RIS, AP}.Here, we assume that the coordinates of them are depicted in Fig. 2. Specifically, PS is located at (x S , y S , 0), the position of the UAV is (x U , y U , h U ), where h U > 0, AP i is located Fig. 1 The STAR-RIS-assisted UAV MEC Network with RF energy harvesting system model.at (x i , y i , 0), i ∈ {1, 2}, and STAR-RIS is deployed at (x R , y R , 0).The wireless channels for both ground-to-air and air-to-ground transmissions are assumed to be subject to two types of fading: large-scale fading and small-scale fading.The large-scale fading is characterized by a probabilistic model incorporating both line-of-sight (LoS) and non-line-of-sight (NLoS) conditions, as discussed in [19].By considering the probabilities of LoS and NLoS links between the UAV and ground devices, the mean path loss can be determined as follow: where σ is the path-loss exponent, a and b stand for constant values that vary according to the surrounding environment, and K V = Φ V (c/4πf c ) −1 denotes the parameter dependent on environment and carrier frequency [20].In which, V ∈ {LoS, NLoS}, c is the speed of light, f c is the carrier frequency, and Φ V is the excessive path loss of the LoS and NLoS propagation.The small-scale fading of {PS-UAV, UAV-RIS, RIS-APs} links follows the Nakagami-m distribution with fading parameters, m 0 , m 1 , m ξ , respectively, ξ ∈ {t, r}.Note that, t stands for transmission and r denotes reflection in STAR-RIS.

STAR-RIS Model
The STAR-RIS in our work comprises K 1 elements for full transmission and K 2 elements for full reflection.We assume that the UAV-user is aided by K 1 transmission elements and K 2 reflection elements to offload its two distinct sub-tasks to AP 1 and AP 2 using the NOMA scheme.Besides, for the sake of simplicity, we also assume that all STAR-RIS elements transmit and reflect the incoming signals independently [7].The small-scale fading vectors of transmission links (UAV-RIS, RIS-AP 1 ) and reflection links (UAV-RIS, RIS-AP 2 ) are respectively denoted by Due to the effect of path loss, only the first time signals reflected by the STAR-RIS are considered, while others will be ignored.Therefore, we can model the received signal from all STAR-RIS elements as a combination of their corresponding transmitted or reflected signals.The equivalent channel coefficients of links from UAV to APs via STAR-RIS can be expressed as being a diagonal matrix, where α k ∈ [0, 1] and ϕ tk ∈ [0, 2π) representing the amplitude and phase-shift variables, respectively, of the k th transmitting element in the STAR-RIS.Meanwhile, G 2 ∆ = diag β 1 e jϕ r1 , β 2 e jϕ r2 , ..., β K 2 e jϕ rK 2 is defined as a diagonal matrix with amplitude β k ∈ [0, 1] and phase-shift ϕ rk ∈ [0, 2π) are the variables of the k th reflecting element of STAR-RIS, j = √ −1.For simplicity, we assume that α k = β k = 1, ∀k.To enhance the network performance, STAR-RIS is reconfigured by adjusting the elements' phase-shift variables (ϕ ξk ) to make the power gains achieving maximum value, i.e., ϕ ξk = arg(h ξ1k h ξ2k ), ξ ∈ {t, r}.After applying the optimal phases ϕ ξk before transmission, the overall channel power gain of link UAV-APs is given by where The cumulative distribution function (CDF) and probability density function (PDF) of the random variable Y ξ are denoted as F Y ξ (x) and f Y ξ (x), respectively, as follow [21]: where ξ ∈ {t, r}, λ ξ = K ξ ν ξ 1−ν ξ , and γ(., .) is the lower incomplete Gamma function.

Protocol and Signal Model
The protocol for proposed system is initiated to work in four phases depicted as Fig. 3. -Phase 1 -Energy harvesting phase In this phase, the UAV harvests the RF energy from PS in τ 1 = ρT , where ρ represents the time switching ratio, and T stands for the block time.The harvested energy can be written as where 0 < η ≤ 1 denotes the UAV energy conversion efficiency, and P 0 stands for the PS transmit power.-Phase 2 -Task offloading phase Assuming that the UAV-user's task can be divided into two independent L 1 -bit and L 2 -bit subtasks.During this phase (τ 2 ), the UAV-user offloads its subtasks to APs by applying the downlink NOMA scheme via STAR-RIS.Hence, the received signals at AP 1 and AP 2 can be expressed as follows: where s i , i ∈ {1, 2}, stand for the signal of L i -bit subtask and E[|s i | 2 ] = 1, E(.) stands for expectation operator; P U denotes the transmit power of UAV, in which ; δ is the power allocation ratio for applying NOMA, 0 ≤ δ ≤ 1; d t and d r denote the horizontal distances from RIS to AP 1 and AP 2 , respectively; σ stands for the pathloss exponent, with 2 ≤ σ ≤ 6; and n ξ denotes the additive white Gaussian noise (AWGN) with zero mean and variance N 0 , i.e., n ξ ∼ CN (0, N 0 ).After this phase, the Access Points (APs) employ successive interference cancellation (SIC) to decode the received signals.Specifically, AP 1 decodes signal s 1 while treating signal s 2 as interference.On the other hand, AP 2 first decodes signal s 1 by considering signal s 2 as interference, and then subtracts the decoded s 1 from y r to obtain s 2 .The signal-to-interference-plus-noise ratio (SINR) to decode s 1 at AP 1 and the signal-to-noise ratio (SNR) to decode s 2 at AP 2 are respectively expressed as where -Phase 3 -Task executing phase During duration τ 3 , the servers at APs execute the subtasks.The execution time at the APs can be represented as c i L i f i , where c i and f i denote the number of CPU cycles required to process each bit, and the CPU cycle frequency of the MEC server at AP i , respectively, i ∈ {1, 2}.
-Phase 4 -Results downloading phase Finally, the executed results are returned by the APs to the UAV-user within the time period τ 4 .Since τ 4 is significantly smaller compared to the transmission time, it is disregarded and considered as τ 4 = 0.The time consumption for offloading and executing is calculated as [22] T where W stands for the channel bandwidth.

Performance Analysis
As we know, different applications have various required criteria.Some applications emphasize runtime requirements (real-time services), while others prioritize energy savings (constrained-energy devices).In this section, we present two crucial criteria, i.e., successful computation probability and energy outage probability.

Successful Computation Probability
This subsection presents the performance analysis in terms of successful computation probability (SCP), notated as S.This criteria is an important metric to evaluate the latency performance of MEC systems [23].It is defined as the probability that system time consumption is lower than the maximum allowed time (notated as T th ), i.e., S = Pr (τ where τ 1 = ρT , τ max = max {T 1 , T 2 }, in which T 1 and T 2 are calculated as (15).We assume that T = T th .The closed-form expression of SCP is depicted as Theorem 1.
Theorem 1.The SCP of the proposed RF EH STAR-RIS-based NOMA MEC system, denoted as S, is given by: where 2Q π , and Q is the complexity versus accuracy trade-off coefficient.
Proof See Appendix A.

Energy Outage Probability
Accordance with the research [24], the power consumed by a UAV with multiple rotors while hovering due to the force of gravity can be express as: where W U stands for the total weight of the UAV, g denotes the standard acceleration of gravity (g = 9.8m/s 2 ), ϖ is the fluid density of air (ϖ = 1.225kg/m 3 ), κ represents the area of the rotor disk (κ = 0.2m 2 ), and n is the number of rotors (n = 4).
The energy outage probability (EOP), notated as E, is defined as the event at which the remaining energy used for hovering at a given time T total is greater than the total energy threshold (E th ) [25].Thus, EOP can mathematically be expressed as where T total = 4 j=1 τ j .It is important to note that the energy threshold, denoted as E th , represents the combined amount of stored energy allocated for air-toground communication and the additional energy required for the UAV to sustain its essential operations without any interruption.
Theorem 2. The EOP of the proposed RF EH STAR-RIS-based NOMA MEC system, denoted as E, is given by: where 2 , z q = cos 2q−1 2Q π , and Q is the complexity versus accuracy trade-off coefficient.
Proof See Appendix B.

Optimization: Problem Formulation and Solution
This section focuses on improving successful computation and outage energy performance by determining the optimal set of critical system parameters.The proposed network can effectively balance energy harvesting and data transmission by optimizing the time switching ratio, ensuring efficient energy utilization.Meanwhile, optimizing energy allocation is always an essential problem for NOMA-based systems, as it ensures fairness and QoS among users, increases multiple access capabilities, and reduces interference.Next, the allocation of offload data volume to APs also needs attention due to the heterogeneous nature of the MEC network.In addition, a flexible and optimal adjustment of the number of transmission and reflection IRS elements can improve signal quality and increase communication performance in the STAR-RIS network.Finally, in a UAV communication network with the LoS-NLoS channel model, the flight altitude of the UAV will be the most critical factor in ensuring connection quality, coverage, and energy efficiency.According to the above analysis, we formulate the latency optimization problem (P1) to maximize S as follows: Based on the above analysis, we can formulate the problem (P1) for latency optimization, aiming to maximize the SCP, as follows: where µ is the task dividing ratio, i.e., L 1 = µL, L 2 = (1 − µ)L with L stands for the total bit length of UAV; K is the total number of RIS elements; h max U is the maximum flight altitude of the UAV; constraint (21b) represents condition on time switching ratio, constraint (21c) imposes power condition on allocation coefficient, constraint (21d) give the condition on task dividing ratio, constraints (21e) and (21f) represents the conditions of the number of transmission and reflection IRS elements, and constraint (21g) imposes the condition of UAV altitude.
Similarly, the energy optimization problem (P2) to minimize E is formulated as follows: In order to address the (P1) and (P2) problems, we present a solution based on the real-coded genetic algorithm (GA), namely PRGA, as Algorithm 1.The result of PRGA is the optimal set of parameters, denoted OP(ρ * , δ * , µ * , K * 1 , K * 2 , h * U ). PRGA is a meta-heuristic algorithm well-suited for tackling problems with extensive search spaces [26].GA-based solutions to both (P1) and (P2) problems follow a similar approach.GA can be applied to seek both the maximum and minimum values of an objective function (FF) based on a specific optimization problem.In this context, we can employ the objective function transformation technique to convert problem (P1) into a modified problem, denoted as (P1').The objective of (P1') is to find the smallest value of the complement function of S while maintaining the same constant constraints.In simpler terms, the FF of (P1') can be represented as S = 1 − S. Note that in order to leverage the continuity features in function optimization and achieve greater precision, we employ a real-coded GA, as it offers advantages over a binary-coded GA [27].
At the beginning of the algorithm, a population is created consisting of n individuals, where each individual represents a potential solution to the optimization problem.The population at the t th iteration of the evolution process is defined as follows: where p i (t), i ∈ {1, ..., n} is the i th individual at the t th round of evolution, encoded as a fixed-point real number format.Thus, the search space with the six constraints described in ( 21) and ( 22) specifies the structure of each element p i (t) containing 6 six genes, i.e., p i (t) = (ρ i (t), The output of the FF is referred to as the fitness value (FV), where a smaller FV corresponds to a better outcome.The Roulette wheel selection (RWS) method, as described in [28], is utilized to determine the parents for the crossover step.By using the RWS, individuals with better fitness values are more likely to be selected as parents.However, it still allows individuals with relatively poorer fitness values to be selected.This balance helps maintain genetic diversity in the population and allows for exploring different regions of the search space.The steps of RWS are as follows: In the first step, the selection probability for each individual, which represents the portion of the Roulette wheel allocated to that individual, is calculated.
Next, we construct a cumulative probability distribution by accumulating the selection probabilities of individuals.This distribution spans from 0 to 1, representing the entire range of the Roulette wheel.To select a parent, a random number within the range of 0 to 1 is generated.This number determines the position on the Roulette wheel, indicating the selected parent based on its corresponding cumulative probability.
Once the parents p a (t) and p b (t) have been selected, the crossover process takes place.This process relies on the crossover rate parameter (ω c ), determining the likelihood of successful recombination.To promote exploration, we employ the Uniform crossover method [29].In this context, the genetic material from both parents is combined randomly, allowing for exploring different gene combinations.It helps maintain population diversity and potentially discover new solutions in the search space.In this method, the parents exchange genes to generate two offspring, namely p o1 and p o2 , for the next generation, according to the formula: where 0 < r < 1 is a random real number.
Afterward, the Gaussian mutation is employed to introduce genetic variations to population [30].This process is determined by the mutation rate parameter (ω m ), which controls the occurrence of random changes in the genes of every individual within the population.This mutation aims to explore nearby solutions and potentially discover improved solutions.A low mutation rate is typically selected to balance exploration and exploitation during optimization.It is important to note that mutations operation are essential for maintaining diversity in the population and play a critical role in ensuring convergence in GA-based algorithms.The mutation process is characterized by the following formula: where the random real number n(t) follows a normal distribution with zero mean and a variance of δ i (t) = 1 √ 1+t , i.e., n ∼ CN (0, δ i (t)), where t represents the index of the current iteration.
Thus, after performing GA operators, a new population is formed consisting of n individuals of the t th generation and n o = int( n 2 ω c ) * 2 offspring.This new population is evaluated by F and sorted in order of increasing fitness.Next, the natural selection process takes place to select n individuals with the best adaptation to become generation (t + 1) th .The process continues until the termination condition is met, which is defined as reaching the maximum number of evolutionary iterations (I t ).

Numerical Results and Discussion
This section provides numerical results concerning the SCP and EOP of the STAR-RIS-assisted UAV NOMA MEC RF EH system.Monte-Carlo simulations are executed using Matlab version 2023b to evaluate the performance.The hardware used in this step includes a core i7-9750H processor and 8 GB of DDR4 memory.
The simulation parameters employed in our study are outlined in Table 2 [24,27].We used the three-dimensional Cartesian coordinate system with the positions as follows: PS(0,0,0), UAV (3,3,5), STAR-RIS(5,5,0), AP1(7,5,0), and AP2(5,9,0).Fig. 4 illustrates the influence of the average transmit SNR (γ 0 ) on the system performance.It can be observed that the simulated and theoretical values approximate each other in the low SNR region and coincide in the high SNR region.This behavior is due to using approximate CDF and PDF functions in the theoretical calculations [21].The first observation is that increasing γ 0 leads to improved system performance.In simple terms, when the transmit power increases, the SCP tends to increase, while the EOP tends to decrease.However, when γ 0 reaches a reasonably high level, such as γ 0 > 20 dB, the system performance grows to saturation.Therefore, it is essential to carefully consider and select suitable transmit power levels during the design of the proposed system.Furthermore, Fig. 4 investigates the impact of different bandwidth values (W ), 50 MHz, 100 MHz, and 200 MHz, respectively.The results demonstrate that increasing the bandwidth can enhance system performance by enabling faster task offloading.However, the influence of W is more significant when γ 0 is low.As γ 0 increases, the SCP approaches saturation at a value of 1, and the EOP approaches saturation at 0 in all cases examined.
In the upcoming simulation, we examine the effect of power allocation efficiency (δ) on the system performance, considering different values of energy conversion efficiency, denoted as η = 0.1, 0.5, and 0.9.The PS transmit power level is set to P 0 = 15 dB for all cases investigated in Fig. 5. Notably, the curves representing the SCP and EOP exhibit a unimodal function.As δ increases from 0.5 to 1, SCP gradually rises, reaches its maximum value, and then declines.Conversely, EOP gradually decreases, reaches a minimum value, and then begins to increase.This observation demonstrates an optimal value δ * that optimizes the SCP and EOP.It further underscores the significance of power allocation in NOMA-based networks.Therefore, including the parameter δ in the optimization process is essential during the design of the proposed system.The value of η also significantly influences the system performance, as it represents the energy conversion quality governed by the UAV's hardware.When η is slight, such as 0.1, it indicates poor energy conversion quality, leading to a noticeable reduction in system performance despite the PS's high transmit power level.In contrast, when η takes larger values of 0.5 and 0.9, the RF energy received by the UAV is efficiently converted into transmit power during the offloading phase, thereby enhancing both SCP and EOP.Fig. 6 illustrates the impact of the time switching ratio (ρ) on the system performance, considering different values of the latency threshold (T th ).The curves representing the SCP and EOP exhibit a unimodal shape in all three cases examined.It indicates the presence of an optimal value ρ * that optimizes the SCP/EOP performance.When ρ is small, the UAV has limited time for RF energy harvesting, resulting in low energy conversion into transmit power during offloading.Consequently, both SCP and EOP have poor values.As ρ increases to an appropriate value, SCP gradually rises to its maximum, while EOP gradually decreases and reaches a minimum.However, if ρ becomes excessively large, improper time allocation for energy harvesting and offloading phases leads to decreased system performance.In other words, the system performance can only be guaranteed if the UAV is allocated a reasonable amount of time within the time slot for RF energy harvesting.Furthermore, Fig. 6 examines the behavior of SCP and EOP under different scenarios of T th .It should be noted that EOP is not affected by this parameter as it solely depends on the available stored energy budget, as described in formula (19).SCP attains its lowest value when the system operates with an application with strict latency requirements (e.g., T th = 0.05s).On the other hand, for applications with more significant latency thresholds (e.g., T th = 0.1s and 0.2s), the likelihood of completing the task within the guaranteed time is higher, resulting in improved SCP.Fig. 7 illustrates the influence of the data dividing ratio (µ) on the system performance, considering different values of the stored energy budget threshold (E th ).Specifically, we examine the cases where (E th ) is set to 0.5 kJ, 1 kJ, and 10 kJ.The results indicate that a system that allocates a higher proportion of tasks to AP1 achieves better performance.It reflects the system simulation setup, as AP1 is more proximate to STAR-RIS than AP2.Another notable observation is that changing the value of E th does not affect the success completion probability (SCP), which aligns with the correct implementation of the formula (18).However, increasing the E th value can enhance the EOP because the UAV has more energy to maintain its fundamental operations.We continue investigating the impact of the number of transmission and reflection elements on system performance, considering different task length values as shown in Fig. 8.The total number of IRS elements is fixed at 30.Let ξ represent the IRS element allocation coefficient.Thus, the number of transmission IRS elements is given by K 1 = ξK, and the number of reflection IRS elements is K 2 = (1 − ξ)K.Through this allocation scheme, we can observe the superior performance of the system based on STAR-RIS (where 0 < ξ < 1) compared to the traditional intelligent reflecting surface approach, where either full transmission (ξ = 1) or full reflection (ξ = 0) is employed.The reason for this superiority lies in the traditional approach failing to fully utilize the computing capacity of both MEC servers located at the two APs, as the proposed system does.This result also confirms the existence of an optimal pair of parameters (K * 1 , K * 2 ) that yields the best system performance.Therefore, introducing constraints on the distribution of the number of IRS elements in problems (P1) and (P2) is entirely appropriate.Another observation is the importance of considering the design of the offload task length.As the task length gradually increases from 100 to 300 kB, we observe a gradual deterioration in system performance.It indicates that longer task lengths negatively impact SCP and EOP.Fig. 9 presents plots of the SCP and EOP for suburban, urban, and dense-urban environments as the flight altitude of the UAV increases.An optimal altitude h * U exists at which the SCP is maximized and the EOP is minimized.This behavior can be attributed to the interplay between LoS and NLoS propagation as the UAV height varies.At lower altitudes, the probability of LoS is relatively low, whereas the probability of NLoS is considerably higher.This results in limited direct visibility between the UAV and the ground devices, i.e., PS and STAR-RIS, due to numerous obstacles present in the environment.Conversely, as the UAV height increases, the probability of LoS improves while the probability of NLoS decreases.Although enhancing LoS connectivity, higher altitudes introduce greater transmission distances between the UAV and PS and STAR-RIS, resulting in significant transmission losses.Thus, the UAV altitude represents the optimal trade-off between improved LoS connectivity and manageable transmission losses.We can state that an altitude h * U exists where the SCP is maximized and the EOP is minimized.Besides, the simulation also uses different sets of parameters (ϕ LoS , ϕ N LoS , a, b) depending on the suburban, urban, and dense-urban environments [31].The results reveal that the system performs best in the suburban environment.
Next, we examine the impact of optimization algorithms on system performance.Figure 10 shows the convergence behavior of the PRGA algorithm when employed on the objective functions S and E, considering three different scenarios based on the average transmit SNR (γ 0 ).In all instances, the outcomes exhibit comparable curve patterns, indicating favorable convergence of the suggested algorithm.The SCP and EOP continue to improve throughout the iterations, reaching convergence within 10 to 30 iterations.
In Fig. 11, we compare system performance with and without the integration of optimization algorithms.To establish a reference view for PRSA, we utilize a 6-way exhaustive search (ES) algorithm with an accuracy of 10 −6 .Based on this reference, we investigate three cases: (i) Utilizing the optimal set OP(ρ * , δ * , µ * , K * 1 , K * 2 , h * U ) Fig. 9 SCP and EOP versus the flight altitude of UAV with different environment.
obtained from PRSA.(ii) Utilizing the optimal set ES obtained from the ES algorithm.(iii) Utilizing the randomly fixed setting FS(ρ = 0.5, δ = 0.6, µ = 0.5, K 1 = 15, K 2 = 15, h U = 10).Our findings indicate that the system performance is significantly enhanced in the two cases employing the optimal algorithms (i) and (ii) in comparison to case (iii).It is necessary to note that PRGA exhibits lower complexity than ES, highlighting its effectiveness in the proposed algorithm.Interestingly, the SCP/EOP curves overlap in cases (i) and (ii), indicating that PRGA and the 6-way ES algorithm yield identical performance.On the other hand, when the system operates in case (iii), there is a substantial probability of system outages due to unsuitable system parameters.
Fig. 11 The comparison of system performance between scenarios with and without the utilization of optimization algorithms.

Conclusion
This paper investigates a STAR-RIS-aided task offloading model for UAVs in MEC networks.The proposed model incorporates time-switching-based RF energy harvesting and downlink NOMA schemes over Nakagami-m fading.We derive the approximately closed-form expression for SCP and EOP, which serves as a metric for evaluating the proposed system.To optimize SCP and minimize EOP, we formulate an optimization problem that includes constraints, such as the time switching coefficient, power allocation ratio, task dividing ratio, number of transmitting/reflecting elements of STAR-RIS, and UAV altitude.To solve this optimization problem, we propose a real coded GA-based algorithm called PRGA.Furthermore, we investigate the system behavior based on critical parameters, and simulation results demonstrate that the proposed algorithm achieves performance comparable to the reference algorithm while maintaining lower complexity.Our study's accuracy is verified through Monte-Carlo simulations.

APPENDIX A: PROOF OF THEOREM 1
Based on the defined formula in (16), SCP can be calculated as follows: where ϵγ r (1−δ) , i ∈ {1, 2}, f X (.) is the PDF of X = |h 0 | 2 defined as where m 0 is the fading severity factor, λ 0 = E(|h 0 | 2 ).By substituting (7) and (A-2) into (A-1) and setting z = e −x and applying the Gaussian-Chebyshev quadrature method according to variable z calculating the integral, we obtain the final result as (17).This ends our proof.

APPENDIX A: PROOF OF THEOREM 2
Based on the defined formula in (19) and similar to Appendix A, EOP can be calculated as follows: where τ th = E th P hover , (1−δ) , i ∈ {1, 2}.By substituting (7) and (A-2) into (B-1) and setting z = e −x and applying the Gaussian-Chebyshev quadrature method according to variable z calculating the integral, we obtain the final result as (20), and the proof ends.

Fig. 2
Fig. 2 System model for STAR-RIS-assisted UAV NOMA MEC Network with RF energy harvesting.

Fig. 3
Fig. 3 Time diagram of protocol for the proposed system

Fig. 4
Fig. 4 SCP and EOP versus the average transmit SNR with different values of bandwidth.

Fig. 5
Fig. 5 SCP and EOP versus the power allocation efficient with different values of bandwidth.

Fig. 6
Fig. 6 SCP and EOP versus the time switching ratio with different values of threshold of latency.

Fig. 7
Fig. 7 SCP and EOP versus the data dividing ratio with different values of threshold of stored energy budget.

Fig. 8
Fig. 8 SCP and EOP versus the IRS element allocation coefficient with different values of task length.

TABLE 2 .
Typical values of simulation parameters