A residual-energy-activated forwarding protocol using relay ordering and finite field network coding for multiple-source multiple-relay wireless sensor networks

Combining with finite field network coding, relay ordering is significant for the transmission reliability of multiple-source multiple-relay wireless sensor networks. However, it leads to severe energy consumption and is harmful to the lifetime of the network. To overcome the drawback of relay ordering and achieve desired trade-off between energy efficiency and transmission reliability, a residual energy-activated forwarding protocol is proposed in this article. In the protocol, by considering the unique characteristics of relay ordering–finite field network coding, a novel metric is proposed to jointly formulate both energy consumption and transmission reliability into one optimization problem. Based on this, the appropriate numbers of cooperative relays are selected to reduce energy consumption. Furthermore, by solving the proposed optimization problem in various cases, the optimization process is transferred to three sub-problems, and the corresponding strategy is developed to maximize the proposed metric accordingly. Extensive simulation results verify the superiority of the proposed protocol in both energy efficiency and transmission reliability.


Introduction
Cooperative communication (CC) 1 is a promising approach to combat multipath fading effect in wireless channels. A single-antenna source node that uses CC can share its data packet with relay nodes, and then, the multiple copies of the packet from the relays and the source can generate the virtual multiple-input-singleoutput system at the intended receiver, so as to achieve the diversity gain of multiple-antenna and enhance transmission reliability. Besides, another advantage of CC is to extend the communication range, which has been extensively studied in multi-hop cooperative wireless sensor networks (WSN). [2][3][4][5] With proper relay selection and scheduling, more routing choices can be provided by CC to reduce network delay. The above two merits make CC very attractive for WSNs.
However, due to the poor spectral efficiency (SE), it is challenging to design proper CC scheme in multisource multi-relay wireless network, 6,7 because the relays have to consume a large amount of orthogonal channels to receive and forward the packets from multiple sources, which are huge expenses for the network. To handle this issue, network coding (NC) 8,9 has been actively extended to this scenario, for example, a multisource CC scheme based on finite field network coding (FFNC) was proposed in Xiao and Skoglund, 10 where multiple sources share one common relay. Instead of forwarding packets for each source individually, the common relay combines all the packets from the sources as one NC packet, so as to reduce the total forwarding packets. In Xiao et al., 11 this scheme was extended to the multiple-source multiple-relay network (arbitrary M sources communicate to a common sink node with the aid of arbitrary N relays), and the diversity gain was proved to be identical to conventional CC protocols. 6,7 Furthermore, to fully exploiting the links between the relays, a relay ordering 12,13 (RO) algorithm based on FFNC was developed for multiple-source multiple-relay WSN in Cheng and Yang,14 where the transmission reliability was proved to be improved greatly.
So far, all the above literatures only focus on the SE performance. Recently, with rapid development of information technology, energy consumption and energy efficiency (EE) 15 are becoming more and more important in the network protocol design, especially for WSN, where the sensor nodes are usually of huge number and powered by limited batteries. Moreover, for most popular WSN, 16,17 the receiver energy consumption is comparable to the transmitter one. This fact indicates that the scheme in Cheng and Yang 14 is less reasonable from EE perspective, because the relays that fail to decode from the sources are always permitted to receive packets from other relays.
To overcome the drawback of RO and achieve desired trade-off between EE and transmission reliability, this article proposes a residual energy-activated forwarding protocol using RO and FFNC for multiplesource multiple-relay WSN. The main contributions are summarized as follows: By considering the unique characteristics of RO-FFNC, a novel metric is proposed to evaluate both the energy consumption and transmission reliability, and to maximize it, the cooperative relay selection is formulated as an optimization problem. By solving the problem, the appropriate number of cooperative relay is decided. To reduce the complexity of the problem, it is transferred into three sub-problems, and the corresponding strategy is developed accordingly. On the basis of that, a residual energy-activated forwarding protocol is proposed. Extensive simulation results are presented to compare the proposed scheme with RO-FFNC in Cheng and Yang, 14 FFNC in Xiao et al., 11 and binary XOR NC in Chen et al. 18 The compared items include lifetime and transmission reliability, which provide a comprehensive evaluation from both EE and transmission reliability perspectives.
The remainder of this article is organized as follows. The related works are surveyed in section ''Related work.'' Network model and problem formulation are presented in section ''Network model and problem formulation.'' The proposed protocol and analysis are presented in section ''The proposed protocol.'' Simulation results are presented in section ''Simulation results.'' Finally, the conclusions are provided in section ''Conclusion.''

Related work
Minimizing the energy consumption of WSN has drawn significant attention of the researchers. In Chang and Tassiulas, 19 the theoretical approach was developed to optimize the lifetime of WSN when the transmitter power control was available. In the proposed model, CC was not considered and all the links between the source and the sink nodes are conventional sing-inputsingle-output (SISO) case. Khandani et al., 20 Maham et al., 21 and Tan et al. 22 investigated energy-efficient transmission for CC network, where the diversity gain of VMISO was employed to reduce the transmitting powers of relays. However, to simplify the problem, these works ignore the receiver circuit energy consumption.
By considering both receiver and transmitter circuit energy consumption, 4 employed CC to mitigate energy hole problem in multi-hop WSN. In the proposed scheme, CC was selectively applied as the tool to balance energy consumption between the relays, so that only the minimum transmitting power was used. It was also proved that the lifetime can be extended by factors of two or more. Furthermore, by considering some characteristics and variable definitions, the problem in Jung and Ingram 4 was formulated and solved by linear programming in Jung and Weitnauer, 23 where the optimal lifetime was achieved. In these literatures, CC was employed as the conventional manner, while NC was not taken into consideration.
To achieve both high efficiency and low complexity, in Gou et al., 24 an NC-based scheme targeting to maximize total transmission gain is proposed. In the scheme, NC is utilized to compress the computational overhead; hence, the EE is improved both in data transmission and processing. In Iqbal and Lee, 25 NC is combined with channel coding to reduce the energy consumption and improve the transmission reliability for underwater environment. In the scheme, NC is also used to compress data. In Gehlaut et al., 26 NC, duty cycle, and clustering technologies are integrated to improve the lifetime of WSN, and the advantage of NC in EE is evaluated by NS-2 platform. However, in these works, the transmission reliability and energy consumption are considered separately, which may not achieve desired trade-off between them.
However, to optimize the transmission reliability and energy consumption jointly, a new metric was developed in Li et al., 27 where the circuit energy consumption was also considered. Under the proposed metric, the energy consumption per unit transmit distance was optimized by selecting the appropriate number of cooperative relays, which is insightful for the problem formulation of this article.
Similar to Li et al., 27 in this article, a novel metric for minimizing the energy consumption per unit transmission is proposed for the multiple-source multiple-relay WSN deployed with RO-FFNC. The problem is formulated under proper transmission reliability constraints, where both transmitter and receiver circuit energy consumptions are considered.

System model
The system model of multiple-source multiple-relay WSN is illustrated in Figure 1, where N relays are deployed for data forwarding from M source nodes to a common sink. The forwarding process is divided into multiple access (MA) and broadcast (BC) phases. In MA phase, as shown in Figure 1(a), each source node Si broadcasts its data I i at rate R on the orthogonal channel, i = 1, . . . , M, while each relay node rj, j = 1, . . . , N , and the sink keep listening and receive the signals. Thus, after the broadcasting of Si, the received signals at rj and sink can be written as in which E s is the transmitting power of the sources. Y Si, rj and Y Si, D are the received packets at relay node rj and the sink, respectively. X Si are the packets of source node Si, which carry its data I i . h Si, rj is the channel gain between Si and rj. Similarly, h Si, D is the one between Si and the sink. The channel gains capture the blockfading effect of the wireless channel and are modeled as zero-mean, independent, circular-symmetric complex Gaussian random variables with variances s 2 Si, rj and s 2 Si, D . n rj is the background noise at rj, which is a Gaussian random variable with zero-mean and variance N 0 . Also, n D is the background noise at the sink.
In BC phase, the cooperative relays are selected according to the reception situation. For each relay rj, if it successfully receives M packets from all the source nodes, it will utilize FFNC and combine the data as where C rj is the coding coefficient of rj. After that, rj is selected as the cooperative relay, and forwards X rj to the sink. Due to the BC nature of the wireless channel, when rj transmits to the sink, the other relays can also receive the signal. Hence, the received signals at sink and ri can be expressed as where E r is the transmitting power of the relays. If rj fails to receive all the packets from the sources, it will not be selected as cooperative relay and forward no packet to sink in BC phase. After MA and BC phases, the sink will recover the data ½I 1 , . . . I i , . . . I M from all the received packets. According to the principle of FFNC, if sink successfully receives not less than M packets from both sources and cooperative relays, ½I 1 , . . . I i , . . . I M can be recovered, otherwise, the system experiences outage.

Variable definitions
Before problem formulation, some necessary items are defined in Table 1 to capture the energy consumption of the investigated network.  Figure 2 shows the Venn diagram of A, A un , A Tx , A su , and A rec , and the relationship between these sets is illustrated.
The outage probability of the link between Si and rj is defined as where I Si, rj = log (1 + h Si, rj 2 r)=2 is the instantaneous mutual information between Y Si, rj and X Si, rj , and r = E s =N 0 is the signal-to-noise ratio (SNR). b = (2 2R À 1)=r, l Si, rj = 1=s 2 Si, rj is the parameter of h Si, rj 2 , which is exponentially distributed. Similarly, P ri,rj can be calculated with equation (6) by replacing the parameters of Si with the ones of ri. Moreover, we define the lifetime of the investigated WSN as the time when the first relay exhausts all its energy, which is widely used in Jung and Ingram, 4 Tan et al., 22 Jung and Weitnauer, 23 and Gou et al. 24 Finally, we define per transmission as the whole CC transmission, which includes both MA and BC phases.

Problem formulation
To minimize the energy consumption of cooperative relays, Jung and Weitnauer 23 and Gou et al. 24 proposed a two-step solution for problem formulation, that is, how many and which relays should be selected as the cooperative ones. Motivated by these thoughts, we first optimize the number of cooperative relays by considering energy consumption and transmission reliability jointly.
First, a novel metric that considers both the energy consumption and transmission reliability is proposed, which can be written as where R total is the total received information at sink, and it can be written as Note that sign(.) captures the outage principle of RO-FFNC decoding. According to the definitions in Table 1, N total can be expressed as where C total is the total energy consumption per transmission by relays in set A, and it can be expressed as where C su is the total energy consumption per transmission by the relays in A su , and it can be written as Set of relays that fail to decode from the sources but can be recovered through RO. There is Set of all the relays Figure 2. Venn diagram of A, A un , A Tx , A su , and A rec .
where C rec is the total energy consumption per transmission by the relays in A rec , and it can be achieved by the following lemma.
Lemma 1. The total energy consumption per transmission can be written as Proof. Since C rec is the total energy consumption, it can be expressed as in which C Rx and C Tx are the energy consumption of the relays for receiving and transmitting packets, respectively. C Rx can be written as in which i rj denotes the number of packets that are not successfully received by relay rj in MA phase, i rj 2 ½0, M: P(i rj ) stands for the probability that i rj packets are not successfully received by relay rj, while P rec (rj) denotes the probability that rj can be recovered by receiving the packet from the relays in A su in BC phase. Thus, P(i rj ) and P rec (rj) can be expressed as (1 À P S, rj ) MÀi rj (P S, rj ) i rj ð16Þ here, P S, rj is the outage probability of the link between one source node and rj. Similarly, P rm, rj is the one between rm and rj. The expressions of P S, rj and P rm, rj can be achieved by equation (6) with corresponding parameters. Besides, C Tx can be expressed as Finally, by substituting equations (15)-(18) into equation (14), the expression of equation (13) can be derived. Ã Since R total and C total correlate with the transmission reliability and energy consumption, respectively, the proposed metric G is able to them both. In fact, G is the ratio of achieved rate and consumed energy, it can be considered as the metric of EE, because it represents the achieved rate per energy unit. Thus, G is named as EE factor.
With the above equations and definitions, the problem can be formulated as max G s: t: (6); (13) ð19Þ By solving problem (19), A Tx can be obtained.

The proposed protocol
To simplify the optimization process, in this section, the model founded in section ''Problem formulation'' is analyzed to identify some conditions. On the basis of them, the problem is divided into three subproblems, and the corresponding energy-saving strategy is proposed accordingly. Based on these strategies, a residualenergy-activated forwarding protocol is proposed.
First, when N su D = M, substituting equation (9) into equation (8), there is always R total = M 3 R, that is to say, the system will never experience outage. However, it is reasonable to minimize N total to reduce energy consumption. Note that the minimum value of N total is N total = M according to equation (8). Substituting this result and the relationship N su D = M into equation (9), it can be deduced that A Tx = [ and num(A Tx ) = 0. Thus, a simple strategy in this case can be expressed as follows.
Similarly, substituting equation (10) into equation (9), it can be deduced that When num(A su ) + num(A rec )\M À N su D , substituting this inequality into equation (14), there is In this case, it can be deduced that R total = 0 by recalling equation (8). In other words, no information can be received at sink in this situation. Substituting R total = 0 into equation (7), it is optimal to set A Tx = [, because any energy consumption by relays will be wasted. So in this case, the strategy can be concluded as follows.
When N su D 6 ¼ M and num(A su ) + num(A rec ).M ÀN su D , the optimal value of N total is N total = M. By solving equation (19), it can be deduced that the optimal value of num(A Tx ) is num(A Tx ) = M À N su D . Meanwhile, the elements in A Tx can be selected by solving the following MIN-MAX 28 problem max E res rj s: t: Thus, the strategy in this case can be expressed as follows: Note that in strategy 3, the relays who own the most residual energy will always be selected to forward, which corresponds with the guidelines of optimal cooperative protocol 23

in WSN.
On the basis of the above strategies in various cases, a residual-energy-activated forwarding protocol is proposed for the investigated WSN, which can be described as follows.
To illustrate the proposed protocol, we propose an example in Figure 3. The parameter setting is M = 5, N = 5, N su D = 1, A su = fr1, r2g, A res = fr3, r4g: In the figure, the number in the square represents the residual energy of the relay. It is assumed that receiving and transmitting a packet consume 3 units and 1 unit energy, respectively. Figure 3 (a)-(c) show the RO process of the proposed protocol. According to the parameter setting, it can be seen that N su D 6 ¼ M while num(A su ) + num(A rec ) = M À N su D , so the condition of strategy 3 is satisfied, in which the relays with most residual energy will be selected to forward. It can be deduced that r5 does not belong to A rec , because its residual energy is not enough. Therefore, with strategy 3, r5 will sleep in BC phase while r3 and r4 are selected to receive the packet of r1, as shown in Figure 3(a). After that, r3 and r4 are recovered, so they are moved from A rec to A Tx and transmit in BC phase, as shown in Figure 3(b). In Figure 3(c), it can be seen that the proposed protocol balances the energy consumption of each node, meanwhile, in total, 8 units of energy are consumed and all the relays can be used in the next transmission round. However, in RO-FFNC, since r3, r4, and r5 are not in A su , and they will be permitted to recover and transmit as shown in Figure 3(d) and (e). Finally, Figure 3(f) shows that in total, 12 units of energy are consumed, while r5 exhausts its battery and the lifetime of the network is terminated. So, this comparison indicates that the proposed strategy is effective in balancing the energy consumption and prolongs the lifetime of the network. When N su (22) to select cooperative relay rj if E res rj À E Tx .0, add index j into A Tx rj transmits while the relays in A rec and sink keep listening RO-FFNC process 14 is applied, and the N total , A su , A rec , A un are updated accordingly index j is deleted from A Tx num(A Tx ) = num(A Tx ) + 1 end if end while Algorithm terminals Algorithm 1. Residual-energy-activated forwarding protocol.

Initialization
E res ri = E total , i = 1, . . . , N: Step 1. Si transmits I i at rate R, i = 1, ..., M. N su D and N total are updated according to the reception situation at sink. rj receives each packet and updates N su rj .
Step 3. Index j is added to A rec , A su or A un according to the definition in section ''Variable definitions.''

Strategy 3 is applied end switch end while
Step 5. Sink compares N total and M to identify whether the system experiences outage.

Simulation results
In this section, the proposed protocol is evaluated in terms of both the proposed metric G and successful transmission time. Meanwhile, RO-FFNC, 14 FFNC, 11 and binary XOR NC 18 are also compared as benchmarks.

Parameter setting
Consider a multiple-source multiple-relay WSN in the area of 50 m 3 50 m, where the source number M = 18 and the relay number N = 60. The sink locates at the position (25,0). ri locates at the position (50rand, 23 + 4rand) and Sj locates at (50rand, 48 + 2rand), where rand is the normal distributed random variable in the rang (0, 1). One sample topology of the network is shown in Figure 4. For each sample, 30 trials are simulated, and in each trial, all the nodes are randomly relocated, except for the sink. We assume that the flow schedule is ideal, so that no collision occurs in the network.
We employ the energy model in Jung and Weitnauer, 23 which has transmitter circuit energy where (x i , y i ) and (x j , y j ) are the positions of node i and j, respectively. Each source transmits at identical rate R = 1 bit/packet/Hz with the same transmit power E s and each cooperative relay transmits the same transmit power E r . For performance evaluation, the proposed EE factor G, successful transmission time, and residual energy are compared. Successful transmission time is defined as the product of lifetime and successful transmission rate, which can evaluate both the EE and transmission reliability of the network. Lifetime is defined as the total number of transmission round when the first relay exhausts in the network. Successful transmission rate is defined as the ratio of the transmission round when the network experiences no outage and lifetime. Finally, for simplicity, in all the figures presented in the remainder of this article, A, B, C and D indicate the proposed protocol, RO-FFNC in Cheng and Yang, 14 FFNC in Xiao et al., 11 and binary XOR NC in Chen et al., 18 respectively.

EE factor G
The EE factor G of the four schemes are compared in Figures 5-7 under different SNR conditions. Figure 5 shows the case when E r = 19 dB and E s varies from 19 to 25 dB. It can be seen that when E s = 19 dB in Figure 5(a), the proposed protocol and RO-FFNC are superior to the other two. Meanwhile, FFNC and XOR NC have poor performance. This comparison verifies the gain of RO, because when E s is in low SNR region, most of the relays cannot successfully receive all the M packets from the source, so they consume the energy but will keep sleeping in the BC phase and offer no help for the data transmission, which will lead to undesirable transmission reliability, as well as the EE. On the contrary, the proposed protocol and RO-FFNC can recover the relays by utilizing RO scheme, so they can still perform well. However, comparing with RO-FFNC, the proposed protocol avoids unnecessary energy consumption by selecting part of the relays with the maximization of G, so it outperforms RO-FFNC. In Figure 5(b), it shows that the proposed protocol and FFNC are better than the others.  Meanwhile, FFNC is superior to the proposed protocol, but the gap is narrow. In this case, E s = 22 dB, as it increases, more and more relays can successfully receive the packets from the sources. Thus, for FFNC, the relays can be positive in forwarding packets, so the EE is improved. Comparing with FFNC, although the proposed protocol obtain gains by utilizing RO, the low SNR of E r limits the transmission reliability. However, this result does not mean that FFNC outperforms the proposed protocol, in Figure 5(c), it shows that the proposed protocol is still optimal when E s = 25 dB. In total, from Figure 5(a)-(c), it can be observed that the proposed protocol is superior to FFNC in terms of EE G, because it always performs well when E s varies. Figure 6(a)-(c) depicts the case when E r = 22 dB, and E s varies from 19 to 25 dB. It shows that when E s varies, the proposed scheme is always superior to the other three. Also, when E s = 22 dB, the proposed protocol outperforms FFNC, which is different from the result in Figure 5(b). This result indicates that when E r is in medium region, the proposed protocol can receive its full advantage, because the growth of the transmitting power of relays will improve the transmission reliability of the forwarding link. Similarly, FFNC performs well only when E s = 22 and 25 dB, so its robustness is not as well as the proposed protocol. Figure 7(a)-(c) shows the case when E r = 25 dB, and E s varies from 19 to 25 dB. Similarly, the proposed protocol is optimal when E s varies. From Figures 5-7, it can be summarized that the advantage of the proposed protocol is obvious when E s is in low region, because in this case, most of the relays cannot successfully receive all the packets from the source, so FFNC and XOR NC perform poorly. By utilizing RO scheme, the proposed protocol and RO-FFNC can recover the relays and achieve desirable performance. Moreover, due to the proper relay selection by maximizing G, the proposed protocol can avoid the drawback of RO and outperforms RO-FFNC.   and E s varies from 19 to 25 dB. The comparison result corresponds well with the one in Figure 5. In Figure  8(a), the proposed protocol is optimal, while FFNC and XOR NC perform poorly. In Figure 8(b) and (c), the results are also similar to the comparison of EE factor G in Figure 5(b) and (c). So, it indicates that the proposed metric G is effective in evaluating both the EE and transmission reliability. For example, in Figure  5(b), FFNC is superior to the proposed protocol in the proposed metric G; therefore, in Figure 8(b), the successful transmission time of FFNC is also superior to the proposed protocol. Similarly, Figures 9 and 10 also correspond well with the results in Figures 6 and 7, respectively. This comparison shows the importance of maximizing the proposed metric G, because it has obviously positive correlation with successful transmission time of the network.  Figure 11(a)-(c) shows the case when E r = 19 dB and E s varies from 19 to 25 dB. In Figure 11(a), it can be seen that with the proposed protocol, the relays have the least residual energy compared with the other compared ones. In the proposed protocol, the forwarding opportunities are uniformly allocated among the relays in A su and A rec through the optimization process of equation (19), which can balance the load and prolong the lifetime of the relays. However, in FFNC and binary XOR NC, the forwarding opportunities are always allocated according to the reception of the packets other than residual energy, so the EE is not optimal. For RO-FFNC, the results show that the residual energy of the relays is very notable in each case, which reflects the energy inefficiency of the scheme. Figures 12 and 13 depict the situations when E r = 22 and 25 dB, respectively. The trend of the results is similar to the one in Figure 11, where the proposed scheme outperforms the other compared ones. These results correspond well with the ones in Figures  8-10.

Conclusion
This article addresses the energy-efficient and reliable transmission for multiple-source multiple-relay WSN. By considering some unique characteristics of RO-FFNC, the energy consumption and transmission reliability are jointly formulated by a novel metric, and based on it, the appropriate number of cooperative relays is selected. Furthermore, by solving the proposed problem in various cases, the optimization process is simplified to three sub-problems, and the corresponding strategy is developed accordingly. Then, a residualenergy-activated forwarding protocol is proposed accordingly, where EE and transmission reliability are both taken into consideration. Simulation results show that the proposed metric has obviously positive correlation with successful transmission time of the network and can comprehensively evaluate both the EE and transmission reliability. Besides, it indicates that the  proposed protocol is superior to the benchmarks. In future work, this study will be extended to a multiantenna setting with energy-harvesting technology in WSN.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Basic Research Program of China (973 Program; grant no. 2013CB329104) and the National Natural Science Foundation of China (grant nos 61601238, 61372124, and 61427801).