{'fraction_non_alphanumeric': 0.041186950441562425, 'fraction_numerical': 0.009444263519855941, 'mean_word_length': 4.63493091537133, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Joint Optimization of Uplink Power and Computational Resources in Mobile Edge Computing-Enabled Cell-Free Massive MIMO

The coupling of cell-free massive MIMO (CF-mMIMO) with Mobile Edge Computing (MEC) is investigated in this paper. A MEC-enabled CF-mMIMO architecture implementing a distributed user-centric approach both from the radio and the computational resource allocation perspective is proposed. An optimization problem for the joint allocation of uplink powers and remote computational resources is formulated, aimed at striking an optimal balance between the total uplink power consumption and the sum SE throughout the network, under power budget and latency constraints. In order to efficiently solve such a challenging non-convex problem, an iterative algorithm based on sequential convex programming is proposed, along with two approaches to priory assess the problem feasibility. Finally, a detailed performance comparison between the proposed MEC-enabled user-centric CF-mMIMO architecture and its network-centric (both centralized and distributed) counterpart, is provided. Numerical results reveal the effectiveness of the proposed joint optimization problem, under different AP selection strategies, and the natural suitability of CF-mMIMO in supporting computation-offloading applications with benefits over users' transmit power and energy consumption, the offloading latency experienced, and the total amount of allocated remote computational resources.


I. INTRODUCTION
The recent evolution of wireless networks has been characterized by an impressive growth not only of the amount of conveyed data traffic, but also of computationally-intensive applications with strict latency requirements for mobile devices. Applications such as online gaming, augmented reality and video image processing not only request extreme broadband connections, but devices. First studies on MEC assumed simplified system models by considering either singleuser systems [15]- [17] or interference-free multi-user systems [18], [19], focusing either on minimizing the energy consumption under delay constraints [20] or the remote computational time under energy consumption constraints [21]. Some of these works consider a binary computation offloading model, wherein each device executes its computational tasks either remotely or locally [15], [18]. Other studies, alternatively, assumed a more general partial computation offloading [16], [19] with only a fraction of computational tasks executed remotely. An integrated framework for computation offloading and interference management in wireless cellular networks with MEC was proposed in [22]. All these works assumed single-antenna mobile devices.
More recently, MEC has been studied in conjunction with MIMO technologies. As an example, [4] considers a multi-cell MIMO system served by an edge server in a centralized fashion, and formulates a total energy minimization problem while meeting the latency and minimum rate constraints. Similarly, the MEC solution proposed in [23] focuses on minimizing the maximum latency of all the devices in a cloud-radio access network (C-RAN) with MIMO technology, while [24] addresses the energy minimization problem accounting for imperfect channel state information (CSI) in a single-cell MIMO system. In [25] an optimal association of mobile users to MEC resources is devised for a multi-user MIMO system with C-RAN architecture.
In [26], a successive inner convexification framework to minimize the total transmit power of the devices under latency constraints is proposed. Several authors have also examined the coupling between MEC and massive MIMO. The work [27] proposes a low-complexity algorithm to jointly optimize the radio and computing resources for a massive MIMO-enabled heterogeneous network (HetNet) with MEC. Similarly, [20], [28] presented the effectiveness of employing massive MIMO for MEC, under zero-forcing combining, aiming at minimizing the maximum delay for offloading and computing among the devices. The paper [29], instead, considers a massive MIMO system operating at the millimeter-wave frequency bands underlying traditional wireless local area networks with MEC. A dynamic computation offloading in MEC for ultrareliable and low-latency communications at the millimeter-wave frequency bands is proposed in [30]. The main common conclusion of these works is that multiple users can simultaneously offload their computational tasks by leveraging the additional degrees-of-freedom provided by massive MIMO, and the offloading efficiency, as well as the energy saving of the mobile devices, grows with the number of antennas of the massive MIMO BS.
Finally, the performance of CF-mMIMO with MEC has been recently explored in [31]. This work studies a joint radio and computational resource allocation using queuing theory and stochastic geometry, by considering a random computation latency model. The system model in [31] consists of APs equipped with independent MEC servers, a CPU with a central MEC server (CS), and devices performing offloading either to the CS or to one of their serving APs, with some successful computing probability. Such a system implements a cell-free user-centric approach from the radio resource allocation viewpoint, but it does not from the MEC perspective.
Following on this track, we explore in this paper the potential benefits of jointly optimizing radio and computational resources in a CF-mMIMO system with user-centric MEC approach.

B. Contribution
Our technical contribution can be summarized as follows. • We propose a MEC-enabled CF-mMIMO architecture implementing a user-centric approach both from the radio and the computational resource allocation perspective. Unlike prior studies investigating computation-offloading implementations in distributed networks but operating in a centralized fashion [26], [27], [31], our model considers that users' computational tasks can be remotely executed in a distributed fashion at the MEC servers of properly selected APs and at the MEC server of the CPU.
• We formulate an optimization problem for jointly allocating users' transmit powers and the remote computational resources for offloading. Unlike prior works [20], [26], [27], [31] our novel formulation simultaneously minimizes the total uplink transmit power while maximizing the sum SE throughout the network, under latency and resource budget requirements.
This bi-objective optimization is handled by two weights whose values indirectly determine the effective latency of the offloading process experienced by the users.
• We devise a successive convex approximation (SCA) algorithm for efficiently solving our optimization problem that, unlike prior works, includes: (i) a bi-objective function (ii) the user-centric cooperation clustering framework; (iii) a distributed allocation of the computational resources; (iv) a general formulation for any combining scheme and arbitrary correlated fading channels.
• Two novel approaches to assess the feasibility of the considered optimization problem are presented. A first approach gives a rough assessment on the problem feasibility, but it permits to speed up the convergence of the proposed SCA algorithm by giving in input a set of (very likely) feasible uplink powers. A second approach provides a rigorous assessment on the problem feasibility, at the price of higher computational complexity.
• For benchmarking purposes, we extend our joint optimization strategy to a multi-cell colocated massive MIMO system, and to a distributed network-centric massive MIMO deployment. The latter constitutes a deterministic variant of the framework described in [31], wherein the task offloading model arbitrarily hinges on an offloading probability. In this paper, we propose a deterministic, heuristic task offloading model that accounts for the users' computational demands and MEC servers' available computing resources.
• We provide a comprehensive simulation campaign to highlight the performance improvements introduced by the proposed MEC-enabled CF-mMIMO system in terms of: (i) users' transmit power and energy consumption, (ii) offloading latency, and (iii) amount of allocated remote computational resources. Moreover, we investigate its performance under different strategies of AP on/off switching, for energy efficiency purposes at the server side.
• A further insight about the effectiveness of the proposed joint uplink power and computational resource allocation (JPCA) scheme is provided, by evaluating the interplay between energy consumption, allocated remote computational resources, and offloading latency.
The remainder of this paper is organized as follows. In Section II, we introduce the system model of CF-mMIMO, including the description of centralized uplink training and data transmission. In Section III we describe the computation-offloading and latency model, and the proposed JPCA strategy. Section IV is devoted to the presentation of benchmark architectures on which the JPCA is applied. Simulation results and discussions are provided in Section V, while the main findings of this work are discussed in Section VI.

II. SYSTEM MODEL
We consider a CF-mMIMO system operating in time-division duplexing (TDD) mode, and at sub-6 GHz frequency bands. A set of L APs, equipped with M antennas each, are geographically distributed and connected through a fronthaul network to a CPU. The APs coherently serve K single-antenna users in the same time-frequency resources, with LM ≫ K.
The conventional block-fading channel model is considered, and let τ c denote the channel coherence block length. In TDD mode, each coherence block accommodates uplink training, uplink and downlink data transmission, such that τ c = τ p +τ u +τ d , where τ p , τ u and τ d are the training duration, the uplink and the downlink data transmission duration, respectively.
Borrowing the notation of [14], the channel between the k-th user and the l-th AP is denoted by the M-dimensional vector h lk , with h lk ∼ CN (0, R lk ), and R lk ∈ C M ×M being the spatial correlation matrix. The corresponding large-scale fading coefficient is defined as β lk = tr(R lk )/M. The channel between the k-th user and all the APs in the system is obtained by stacking the channel The channel vectors of different APs are reasonably assumed to be independently distributed. As a consequence, we have h k ∼ CN (0, R k ), where R k = diag(R 1k , . . . , R Lk ) ∈ C M L×M L is the block-diagonal spatial correlation matrix of user k.

A. Centralized Uplink Training
During the uplink training all the K users synchronously send a pre-determined pilot sequence whose length in samples is denoted by τ p . The pilot sequences are drawn by a set of τ p orthonormal vectors. Specifically, √ τ p ϕ k ∈ C τp denotes the pilot sent by the k-th user, with ϕ k = 1. Whenever K is larger than τ p , the same pilot must be assigned to more than one user, causing pilot contamination. The pilot signal observed by AP l is where p p,j is the transmit power of the uplink pilot symbol, and Ω p,l is a matrix of additive noise whose elements are independently distributed as CN (0, σ 2 ). For any user k, the l-th AP projects Y p,l along the k-th pilot sequence, which yields: where the second term captures the interference due to pilot contamination. Assuming that the channel estimation is performed by the CPU, in each coherence interval, each AP needs to send the vector y p lk to the CPU. Upon a prior knowledge of the channel correlation matrices, the CPU performs linear minimum-mean square error (MMSE) estimation of the k-th user channel The estimation error is independent of the estimate, and given byh lk = h lk −ĥ lk . It is distributed ash lk ∼ CN (0, C lk ), with Hence, all the channel estimates for a specific user k are collected in the vectorĥ

B. User-Centric Uplink Data Transmission
In a practical and scalable user-centric implementation, each user is not served by all the APs in the network, but rather by a limited number of APs selected among those ensuring the best channel conditions. This AP-to-user association is performed by the CPU, and can be mathematically handled by a set of auxiliary diagonal matrices D lk ∈ C M ×M , ∀l, ∀k. Specifically, D lk = I M , if AP l serves user k, and D lk = 0 M , if AP l does not serve user k. This user-centric approach has two main implications: (i) the estimates needed at the CPU to design the receive combining vectors are limited to D kĥk , with D k =diag(D 1k , . . . , D Lk ) being a block-diagonal matrix; (ii) the uplink signals needed at the CPU for data decoding are limited to D k y, with y being the vector collecting the uplink data signals sent by all the APs to the CPU. Letŝ k be the estimate of the transmitted data symbol s k , computed by the CPU through the processinĝ where v lk ∈ C M is the receive combining vector intended for the link between AP l and user k, The uplink data signal received by AP l is y l = K i=1 h li s i +n l , with E {|s i | 2 } = p i , ∀i, and n l ∼ CN (0, σ 2 I M ) being the additive noise vector. While, y = [y T 1 · · · y T L ] T ∈ C M L . Hence, eq. (1) can be rewritten aŝ with n = [n T 1 · · · n T L ] T ∈ C M L being the collective noise vector. The first term in (2) represents the desired signal over the known partially estimated channel, the second term represents the self-interference due to the (unknown) channel estimation error, the third term is the multi-user interference, and, lastly, the fourth term is the noise. An achievable uplink SE (bit/s/Hz) for user k, with centralized operation, is well-known to be obtained by treating the last three terms as uncorrelated noise at the receiver: This achievable SE holds for any combining scheme and arbitrary correlated fading channels, and accounts for user-centric data detection, channel estimation error, pilot contamination and estimation overhead.
As to the collective combining vector v k , we will adopt, with no loss of generality, the so-called Partial MMSE (P-MMSE) combining [14]. This scheme reduces the computational complexity (which becomes independent of K) by taking into account only the interference contributions caused by other users located in its vicinity, and which are presumably served by partially the same subset of APs. Hence, for an arbitrary user k, P-MMSE considers only the interference contributions caused by the users whose indices are in the set S k = {i : D k D i = 0 LM }. The collective P-MMSE combining vector is thus given by

III. COMPUTATION-OFFLOADING AND LATENCY MODEL
We assume that both the APs and the CPU offer computational facility to the users. Each user has a set of computational tasks to offload to multiple distributed MEC servers of its serving APs and/or to the MEC server at the CPU. We assume that user k needs to execute w k CPU cycles over b k computation bits, and within a maximum tolerable latency L k . AP l has a computational capability of f AP  and where K l is the set including the indices of the users served by AP l. Let f k be the total computational resources assigned to user k, given by f k = f CPU k + l∈M k f AP l,k , with M k being the set including the indices of the APs serving user k. Then, w k /f k represents the computational time needed to execute w k cycles at the APs and the CPU (computational latency). While, the amount b k /R k is the time needed to transmit b k bits to the APs (transmission latency), over the wireless channel supporting a rate R k = B × SE k , with B being the transmission bandwidth and SE k being the instantaneous SE, i.e., the value attained by (3) with no expectation. Lastly, an additional latency contribution (fronthaul latency) is due to the forwarding of the b k bits from all the APs in the set M k to the CPU, over the fronthaul network, which, assuming synchronous transmission across the APs, amounts to 2b k Mξ/C FH , where ξ denotes the number of bits used to quantize both real and imaginary parts of the uplink data signal y, and C FH is the fronthaul capacity of the link between any AP and the CPU, expressed in bit/s. Hence, the computational offloading must fulfill the following latency constraint [26] b where we assume that L k includes any delay related to the signalling between AP and CPU, and the time needed to send the computational output back to the user. Fig. 1 illustrates the signalling diagram of the computational offloading process for an arbitrary user k. As a first step, user k sends a computational offloading request followed by the symbols encoding the program to be executed remotely. Then, all the APs serving user k, that is the APs in the set M k , forward these uplink signals, over the fronthaul network, to the CPU for centralized receive combining and data decoding. The CPU, according to its available computational resources, executes the offloaded computational task either totally or partially. In the latter case, the CPU sends to the APs in the set M k a computational support request accompanied by the batch jobs (a fraction of the w k CPU cycles) to be executed in a distributed fashion. 2 The allocation of the computational resources between CPU and APs is subject to optimization whose characterization is detailed in the next section. Once received the computational output of each batch job from the APs, the CPU sends the combined computational output back to the APs in the set M k , which finally perform a joint data transmission to user k.

A. Joint Power and Computational Resource Allocation (JPCA)
We aim to jointly optimize the users' transmit powers and the computational resources assigned to the users, in order to minimize the total uplink transmit power while maximizing the sum SE throughout the network. This optimization problem can be formulated as where L k = L k −(2b k Mξ/C FH ), p max is the maximum transmit power per user, and ν k represents the minimum instantaneous SE target for user k. Moreover, we define the following weights where k } are constants denoting reference instantaneous SEs attained by a pre-determined uplink power allocation (e.g., setting p k = p max , ∀k) and ω p , ω se ∈ [0, 1] so that each term of the objective function (7a) is dimensionless and takes on values in the interval [0, 1]. These weights strike a balance between the minimization of the total power consumption and the maximization of the sum spectral efficiency, hence they indirectly act over the effective offloading latency, which is given by the r.h.s. of the constraint (7b). As compared to prior works such as [20], [26], [27], [31], this problem formulation is novel thanks to its peculiar bi-objective function. Other than simultaneously optimizing the total uplink transmit power and the sum SE, the effective offloading latency can be tuned by properly selecting ω p , ω se . Also, this formulation accounts for: (i) the user-centric cooperation clustering framework; (ii) a distributed allocation of the computational resources; (iii) any combining scheme and arbitrary correlated fading channels.
Problem (7) is clearly non-convex with respect to {p k } due to the non-convexity (nonconcavity) of the latency constraint (7b) and the minimum SE constraint (7c). Moreover, the coupling between the uplink transmit powers renders this problem difficult to solve. We resort to sequential convex programming, that is an iterative optimization framework wherein in each iteration we optimize a related convex approximation of the original problem. Specifically, letting p = [p 1 · · · p K ] T , notice that the uplink instantaneous SE for user k can be expressed as where num k (p) and den k (p) describe the numerator and the denominator of (4), respectively, which are functions of the power coefficients. As log 2 (·) is increasing and the summation preserves concavity, the r.h.s. of (9) is the difference of two concave functions. Recalling that any concave function is upper-bounded by its Taylor expansion around any given point p (0) , a concave lower-bound of SE k (p) is obtained as Hence, the latency constraint (7b) and the minimum SE constraint in (7c) are approximated and Algorithm 1 SCA algorithm for Problem (7) Input: Any choice of feasible transmit powers p (0) ; 1: Initialize n ← 1; 2: repeat 3: Let p ⋆ , f ⋆ the optimal solutions of problem (12); 4: , 1} K+KL being a fixed binary vector determined by the user-centric setup.
with all its antennas or 0 otherwise. The vectorb k can be easily constructed upon D lk aŝ Hence, the optimization problem at the n-th iteration of the proposed SCA method can be formulated as where ν = [ν 1 · · · ν K ] T , ̟ p and ̟ se are defined as in (8) with SE , ∀k, and the constraint (12g) is the continuous relaxation of the constraint f (n) ∈ Z K+KL >0 (the real-valued entries of the optimal f are then rounded). Algorithm 1, to be run at the CPU, summarizes the proposed SCA method solving problem (7). For any iteration n of the SCA method, SE k (p (n) , p (n−1) ) is a suitable convex approximation of SE k (p (n) ), as the following properties are fulfilled [32]: where p (n−1) is the optimal solution to problem (12) at the iteration n − 1. According to the theory in [32], by virtue of the properties (13a), (13b), the sequence consisting of the objective functions (12a) evaluated at the optimal points is monotonically decreasing and converges to a finite limit. Moreover, this limit, due to the property (13c), is the value that the original objective function (7a) attains at a point satisfying the Karush-Kuhn-Tucher (KKT) conditions of problem (7). Next, we provide a proof that resembles the arguments in [27], [33].
Proof: Let us denote the objective function of problem (7) and problem (12) as F (p (n) , ν) and F(p (n) , ν), respectively. Let p (n) be the solution at the n-th iteration. It holds that The first equality is trivial; the inequality holds as p (n) is the optimal solution of problem (12).
Notice that p (n) satisfies the constraint (12b) and (12c), which are stricter than (7b) and (7c), respectively, because of the property (13a). As a result, p (n) must necessarily satisfy the original constraint (7b) and (7c) too, and yields the same objective value for the original problem.
This justifies the last equality in (14). Hence, (14) shows that the objective function F (p (n) , ν) decreases iteratively as n increases by virtue of (13a) and (13b), and converges to a finite limit since F (p (n) , ν) is lower bounded (recall that each term of the objective takes on values in the interval [0, 1]) and the feasible region is a compact set. Moreover, at the optimal point p (n) , problem (7) and (12) have the same objective and, by virtue of (13c), the same derivative values with respect to p. As a result, the formulation (12) must necessarily satisfy the KKT conditions of the original problem (7).

B. Feasibility
The following conditions are necessary but not sufficient for the problem in (7) to admit a non-empty feasible set satisfying all the constraints (7b)-(7h): where Z = K k=1 M k . The set of conditions in (15) guarantees that each user is able to transmit with a rate supporting the effective maximum tolerable latency, while the second condition in (15) checks that the total computational resources required by the users might be afforded by the CPU and all the active APs in the network. These conditions are necessary but not sufficient, due to the distributed nature of the considered resource allocation and the interference-limited scenario which makes simultaneously maximizing the per-user rate analytically intractable. 3 However, a non-empty feasible set for problem (7) can anyhow be enforced by a proper joint admission control and computation-offloading strategies [34], [35]. With respect to problem (12), it suffices that these conditions are satisfied at the first iteration, as in the following iterations the problem feasibility is enforced by the constraints. The above approach for evaluating the feasibility of problem (7) a priori, presupposes a pre-determined power control allocation to evaluate the peruser uplink rates {R k } that come into play in (15). However, the chosen initial set of the uplink powers might not be a feasible point for problem (7).
An alternative, and rigorous, feasibility check providing also a feasible set of uplink transmit powers is the two-stage procedure that is proposed and presented next. In the first stage, we seek for a set of the user computational rates {f k = b T k f} fulfilling the computational latency constraints, that is b T k f ≥ w k / L k , ∀k, and within the computational budget limits in eqs. (7d), (7e). This consists in solving the following linear program: where If problem (16) admits global optimal solution, then we move to the second stage, and seek for a set of user computational rates {f k = b T k f} minimizing the maximum SE requirement: which can be written in epigraph form as and can be efficiently solved by using the bisection method [36], as detailed in Algorithm 2. Let f ⋆ be the optimal solution obtained via Algorithm 2. According to (6), it must hold Algorithm 2 Bisection method for Problem (21) 1: Initialize ε ← 0.005; ǫ ← 10 −5 ; Compute G(p (n) ), Z(p (n) ) according to (25); 4: Compute ρ(ΥG −1 Z);

8:
Compute v k (p (n) ) according to (5), ∀k; 9: which represents a quality-of-service (QoS) requirement. Let us translate the rightmost inequality in (22) to the following instantaneous SINR requirement where . Hence, the instantaneous SINR requirement in (23) can be rewritten as the vector inequality where , and Hence, a set of non-negative uplink transmit powers p, that depends on the small-scale fading channel realizations, can be determined capitalizing on the requirement in (24). The set of SINR targets { γ k } is feasible, if and only if all the diagonal elements of G are non-negative 4 , and the Perron-Frobenius eigenvalue of the matrix ΥG −1 Z, denoted by ρ, is real and non-negative, and ρ < 1 [37]. If these conditions are satisfied, then I(p) = ΥG −1 (Zp + σ 2 u) is a standard interference function [38], and an optimal solution for the uplink transmit powers, is obtained iteratively through the standard power control algorithm [38] as p (n) = I(p (n−1) ), for any given initial choice p (0) . 5 Algorithm 3 specifies the steps of the standard power control algorithm based on sequential optimization, and assuming P-MMSE. If Algorithm 3 converges to an optimal solution, say p ⋆ , then this solution can be used as initial feasible choice for Algorithm 1, that is As to the P-MMSE combining, notice that whenever a set of feasible uplink transmit powers is found (i.e., line 7 of Algorithm 3), the receive combining vectors {v k } must be updated accordingly, such that the matrix ΥG −1 Z at the next iteration is properly computed.

A. Cellular Massive MIMO System Model and Resource Allocation
With respect to the system model described in Section II, we can simply treat a cellular massive MIMO network as a special case of a CF-mMIMO network wherein each user is exclusively served by one of the APs. An uplink achievable SE for user k served by AP l, is given by for an arbitrary receive combining vector v lk ∈ C M . The effective uplink SINR, SINR (cell) lk , is maximized by using the Local-MMSE 6 (L-MMSE) receive combining, which is given by Notice that L-MMSE is not scalable but can be used as a benchmark, since it constitutes the optimal combining scheme for cellular networks [9]. For cellular networks, we can reasonably assume that only the serving AP offers computational facility to its user terminals. Hence, using the same notation as in (7), we can formulate the JPCA problem for cellular networks as where SE lk represents the instantaneous SE, that is the value attained by (26) without expectation. L cell k denotes the maximum tolerable latency for user k in the cellular setup. This latency value is presumably larger than its cell-free counterpart as it does not include the delay produced by the fronthaul signalling (i.e., steps 2-5 in Fig. 1). Moreover, in (29), f BS l indicates the computational capability of AP l, expressed in CPU cycles per second. Here, BS stands for base station, and this notation is used to emphasize the fact that in a cellular network the APs are actually BS with more antennas and higher computational capability, f BS l > f AP l , than the APs of the cellfree setup. While f BS l,k denotes the fraction of computational resources assigned to user k by its serving BS l. Lastly, ν k represents the minimum instantaneous SE for user k. Problem (29) can be convexified via sequential optimization, using a similar methodology as in (10). Hence, the optimization problem at the n-th iteration of the SCA method can be formulated as where ̟ p is defined as in (8) and ̟ se = ω se /[K max l,k SE lk (p (0) )], SE lk (p (n) , p (n−1) ) is a concave lower-bound of SE lk (p (n) ) around the point p (n−1) , obtained by using the same methodology as in (10). ζ (·) denotes a K ×1 vector of optimization variables, where its k-th element, ζ (·) (k), represents the amount of computational resources allocated to user k. At the last iteration n of the SCA algorithm, it holds that ζ (n) (k) = f BS l,k , l ∈ M k .c l ∈ {0, 1} K is an auxiliary binary vector, where the k-th element is 1 if BS l serves user k, and 0 otherwise. The SCA algorithm solving problem (29) follows Algorithm 1, but in each iteration it computes the optimal solutions of (30). This algorithm is run in a centralized fashion by a network entity (e.g., one of the BSs).
Convergence and optimality of the SCA optimization are guaranteed, as SE lk (p (n) , p (n−1) ) is a suitable convex approximation of SE lk (p (n) ). Regarding feasibility, problem (30) admits a where R lk = B × SE lk , is the uplink instantaneous rate of user k served by BS l. The conditions in (31) are necessary but not sufficient due to the interference-limited scenario which makes simultaneously maximizing the per-user SEs intractable.

B. C-RAN System Model and Resource Allocation
In this section, we extend, for the sake of comparison, our joint optimization strategy to a distributed network-centric massive MIMO deployment, suitable for C-RAN architectures (for the sake of brevity we refer to as C-RAN system). Specifically, we assume that, from a radio perspective, such a system implements CF-mMIMO, hence with multiple APs jointly serving multiple users. However, from a computational offloading perspective, the task offloaded by any user can either be processed at the CPU MEC server or at one of the AP MEC servers connected to the user. Hence, compared to our user-centric distributed offloading service, in such architecture the task offloading service is centralized and network-centric. This MEC-enabled framework was proposed in [31] whose task offloading model is random and arbitrarily hinges on an offloading probability. Conversely, we herein propose a deterministic, heuristic task offloading model which accounts for the user computational demands and MEC server available computing resources. Firstly, the users are sorted in descending order by the metric which represents the computational demand of user k related to its latency requirements and channel conditions. Then, for each user k, its tasks are offloaded at the CPU MEC server if the available computing resources therein are sufficient, else at the AP MEC server with more computing resources available. This scheme, summarized in Algorithm 4, determines one-to-one offloading associations between users and MEC servers and returns a heuristic solution for the vector of the computational resources f, unless the remote computing resources are not sufficient, i.e., there exists at least a user k such that µ k > max f CPU , max lf AP l , withf CPU andf AP l being the available computing resources at the CPU and at the l-th AP MEC server, respectively. Given the user-to-MEC server associations and constructing the vectors {b k } and {c k } accordingly, the optimal JPCA is obtained by running Algorithm 1. Upon a success of Algorithm 4, the necessary but not sufficient condition for the feasibility of problem (12) at the first iteration is

V. SIMULATION RESULTS
In this section, we numerically evaluate the performance provided by the proposed JPCA in CF-mMIMO systems and compare it with those attained in a cellular massive MIMO and a C-RAN deployment.

A. Simulation Setup
We consider a coverage area of 1 km 2 served by a total number of antennas N = LM = 400.
For the cellular massive MIMO setup, we choose L = 4 BSs, equipped with M = 100 antennas Algorithm 4 Heuristic user-to-MEC server association for C-RAN systems if µ k <f CPU then 6: f AP l * ,k = µ k ; For small ASDs, that is σ φ ≤ 15 • and σ θ ≤ 15 • , we can compute an approximate closed-form expression for the spatial correlation matrices {R lk }. An approximate spatial correlation matrix in closed form, valid for small ASDs, was provided in [11] for ULAs and two-dimensional space model. Similarly, [40] generalizes this result to uniform planar array in a three-dimensional world. In this study, we consider ULAs in a 3D space model. It is easy to show, following [40, Appendix C], that the (n,n)th element of an arbitrary spatial channel correlation matrix (AP and user indices are omitted for the sake of brevity) can be approximately expressed as nn being the horizontal antenna spacing between the nth and thenth array elements in wavelengths. In our simulations, we set this spacing equal to 0.5 (half-wavelength distance).
As τ p < K, pilots are to be re-assigned across users. To this end, we resort to the joint pilot assignment and AP (BS)-user association described in [9,Section 5.4], so as to ensure that users served by the same set of APs (same BS, for the cellular setup) are given orthogonal pilots.
Concerning the power control, we assume that the initial choice for the feasible transmit powers of the SCA algorithm follows, for all the setups, a fractional power control strategy given by Common to all the setups, the number of bits needed to transfer the user computational tasks, {b k }, are uniformly distributed random integers from the interval [1,4] Mbits, and the number of CPU cycles needed to run the task itself is conventionally set as a linear function of b k , that is w k = α b k , with α = 50 cycles/bit [26].

B. Performance Comparison between Network Architectures
Firstly, we focus on the radiated power consumption. In Fig. 2(a) power, expressed in Watt. This is computed as K k=1 p k , with the uplink powers {p k } being the optimal solutions of the SCA problem (12) and (30) for cell-free and cellular massive MIMO, respectively. For C-RAN, the uplink powers are the optimal solutions of the SCA problem (12), given the heuristic user-to-MEC server association determined by Algorithm 4. We consider three configurations: (i) ω p = 1, ω se = 0.5 (dash), (ii) ω p = ω se = 1 (dot), and (iii) ω p = 0.5, ω se = 1 (solid). Numerical results reveal a dramatic total transmit power saving for the CF-mMIMO users as compared to the cellular massive MIMO and the C-RAN users, regardless of the configuration. In particular, CF-mMIMO with JPCA and ω p = 1, ω se = 0.5, which is the configuration that prioritizes the power saving over the transmission latency, guarantees a total uplink transmit power saving of 40%-50% with respect to cellular massive MIMO, and 55%-70% with respect to C-RAN. If we consider configurations giving more weight to the SE, C-RAN outperforms cellular massive MIMO as it builds on a user-centric distributed approach from a radio perspective. Nevertheless, C-RAN weakness lies on its network-centric computational resource allocation. Unlike cellular massive MIMO, we can observe the great ability of CF-mMIMO and C-RAN to save transmit power when prioritizing the SE, by virtue of the macrodiversity gain and user's proximity. More specific considerations can be made for the transmit power of the single user. Fig. 2(b) shows the CDF of the uplink transmit power per user, expressed in mW, resulting from the proposed JPCA scheme. At high percentiles, where the transmit power consumption is more significant, we observe that the CF-mMIMO users can considerably reduce their transmit power as compared to the cellular massive MIMO and C-RAN users. The transmit power saving can amazingly reach 85% and 60% compared to C-RAN and cellular mMIMO, respectively, if ω p = 1, ω se = 0.5. Cellular massive MIMO needs to employ more power to properly serve those users with worse channel conditions, presumably at the cell-edge, while C-RAN employs more power in order to reduce the transmission latency and thereby compensating for the higher computational latency due to the poorer remote computing resources available for each user. At low percentiles, presumably corresponding to the users with better channel conditions and exiguous computational demands, CF-mMIMO and C-RAN equally perform and the gap with cellular massive MIMO reduces. Importantly, our JPCA scheme in CF-mMIMO is able to guarantee fairness among the users in terms of transmit power consumption. Secondly, we focus on the amount of computational resources allocated to the users, that is {f k }. In Fig. 3(a-b), we show the CDF of the computational resources allocated to the single user by the proposed JPCA, expressed in GHz (10 9 ×cycles/s). While, Fig. 3(c) shows the CDF of the total allocated computational resources, computed as K k=1 f k and with the computational rates being the optimal solutions of the SCA problem (30) and (12) for cellular and CF-mMIMO, respectively. For the C-RAN setup, we include the heuristic solution for {f k } given by Algorithm 4, and the optimal solution given by (12) upon the user-to-MEC server association defined by Algorithm 4. The amount of computing resources allocated by the heuristic scheme in C-RAN is clearly independent on {ω p , ω se }, so are in facts those allocated by the JPCA in C-RAN. Indeed, the task offloading model in C-RAN gives access at less remote computing resources to each user, compared to cell-free and cellular massive MIMO, and thereby the resource allocation is unlikely to change varying the weights of the objective function. In cellular massive MIMO, the MEC servers at the BSs offer huge computational power which is fully exploited by the users, especially those with higher computational demands and poor channel conditions, for which drastically reducing the computational latency is the only way to fulfill the latency requirement. The impact of {ω p , ω se } on the resource allocation is clearly visible in CF-mMIMO: if, with the JPCA scheme, we prioritize the power saving, then the transmission latency increases and more computing resources need to be allocated in order to reduce the computational latency and fulfilling the requirements. These results clearly show the The effective latency experienced by the users due to the offloading process is another relevant aspect to measure the effectiveness of the JPCA scheme, and it is shown in Fig. 4(b). First, we remind that the latency requirements of the cell-free/C-RAN users account for the delay of the signalling over the fronthaul network, i.e., steps 3-5 of Fig. 1, thus are stricter as compared to those of the cellular users. The JPCA scheme in CF-mMIMO is able to fulfill the latency requirements by a large margin showing the potentiality to support even stricter requirements.
In C-RAN, due to the poor amount of available resources, the JPCA scheme provides higher latency, especially for about 40% of the users which experience their maximum tolerable latency.
While notice that the heuristic allocation scheme (HUE) is designed upon satisfying the latency This suggests that in cellular massive MIMO the transmission latency is dominant over the computational latency, which is reasonable for a twofold reason: the SE of cell-edge users can be very poor regardless of the power control, and the huge amount of computing resources available at the BS makes the computational latency less than a concern. Importantly, in CF-mMIMO the JPCA scheme can simultaneously guarantee low offloading latency and significant transmit power saving by distributing the computational workload over multiple MEC servers.
In Fig. 5(a-b), we show the CDF of the user transmit energy consumption per Mbit, obtained as E k = p k /(B×SE k ) for C-RAN, cell-free and cellular massive MIMO (in this case SE lk ), with p k being the optimal solution of the respective JPCA schemes. We observe that cell-free users can save a dramatic amount of transmit energy with respect to both the C-RAN and cellular users.
This confirms the outstanding ability of the JPCA scheme in CF-mMIMO of simultaneously guarantee low transmission latency and significant transmit energy consumption savings. Not least, fairness among the users is ensured unlike in C-RAN and cellular massive MIMO. Despite C-RAN and CF-mMIMO operate equivalently from a radio perspective, the energy consumption gap is due to the different offloading strategy which leads the JPCA scheme in C-RAN to increase the ratio p k /SE k in order to reduce the transmission latency and counterbalancing the higher computational latency, as seen in Fig. 4.
Finally, we investigate the user transmit power, effective offloading latency and SE provided by the JPCA scheme as the ratio ω p /ω se varies. By increasing this ratio, the JPCA scheme prioritizes the minimization of the per-user uplink power, which is clearly shown by the monotonic decreasing behaviour of the curves in Fig. 6(a). The uplink power per user provided by

C. Impact of the AP Selection Strategy
The simulation results shown in this section aim at highlighting the impact of the AP selection strategy on the JPCA scheme in CF-mMIMO. In section Section V-B, we assumed the AP-touser association described in [9,Section 5.4], so as to ensure that users served by the same set of the best APs are given orthogonal pilots. Hence, if τ p = 5, each AP participates to the service of up to 5 users. We refer to this scheme as dynamic cooperation clustering (DCC).
From an energy efficiency viewpoint such an AP selection strategy results to be costly as many APs, even those bringing negligible contribution to the performance, are involved and active both in the radio communication and computational offloading service of a user. Performing an accurate quantitative analysis of the power consumption at the server side is rather arduous as it should take into account the hardware, base-band processing, transmit and computing task power consumption, both at the APs and CPU, plus a power contribution consumed over the fronthaul links. Such analysis deserves a separate study and is certainly an interesting research direction for future works. Hence, we next give a qualitative study of the energy consumption at the server side, by considering alternative AP selection or AP on/off switching strategies. An AP on/off switching strategy establishes a different fraction of APs in idle (i.e., energy-saving) mode over the task offloading service. We consider a fixed cooperation clustering (FCC) scheme, wherein each user, upon the associations established by the DCC scheme, is only served by the best (channel-wise) G APs. In addition, we consider the large-scale-fading-based AP selection (LSFBS) [41], wherein each user, upon the associations established by the DCC scheme, is only served by the APs that contribute to the 95% of its channel gain. These AP selection strategies establish, in fact, an energy efficiency profile: the higher the number of APs in idle mode, the more efficient the system is. Fig. 7 shows the probability density function (PDF) of the number of APs per user and the number of users per AP, for different AP selection strategies, assuming K = 10, τ p = G = 5. The LSFBS involves a handful of APs per user with high probability, while the DCC scheme selects many APs per user, with a non-negligible probability of selecting all the APs. The FCC scheme always select G = 5 APs per user. Changing perspective, 60% and about 38% of the APs is off with FCC and LSFBS, respectively, while the DCC always selects τ p = 5 users per AP. Hence, FCC guarantees higher energy efficiency than LSFBS and DCC.
The latter is the least efficient. As we can observe in Fig. 8(a, d, e) the AP selection strategy has a negligible impact on the uplink transmit power and energy consumption resulting from the JPCA scheme, but significantly affects the computing resource allocation and the offloading latency Fig. 8(b, c,

D. JPCA: A Closer Outlook
In this section, we explore more in detail the effectiveness of the proposed JPCA, evaluating the interplay between uplink power, SE, allocated computational resources, and effective offloading latency. Importantly, we also evaluate the soundness of the two problem feasibility checks described in Section III-B. In Fig. 9, we present the simulation results of one network snapshot, where the final values are averaged over 200 channel realizations. For all the users, whose indices appear on the x-axes, we report: computational task size b k in Mbits; effective average SNR computed as l∈M k β lk /σ 2 and converted to dB; uplink SE in bit/s/Hz; uplink transmit power in mW; the allocated computational resources {f k } in GHz; and the effective offloading latency consisting of transmission, computational and fronthaul latency. We consider two simulation setups: reddish bars refer to the cell-free setup described in Section V-A, which we call "loose" setup for brevity; blueish bars refer to a "strict" cell-free setup with higher user computational demands, that is {b k } ∼ U(5, 10) Mbits. The latter is of particular interest because highlights how the JPCA operates under stricter constraints. The propagation scenario is in common to both the setups, as we fixed the simulation seed in order to obtain the same channel conditions (black bars). By inspecting Fig. 9, we observe that user 13 is in the adverse conditions of poor SNR and high computational demand. The JPCA naturally needs to allocate more power and computational resources to this user than others in order to reduce its transmission latency (by increasing its SE) and computational latency. As a comparison, user 7 has the highest computational demand but relatively good SNR, hence its latency requirements can be easily Reddish bars refer to the cell-free setup described in Section V-A. Blueish bars refer to a cell-free setup with {b k } ∼ U(5, 10) Mbits. Black bars refer to both the setups. fulfilled by solely reducing its computational latency through allocating more computational resources. In the "strict" setup (blueish bars) the fronthaul latency is generally dominant over the transmission and computational latency as it is proportional to the user's task size, and the overall effective latency almost equals the user's requirements of 200 ms. For the "loose" setup (reddish bars) we obtained different but equally interesting results. Firstly, we observe a more uniform allocation of the uplink power and computational resources over the users as compared to the "strict" setup case. The transmission latency is dominant over the fronthaul and computational latency due to the lower user's computational demands. Interestingly, we observe that the effective offloading latency is far below (except for user 13) the latency requirement of 200 ms, which results from the choice of achieving a fair balance between transmit power saving and offloading latency by setting ω p = ω se = 1.
Finally, we focus on the two problem feasibility check approaches described in Section III-B.
The approach based on evaluating the necessary conditions (15) conditioned on a prior uplink power control allocation is, for brevity, dubbed "rough" feasibility check. We dub instead "accurate" feasibility check, the approach consisting in solving the optimization problems (16), (20), and running Algorithm (3) to compute the starting point of the SCA procedure solving problem (12). Fig. 10 shows the number of iterations needed for Algorithm 1 to converge, in case of initial uplink powers p (0) selected by the "rough" (reddish bars) and "accurate" (blueish bars) feasibility check approaches. These results are obtained for one network snapshot, averaged over 200 channel realizations, assuming the "loose" (left figure) and the "strict" (right figure) simulation setup. Regarding the "rough" feasibility check approach, we assume that the uplink  Fig. 10. Number of iterations needed for Algorithm 1 to converge, in case of initial uplink powers p (0) selected by the proposed "rough" (reddish bars) and "accurate" (blueish bars) feasibility check approaches. Zero iterations indicates that the optimization problem is considered unfeasible. Results obtained by assuming the "loose" (left) and the "strict" (right) setup. power coefficients are initialized according to (32), which guarantees high level of fairness.
Focusing on the left figure first, we observe that problem (12) is always feasible for both the approaches, thanks to the loose latency constraints. With the "rough" approach, Algorithm 1 converges in just three iterations. With the "accurate" approach, Algorithm 1 converges in three and four iterations about 60% and 40% of the times, respectively. This slower convergence is due to the fact that the optimal feasible uplink powers resulting from Algorithm 3 are conceived to satisfy all the inequalities in (24) with equality, minimizing the total transmit power, and thereby are likely further from the optimal solution of problem (7). Concerning the "strict" setup, we interestingly observe that the "rough" feasibility check assesses problem (7) unfeasible 30% of the times, because the necessary conditions (15), evaluated upon the power allocation in (32), are not met. However, problem (7) admits a non-empty feasible set as proved by the "accurate" feasibility check, and in this setup fewer iterations are needed for Algorithm 1 to converge, as the search space is presumably narrower. Summing up, the "rough" approach is helpful to speed up the problem feasibility check process, even though the fulfillment of conditions (15) does not guarantee that problem (7) is feasible (although very likely), and, importantly, if conditions (15) are not met, it does not necessarily mean that problem (7) is unfeasible. Conversely, the "accurate" approach provides a rigorous assessment on the problem feasibility, but requires solving two additional (albeit simple) optimization problems and running an iterative standard power control algorithm. A convenient rule-of-thumb may be evaluating the feasibility of problem (7) by firstly checking the necessary conditions (15), and in case of verdict "problem unfeasible" performing an "accurate" feasibility check.

VI. CONCLUSION
The problem of joint allocation of uplink powers and network computational resources subject to latency constraints in a MEC-enabled CF-mMIMO system was considered in this paper, with the aim of minimizing the total uplink power consumption and simultaneously maximizing the per-user SE throughout the network, in order to provide an excellent balance between transmit power saving and effective offloading latency. For efficiently solving such a challenging non-convex problem, an SCA algorithm and two approaches to priory assess the optimization problem feasibility were proposed. A detailed performance comparison between the proposed MEC-enabled CF-mMIMO architecture, its cellular and distributed network-centric counterparts was also provided, showing that CF-mMIMO is more suitable and flexible to support MEC applications than other network architectures. Numerical results also revealed the effectiveness of the proposed resource allocation strategy under different AP selection strategies, able to simultaneously guarantee to the users low offloading latency, fairness and significant transmit power saving by distributing the computational workload over multiple MEC servers.