Relay-based topologies are widely used in modern wireless networks to extend transmission range and to utilise spatial diversity in order to improve communication reliability. For example, in body sensor networks, intermediate nodes are commonly deployed to relay data to monitoring devices . Nevertheless, such networks are often characterised by poor reliability at the physical layer, resulting in frequent retransmissions requested by the upper layers. In this context, the idea of Application Layer Forward Error Correction (AL-FEC) , where the underlying layers are abstracted as a packet erasure channel and coding is performed over packets rather than bits, has attracted significant interest over the years.
Traditional AL-FEC schemes are based on the so-called fountain codes [3, 4]. However, fountain codes usually operate efficiently with large block sizes and are applied on a single-hop basis, i.e., requiring decoding followed by re-encoding at each hop . By contrast, the idea of linearly combining packets using random coefficients, known in the literature as Random Linear Network Coding (RLNC) [6, 7], dictates simple recoding at each hop, thus inherently supporting multihop topologies. It was proved that RLNC is capacity-achieving in the context of multicast wireless networks [8, 9].
In networks operated under RLNC, the source message of packets is encoded by creating random linear combinations of the packets . To recover the source message, the traditional requirement is to collect linearly independent sets of coefficients at the destination node. This approach, also referred to as full-rank decoding, will be employed in this work. It should be noted that alternative, rank-deficient decoding techniques, whereby the source message can be recovered from less than linearly independent sets of coefficients, have also been considered in the literature .
Several efforts to analyse the performance RLNC applied to relay networks are present in the literature. Multiple-source, multiple-relay two-hop networks were studied in [11, 12, 13]. In , each source node was designed to transmit a single uncoded packet, while each relay node encoded packets it received into a single linear combination and forwarded it to the destination node. An exact expression for the probability of successful decoding was derived, assuming that at most one of the source-relay links failed and that communication between the relays and the destination was error free. More general scenarios involving sparse RLNC  were considered in , for which lower and upper bounds were proposed. More accurate bounds were subsequently derived in . In both [12, 13] the degree of sparsity was determined by packet loss, which led to poor code performance in certain scenarios. Furthermore, it should be noted that in all three studies [11, 12, 13], only a single packet was assumed to be transmitted by any source or relay node, and the number of necessary relay nodes was set to be equal to the number of required coded transmissions. As a result, a large number of relay nodes was required to provide reliability, which is often impractical.
Another common assumption in [11, 12, 13] was that the source nodes transmit uncoded packets. Encoding at the source node was considered in  for a single-source single-relay network with a direct link between the source and destination nodes. It was demonstrated that encoding at both source and relay nodes has performance gains compared to encoding at the relay only. The analysis, however, was performed assuming an infinitely large field size, which in practice is limited [16, 17]. A finite field size was considered in , where the relay node attempts the decoding of the source message, followed by recoding. Using the terminology of relay networks, such scheme can be referred to as Decode-and-Forward (DF). However, the analysis in  was based on the assumption that the relay and destination nodes receive uncorrelated subsets of packets from the source. As a result, the derived performance bounds were accurate only under certain network scenarios. The correlation was taken into account in , where an exact expression for the probability of successful decoding for a single-relay network operating under the DF scheme was derived. Furthermore, the DF scheme was complemented with a passive relay mode, in which if the relay is not able to decode, it simply re-transmits the packets it received from the source to the destination.
In this work, we address the limitations of the previous studies of relay networks employing RLNC and provide the following contributions:
We generalise the single-relay scenario considered previously in [18, 19] to an arbitrary number of relays. In contrast to [11, 12, 13], we enable encoding at the source node to further mitigate packet loss. In addition, we generalise the approach of [11, 12, 13] by allowing each relay node to transmit multiple coded packets, thus resulting in a fewer relays to achieve reliable communication. We propose a tight upper bound for the probability of successful decoding, which is exact in the case of a single relay. We also propose an approximation of the bound, which is accurate for networks with a sufficiently large number of relays.
Compared with the DF scheme employed in [18, 19], we consider a different relaying strategy, whereby the relay nodes do not attempt to decode, but simply recode the packets they receive from the source. Once again employing the terminology of relay networks, we call such scheme Recode-and-Forward (RF). The RF strategy follows the original idea of RLNC, in which every transmitting node in the network performs random linear combinations of the packets in its buffer. Comparing with DF, the RF scheme is expected to provide better reliability, since the relay nodes are likely to transmit more packets.
We perform thorough benchmarking of the proposed analytical results via extensive Monte Carlo simulation for various network and code parameters. In particular, we demonstrate that the proposed bound is exact for a single relay and is tight for an arbitrary number of relays.
We demonstrate the benefit of RLNC-based coding compared with an uncoded scenario and a repetition code in terms of throughput. In addition, we benchmark the proposed RF relaying strategy with the DF scheme, as well as with a case of no coding at the source node.
The remainder of the paper is organised as follows. Section II describes the system model and provides some background results. Section III presents theoretical analysis, starting with a general case of an arbitrary relay, followed by some special cases. In Section IV, the proposed results are compared with simulated ones and a throughput analysis is presented. The conclusions are drawn in Section V.
Ii System Model and Problem Formulation
A single-source network with relays is depicted in Fig. 1. The goal is to successfully deliver a message of equally-sized source packets from the source node to the destination node with the help of the relay nodes , . Let , , and denote packet erasure probabilities (PEP) of links , , and , respectively.
In the RF scheme considered in this work, the transmission is performed in two stages. During the first stage, the source node broadcasts coded packets. For encoding, we employ non-systematic RLNC, traditionally used in multihop networks due to its simplicity and scalability . Each coded packet is a linear combination of the source packets with the coefficients drawn uniformly at random from a finite field of size . Let , , denote the number of coded packets received by , and let denote the number of coded packets received by from . It is assumed that each receiving node knows the coding coefficients associated with every packet it receives, which can be achieved by transmitting the coefficients in the packet header . Each relay can therefore construct an matrix of coefficients , , while the destination node can reconstruct an matrix of coefficients .
During the second stage of the RF scheme, each relay node recodes the packets it received from into packets and transmits them to . For recoding, the -th relay node generates a new matrix of random coefficients and applies it to its received packets. Since the code is linear, this is equivalent to encoding the original, source packets by a new, recoded set of coefficients arranged in an matrix , . The new recoded coefficients are transmitted from each relay in the packet headers.
Let denote the number of packets the destination node receives from , . Node can therefore reconstruct rows of matrix . After stacking the reconstructed rows from all relays together, in addition to the rows recovered directly from , a total matrix of coding coefficients reconstructed by is obtained:
is an matrix of all recoded coefficients received from the relay nodes, , and denotes an matrix of recoding coefficients obtained from by removing rows corresponding to packets lost between and . The destination node can recover the source message if matrix (1) has rank . Our goal will be to characterise the performance of such network in terms of probability of successful decoding, which will be also referred to as decoding probability.
Ii-a Theoretical Background
We now present some relevant results in the area of RLNC that we will use throughout the paper.
Consider first a single-hop point-to-point link with PEP . The decoding probability of a message of packets after coded transmissions is expressed as follows :
denotes the probability mass function (PMF) of the binomial distribution,i.e., the probability of successes out of independent trials with success probability , calculated as follows:
is the Gaussian binomial coefficient .
Structured matrices of elements generated uniformly at random from have been also studied the literature. In particular, it was shown in  that for a block matrix formed by two vertically stacked matrices and with dimensions and , the probability that has rank , given , is given by
where and the summation is performed over the values of from to .
|Number of packets forming an information message|
|Number of coded packet transmissions from|
|Number of coded packet transmissions from each|
|Size of the finite field under consideration|
|Number of relay nodes|
|PEP between and|
|PEP between and|
|PEP between and|
|Number of packets received by from|
|Number of packets received by from|
|matrix of coding coefficients received by from|
|matrix of coding coefficients received by directly from|
|matrix of recoding coefficients generated by|
|matrix of recoded coefficients received by from all relays|
|matrix of all coding coefficients collected by|
|Decoding probability for a point-to-point link with coded transmissions and PEP|
|PMF of the binomial distribution: the probability of successes out of trials with success probability|
|Probability that an matrix of elements generated uniformly at random from is full rank|
|Probability that an matrix of elements generated uniformly at random from has rank|
|Joint probability that two matrices with common rows have rank|
The notation introduced in this section is summarised in Table I.
Iii Theoretical Analysis of Decoding Probability
During the first transmission stage in the relay network described in Section II, the source node multicasts to the relay and destination nodes. Each transmitted packet can be received by a single relay, a selection of at least two relays or by none of the relays. As a result of receiving common packets, the matrices of coding coefficients reconstructed by the relay nodes may have shared rows and are therefore correlated . In total, there are groups of packets corresponding to all possible combinations of at least one relay.
Let denote a matrix constructed from the union of all rows of , such that each row occurs in only once. Let denote the number of rows of . For the -th row of , , let the indices of the relays that simultaneously received the corresponding packet be denoted as . We now construct an equivalent recoding matrix such that matrix (2) can be expressed as follows:
To this end, the elements of at the intersection of the -th group of rows, corresponding to the -th relay, , and the -th column, , are taken from the column of corresponding to the -th packet if , or set to zeros otherwise. In other words, in (10) can be thought of as a global matrix of unique coding coefficients received by all relays, while can be thought of as a global matrix of recoding coefficients. It should be noted that no assumptions are made on whether any given relay node is aware of common packets it shares with other relays, and (10) is just a more compact, equivalent representation of (2).
Let . Without loss of generality, let the rows of coefficients received by a subset of relays be grouped together. For instance, matrix can be written in the following form:
where contains the rows of coefficients common to all three relays, and , , contains the rows shared between the -th and -th relays. In total, matrix consists of vertical blocks. The corresponding equivalent matrix has the following structure:
Here, matrices , , are composed of the columns of that correspond to the packets received by all three relays, while matrices , , are composed of the columns of that correspond to packets shared between the -th and -th relays. The zero matrices correspond to packets not received by at most two relays. To see that matrix contains all rows of given by (2), consider the following numerical example. Let and assume that each relay received two packets from the source and reconstructed the following matrices of coding coefficients:
where one packet is shared by and , and another is shared by and . Assume also that the destination node received two packets from each relay and recovered the following matrices of recoding coefficients:
Matrix can be constructed from the union of all rows of as follows:
which corresponds to the following matrix :
Here, the first column of , for instance, corresponds to the packet shared by and : its first two elements form the second column of , the second two elements form the first column of and the last two elements are set to zero. It can be seen that matrix contains all rows of coefficients received by the destination node determined by (2).
As described in Section II, the destination node can recover the source message if matrix of all coding coefficients reconstructed by the destination node, given by (1), has rank . Let define such event:
We now address the problem of finding the probability of .
Employing (10), matrix can be expressed as follows:
where is an identity matrix. By analogy to the correlation effect between the relays, a packet received by a subset of relays can also be received by . Let denote a subset of rows of corresponding to such packets, and let denote the number of these packets. Using this notation, it can be observed that the columns of with indices from create linear combinations of coding coefficients already known by , hence the rank of does not depend on the elements in these columns. Let the remaining columns of , corresponding to packets with indices , form an matrix , and let denote its rank. From (12), it can be observed that given , matrix will have independently generated rows. Therefore, employing (5) and marginalising over the distribution of , the probability that has rank can be calculated as follows:
where is chosen such that and .
), it is clear that the probability distribution of the rank of matrixneeds to be calculated. As can be observed from Example III.1, even for , matrix , and hence matrix , has a complex structure. Even if the rank distribution was calculated exactly, enumerating all possible combinations of numbers of received packets and marginalising over their distributions would produce a result too complex for practical use.
Instead of finding an exact expression for the probability that has a certain rank, we establish the following bound:
The probability that the matrix has a certain rank is upper-bounded as follows:
where is the probability that an matrix of random coefficients has rank , which is given by (6).
It can be observed that bound (14) is based on replacing deterministic zero elements in arising from the packet loss between the source and relay nodes with random elements generated from . Intuitively, allowing those elements to be non-zero increases the probability of the matrix to have the same rank, hence the bound is an upper one. The equality in (14) will correspond to the case when all relays share the same set of received packets; in other words, when there are no deterministic zero elements in .
Bound (14) is expected to be tighter for lower PEP values between the source and relay nodes. Indeed, in such case a packet transmitted by is more likely to be received by all relays, thus making the number of zero elements in smaller. Furthermore, for the specific case of a single-relay network, (14) turns into an equality.
The probability of event that the matrix of coding coefficients at the destination node has rank is upper-bounded as follows:
where and the right-hand side is a joint probability that two matrices with dimensions an and with common rows are simultaneously full rank, which is given by (9).
See Appendix A.
Having obtained the upper bound for the probability that the matrix of coding coefficients at the destination node has rank for given , , and , we now formulate the bound for the overall decoding probability of the -relay network:
The decoding probability of an -relay network operated under the RF scheme is upper-bounded as follows:
, and the summation is performed over the following values:
Consider the upper bound (15
). It can be observed that this probability depends on several random variables:, the total number of unique packets received by all relays, , the number of packets received by from , , the number of packets commonly received by at least a single and , and , the total number of packets received by from all relays. Consider the first three variables - , and - describing possible numbers of packets received from at the first transmission stage. As was shown in [19, 23], their joint PMF is that of the multinomial distribution, which describes the probability of a particular combination of numbers of occurrences of mutually exclusive outcomes out of trials and is given by (17). Here, the collection of source-to-relay links is considered as a single link with an equivalent PEP . On the other hand, the total number of packets received at the second stage, , is a sum of independent random variables , , each described by the binomial distribution . By marginalising the right-hand side of (15) over the distribution of all variables in question, (16) can be readily obtained. The starting values of , and are chosen such that at least packets are collected by in total. The starting value of is chosen such that it equals if and otherwise, to avoid unnecessary summation terms.
We now consider some special cases of the -relay network described in Section II.
Iii-a Single-relay Network
When the network has only a single relay (), matrix , defined by (10), and hence matrix , obtained from by removing columns, does not have any deterministic zeros. As a result, bounds (14) and (15), and therefore the proposed bound (16), become exact. The decoding probability can be calculated as follows:
Comparing (19) with (16), it can be seen that the bound for the general case of an arbitrary approximates the -relay network as a single-relay one, with an equivalent source-to-relay link having the PEP equal to . During the second transmission stage, the equivalent relay performs rounds of coded transmissions with the PEP in each round, .
Iii-B Multiple-relay Network,
In the case when there is no communication between and , i.e., , the destination node does not receive any packets at the first transmission stage. In other words, . As a result, the bound of Lemma III.2 turns into the probability of two uncorrelated matrices with and rows having rank :
In addition, the multinomial distribution (17) becomes binomial. Consequently, can be rewritten as follows:
Noting that does not depend on and employing (3) yields
It can be observed that bound (22) consists of two independent parts. Indeed, the first term in (22) is the decoding probability of a point-to-point link he PEP equal to . The remainder of (22) is the decoding probability of another point-to-point link, in which rounds of coded transmissions with the PEP in each round are performed, . In other words, by analogy to the general case of , bound (22) treats the multiple-relay network as a single-relay equivalent. In the special case of a single relay, bound (22) becomes exact, as in the case of :
In other words, the decoding probability of a single-relay network is the product of those for each individual link (hop)111Naturally, the result can be generalised to networks with any number of hops, also known as multiple-link tandem networks .
Iii-C Approximation of Bound (16)
From the general expression for the bound of the decoding probability (16), it can be observed that it contains multiple nested summations, the number of which grows with , the number of relays in the network. As a result, bound (16) is only of practical use when the number of relays is relatively small. In this section, we propose a simple approximation of the bound, the complexity of which does not depend on the network size.
Consider an matrix of elements generated uniformly at random from , . It is well known  that the probability of this matrix having full rank, given by (5), depends largely on , rather than on . In addition, for a sufficiently large , this probability is close to one. Indeed, consider Fig. 2 illustrating the probability that the matrix is rank-deficient, which is equal to , as a function of for different values of . It can be observed that can be closely approximated to when , with the approximation error not larger than regardless of .
Consider now the last term in (16), the joint probability that two matrices with dimensions an and with common rows are simultaneously full rank. The first matrix has a number of rows equal to the total number of packets received by the destination node. The expected value of this number can be calculated as follows:
where for simplicity it is assumed that and , and
denotes the code rate. The matrix is expected to be full-rank with a high probability if the following condition holds:
where, based on Fig. 2 and the discussion earlier, can be set to .
Consider a network with , , and . Condition (26) holds for if the number of relays .
We now formulate a simplified version of bound (16).
Proposition III.2 (Simplified bound)
The decoding probability of an -relay network is upper-bounded by the simplified version of bound (16) as follows:
where is the decoding probability of a point-to-point link with PEP
Consider the last term in (16), the joint probability of two correlated matrices being full rank. If condition (26) holds for a sufficiently large , the first of the two matrices, the one with dimensions , is full rank with a high probability, resulting in the following tight bound:
It can be observed that bound (29) depends only on , the total number of unique packets received by the destination node and all relays nodes. Let denote this number. By viewing the destination node and all relay nodes as a single equivalent node receiving packets from the source, can be thought of as a number of successes out of trials with success probability , where is given by (28). In other words, is distributed binomially with the PMF equal to . By marginalising bound (29) and employing (3), (27) can be readily obtained.
It can be observed that the proposed simplified bound does not depend on the PEP of the relay-to-destination links, assuming that there are enough recoded transmissions during the second stage to provide the required number of linearly independent sets of coding coefficients to . Under this assumption, to achieve successful decoding, it is sufficient to collect linearly independent sets of coding coefficients during the first stage. The new approximation is tight to the original bound (16) as long as condition (26) is satisfied. From (26), it can be seen that the simplified bound becomes tighter as the number of relays increases, which makes it a suitable alternative to (16) for larger networks, as will be demonstrated in Section IV.
Approximating the decoding probability of the network in question to that of an equivalent point-to-point link allows various RLNC analysis tools, existing in the literature in the context of point-to-point communication, to be applied to relay networks. For instance, the expected number of transmissions required to deliver a message over a point-to-point link was studied in 
by viewing the decoding probability as the Cumulative Distribution Function (CDF) of the number of overhead packets,. Other performance metrics, such as throughput and coding gain, can also be derived from the decoding probability. Finally, the simplicity and scalability of bound (27) enables comparison with other relaying strategies without resorting to extensive simulations, which will be illustrated in Section IV.
Iv Numerical Results
In this section, we analyse the performance of the -relay network described in Section II via Monte Carlo simulation and compare the results with those predicted by the derived analytical framework. For Monte Carlo simulation, we employed the Kodo C++ network coding library . Each simulated result was obtained by averaging over iterations. For simplicity, it was assumed that all links have the same PEP , and all links have the same PEP , . In addition, each node was assumed to transmit the same number of coded packets .
We start with a single-relay network and compare the results predicted by the exact expression (19) with simulated ones. Fig. 3 illustrates the decoding probability as a function of the number of transmissions for various combinations of the source message size , finite field size and PERs , and . It can be observed that the performance predicted by the exact expression (19) perfectly matches the simulated results in all cases.
We now consider two- and three-relay networks and employ the upper bound (16) to predict the theoretical results, as illustrated in Fig. 4. It can be observed that bound (16) accurately predicts the performance in the case of for both finite field sizes, and in the case of for . The reason is that for the smaller , the relays are likely to share more packets, thus making approximation (14) closer. When the field size is large, the accuracy of bound (14) is high regardless of , because matrix is likely to be full rank. On the other hand, a slight gap can be seen in the case of and the binary field. Again, this is explained by smaller correlation between the relays as increases, which results in a larger number of deterministic zeros in matrix and looser bound (14). The gap, however, appears to be smaller for the larger and .
To illustrate the point further, Fig. 5 plots the Mean Squared Error (MSE) between bound (16) and simulated results as a function of the number of relays , for different numbers of relays and different values of and . The MSE was obtained by averaging the squared absolute difference between bound (16) and simulated results over all possible numbers of transmissions from to . For , the MSE is of the order of and is due to the averaging error of the Monte Carlo method. The MSE stays at this level as the number of relays increases, provided that . In contrast, for , the MSE increases sharply for and then gradually reduces as the number of relays grows. To understand this phenomenon, consider again matrix . The expected number of its rows and columns is equal to and , respectively. Clearly, the difference between the two increases with , and for a sufficiently large matrix is full rank with a high probability, despite the presence of fixed zeros due to packet loss. In other words, both sides of inequality (14) will get closer to as increases, thus making bound (16) tighter. For the same reason, the accuracy of the bound increases with .
We now investigate the accuracy of bound (27), a simplified version of bound (16). Fig. 6 illustrates the comparison between bound (27) and simulated results for up to relays, for two values of and the code rate , corresponding to and coded transmissions, respectively. The finite field is binary and the PERs of the links originating at are fixed to and this time, but varies from to . As a reference, the decoding probability calculated based on the original bound (16) is also shown for . It can be observed that the simplified bound is accurate for if for both values of , and for and if for and , respectively. This is in line with condition (26), which predicts the same values if . At the same time, when the PEP between the relays and the destination node becomes high, such as , bound (27) is tight only for a relatively large number of relays, and for and , respectively, which is again in line with (26). It should be noted, however, that the network configuration with , shown in Fig. 6, requires either a large number of relays or a much lower PEP between and to provide reliable delivery, and in both cases bound (27) becomes tight. Finally, condition (26) also predicts that the simplified bound becomes tighter as increases for a given , which is evident from Fig. 6.
Iv-a Throughput Analysis
Motivated by the results so far, we now employ the simplified bound (27) to analyse system throughput and compare it with other coding and relaying approaches. To this end, we consider the decoding event as the successful delivery of a message of packets, given transmissions, and therefore define the Application-Layer throughput based on the decoding probability and the code rate (25) as follows:
We first compare the throughput of the proposed RLNC scheme with that of an uncoded system (), in which the source packets are transmitted as they are. In addition, we consider a rate- repetition code, whereby each source packet is transmitted twice, from both the source and each relay node. The throughput in the latter case can be calculated as follows:
which, by letting , characterises the throughput of the uncoded system. Fig. 7 illustrates the results for , , and , for different code rates and finite field sizes for the RLNC scheme. Based on condition (26) and the selected parameters, the simplified bound (27) is expected to produce values very close to the original bound (16) for . In the case when , it can be seen from Fig. 7 that the RLNC scheme with significantly outperforms the system without coding for . The RLNC scheme with and achieves the maximum throughput when the number of relays is , compared to for the uncoded system. In the case when , even the binary RLNC scheme with can achieve the same throughput as the uncoded system with relays, but having just relays. It can also be observed that with the larger PEP between the source and relay nodes, having a lower code rate is more beneficial if the number of relays is small. As regards the repetition code, it is clearly inferior to RLNC.
We now compare the throughput of the proposed scheme with other RLNC-based coding and relaying strategies. We consider three schemes: RF, analysed in this work, DF, briefly described in Section I and analysed in [18, 19] for a single-relay network, and the RF strategy in which coding is performed only at the relay nodes, which will be referred to as Code-and-Forward (CF). The decoding probability of the CF scheme can be approximated by the same simplified bound (27) as for the RF scheme by letting and assuming no coding at , thus resulting in the following bound:
In other words, decoding is successful if the union of the packets received by all relays and the destination node from has size . This bound does not depend on the finite field size and the number of coded transmissions of the relay nodes . Therefore, it will be assumed that the code rate of the CF scheme is equal to and the code is binary. As regards the DF scheme, due to the absence of the analytical results in the literature, the throughput of this scheme will be evaluated via simulation. Fig. 8 illustrates the comparison between the three relaying strategies, for , , , and different code rates and finite field sizes where appropriate. It can be observed that the RF scheme provides a higher throughput than the DF strategy, especially with the larger and the higher code rate. Indeed, for such scenarios, the relays operating under the DF scheme are not likely to decode and therefore will simply retransmit a fraction of packets transmitted by the source. By contrast, the relays operating under the RF scheme will always transmit coded packets, thus increasing the probability of collecting linearly independent vectors of coding coefficients at . In other words, it is more beneficial not to perform decoding at the relay nodes, but instead simply recode received packets. This is in line with the theoretical results reported in [8, 9] for classic RLNC, on which the RF scheme is based.
Compared with the CF strategy, the RF scheme employing binary codes is generally inferior for , while the non-binary RF scheme with provides the same throughput. Clearly, when packet loss between the source and relays is small, coding at is redundant. However, when , the RF scheme with becomes advantageous over the CF approach for . In other words, coding at is beneficial if the PEP between the source and relays is high, unless the number of relays is sufficiently large to mitigate the packet loss.
Table II summarises the throughput results for all schemes considered in this section and highlights the best throughputs in bold.
|RLNC RF, ,|