Abstract
Wireless Sensor Networks are a key element of the Internet of Things since they are one of the most interesting pervasive systems. However, they are battery-powered, so energy efficiency represents one of the primary design challenges to address. This goal can be primarily achieved through an optimization of the communication procedure, which is the most power-consuming component of a WSN node. Nevertheless, the poor resources of the embedded devices usually limit the complexity of protocol solutions, which thus are not sufficient to reach satisfactory results. For this reason, the current trend aims at integrating both hardware and software solutions. In this work, a cross-layer solution, based on the combined use of a duty-cycling MAC protocol and a reconfigurable beam-steering antenna, is presented and validated. It significantly reduces the nodes' power consumption by exploiting scheduling techniques and directional communications. Specifically, a MAC scheduler manages the activation of the antenna sectors based on information coming from both MAC and network layers. This way, node awakenings occur only when an actual communication has to take place and only the interested antenna sector is activated. The effectiveness of the proposed cross-layer approach has been evaluated through OMNeT++ simulation tool.
1. Introduction
The modern Internet is strongly oriented towards the Internet of Things (IoT), that is, a new vision of Internet according to which everyday objects are becoming proactive actors of the global Internet, with the capability of generating and consuming information for advanced applications [1]. One of the most flexible technologies for this new vision is the wireless technology, because the absence of wired connections makes physical devices more useful in a widespread set of real scenarios. In this perspective, Wireless Sensor Networks (WSNs) are the ideal choice since sensor nodes are able to self-configure and self-organize. These characteristics allow deploying WSNs even in hostile environments in order to capture parameters (e.g., temperature, light, and humidity) without human intervention. Then, exploiting the wireless channel and the multihop communication among nodes, the collected data are sent to a central processing point or are exploited by user-customized mash-up applications [2]. Other strengths of this technology are represented by the low cost of devices, their small size, and their low power consumption. These simple yet fundamental functionalities are of great interest for a plethora of applications, such as building automation, surveillance, military operations, healthcare, and logistics, just to mention a few of them. However, to properly work, a WSN has to never be partitioned; that is, a path to the sink should always be present. With regard to this aspect, it is important to note that nodes are battery-powered and, in most cases, such a power cannot be regenerated or replaced; therefore its exhaustion corresponds to a definitive shutdown of the node. In this situation, not only data collected by that node but also some network routes are lost. Of course, a large number of node losses, due to battery depletion, could lead to network partitioning. So, the energy consumption is a key aspect in WSNs and it is crucial that sensor nodes optimize power consumption to extend the network lifetime in a consistent way with real use cases.
Let us observe that the power consumption of nodes is negligible during data sensing and processing procedures. On the contrary, the data communication towards the central processing system has a strong impact on the nodes' battery. This issue has a twofold cause: on the one hand, the radio transceiver is the most power-consuming component of a WSN node by itself; on the other hand, the communication phase is associated with phenomena such as collisions, overhearing (i.e., listening of messages addressed to another node), overemitting (i.e., transmission of data to a node that cannot receive them), and idle listening (i.e., listening to the channel in absence of communications), which substantially reduce the nodes battery. For these reasons, many works in literature are focused on energy saving, with particular emphasis on MAC layer, since it is responsible for managing channel access control mechanisms. In particular, many MAC-based energy saving solutions exploit the possibility to tune the duty-cycle, so enabling nodes to switch their radio between ON and OFF state according to a predefined scheduling. Unfortunately, protocol solutions cannot be too complex to not negatively affect the limited resources of the embedded devices. These issues often suggest combining new MAC protocols with power-saving hardware solutions. Among these, the use of directional or switched-beam antennas is one of the most explored. Traditionally, WSN nodes are equipped with an omnidirectional antenna, so most of the transmitted power is wasted towards useless directions. On the contrary, exploiting switched-beam antennas, it is possible to focus the transmission power only along the proper direction, so minimizing the power consumption. Nevertheless, the integration of beam-steering antennas with energy-efficient MAC protocols for WSNs has not been exhaustively explored, so it is still open to new solutions.
In this work, an energy-efficient cross-layer MAC protocol, called Hybrid Energy-Aware Cross-Layer MAC (HEC-MAC), based on the integrated use of a scheduling schema and a switched-beam antenna, is presented and validated. The proposed solution is able to reduce power consumption by avoiding transmissions towards unnecessary directions and by adapting the wake-up time of the radio transceiver to the network traffic. More in detail, during the setup phase, each node communicates to its neighbors the time interval during which it will transmit and, in addition, it detects all antenna sectors through which it can exchange data with its neighbors. Moreover, exploiting a cross-layer communication between network and MAC layers, each node is able to notify its neighbors about the identity of its next hop. In this way, during the steady state, a node wakes up only when its “previous hop” is transmitting and it turns on only the proper antenna sector. Finally, to reduce even more the power consumption, each node can anticipate the end of the wake-up period if no more packets have to be transmitted or received. The proposed solution is also able to face topology changes: every node updates its neighbor list as soon as it is not able to listen to transmission of a neighbor or it detects the presence of a new node.
In order to evaluate the effectiveness of the proposed cross-layer solution, it has been compared with three other protocols, which are described more in detail in the next section: AS2-MAC [3], AntDirMAC [4], and ZigBee [5]. The first one is a duty-cycle-based protocol that exploits a MAC scheduler to minimize the power consumption, the second one tries to maximize the network lifetime through the use of switched-beam antennas, and the third one is the protocol used by ZigBee that does not provide any specific energy-efficient mechanism.
The rest of the paper is organized as follows. Section 2 summarizes the state-of-the-art of energy-efficient solutions at MAC layer. The design of the MAC scheduler is described in Section 3. The simulation model is presented in Section 4, while in Section 5 numerical results are discussed. Conclusions are drawn in Section 6.
2. Related Works
The duty-cycle-based MAC protocols for WSNs fit into three main categories: preamble-sampling, scheduling, and hybrid approaches.
Preamble-sampling MAC protocols exploit the technique of Low Power Listening (LPL) [6] in order to sample the preamble of the packets. When there are no packets to be exchanged, LPL minimizes the duty-cycle, but it needs a preamble longer than the wake-up period to assure that the receiver can detect the channel activity. Examples of protocols belonging to this category are BMAC [7], WiseMAC [8], X-MAC [9], and XY-MAC [10]. Among these, WiseMAC and X-MAC are the most advanced. Through WiseMAC, which combines nonpersistent Carrier Sense Multiple Access (CSMA) with preamble sampling to mitigate idle listening, node schedulers are independent and information about the next awake period is piggybacked in the data acknowledgement frame. This value is used to dynamically determine the next awake time, allowing node to use short preamble. On the other hand, X-MAC is a particular preamble-sampling protocol that sends a strobed preamble, that is, a sequence of short preambles each of which is followed by a pause. A preamble packet contains the address of the target node, so that the destination node can recognize its own IP address as soon as it receives the preamble and can immediately reply with an ACK (early acknowledgment) during the short free interval. When the sender receives an ACK packet, it stops sending preamble. A recent enhancement of X-MAC is XY-MAC, which proposes a technique, called early termination, to sharpen the size of X-MAC pauses. With sharpened pauses, the sampling period at receivers can be effectively reduced to acquire a high level of energy efficiency, especially under low traffic loads.
MAC protocols based on scheduling approach manage duty-cycling by periodic synchronization messages and packet transmissions. One of the first duty-cycle MAC protocols for WSNs is S-MAC [11], according to which all nodes in a neighborhood wake up simultaneously and listen to the channel. They remain awake during the entire awake period even if they are neither sending nor receiving data, so leading to high latency and low throughput. Instead, RMAC [12] exploits cross-layer routing information in order to avoid latency. In particular, a setup control frame is used to schedule the upcoming data packet delivery along a specific route, so that an upstream node can send the data packet to intermediate relay nodes, which can immediately forward it to the downstream node. Recent works on scheduling-based protocols are [13–15]. In particular, [13] presents a TDMA-based approach. In [13], authors propose a MAC protocol, called LASA, in which time slot is not static but has a dimension that varies dynamically depending on the traffic load in the network. In order to achieve this result, the network is first organized into clusters and, in each of them, a cluster head is elected for assigning time slots to all nodes in the cluster. In [14], authors propose eL-MAC protocol that reduces idle listening, overhearing, and hidden terminal problems and in addition decreases the power consumption by allowing selecting different duty-cycle depending on the current data rate. Each node uses a beacon message to notify the destination node about the presence of data to be received, allowing nodes to switch to the sleep mode if there are no transmissions. Finally, in [15], a cross-layer approach is represented by CL-MAC that allows obtaining significant energy savings by using network-layer information. In particular, this protocol seeks to maintain the nodes in a sleep state as long as possible, by modifying RTS and CTS packets to inform each node whether it is included in the routing path of the current transmission or not.
Hybrid solutions combine some features of preamble sampling with scheduling techniques. A meaningful example is AS-MAC [16], which is used to asynchronously coordinate the wake-up times of neighboring nodes to reduce overhearing, contention, and delay. Furthermore, it exploits LPL to minimize the periodic wake-up time. Since nodes store the wake-up schedules of their neighbors, they know when these turn active. One of the main disadvantages of AS-MAC is the inefficiency in packet broadcasting, since it has to transmit every broadcast packet once per each neighbor. A protocol that overcomes the weaknesses of AS-MAC is AS2-MAC [3], which is based on an efficient setting of the node's duty-cycle as a function of the transmission times of the neighbor nodes. In a duty-cycle period, each node wakes up once to transmit and N times to receive, where N is the number of neighbors, while it remains in sleep mode for the rest of the time.
In order to improve the performance of MAC solutions without burdening the limited resources of WNS nodes, several works in the literature exploit the combined use of software algorithms and hardware solutions. In [17], a protocol that uses a directional antenna and a busy tone to ensure the energy saving is proposed. It exploits the mechanism of RTS/CTS to discover the location of its neighbors and it stores this information in a cache table. Messages that need to be sent in broadcast force the antenna to work in omnidirectional mode, whereas unicast messages are sent in one direction using the information stored in the cache table. Instead, the Direction Antenna at Sink (DAaS) protocol [18] extends the lifetime of the network by increasing the transmission range of the sink and by scheduling wake-up and sleep times for nodes according to the SMAC protocol. In particular, by changing the transmission range of the sink, this protocol distributes more fairly the power consumption among nodes communicating directly with the sink. In [19], the authors propose the Mobile Synchronous Transmission Asynchronous Reception Directive (MD-STAR) protocol, which is inspired to the WiseMAC and SMAC protocols, with the addition of directional antennas. In particular, the protocol achieves time-space synchronization in presence of mobile nodes and allows the management of the smart antenna adapting the Radio Frequency parameters in accordance with the characteristics of the communication link. In [20], authors present a MAC protocol, called Directional Utra-Wideband MAC (DU-MAC), which tries to reduce the power consumption by creating “omnidirectional” links between network nodes; that is, each directional link has a transmission range confined within the coverage area of an omnidirectional antenna. This solution results in a decrease of radiated power of about N times compared to a transmission in omnidirectional mode, where N is the number of antenna sectors. Finally, in [4], the AntDirMAC protocol is presented. It significantly reduces the nodes' power consumption by exploiting AS2-MAC protocol and directional communications. On the one hand, the scheduling algorithm of AS2-MAC reduces the number of collisions in the network and faces phenomena such as the hidden node problem, the idle listening, and the overhearing. On the other hand, the switched-beam antenna further reduces the power consumption by focusing communications only towards the proper sector.
3. The Proposed MAC Scheduler: HEC-MAC
The basic idea of the defined protocol is to ensure smart awakenings; that is, nodes wake up only when they actually have data to send or receive and only for the needed time. Moreover, by exploiting the switched-beam antenna, the transmission power is focused only on the desired direction in order to keep the power consumption as low as possible. More in detail, the proposed MAC schema consists of two main parts: the network start-up and the steady state. The network setup procedure, in turn, is characterized by three phases: (i) transmission time announcement, (ii) sectors discovery, and (iii) next hop announcement. During transmission time announcement phase, each node chooses its transmission time (i.e., the time instant at which it periodically can transmit) and then communicates such information to its neighbors. During the first phase, every node detects where its neighbors are located, that is, the antenna sector useful to reach each neighbor. Finally, during next hop announcement, every node notifies the network about the identity of its next hop. During the steady state, the information gathered through network start-up is used to optimize both outcoming and incoming transmissions. Indeed, for each duty-cycle period, a node wakes up at most one time for transmission (if it has data to transmit) and N times for receiving, where N is the number of “previous hop” nodes (if these nodes have data to transmit). Of course, if a transmission occurs, only the needed antenna sectors are exploited.
For the sake of clearness, before describing the new scheduler in detail, some parameters used in the discussion are introduced below.
WakeTime is the maximum time interval (in seconds) for transmitting local data or for receiving packets from neighboring nodes (Figure 1). SleepTime is the minimum time interval (in seconds) that each node spends in sleep mode (Figure 1). Announce Packet ( Alert Packet ( Full Packet ( Reservation Packet ( Discovery Packet ( NextHopIndication Packet ( Wake-Up Table (
In the following, both the network start-up phase and the steady state are described.

Duty-cycle parameters.
3.1. Network Start-Up
As said in the previous section, the first step of the network start-up consists in the exchange of information about the transmission time. To do so, WSN nodes send

Flow chart of the transmission time announcement phase.
Let us now describe how a node chooses its own transmission time. As said, the timeline is divided into fixed slot of
During the sector discovery phase, each node learns where the neighbors previously stored in

Flow chart of the sector discovery phase.
The last step of the network start-up is the next hop announcement, which is carried out after the convergence of the routing algorithm. This mechanism is very useful because, except for broadcast communications, a node sends packets only to its next hop and receives packets only from its “previous hop” nodes. So, knowing in advance the previous hops allows keeping OFF the radio transceiver if the incoming communications have not to be received. To carry out this mechanism, upon the convergence of the routing protocol, the network layer of each node communicates to the MAC layer the identity of the next hop. This information is then broadcasted, through a PktNEXT, to all neighbors, which store it in their
3.2. Steady State
In this phase, each node knows (i) the transmission times and (ii) sectors of its neighbors, as well as (iii) the identity of its previous hops. In the steady state, two kinds of periodic events, namely, the transmission and the reception of a packet, may happen. With regard to the periodic events, the node sets a timer for the next scheduled event in its

Early awakening to address clock drift.

Steady state behavior: minimization of idle periods of receiving nodes (Nodes 2 and 3) when the transmitting node (Node 1) has nothing to transmit or needs lesser time than WakeTime.

PHY layer state diagram.
4. Simulation Model
An exhaustive simulation campaign was carried out in order to appreciate the effectiveness and efficiency of the proposed MAC scheduler. The tool used to obtain this performance validation is the discrete event simulator Omnet++ [21]. The performance of the designed protocol was compared with the MAC protocol currently used in ZigBee-based WSNs [5] and with two energy-efficient protocols already presented in the literature, namely, AS2-MAC and AntDirMAC. While the MAC protocol of ZigBee does not provide any specific energy-efficient mechanism, AS2-MAC exploits a duty-cycle-based MAC scheduler to minimize the power consumption, and AntDirMAC maximizes the network lifetime through the use of switched-beam antennas. Additionally, assuming that each real solution should enable an easy and fast deploy of a WSN, all the nodes in the network are assumed to be peer and, for ZigBee, beacon-less networks are simulated.
The main objective of the protocol evaluation is to show how the scheduler provides significant energy savings without compromising the efficiency of data delivery. Consequently, the power consumption and the Packet Delivery Ratio (PDR) have been chosen as performance metrics. In particular, the evaluated power consumption represents the instantaneous power used only by the radio transceiver. In more detail, to calculate it, the amount of time that a node spends in reception, transmission, and idle states during a duty-cycle period is calculated. Then, each time interval is multiplied by the corresponding power consumption value (per unit of time) reported in Table 1. Adding the obtained values and dividing the result by the duration of the duty-cycle period (
Simulation parameters.
The network layer of the considered model is compliant with the ZigBee specifics, whereas the MAC and PHY layers are implemented according to the IEEE 802.15.4 standard [22]. The proposed schema has been introduced into the MAC layer as a manager for the IEEE 802.15.4 MAC protocol.
The network topology is a squared grid topology and each node is provided with an on-board sensor that generates data packets with a fixed size of 60 bytes at the application layer. A Constant Packet Rate (CPR) traffic has been chosen, since WSNs are often used in applications aimed at periodic environmental monitoring. The WakeTime, that is, the time interval during which a node transmits or receives data packets, and the duty-cycle period
All the main simulation parameters are reported in Table 1. The simulation results are characterized by a 95% confidence interval with a 5% maximum relative error.
5. Results
The protocol solutions evaluated in this section are based on different design principles, so it is possible to deduce some preliminary considerations. Regarding ZigBee standard, (i) it does not provide any energy-efficient mechanism, (ii) the radio transceiver of each node is always active, and (iii) the network communications are carried out via omnidirectional transmissions. Moreover, negative phenomena such as idle listening and collisions are frequent due to the absence of any kind of synchronization. For these reasons, the power consumption of a node is expected to be high, leading to poor network lifetime. On the other hand, since the radio component is always ON, packets are sent as soon as they are available at the MAC layer, thus packet losses due to buffer overflow events should be unusual. This behavior should lead to a high PDR, especially in network characterized by low traffic. Instead, AS2-MAC is a low-power protocol that manages the duty-cycle of the node by exploiting an asynchronous MAC scheduler. So, it is expected to guarantee a significant reduction of power consumption. However, the awakenings of WSN nodes compliant with AS2-MAC are not so smart, since a node wakes up, for WakeTime seconds, every time a communication event (for both transmitting and receiving data) is scheduled. These awakenings occur also if no actual communications are coming and their duration is independent of the amount of transmitted data. Finally, AntDirMAC combines the pros of the scheduling approach with the advantages coming from directional communications. The use of switched-beam antennas should allow further minimizing the power consumption because lower power is necessary to cover the same distance during communication operations. Regarding the scheduling of node awakenings, AntDirMAC suffers from the same problems described for AS2-MAC. Finally, HEC-MAC makes nodes smarter since they are able to wake up only when an actual incoming transmission is occurring (i.e., a previous hop node is about to send data) and only for the needed time (by exploiting the early termination procedure). Of course, all the duty-cycle-based protocols could suffer from a lower PDR because buffer overflow events could happen during sleep periods.
The first performance analysis has been focused on evaluating the behavior of our solution when the network density (i.e., the number of nodes in the network) and the hop distance from sink node change. In this perspective, Figure 7 shows the trend of the power consumption for nodes one hop away from the sink, depending on the network density. The first consideration that arises from the graph concerns the increasing trend of the power consumption in relation to an increasing network density. However, this growth is much slower than one might imagine due to the next hop announcement mechanism, which allows WSN nodes to wake up only for receiving data coming from their “previous hop” nodes. In this way, although the network density increases, the number of “previous hop” nodes increases much more slowly. Furthermore, it is worth noting that the power consumption decreases when nodes send data at lower rate. This is because the early termination mechanism allows switching off the radio transceiver before the end of the WakeTime interval. Without this feature, the node would keep the idle state, which leads to about the same power consumption of transmissions. The trend of the power consumption in relation to the hop distance from the sink node is shown in Figure 8. In this case, the packet rate of each WSN node is equal to 0.1 pkt/s. According to the previous considerations, the graph shows a slow increase of power consumption when the network density increases. Moreover, it is interesting to observe the decrease of power consumption for nodes at the edge of the network. Indeed, they have less “previous hop” nodes with respect to nodes inside the network, so they can exploit the HEC-MAC features to keep their radio OFF for longer time.

Power consumption of HEC-MAC for nodes one hop away from the sink.

Power consumption of HEC-MAC for a packet rate of 0.1 pkt/s.
To highlight the effectiveness of HEC-MAC with respect to ZigBee, Figure 9 shows the comparison between the two protocols when a network with 36 nodes is considered. The packet rate of each node is equal to 0.1 pkt/s, and the power consumption is evaluated depending on the hop distance from the sink node. As expected, HEC-MAC provides a clear improvement on energy saving since it combines the advantages of both switched-beam antenna and duty-cycle approach. By exploiting directional transmissions, each node can reduce the power consumption by a factor approximately equal to the number of antenna sectors, whereas, thanks to the low duty-cycle, next hop information, and early termination, it wakes up for very short time interval in each duty-cycle period.

Comparison of the power consumption between HEC-MAC and ZigBee MAC, when there are 36 nodes and a packet rate of 0.1 pkt/s for each node.
A more meaningful evaluation about energy saving capabilities of HEC-MAC is highlighted in Figure 10, which shows a comparison among HEC-MAC, AS2-MAC, and AntDirMAC. As can be deduced from the graph, our solution leads to a significant reduction of power consumption. Indeed, as expected, the next hop information and the early termination procedure represent further features towards energy saving, since they allow WSN nodes to keep their radio OFF as much as possible. More in detail, AntDirMAC guarantees better performance with respect to AS2-MAC since it exploits directional communications, so reducing the power consumption of a factor equal to the number of antenna sectors. HEC-MAC further improves the energy management because it turns on the radio transceiver only for actual incoming transmissions. In this perspective, an interesting consideration can be made about the trend of the curves in the graph. While HEC-MAC shows a slow increase of the power consumption when the network density increases (as previously explained), both AS2-MAC and AntDirMAC reveal an increasing energy waste when there are more nodes in the network. This is because, when network density is higher, each node has more neighbors, so it has to wake up more times during a duty-cycle period (each time for WakeTime seconds), also if no actual packets are received.

Comparison of the power consumption among HEC-MAC, AS2-MAC, and AntDirMAC, when there are 36 nodes and a packet rate of 0.02 pkt/s for each node.
To evaluate the potential negative effect of HEC-MAC on network performance, the PDR has been evaluated by comparing the proposed solution with ZigBee standard, which guarantees the best performance regarding the packet delivery. The results of this comparison are shown in Figure 11, which highlights the trend of PDR in dependence of hop distance from the sink node. As expected, HEC-MAC provides lower PDR with respect to ZigBee due to the low duty-cycle. Indeed, between two successive transmissions, the data packets coming from upper layers are queued in the outgoing buffer. If the incoming rate of these packets is too high, several buffer overflow events may occur, so leading to packet losses and to a consequent decrease of PDR. However, since WSNs are usually exploited in loss-tolerant and low-rate applications, a little decrease in PDR is poorly significant. This is just the case of Figure 11, in which a packet rate consistent with a typical low-rate application for WSNs is chosen. In particular, the graph refers to a packet rate equal to 0.02 pkt/s and to a squared grid topology of 36 nodes. It is worth noting that the PDR decreases moving away from the sink node. Indeed, although the nodes at the edge of the network have to relay less packets, their own packets have to be relayed by several nodes, so the probability to lose those packets due to channel errors or buffer overflows is higher.

Comparison of the PDR between HEC-MAC and ZigBee MAC for nodes one hop away from the sink and with a packet rate of 0.1 pkt/s for each node.
6. Conclusions
The reduction of the power consumption is one of the major issues in WSNs, and the efficient management of the radio transceiver is the key element to achieve this objective. Actual trend is to combine software protocol solutions with hardware components, in order to reduce the energy waste without burdening the limited resources of WSN nodes. In this work, a cross-layer approach based on the joint use of a switched-beam antennas and a smart MAC scheduler is presented and validated. It significantly reduces the nodes' power consumption by exploiting scheduling techniques and directional communications. Specifically, the MAC scheduler manages the activation of the antenna sectors based on information coming from both MAC and network layers. Node awakenings occur only when an actual communication has to take place and only the interested antenna sector is activated. Moreover, each node is able to adapt its wake-up time to the network traffic, reducing it if lower data rate is required. The effectiveness of the proposed cross-layer approach has been evaluated through OMNeT++ simulation tool, which has been used to compare our solution with both ZigBee standard and two other energy-efficient MAC protocols, namely, AS2-MAC and AntDirMAC. The simulation results have shown that HEC-MAC protocol is able to further reduce the power consumption without negatively affecting the PDR in typical WSNs usage scenarios. We are aware that these results are only the first step towards the complete evaluation of our protocol solution, so we are already working in order to verify them through real testbeds and to perform further analysis in more complex scenarios.
Footnotes
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
