Priority-Based Pipelined-Forwarding MAC Protocol for EH-WSNs

To reduce the end-to-end delay in EH-WSNs (energy-harvesting wireless sensor networks), medium access control protocols using pipelined-forwarding have been introduced and studied. In real-life applications, there are several situations where it is difficult to harvest more energy than the energy consumed. Therefore, it is crucial to design a MAC protocol that allows nodes to efficiently relay data without exhausting the power in pipelined-forwarding multihop transmission. In this paper, we propose a PP-MAC (priority-based pipelined-forwarding MAC) protocol that determines the priority of relay nodes based on the residual power and energy-harvesting rate.The proposed protocol determines the probability of a node becoming a relay node based on the priority of the node and attempts to access the channel in a distributedmanner. Furthermore, the PP-MAC protocol controls the sleep interval based on the power conditions of the nodes. It alsominimizes the power exhaustion problem by controlling the sleep interval based on the priority of the nodes. The performance of the proposed PP-MAC was evaluated via computer simulation, and the results indicated that PP-MAC could improve the network lifetime by mitigating the power imbalance of nodes.


Introduction
In recent times, the development of various wireless applications has led to a remarkable increase in the importance of wireless sensor networks.It is well known that, in the wireless sensor network, the fact that the sensor node is battery powered (because of size limitations and cost) and has limited energy and lifetime is a challenge.Several kinds of research have been carried out to handle the energy shortage problem.One such attempt was the introduction of EH-WSNs (energy-harvesting wireless sensor networks), which use energy-harvesting sensor nodes that can collect energy from external energy sources such as light, heat, and wind [1,2].In EH-WSNs, sensor nodes have a relatively long lifetime, and the networks are comparably more stable.
In the design of EH-WSNs, the MAC protocol plays a vital role in determining network performances such as throughput, delay, and energy consumption [3,4].When designing the MAC protocol to increase the power efficiency in EH-WSNs, the residual power of the node is considered as the most critical factor.Duty cycling has been proposed to balance the node power [5].However, even with the same residual power, the variation in the value of the residual power depends on the energy-harvesting rate.For example, if the charging rate is faster than the data transmission period, data transmission will be possible instantaneously regardless of the residual power.However, if the charging rate is slower than the data generation rate, then the data transmission has to be adjusted by considering the remaining power of the battery as well as the charging rate.
Most existing MAC protocols are designed without considering the routing protocols.Notwithstanding, MAC protocols that do not support routing can increase the network overhead and decrease the network lifetime.Therefore, considerable research attention has been devoted to the improvement of network performance through the crossedlayer designed MAC protocol by considering the routing protocol [6].To reduce the end-to-end delay caused by multihop routing, pipelined-forwarding MAC protocols such as R-MAC (Routing-enhanced duty-cycle MAC) [7] and PRI-MAC (Pipelined-forwarding, Routing-integrated, and effectively Identifying MAC) [8] were proposed.Furthermore, to achieve efficient utilization of node energy, RP-MAC (Reduced Pipelined-forwarding MAC) [9] was introduced.
In the design of routing and MAC protocols in an energyharvesting wireless sensor network, the remaining power and energy-harvesting rate are considered as vital design factors.For the EH-WSN, an important design criterion is maintenance of the ENO (Energy Neutral Operation) state [3]; that is, the harvested energy must always be greater than or equal to the energy consumed.In the ENO state, a node can operate without a battery problem.However, in real-life applications, there are several situations where it is incredibly challenging to harvest enough energy for data transmission.If the harvested energy is not sufficient, the transmission delay will be significant.Therefore, the relay node should be selected based on the residual power and energy-harvesting rate.Nodes with low energy-harvesting rates should adaptively increase the sleep interval so that sufficient charging time can be obtained.Even if each node does not satisfy the ENO state, the node group can satisfy the ENO state as a whole by adaptively selecting the relay node.
In this paper, we propose a priority-based pipelinedforwarding MAC (PP-MAC) protocol.The PP-MAC protocol relays data through pipelined forwarding for multihop transmission.To select a relay node in an ad hoc network that has no central station, each node in the same grade accesses the channel with different access probabilities based on its priority (which is determined by the residual power and energy-harvesting rate).Besides, each node adaptively determines the sleep period.If a node has a low residual power and harvesting rate, then it will have a longer sleep interval.However, if a node has a high residual power and harvesting rate, it can perform more frequently as a relay node: this ensures that the relay nodes do not run out of power, thus enabling stable and low-latency data transmission.
The rest of this paper is organized as follows.Section 2 introduces pipelined forwarding and describes the framework of the proposed PP-MAC protocol.Simulation results are provided and discussed in Section 3, and the conclusions are presented in Section 4.

Pipelined-Forwarding MAC
In a sensor network, data are transmitted to the destination node by multihop transmission.In this paper, as shown in Figure 1, all the nodes of the network are grouped based on their distance from the destination node; moreover, the data packet is transmitted to the destination node from a higher grade to a lower grade in a multihop manner.To accomplish this, the network initially performs a procedure for grade division [8,10].Nodes at the same grade compete with each other for media access, whereas nodes at different grades relay data to transmit a packet to the destination node.Therefore, the path from the source to the destination node is established based on which of the nodes at the same grade are selected as relay nodes.It is evident that the routing path is established through the MAC protocol.As shown in Figure 2, when transmitting data with the simplest flooding method, the nodes in grade n receive data from a higher grade node and serve as a relay node to relay the data to a lower grade node.Each node follows a pipelinedforwarding scheme with a staggered sleep-wake-up schedule.Therefore, it is not necessary that all the nodes will serve as relay nodes.Besides, data relay by specific nodes may be performed based on the energy state of the node.Therefore, in the MAC stage, access to the medium is appropriately limited and the sleep period is controlled based on the energy state of the node while minimizing the transmission delay.

PP-MAC Overview.
In PP-MAC, a node receives data from a higher grade node.As demonstrated in Figure 3, after receiving the data, the node transmits an ACK packet to the n+1 grade node.The ACK packet is also transmitted to the n−1 grade nodes, and the n−1 nodes receiving the ACK packet indicate that they are ready to receive data by transmitting a beacon.At this time, there are several nodes in the n−1 grade, and they must compete to receive data.Each node in the n−1 grade computes its priority P i , where the priority depends on its residual power and energy-harvesting rate and tries to transmit the beacon by setting a backoff value based on the P i value.The higher the priority, the smaller the backoff value, which increases the probability of a node operating as a relay node.The calculation of the priority value and the method of setting the backoff value will be described in detail in the next section.
One of the nodes at the n−1 grade transmits the beacon and receives the data.After receiving the data, when a node transmits the ACK packet, it transmits alongside the ACK the next time information to be awakened.Based on this time information, lower grade nodes are scheduled to serve as relay nodes before the ACK is delivered in the next period.The relay node, which has received the data, transmits the data to the lower grade nodes in the same manner as before.The relay node transmits the data and receives the ACK, and then enters the sleep mode.Thus, a pipeline-forwarding structure to sequentially transmit data with the sequential sleep-wakeup schedule is provided.

Priority by Residual Power and Energy-Harvesting Rate.
The nodes determine the priority P by taking both the residual power and the energy-harvesting rate into account.Even if there is a large amount of residual power, if the energy-harvesting rate is small, the residual power can be used more conservatively.In this case, if priority is given to a node having a substantial residual power but a low energyharvesting rate, the power of the battery is quickly consumed, and the node can be stopped.In contrast, even if the residual power is very small, if the energy collection rate is high, a sufficient amount of energy will be charged in each data transmission period so that the node can be selected as a relay node in preference to other nodes.T 0 determine the priority considering both the residual power and the energyharvesting rate; the expected residual power after the unit sleep interval T 0 is set as the priority of the node, as shown in (1): where P i is the priority, E r,i is the residual power, and R h,i is the energy-harvesting rate for the i-th node.The priority P i represents the expected residual power of the node after the sleep interval at the next transmission time.Nodes having residual power below the minimum power do not have enough energy for data transmission even if the nodes gain access to the channel through contention, so that the sleep state is maintained until the power is charged above the minimum power.

Backoff by Priority.
Even though a priority value is given to each node, in an ad hoc network, the priority of neighboring nodes cannot be known because there is no central base station.Therefore, a distributed MAC protocol is needed that can reduce collisions and allow access to channels based on priority.In this paper, we designed a MAC protocol to reflect the priority of a node and minimize the collision of packets by differentiating the channel access probability and the backoff value based on the priority of the node.Besides,  it is necessary to adaptively adjust the node's sleep interval based on the energy collection rate and the residual power.
In this paper, we divide the contention window into two periods: CW 1 and CW 2 .CW 1 is the interval in which nodes satisfy the condition  ≤   , where  denoting the threshold is set to 2E 0 throughout this paper, and E 0 denotes the energy required to receive and transmit a packet in the interval T 0 .This implies that the node in CW 1 has sufficient energy for packet transmission in the next period after transmitting the packet in the current slot.If  >   , it means that the node does not have sufficient energy and harvesting rate and hence competes in CW 2 .
Nodes whose energy consumption in the current slot does not affect the next packet transmission compete to access the channel in the CW 1 period.This is so that the nodes of CW 1 are given priority to access the channel.However, nodes that do not satisfy (2) below do not have enough power after T 0 and compete to access the channel in CW 2 .The nodes in CW 2 have lower priority than those in CW 1 .If there are nodes in CW 1 , the nodes of CW 2 check the existence of nodes having enough energy in the CW 1 interval and go to the sleep state.
As shown in Figure 4, the access probabilities of CW 1 and CW 2 are distinguished.In CW 1 , all nodes have enough energy to transmit packets in the next cycle, so they attempt to access the channel with uniform probability.However, in CW 2 , it is difficult to secure sufficient energy for packet transmission in the next cycle.Therefore, the channel is accessed with a different probability distribution based on the priority value P i .For the backoff setting in CW 2 , we defined the probability Pr() of having the nth backoff among the total CW 2 length, N 2 , as shown in (2) below.Figure 5 shows the probability distribution of backoff based on the priority value P i in CW 2 .The PP-MAC algorithm is shown in Algorithm 1.

Sleep Duration.
If there is no beacon signal or no competition in CW 1 , then it means that there is no node in CW 1 .Consequently, all the nodes join the competition for channel connection in CW 2 , and the nodes that fail to access the channel will enter the sleep mode immediately.At this time, it is necessary to wake up before time T 0 for the next data reception and transmission.If there are nodes in CW 1 , it means that there exists a relay node having enough power in the next cycle.Therefore, nodes in CW 2 have to enter the sleep mode for the time duration 2T 0 .In contrast, nodes in CW 1 must wake up before the time interval T 0 .In this manner, the contention window is divided into two, and the nodes can recognize the existence of nodes having higher priority so that the length of the sleep period for a node in CW 2 can be adjusted without exchanging additional information.

Simulation and Performance Evaluation
In this paper, the performance of the proposed PP-MAC is analyzed via simulation analysis.For the simulation, the nodes are arranged uniformly at three grades, and the energyharvesting rate of the nodes is set to be uniformly distributed between 0.28 and 7.3 mW.In this study, we set the initial value of the backoff exponent of each of the competing windows CW 1 and CW 2 to 3, increasing it by 1 each time a collision occurred, and to a maximum of 7 so that each of the contending windows is in the range of 0-127.To achieve fast simulation, we assumed a battery capacity of 5 mJ.Table 1 shows the parameters for the simulation [6,11].Figures 6 and 7 show the average number of dead nodes and the standard deviation of the residual energy based on the number of nodes for 1000T 0 sec in the case of average R h = 50-100 mW.As the number of nodes increases, the imbalance of the residual power among nodes is relaxed, and the lifetime  of the node is increased.Besides, as the number of nodes increases, the number of nodes that can operate as relay nodes also increases, leading to an increase in the overall lifetime.In particular, in the case of PP-MAC, the standard deviation of the residual power between nodes is significantly reduced and the lifetime of the node is longer than that of the conventional pipelined-forwarding MAC.Therefore, the overall network lifetime is prolonged.Figures 8 and 9 show the average number of dead nodes and the standard deviation of the residual energy based on the energy-harvesting rate for 1000T 0 , where the number of nodes is 15.As the average energy collection rate increases, the lifetime of the node increases.Overall, in comparison to the pipelined-forwarding MAC, the lifetime and power balance in PP-MAC are better.It is observed that, as the average energy collection rate increases, the difference in the lifetime of the conventional pipelined-forwarding MAC node and the lifetime of the PP-MAC node is reduced.However, if the energy situation improves more than a particular grade, then the network performance improves beyond the required grade; hence, the network performance becomes more significant when the energy-harvesting rate is low.Based on the simulation results, PP-MAC demonstrates better performance than the conventional pipelined-forwarding MAC with a worse energy situation.

Conclusions
In this paper, we proposed a priority-based pipelinedforwarding MAC (PP-MAC) protocol to select relay nodes for multihop transmission in EH-WSNs.In the distributed ad hoc network environment where the power status of other nodes is unknown, each node independently calculates its priority in a probabilistic manner, which can reduce the excessive probing overhead required to gather power-related information of all the nodes.Furthermore, the proposed MAC protocol classifies the competition window into two sections to give priority to channel access based on the residual power and energy-harvesting rate.A high-priority node has more residual power and energy-harvesting capability than a low-priority node.For a high-priority node, the probability of channel access increases, so that the power imbalance among relay nodes is mitigated and the overall performance of network lifetime is improved.Simulation results show that the proposed PP-MAC achieves higher power balance among nodes and increases the lifetime of nodes compared with the conventional pipelined-forwarding MAC protocol, particularly under poor energy conditions.

Figure 1 :grade n − 1 Figure 2 :
Figure 1: Example of network topology after the procedure of grade division.

Figure 3 :
Figure 3: Illustration of the PP-MAC procedure.

Figure 6 :
Figure 6: Average number of dead nodes based on the number of nodes for 1000T 0 in the case of average R h = 50-100.

Figure 7 :
Figure 7: Standard deviation of residual energy based on the number of nodes for 1000 T 0 in the case of R h = 50-100 mW.

6 WirelessFigure 8 :Figure 9 :
Figure 8: Average number of dead nodes based on the energyharvesting rate for 1000 T 0 , where the number of nodes is 15.

Table 1 :
Networking parameters for simulation.