Cross-layer Theoretical Analysis of NC-aided Cooperative ARQ Protocols in Correlated Shadowed Environments (Extended Version)

In this paper, we propose a cross-layer analytical model for the study of Network Coding (NC)-based Automatic Repeat reQuest (ARQ) Medium Access Control (MAC) protocols in correlated slow faded (shadowed) environments, where two end nodes are assisted by a cluster of relays to exchange data packets. The goal of our work is threefold: i) to provide general Physical (PHY) layer theoretical expressions for estimating crucial network parameters (i.e., network outage probability and expected size of the active relay set), applicable in two-way communications, ii) to demonstrate how these expressions are incorporated in theoretical models of the upper layers (i.e., MAC), and iii) to study the performance of a recently proposed NC-aided Cooperative ARQ (NCCARQ) MAC protocol under correlated shadowing conditions. Extensive Monte Carlo experiments have been carried out to validate the efficiency of the developed analytical model and to investigate the realistic performance of NCCARQ. Our results indicate that the number of active relays is independent of the shadowing correlation in the wireless links and reveal intriguing trade-offs between throughput and energy efficiency, highlighting the importance of cross-layer approaches for the assessment of cooperative MAC protocols.

provements, by appropriately exploiting the degrees of freedom that are introduced into the network. However, the fact that several relay nodes require simultaneous access to the channel stresses the need for new medium access control (MAC) protocols for effective relay coordination. The efficient MAC protocol design and assessment require the consideration of realistic physical (PHY)-layer models and channel conditions (e.g., fast fading and shadowing), making imperative the need for a MAC/PHY cross-layer approach [1].
Although the cross-layer concept was initially applied in conventional networks [2]- [5], its potential is also significant in cooperative scenarios, where the role of the PHY layer is even more pronounced, since the selection of the relay set and the need for cooperation are determined by the quality of the links between the communicating nodes. To that end, Mahinthan et al. in [6] proposed a cross-layer theoretical model to analyze the performance of a cooperative wireless system that employs an Automatic Repeat reQuest (ARQ) mechanism for error control in fast-fading environments. The same idea is extended in [7], where Rutagemwa et al. presented an analytical framework for studying the performance of reliable ARQ-based relaying schemes in multihop cooperative systems. The study in [8] introduces a cross-layer analytical model for the assessment of a multirelay cooperative ARQ MAC protocol by taking into account the shadowing effect. In [9], a cooperative cross-layer MAC protocol, which combines space-time coding and adaptive modulation at the PHY layer, is proposed and analyzed. More recently, in [10], fundamental cooperative issues (i.e., when and with whom to cooperate) are studied from a crosslayer perspective in distributed wireless networks.
In addition to the one-way cooperative schemes, during the last few years, the implementation of new software applications, based on Voice over IP and instant messaging, has driven the need for two-way (bidirectional) communication, further complicating the design of effective cooperative systems. To deal with this new trend for bidirectional communication, network coding (NC) has been proposed as an alternative routing mechanism that enables the relays to mix the incoming data packets before forwarding them to their final destinations. Apparently, the application of NC implies straightforward gains in bidirectional networks, since the relay nodes require less resources for their transmissions. This potential advantage has lately inspired several works [11]- [15], focusing on the design of novel cooperative MAC protocols with NC capabilities to 0018-9545 © 2014 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
enhance the throughput, the energy efficiency, and the robustness of wireless networks. In the same context, motivated by the great interest that ARQ schemes have attracted in the literature, we have introduced an NC-aided cooperative ARQ-based MAC protocol [16], namely NCCARQ, which exploits the benefits of both NC and ARQ to improve the performance of cooperative wireless networks. Despite their inherent differences on the channel access rules, most NC-aided MAC protocols share the common assumption of either ideal channel conditions or simplified PHY-layer models. However, the existing cross-layer models for simple oneway cooperative networks do not directly apply in bidirectional communications, where the relays are selected according to the packets that have been received from both directions. In addition, another basic limitation of the existing models is the assumption of independent wireless links in the network, although recent studies [17]- [20] have indicated the impact of shadowing spatial correlation (due to geographically proximate wireless links) on the performance of cooperative MAC protocols. Hence, considering the given limitations, the accurate performance evaluation of NC-aided protocols in correlated environments becomes essential for efficient network planning, reducing the deployment and operational cost of the cooperative systems.
In this paper, taking into account the gaps in the current literature along with the importance of cross-layer modeling, we present a joint MAC/PHY theoretical framework to evaluate the throughput and the energy efficiency of NC-aided ARQ schemes under correlated shadowing conditions. Our main contributions can be summarized as follows.
1) We introduce a cross-layer analytical framework that jointly considers the MAC-layer operation and the PHYlayer conditions in NC-based communication scenarios. Without loss of generality, we use as an exemplary case the recently proposed NCCARQ MAC protocol [16] to study how correlated shadowing affects crucial protocol parameters. 2) We analytically demonstrate that the average number of active relays in the network is independent of the correlation among the wireless links from the end nodes to the relays. 3) We provide practical insights for efficient network planning for NC-based cooperative communications by revealing interesting tradeoffs between the throughput and energy efficiency performance in the network under realistic channel conditions.
The remainder of this paper is organized as follows. Section II presents our system model, focusing on a twoway communication scenario with correlated wireless links. Section III provides an overview for NCCARQ, highlighting the impact of the PHY layer on the protocol design and performance. In Section IV, we introduce a joint MAC/PHY analytical framework for the throughput and the energy efficiency of the network. The validation of the model and the performance evaluation of the protocol under correlated shadowing conditions are provided in Section V. Finally, Section VI concludes this paper.

A. Channel Model
The network under consideration (see Fig. 1) consists of two end nodes (A and B) that have data packets to exchange in a bidirectional communication and a set of n intermediate nodes (R 1 , R 2 , . . . , R n ) with NC capabilities that act as relays in this network setup, assisting the communication toward both directions. The instantaneous received power at any given node j from transmissions by node i is denoted by , where 1) P T x is the common transmission power for all nodes in the network; 2) d ij is the (i, j) distance; 3) a is the path-loss coefficient; 4) h f ij is the fast-fading coefficient, modeled as a Nakagami-m random variable (RV) with E[|h f ij | 2 ] = 1; and 5) h s ij is the shadowing coefficient.
With regard to the channel coefficients, the fast-fading ergodicity allows for the calculation of its mean value from a sufficiently long sample realization of the process (e.g., data packet duration). On the other hand, shadowing is a slowly varying procedure, and thus, it can be considered unaltered for the same or even larger period of time [21]. In our work, we assume that shadowing remains constant during a communication round, which consists of the direct transmission and the cooperation phase. Therefore, since the analysis is performed at the packet level, the average received power computed over the duration of one packet may be written According to several experimental studies (e.g., [21]), h s ij and, consequently,γ ij can be modeled as a lognormal RV, which implies thatγ ij dB = 10 log 10 (γ ij ) is a normally distributed RV with mean value μ ij dB and standard deviation σ ij dB . 1 Regarding the correlation model, we denote by ρ 1 x,y the correlation factor between two links AR x and AR y and by ρ 2 x,y the correlation factor between two links BR x and BR y , respectively. On the other hand, no correlation is assumed between AR x and BR y links, i.e., ρ(γ AR x ,γ BR y ) = 0, ∀x, y. The correlation factors ρ 1 x,y and ρ 2 x,y can be estimated as In addition, taking into account that the links to each direction have a common end point, we assume that the correlation between any pair of links ρ 1 x,y or ρ 2 x,y exponentially decreases as the distance between them increases, i.e., ρ x,y = ρ |x−y| , where ρ ∈ [0, 1] [22]. To that end, a set of exponentially correlated normal RVs γ AR x = [γ AR 1 , . . . ,γ AR n ] can be generated as . . , μ AR n ] T , σ 1 is a diagonal matrix that contains the σ AR i values in its main diagonal, i.e., σ 1 = diag{σ AR 1 , . . . , σ AR n }, whereas Σ n (ρ 1 ) can be expressed as a Toeplitz matrix 2 , whose entries depend on the correlation factor ρ 1 , i.e., Accordingly, the exponentially correlated normal RVs γ BR x = [γ BR 1 , . . . ,γ BR n ] can be generated as . . , σ BR n }, and Σ n (ρ 2 ) is a Toeplitz matrix, which is a function of the correlation factor ρ 2 . We further assume that node B is marginally located in the transmission range of node A (and vice versa), which implies a weak direct link with relatively lowγ AB . However, the erroneous direct transmissions are compensated by employing network cooperation through ARQ control mechanisms.

B. Packet Acceptance Criteria
In wireless networks, different applications (e.g., voice, video, gaming, etc.) require different levels of quality of service (QoS), which can be provisioned through a target packet error rate (PER) denoted by the probability p * . Therefore, metrics such as the average PER (APER) or the outage PER (OPER) have to be employed to determine the correct reception of a packet according to the target value of p * . In our case, a given relay should receive correct packets by both A and B to be able to apply NC and participate in the cooperation phase. As a result, the realistic channel conditions affect 1) the size of the active relay set (A n ), which is composed of the relays that successfully receive packets from both end nodes, and 2) the network outage probability (p out ), which is defined as the probability that none of the available n relays in the system receive both packets successfully, as it is assumed that the shadowing coefficients remain constant during one communication round.
In this point, let us focus on the metrics that are used to verify the correct packet reception under fast-and slow-fading conditions. In environments where shadowing is not considered, the ergodicity of fast fading allows for the utilization of average metrics, such as the APER, to characterize the system performance and determine the acceptance of a packet. Thus, under fast-fading conditions for a given PHY-layer setup, the APER between two nodes i and j monotonically increases with their distance, i.e., AP ER ij = f (d ij ) [21].
On the other hand, the criterion of correct packet reception is substantially modified in the presence of slow fading, which is a nonergodic process. As we have seen in Section II-A, the received powerγ ij eventually depends only on the h s ij coefficient, since h f ij can be averaged because of its ergodicity. Hence, in slow-fading environments, the APER is a function of distance and shadowing (i.e., AP ER ij = f (d ij , h s ij )), and the QoS requirement AP ER ij ≤ p * is equivalent toγ ij > γ * [21]. However, although shadowing is a nonergodic process,γ ij is still an RV that requires statistical characterization. In this case, the most suitable metric is the OPER (i.e., the probability of receiving an erroneous packet), and the normal distribution of γ ij (in decibels) allows us to express it as The given expression suggests that, as a sufficient and necessary condition for packet acceptance, the mean received power should be above the threshold value γ * . Mary et al. [21] have provided closed-form formulas for γ * as a function of a target symbol error probability set by the application layer for lognormal shadowing and Nakagami-m wireless channels.

III. NETWORK CODING-AIDED COOPERATIVE AUTOMATIC REPEAT REQUEST (NCCARQ) OVERVIEW AND PHYSICAL-LAYER IMPACT
The goal of this section is to highlight the impact of a realistic PHY layer on the performance of NC-aided MAC protocols. As a representative case study, we examine the NCCARQ MAC protocol [16], which coordinates the channel access among a set of NC-capable relays in a bidirectional wireless communication. In the following sections, we briefly review the protocol's operation, and we explicitly study the changes due to the realistic PHY-layer consideration.

A. NCCARQ Overview
NCCARQ [16] MAC protocol has been designed to exploit the benefits of both ARQ and NC in two-way cooperative wireless networks, being backwards compatible with the distributed coordination function (DCF) of the IEEE 802.11 standard [24]. The function of the protocol is based on two main factors:  1) the broadcast nature of wireless communications, which enables the cooperation between the mobile nodes; and 2) the capability of the intermediate relay nodes to perform NC before any transmission. Fig. 2 presents an example of the frame sequence in NC-CARQ, where two end nodes (A and B) want to exchange their data packets (a and b, respectively) with the assistance of three NC-capable relay nodes (R 1 , R 2 , R 3 ). In this particular example, the protocol operates as follows: Node A transmits packet a to node B, and the relays overhear the transmission correctly (Step 1). Node B fails to demodulate the received packet and triggers the cooperation phase by broadcasting a Request For Cooperation (RFC) control packet along with data packet b, thus leveraging the NC application. After the reception of the RFC and since we assume ideal channel conditions, the relays apply NC to the two data packets (a and b) and set up their backoff counters (R 1 = 2, R 2 = 2, and R 3 = 3) according to the DCF rules to gain channel access and transmit the NC packet (a ⊕ b) to the end nodes (Step 2). Subsequently, after two time slots, R 1 and R 2 attempt a concurrent transmission, and R 3 freezes its counter. The simultaneous packet transmission results in a collision, and according to the DCF rules, the two relays reset their backoff counters to R 1 = 5 and R 2 = 12, respectively, while R 3 = 1 (Step 3). Therefore, after one time slot, R 3 transmits the coded packet, and the two destinations sequentially broadcast acknowledgment (ACK) packets, terminating the cooperation phase (Step 4).
Hence, the participation of multiple nodes in the contention phase results in idle slots and collisions in the network, before eventually a relay node manages to successfully transmit the coded packet. However, apart from the collisions and the idle periods, the protocol performance may be also degraded due to fading (either fast or slow) introduced by taking into account non-ideal channel conditions. In the following section, we provide some insights for the modifications that the realistic PHY-layer potentially brings to the protocol operation.

B. PHY-Layer Impact
The PHY-layer consideration significantly modifies the protocol operation, as shown in Fig. 3. In this case, the protocol operates as follows: Node A transmits packet a to node B, and the relays overhear the transmission. R 1 and R 2 receive the packet, whereas node B and R 3 fail to demodulate the received packet (Step 1). Node B broadcasts an RFC control packet along with data packet b, which is correctly received only by R 3 . Since all the relays have received only one packet, there is no node in the relay set that can apply NC (Step 2). As a result, after a predefined time (T timeout ), node A starts a new communication by transmitting packet a, which is correctly received by R 1 and R 3 . Node B broadcasts again an RFC control packet (Step 3) along with data packet b, which is correctly received by all the relays. Consequently, in this communication round, R 1 and R 3 have correctly received both packets, thus are able to participate in the cooperation phase. Accordingly, they set up their backoff counters to R 1 = 2 and R 3 = 3, respectively, and R 1 gains access to the channel after two time slots (Step 4). Finally, the two destinations correctly receive the coded packet, and they are able to extract the original packets a and b, terminating the cooperation phase by transmitting the respective ACK packets (Step 5).
Apparently, the correct packet transmissions define the active relay set (A n ), introducing the concept of a node being in outage. Hence, in the extreme case where no relay node has received both packets from A and B, the relay set is in outage, and the cooperation phase ends after a predefined time (T timeout ), which is not considered in systems that operate under ideal channel conditions. On the other hand, the reduction of the active relay set due to nonsuccessful packet receptions could be beneficial in networks with many relays, since a smaller number of active relays implies a lower packet collision probability in the network. Hence, the aforementioned issues stress the necessity for designing accurate cross-layer models that consider the protocol operation in realistic conditions.

IV. JOINT MEDIUM ACCESS CONTROL/PHYSICAL ANALYTICAL FRAMEWORK
Here, we introduce a joint MAC/PHY analytical framework to model the throughput and the energy efficiency achieved by NCCARQ under correlated shadowing and fast-fading conditions. Although a complete analysis from the MAC-layer point of view under ideal channel conditions is presented in [16], the PHY-layer consideration introduces new challenges in the theoretical derivations. In particular, concepts such as the network outage probability (p out ), the expected size of the active relay set (E[|A n |]), and the OPER should be explicitly considered for accurate analytical design. In the remainder of this section, we first focus on the parameters that are affected by the realistic PHY-layer assumption, and then, we appropriately incorporate these parameters in a modified analysis from the MAC-layer point of view.

A. PHY-Layer Impact on p out and E[|A n |]
The probability of having exactly k active out of n total relays in the system (i.e., Pr{|A n | = k}) is a required parameter for the estimation of both the network outage probability and the expected size of the active relay set. To that end, let us define by 1 AR i = {γ AR i > γ * } and 0 AR i = {γ AR i ≤ γ * } the events that relay i receives from node A a "correct" or an "erroneous" packet, respectively. In addition, we introduce the notation b Aχ n to identify which of the n relays have correctly received packets transmitted by node A. In particular, χ ∈ [0, 2 n − 1] is a natural number, whose value is specified by the combination of accepted and discarded packets in all AR i links, whereas b Aχ n corresponds to the n-bit representation of χ, where the positions of 1 s indicate the specific relays in which the average received powerγ AR i is above the reliability threshold γ * . 3 Accordingly, b Bψ n identifies which relays have successfully received packets transmitted by node B, where ψ has the same characteristics as χ.
Hence, the probability that exactly k out of n relays have successfully received packets from both A and B (i.e., Pr{|A n | = k}) may be estimated by taking into account all the possible binary codewords b Aχ n and b Bψ n that satisfy the following condition: where denotes the bitwise AND operation, whereas H w (b) corresponds to the Hamming weight function that returns the number of 1 s in the binary word b. Denoting as Pr{b Aχ n } and Pr{b Bψ n } the probability of occurrence of each possible event b Aχ n and b Bψ n , respectively, the aforementioned probability is given by 1) Theoretical Estimation of the Probabilities Pr{b Aχ n } and Pr{b Bψ n }: To further clarify the concepts and derive expressions for the probabilities Pr{b Aχ n } and Pr{b Bψ n }, let us provide an example for the theoretical estimation of Pr{b A1 n }, which corresponds to the probability that only relay n receives a "correct" packet from node A, while all the other relays (i.e., R 1 , . . . , R n−1 ) receive "erroneous" packets, i.e., . . . , y n )dy 1 · · · dy n (9) where f y (y 1 , . . . , y n ) corresponds to the joint probability density function (pdf) of the RVs y i = (γ AR 1 − μ AR 1 )/σ AR 1 and can be written as where det(Σ n (ρ 1 )) denotes the determinant of matrix Σ n (ρ 1 ).
For the evaluation of the rest of the integrals q k (x), ∀k ∈ [2, n − 1], we adopt the Gaussian quadratures for the integral [26,Tab. II,N=15]. Making changes in the variables 4 , (14) may be rewritten in the following form: where t = γ * − μ AR k /σ AR k ; w i and r i denote the weights and the roots of the Gaussian quadratures [26], respectively; and N GQR is the number of points used for the integral evaluation. After evaluating q k (x) at the points , the probability Pr{b A1 n } may be computed as where t = γ * − μ AR n /σ AR n . Following the same line of thought, the given procedure can be generalized for the theoretical estimation of Pr{b Aχ n }, Pr{b Bψ n }∀χ, ψ ∈ [0, 2 n − 1], as it is described in [27,App. B].
2) Network Outage Probability (p out ): The network outage probability p out , i.e., the probability that none of the relays in the system have successfully received both packets from nodes A and B, may be directly derived from (8) by setting k = 0. Therefore where Pr{b Aχ n }, Pr{b Bψ n } are computed as described in [27,App. B].

3) Expected Size of the Active Relay Set (E[|A n |]):
Here, we provide a closed-form expression to compute the average number of active relays E[|A n |], proving that it is independent of the correlation coefficients ρ 1 , ρ 2 . Following the induction method, we initially prove the aforementioned statement for a network with two relays. By applying (8) for n = 2, we may write the probabilities that k relays are active for k = 1, 2 as where the probabilities Pr{b Aχ 2 }, Pr{b Bψ 2 }, χ, ψ ∈ [0, 3] may be written as in (9) by setting n = 2. The average number of active relays in case of n = 2 may be written as By taking into account (9), (16), and Lemma 1 below, it can be shown 5 that (23) can be written in closed form as Lemma 1: For any given ρ, γ * , μ, and σ, it holds that Proof: The proof of Lemma 1 is given in [27, App. C]. The generalization of this result for a network with n relays may be stated as follows.
Proposition 1: Let us consider the cooperative network in Fig. 1, operating in a correlated shadowing environment. The average number of active relays E[|A n |] is independent of the correlation between the links, equal to Proof: The proof of Proposition 1 is given in [27, App. E].
Having derived accurate closed-form expressions for crucial network parameters (i.e., the network outage probability and the expected number of active relays), we can now incorporate them into a MAC-layer analytical model to study important end-to-end metrics, such as the network throughput and energy efficiency.

1) Throughput:
The network throughput, measured in bits per second, is defined as the rate of successful data delivery in a given period of time. Taking into account the protocol operation, the expected total network throughput (S total ) can be decomposed into the throughput achieved by the direct successful transmissions (S d ) and the throughput produced by the relay nodes (S coop ) during the cooperation phase. This can be mathematically expressed as where 5 The detailed derivation is provided in [27, App. D].

E[S coop ] = 2 · OP ER
In the given equations, OP ER AB corresponds to the OP ER in the direct link from node A to node B, E[P ayload] is the average packet payload, and p out denotes the probability that there are no active relays in the network, i.e., all relays are in outage. In addition, E[T d ] and E[T coop ] represent the average time required for a successful direct transmission and a transmission that takes place via the relays, respectively. Coefficient 2 has to be included in (29) The default time, which consists of the transmission time for the RFC (T RFC ) and data packet b (T b ), is equal to where T SIFS denotes the SIFS duration. The overhead time can be caused due to either the network outage or the contention phase, i.e., where p out is the network outage probability, T timeout denotes the period of time that all nodes wait in case of no active relay in the network, and T cont represents the total time duration until the correct acknowledgement of both original packets, equal to

E[T cont ] = T ONC + T DIFS + E[T C ] + T a⊕b
Equation (33) explicitly considers 1) the expected time required for a coded packet to be transmitted via the relays (E[T C ]), taking into account the idle slots and the collision overhead; 2) the overhead time needed to perform NC (T ONC ); 3) the sensing times T DIFS and T SIFS ; 4) the transmission time for the NC packet T a⊕b ; and 5) the transmission time for the ACK packets (T ACK ).
Since NCCARQ is characterized by backwards compatibility with the IEEE 802.11 standard, the channel access can be modeled according to the Markov chain introduced in [28], where the states correspond to the values of the backoff counter, and the transition probabilities follow the DCF operation. Hereafter, we provide the slightly modified formulas for the sake of the paper's self-completeness; see [16, App.] for the detailed protocol analysis. Thus, the average time until successful transmission is calculated as where T slot represents the idle slot duration, and T col corresponds to the collision time, equal to: T col = T DIFS + T a⊕b + T SIFS . In addition, the probabilities of having an idle (p i ), a successful (p s ), or a collided (p c ) slot can be written as p i = 1 − p tr , p s = p tr · p s|tr , and p c = p tr · (1 − p s|tr ), where p tr is the probability that at least one relay attempts to transmit, i.e., and p s|tr denotes the probability of a successful transmission (i.e., exactly one station transmits conditioned on the fact that at least one station transmits), i.e., In (35) and (36), τ is the probability that a node transmits in a randomly selected slot, and E[|A n |] is the expected number of active relays during the cooperation phase, as we have seen in Section IV-A3. It is worth noting that traditional MAC-oriented analytical works usually neglect the impact of the PHY layer by including the total number of relays (n) in the theoretical expressions, whereas in our work, this set is restricted by taking into account realistic PHY-layer conditions.
2) Energy Efficiency: The network energy efficiency, measured in bits per Joule, can be defined as the amount of transmitted useful information per energy unit. Considering the protocol operation, the expected energy efficiency (η) may be written as (37), shown at the bottom of the page, where the numerator corresponds to the expected number of delivered useful bits during one communication round, and the denominator represents the average energy consumption at the same time period.
Regarding the expected total energy consumption in the network, following the same line of thought, we discompose the operation into the direct transmission and the cooperation phase. Hence Let us recall that the network consists of two nodes (A and B) that exchange packets with the assistance of n relays. Defining as P T x , P Rx , and P idle the power levels associated to the transmission (T x), reception (Rx), and idle mode, respectively, the energy consumption during the direct transmissions can be estimated as On the other hand, the term E[E coop ] is composed of the energy consumption during the network outage and the energy consumed in the successful cooperation, i.e., where E[E suc_coop ] includes the required energy for a perfectly scheduled cooperative phase (E min ) and the energy consumption during the contention phase (E[E cont ]), i.e., Hence, considering the network topology and the protocol's operation, we have where E[L] represents the average number of relays that transmit a packet simultaneously. Given the existence of E[|A n |] active relays, the probability p l that exactly l stations are involved in a collision can be expressed as and therefore

V. MODEL VALIDATION AND PERFORMANCE EVALUATION
We have developed a MATLAB simulator that incorporates both the NCCARQ rules and the PHY-layer design, to validate our analytical model and study the impact of exponentially correlated shadowing on the performance of NC-based MAC protocols. Here, we present the simulation setup along with the results of our experiments.

A. Simulation Setup
The considered network, shown in Fig. 1, consists of two nodes (A and B) that participate in a bidirectional wireless communication and n relay nodes that contribute to the data exchange. In the same figure, the shadowing correlation between the different links is highlighted, assuming that 1) all AR i links are exponentially correlated as described in (3), 2) all BR i links are also exponentially correlated according to (5), and 3) pairs of AR i and BR i links are independent, which is a reasonable assumption according to measurements in [17]. Furthermore, we adopt a symmetric network topology with ρ 1 = ρ 2 = ρ.
The MAC-layer parameters have been selected in line with the IEEE 802.11g standard specifications [29]. In particular, the initial contention window (CW ) for all nodes is 32, the MAC header overhead is 34 bytes, whereas the time for the application of NC to the data packets is considered negligible, as the coding takes place only between two packets. We also consider time slots, SIFS, DIFS, and timeout interval of 20, 10, 50, and 80 μs, respectively. In addition, based on the work of Ebert et al. [30] on the power consumption of the wireless interface, we have chosen the following power levels for our scenarios: P T x = 1900 mW and P Rx = P idle = 1340 mW.
Regarding the PHY-layer parameters, we have set the reliability threshold γ * = 41.14 = 16.14 dB, which corresponds to a target AP ER = 10 −1 . Furthermore, we assume a relatively weak direct (AB) link (μ AB = 8 dB) with respect to the signalto-noise ratio (SNR) threshold γ * , to trigger the cooperation and focus our study on the impact of correlated shadowing. The simulation parameters are summarized in Table I. Through the experimental assessment, we want to validate our proposed models and study the effect of the number of relays (n) and the correlation factor (ρ) on the protocol performance.

B. Model Validation
In the first set of our experiments, we study the PHY-layer impact on the communication, while we validate the derived theoretical expressions. Figs. 4-7 show the expected size of the active relay set (E[|A n |]), the network outage probability (p out ), the expected network throughput (E[S total ]), and the expected energy efficiency (E[η]), respectively, for different values of the shadowing standard deviation σ, assuming strong links between the end nodes (A, B) and the relays (R i ), i.e., μ AR i = μ BR i = 20 dB.
In Fig. 4, we consider different total number of relays and various indicative values for the correlation factor (ρ), deriving two important conclusions. First, the experiments validate our  analysis, demonstrating that the average number of active relays is independent of the shadowing correlation among the wireless links. The second important remark concerns the negative effect of σ in the number of active relays. In this particular scenario, where the mean SNR value is above the threshold γ * , the shadowing variation has a detrimental role in the communication. As a result, higher values of σ restrict the potential diversity benefits by reducing the expected size of the active relay set. However, it should be mentioned that in the opposite case (i.e., when the mean SNR value is below the reliability threshold), high values of σ would imply lower outage probability and higher number of active relays, hence increasing the expected network throughput in the system, as we will examine in the following section. Fig. 5 shows the theoretical and simulation results for the network outage probability for different correlation factors (ρ) and number of relays (n). Similar to the previous case, the shadowing deviation deteriorates the system performance, increasing the probability of having no active relay in the system. However, in this case, the impact of shadowing correlation on the system is clearly demonstrated in the figure, since high values of ρ cause almost identical outage probability for  the network independently of n, annulling the advantages of the distributed cooperation. On the other hand, independent wireless links (ρ = 0) exploit the diversity offered by the relays, considerably reducing the outage probability as the total number of relays in the system increases (e.g., n = 5). As a result, the significant effect of ρ on the probability of outage has a direct impact on the end-to-end metrics under study, highlighting the importance of having exact knowledge of the shadowing correlation conditions in the network.
In Fig. 6, we study the impact of shadowing standard deviation (σ) on the network throughput for different number of relay nodes (n). In this specific case, where μ AR i = μ BR i > γ * , the wireless communication would always be successful without the shadowing random fluctuations, and hence, shadowing is harmful for the system, as it introduces many events where the received SNR is below the threshold γ * . In addition, two important remarks are highlighted: 1) Distributed cooperation is beneficial, as the throughput increases with the number of available relays (n); and 2) shadowing correlation is detrimental to the potential gain introduced by cooperation.
The expected network energy efficiency for different number of relays and correlated conditions is plotted in Fig. 7, validating our model and revealing intriguing facets of the problem, since a notable tradeoff between the system throughput and energy efficiency is disclosed. In particular, although distributed cooperation provides significant gains in the throughput for high-SNR scenarios (see Fig. 6), it has a negative impact on the energy efficiency, reducing it up to 100% under specific conditions, which can be explained by taking into account the high throughput (12 Mb/s) achieved in single-relay networks under good channel conditions. Cooperation may increase this performance up to 18 Mb/s, but the aggregated energy consumption of many relays in the network results in a significant reduction of the total energy efficiency. The following section presents a thorough performance evaluation with regard to the impact of the number of relays and the shadowing correlation on the network performance.

C. Performance Evaluation
In Figs. 8-11, we study the impact of the correlation and the number of relays (n) on the network throughput and energy efficiency, for three different topologies (i.e., ρ = 0, ρ = 0.5, and ρ = 0.99). In this set of experiments, we have set μ AR i = μ BR i = 15 dB, which is a value close to the reliability threshold (γ * ). In addition, to emphasize the importance of the shadowing standard deviation, we have adopted two extreme values of σ, i.e., σ = 2 dB and σ = 10 dB.
1) Impact of the Number of Relays (n) in the Network: Fig. 8 studies the network throughput versus the number of relays, deriving three important conclusions. First, the high number of relays in the network is beneficial for the average system throughput, particularly for low and medium values of ρ, where the incorporation of more relays in the network results in higher diversity. The second interesting remark is related to the influence of the shadowing correlation factor on the protocol performance. In particular, as expected, by studying the outage probability, high values of ρ compensate the benefits from the cooperation, as the throughput increases only slightly with the number of relays. However, for medium and low values of ρ, the protocol performance seems to re-   main unaffected, which implies that the network throughput is not proportional to the correlation among the links. This observation would be particularly important for network design, since it allows for network deployment under relatively high correlation conditions (e.g., ρ = 0.5), although they may sound prohibitive in principle. Finally, comparing Fig. 8(a) and (b), we observe the impact of σ on the throughput, as high values of the shadowing standard deviation (σ = 10 dB) significantly increase the protocol performance, particularly for small number of relays in the network. For example, in the case of single-relay systems (n = 1), the throughput is almost quadruple, which is something that can be intuitively explained by taking into account that the mean value of the SNR (μ AR i = μ BR i ) is marginally lower than the decoding threshold, and, as a result, the random fluctuations introduced by shadowing due to high values of σ enable correct packet decoding more often. Fig. 9(a) and (b) presents the network energy efficiency for σ = 2 dB and σ = 10 dB, respectively. The first clear outcome from both figures is the negative role of shadowing correlation in the energy efficiency of the network. In addition, the shadowing standard variation plays again an important role, as the energy efficiency increases with σ, mainly due to the significant throughput increase in the network. However, as the number of relays increases, the relative gain due to σ decreases, since the respective throughput gains are significantly higher for low values of σ. Moreover, it is worth commenting on the different behavior of the plots in each figure. In Fig. 9(a), we observe that, for low and medium correlation factors, the energy efficiency increases until n = 4, as the throughput gains we have achieve by adding relays in the network deserve the increased energy consumption in the system. For higher number of relays (i.e., n > 4), the energy efficiency slowly decreases, since the incorporation of more relays (which need extra energy resources) in the network does not fully justify the increase in throughput. In highly correlated scenarios [i.e., ρ = 0.99), as expected, the energy efficiency decreases as the number of relays grows, since, due to the almost identical conditions in the wireless links, the throughput of the network is not significantly affected. Regarding the case of σ = 10 dB [see Fig. 9(b)], we can see that the increase in the number of relays causes a significant reduction in the network energy efficiency, although the average throughput [see Fig. 8(b)] follows again an increasing trend. However, in this case, we should consider that the throughput with only one relay in the network is relatively high, and therefore, the price (in terms of energy) we have to pay by adding more relays is higher than the actual gains we get in terms of performance.
2) Impact of the Correlation Factor (ρ): In Fig. 10(a) and (b), we study the impact of the shadowing correlation factor (ρ) on the network throughput for σ = 2 dB and σ = 10 dB, respectively, while we also plot the case of one relay (n = 1) in the network as a reference scenario, although the correlation in this case has no practical meaning. Once more, we confirm that the high number of relays as well as high values of σ are beneficial for the throughput in cooperative scenarios with the specific setup. With regard to the impact of shadowing correlation, in both cases, we observe that the cooperation tends to be useless for high correlation factors (ρ → 1), since all the relays experience very similar shadowing attenuations, and the throughput reduces to that of a single-relay network. However, it can be remarked that the impact of correlation is more severe in environments with low σ, as the difference in the throughput performance in case of independent (ρ = 0) and fully correlated (ρ = 0.99) links is much higher in Fig. 10(a). In addition, we can verify the conclusions of the previous set of experiments, where it was shown that the results for ρ = 0 and ρ = 0.5 (which are common values for outdoor environments [31]) were not significantly different. In this figure, we can explicitly specify that the severe performance degradation occurs for extremely high values of the correlation factor (i.e., ρ > 0.7), which are usually found in indoor environments [32], [33].
The impact of correlation on the network energy efficiency is shown in Fig. 11. Starting from the case of σ = 10 dB [see Fig. 11(b)], we can see that adding more relays in the network causes a considerable reduction in the energy efficiency, whereas the effect of correlation is not particularly harmful. This fact can be explained by comparing the throughput performance of networks with n = 1 and n = 10 relays in Fig. 10(b). Apparently, we need ten relays to double the throughput of single-relay networks. However, the significantly increased energy consumption in the network is not in accordance with the throughput enhancement, thus resulting in lower energy efficiency in the network. The same conclusion can be also supported by noticing that, in contrast to the throughput performance results, the baseline network energy efficiency (i.e., with one relay in the network) is higher in all cases, since the protocol is able to achieve high performance standards under these conditions, even with only one relay in the system. On the other hand, the results in Fig. 11(a) are not straightforward, as they identify the necessity of carefully choosing the number of relays to achieve the highest energy efficiency. Unlike Fig. 11(b), where the incorporation of additional relays in the system always results in energy efficiency degradation, in this case, the existence of more than one relay in the system, apart from throughput, can also be beneficial for the energy efficiency of the network, particularly in low-correlation scenarios. For instance, in our particular experiment, we can see that the energy efficiency increases by adding a few relays in the system [e.g., up to n = 5], since the achieved throughput considerably rises even with only a small number of deployed relay nodes [see Fig. 10(a)]. As the number of relays increases (e.g., n = 10), the energy consumption grows in higher rates than the throughput, which results in lower energy efficiency in the network. However, as the correlation among the wireless links increases (i.e., ρ > 0.7), the deployment of multiple relays does not provide significant performance enhancement, something that is directly reflected in the energy efficiency, which significantly drops.
In all cases, the experimental results clearly showcase that 1) the system performance is notably affected only by extremely high values of ρ and that 2) although shadowing correlation does not have an influence on the average number of active relays, it significantly affects the outage probability, and thus, the network should be designed taking into account the exact physical parameters and application requirements. In addition, very interesting tradeoffs between the throughput and the energy efficiency in the network have been revealed by the extensive performance assessment. In particular, the throughput improvement offered by the distributed cooperation comes with the respective energy costs that should not be neglected. The incorporation of many relays in the communication increases the total energy consumption in the network, without yielding the expected throughput gains in all cases. More specifically, in highly correlated scenarios where the cluster of relays does not offer significant throughput gains, the energy efficiency is remarkably reduced. It is also worth noting that shadowing variations can be either beneficial or harmful for the communication, depending on the quality of the cooperative links in the network. To that end, the proposed cross-layer analytical model provides the network designer with accurate estimations that facilitate the decision for the optimum number of relays in the network and their best possible placement to reduce the deployment and operational cost, guaranteeing, at the same time, the desired network throughput.

VI. CONCLUDING REMARKS
In this paper, we have proposed a cross-layer analytical framework to model end-to-end metrics (i.e., throughput and energy efficiency), in two-way cooperative networks under realistic correlated shadowing conditions. The proposed model jointly considers the MAC-layer operation along with crucial PHY-layer parameters, such as the network outage probability and the average number of active relays in the network. The extensive performance assessment has revealed interesting tradeoffs between throughput and energy efficiency, whereas the PHY-layer analysis has demonstrated that the average number of relays is independent of the shadowing correlation in the wireless links. The proposed analytical model can provide useful insights that can be exploited for effective network planning in realistic channel conditions. In our future work, we plan to study the temporal shadowing correlation and design effective cross-layer mechanisms that enhance the performance of the state-of-the-art NC-aided MAC protocols.