Coded Cooperation for Multiway Relaying in Wireless Sensor Networks †

Wireless sensor networks have been considered as an enabling technology for constructing smart cities. One important feature of wireless sensor networks is that the sensor nodes collaborate in some manner for communications. In this manuscript, we focus on the model of multiway relaying with full data exchange where each user wants to transmit and receive data to and from all other users in the network. We derive the capacity region for this specific model and propose a coding strategy through coset encoding. To obtain good performance with practical codes, we choose spatially-coupled LDPC (SC-LDPC) codes for the coded cooperation. In particular, for the message broadcasting from the relay, we construct multi-edge-type (MET) SC-LDPC codes by repeatedly applying coset encoding. Due to the capacity-achieving property of the SC-LDPC codes, we prove that the capacity region can theoretically be achieved by the proposed MET SC-LDPC codes. Numerical results with finite node degrees are provided, which show that the achievable rates approach the boundary of the capacity region in both binary erasure channels and additive white Gaussian channels.


Introduction
Wireless sensor networks (WSNs) consist of spatially-distributed autonomous sensors which cooperatively monitor physical or environmental conditions, and they have been identified as one of the most important enabling technologies for constructing smart cities. The rapid development of portable and wearable devices has further fueled the application of sensor networks, which helps to improve the city's sustainable growth and citizens' living quality.
One important feature of WSNs is that the sensor nodes collaborate in some manner for information transmissions. Much of research on the physical-layer techniques has focused on relaying, which is an efficient cooperative strategy to improve throughput and coverage of the sensor network. The three-node relay channel [1], consisting of one source, one relay and one destination, serves as the fundamental unit of large networks. The two-way relaying, also known as bidirectional relaying [2], is another type of cooperative strategy. By exploiting bidirectional communication, the loss in spectral efficiency due to the half-duplex restriction in conventional relaying is reduced. As a generalization of the two-way relay channel, the multiway relay channel (mRC) has been investigated in [3]. In the mRC, multiple users exchange information with the help of a relay terminal. The mRC setup models a large variety of communication scenarios. For example, in a physical sensor network, temperature sensors exchange local temperature measurements among themselves. Similarly, in a social network, different users exchange their personal information through a coordinator.
In this manuscript, we are interested in a typical scenario which is called the multiway relay channel with full data exchange in [3] or the conferencing multiway channel in [4]. A practical example of this model is as follows. Each member of an emergency response team is equipped with a wireless device at a disaster site, and they may obtain valuable information at random times. All of the members, including one leader, need to share their messages with the others. Each member wants to transmit and receive data to and from all other responders, coordinated by the leader who acts as the relay. The above information exchange can be realized in two steps. First, since the members may initiate their transmissions asynchronously, each member is scheduled to transmit his or her message to the leader in a time-division manner. During this procedure, the message in the air may be overheard by other members. After successfully receiving all of the messages, the leader (relay) then encodes all of these messages together with his or her message and broadcasts the resulting codeword to all of the members. At each member's side, different and potentially partly overlapping a priori information is available for decoding the codeword from the relay. Eventually, all of the members in the team are supposed to obtain the messages from all of the others. Since the information delivery in the first phase is essentially a peer-to-peer communication, in this manuscript, we focus on the second phase in which the relay broadcasts the messages to all of the members.
The capacity region for the general multi-user broadcast channel is not known yet. In [5,6], the authors provided the capacity region for the bidirectional broadcast channel with a common and/or private message. The multiway relay channel with full data exchange as we described above can be considered as a generalization of the model in [6]. In this manuscript, we derive the capacity region for the multiway relay case. The capacity region establishes the fundamental limits of the transmission rate and provides guidelines for the code design. On top of this, we propose a coding strategy through coset encoding for broadcasting with receiver side information. The coding strategy is illustrated by using low-density parity-check codes [7]. However, in practice, the regular LDPC codes cannot provide satisfactory performance, while irregular LDPC codes suffer from the complicated optimization of the degree distribution [8]. Therefore, it is of interest to search for code constructions with a good performance and a low optimization overhead. Different designs can be found for various channel models in the literature based on Turbo codes [9,10], LDPC codes [11][12][13], Polar codes [14], etc.
The spatially-coupled LDPC (SC-LDPC) codes are good candidate for the cooperative code construction. Spatially-coupled LDPC codes were first introduced in [15] as a time-varying convolutional-like LDPC code family. Then, the idea was further developed in, e.g., [16][17][18], where different constructions and analytical results were provided. It has been proven analytically in [18,19] that the belief-propagation (BP) decoding threshold of a spatially-coupled LDPC code ensemble achieves the maximum a posteriori probability (MAP) threshold of the underlying LDPC block code. This code, in turn, approaches capacity as the node degrees increase. In addition to the capacity-achieving performance for various channels, the regularity of the SC-LDPC code allows us to avoid complicated re-optimization of the degree distributions for varying channel conditions. Meanwhile, this code enables recursive encoding and sliding-window decoding [20], which dispels the concerns about hardware complexity and delay. Motivated by these useful properties, spatially-coupled LDPC codes have been considered for applications in a variety of scenarios.
In this manuscript, we propose to use spatially-coupled LDPC codes for the cooperative channel coding in the mRC. To realize the proposed coding strategy by using SC-LDPC codes, we replace the LDPC codes with their spatially-coupled counterparts. The multi-edge-type (MET) [21] nested spatially-coupled LDPC codes are constructed by repeatedly applying the coset encoding [22]. If setting the node degree the same for all types of check nodes, the MET nested SC-LDPC codes present useful properties. Any combination of the nesting leads to a capacity-achieving SC-LDPC code, regardless of the number of edge types and the order of adding the edges. This property is beneficial for the model under discussion. We then prove that by using the MET nested SC-LDPC code, the capacity region of the channel model is achieved. Numerical results with finite node degrees are provided, which show that the achievable rates approach the boundary of the capacity region in both binary erasure channels (BECs) and binary-input additive white Gaussian channels (BI-AWGNs).
The remainder of the manuscript is organized as follows. The system model is introduced in Section 2. In Section 3, we derive the capacity region of the specific model. The coding strategy is illustrated in Section 4 through multi-edge-type LDPC codes. Based on the multi-edge-type construction, the MET spatially-coupled LDPC codes are proposed in Section 5. In Section 6, we apply the MET SC-LDPC codes to the multiway relay channel and prove that the capacity region can be achieved. The numerical results are provided in Section 7 to verify the theoretical analysis. Finally, Section 8 concludes the manuscript.

The Two-Way Relay Channel
We first use a special case, the two-way relay channel, to illustrate the system model. We assume that there are three users U 0 , U 1 and U 2 in the network, and they have individual messages m 0 , m 1 and m 2 to share with the others. Without loss of generality, we choose user U 0 to act as the relay. In the first phase, the users U 1 and U 2 transmit their messages m 1 and m 2 , respectively, in turn to the relay node U 0 . We assume that both messages are received successfully by U 0 . In the second phase, i.e., the broadcast phase, the relay U 0 transmits a codeword to both U 1 and U 2 . The goal of the transmission from U 0 is to convey the messages m 0 , m 1 and m 2 efficiently, so that U 1 is able to reliably decode the messages m 0 and m 2 and U 2 is able to reliably decode the messages m 0 and m 1 . Eventually, all three users share the three messages in the network. The channel model is illustrated in Figure 1. This model is recognized as the two-way relay channel with a common message in [6].

The Multiway Relay Channel with Full Data Exchange
In the following, we extend the model to the multiway relay channel with full data exchange. We assume that a number of K users {U 0 , U 1 , ..., U l , ...U K−1 } form a network. Each user U l has an individual message m l to share with the others, for 0 ≤ l ≤ K − 1. One of the users, for example U 0 , is assigned as the relay node. In the first phase, all of the users, except the relay U 0 , send out their messages in a time-division manner. During this procedure, each message m l , 1 ≤ l ≤ K − 1, is successfully received by the relay and may be received by other users. In the second phase, the relay U 0 has the task of broadcasting a set of messages M = {m 1 , m 2 , ..., m K−1 } which he has received beforehand, together with his own message m 0 , to all of the users. The relay combines the messages M and m 0 and encodes them into a codeword X. At each user U l , a non-empty subset of M, which includes at least his own message m l , is available as the side information for decoding. For a subgroup of the users, the side information may be: (i) non-overlapping; (ii) partly overlapping; or (iii) completely overlapping. We assume that the relay node has the knowledge of what side information is available at each user and of the channel condition between the relay and each user. The broadcasting from the relay should be dedicated to transmit all of the messages efficiently, considering the available information.
In Figure 2, we give a simple example of the above multiway relay channel. The example system consists of four users, and one of them is selected as the relay. In the first round of transmission, the message m 1 from U 1 is successfully received by both the relay and the user U 2 . The message m 2 from U 2 is successfully received by the relay and the user U 3 . The message m 3 is only correctly received at the relay. Each user can use the messages he has overheard together with his own message as the side information for decoding. That is, U 1 has only his own message m 1 as the side information. U 2 has m 1 and m 2 as the a priori information, and U 3 has m 2 and m 3 as the a priori information for the decoding. In the end of the first phase, each user informs the relay about what side information he has. This can be realized at each user by sending the indexes of his received messages to the relay. The number of bits needed to represent the index of one message is log 2 (K − 1) , where K is the number of users. The total number of bits for each user to send the knowledge of available information is at most (K − 2) log 2 (K − 1) . For the example in Figure 2, each user only needs four bits. Comparing to the length of the messages, the resulting overhead and latency are negligible. In the broadcast phase, the relay delivers the missing messages to each user, i.e., The challenge for the relay is then how to realize the information broadcasting efficiently and reliably.

Capacity Region
The capacity region for the two-way relay channel with a common message has been proved in [6]. Let R 0 , R 1 and R 2 be the encoding rates of the messages m 0 , m 1 and m 2 , and let the capacities of the links to U 1 and U 2 be C 1 and C 2 , respectively. The capacity region of the above model is then given by the set of triples (R 0 , R 1 , R 2 ) that satisfies [6,14]: In the multiway broadcast channel that we described in Section 2.2, each user requests all of the messages he has missed from M plus the message m 0 from the relay. We assume that the receiver side information available at U l is a set S l , m l ⊆ S l ⊆ M. Then, the messages that should be delivered from the relay to U l can be denoted byS l ∪ m 0 . This assumption simplifies the general problem of multi-user broadcasting, and therefore, the capacity region of the model can be obtained. We give the corresponding capacity region in the following theorem.
Theorem 1. We assume that C l is the channel capacity of the link between the relay and the user U l , for all l ∈ {1, 2, ..., K − 1}. We let R l denote the encoding rate of the message m l and R 0 denote the encoding rate of the message m 0 from the relay. The capacity region of the multiway relay channel with full data exchange is the set of all achievable rates that satisfies: Proof. Without loss of generality, we use the link between the relay and the user U l (1 ≤ l ≤ K − 1) to discuss the converse and the achievability of the capacity region. We assume that the messages are encoded by a length-n codeword X, and the channel observation at U l is Y l .
First, the entropy can be bounded similarly as has been done in [6], where a two-user case was considered.
Equations (a) and (b) are obtained from the independence of the messages and the definition of mutual information. Inequation (c) has been proven in [6]. Inequations (d) and (e) are based on the properties of mutual information.
Dividing both sides by n and using the memoryless property, we get: where the intermediate steps are omitted. Since ε l → 0 when n → ∞, we have the achievable rate on the relay-U l link: Similarly, we obtain the rates for other relay-user links as in Theorem 1. Note that the conditions (i) and (ii) guarantee the nonnegativity of the rates.
The above proves the converse of the capacity region. The achievability of the capacity region can be done similarly as for the two-user case. Since we will prove in the remainder of the manuscript that the capacity region can be achieved by using the proposed code structure, we omit the proof of achievability here.
For the example in Figure 2, the capacity region is given as: Note that this enforces R 0 ≤ min(C 1 , C 2 , C 3 ) and C 2 ≤ C 1 .

Low-Density Parity-Check Codes
As the name suggests, LDPC codes are block codes with parity-check matrices which contain only a small proportion of non-zero entries. An LDPC code can be represented by a parity-check matrix or a Tanner graph.
A parity-check matrix H with elements in GF(2) defines the codeword constraints in a matrix form. For a binary code with k parity-check equations and with codeword length n, the matrix H is of size k × n. A vector X = [X 1 , X 2 , ..., X n ] is a codeword of the LDPC code defined by H if and only if the following constraint is satisfied: In the following, we use C to represent a code and use X to denote one codeword of C.
Tanner introduced an effective graphical representation for LDPC codes [23]. In a bipartite Tanner graph, the nodes are separated into two distinctive sets: variable nodes for the codeword bits and check nodes for the parity-check equations. An edge connects a variable node to a check node if that codeword bit is included in the parity-check equation.
As originally defined by Gallager, a (d v , d c ) regular LDPC code is determined by the condition that every codeword bit participates in exactly d v parity-check equations and that every parity-check equation involves exactly d c codeword bits. The parameter d v is called the variable node degree, and d c is the check node degree.
Since each parity-check equation typically reduces the number of degrees of freedom by one, it follows that the design rate of the (d v , d c ) regular LDPC code is:

Binning and Coset Coding
One of the basic elements of network information theory is the idea of binning [24]. A binning scheme divides a set of codewords into subsets ("bins"), such that the codewords in each subset are as far apart as possible. In [24], random binning was used to prove the Slepian-Wolf source coding theorem. In [25], Cover and El Gamal proposed to use random binning for set partitioning in decode-and-forward relaying.
The random binning approach is convenient for theoretical analysis; however, it is not suitable for practical applications. Therefore, binning schemes with a structure were proposed. Wyner constructed an algebraic binning scheme for noiseless coding problems in [26]. In order to extend the idea to "noisy" coding problems, the structure of nested codes was proposed [27].
We first introduce the concept of coset. Let an LDPC code C be specified by a k × n binary parity-check matrix H. The code C = {X : HX T = 0} contains all length-n binary vectors whose syndrome S = HX T is equal to 0. Given some general syndrome S ∈ {0, 1} k , the set of all length-n binary vectors X satisfying HX T = S is called a coset C S .
A nested code [27] is a pair of linear codes (C 1 , C 2 ) that satisfies: That is, each codeword of C 2 is also a codeword of C 1 . The nested parity-check codes can be constructed as follows [27]. Let H 1 and H 2 be parity-check matrices of dimension k 1 ×n and of dimension k 2 ×n, respectively, k 2 > k 1 . By bringing in an additional parity-check matrix ∆H of dimension (k 2 − k 1 ) × n, the nested codes can be realized by: We can then partition C 1 into 2 k 2 −k 1 cosets of C 2 .

MET Nested LDPC Codes
Multi-edge-type LDPC codes [21] can be considered as a generalization of regular and irregular LDPC codes. For an MET LDPC ensemble, there are multiple equivalence classes of edges, while for a conventional LDPC ensemble, there exists a single type of edge. In the following, we introduce multi-edge-type LDPC codes constructed by coset encoding.
An MET nested LDPC code can be illustrated by the Tanner graph in Figure 3. The bit vector associated with the variable nodes V , i.e., the codeword, is denoted by X. There are K types of check nodes in the graph, C 0 , C 1 , ..., C l , ..., C K−1 . The parity-check matrices, which correspond to the K types of edges connecting the variable nodes and the different types of check nodes, are denoted by H 0 , H 1 , ..., H l , ..., H K−1 , and have variable and check node degrees , respectively. The MET nested LDPC code can be described by the stacked parity-check matrix H, and we have: The definition of a multi-edge-type nested LDPC code ensemble is given in the following.

Coding Strategy for Multiway Relaying
Based on the nested LDPC codes, in the following, we illustrate the coding strategy for the multiway relay channel with full data exchange. Since the first phase is in fact a peer-to-peer transmission, we focus particularly on the transmission strategy in the broadcast phase. We start with the case of two users and one relay. We assume that the binary messages m 0 , m 1 , and m 2 are of lengths k 0 , k 1 and k 2 bits. To combine the three messages in a single transmission, the relay uses a double binning strategy: a high-rate code of length n is split into 2 nR 1 × 2 nR 2 disjoint sub-codes C i,j , with i ∈ {1, . . . , 2 nR 1 } and j ∈ {1, . . . , 2 nR 2 }, each of rate R 0 . Note that k 0 = nR 0 , k 1 = nR 1 and k 2 = nR 2 . For encoding, the relay lets the k 1 and k 2 message bits m 1 and m 2 determine which sub-code is selected, and he uses the chosen sub-code C m 1 ,m 2 for encoding m 0 . This encoding strategy can be realized by using a coset code C m 1 ,m 2 of the MET nested LDPC code that is selected by the messages m 1 and m 2 as follows: where H 0 is a (k × n) matrix, k satisfies n = k 0 + k + k 1 + k 2 , H 1 is a (k 1 × n) matrix and H 2 is a (k 2 × n) matrix. Once the Tanner graph of an MET nested LDPC code is given or, equivalently, the parity-check matrices H 0 , H 1 , and H 2 are given, the encoding can be carried out by mapping the message m 0 into a codeword which simultaneously satisfies the check constraints (3).
If d c 0 = d c 1 = d c 2 ≡ d c , the rate for encoding m 0 is: and the rates for encoding m 1 and m 2 are, respectively: and: The decoding at each user is carried out as follows. Since U 1 has perfect knowledge of m 1 , he interprets X as a codeword of a two-edge-type nested LDPC code and uses: to decode the codeword X. With the decoded codewordX, U 1 obtains m 0 and recovers m 2 by using the fact that m 2 = H 2 X T following from Equation (3). In a similar way, U 2 recovers the messages m 0 and m 1 by using m 2 as side information.
The above coding strategy can be easily extended to the multi-user case. A multiple binning technique is utilized to combine all of the messages in a single transmission. For the general case, the encoding can be realized by selecting a codeword X that satisfies: By choosing d c l ≡ d c for all l ∈ {0, 1, 2, ..., K − 1}, we get the rate for encoding m 0 as: The rate for encoding the message m l is: When decoding, each user utilizes the side information available at the receiver. We assume that the indexes of the available messages at U l form a vector v l of length P l . Then, the decoding of the codeword X (the message m 0 ) at U l is carried out by satisfying: (2) . . . (2) . . .
As for the two-user case, the other messages designated to U l can be recovered by using the decoded X and sub-parity-check equations in Equation (7).
We again have a look at the example in Figure 2. The encoding can be realized by selecting a codeword X that satisfies that:  The decoding is carried out by satisfying: at U 2 and satisfying:  In the above, we have illustrated the coding strategy using LDPC codes. In general, the regular LDPC codes suffer from poor performance. The performance can be improved by introducing irregularity to the node degrees. However, an irregular degree distribution needs to be derived to match a given channel condition, which complicates the code design. Therefore, we are interested in searching for code constructions with a good performance and a low optimization overhead. The spatially-coupled LDPC codes are then good candidates for this purpose.

Multi-Edge-Type Spatially-Coupled LDPC Codes
In this section, we first give a brief introduction of spatially-coupled LDPC codes. Then, we introduce the construction of multi-edge-type nested SC-LDPC codes. The property of the proposed codes is analyzed. We will show that any N -edge-type nested SC-LDPC code embedded in the MET structure is capacity achieving.

Spatially-Coupled LDPC Codes
A regular {d v , d c } binary spatially-coupled LDPC code can be defined by an infinite parity-check matrix: [17] where d v is the variable node degree and d c is the check node degree. We assume that at each position t (t ∈ (−∞, ∞)), the number of variable nodes is M , and accordingly, the number of check nodes is In practice, for a finite number of positions L, we have t ∈ [1, L], and the code needs to be initialized in the beginning and terminated in the end. All of the submatrices h i (t) are sparse, and accordingly, the overall parity-check matrix is sparse.
There are many variations of spatially-coupled LDPC codes in the literature [15][16][17][18]. In this manuscript, we consider a generalized type of SC-LDPC code, which can be denoted by five parameters {d v , d c , M, L, w} [18]. We assume that each of the d v edges of a variable node at position t uniformly and independently connects to the check nodes in the range [t, t + w − 1], where the parameter w is a positive integer. Ignoring the boundary effects, there are in total a number of M d v /w edges coming from all of the variable nodes at position t − τ , τ ∈ [0, w − 1], to all of the check nodes at position t. Distributing these M d v /w edges uniformly at random to the M d v /d c check nodes at position t, for each check node, each edge is connected to the variable nodes at position t − τ with probability 1/w. Therefore, each of the d c connections of a check node at position t is considered to be uniformly and independently chosen from the range [t − w + 1, t].
It has been shown analytically in [18] that, for transmission over the BEC, the BP decoding threshold of an SC-LDPC code ensemble {d v , d c , M, L, w} converges to the MAP threshold of its underlying component ensemble {d v , d c } in the limit of large M , L and w. In the remainder of this manuscript, we will use the following properties, which were derived in [18] for the BEC case: for the design rate of the code, R, we have: and for the BP decoding threshold, BP , we have: where M AP is the MAP threshold of its block code counterpart.
For a given rate R, the Shannon limit is defined as the ultimate channel parameter threshold, below which reliable communication can be achieved by using optimal codes and optimal decoding. For the BEC, the Shannon limit is Sh = 1−R. If we increase the node degrees d v and d c while keeping the ratio λ = d c /d v fixed, i.e., keeping the rate of the code fixed, the MAP threshold in Equation (11) approaches the Shannon limit, In this sense, the SC-LDPC code ensemble is capacity achieving for the BEC. This result was generalized in [19], where it is concluded that the SC-LDPC code ensemble universally achieves capacity over binary memoryless symmetric (BMS) channels. More details of code construction and theoretical analysis can be found in [18,19] and the references therein.

MET Nested SC-LDPC Codes
Based on the standard SC-LDPC code ensemble, we construct the MET nested SC-LDPC code as follows. We assume the number of variable nodes at each position to be M ; then, for a code with L positions, the codeword length is N V = M L. The connections between the variable nodes and the K types of check nodes are characterized by {d v l , d c l , M, L, w}, for l ∈ [0, K − 1]. We set the smoothing parameter w to be the same for all of the connections. Note that only edges of the same type are connected to one check node. The connections between the variable nodes and any two types of check nodes construct a two-edge-type SC-LDPC code embedded in the MET nested code. We denote the two-edge-type SC-LDPC code with the m-th and the n-th check nodes by

Properties of MET SC-LDPC Codes
In this section, we discuss the performance of the MET nested SC-LDPC codes. We have shown in [22] that, when choosing the same check degree for both types of connections, the two-edge-type nested SC-LDPC code is equivalent to a standard SC-LDPC code in terms of design rate and BP decoding threshold. Therefore, the two-edge-type nested SC-LDPC code is able to provide capacity-achieving performance in the limit of large parameters.
In the following, we extend the discussion to the N -edge-type case. We can show that an arbitrarily-chosen N -edge-type (N ∈ [1, K]) nested SC-LDPC code ensemble C Φ = {d v Φ , d c Φ , M, L, w} embedded in the MET code with node degrees {(d v l , d c l ) : l ∈ Φ} has the same design rate and the same BP threshold as a standard SC-LDPC code { l∈Φ d v l , d c , M, L, w} if d c l = d c for all l ∈ Φ. The proof can be done recursively as follows. We choose arbitrarily a two-edge-type nested SC-LDPC code C {m,n} = {d v{m,n} , d c{m,n} , M, L, w} from the MET code, where m ∈ Φ, n ∈ Φ and m = n. This code is equivalent to a standard SC-LDPC code {d vm + d vn , d c , M, L, w} when d cm = d cn = d c . The edges of type-m and type-n can then be considered as the same type of edge. Now, we chose arbitrarily a type l, l ∈ Φ, l = m and l = n and add all type-l edges to the existing structure. If d c l = d c , we obtain a code that has the same design rate and BP threshold as a standard SC-LDPC code {d vm +d vn +d v l , d c , M, L, w} and is therefore capacity achieving. We repeat the above procedure until all of the N types of edges are added to the graph. The order in which we added the new edge type to the graph does not affect the result.
Based on the above derivation, we obtain the conclusion: if d c l = d c ∀l ∈ [0, K − 1], all of the arbitrarily-chosen N -edge-type (N ∈ [1, K]) nested SC-LDPC code ensembles embedded in the MET code are simultaneously capacity achieving in the limit of large parameters.

MET Nested SC-LDPC Codes for the Multiway Relay Channel
In this section, we apply the MET nested SC-LDPC codes for the multiway relay channel with full data exchange. We will prove that the capacity region of the model can be achieved by using the proposed code structure.
Again, we start with the case of two users and one relay. When applying the spatially-coupled LDPC codes, the connections between the variable nodes and the three types of check nodes are characterized by We apply the theoretical results in Section 5.3 for the performance analysis. Following Section 5.3, the two-edge-type codes C {0,1} and C {0,2} are simultaneously capacity achieving. Based on these facts, we give the following theorem. Proof. We assume that the capacities of the two individual links are C 1 and C 2 , which together form the bound of the capacity region. The rate for broadcasting m 0 is assumed to be R 0 , and R 0 ≤ min (C 1 , C 2 ). For constructing an MET nested SC-LDPC code, we first choose a check degree d c which is the same for all types of check nodes. With this d c , we decide the variable degrees by satisfying: After determining the parameters, we construct an MET nested SC-LDPC code C = {d v{0,1,2} , d c{0,1,2} , M, L, w} as explained in Section 5.2.
Assume that the numbers of three types of check nodes are N C 0 , N C 1 and N C 2 , respectively. The number of variable nodes is N V . According to the definition of encoding rate in Equations (4)-(6), we The design rate of the code C {0,1} for U 1 is given as: Since the code C {0,1} is capacity achieving, i.e., in the limit of large M , L and w, it is easy to see that: In a similar manner, for the relay-U 2 link, we can prove that: Therefore, the capacity region can be achieved by using the MET nested SC-LDPC code. Now, we generalize to the multiway relay case. When constructing the MET nested SC-LDPC code, the connection between the variable nodes and the l-th type of check nodes is realized by the individual code {d v l , d c l , M, L, w}, l ∈ [0, K − 1]. In the following, we briefly discuss the performance of the proposed code construction in the multiway relay channel.
Theorem 5. The capacity region of the multi-user broadcast channel with full data exchange can be achieved by using multi-edge-type SC-LDPC codes.
Proof. For the given channel capacities {C l : l ∈ [1, K − 1]} and the rate R 0 , we choose the node degrees by satisfying: . For a predetermined check degree d c , there must exist a unique nonnegative solution set {d v 0 , d v 1 , ..., d v l , ..., d v K−1 } satisfying the K independent equations on condition that R 0 ≤ min(C 1 , C 2 , ..., C K−1 ) and C l ≥ C k ifS l ⊇S k for l, k ∈ {1, 2, ..., K − 1}.
We have shown in Section 5.3 that all of the N -edge-type nested SC-LDPC codes are simultaneously capacity achieving in the limit of large parameters. Therefore, the rate to be decoded at U l is asymptotically: Then, the boundary of the capacity region in Theorem 1 is achieved.

Numerical Results
In this section, we present the numerical results in terms of BP decoding thresholds and bit erasure rates (BERs) for the proposed MET nested SC-LDPC codes. The results are based on the density evolution for finite node degrees and based on simulations with finite code lengths. Without loss of generality, we only include the results for the two-way relay channel. The results for the multiway relay channel present the same characteristics, and therefore, they are omitted here.
Since we have shown in Section 5.3 that both the two-edge-type nested SC-LDPC codes C {0,1} and C {0,2} are capacity achieving, we consider only C {0,1} for the performance evaluation. We set the parameters as d v 0 = 3, d c = 10, w = 3 and L = 100. Different variable degrees d v 1 ∈ {1, 2, 3, 4, 5, 6} are used to realize different sum rates R 0 + R 2 , where the tradeoff between R 0 and R 2 is controlled by d v 2 , which is upper bounded by d v 2 ≤ d c − (d v 0 + d v1 ) (see also Equations (4)-(6)). The results over BECs are summarized in Table 1. For the purpose of comparison, we also provide in Table 2 the results for regular LDPC block codes with the same node degrees. For each given degree setup, we calculated the gap between the Shannon limit and the BP threshold, which indicates how far the achievable rate at U 1 is from the boundary of the capacity region. We can see that the two-edge-type code C {0,1} , which is decoded at U 1 , exhibits significantly smaller gaps to capacity compared with its block code counterpart. In particular, regular LDPC block codes suffer greatly from larger gaps for lower rates. We observe a similar phenomenon for SC-LDPC codes, but the gaps are in general much smaller. In addition, the gaps can be further narrowed if we increase L for a given w or if we increase w while keeping the design rates fixed by choosing proper L. When both w and L are sufficiently large, the gaps for all degree distributions tend to disappear. Similarly, we give the BP thresholds of SC-LDPC codes and regular LDPC block codes for BI-AWGN channels. The parameters are the same as in the BEC case, and the results are summarized in Tables 3  and 4. As for the BECs, the SC-LDPC codes clearly outperform the regular LDPC block codes in terms of the gap to the capacity.  In the following, we provide the simulation results for the SC-LDPC codes with finite code lengths over BECs. The bit erasure rates are plotted in Figure 4 together with the BP thresholds of the corresponding ensembles. The node degrees (d v 0 , d v 1 , d c ) are listed in the legend, and we set M = 1000 and L = 100. It can be seen that the MET SC-LDPC codes generally provide good performance over BECs. Similar observations can be obtained in BI-AWGN channels, and the results are omitted here. We also want to point out that the complexity and latency due to the encoding and decoding of SC-LDPC codes are not an issue for their applications in practice, since SC-LDPC codes allow recursive encoding and sliding-window decoding.

Conclusions
In this manuscript, we proposed multi-edge-type spatially-coupled LDPC codes through coset encoding for the multiway relay channel with full data exchange. This model has various applications in wireless sensor networks, and we have provided a practical coding solution for the communication aspects of the model. We have proven that an arbitrarily-chosen N -edge-type SC-LDPC code embedded in the multi-edge-type construction is capacity achieving. By applying the above code construction to the broadcast phase of the multiway relay channel, each user recovers the message from the relay and all of the other users based on the receiver side information. We have proven that the capacity region of the specific model can be achieved by using the proposed construction. Numerical results were provided in both binary erasure channels and AWGN channels, which verified the theoretical analysis.

Author Contributions
Zhongwei Si and Ragnar Thobaben developed the proposal of the study for the model of bidirectional relaying with a common message. Zhongwei Si and Junyang Ma extended the study to the multiway relay channel with full data exchange. Zhongwei Si carried out the simulations and took care of most of the writing. Junyang Ma and Ragnar Thobaben made corrections of the manuscript. All authors have participated in the discussions and did a general review of the manuscript.

Conflicts of Interest
The authors declare no conflict of interest.