The system under consideration consists of two sources denoted by S_{1} and S_{2}, *N*
_{
r
} relays denoted by *R*
_{
i
} with 1≤*i*≤*N*
_{
r
}, and one destination denoted by *D*, as depicted in Fig. 1. This scenario can find applications in cellular uplinks in which some idle users help two mobile users to communicate with the base station. All nodes are equipped with a single antenna and operate in half-duplex mode. We assume orthogonal block Rayleigh fading channels and perfect time synchronization. As a result, one cooperation period is divided into two phases: broadcast and relaying. In the first phase, the two sources consecutively broadcast data to the relays and destination. In the second phase, the selected relay forwards signal to the destination. Demodulate-and-forward relaying protocol [24] is used to minimize the relay’s computational complexity. Due to the spectral efficiency constraint and processing time limit, we assume that a single time slot is dedicated to the relaying phase. Furthermore, to effectively exploit spatial diversity and to achieve high spectral efficiency, the best RS is employed [3]. The relay selection process is performed at the beginning of every cooperation period and is described in details in Section 3.

### 2.1 Network coding-based cooperation (NCC)

In NCC, the relays use network coding to help both sources simultaneously to improve the spectral efficiency. Only one best relay is selected to forward the whole network-coded codeword to the destination. The time allocation of NCC is depicted in Fig. 2
a.

First, source S_{
i
} with *i*=1,2 encodes a *K*-length data message **u**
_{
i
} into a codeword **c**
_{
i
} by a convolutional code **g** with code rate *K*/*N*. Each codeword **c**
_{
i
} contains *N* coded symbols. The codeword **c**
_{
i
} is then modulated into a signal **x**
_{
i
}. Next, the signal **x**
_{
i
} is broadcasted to the relays and the destination. Without loss of generality, denote R_{
NC
} as the selected relay in NCC. The received signal at R_{
NC
} and the destination are given as

$$\begin{array}{*{20}l} \mathbf{y}_{S_{i}R_{NC}} &= \sqrt{P_{S_{i}R_{NC}}} h_{S_{i}R_{NC}} \mathbf{x}_{i} + \mathbf{n}_{S_{i}R_{NC}}, i = 1,2, \end{array} $$

(1)

$$\begin{array}{*{20}l} \mathbf{y}_{S_{i}D} &= \sqrt{P_{S_{i}D}} h_{S_{i}D} \mathbf{x}_{i} + \mathbf{n}_{S_{i}D}, i = 1,2, \end{array} $$

(2)

where *P*
_{
XY
} with *X*∈{*S*
_{1},*S*
_{2}},*Y*∈{*R*
_{
NC
},*D*} is the average received power at node *Y* from node *X*, including the path loss; *h*
_{
XY
} is the channel fading coefficient between *X* and *Y*, which is independent and identically distributed (i.i.d.) complex Gaussian random variable with zero mean and unit variance, i.e., \(\mathbb {E}\left \{|h_{XY}|^{2}\right \}=1\), and is mutually independent among *X*→*Y* channels; **n**
_{(.)} is a noise vector whose components are i.i.d. complex Gaussian random variables with zero mean and variance *σ*
^{2}.

At the end of the first phase, R_{
NC
} decodes the estimate \(\hat {\mathbf {x}}_{iR}\) of **x**
_{
i
},*i*=1,2, using the ML detector as \(\hat {c}_{iR,k} = \arg \min _{c_{i,k}\in \{0,1\}} \{|y_{S_{i}R_{NC},k} - \sqrt {P_{S_{i}R_{NC}}}h_{S_{i}R_{NC}} x_{i,k}|^{2}\}, i \in \{1,2\},~ 1 \leq k \leq N\), where *x*
_{
i,k
}, the *k*-th symbol of **x**
_{
i
}, is the modulated symbol of *c*
_{
i,k
}. Then R_{
NC
} performs network encoding to get \(\hat {\mathbf {c}}_{NC}\), where \(\hat {c}_{NC,k} = \hat {c}_{1R,k} \oplus \hat {c}_{2R,k},\ \forall k\), and ⊕ denote the binary XOR operation.

The received signal at the destination from the selected relay is given as

$$\begin{array}{*{20}l} \mathbf{y}_{R_{NC}D} = \sqrt{P_{R_{NC}D}}h_{R_{NC}D}\hat{\mathbf{x}}_{NC} + \mathbf{n}_{R_{NC}D}, \end{array} $$

(3)

where \(\hat {\mathbf {x}}_{NC}\) is the modulated signal of \(\hat {\mathbf {c}}_{NC}\). After two phases, the destination receives three channel observations from two sources and the selected relay. To decode the source data, the destination applies the joint network/channel decoding algorithm to a “compound code” **G** [21] which sees the relayed signal as additional parity bits (redundancy). The compound code **G** is formed from the individual code **g** as follows:

$$\begin{array}{*{20}l} \mathbf{G} = \left[\begin{array}{ccc} \mathbf{g} & \mathbf{0} & \mathbf{g}\\ \mathbf{0} & \mathbf{g} & \mathbf{g} \end{array} \right], \end{array} $$

(4)

where *0* is a zero matrix with the same size as **g**. See [21] for full details of the joint decoding at the destination.

### 2.2 Partial relaying-based cooperation (PARC)

Motivated by our previous work which shows that full diversity order can be achieved for the three-node relay network in the low and medium SNR regimes even when parts of the codeword is forwarded [21], we propose to combine RS with partial relaying in PARC to select two relays, each one is the best relay (maximizing the end-to-end SNR) for one source. Since there are two active relays in the relaying phase, each relay only occupies half of the relaying time slot, as shown in Fig. 2
b. Consequently, the selected relays can only forward half of the estimated codeword to the destination.

Denote \(\mathrm {R}^{\star }_{i}, i = 1,2\), as the selected relay for S_{
i
} in PARC. The received signals at the selected relays at the end of first phase are given as

$$\begin{array}{*{20}l} \mathbf{y}_{S_{i}R^{\star}_{i}} &= \sqrt{P_{S_{i}R^{\star}_{i}}} h_{S_{i}R^{\star}_{i}} \mathbf{x}_{i} + \mathbf{n}_{S_{i}R^{\star}_{i}}, i = 1,2. \end{array} $$

(5)

At the end of the first phase, the selected relay estimates the source coded symbols and forwards them to the destination. In the proposed scheme, the selected relay \(\mathrm {R}^{\star }_{i}, i = 1,2,\) uses half of the relaying time slot to forward half of the codeword **c**
_{
i
} to the destination. More specifically, the selected relay \(\mathrm {R}^{\star }_{i}\) first estimates *L*=*N*/2 (without loss of generality, assuming *N* is even) source coded symbols to form an estimated punctured codeword \(\hat {\mathbf {c}}_{R^{\star }_{i}} = \{\hat {c}_{R^{\star }_{i},l}\}_{l\in \Theta }\), where

*Θ*={*k*
_{1}, *k*
_{2},…,*k*
_{
L
}} being the set of the indexes of the symbols which are helped by \(\mathrm {R}^{\star }_{i}\). The index set *Θ* is determined randomly^{2}. The source coded symbols at the relay are estimated by the ML detector as follows:

$$\begin{array}{*{20}l} \hat{c}_{R^{\star}_{i},l} = \arg\min_{c_{i,k_{l}}\in\{0,1\}} \{|y_{S_{i}R^{\star}_{i},k_{l}} - \sqrt{P_{S_{i}R^{\star}_{i}}}h_{S_{i}R^{\star}_{i}} x_{i,k_{l}}|^{2}\}, \end{array} $$

∀*k*
_{
l
}∈*Θ*, where \(x_{i,k_{l}}\) being the corresponding modulated symbol of \(c_{i,k_{l}}\). Next, \(\mathrm {R}^{\star }_{i}\) modulates \(\hat {\mathbf {c}}_{R^{\star }_{i}}\) into the modulated signal \(\hat {\mathbf {x}}_{R^{\star }_{i}}\) and then forwards it along with the index set *Θ* to the destination. The cost for conveying the index set is negligible since it can send, e.g., the seed of the random interleaver, to the destination.

The received signal at the destination transmitted from the relay is given as:

$$\begin{array}{@{}rcl@{}} \mathbf{y}_{R^{\star}_{i}D}=\sqrt{P_{R^{\star}_{i}D}}h_{R^{\star}_{i}D}\hat{\mathbf{x}}_{R^{\star}_{i}} + \mathbf{n}_{R^{\star}_{i}D}, i = 1,2, \end{array} $$

(6)

where \(h_{R^{\star }_{i}D}\) is the channel coefficient from \(\mathrm {R}^{\star }_{i} \to \mathrm {D}\), and \(\mathbf {n}_{R^{\star }_{i}D}\) is a noise vector whose components are Gaussian random variable with zero mean and variance *σ*
^{2}.

After receiving two signals from S_{
i
} (see (2)) and \(\mathrm {R}^{\star }_{i}\), the destination starts the decoding process with two consecutive steps: demodulating and decoding. We assume that the destination has full CSI knowledge of its incoming channels, i.e., S_{
i
}→D and \(\mathrm {R}^{\star }_{i} \to \mathrm {D}\), and of source-to-selected relay channels, i.e., \(\mathrm {S}_{i} \to \mathrm {R}^{\star }_{i}\). These CSIs can be effectively obtained during the pilot transmission. In order to inform the destination of the \(\mathrm {R}^{\star }_{i} \to \mathrm {D}\) CSI, the selected relay \(\mathrm {R}^{\star }_{i}\) forwards the quantized version of this CSI to the destination. It has been shown in [25] that with 6-bit quantization, the destination can achieve similar BER and diversity as the full CSI case in the finite-SNR regime. Therefore, the overhead for sending these CSIs is negligible. The destination first applies the C-MRC detector [19] to demodulate the coded bits for source S_{
i
},*i*=1,2, as follows:

$$\begin{array}{*{20}l} \hat{c}_{i,k} = \arg\min_{c_{i,k}\in\{0,1\}} \mathcal{M} (x_{i,k}),\ 1 \leq k\leq N, \end{array} $$

where the detection metric \(\mathcal {M} (x_{i,k}) = |y_{S_{i}D,k} - \sqrt {P_{S_{i}D}} h_{S_{i}D}x_{i,k} |^{2}\) if *k* ∉ *Θ*; otherwise

$$\begin{array}{*{20}l} \mathcal{M}(x_{i,k}) ~=~& \left|y_{S_{i}D,k} - \sqrt{P_{S_{i}D}} h_{S_{i}D} x_{i,k}\right|^{2} + \lambda_{R^{\star}_{i}} \left| y_{R^{\star}_{i}D,k} \right. \\ -& \left.\sqrt{P_{R^{\star}_{i}D}} h_{R^{\star}_{i}D} \hat{x}_{R^{\star}_{i},k}\right|^{2}. \end{array} $$

(7)

In (7), \(\lambda _{R^{\star }_{i}}\) is the parameter of the C-MRC detector which is computed as \(\lambda _{R^{\star }_{i}} \triangleq \frac {\min (\gamma _{S_{i}R^{\star }_{i}}, \gamma _{R^{\star }_{i}D})}{\gamma _{R^{\star }_{i}D}}\), where *γ*
_{
XY
}=*P*
_{
XY
}|*h*
_{
XY
}|^{2}/*σ*
^{2} being the instantaneous SNR of the channel *X*→*Y*. The C-MRC detector then computes log-likelihood ratio values of the coded bits and sends them to the channel decoder. Finally, the channel decoder applies the BCJR algorithm [26] to decode the transmitted data.

###
**Remark 1**

In our protocol, the selected relay always forwards the estimated symbols to the destination. Fortunately, possible decoding error in \(\hat {c}_{R^{\star }_{i},l}\), hence error propagation, is effectively mitigated by \(\lambda _{R^{\star }_{i}}\) in C-MRC. For example, if the source-relay channel is too noisy, i.e., \(\gamma _{S_{i}R^{\star }_{i}}\) is too small, it is highly probable that \(\mathrm {R}^{\star }_{i}\) decodes with errors. In this case, however, \(\lambda _{R^{\star }_{i}}\) is small and the contribution of the relayed signal is negligible.