A Low Latency, Energy Efficient MAC Protocol for Wireless Sensor Networks

Reducing unnecessary and redundant handshake frame is considered as a promising way to reduce the end-to-end delay and energy consumption. Here, a protocol named compressed handshake media access control (CH-MAC) is presented. CH-MAC introduces a new handshake mechanism with implicit RTS to achieve the object of low delivery latency and an initiative sleeping mechanism to settle the hidden terminal problem. Simulation results show that the proposed protocol outperforms SMAC protocol in both energy consumption and packet latency.


Introduction
Wireless sensor networks (WSNs) have significant applications in environment monitoring and surveillance, medical systems, and robotic exploration [1,2]. In many of these applications, the use of battery-powered sensor nodes greatly eases deployment of the network but makes battery replacement impractical. Therefore, one of the largest concerns is to reduce energy consumption [3].
Duty cycling is a widely used method in WSNs to reduce energy consumption. In duty cycling, sensor nodes periodically alternate between active and sleep states. When active, nodes are able to transmit or receive data, whereas when asleep, nodes turn off their radio to save energy. These ideas motivated a series of MAC protocols including Sensor MAC (SMAC) [4] and Timeout MAC (TMAC) [5].
Although such approaches save energy, they bring significant packet latency as well. In order to transmit a data packet, a pair of nodes must be active. If a neighbor node is currently asleep, a node with pending data must wait until the neighbor node wakes up. Furthermore, multiple hops transmission, which is common in WSNs, always costs lots of cycles.
Several methods have been proposed to minimize the packet latency, such as Demand Wakeup MAC (DW-MAC) [6] and Multi-Divided Deliver MAC (MDD-MAC) [7]. DW-MAC introduces a low overhead scheduling algorithm that allows nodes to wake up on demand during the sleep period. MDD-MAC proposes a rotation method between sending and receiving data during the active period.
As most protocols mainly focused on the optimization of duty cycling, we found that reducing unnecessary and redundant handshake frames during data transmission is another promising way to reduce both packet latency and energy consumption.
In this paper, we present a MAC protocol, called compressed handshake media access control (CH-MAC), which introduces a compressed handshake mechanism that allows nodes to transmit data efficiently and quickly during the active period. CH-MAC differs from previous works in reducing the additional latency. In CH-MAC, the two control frames request-to-send (RTS) and clear-to-send (CTS) are replaced by a new transmit (T) frame. The contributions of this work are as follows.
(i) We introduced a compressed handshake mechanism that reduces both the packet latency and energy consumption.

2
International Journal of Distributed Sensor Networks (ii) We also introduced an initiative sleeping mechanism that ensures the next data transmission will not be interrupted by the hidden terminal problem [8], meanwhile, reducing the energy consumption slightly. (iii) We presented the design of CH-MAC in four kinds of networks: linear network, cross network, mesh network, and random network. (iv) CH-MAC achieves lower latency and higher power efficiency compared to the existing SMAC.
The rest of this paper is organized as follows. In Section 2, we discuss the related works about reducing latency and energy consumption for WSNs. Section 3 presents the detailed design of CH-MAC. Section 4 presents results from our simulation-based evaluation of CH-MAC, compared with SMAC in all four kinds of networks. Finally, in Section 5, we give a conclusion.

Related Work
Several previous approaches to reduce energy consumption and latency have been proposed. We discuss those MAC protocols here.
SMAC is one of the duty cycle MAC protocols for WSNs. Based on the idea that divides time into fairly large frames, a node communicates with its neighbors during the active period and turns off its radio during the sleep period to preserve energy.
In SMAC, if both the sender node and the receiver node are active, the sender node will send an RTS to the receiver node. Then the receiver node will reply with a CTS. After receiving the CTS, the sender node will send a data packet to the receiver node; finally, the receiver node will reply with an acknowledgment (ACK) to acknowledge the data packet.
However, if the receiver node is currently in sleep period, a node with pending data has to wait until the next active time of its intended receiver, which leads to heavy additional packet latency.
Several other MAC protocols for reducing latency have been proposed in WSNs. DW-MAC introduces an integration algorithm that combines medium access control with scheduling. It proposes a mapping function for scheduling to allow nodes to wake up on demand during the sleep period. But a node in DW-MAC can only send one data packet per handshake with scheduling frame (SCH) [6].
In order to decrease the delivery latency, another protocol named MDD-MAC is designed. Its main idea is to divide data transmissions into two time slots, which are the receiving data time slot and the sending data time slot, respectively [7].
All in all, these approaches are based on duty cycling to reducing energy consumption and packet latency. However, reducing unnecessary and redundant handshake frame is thought as another promising way to achieve low latency and energy efficiency.  active and sleep. During the active period, we define two periods: data and avoid. We denote the duration of each period by data , avoid , and sleep , respectively ( Figure 1). The basic concept of CH-MAC is to reduce unnecessary and redundant handshake frames. CH-MAC is unique in the way of transmitting data packages. In data period, a node with pending data contends for channel access using a four-way handshake as in IEEE 802.11 [9]. CH-MAC, however, replaces the RTS and CTS with a special frame called a T frame. In this way, CH-MAC significantly reduces the time that a pair of nodes occupy the medium; thus CH-MAC performs a lower end-to-end delay, and at the same time, CH-MAC decreases the transmission energy consumption by cutting down the RTS.

CH-MAC Design
Furthermore, CH-MAC sets up an initiative sleeping mechanism. In avoid period, after finishing data transmission, a node goes to sleep immediately and wakes up when the next hop neighbor finishes its data transmission. This method slightly reduces energy consumption and solves the hidden terminal problem caused by the handshake compression. Figure 1 shows an overview of scheduling in CH-MAC based on a T frame and the initiative sleeping mechanism during the active period. In CH-MAC, each node checks the request flag; if true, the intended receiver node N1 sends a T frame with an upcoming request if the medium is clear. Upon receiving the T frame, the sender node N2 replies with a data frame, which will be acknowledged by N1's ACK. Once the sender node N2 receives the ACK, node N2 will go to sleep and then wake up at the end of the transmission between node N1 and node N0.

Format of T Control Frame. CH-MAC compresses RTS
and CTS into a new frame T. Table 1  Frame length is the size of the T frame; Src is the address of current node; Dst is the destination node's address of current node; Next is the next hop node's address of current node. For example, in Figure 1, Src in N1's T frame is the address of node N1, Dst is the address of node N2, and Next is the address of node N0.
The T frame plays two roles in CH-MAC: as an acknowledgment to a previously received request and as an implicit request for the initiation of the next data transmission. As illustrated in Figure 1, after receiving the T frame, node N2 sends a data frame after SIFS delay; node N0 estimates the time consumption of data transmission from N2 to N1 and sets the NAV (network access vector). When the NAV expires, node N0 wakes up and transmits a T frame if it senses a clear medium. Figure 2. N0 is the source node. N3 is the destination node. N1 and N2 are the forward nodes.

Data Transmission. Data transmission is introduced by an example with 4 nodes in
As Figure 2 shows, N0 launches an RTS control frame to its neighbor node N1 to request for sending a data packet to N3. As a reply to the RTS, N1 sends a T frame including the next hop node address from the routing information implying the RTS packet.
Meanwhile, N2 also receives N1's T. Thus, N2 estimates the time consumption of data transmission from N0 to N1 and sets its NAV. Once the estimated time in N2 is up and the NAV timer expires, N2 will send a T frame to N1. Here N1's T to N0 acts as N1's RTS to N2. It is called an implicit RTS frame.
When N1 receives the T control frame from N2, it will send a data packet to N2 and get an ACK from N2.
Similarly, N3 receives the T frame from N2 as well. It will reply with a T frame to N2 after the transmission from N1 to N2, and then N2 begins to transmit the data packet to N3 immediately.
Note that the T's role is twofold: first, it acknowledges the medium is clear for the sender node to send a data packet. Second, it initiates an upcoming data frame transmission to the next intended receiver node; this is the reason why it was called implicit RTS frame. CH-MAC significantly reduces the amount of time a pair of nodes occupy the medium before they reach a rendezvous time for data exchange, compared to the transmission in SMAC. In this case, nodes are not as frequent to turn to sleep mode, which helps decrease the end-to-end delay. More significantly, this decrease is adaptive as the number of nodes increases. Meanwhile, reducing the unnecessary RTS in forwarding nodes decreases the transmission energy, allowing CH-MAC to achieve low energy consumption.

Initiative Sleeping Mechanism.
As previously explained, CH-MAC exploits a compressed handshake mechanism. But the lack of RTS will bring a hidden terminal problem, as shown in Figure 3. Node N2 is the source node, node N1 is the intended receiver node, node N0 is the next intended receiver node of node N1, and node N3 is the neighbor node of node N2. After node N2 gets a right ACK from node N1, node N0 sends a T frame to initiate a data transmission from node N1 to node N0. Then, node N1 replies with a data package, which is received by node N2 as well. If the neighbor node N3 starts the transmission by launching an RTS, collision happens. Then, node N3 will retransmit the RTS. This is called the hidden terminal problem.
CH-MAC solves this problem by employing an initiative sleeping mechanism at the current sending data node, such as node N2. After receiving a right ACK, node N2 goes to sleep immediately. With this mechanism, CH-MAC ensures the next data transmission will not be put off by the neighbor sender node. Algorithm 1 describes the initiative sleeping mechanism as well. The value countertime here denotes the time in the sender node. The value sleeptime is the sleep time of a node.

Protocol Implementation
We carried out the simulation using the OMNET++ simulator [10]. The performance of the CH-MAC was compared with the SMAC. We used REDD routing protocol [11] for these protocols. Some major parameters are given in Table 2. The retransmission threshold in our simulation was seven, and the transmission power consumption of one packet is denoted by one unit.

Linear Network.
We first compared CH-MAC with SMAC in linear networks with different number of nodes. In the linear network, the distance between a node and its neighbor nodes was 100 meters. The sink deployed at an end. The first node at the line was selected as a permanent source node and it generated a data package per second from the 0th second and stopped at 40th second. All data packets were received by the sink, and the other performance of these protocols in the linear network is shown in Figure 4.  Figure 4(a) shows the end-to-end delay. CH-MAC always has a shorter delay compared with SMAC. As the number of nodes increase, more T frames are used. When the number of nodes is 90, the decreased delay is up to 49.83%. We denote one-hop delay decrease between the use of T frame and RTS/CTS by 1 ; denote the CH-MAC decrease of cycle count by , compared with SMAC. For hops, the end-toend delay will decrease by × 1 + × , where is the sleep time of a node per cycle. Thus, the delay decrease between CH-MAC and SMAC is linearly related to the number of nodes.
The average duty cycle corresponding to Figure 4(a) is shown in Figure 4(b). As we explained in Section 3.4, the current node will go to sleep immediately after receiving an ACK, so a lower duty cycle will be obtained by CH-MAC. Figure 4(c) shows the energy consumption versus the number of nodes. When the number of nodes is 10, the two MAC protocols have almost the same energy consumption. When the number of nodes gets larger, energy consumption increases quickly, but energy consumption for CH-MAC increases slowly. On one hand, the compression of handshake   decreases the number of transmission. On the other hand, the initiative sleeping cuts down the length of node's active time. Both of them result in a lower energy consumption in CH-MAC. When the number of nodes is 100, the energy consumption decreases by 23.94%.

Cross Network.
We also compared CH-MAC and SMAC in cross networks. In cross network, the sink node was at the center, which was the symmetric center of other linear distribution nodes. Four nodes at the edge of the network were source nodes, which generated a new data packet per second. Table 3 is the start and stop time of the four source nodes generating data packets. Simulation results in cross network are shown in Figure 5. Figure 5(a) shows the end-to-end delay with CH-MAC and SMAC. CH-MAC exhibits lower end-to-end delay. Compared to the linear network, CH-MAC has fewer decrease because it has fewer number of hops. Figure 5(b) shows the average duty cycle with CH-MAC and SMAC. When the number of nodes increases, the average duty cycle of both MAC protocols increase. CH-MAC outperforms SMAC as number of nodes increases.
The energy consumption with CH-MAC and SMAC is shown in Figure 5(c). As the number of nodes increases, CH-MAC reduces more energy consumption than SMAC. The reason is that CH-MAC abandoned an RTS compared with SMAC, and the current sender node in CH-MAC goes to sleep immediately after receiving a right ACK. node in a network). Because the number of forwarding nodes increased, the delivery ratio of CH-MAC and SMAC drops gradually. CH-MAC shows lower delivery ratio than SMAC.

Mesh Network.
We evaluated our CH-MAC and SMAC in the mesh network. We varied the mesh size from 3 × 3 (9 nodes) to 10×10 (100 nodes). The sink node was at the center. Four source nodes at the corner of the mesh generated a new data packet per second. The time they started and stopped generating data packets can be found at Table 3. Figure 6 shows the performance of CH-MAC and SMAC in a mesh network. In Figure 6(a), when the number of nodes is 9, the packet delay is almost the same between CH-MAC and SMAC. SMAC experiences more delay than CH-MAC as the number of nodes increases. When the number of nodes is 100, the packet delay of CH-MAC is 2.94 seconds, 1.46 seconds less than SMAC.
In Figure 6(b), both CH-MAC and SMAC show almost the same average duty cycle. The reason is the initiative sleeping mechanism does not affect the sleep time much. Figure 6(c) shows the energy consumption versus the number of nodes. Under this scenario, when the number of nodes increases, both MAC protocols show larger power consumption quickly. Compared to the previous two kinds of networks, as more nodes act as forwarding nodes, more energy is consumed in the mesh networks.
The performance comparison of packet delivery ratio in the mesh networks is shown in Figure 6(d). Because of the variable topology, the difference in delivery ratio between CH-MAC and SMAC is miniscule.

Random Network.
We finally compared CH-MAC and SMAC in random networks. Nodes in the random network were randomly located in a 1000 meters × 1000 meters area. The maximum length between neighboring nodes was 100 meters. The node closest to the center was chosen as the sink node, four corner nodes were selected as source nodes. The start and stop time of the generating data packet can be found at Table 3.
The results are plotted in Figure 7. CH-MAC outperforms SMAC in packet latency and energy consumption, as shown in Figures 7(a) and 7(c). When the number of nodes is 100, CH-MAC reduces the end-to-end latency over SMAC by around 41.55%, and the energy consumption of CH-MAC is 24.6% of SMAC's. Figure 7(b) shows the average duty cycle of SMAC and CH-MAC. In random network, because of the dynamic topology, the comparison between CH-MAC and SMAC is not so clear. When the number of nodes is under 36, the average duty cycle of CH-MAC is lower than SMAC, but when the number of nodes surpasses 36, the duty cycle of CH-MAC exceeds that of SMAC.
The performance of the packet delivery ratio is plotted in Figure 7(d). When the number of hops between source nodes and sink node is small, a node in CH-MAC transmits a data packet to the sink node more quickly. But when the number of nodes increases, the possibility of collision and dropped packets increase.

Conclusion
In this paper, we presented CH-MAC, a new energy efficient MAC protocol designed to reduce packet delivery latency. CH-MAC proposed a compressed handshake mechanism, allowing CH-MAC to achieve low delivery latency and reduce energy consumption. The initiative sleeping mechanism in CH-MAC overcame the hidden terminal problem caused by the compression frame T. We compared CH-MAC with SMAC in four kinds of networks. Simulation results show CH-MAC outperforms SMAC in all these networks.