  In this paper, we contribute to the theoretical understanding, the design,
and the performance evaluation of multi-source multi-relay network-coded
cooperative diversity protocols. These protocols are useful to counteract the
spectral inefficiency of repetition-based cooperation. We provide a general
analytical framework for analysis and design of wireless networks using the
Demodulate-and-Forward (DemF) protocol with binary Network Coding (NC) at the
relays and Cooperative Maximal Ratio Combining (C-MRC) at the destination. Our
system model encompasses an arbitrary number of relays which offer two
cooperation levels: i) full-cooperative relays, which postpone the transmission
of their own data frames to help the transmission of the sources via DemF
relaying and binary NC; and ii) partial-cooperative relays, which exploit NC to
transmit their own data frames along with the packets received from the
sources. The relays can apply NC on different subsets of sources, which is
shown to provide the sources with unequal diversity orders. Guidelines to
choose the packets to be combined, i.e., the network code, to achieve the
desired diversity order are given. Our study shows that partial-cooperative
relays provide no contribution to the diversity order of the sources.
Theoretical findings and design guidelines are validated through extensive
Monte Carlo simulations.
