# Resource Allocation for Intelligent Reflecting Surface Aided Wireless
Powered Mobile Edge Computing in OFDM Systems

Tong Bai, , Cunhua Pan, ,
Hong Ren, , Yansha Deng, ,
Maged Elkashlan, , and Arumugam Nallanathan T. Bai, C. Pan, H. Ren, M.
Elkashlan and A. Nallanathan are with the School of Electronic Engineering and
Computer Science, Queen Mary University of London, London E1 4NS, U.K.
(e-mail<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>a.nallanathan@qmul.ac.uk). Y. Deng is with the
Department of Engineering, King’s College London, London, WC2R 2LS, U.K.
(e-mail: yansha.deng@kcl.ac.uk).

###### Abstract

Wireless powered mobile edge computing (WP-MEC) has been recognized as a
promising technique to provide both enhanced computational capability and
sustainable energy supply to massive low-power wireless devices. However, its
energy consumption becomes substantial, when the transmission link used for
wireless energy transfer (WET) and for computation offloading is hostile. To
mitigate this hindrance, we propose to employ the emerging technique of
intelligent reflecting surface (IRS) in WP-MEC systems, which is capable of
providing an additional link both for WET and for computation offloading.
Specifically, we consider a multi-user scenario where both the WET and the
computation offloading are based on orthogonal frequency-division multiplexing
(OFDM) systems. Built on this model, an innovative framework is developed to
minimize the energy consumption of the IRS-aided WP-MEC network, by optimizing
the power allocation of the WET signals, the local computing frequencies of
wireless devices, both the sub-band-device association and the power
allocation used for computation offloading, as well as the IRS reflection
coefficients. The major challenges of this optimization lie in the strong
coupling between the settings of WET and of computing as well as the unit-
modules constraint on IRS reflection coefficients. To tackle these issues, the
technique of alternative optimization is invoked for decoupling the WET and
computing designs, while two sets of locally optimal IRS reflection
coefficients are provided for WET and for computation offloading separately
relying on the successive convex approximation method. The numerical results
demonstrate that our proposed scheme is capable of monumentally outperforming
the conventional WP-MEC network without IRSs. Quantitatively, about $80\%$
energy consumption reduction is attained over the conventional MEC system in a
single cell, where $3$ wireless devices are served via $16$ sub-bands, with
the aid of an IRS comprising of $50$ elements.

##  I Introduction

###  I-A Motivation and Scope

In the Internet-of-Things (IoT) era, a myriad of heterogeneous devices are
envisioned to be interconnected [1]. However, due to the stringent constraints
both on device sizes and on manufacturing cost, many of them have to be
equipped with either life-limited batteries or low-performance processors.
Consequently, if only relying on their local computing, these resource-
constrained devices are incapable of accommodating the applications that
require sustainable and low-latency computation, e.g. wireless body area
networks [2] and environment monitoring [3]. Fortunately, wireless powered
mobile edge computing (WP-MEC)[4, 5, 6, 7, 8, 9, 10, 11, 12, 13], which
incorporates radio frequency (RF) based wireless energy transmission (WET)
[14, 15, 16] and mobile edge computing (MEC) [17, 18], constitutes a promising
solution of this issue. Specifically, at the time of writing, the commercial
RF-based WET has already been capable of delivering $0.05\leavevmode\nobreak\
\rm{mW}$ to a distance of $12-14\leavevmode\nobreak\ \rm{m}$ [14], which is
sufficient to charge many low-power devices, whilst the MEC technique may
provide the cloud-like computing service at the edge of mobile networks [18].
In WP-MEC systems, hybrid access points (HAP) associated with edge computing
nodes are deployed in the proximity of wireless devices, and the computation
of these devices is typically realized in two phases, namely the WET phase and
the computing phase. To elaborate, the batteries of the devices are
replenished by harvesting WET signals from the HAP in the first phase, while
in the computing phase, devices may decide whether to process their
computational tasks locally or offload them to edge computing nodes via the
HAP.

Given that these wireless devices are fully powered by WET in WP-MEC systems,
the power consumption at HAPs becomes substantial, which inevitably increases
the expenditure on energy consumption and may potentially saturate power
rectifiers. At the time of writing, the existing research contributions that
focus on reducing the power consumption mainly rely on the joint optimization
of the WET and of computing [5], as well as cooperative computation offloading
[10, 11]. However, wireless devices are still suspicious to severe channel
attenuation, which limits the performance of WP-MEC systems. To resolve this
issue, we propose to deploy the emerging intelligent reflecting surfaces (IRS)
[19, 20, 21] in the vicinity of devices, for providing an additional
transmission link both for WET and for computation offloading. Then, the power
consumption can be beneficially reduced both for the downlink and for the
uplink. To elaborate, an IRS comprises of an IRS controller and a large number
of low-cost passive reflection elements. Regulated by the IRS controller, each
IRS reflection element may adapt both the amplitude and the phase of the
incident signals reflected, for collaboratively modifying the signal
propagation environment. The gain attained by IRSs is based on the combination
of so-called the virtual array gain and the reflection-enabled beamforming
gain [19]. More explicitly, the virtual array gain is achieved by combining
the direct and IRS-reflected links, while the reflection-enabled beamforming
gain is realized by proactively adjusting the reflection coefficients of the
IRS elements. By combining these two types of gain together, IRSs are capable
of reducing the power required both for WET and for computation offloading,
thus improving the energy efficiency of WP-MEC systems. In this treatise, we
aim for providing a holistic scheme to minimize the energy consumption of WP-
MEC systems, relying on IRSs.

###  I-B Related Works

The current state-of-the-art contributions are reviewed from the perspectives
of WP-MEC and of IRS-aided networks, as follows.

####  I-B1 Wireless Powered Mobile Edge Computing

This topic has attracted an increasing amount of research attention [4, 5, 6,
7, 8, 9, 10, 11, 12, 13]. Specifically, You _et al._ firstly proposed the WP-
MEC framework [4], where the probability of successfully computing was
maximized subject to the constraints both on energy harvesting and on latency.
The single-user system considered in this first trial limits its application
in large-scale scenarios. For eliminating this shortage, an energy-
minimization algorithm was proposed for the multi-user scenario [5], where the
devices’ computation offloading was realized by the time division multiple
access (TDMA) technique. Following this, Bi and Zhang maximized the weighted
sum computation rate in a similar TDMA system [6], while an orthogonal
frequency division multiple access (OFDMA) based multi-user WP-MEC system was
investigated in [7]. A holistic online optimization algorithm was proposed for
the WP-MEC in industrial IoT scenarios [8]. In the aforementioned works, the
associated optimization is commonly realized with the aid of the alternative
optimization (AO) method, because the pertinent optimization problems are
usually not jointly convex. This inevitably imposes a delay on decision
making. To mimic this issue, Huang _et al._ proposed a deep reinforcement
learning based algorithm for maximizing the computation rate of WP-MEC systems
[9], which may replace the aforementioned complicated optimization by a pre-
trained look-up table. Furthermore, as for the system where both near and far
devices have to be served, the energy consumption at the HAP has to be vastly
increased, because the farther device harvests less energy while a higher
transmit power is required for its computation offloading. Aimed for releasing
this so-called “doubly near-far” issue, the technique of user cooperation was
revisited [10, 11]. At the time of writing, the WET and computation offloading
in WP-MEC systems in the face of hostile communication environments has not
been well addressed. Against this background, we aim for tackling this issue
by invoking IRSs. Let us now continue by reviewing the relevant research
contributions on IRSs as follows.

####  I-B2 IRS-Aided Networks

In order to exploit the potential of IRSs, an upsurging number of research
efforts have been devoted in its channel modeling [22, 23], analyzing the
impact of limited-resolution phase shifts [24, 25], channel estimation [26,
27] as well as IRS reflection coefficient designs [28, 29, 30, 31]. Inspired
by these impressive research contributions, the beneficial role of IRSs was
evaluated in various application scenarios [32, 33, 34, 35, 36, 37, 38].
Specifically, an IRS was employed in multi-cell communications systems for
mitigate the severe inter-cell interference [32], where an IRS comprising of
$100$ reflection elements was shown to be capable of doubling the sum rate of
the multi-cell system. Yang _et al._ investigated an IRS-enhanced OFDMA system
[33], whose common rate was improved from around $2.75\leavevmode\nobreak\
\rm{bps/Hz}$ to $4.4\leavevmode\nobreak\ \rm{bps/Hz}$, with the aid of a
$50$-element IRS. Apart from assisting the aforementioned throughput
maximization in the conventional communications scenario, a sophisticated
design of IRSs may also eminently upgrade the performance of diverse emerging
wireless networks, e.g. protecting data transmission security [34, 35],
assisting simultaneous wireless information and power transfer (SWIPT) [36],
enhancing the user cooperation in wireless powered communications networks
[37], as well as reducing the latency in IRS-aided MEC systems [38]. These
impressive research contributions inspire us to exploit the beneficial role of
IRSs in this momentous WP-MEC scenario.

###  I-C Novelty and Contributions

In this paper, an innovative IRS-aided WP-MEC framework is proposed, where we
consider orthogonal frequency-division multiplexing (OFDM) systems for its WET
and devices’ computation offloading. Under this framework, a joint WET and
computing design is conceived for minimizing its energy consumption, by
optimizing the power allocation of the WET signals over OFDM sub-bands, the
local computing frequencies of wireless devices, both the sub-band-device
association and the power allocation used for computation offloading, as well
as the pertinent IRS reflection coefficient design. Let us now detail our
contributions as follows.

  * •

_Energy minimization problem formulation for the new IRS-aided WP-MEC design:_
In order to reduce the energy consumption of WP-MEC systems, we employ an IRS
in WP-MEC systems and formulate a pertinent energy minimization problem. Owing
to the coupling effects between the designs of WET and of computing, it is
difficult to find its globally optimal solution. Alternatively, we provide an
alternative optimization (AO) based solution to approach a locally optimal
solution, by iteratively optimizing settings of WET and of computing.

  * •

_WET design:_ The WET setting is realized by alternatively optimizing the
power allocation of energy-carrying signals over OFDM sub-bands and the IRS
reflection coefficients. Specifically, given a set of fixed IRS reflection
coefficients, the power allocation problem can be simplified to be a linear
programming problem, which can be efficiently solved by the existing
optimization software. Given a fixed power allocation, the IRS reflection
coefficient design becomes a feasibility-check problem, the solution of which
is incapable of ensuring a rapid convergence. To tackle this issue, we
reformulate the problem by introducing a number of auxiliary variables, and
provide a locally optimal design of IRS reflection coefficients, with the aid
of several steps of mathematical manipulations and of the successive convex
approximation (SCA) method.

  * •

_Computing design:_ The settings at the computing phase are specified by
alternatively optimizing the joint sub-band-device association for and the
power allocation for devices’ computation offloading, IRS reflection
coefficients at the computing phase as well as the local computing
frequencies. Specifically, as verified by [39], the duality gap vanishes when
the number of sub-bands exceeds $8$. Hence, we provide a near-optimal solution
for the joint sub-band-device association and power allocation problem,
relying on the Lagrangian duality method. The IRS reflection coefficients are
designed using the similar approach devised for that in the WET phase.
Finally, our analysis reveals that the optimal local computing frequencies can
be obtained by selecting their maximum allowable values.

  * •

_Numerical validations:_ Our numerical results validates the benefits of
employing IRSs in WP-MEC systems, and quantify the energy consumption of our
proposed framework in diverse simulation environments, together with two
benchmark schemes.

The rest of the paper is organized as follows. In Section II, we describe the
system model and formulate the pertinent problem. A solution of this problem
is provided in Section III. The numerical results are presented in Section IV.
Finally, our conclusions are drawn in Section V.

Figure 1: An illustration of our IRS-aided WP-MEC system, where $K$ single-
antenna devices are served by a mobile edge computing node via a single-
antenna hybrid access point, with the aid of an $N$-element IRS.

##  II System Model and Problem Formulation

As illustrated in Fig. 1, we consider an OFDM-based WP-MEC system, where $K$
single-antenna devices are served by a single-antenna hybrid access point
(HAP) associated with an edge computing node through $M$ equally-divided OFDM
sub-bands. Similar to the assumption in [5, 6, 7], we assume that these
devices do not have any embedded energy supply available, but are equipped
with energy storage devices, e.g. rechargeable batteries or super-capacitors,
for storing the energy harvested from RF signals. As shown in Fig. 2, relying
on the so-called “harvest-then-computing” mechanism [5], the system operates
in a two-phase manner in each time block. Specifically, during the WET phase,
the HAP broadcasts energy-carrying signals to all $K$ devices for replenishing
their batteries, while these $K$ devices process their computing tasks both by
local computing and by computation offloading during the computing phase. We
denote the duration of each time block by $T$, which is chosen to be no larger
than the tolerant latency of MEC applications. The duration of the WET and of
the computing phases are set as $\tau T$ and $(1-\tau)T$, respectively.
Furthermore, to assist the WET and the devices’ computation offloading in this
WP-MEC system, we place an IRS comprising of $N$ reflection elements in the
proximity of devices. The reflection coefficients of these IRS reflection
elements are controlled by an IRS controller in a real-time manner, based on
the optimization results provided by the HAP.

Figure 2: An illustration of the harvest-then-offloading protocol, where $\tau
T$ and $(1-\tau)T$ refer to the duration of the WET and the computing phases,
respectively.

Let us continue by elaborating on the equivalent baseband time-domain channel
as follows. We denote the equivalent baseband time-domain channel of the
direct link between the $k$-th device and the HAP, the equivalent baseband
time-domain channel between the $n$-th IRS element and the HAP, and the
equivalent baseband time-domain channel between the $k$-th device and the
$n$-th IRS element by
$\hat{\boldsymbol{h}}^{d}_{k}\in\mathbb{C}^{L^{d}_{k}\times 1}$,
$\hat{\boldsymbol{g}}_{n}\in\mathbb{C}^{L_{1}\times 1}$ and
$\hat{\boldsymbol{r}}_{k,n}\in\mathbb{C}^{L_{2,k}\times 1}$, respectively,
where $L^{d}_{k}$, $L_{1}$ and $L_{2,k}$ represent the respective number of
delay spread taps. Without loss of generality, we assume that the above
channels remain approximately constant over each time block. Furthermore, the
channels are assumed to be reciprocal for the downlink and the uplink.

As for the IRS, we denote the phase shift vector of and the amplitude response
of the IRS reflection elements by
$\boldsymbol{\theta}=[\theta_{1},\theta_{2},\ldots,\theta_{N}]^{T}$ and
$\boldsymbol{\beta}=[\beta_{1},\beta_{2},\ldots,\beta_{N}]^{T}$, respectively,
where we have $\theta_{n}\in[0,2\pi)$ and $\beta_{n}\in[0,1]$. Then, the
corresponding reflection coefficients of the IRS are given by
$\boldsymbol{\Theta}=[\Theta_{1},\Theta_{2},\ldots,\Theta_{N}]^{T}=[\beta_{1}e^{j\theta_{1}},\beta_{2}e^{j\theta_{2}},\ldots,\beta_{N}e^{j\theta_{N}}]^{T}$,
where $j$ represents the imaginary unit and we have $|\Theta_{n}|\leq 1$ for
$\forall n\in\mathcal{N}$. The baseband equivalent time-domain channel of the
reflection link is the convolution of the device-IRS channel, of the IRS
reflection response, and of the IRS-HAP channel. Specifically, the baseband
equivalent time-domain channel reflected by the $n$-th IRS element is
formulated as
$\hat{\boldsymbol{h}}^{r}_{k,n}=\hat{\boldsymbol{r}}_{k,n}\ast\Theta_{n}\ast\hat{\boldsymbol{g}}_{n}=\Theta_{n}\hat{\boldsymbol{r}}_{k,n}\ast\hat{\boldsymbol{g}}_{n}$.
Here, we have $\hat{\boldsymbol{h}}^{r}_{k,n}\in\mathbb{C}^{L^{r}_{k}\times
1}$ and $L^{r}_{k}=L_{1}+L_{2,k}-1$, which denotes the number of delay spread
taps of the reflection channel. Furthermore, we denote the time-domain zero-
padded concatenated device-IRS-HAP channel between the $k$-th device and the
HAP via the $n$-th IRS element by
$\boldsymbol{v}_{k,n}=[(\hat{\boldsymbol{r}}_{k,n}\ast\hat{\boldsymbol{g}}_{n})^{T},0,\ldots,0]^{T}\in\mathbb{C}^{M\times
1}$. Upon denoting
$\boldsymbol{V}_{k}=[\boldsymbol{v}_{k,1},\ldots,\boldsymbol{v}_{k,N}]\in\mathbb{C}^{M\times
N}$, we formulate the composite device-IRS-HAP channel between the $k$-th
device and the HAP as
$\boldsymbol{h}^{r}_{k}=\boldsymbol{V}_{k}\boldsymbol{\Theta}$. Similarly, we
use
$\boldsymbol{h}^{d}_{k}=[(\hat{\boldsymbol{h}}^{d}_{k})^{T},0,\ldots,0]^{T}\in\mathbb{C}^{M\times
1}$ to represent the zero-padded time-domain channel of the direct device-HAP
link. To this end, we may readily arrive at the superposed channel impulse
response (CIR) for the $k$-th device, formulated as

$\displaystyle\boldsymbol{h}_{k}=\boldsymbol{h}^{d}_{k}+\boldsymbol{h}^{r}_{k}=\boldsymbol{h}^{d}_{k}+\boldsymbol{V}_{k}\boldsymbol{\Theta},\quad\forall
k\in\mathcal{K},$ (1)

whose number of delay spread taps is given by
$L_{k}=\max(L^{d}_{k},L^{r}_{k})$. We assume that the number of cyclic
prefixes (CP) is no smaller than the maximum number of delay spread taps for
all devices, so that the inter-symbol interference (ISI) can be eliminated.
Upon denoting the $m$-th row of the $M\times M$ discrete Fourier transform
(DFT) matrix $\boldsymbol{F}_{M}$ by $\boldsymbol{f}^{H}_{m}$, we formulate
the channel frequency response (CFR) for the $k$-th device at the $m$-th sub-
band as

$\displaystyle
C_{k,m}(\boldsymbol{\Theta})=\boldsymbol{f}^{H}_{m}\boldsymbol{h}_{k}=\boldsymbol{f}^{H}_{m}\boldsymbol{h}^{d}_{k}+\boldsymbol{f}^{H}_{m}\boldsymbol{V}_{k}\boldsymbol{\Theta},\quad\forall
k\in\mathcal{K},\forall m\in\mathcal{M}.$ (2)

For ease of exposition, we assume that the knowledge of
$\boldsymbol{h}^{d}_{k}$ and of $\boldsymbol{V}_{k}$ is perfectly known at the
HAP. Naturally, this assumption is idealistic. Hence, the algorithm developed
in this paper can be deemed to represent the best-case bound for the energy
performance of realistic scenarios. Since different types of signals are
transmitted in the WET and computing phases, the reflection coefficients of
the IRS require separate designs in these two phases. The models of the WET
and of computing phases are detailed as follows.

###  II-A Model of the Wireless Energy Transfer Phase

It is assumed that the capacity of devices’ battery is large enough so that
all the harvest energy can be saved without energy overflow. Let us use
$\boldsymbol{\Theta}^{E}=\big{\\{}\Theta^{E}_{1},\Theta^{E}_{2},\ldots,\Theta^{E}_{N}\big{\\}}$
to represent the IRS reflection-coefficient vector during the WET phase, where
we have $|\Theta^{E}_{n}|\leq 1$ for $\forall n\in\mathcal{N}$. Then, the
composite channel of the $m$-th sub-band for the $k$-th device during the WET
phase $C_{k,m}(\boldsymbol{\Theta}^{E})$ can be obtained by (2). As a benefit
of the broadcasting nature of WET, each device can harvest the energy from the
RF signals transmitted over all $M$ sub-bands. Hence, upon denoting the power
allocation for the energy-carrying RF signals at the $M$ sub-bands during the
WET phase by $\boldsymbol{p}^{E}=[p^{E}_{1},p^{E}_{2},\ldots,p^{E}_{M}]$, we
are readily to formulate the energy harvested by the $k$-th device as [5]

$\displaystyle
E_{k}(\tau,\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E})=\sum^{M}_{m=1}\eta\tau
Tp^{E}_{m}\big{|}C_{k,m}(\boldsymbol{\Theta}^{E})\big{|}^{2},$ (3)

where $\eta\in[0,1]$ denotes the efficiency of the energy harvesting at the
wireless devices.

###  II-B Model of the Computing Phase

We consider the data-partitioning based application [40], where a fraction of
the data can be processed locally, while the other part can be offloaded to
the edge node. For a specific time block, we use $L_{k}$ and $\ell_{k}$ to
denote the number of bits to be processed by the $k$-th device and its
computation offloading volume in terms of the number of bits, respectively.
The models of local computing, of computation offloading and of edge computing
are detailed as follows.

####  II-B1 Local Computing

We use $f_{k}$ and $c_{k}$ to represent its computing capability in terms of
the number of central processing unit (CPU) cycles per second and the number
of CPU cycles required to process a single bit, for the $k$-th device,
respectively. The number of bits processed by local computing is readily
calculated as $(1-\tau)Tf_{k}/c_{k}$, and the number of bits to be offloaded
is given by $\ell_{k}=L_{k}-(1-\tau)Tf_{k}/c_{k}$. Furthermore, we assume that
$f_{k}$ is controlled in the range of $[0,f_{max}]$ using the dynamic voltage
scaling model [40]. Upon denoting the computation energy efficiency
coefficient of the processor’s chip by $\kappa$, we formulate the power
consumption of the local computing mode as $\kappa f_{k}^{2}$ for the $k$-th
device [40].

####  II-B2 Computation offloading

In order to mitigate the co-channel interference, the devices’ computation
offloading is realized relying on the orthogonal frequency-division multiple
access (OFDMA) scheme. In this case, each sub-band is allowed to be used by at
most a single device. We use the binary vector
$\boldsymbol{\alpha}_{k}=[\alpha_{k,1},\alpha_{k,2},\ldots,\alpha_{k,M}]^{T}$
and the non-negative vector
$\boldsymbol{p}^{I}_{k}=[p^{I}_{k,1},p^{I}_{k,2},\ldots,p^{I}_{k,M}]^{T}$ to
represent the association between the sub-band and devices as well as the
power allocation of the $k$-th device to the $M$ sub-bands, respectively,
where we have

$\displaystyle\alpha_{k,m}$ $\displaystyle=\begin{cases}0,&\quad\text{if
}p^{I}_{k,m}=0,\\\ 1,&\quad\text{if }p^{I}_{k,m}>0.\end{cases}$ (4)

The power consumption of computation offloading is given by
$\sum^{M}_{m=1}\alpha_{k,m}(p_{k,m}+p_{c})$, where $p_{c}$ represents a
constant circuit power (caused by the digital-to-analog converter, filter,
etc.) [5]. Let us denote the IRS reflection-coefficient vector during the
computation offloading by
$\boldsymbol{\Theta}^{I}=\big{\\{}\Theta^{I}_{1},\Theta^{I}_{2},\ldots,\Theta^{I}_{N}\big{\\}}$,
where $|\Theta^{I}_{n}|\leq 1$ for $\forall n\in\mathcal{N}$. Then, the
composite channel of the $k$-th device at the $m$-th sub-band denoted by
$C_{k,m}(\boldsymbol{\Theta}^{I})$ can be obtained by (2). The corresponding
achievable rate of computation offloading is formulated below for the $k$-th
device

$\displaystyle
R_{k}(\boldsymbol{\alpha}_{k},\boldsymbol{p}^{I}_{k},\boldsymbol{\Theta}^{I})=\sum^{M}_{m=1}\alpha_{k,m}B\log_{2}\bigg{(}1+\frac{p_{k,m}|C_{k,m}(\boldsymbol{\Theta}^{I})|^{2}}{\Gamma\sigma^{2}}\bigg{)},$
(5)

where $\Gamma$ is the gap between the channel capacity and a specific
modulation and coding scheme. Furthermore, in order to offload all the
$\ell_{k}$ bits within the duration of the computation phase, the achievable
offloading rate has to obey
$R_{k}(\tau,\boldsymbol{\alpha}_{k},\boldsymbol{p}^{I}_{k},\boldsymbol{\Theta}^{I})\geq\frac{\ell_{k}}{(1-\tau)T}$.

####  II-B3 Edge Computing

Invoking the simplified linear model [5], we formulate the energy consumption
at the edge node as
$\vartheta\sum^{K}_{k=1}\ell_{k}=\vartheta\sum^{K}_{k=1}\big{[}L_{k}-(1-\tau)Tf_{k}/c_{k}\big{]}$.
Furthermore, the latency imposed by edge computing comprises of two parts. The
first part is caused by processing the computational tasks. Given that edge
nodes typically possess high computational capabilities, this part can be
negligible. The second part is induced by sending back the computational
results, which are usually of a small volume. Hence, the duration of sending
the feedback is also negligible. As such, we neglect the latency induced by
edge computing.

###  II-C Problem Formulation

In this paper, we aim for minimizing the total energy consumption of the OFDM-
based WP-MEC system, by optimizing the time allocation for WET and computing
phases $\tau$, both the power allocation $\boldsymbol{p}^{E}$ and the IRS
reflection coefficients $\boldsymbol{\Theta}^{E}$ at the WET phase, and the
local CPU frequency at devices $\boldsymbol{f}$, the sub-band-device
association $\\{\boldsymbol{\alpha}_{k}\\}$ and the power allocation
$\\{\boldsymbol{p}_{k}\\}$ as well as the IRS reflection coefficients
$\boldsymbol{\Theta}^{I}$ at the computing phase, subject to the energy
constraint imposed by energy harvesting, the latency requirement of
computation offloading and the sub-band-device association constraint in OFDMA
systems as well as the constraint on IRS reflection coefficients. Since the
batteries of all the wireless devices are replenished by the HAP, their energy
consumption is covered by the energy consumption at the HAP during the WET
phase. Hence, the total energy consumption of the system is formulated as the
summation of the energy consumption both of the WET at the HAP and of the edge
computing, i.e. $\tau
T\sum^{M}_{m=1}p^{E}_{m}+\vartheta\sum^{K}_{k=1}\big{[}L_{k}-(1-\tau)Tf_{k}/c_{k}\big{]}$.
To this end, the energy minimization problem is readily formulated for our
OFDM-based WP-MEC system as

$\displaystyle\mathcal{P}0\mathrel{\mathop{\mathchar
58\relax}}\mathop{\min}\limits_{\begin{subarray}{c}\tau,\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E},\boldsymbol{f},\\\
\\{\boldsymbol{\alpha}_{k}\\},\\{\boldsymbol{p}^{I}_{k}\\},\boldsymbol{\Theta}^{I}\end{subarray}}\tau
T\sum^{M}_{m=1}p^{E}_{m}+\vartheta\sum^{K}_{k=1}\bigg{[}L_{k}-\frac{(1-\tau)Tf_{k}}{c_{k}}\bigg{]}$
$\displaystyle\text{s.t.}\quad 0<\tau<1,$ (6a) $\displaystyle\quad\quad
p^{E}_{m}\geq 0,\quad\forall m\in\mathcal{M},$ (6b)
$\displaystyle\quad\quad|\Theta^{E}_{n}|\leq 1,\quad\forall n\in\mathcal{N},$
(6c) $\displaystyle\quad\quad 0\leq f_{k}\leq f_{max},\quad\forall
k\in\mathcal{K},$ (6d)
$\displaystyle\quad\quad\alpha_{k,m}\in\\{0,1\\},\quad\forall
k\in\mathcal{K},\quad\forall m\in\mathcal{M},$ (6e)
$\displaystyle\quad\quad\sum^{K}_{k=1}\alpha_{k,m}\leq 1,\quad\forall
m\in\mathcal{M},$ (6f) $\displaystyle\quad\quad p^{I}_{k,m}\geq 0,\quad\forall
k\in\mathcal{K},\quad\forall m\in\mathcal{M},$ (6g)
$\displaystyle\quad\quad|\Theta^{I}_{n}|\leq 1,\quad\forall n\in\mathcal{N},$
(6h) $\displaystyle\quad\quad(1-\tau)T\bigg{[}\kappa
f_{k}^{2}+\sum^{M}_{m=1}\alpha_{k,m}(p^{I}_{k,m}+p_{c})\bigg{]}\leq
E_{k}(\tau,\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E}),\quad\forall
k\in\mathcal{K},$ (6i)
$\displaystyle\quad\quad(1-\tau)TR_{k}(\boldsymbol{\alpha}_{k},\boldsymbol{p}^{I}_{k},\boldsymbol{\Theta}^{I})\geq
L_{k}-\frac{(1-\tau)Tf_{k}}{c_{k}},\quad\forall k\in\mathcal{K}.$ (6j)

Constraint (6a) restricts the time allocation for the WET and for the
computing phases. Constraint (6b) and (6c) represent the range of the power
allocation and the IRS reflection coefficients at the WET phase, respectively.
Constraint (6d) gives the range of tunable local computing frequencies.
Constraint (6e) and (6f) detail the requirement of sub-band-device association
in OFDMA systems. Constraint (6g) and (6h) restrict the range of the power
allocation and the IRS reflection coefficient at the computing phase,
respectively. Constraint (6i) indicates that the sum energy consumption of
local computing and of computation offloading should not exceed the harvested
energy for each device. Finally, Constraint (6j) implies that the
communication link between the $k$-th device and the HAP is capable of
offloading the corresponding computational tasks within the duration of the
computing phase.

##  III Joint Optimization of the Settings in the WET and the Computing Phases

In this section, we propose to solve Problem $\mathcal{P}0$ in a two-step
procedure. Firstly, given a fixed $\hat{\tau}\in(0,1)$, Problem $\mathcal{P}0$
can be simplified as follows

$\displaystyle\mathcal{P}1\mathrel{\mathop{\mathchar
58\relax}}\mathop{\min}\limits_{\begin{subarray}{c}\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E},\boldsymbol{f},\\\
\\{\boldsymbol{\alpha}_{k}\\},\\{\boldsymbol{p}^{I}_{k}\\},\boldsymbol{\Theta}^{I}\end{subarray}}\hat{\tau}T\sum^{M}_{m=1}p^{E}_{m}+\vartheta\sum^{K}_{k=1}\bigg{[}L_{k}-\frac{(1-\hat{\tau})Tf_{k}}{c_{k}}\bigg{]}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_4},\eqref{eqn:P1_constraint_5},\eqref{eqn:P1_constraint_10},\eqref{eqn:P1_constraint_6},\eqref{eqn:P1_constraint_7},\eqref{eqn:P1_constraint_8},\eqref{eqn:P1_constraint_9},\eqref{eqn:P1_constraint_1},\eqref{eqn:P1_constraint_2}$
(7a)

In the second step, we aim for finding the optimal $\hat{\tau}$ that is
capable of minimizing the OF of Problem $\mathcal{P}0$ using the one-
dimensional search method. In the rest of this section, we focus on solving
Problem $\mathcal{P}1$. At a glance of Problem $\mathcal{P}1$, the
optimization variables $\boldsymbol{f}$, $\\{\boldsymbol{\alpha}_{k}\\}$ and
$\\{\boldsymbol{p}^{I}_{k}\\}$ are coupled with $\boldsymbol{p}^{E}$ and
$\boldsymbol{\Theta}^{E}$ in Constraint (6i), which makes the problem
difficult to solve. To tackle this issue, the AO technique is invoked.
Specifically, upon initializing the setting of the computing phase, we may
optimize the design of the WET phase while fixing the time allocation and the
computing phase settings. Then, the computing phase settings could be
optimized while fixing the time allocation and the design of the WET. A
suboptimal solution can be obtained by iteratively optimizing the designs of
the WET and of the computing phases. Let us detail the initialization as well
as the designs of the WET and of the computing phases, as follows.

###  III-A Initialization of the Time Allocation and the Computing Phase

In order to ensure our WET design to be a feasible solution of Problem
$\mathcal{P}1$, the initial settings of the computing phase denoted by
$\boldsymbol{f}^{(0)},\big{\\{}\boldsymbol{\alpha}_{k}^{(0)}\big{\\}},\big{\\{}{\boldsymbol{p}^{I}_{k}}^{(0)}\big{\\}},{\boldsymbol{\Theta}^{I}}^{(0)}$
should satisfy Constraint (6d), (6e), (6f), (6g), (6h) and (6j). Without any
loss of generality, their initialization is set as follows.

  * •

Local computing frequency $\boldsymbol{f}^{(0)}$: Obeying the uniform
distribution, each element of $\boldsymbol{f}^{(0)}$ is randomly set in the
range of $[0,f_{max}]$.

  * •

IRS reflection coefficient at the computing phase
${\boldsymbol{\Theta}^{I}}^{(0)}$: Obeying the uniform distribution, the
amplitude response ${\beta^{I}_{n}}^{(0)}$ and the phase shift
${\theta^{I}_{n}}^{(0)}$ are randomly set in the range of $[0,1]$ and of
$[0,2\pi)$, respectively. Then,
${\boldsymbol{\Theta}^{I}}^{(0)}=\\{{\beta^{I}_{1}}^{(0)}e^{j{\theta^{I}_{1}}^{(0)}},\ldots,{\beta^{I}_{N}}^{(0)}e^{j{\theta^{I}_{N}}^{(0)}}\\}$
can be obtained.

  * •

Sub-band-device association at the computing phase
$\big{\\{}\boldsymbol{\alpha}_{k}^{(0)}\big{\\}}$: We reserve a single sub-
band for the devices associated with the index ranging from $k=1$ to $k=K$,
sequentially. Specific to the $k$-th device, we use $k_{m}^{(0)}$ to denote
the sub-band having the maximum
$\big{|}C_{k,m}\big{(}{\boldsymbol{\Theta}^{I}}^{(0)}\big{)}\big{|}^{2}$ over
the unassigned sub-bands, and assign this sub-band to the $k$-th device.

  * •

Power allocation at the computing phase
$\big{\\{}{\boldsymbol{p}^{I}_{k}}^{(0)}\big{\\}}$: For the $k$-th device, its
power allocation at the computing phase should satisfy Constraint (6j). For
minimizing the energy consumption, we assume the equivalence of two sides in
Constraint (6j). Then, its initial power allocation is given by
${p^{I^{(0)}}_{k,k_{m}^{(0)}}}=\frac{\Gamma\sigma^{2}\Big{[}2^{\frac{L_{k}}{(1-\hat{\tau})TB}-\frac{f_{k}}{c_{k}B}}-1\Big{]}}{\big{|}c_{k,k^{(0)}_{m}}\big{(}{\boldsymbol{\Theta}^{I}}^{(0)}\big{)}\big{|}^{2}}$.
For those sub-bands associated with the index $m\neq k^{(0)}_{m}$, we set
${p^{I^{(0)}}_{k,m}}=0$.

###  III-B Design of the WET Phase While Fixing the Time Allocation and
Computing Settings

Given a fixed time allocation $\hat{\tau}$ and the settings of the computing
phase $\boldsymbol{f}$, $\\{\boldsymbol{\alpha}_{k}\\}$,
$\\{\boldsymbol{p}^{I}_{k}\\}$ and $\boldsymbol{\Theta}^{I}$, we may simplify
Problem $\mathcal{P}1$ as

$\displaystyle\mathcal{P}2\mathrel{\mathop{\mathchar
58\relax}}\mathop{\min}\limits_{\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E}}\hat{\tau}T\sum^{M}_{m=1}p^{E}_{m}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_4},\eqref{eqn:P1_constraint_5},$
$\displaystyle\quad\quad(1-\hat{\tau})T\bigg{[}\kappa
f_{k}^{2}+\sum^{M}_{m=1}\alpha_{k,m}(p^{I}_{k,m}+p_{c})\bigg{]}\leq\sum^{M}_{m=1}\eta\hat{\tau}Tp^{E}_{m}\big{|}C_{k,m}(\boldsymbol{\Theta}^{E})\big{|}^{2},\quad\forall
k\in\mathcal{K}.$ (8a)

Since Constraint (8a) is not jointly convex regarding $\boldsymbol{p}^{E}$ and
$\boldsymbol{\Theta}^{E}$, we optimize one of these two variables while fixing
the other in an iterative manner, relying on the AO technique, as follows.

####  III-B1 Optimizing the Power Allocation of the WET Phase While Fixing the
Settings of the Time Allocation, the Computing Phase and the IRS Reflection
Coefficient at the WET Phase

Given an IRS phase shift design $\boldsymbol{\Theta}^{E}$, Problem
$\mathcal{P}2$ is simplified as

$\displaystyle\mathcal{P}2\text{-}1\mathrel{\mathop{\mathchar
58\relax}}\mathop{\min}\limits_{\boldsymbol{p}^{E}}\hat{\tau}T\sum^{M}_{m=1}p^{E}_{m}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_4},\eqref{eqn:P2_constraint_1}.$
(9a)

It can be observed that Problem $\mathcal{P}2\text{-}1$ is a linear
programming problem, which can be readily solved with the aid of the general
implementation of interior-point methods, e.g. CVX [41]. The complexity is
given by $\sqrt{M+KM}M[M+KM^{3}+M(M+KM^{2})+M^{2}]$ [42], i.e.
$\mathcal{O}(K^{1.5}M^{4.5})$.

####  III-B2 Optimizing the IRS Reflection Coefficient at the WET Phase While
Fixing the Settings of the Time Allocation, the Computing Phase and the power
Allocation at the WET Phase

Given a power allocation at the WET phase $\boldsymbol{p}^{E}$, Problem
$\mathcal{P}2$ becomes a feasibility-check problem, i.e.

$\displaystyle\mathcal{P}2\text{-}2\mathrel{\mathop{\mathchar
58\relax}}\text{Find }\boldsymbol{\Theta}^{E}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_5},\eqref{eqn:P2_constraint_1}.$
(10a)

As verified in [28], if one of the sub-problems is a feasibility-check
problem, the iterative algorithm relying on the AO technique has a slow
convergence. Specific to the problem considered, the operation of Find in
Problem $\mathcal{P}2\text{-}2$ cannot guarantee the OF of Problem
$\mathcal{P}2$ to be further reduced in each iteration. To address this issue,
we reformulate Problem $\mathcal{P}2\text{-}2$ as follows, by introducing a
set of auxiliary variables $\\{\xi_{k}\\}$

$\displaystyle\mathcal{P}2\text{-}2^{\prime}\mathrel{\mathop{\mathchar
58\relax}}\mathop{\max}\limits_{\boldsymbol{\Theta}^{E},\\{\xi_{k}\\}}\sum^{K}_{k=1}\xi_{k}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_5},$
$\displaystyle\quad\quad\xi_{k}+\kappa
f_{k}^{2}+\sum^{M}_{m=1}\alpha_{k,m}(p^{I}_{k,m}+p_{c})\leq\frac{\sum^{M}_{m=1}\eta\hat{\tau}p^{E}_{m}\big{|}\boldsymbol{f}^{H}_{m}\boldsymbol{h}^{d}_{k}+\boldsymbol{f}^{H}_{m}\boldsymbol{V}_{k}\boldsymbol{\Theta}^{E}\big{|}^{2}}{1-\hat{\tau}},\quad\forall
k\in\mathcal{K},$ (11a) $\displaystyle\quad\quad\xi_{k}\geq 0,\quad\forall
k\in\mathcal{K}.$ (11b)

It is readily seen that the energy harvested by the wireless devices may
increase after solving Problem $\mathcal{P}2\text{-}2^{\prime}$, which implies
that the channel gain of the reflection link is enhanced. Then, a reduced
power of energy signals can be guaranteed, when we turn back to solve Problem
$\mathcal{P}2\text{-}1$. As such, a faster convergence can be obtained.
However, at a glance of Problem $\mathcal{P}2\text{-}2^{\prime}$, Constraint
(11a) is still non-convex regarding $\boldsymbol{\Theta}^{E}$. To tackle this
issue, we manipulate the optimization problem in light of [33] as follows.
Firstly, we transform Problem $\mathcal{P}2\text{-}2^{\prime}$ to its
equivalent problem below, by introducing a set of auxiliary variables
$\boldsymbol{y}^{E}$, $\boldsymbol{a}^{E}$ and $\boldsymbol{b}^{E}$

$\displaystyle\mathcal{P}2\text{-}2^{\prime}E1\mathrel{\mathop{\mathchar
58\relax}}\mathop{\max}\limits_{\boldsymbol{\Theta}^{E},\\{\xi_{k}\\},\boldsymbol{y}^{E},\boldsymbol{a}^{E},\boldsymbol{b}^{E}}\sum^{K}_{k=1}\xi_{k}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_5},\eqref{eqn:P2_2_constraint_11},$
$\displaystyle\quad\quad\xi_{k}+\kappa
f_{k}^{2}+\sum^{M}_{m=1}\alpha_{k,m}(p^{I}_{k,m}+p_{c})\leq\frac{\sum^{M}_{m=1}\eta\hat{\tau}p^{E}_{m}y^{E}_{k,m}}{1-\hat{\tau}},\quad\forall
k\in\mathcal{K},$ (12a) $\displaystyle\quad\quad
a^{E}_{k,m}=\Re\big{\\{}\boldsymbol{f}^{H}_{m}\boldsymbol{h}^{d}_{k}+\boldsymbol{f}^{H}_{m}\boldsymbol{V}_{k}\boldsymbol{\Theta}^{E}\big{\\}},\quad
k\in\mathcal{K},\quad m\in\mathcal{M},$ (12b) $\displaystyle\quad\quad
b^{E}_{k,m}=\Im\big{\\{}\boldsymbol{f}^{H}_{m}\boldsymbol{h}^{d}_{k}+\boldsymbol{f}^{H}_{m}\boldsymbol{V}_{k}\boldsymbol{\Theta}^{E}\big{\\}},\quad
k\in\mathcal{K},\quad m\in\mathcal{M},$ (12c) $\displaystyle\quad\quad
y^{E}_{k,m}\leq(a^{E}_{k,m})^{2}+(b^{E}_{k,m})^{2},\quad k\in\mathcal{K},\quad
m\in\mathcal{M},$ (12d)

where $\Re\\{\bullet\\}$ and $\Im\\{\bullet\\}$ represent the real and
imaginary part of $\bullet$, respectively. Following this, the successive
convex approximation (SCA) method [43] is applied for tackling the non-convex
constraint (12d). Specifically, the approximation function is constructed as
follows. The right hand side of (12d) is lower-bounded by its first-order
approximation at $(\tilde{a}^{E}_{k,m},\tilde{b}^{E}_{k,m})$, i.e.
$(a^{E}_{k,m})^{2}+(b^{E}_{k,m})^{2}\geq\tilde{a}^{E}_{k,m}(2a^{E}_{k,m}-\tilde{a}^{E}_{k,m})+\tilde{b}^{E}_{k,m}(2b^{E}_{k,m}-\tilde{b}^{E}_{k,m})$,
where the equality holds only when we have $\tilde{a}^{E}_{k,m}=a^{E}_{k,m}$
and $\tilde{b}^{E}_{k,m}=b^{E}_{k,m}$. Now we consider the following
optimization problem

$\displaystyle\mathcal{P}2\text{-}2^{\prime}E2\mathrel{\mathop{\mathchar
58\relax}}\mathop{\max}\limits_{\boldsymbol{\Theta}^{E},\\{\xi_{k}\\},\boldsymbol{y}^{E},\boldsymbol{a}^{E},\boldsymbol{b}^{E}}\sum^{K}_{k=1}\xi_{k}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_5},\eqref{eqn:P2_2_constraint_11},\eqref{eqn:P2_2'E_constraint_1},\eqref{eqn:P2_2'E_constraint_6},\eqref{eqn:P2_2'E_constraint_7},$
$\displaystyle\quad\quad
y^{E}_{k,m}=\tilde{a}^{E}_{k,m}(2a^{E}_{k,m}-\tilde{a}^{E}_{k,m})+\tilde{b}^{E}_{k,m}(2b^{E}_{k,m}-\tilde{b}^{E}_{k,m}),\quad
k\in\mathcal{K},\quad m\in\mathcal{M}.$ (13a)

Both the OF and contraints in Problem $\mathcal{P}2\text{-}2^{\prime}E2$ are
affine. Hence, Problem $\mathcal{P}2\text{-}2^{\prime}E2$ is a convex
optimization problem, which can be solved by the implementation of interior-
point methods, e.g. CVX [41]. Then, a locally optimal solution of
$\mathcal{P}2\text{-}2^{\prime}$ can be approached by successively updating
$\tilde{a}^{E}_{k,m}$ and $\tilde{b}^{E}_{k,m}$ based on the optimal solution
of Problem $\mathcal{P}2\text{-}2^{\prime}E2$, whose procedure is detailed in
Algorithm 1. The computation complexity of the SCA method is analyzed as
follows. Problem $\mathcal{P}2\text{-}2^{\prime}E2$ involves $2KM$ linear
equality constraints (equivalently $4KM$ inequality constraints) of size
$2N+1$, $K$ linear inequality constraints of size $M+1$, $KM$ linear
inequality constraints of size $3$, $K$ linear inequality constraints of size
$1$, $N$ second-order cone inequality constraints of size $2$. Hence, the
total complexity of Algorithm 1 is given by
$\ln(1/\epsilon)\sqrt{4KM(2N+1)+K(M+1)+3KM+K+2N}(2N+3M+K)\\{4KM(2N+1)^{3}+K(M+1)^{3}+27KM+K+(2N+3M+K)[4KM(2N+1)^{2}+K(M+1)^{2}+9KM+K]+4N+(2N+3M+K)^{2}\\}$
[42], i.e.
$\ln(1/\epsilon)\mathcal{O}(K^{1.5}M^{1.5}N^{4.5}+K^{1.5}M^{2.5}N^{3.5}+K^{1.5}M^{2.5}N^{1.5}+K^{2.5}M^{1.5}N^{3.5}+K^{1.5}M^{4.5}+K^{2.5}M^{2.5}N^{2.5}+K^{2.5}M^{3.5}+K^{3.5}M^{1.5}N^{2.5}+K^{3.5}M^{2.5})$.
To this end, we summarize the procedure of solving Problem $\mathcal{P}2$ in
Algorithm 2.

Algorithm 1 SCA approach to design $\boldsymbol{\Theta}^{E}$, given the
settings of the time allocation, the computing phase and the power allocation
at the WET phase

0: $t_{max}$, $\epsilon$, $K$, $M$, $N$, $T$, $\eta$, $c_{k}$, $\kappa$,
$f_{max}$, $p_{c}$, $\Gamma$, $L_{k}$, $\\{\boldsymbol{h}^{d}_{k}\\}$,
$\\{\boldsymbol{V}_{k}\\}$, $\hat{\tau}$, $\boldsymbol{P}^{E}$,
$\boldsymbol{f}$, $\\{\boldsymbol{\alpha}_{k}\\}$,
$\\{\boldsymbol{p}^{I}_{k}\\}$, $\boldsymbol{\Theta}^{I}$ and
$\tilde{\boldsymbol{\Theta}}^{E}$

0: $\boldsymbol{\Theta}^{E}$ 1\. Initialization

Initialize $t_{1}=0$; $\epsilon_{1}=1$; $\xi_{k}=0,\forall k\in\mathcal{K}$
2\. SCA approach to design $\boldsymbol{\Theta}^{E}$

while $t_{1}<t_{\text{max}}$ $\&\&$ $\epsilon_{1}>\epsilon$ do

$\bullet$ Set
$\tilde{a}^{E}_{k,m}=\Re\big{\\{}\boldsymbol{f}^{H}_{m}\boldsymbol{h}^{d}_{k}+\boldsymbol{f}^{H}_{m}\boldsymbol{V}_{k}\tilde{\boldsymbol{\Theta}}^{E}\big{\\}}$
and
$\tilde{b}^{E}_{k,m}=\Im\big{\\{}\boldsymbol{f}^{H}_{m}\boldsymbol{h}^{d}_{k}+\boldsymbol{f}^{H}_{m}\boldsymbol{V}_{k}\tilde{\boldsymbol{\Theta}}^{E}\big{\\}},\forall
k\in\mathcal{K},\forall m\in\mathcal{M}$

$\bullet$ Obtain ${\boldsymbol{\Theta}^{E}}$ and $\\{\xi_{k}\\}$ by solving
Problem $\mathcal{P}2\text{-}2^{\prime}E2$ using CVX

$\bullet$ Set
$\epsilon_{1}=\frac{\big{|}\text{obj}\big{(}{\boldsymbol{\Theta}}^{E}\big{)}-\text{obj}\big{(}\tilde{\boldsymbol{\Theta}}^{E}\big{)}\big{|}}{\big{|}\text{obj}\big{(}\boldsymbol{\Theta}^{E}\big{)}\big{|}}$,
$\tilde{\boldsymbol{\Theta}}^{E}\leftarrow\boldsymbol{\Theta}^{E}$,
$t_{1}\leftarrow t_{1}+1$

end while3. Output optimal ${\boldsymbol{\Theta}^{E}}^{*}$

${\boldsymbol{\Theta}^{E}}^{*}\leftarrow\tilde{\boldsymbol{\Theta}}^{E}$

Algorithm 2 Alternative optimization of $\boldsymbol{p}^{E}$ and
$\boldsymbol{\Theta}^{E}$, given the settings of the time allocation and the
computing phase

0: $t_{max}$, $\epsilon$, $K$, $M$, $N$, $T$, $\eta$, $c_{k}$, $\kappa$,
$f_{max}$, $p_{c}$, $\Gamma$, $L_{k}$, $\\{\boldsymbol{h}^{d}_{k}\\}$,
$\\{\boldsymbol{V}_{k}\\}$, $\hat{\tau}$, $\boldsymbol{f}$,
$\\{\boldsymbol{\alpha}_{k}\\}$, $\\{\boldsymbol{p}^{I}_{k}\\}$,
$\boldsymbol{\Theta}^{I}$ and $\tilde{\boldsymbol{\Theta}}^{E}$

0: $\boldsymbol{P}^{E}$ and $\boldsymbol{\Theta}^{E}$ 1\. Initialization

$\bullet$ Initialize $t_{2}=0$; $\epsilon_{2}=1$;
${\boldsymbol{\Theta}^{E}}^{(0)}=\tilde{\boldsymbol{\Theta}}^{E}$

$\bullet$ Given ${\boldsymbol{\Theta}^{E}}^{(0)}$, find
${\boldsymbol{P}^{E}}^{(0)}$ by solving Problem $\mathcal{P}2\text{-}1$ via
CVX 2\. Alternative optimization of $\boldsymbol{P}^{E}$ and
$\boldsymbol{\Theta}^{E}$

while $t_{2}<t_{\text{max}}$ $\&\&$ $\epsilon_{2}>\epsilon$ do

$\bullet$ Given ${\boldsymbol{P}^{E}}^{(t_{2})}$ and
$\tilde{\boldsymbol{\Theta}}^{E}={\boldsymbol{\Theta}^{E}}^{(t_{2})}$, find
${\boldsymbol{\Theta}^{E}}^{(t_{2}+1)}$ by solving Problem
$\mathcal{P}2\text{-}2^{\prime}E1$ using Algorithm 1

$\bullet$ Given ${\boldsymbol{\Theta}^{E}}^{(t_{2}+1)}$, find
${\boldsymbol{P}^{E}}^{(t_{2}+1)}$ by solving Problem $\mathcal{P}2\text{-}1$
via CVX

$\bullet$ Set
$\epsilon_{2}=\frac{\big{|}\text{obj}\big{(}{\boldsymbol{p}^{E}}^{(t_{2}+1)},{{\boldsymbol{\Theta}}^{E}}^{(t_{2}+1)}\big{)}-\text{obj}\big{(}{\boldsymbol{p}^{E}}^{(t_{2})},{{\boldsymbol{\Theta}}^{E}}^{(t_{2})}\big{)}\big{|}}{\big{|}\text{obj}\big{(}{\boldsymbol{p}^{E}}^{(t_{2}+1)},{{\boldsymbol{\Theta}}^{E}}^{(t_{2}+1)}\big{)}\big{|}}$,
$t_{2}\leftarrow t_{2}+1$

end while3. Output optimal ${\boldsymbol{P}^{E}}^{*}$ and
${\boldsymbol{\Theta}^{E}}^{*}$

${\boldsymbol{\Theta}^{E}}^{*}\leftarrow{\boldsymbol{\Theta}^{E}}^{(t_{2})}$
and ${\boldsymbol{P}^{E}}^{*}\leftarrow{\boldsymbol{P}^{E}}^{(t_{2})}$

###  III-C Design of the Computing Phase While Fixing the Time Allocation and
WET Settings

In this subsection, we aim for optimizing the design of the computing phase,
while fixing the time allocation $\hat{\tau}$ and the WET settings
$\boldsymbol{p}^{E}$ and $\boldsymbol{\Theta}^{E}$. In this case, we simplify
Problem $\mathcal{P}1$ as

$\displaystyle\mathcal{P}3\mathrel{\mathop{\mathchar
58\relax}}\mathop{\min}\limits_{\boldsymbol{f},\\{\boldsymbol{\alpha}_{k}\\},\\{\boldsymbol{p}^{I}_{k}\\},\boldsymbol{\Theta}^{I}}\vartheta\sum^{K}_{k=1}\bigg{[}L_{k}-\frac{(1-\hat{\tau})Tf_{k}}{c_{k}}\bigg{]}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_10},\eqref{eqn:P1_constraint_6},\eqref{eqn:P1_constraint_7},\eqref{eqn:P1_constraint_8},\eqref{eqn:P1_constraint_9},\eqref{eqn:P1_constraint_1},$
$\displaystyle\quad\quad\sum^{m}_{m=1}\alpha_{k,m}B\log_{2}\Bigg{[}1+\frac{p_{k,m}|C_{k,m}(\boldsymbol{\Theta}^{I})|^{2}}{\Gamma\sigma^{2}}\Bigg{]}\geq\frac{L_{k}-\frac{(1-\hat{\tau})Tf_{k}}{c_{k}}}{(1-\hat{\tau})T},\quad\forall
k\in\mathcal{K}.$ (14a)

Constraint (14a) is not jointly convex regarding
$\\{\boldsymbol{\alpha}_{k}\\}$, $\\{\boldsymbol{p}^{I}_{k}\\}$ and
$\boldsymbol{\Theta}^{I}$. Hence, it is difficult to find its globally optimal
solution. Alternatively, its suboptimal solution is provided by iteratively
optimizing the $\boldsymbol{f}$, $\\{\boldsymbol{\alpha}_{k}\\}$,
$\\{\boldsymbol{p}^{I}_{k}\\}$ and $\boldsymbol{\Theta}^{I}$, again relying on
the AO technique, as follows.

####  III-C1 Alternative Optimization of the Sub-Band-Device Association and
the Power Allocation as well as the IRS Reflection Coefficient at the
Computing Phase

Given a fixed local CPU frequency setting $\boldsymbol{f}$, the OF of Problem
$\mathcal{P}3$ becomes deterministic. In other words, the optimization of
$\\{\boldsymbol{\alpha}_{k}\\}$, $\\{\boldsymbol{p}^{I}_{k}\\}$ and
$\boldsymbol{\Theta}^{I}$ seems not contributing to reducing the OF. However,
this is not always true, because if a larger feasible set of $\boldsymbol{f}$
can be obtained by optimizing $\\{\boldsymbol{\alpha}_{k}\\}$,
$\\{\boldsymbol{p}^{I}_{k}\\}$ and $\boldsymbol{\Theta}^{I}$, a reduced OF may
be achieved when we turn back to optimize $\boldsymbol{f}$. Based on this
observation, we formulate the problem below, by introducing a set of auxiliary
variables $\\{\zeta_{k}\\}$

$\displaystyle\mathcal{P}3\text{-}1\mathrel{\mathop{\mathchar
58\relax}}\mathop{\max}\limits_{\\{\zeta_{k}\\},\\{\boldsymbol{\alpha}_{k}\\},\\{\boldsymbol{p}^{I}_{k}\\},\boldsymbol{\Theta}^{I}}\sum^{K}_{k=1}\zeta_{k}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_6},\eqref{eqn:P1_constraint_7},\eqref{eqn:P1_constraint_8},\eqref{eqn:P1_constraint_9},\eqref{eqn:P3_constraint_2}$
$\displaystyle\quad\quad\zeta_{k}\geq 0,\quad\forall k\in\mathcal{K},$ (15a)
$\displaystyle\quad\quad(1-\hat{\tau})T\bigg{[}\kappa
f_{k}^{2}+\sum^{M}_{m=1}\alpha_{k,m}(p^{I}_{k,m}+p_{c})+\zeta_{k}\bigg{]}\leq\sum^{M}_{m=1}\eta\hat{\tau}Tp^{E}_{m}\big{|}C_{k,m}(\boldsymbol{\Theta}^{E})\big{|}^{2},\quad\forall
k\in\mathcal{K}.$ (15b)

As specified in (15a), the auxiliary variables $\\{\zeta_{k}\\}$ are non-
negative, and thus a non-smaller set of $\boldsymbol{f}$ may be obtained after
solving Problem $\mathcal{P}3\text{-}1$. Given that Constraint (14a) is not
jointly convex regarding $\\{\boldsymbol{p}_{k}\\}$ and
$\boldsymbol{\Theta}^{I}$, we optimize $\\{\boldsymbol{\alpha}_{k}\\}$,
$\\{\boldsymbol{p}^{I}_{k}\\}$ and $\boldsymbol{\Theta}^{I}$ in two steps
iteratively.

In the first step, we optimize $\\{\zeta_{k}\\},\\{\boldsymbol{\alpha}_{k}\\}$
and $\\{\boldsymbol{p}^{I}_{k}\\}$, while fixing the IRS reflection
coefficient $\boldsymbol{\Theta}^{I}$. In this case, Problem
$\mathcal{P}3\text{-}1$ can be simplified as

$\displaystyle\mathcal{P}3\text{-}1a\mathrel{\mathop{\mathchar
58\relax}}\mathop{\max}\limits_{\\{\zeta_{k}\\},\\{\boldsymbol{\alpha}_{k}\\},\\{\boldsymbol{p}^{I}_{k}\\}}\sum^{K}_{k=1}\zeta_{k}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_6},\eqref{eqn:P1_constraint_7},\eqref{eqn:P1_constraint_8},\eqref{eqn:P3_constraint_2},\eqref{eqn:P3_1_constraint_3},\eqref{eqn:P3_1_constraint_2}.$
(16a)

Problem $\mathcal{P}3\text{-}1a$ is a combinatorial optimization problem,
where the binary constraint (6e) is non-convex. The classic solution typically
relies on the convex relaxation method [44], where the binary constraint
imposed on $\\{\boldsymbol{\alpha}_{k}\\}$ is relaxed into a convex constraint
by introducing time-sharing variables. However, the relaxed problem is
different from the original problem, which might lead to a specific error. To
address this issue, a near-optimal solution based on the Lagrangian duality
was proposed [39], where it is verified that the duality gap vanishes in the
system equipped with more than $8$ sub-bands. Hence, in this paper, the
Lagrangian duality method [45] is invoked for solving Problem
$\mathcal{P}3\text{-}1a$. Specifically, denoting the non-negative Lagrange
multiplier vectors by
$\boldsymbol{\lambda}=[\lambda_{1},\lambda_{2},\ldots,\lambda_{K}]^{T}$ and
$\boldsymbol{\mu}=[\mu_{1},\mu_{2},\ldots,\mu_{K}]^{T}$, we formulate the
Lagrangian function of Problem $\mathcal{P}3\text{-}1a$ over the domain
$\mathcal{D}$ as

$\displaystyle\mathcal{L}\big{(}\\{\zeta_{k}\\},\\{\boldsymbol{p}^{I}_{k}\\},\boldsymbol{\lambda},\boldsymbol{\mu}\big{)}$
$\displaystyle=$
$\displaystyle\sum_{k=1}^{K}\zeta_{k}-\sum_{k=1}^{K}\lambda_{k}\bigg{[}\kappa
f_{k}^{2}+\sum^{M}_{m=1}(p^{I}_{k,m}+p_{c})+\zeta_{k}-\frac{E_{k}(\hat{\tau},\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E})}{(1-\hat{\tau})T}\bigg{]}$
(17)
$\displaystyle+\sum_{k=1}^{K}\mu_{k}\Bigg{[}\sum^{M}_{m=1}B\log_{2}\bigg{(}1+\frac{p^{I}_{k,m}|C_{k,m}(\boldsymbol{\Theta}^{I})|^{2}}{\Gamma\sigma^{2}}\bigg{)}-\frac{L_{k}-\frac{(1-\hat{\tau})Tf_{k}}{c_{k}}}{(1-\hat{\tau})T}\Bigg{]},$

where the domain $\mathcal{D}$ is defined as the set of all non-negative
$p^{I}_{k,m}$ for $\forall k\in\mathcal{K}$ and for $\forall m\in\mathcal{M}$
such that for each $m$, only a single $p^{I}_{k,m}$ is positive for
$k\in\mathcal{K}$. Then, the Lagrangian dual function of Problem
$\mathcal{P}3\text{-}1a$ is given by

$\displaystyle
g(\boldsymbol{\lambda},\boldsymbol{\mu})=\mathop{\max}\limits_{\\{\zeta_{k}\\},\\{\boldsymbol{p}^{I}_{k}\\}\in{\mathcal{D}}}\mathcal{L}\big{(}\\{\zeta_{k}\\},\\{\boldsymbol{p}^{I}_{k}\\},\boldsymbol{\lambda},\boldsymbol{\mu}\big{)}.$
(18)

(18) can be reformulated as

$\displaystyle g(\boldsymbol{\lambda},\boldsymbol{\mu})$ $\displaystyle=$
$\displaystyle\sum_{m=1}^{M}\hat{g}_{m}(\boldsymbol{\lambda},\boldsymbol{\mu})+\sum^{K}_{k=1}(1-\lambda_{k})\zeta_{k}-\sum^{K}_{k=1}\lambda_{k}\kappa
f_{k}^{2}$ (19)
$\displaystyle+\sum^{K}_{k=1}\lambda_{k}\frac{E_{k}(\hat{\tau},\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E})}{(1-\hat{\tau})T}-\sum^{K}_{k=1}\frac{\mu_{k}\Big{[}L_{k}-\frac{(1-\hat{\tau})Tf_{k}}{c_{k}}\Big{]}}{(1-\hat{\tau})T},$

where we have

$\displaystyle\hat{g}_{m}(\boldsymbol{\lambda},\boldsymbol{\mu})\triangleq\mathop{\max}\limits_{\\{\boldsymbol{p}^{I}_{k}\\}\in{\mathcal{D}}}\Bigg{\\{}-\sum_{k=1}^{K}\lambda_{k}(p^{I}_{k,m}+p_{c})+\sum_{k=1}^{K}\mu_{k}B\log_{2}\Bigg{[}1+\frac{p^{I}_{k,m}|C_{k,m}(\boldsymbol{\Theta}^{I})|^{2}}{\Gamma\sigma^{2}}\Bigg{]}\Bigg{\\}}.$
(20)

It is readily seen that (20) is concave regarding $p^{I}_{k,m}$. Thus, upon
letting its first-order derivative regarding $p^{I}_{k,m}$ be $0$, we may give
the optimal power of the $m$-th sub-band when it is allocated to the $k$-th
device as

$\displaystyle\hat{p}^{I}_{k,m}(\lambda_{k},\mu_{k})=\bigg{[}\frac{\mu_{k}B}{\lambda_{k}\ln
2}-\frac{\Gamma\sigma^{2}}{|C_{k,m}(\boldsymbol{\Theta}^{I})|^{2}}\bigg{]}^{+}.$
(21)

Then, $\hat{g}_{m}(\boldsymbol{\lambda},\boldsymbol{\mu})$ can be obtained, by
searching over all possible assignments of the $m$-th sub-band for all the $K$
devices, as follows

$\displaystyle\hat{g}_{m}(\boldsymbol{\lambda},\boldsymbol{\mu})=\max_{k}\Bigg{\\{}-\lambda_{k}\Big{[}\hat{p}^{I}_{k,m}(\lambda_{k},\mu_{k})+p_{c}\Big{]}+\mu_{k}B\log_{2}\Bigg{[}1+\frac{\hat{p}^{I}_{k,m}(\lambda_{k},\mu_{k})|C_{k,m}(\boldsymbol{\Theta}^{I})|^{2}}{\Gamma\sigma^{2}}\Bigg{]}\Bigg{\\}},$
(22)

and the suitable device is given by
$k^{*}=\arg\hat{g}_{m}(\boldsymbol{\lambda},\boldsymbol{\mu})$. We set
$\alpha_{k^{*},m}=1$ and $p^{I}_{k^{*},m}=\hat{p}^{I}_{k^{*},m}$ as well as
$\alpha_{k,m}=0$ and $p^{I}_{k,m}=0$ for $\forall k\neq k^{*}$. We continue by
calculating $\\{\zeta_{k}\\}$ as follows. At a glance of (21), it is observed
that $\lambda_{k}$ has to yield $\lambda_{k}>0$, $\forall k\in\mathcal{K}$,
which implies that Constraint (15b) is strictly binding for the optimal
solution of Problem $\mathcal{P}3\text{-}1a$. Therefore, $\zeta_{k}$ can be
set as

$\displaystyle\zeta_{k}=\frac{E_{k}(\hat{\tau},\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E})}{(1-\hat{\tau})T}-\kappa
f_{k}^{2}-\sum^{M}_{m=1}\alpha_{k,m}(p^{I}_{k,m}+p_{c}).$ (23)

Once all $\hat{g}_{m}(\boldsymbol{\lambda},\boldsymbol{\mu})$ and $\zeta_{k}$
are obtained, $g(\boldsymbol{\lambda},\boldsymbol{\mu})$ can be calculated by
(19). Bearing in mind that the obtained
$g(\boldsymbol{\lambda},\boldsymbol{\mu})$ is not guaranteed to be optimal, we
have to find a suitable set of $\boldsymbol{\lambda}$ and $\boldsymbol{\mu}$
that minimize $g(\boldsymbol{\lambda},\boldsymbol{\mu})$, which can be
realized by the ellipsoid method [45]. More explicitly, the Lagrange
multipliers are iteratively updated following their sub-gradients towards
their optimal settings. The corresponding sub-gradients are given as follows

$\displaystyle s_{\lambda_{k}}=\kappa
f_{k}^{2}+\sum^{M}_{m=1}\alpha_{k,m}(p^{I}_{k,m}+p_{c})-\frac{E_{k}(\hat{\tau},\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E})}{(1-\hat{\tau})T},$
(24) $\displaystyle
s_{\mu_{k}}=\frac{L_{k}-\frac{(1-\hat{\tau})Tf_{k}}{c_{k}}}{(1-\hat{\tau})T}-\sum_{m=1}^{M}\alpha_{k,m}B\log_{2}\bigg{(}1+\frac{p^{I}_{k,m}|C_{k,m}(\boldsymbol{\Theta}^{I})|^{2}}{\Gamma\sigma^{2}}\bigg{)}.$
(25)

Upon denoting the iteration index by $t$, the Lagrange multipliers are updated
obeying
$\lambda_{k}(t+1)=[\lambda_{k}(t)+\delta_{\lambda}(t)s_{\lambda_{k}}]^{+}$ and
$\mu_{k}(t+1)=[\mu_{k}(t)+\delta_{\mu}(t)s_{\mu_{k}}]^{+}$, where we set
$\delta_{\lambda}(t)=\delta_{\lambda}(1)/t$ and
$\delta_{\mu}(t)=\delta_{\mu}(1)/t$ for ensuring the convergence of the OF. In
the problem considered, the ellipsoid method converges in $\mathcal{O}(K^{2})$
iterations [45, 39]. Within each iteration, the computational complexity is of
$\mathcal{O}(KM)$. Hence, the total computational complexity is given by
$\mathcal{O}(MK^{3})$. The procedure of this Lagrangian duality method is
summarized in Algorithm 3.

Algorithm 3 Design of $\\{\boldsymbol{\alpha}_{k}\\}$ and
$\\{\boldsymbol{p}^{I}_{k}\\}$, given the settings of $\hat{\tau}$,
$\boldsymbol{p}^{E}$, $\boldsymbol{\Theta}^{E}$, $\boldsymbol{f}$ and
$\boldsymbol{\Theta}^{I}$

0: $t_{max}$, $\epsilon$, $K$, $M$, $N$, $T$, $\eta$, $c_{k}$, $\kappa$,
$f_{max}$, $p_{c}$, $\Gamma$, $L_{k}$, $\\{\boldsymbol{h}^{d}_{k}\\}$,
$\\{\boldsymbol{V}_{k}\\}$, $\hat{\tau}$, $\boldsymbol{P}^{E}$,
$\boldsymbol{\Theta}^{E}$, $\boldsymbol{\Theta}^{I}$, $\boldsymbol{f}$,
$\boldsymbol{\Theta}^{I}$, $\boldsymbol{\lambda}$ and $\boldsymbol{\mu}$

0: $\\{\zeta_{k}\\}$, $\\{\boldsymbol{\alpha}_{k}\\}$,
$\\{\boldsymbol{p}^{I}_{k}\\}$ 1\. Initialization

Initialize $t_{3}=0$; $\epsilon_{3}=1$; Calculate $\mathcal{L}^{(0)}$ using
(17) 2\. Optimization of $\\{\zeta_{k}\\}$, $\\{\boldsymbol{\alpha}_{k}\\}$
and $\\{\boldsymbol{p}^{I}_{k}\\}$

while $t_{3}<t_{\text{max}}$ $\&\&$ $\epsilon_{3}>\epsilon$ do

for $m=1\mathrel{\mathop{\mathchar 58\relax}}M$ do

$\bullet$ Calculate $\hat{p}^{I}_{k,m}$ using (21) for each $\forall
k\in\mathcal{K}$

$\bullet$ Obtain the optimal device
$k^{*}=\arg\hat{g}_{m}(\boldsymbol{\lambda},\boldsymbol{\mu})$ in (22)

$\bullet$ Set $\alpha_{k^{*},m}=1$ and $p^{I}_{k^{*},m}=\hat{p}^{I}_{k^{*},m}$
as well as $\alpha_{k,m}=0$ and $p^{I}_{k,m}=0$ for $\forall k\neq k^{*}$

end for

$\bullet$ Calculate $\zeta_{k}$ using (23)

$\bullet$ Calculate $\mathcal{L}^{(t_{3}+1)}$ using (17)

$\bullet$ Update $\boldsymbol{\lambda}$ and $\boldsymbol{\mu}$ using the
ellipsoid method

$\bullet$ Set
$\epsilon_{3}=\frac{\big{|}\mathcal{L}^{(t_{3}+1)}-\mathcal{L}^{(t_{3})}\big{|}}{\big{|}\mathcal{L}^{(t_{3}+1)}\big{|}}$,
$t_{3}\leftarrow t_{3}+1$

end while3. Output optimal $\\{\zeta_{k}\\}^{*}$,
$\\{\boldsymbol{\alpha}_{k}\\}^{*}$ and $\\{\boldsymbol{p}^{I}_{k}\\}^{*}$

$\\{\zeta_{k}\\}^{*}=\\{\zeta_{k}\\}$,
$\\{\boldsymbol{\alpha}_{k}\\}^{*}=\\{\boldsymbol{\alpha}_{k}\\}$,
$\\{\boldsymbol{p}^{I}_{k}\\}^{*}=\\{\boldsymbol{p}^{I}_{k}\\}$

In the second step, we optimize the IRS reflection coefficient
$\boldsymbol{\Theta}^{I}$, while fixing the settings of the resource
allocation at the computing phase $\\{\boldsymbol{\alpha}_{k}\\}$ and
$\\{\boldsymbol{p}^{I}\\}$. In this case, Problem $\mathcal{P}3\text{-}1$
becomes a feasibility-check problem below

$\displaystyle\mathcal{P}3\text{-}1b\mathrel{\mathop{\mathchar
58\relax}}\text{Find }\boldsymbol{\Theta}^{I}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_9},\eqref{eqn:P3_constraint_2}.$

The problem can be solved using the approach devised in Section III-B2,
detailed as follows. By introducing a set of auxiliary variables
$\\{\chi_{k}\\}$, we transform $\mathcal{P}3\text{-}2$ to the problem below

$\displaystyle\mathcal{P}3\text{-}1b\mathrel{\mathop{\mathchar
58\relax}}\mathop{\max}\limits_{\boldsymbol{\Theta}^{I},\\{\chi_{k}\\}}\sum^{K}_{k=1}\chi_{k}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_9},$
$\displaystyle\quad\quad\chi_{k}\geq 0,\quad\forall k\in\mathcal{K},$ (27a)
$\displaystyle\quad\quad\sum^{m}_{m=1}\alpha_{k,m}B\log_{2}\bigg{[}1+\frac{p_{k,m}|C_{k,m}(\boldsymbol{\Theta}^{I})|^{2}}{\Gamma\sigma^{2}}\bigg{]}\geq\frac{L_{k}-\frac{(1-\hat{\tau})Tf_{k}}{c_{k}}}{(1-\hat{\tau})T}+\chi_{k},\quad\forall
k\in\mathcal{K}.$ (27b)

Constraint (27b) is non-convex regarding $\boldsymbol{\Theta}^{I}$. To address
this issue, firstly we transform Problem $\mathcal{P}3\text{-}1b$ to its
equivalent form, by introducing a set of auxiliary variables
$\boldsymbol{y}^{I}$, $\boldsymbol{a}^{I}$ and $\boldsymbol{b}^{I}$

$\displaystyle\mathcal{P}3\text{-}1bE1\mathrel{\mathop{\mathchar
58\relax}}\mathop{\max}\limits_{\boldsymbol{\Theta}^{I},\\{\chi_{k}\\},\boldsymbol{y}^{I},\boldsymbol{a}^{I},\boldsymbol{b}^{I}}\sum^{K}_{k=1}\chi_{k}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_9},\eqref{eqn:P3_2'_constraint_3},$
$\displaystyle\quad\quad\sum^{m}_{m=1}\alpha_{k,m}B\log_{2}\bigg{(}1+\frac{p_{k,m}y^{I}_{k,m}}{\Gamma\sigma^{2}}\bigg{)}\geq\frac{L_{k}-\frac{(1-\hat{\tau})Tf_{k}}{c_{k}}}{(1-\hat{\tau})T}+\chi_{k},\quad\forall
k\in\mathcal{K},$ (28a) $\displaystyle\quad\quad
a^{I}_{k,m}=\Re\big{\\{}\boldsymbol{f}^{H}_{m}\boldsymbol{h}^{d}_{k}+\boldsymbol{f}^{H}_{m}\boldsymbol{V}_{k}\boldsymbol{\Theta}^{I}\big{\\}},\quad
k\in\mathcal{K},\quad m\in\mathcal{M},$ (28b) $\displaystyle\quad\quad
b^{I}_{k,m}=\Im\big{\\{}\boldsymbol{f}^{H}_{m}\boldsymbol{h}^{d}_{k}+\boldsymbol{f}^{H}_{m}\boldsymbol{V}_{k}\boldsymbol{\Theta}^{I}\big{\\}},\quad
k\in\mathcal{K},\quad m\in\mathcal{M},$ (28c) $\displaystyle\quad\quad
y^{I}_{k,m}=(a^{I}_{k,m})^{2}+(b^{I}_{k,m})^{2},\quad k\in\mathcal{K},\quad
m\in\mathcal{M}.$ (28d)

Then, upon invoking the so-called SCA method as detailed in Section III-B2, we
approach the locally optimal solution by solving the problem below in a
successive manner

$\displaystyle\mathcal{P}3\text{-}1bE2\mathrel{\mathop{\mathchar
58\relax}}\mathop{\max}\limits_{\boldsymbol{\Theta}^{I},\\{\chi_{k}\\}}\sum^{K}_{k=1}\chi_{k}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_9},\eqref{eqn:P3_2'_constraint_3},\eqref{eqn:P3_2'E1_constraint_2},\eqref{eqn:P3_2'E1_constraint_6},\eqref{eqn:P3_2'E1_constraint_7},$
$\displaystyle\quad\quad
y^{I}_{k,m}=\tilde{a}^{I}_{k,m}(2a^{I}_{k,m}-\tilde{a}^{I}_{k,m})+\tilde{b}^{I}_{k,m}(2b^{I}_{k,m}-\tilde{b}^{I}_{k,m}),\quad
k\in\mathcal{K},\quad m\in\mathcal{M}.$ (29a)

Problem $\mathcal{P}3\text{-}1bE2$ is a convex optimization problem, which can
be readily solved with the aid of the software of CVX [41]. The computational
complexity is the same as that given in Section III-B2. Note that the
optimization of $\\{\boldsymbol{\alpha}_{k}\\}$,
$\\{\boldsymbol{p}^{I}_{k}\\}$ and $\boldsymbol{\Theta}^{I}$ not only
contributes to reducing the OF of Problem $\mathcal{P}2$, but also leads to a
decreased OF of Problem $\mathcal{P}1$ by slacking its constraint (8a). Hence,
we may still reduce the OF of Problem $\mathcal{P}1$ by iteratively optimizing
the settings of the WET phase and the computing phase, even if
$\boldsymbol{f}$ reaches its maximum value.

####  III-C2 Design of CPU Frequencies

Given the settings of the sub-band-device association
$\\{\boldsymbol{\alpha}_{k}\\}$, the power allocation
$\\{\boldsymbol{p}^{I}_{k}\\}$ and the IRS reflection coefficient
$\boldsymbol{\Theta}^{I}$, Problem $\mathcal{P}3$ can be simplified as

$\displaystyle\mathcal{P}3\text{-}2\mathrel{\mathop{\mathchar
58\relax}}\mathop{\min}\limits_{\boldsymbol{f},\\{\boldsymbol{\alpha}_{k}\\},\\{\boldsymbol{p}^{I}_{k}\\},\boldsymbol{\Theta}^{I}}\vartheta\sum^{K}_{k=1}\bigg{[}L_{k}-\frac{(1-\hat{\tau})Tf_{k}}{c_{k}}\bigg{]}$
$\displaystyle\text{s.t.}\quad\eqref{eqn:P1_constraint_10},\eqref{eqn:P3_1_constraint_2}.$
(30a)

It can be seen that the OF of Problem $\mathcal{P}3\text{-}2$ decreases upon
increasing $\boldsymbol{f}$. Hence, upon denoting

$\displaystyle\hat{f}_{k}=\sqrt{\frac{\frac{E_{k}(\hat{\tau},\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E})}{(1-\hat{\tau})T}-\sum^{M}_{m=1}\alpha_{k,m}(p^{I}_{k,m}+p_{c})-\zeta_{k}}{\kappa}},$
(31)

the optimal $\boldsymbol{f}$ can be obtained as:

$\displaystyle f_{k}$ $\displaystyle=\begin{cases}0,&\quad\text{if
}\frac{E_{k}(\hat{\tau},\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E})}{(1-\hat{\tau})T}-\sum^{M}_{m=1}\alpha_{k,m}(p^{I}_{k,m}+p_{c})-\zeta_{k}<0,\\\
\hat{f}_{k},&\quad\text{if
}0\leq\frac{E_{k}(\hat{\tau},\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E})}{(1-\hat{\tau})T}-\sum^{M}_{m=1}\alpha_{k,m}(p^{I}_{k,m}+p_{c})-\zeta_{k}<\kappa
f_{max}^{2},\\\ f_{max},&\quad\text{if
}\frac{E_{k}(\hat{\tau},\boldsymbol{p}^{E},\boldsymbol{\Theta}^{E})}{(1-\hat{\tau})T}-\sum^{M}_{m=1}\alpha_{k,m}(p^{I}_{k,m}+p_{c})-\zeta_{k}\geq\kappa
f_{max}^{2}.\end{cases}$ (32)

The procedure of optimizing $\\{\boldsymbol{\alpha}_{k}\\}$,
$\\{\boldsymbol{p}^{I}_{k}\\}$, $\boldsymbol{\Theta}^{I}$ and $\boldsymbol{f}$
is summarized in Algorithm 4. To this end, it is readily to summarize the
algorithm solving Problem $\mathcal{P}1$ under a given $\hat{\tau}$ in
Algorithm 5, and an appropriate $\tau$ is found with the aid of numerical
results, as detailed in Section IV-A.

Algorithm 4 Alternative optimization of $\boldsymbol{f}$,
$\\{\boldsymbol{\alpha}_{k}\\}$, $\\{\boldsymbol{p}^{I}_{k}\\}$ and
$\boldsymbol{\Theta}^{I}$, given the settings of $\hat{\tau}$,
$\boldsymbol{p}^{E}$ and $\boldsymbol{\Theta}^{E}$

0: $t_{max}$, $\epsilon$, $K$, $M$, $N$, $T$, $\eta$, $c_{k}$, $\kappa$,
$f_{max}$, $p_{c}$, $\Gamma$, $L_{k}$, $\\{\boldsymbol{h}^{d}_{k}\\}$,
$\\{\boldsymbol{V}_{k}\\}$, $\hat{\tau}$, $\boldsymbol{P}^{E}$,
$\boldsymbol{\Theta}^{E}$, $\boldsymbol{f}$, and
$\tilde{\boldsymbol{\Theta}}^{I}$

0: $\\{\boldsymbol{\alpha}_{k}\\}$ $\\{\boldsymbol{p}^{I}_{k}\\}$ and
$\boldsymbol{\Theta}^{I}$ 1\. Initialization

$\bullet$ Initialize $t_{4}=0$; $\epsilon_{4}=1$;
${\boldsymbol{\Theta}^{I}}^{(0)}=\tilde{\boldsymbol{\Theta}}^{I}$

$\bullet$ Given ${\boldsymbol{\Theta}^{I}}^{(0)}$, find
$\\{\boldsymbol{\alpha}_{k}\\}^{(0)}$ and $\\{\boldsymbol{p}^{I}_{k}\\}^{(0)}$
by solving Problem $\mathcal{P}3\text{-}1a$ via Algorithm 3

$\bullet$ Obtain $\boldsymbol{f}^{(0)}$ via (32) and calculate
$\text{obj}\big{(}\boldsymbol{f}^{(0)}\big{)}$ 2\. Alternative optimization of
$\boldsymbol{f}$, $\\{\boldsymbol{\alpha}_{k}\\}$,
$\\{\boldsymbol{p}^{I}_{k}\\}$ and $\boldsymbol{\Theta}^{I}$

while $t_{4}<t_{\text{max}}$ $\&\&$ $\epsilon_{4}>\epsilon$ do

$\bullet$ Given $\\{\boldsymbol{\alpha}_{k}\\}^{(t_{4})}$,
$\\{\boldsymbol{p}^{I}_{k}\\}^{(t_{4})}$ and
$\tilde{\boldsymbol{\Theta}}^{I}={\boldsymbol{\Theta}^{I}}^{(t_{4})}$, find
${\boldsymbol{\Theta}^{I}}^{(t_{4}+1)}$ by solving Problem
$\mathcal{P}3\text{-}1bE1$ via Algorithm 1

$\bullet$ Given ${\boldsymbol{\Theta}^{I}}^{(t_{4}+1)}$, find
$\\{\boldsymbol{\alpha}_{k}\\}^{(t_{4}+1)}$ and
$\\{\boldsymbol{p}^{I}_{k}\\}^{(t_{4}+1)}$ by solving Problem
$\mathcal{P}3\text{-}1a$ via Algorithm 3

$\bullet$ Obtain $\boldsymbol{f}^{(t_{4}+1)}$ via (32) and calculate
$\text{obj}\big{(}\boldsymbol{f}^{(t_{4}+1)}\big{)}$

$\bullet$ Set
$\epsilon_{4}=\frac{\big{|}\text{obj}\big{(}\boldsymbol{f}^{(t_{4}+1)}\big{)}-\text{obj}\big{(}\boldsymbol{f}^{(t_{4})}\big{)}\big{|}}{\big{|}\text{obj}\big{(}\boldsymbol{f}^{(t_{4}+1)}\big{)}\big{|}}$,
$t_{4}\leftarrow t_{4}+1$

end while3. Output optimal $\\{\boldsymbol{\alpha}_{k}\\}^{*}$
$\\{\boldsymbol{p}^{I}_{k}\\}^{*}$ and ${\boldsymbol{\Theta}^{I}}^{*}$

$\\{\boldsymbol{\alpha}_{k}\\}^{*}\leftarrow\\{\boldsymbol{\alpha}_{k}\\}^{(t_{4})}$,
$\\{\boldsymbol{p}^{I}_{k}\\}^{*}\leftarrow\\{\boldsymbol{p}^{I}_{k}\\}^{(t_{4})}$
and
${\boldsymbol{\Theta}^{I}}^{*}\leftarrow{\boldsymbol{\Theta}^{I}}^{(t_{4})}$

Algorithm 5 Alternative optimization of the WET and computing phases, given
the time allocation

0: $t_{max}$, $\epsilon$, $K$, $M$, $N$, $T$, $\eta$, $c_{k}$, $\kappa$,
$f_{max}$, $p_{c}$, $\Gamma$, $L_{k}$, $\\{\boldsymbol{h}^{d}_{k}\\}$,
$\\{\boldsymbol{V}_{k}\\}$ and $\hat{\tau}$

0: $\boldsymbol{P}^{E}$, $\boldsymbol{\Theta}^{E}$, $\boldsymbol{f}$,
$\\{\boldsymbol{\alpha}_{k}\\}$ $\\{\boldsymbol{p}^{I}_{k}\\}$ and
$\boldsymbol{\Theta}^{I}$ 1\. Initialization

$\bullet$ Initialize $t_{5}=0$; $\epsilon_{5}=1$;
$\tilde{\boldsymbol{\Theta}}^{E}$

$\bullet$ Initialize $\boldsymbol{f}^{(0)}$,
$\\{\boldsymbol{\alpha}_{k}\\}^{(0)}$, $\\{\boldsymbol{p}^{I}_{k}\\}^{(0)}$
and ${\boldsymbol{\Theta}^{I}}^{(0)}$ following Section III-A

$\bullet$ Given $\boldsymbol{f}^{(0)}$, $\\{\boldsymbol{\alpha}_{k}\\}^{(0)}$,
$\\{\boldsymbol{p}^{I}_{k}\\}^{(0)}$ and ${\boldsymbol{\Theta}^{I}}^{(0)}$,
find ${\boldsymbol{P}^{E}}^{(0)}$ and ${\boldsymbol{\Theta}^{E}}^{(0)}$ by
solving Problem $\mathcal{P}2$ via Algorithm 2 2\. Alternative optimization of
$\boldsymbol{P}^{E}$, $\boldsymbol{\Theta}^{E}$, $\boldsymbol{f}$,
$\\{\boldsymbol{\alpha}_{k}\\}$ $\\{\boldsymbol{p}^{I}_{k}\\}$ and
$\boldsymbol{\Theta}^{I}$

while $t_{5}<t_{\text{max}}$ $\&\&$ $\epsilon_{5}>\epsilon$ do

$\bullet$ Given ${\boldsymbol{P}^{E}}^{(t_{5})}$,
${\boldsymbol{\Theta}^{E}}^{(t_{5})}$ and
$\tilde{\boldsymbol{\Theta}}^{I}={\boldsymbol{\Theta}^{I}}^{(t_{5})}$, find
$\boldsymbol{f}^{(t_{5}+1)}$, $\\{\boldsymbol{\alpha}_{k}\\}^{(t_{5}+1)}$,
$\\{\boldsymbol{p}^{I}_{k}\\}^{(t_{5}+1)}$ and
${\boldsymbol{\Theta}^{I}}^{(t_{5}+1)}$ by solving Problem $\mathcal{P}3$
using Algorithm 4

$\bullet$ Given $\boldsymbol{f}^{(t_{5}+1)}$,
$\\{\boldsymbol{\alpha}_{k}\\}^{(t_{5}+1)}$,
$\\{\boldsymbol{p}^{I}_{k}\\}^{(t_{5}+1)}$,
${\boldsymbol{\Theta}^{I}}^{(t_{5}+1)}$ and
$\tilde{\boldsymbol{\Theta}}^{E}={\boldsymbol{\Theta}^{E}}^{(t_{5})}$, find
${\boldsymbol{P}^{E}}^{(t_{5}+1)}$ and ${\boldsymbol{\Theta}^{E}}^{(t_{5}+1)}$
by solving Problem $\mathcal{P}2$ via Algorithm 2

$\bullet$ Set
$\epsilon_{5}=\frac{\big{|}\text{obj}^{(t_{5}+1)}-\text{obj}^{(t_{5})}\big{|}}{\big{|}\text{obj}^{(t_{5}+1)}\big{|}}$,
$t_{5}\leftarrow t_{5}+1$

end while3. Output optimal ${\boldsymbol{P}^{E}}^{*}$,
${\boldsymbol{\Theta}^{E}}^{*}$, $\boldsymbol{f}^{*}$,
$\\{\boldsymbol{\alpha}_{k}\\}^{*}$ $\\{\boldsymbol{p}^{I}_{k}\\}^{*}$ and
${\boldsymbol{\Theta}^{I}}^{*}$

${\boldsymbol{P}^{E}}^{*}\leftarrow{\boldsymbol{P}^{E}}^{(t_{5})}$,
${\boldsymbol{\Theta}^{E}}^{*}\leftarrow{\boldsymbol{\Theta}^{E}}^{(t_{5})}$,
$\boldsymbol{f}^{*}\leftarrow\boldsymbol{f}^{(t_{5})}$,
$\\{\boldsymbol{\alpha}_{k}\\}^{*}\leftarrow\\{\boldsymbol{\alpha}_{k}\\}^{(t_{5})}$,
$\\{\boldsymbol{p}^{I}_{k}\\}^{*}\leftarrow\\{\boldsymbol{p}^{I}_{k}\\}^{(t_{5})}$
and
${\boldsymbol{\Theta}^{I}}^{*}\leftarrow{\boldsymbol{\Theta}^{I}}^{(t_{5})}$

##  IV Numerical Results

In this section, we present the pertinent numerical results, for evaluating
the performance of our proposed IRS-aided WP-MEC design. A top view of the
HAP, of the wireless devices and of the IRS are shown in Fig. 3, where the
HAP’s coverage radius is $R$ and the IRS is deployed at the cell edge. The
locations of wireless devices are assumed to obey the uniform distribution
within a circle, whose radius and locations are specified by $r$ as well as
$d_{1}$ and $d_{2}$, respectively. Their default settings are specified in the
block of “System model” in Table I. The efficiency of the energy harvesting
$\eta$ is set as $0.5$. As for the communications channel, we consider both
the small-scale fading and the large-scale path loss. More explicitly, the
small-scale fading is assumed to be independent and identically distributed
(i.i.d.) and obey the complex Gaussian distribution associated with zero mean
and unit variance, while the path loss in $\rm{dB}$ is given by

$\displaystyle\text{PL}=\text{PL}_{0}-10\beta\log_{10}\big{(}\frac{d}{d_{0}}\big{)},$
(33)

where $\text{PL}_{0}$ is the path loss at the reference distance $d_{0}$;
$\beta$ and $d$ denote the path loss exponent of and the distance of the
communication link, respectively. Here we use $\beta_{ua}$, $\beta_{ui}$ and
$\beta_{ia}$ to represent the path loss exponent of the links between the
wireless devices and the HAP, between the wireless devices and the IRS, as
well as between the IRS and the HAP, respectively111We assume that the channel
of the direct link between the HAP and devices is hostile (due to an
obstruction), while this obstruction can be partially avoided by the IRS-
reflection link. Hence, we set a higher value for $\beta_{ua}$.. Furthermore,
the additive while Gaussian noise associated with zero mean and the variable
of $\sigma^{2}$ is imposed both on the energy signals and on the offloading
signals. The default values of the parameters are set in the block of
“Communications model” in Table I. As for the computing model, the variables
of $L_{k}$ and $c_{k}$ are assumed to obey the uniform distribution. The
offloaded tasks are assumed to be computed in parallel by a large number of
CPUs at the edge computing node, where the computing capability of each CPU is
$f_{e}=10^{9}\leavevmode\nobreak\ \rm{cycle/s}$. Then, the energy consumption
at the edge for processing the offloaded computational tasks can be calculated
as $\vartheta=c\kappa f_{e}^{2}=5\times 10^{-8}\leavevmode\nobreak\
\rm{Joule/bit}$.

Figure 3: An illustration of the locations of the HAP, of devices and of the IRS in the IRS-aided WP-MEC system. Table I: Default simulation parameter setting Description | Parameter and Value
---|---
System model [27] |  $M=16$, $N=30$, $K=3$, $T=10\leavevmode\nobreak\ \rm{ms}$
$R=12\leavevmode\nobreak\ \rm{m}$, $d_{1}=11\leavevmode\nobreak\ \rm{m}$,
$d_{2}=1\leavevmode\nobreak\ \rm{m}$, $r=1\leavevmode\nobreak\ \rm{m}$
Wireless energy transfer model | $\eta=0.5$
Communication model [33] | $B=312.5\leavevmode\nobreak\ \rm{KHz}$
$\text{PL}_{0}=30\leavevmode\nobreak\ \rm{dB}$, $d_{0}=1\leavevmode\nobreak\
\rm{m}$, $\beta_{ua}=3.5$, $\beta_{ui}=2.2$, $\beta_{ia}=2.2$
$L^{d}_{k}=4$, $L_{1}=2$, $L_{2,k}=3$
$\sigma^{2}=1.24\times 10^{-12}\leavevmode\nobreak\ \rm{mW}$, $\Gamma=2$
Computing model [5] | $L_{k}=[15,20]\leavevmode\nobreak\ \rm{Kbit}$
$c_{k}=[400,500]\leavevmode\nobreak\ \rm{cycle/bit}$
$f_{max}=1\times 10^{8}\leavevmode\nobreak\ \rm{cycle/s}$
|  $\kappa=10^{-28}$, $\vartheta=5\times 10^{-8}\leavevmode\nobreak\
\rm{Joule/bit}$
Convergence criterion | $\epsilon=0.001$

Apart from our algorithms developed in Section III, we also consider two
benchmark schemes for comparison. Let us describe these three schemes as
follows.

  * •

_With IRS_ : In this scheme, we optimize both the power allocation
$\boldsymbol{p}^{E}$ and the IRS reflection coefficients
$\boldsymbol{\Theta}^{E}$ at the WET phase, as well as the local CPU frequency
at devices $\boldsymbol{f}$, the sub-band-device association
$\\{\boldsymbol{\alpha}_{k}\\}$, the power allocation
$\\{\boldsymbol{p}_{k}\\}$ and the IRS reflection coefficients
$\boldsymbol{\Theta}^{I}$ at the computing phase, relying on Algorithm 5.

  * •

_RandPhase_ : The power allocation $\boldsymbol{p}^{E}$ at the WET phase, as
well as the local CPU frequency at devices $\boldsymbol{f}$, the sub-band-
device association $\\{\boldsymbol{\alpha}_{k}\\}$ and the power allocation
$\\{\boldsymbol{p}_{k}\\}$ at the computing phase are optimized with the aid
of Algorithm 5, while we skip the design of the IRS reflection coefficients
$\boldsymbol{\Theta}^{E}$ and $\boldsymbol{\Theta}^{I}$, whose amplitude
response is set to $1$ and phase shifts are randomly set in the range of
$[0,2\pi)$ obeying the uniform distribution.

  * •

_Without IRS_ : The composite channel
$\boldsymbol{f}^{H}_{m}\boldsymbol{V}_{k}\boldsymbol{\Theta}$ is set to $0$
both for the WET and for the computation offloading. The power allocation
$\boldsymbol{p}^{E}$ at the WET phase, as well as the local CPU frequency at
devices $\boldsymbol{f}$, the sub-band-device association
$\\{\boldsymbol{\alpha}_{k}\\}$ and the power allocation
$\\{\boldsymbol{p}_{k}\\}$ at the computing phase are optimized with the aid
of Algorithm 5, while we skip the optimization of the IRS reflection
coefficient $\boldsymbol{\Theta}^{E}$ and $\boldsymbol{\Theta}^{I}$.

Let us continue by presenting the selection of the time allocation, sub-band
allocation in the WET and the computing phases, as well as the impact of
diverse environment settings, as follows.

###  IV-A Selection of the Time Allocation

Figure 4: Simulation results of the total energy consumption versus the time
allocation $\tau$. The parameter settings are specified in Table I.

In order to find an appropriate time allocation for our WP-MEC system, we
depict the total energy consumption (the OF of Problem $\mathcal{P}1$) versus
the the time allocation $\tau$ in Fig. 4. It can be seen that the total energy
consumption becomes higher upon increasing $\tau$ for all these three schemes
considered. The reason behind it is explained as follows. For a given volume
of the computational task to be offloaded within the time duration of $T$, an
increase of $\tau$ implies a higher offloading rate required by computation
offloading, while at a glance of (5), the computation offloading rate is
formulated as a logarithmic function of the offloading power. Hence, we have
to largely increase the transmit power of computation offloading for providing
the extra offloading rate required by the increase of $\tau$, which results in
a higher energy consumption at the wireless devices. Furthermore, since the
energy required by WET is determined by the energy consumption at the wireless
devices, the total energy consumption becomes higher upon increasing $\tau$.
Based on this discussion, it seems that we should select the value of $\tau$
as small as possible. However, this may lead to an upsurge of the power
consumption for WET, which might exceed the maximum allowable transmit power
at the HAP. Therefore, as a compromise, for the environment associated with
the default settings we select $\tau=0.1$, beyond which the total energy
consumption becomes increasingly higher along with $\tau$.

###  IV-B Joint Sub-Band and Power Allocation in the WET and Computing Phases

(a)

(b)

(c)

(d)

Figure 5: Joint sub-band and of power allocation for the WET and the computing
phases, relying on the Algorithm 5, where the number of bits to be processed
is set the same as $20\leavevmode\nobreak\ \rm{Kbits}$ for the three wireless
devices. (a) The channel gain at the WET phase; (b) The joint sub-band and
power allocation at the WET phase; (3) The channel gain at the computing
phase; (d) The joint sub-band and power allocation at the computing phase. The
parameter settings are specified in Table I.

Fig. 5 illustrates the channel gain as well as the joint sub-band and power
allocation both for the WET and computing phases. Our observations are as
follows. Firstly, as shown in Fig. 5b, only the $5$-th sub-band is activated
for WET. This allocation is jointly determined by the power consumption of the
computing phase and by the channel gain in the WET phase. Specifically, with
the reference of Fig. 5d, Device 3 requires the highest power consumption for
computation offloading. Given that the overall performance is dominated by the
device having the highest energy consumption, we may reduce the energy
consumption of WET, by activating the sub-band associated with the highest
channel gain of Device 3, which is the $5$-th sub-band as shown in Fig. 5a.
Secondly, with the reference of Fig. 5c, it can be observed that the power
allocation in Fig. 5d obeys the water-filling principle for each device, i.e.
allocating a higher power to the sub-band possessing a high channel gain. This
corresponds to the power allocation obtained in (21). Thirdly, comparing Fig.
5a and Fig. 5c, we can see that the channel gains in the WET and computing
phase are different for each device after we optimize the IRS reflection
coefficients, which consolidates our motivation to conceive separate IRS
designs for the WET and the computing phases.

###  IV-C Performance of the Proposed Algorithms

In order to evaluate the benefits of employing an IRS in WP-MEC systems, we
compare the performance of our proposed algorithms with that of the benchmark
schemes, under various settings of the number of IRS reflection elements, of
the device location, of the path loss exponent of the IRS-related channel, and
of the energy consumption per bit at the edge, as follows.

####  IV-C1 Impact of the Number of IRS Reflection Elements

Figure 6: Simulation results of the total energy consumption versus the number
of IRS reflection elements $N$. The rest of parameters are specified in Table
I.

Figure 7: Simulation results of the total energy consumption versus the
distance between the HAP and the wireless device circle $d_{1}$. Other
parameters are set in Table I.

Fig. 6 shows the simulation results of the total energy consumption versus the
number of IRS reflection elements for the three schemes considered. We have
the following observations. Firstly, the performance gap between the scheme
“Without IRS” and the scheme “IRS RandPhase” increases along with $N$, which
implies that the IRS is capable of assisting the energy consumption reduction
in the WP-MEC system, even without carefully designing the IRS reflection
coefficients. This is due to the so-called virtual array gain induced by the
IRS, as mentioned in Section I. Secondly, the scheme “With IRS” outperforms
the scheme “IRS RandPhase”, which indicates that our sophisticated design of
IRS reflection coefficients may provide the so-called passive beamforming gain
for computation offloading. Note that different from the conventional MEC
systems [38] where WET is not employed, these two types of gain are exploited
twice in WP-MEC systems (during the WET and computing phases, respectively).
As such, IRSs are capable of efficiently reducing the energy consumption in
WP-MEC systems.

####  IV-C2 Impact of the Distance between the Device Circle and the IRS

Fig. 7 presents the simulation results of the total energy consumption versus
the distance between the HAP and the mobile wireless circles. Our observations
are as follows. Firstly, the two IRS-aided schemes do not show any visible
advantage over the scheme of “Without IRS” when we have
$d_{1}<6\leavevmode\nobreak\ \rm{m}$, which indicates that each IRS has a
limited coverage. Secondly, the benefit of deploying the IRS is becomes
visible at $d_{1}>9\leavevmode\nobreak\ \rm{m}$ in the scheme of “IRS
RandPhase”, while the advantage of the “With IRS” scheme is already notable at
$d_{1}=7\leavevmode\nobreak\ \rm{m}$. This observation implies that our
sophisticated design of IRS reflection coefficient is capable of extending the
coverage of IRS.

Figure 8: Simulation results of the total energy consumption versus the path
loss exponent of the IRS reflection link $\beta$, where we set
$\beta_{ui}=\beta_{ia}=\beta$. Other parameters are set in Table I.

Figure 9: Simulation results of the total energy consumption versus the energy
consumption per bit at the edge. Other parameters are set in Table I.

####  IV-C3 Impact of Path Loss Exponent

Fig. 8 depicts the simulation results of the total energy consumption versus
the path loss exponent of the IRS related links. It can be seen that the total
energy consumption decreases if a higher path loss exponent is encountered,
which is because a higher $\beta$ leads to a lower channel gain of the IRS-
reflected link. This observation provides an important engineering insight:
the locations of IRSs should be carefully selected for avoiding obstacles.

####  IV-C4 Impact of energy consumption at the edge

Fig. 9 shows the simulation results of the total energy consumption versus the
energy consumption per bit at the edge node. It can be observed that the
advantage of deploying IRS is eminent when we have a small value of
$\vartheta$, while the benefit becomes smaller upon increasing the value of
$\vartheta$. The reason is explained as follows. The OF of Problem
$\mathcal{P}1$ is the combination of the energy consumption of WET and of
processing the offloaded computational tasks. If the energy consumption per
bit at the edge node is of a small value, the energy consumption of WET plays
a dominant role in the total energy consumption. In this case, the benefit of
employing IRS is significant. By contrast, if $\vartheta$ becomes higher, the
total energy consumption is dominated by that at the edge. In this case,
although the energy consumption of WET can be degraded by deploying IRSs, this
reduction becomes marginal.

##  V Conclusions

To reduce the energy consumption of WP-MEC systems, we have proposed an IRS-
aided WP-MEC scheme and formulate an energy minimization problem. A
sophisticated algorithm has been developed for optimizing the settings both in
the WET and the computing phases. Our numerical results reveal the following
insights. Firstly, the employment of IRSs is capable of substantially reducing
the energy consumption of the WP-MEC system, especially when the IRS is
deployed in vicinity of wireless devices. Secondly, the energy consumption
decreases upon increasing the number of IRS reflection elements. Thirdly, the
locations of IRSs should be carefully selected for avoiding obstacles. These
results inspire us to conceive a computational rate maximization design for
the IRS-aided WP-MEC system as a future work.

## References

  * [1] L. Chettri and R. Bera, “A comprehensive survey on Internet of Things (IoT) toward 5G wireless systems,” IEEE Internet Things J., vol. 7, pp. 16–32, Jan 2020.
  * [2] H. Liu, F. Hu, S. Qu, Z. Li, and D. Li, “Multipoint wireless information and power transfer to maximize sum-throughput in WBAN with energy harvesting,” IEEE Internet Things J., vol. 6, pp. 7069–7078, Aug 2019.
  * [3] P. Saffari, A. Basaligheh, V. J. Sieben, and K. Moez, “An RF-powered wireless temperature sensor for harsh environment monitoring with non-intermittent operation,” IEEE Trans. Circuits and Systems I: Regular Papers, vol. 65, pp. 1529–1542, May 2018.
  * [4] C. You, K. Huang, and H. Chae, “Energy efficient mobile cloud computing powered by wireless energy transfer,” IEEE J. Sel. Areas Commun., vol. 34, pp. 1757–1771, May 2016.
  * [5] F. Wang, J. Xu, X. Wang, and S. Cui, “Joint offloading and computing optimization in wireless powered mobile-edge computing systems,” IEEE Trans. Wireless Commun., vol. 17, pp. 1784–1797, March 2018.
  * [6] S. Bi and Y. J. Zhang, “Computation rate maximization for wireless powered mobile-edge computing with binary computation offloading,” IEEE Trans. Wireless Commun., vol. 17, pp. 4177–4190, June 2018.
  * [7] J. Feng, Q. Pei, F. R. Yu, X. Chu, and B. Shang, “Computation offloading and resource allocation for wireless powered mobile edge computing with latency constraint,” IEEE Wireless Commun. Lett., vol. 8, pp. 1320–1323, Oct 2019.
  * [8] H. Wu, X. Lyu, and H. Tian, “Online optimization of wireless powered mobile-edge computing for heterogeneous industrial Internet of Things,” IEEE Internet Things J., vol. 6, pp. 9880–9892, Dec 2019.
  * [9] L. Huang, S. Bi, and Y. J. Zhang, “Deep reinforcement learning for online computation offloading in wireless powered mobile-edge computing networks,” IEEE Trans. Mobile Comput., 2019.
  * [10] X. Hu, K.-K. Wong, and K. Yang, “Wireless powered cooperation-assisted mobile edge computing,” IEEE Trans. Wireless Commun., vol. 17, pp. 2375–2388, April 2018.
  * [11] L. Ji and S. Guo, “Energy-efficient cooperative resource allocation in wireless powered mobile edge computing,” IEEE Internet Things J., vol. 6, pp. 4744–4754, June 2019.
  * [12] F. Zhou, Y. Wu, R. Q. Hu, and Y. Qian, “Computation rate maximization in UAV-enabled wireless-powered mobile-edge computing systems,” IEEE J. Sel. Areas in Commun., vol. 36, pp. 1927–1941, Sep. 2018.
  * [13] Y. Liu, K. Xiong, Q. Ni, P. Fan, and K. B. Letaief, “UAV-assisted wireless powered cooperative mobile edge computing: Joint offloading, cpu control and trajectory optimization,” IEEE Internet Things J., pp. 1–1, 2019.
  * [14] S. Bi, C. K. Ho, and R. Zhang, “Wireless powered communication: Opportunities and challenges,” IEEE Commun. Mag., vol. 53, pp. 117–125, April 2015.
  * [15] K. Huang and X. Zhou, “Cutting the last wires for mobile communications by microwave power transfer,” IEEE Commun. Mag., vol. 53, pp. 86–93, June 2015.
  * [16] D. Niyato, D. I. Kim, M. Maso, and Z. Han, “Wireless powered communication networks: Research directions and technological approaches,” IEEE Wireless Commun., vol. 24, pp. 88–97, June 2017.
  * [17] S. Barbarossa, S. Sardellitti, and P. Di Lorenzo, “Communicating while computing: Distributed mobile cloud computing over 5G heterogeneous networks,” IEEE Signal Process. Mag., vol. 31, pp. 45–55, June 2014.
  * [18] W. Shi, J. Cao, Q. Zhang, Y. Li, and L. Xu, “Edge computing: Vision and challenges,” IEEE Internet Things J., vol. 3, pp. 637–646, May 2016.
  * [19] Q. Wu and R. Zhang, “Towards smart and reconfigurable environment: Intelligent reflecting surface aided wireless network,” IEEE Commun. Mag., vol. 58, pp. 106–112, January 2020.
  * [20] E. Basar, M. Di Renzo, J. De Rosny, M. Debbah, M.-S. Alouini, and R. Zhang, “Wireless communications through reconfigurable intelligent surfaces,” IEEE Access, vol. 7, pp. 116753–116773, July 2019.
  * [21] M. Di Renzo, K. Ntontin, J. Song, F. Lazarakis, J. de Rosny, D.-T. Phan-Huy, O. Simeone, R. Zhang, M. Debbah, G. Lerosey, et al., “Reconfigurable intelligent surfaces vs. relaying: Differences, similarities, and performance comparison.” [Online]. Available: https://arxiv.org/abs/1908.08747.
  * [22] W. Tang, M. Z. Chen, X. Chen, J. Y. Dai, Y. Han, M. Di Renzo, Y. Zeng, S. Jin, Q. Cheng, and T. J. Cui, “Wireless communications with reconfigurable intelligent surface: Path loss modeling and experimental measurement.” [Online]. Available: https://arxiv.org/abs/1911.05326.
  * [23] Ö. Özdogan, E. Björnson, and E. G. Larsson, “Intelligent reflecting surfaces: Physics, propagation, and pathloss modeling,” IEEE Wireless Commun. Lett., 2019.
  * [24] Y. Han, W. Tang, S. Jin, C.-K. Wen, and X. Ma, “Large intelligent surface-assisted wireless communication exploiting statistical CSI,” IEEE Trans. Veh. Technol., vol. 68, pp. 8238–8242, Aug. 2019.
  * [25] B. Di, H. Zhang, L. Li, L. Song, Y. Li, and Z. Han, “Practical hybrid beamforming with limited-resolution phase shifters for reconfigurable intelligent surface based multi-user communications,” IEEE Trans. Veh. Technol., pp. 1–1, 2020.
  * [26] C. Hu and L. Dai, “Two-timescale channel estimation for reconfigurable intelligent surface aided wireless communications.” [Online]. Available: https://arxiv.org/abs/1912.07990.
  * [27] Y. Yang, B. Zheng, S. Zhang, and R. Zhang, “Intelligent reflecting surface meets OFDM: Protocol design and rate maximization.” [Online]. Available: https://arxiv.org/abs/1906.09956, 2019.
  * [28] Q. Wu and R. Zhang, “Intelligent reflecting surface enhanced wireless network via joint active and passive beamforming,” IEEE Trans. Wireless Commun., vol. 18, pp. 5394–5409, Nov. 2019.
  * [29] Q. Wu and R. Zhang, “Beamforming optimization for wireless network aided by intelligent reflecting surface with discrete phase shifts,” IEEE Trans. Commun., pp. 1–1, 2019.
  * [30] H. Guo, Y.-C. Liang, J. Chen, and E. G. Larsson, “Weighted sum-rate optimization for intelligent reflecting surface enhanced wireless networks.” [Online]. Available: https://arxiv.org/abs/1905.07920, 2019.
  * [31] G. Zhou, C. Pan, H. Ren, K. Wang, and A. Nallanathan, “A framework of robust transmission design for IRS-aided MISO communications with imperfect cascaded channels.” [Online]. Available: https://arxiv.org/abs/2001.07054, 2020.
  * [32] C. Pan, H. Ren, K. Wang, W. Xu, M. Elkashlan, A. Nallanathan, and L. Hanzo, “Intelligent reflecting surface for multicell MIMO communications.” [Online]. Available: https://arxiv.org/abs/1907.10864, 2019.
  * [33] Y. Yang, S. Zhang, and R. Zhang, “IRS-enhanced OFDMA: Joint resource allocation and passive beamforming optimization,” IEEE Wireless Commun. Lett., pp. 1–1, 2020.
  * [34] L. Dong and H. Wang, “Secure MIMO transmission via intelligent reflecting surface,” IEEE Wireless Commun. Lett., pp. 1–1, 2020.
  * [35] S. Hong, C. Pan, H. Ren, K. Wang, and A. Nallanathan, “Artificial-noise-aided secure MIMO wireless communications via intelligent reflecting surface.” [Online]. Available: https://arxiv.org/abs/2002.07063.
  * [36] C. Pan, H. Ren, K. Wang, M. Elkashlan, A. Nallanathan, J. Wang, and L. Hanzo, “Intelligent reflecting surface enhanced MIMO broadcasting for simultaneous wireless information and power transfer.” [Online]. Available: https://arxiv.org/abs/1908.04863.
  * [37] Y. Zheng, S. Bi, Y. J. Zhang, Z. Quan, and H. Wang, “Intelligent reflecting surface enhanced user cooperation in wireless powered communication networks,” IEEE Wireless Commun. Lett., pp. 1–1, 2020.
  * [38] T. Bai, C. Pan, Y. Deng, M. Elkashlan, A. Nallanathan, and L. Hanzo, “Latency minimization for intelligent reflecting surface aided mobile edge computing.” [Online]. Available: https://arxiv.org/abs/1910.07990.
  * [39] K. Seong, M. Mohseni, and J. M. Cioffi, “Optimal resource allocation for OFDMA downlink systems,” in Proc. IEEE International Symposium on Information Theory (ISIT), pp. 1394–1398, IEEE, 2006.
  * [40] Y. Wang, M. Sheng, X. Wang, L. Wang, and J. Li, “Mobile-edge computing: Partial computation offloading using dynamic voltage scaling,” IEEE Trans. Commun., vol. 64, pp. 4268–4282, Jan. 2016.
  * [41] M. Grant and S. Boyd, “CVX: Matlab software for disciplined convex programming, version 2.1.” http://cvxr.com/cvx, Mar. 2014.
  * [42] K.-Y. Wang, A. M.-C. So, T.-H. Chang, W.-K. Ma, and C.-Y. Chi, “Outage constrained robust transmit optimization for multiuser MISO downlinks: Tractable approximations by conic optimization,” IEEE Trans. Signal Process., vol. 62, pp. 5690–5705, Nov. 2014.
  * [43] M. Razaviyayn, Successive convex approximation: Analysis and applications.  PhD thesis, The University of Minnesota, 2014.
  * [44] C. Y. Wong, R. S. Cheng, K. B. Lataief, and R. D. Murch, “Multiuser OFDM with adaptive subcarrier, bit, and power allocation,” IEEE J. Sel. Areas Commun., vol. 17, pp. 1747–1758, Oct. 1999.
  * [45] S. Boyd and L. Vandenberghe, Convex optimization.  Cambridge University Press, 2004.