## 4 SENSED-SG Design and Protocols
### Sensed-Sg MAC Layer
The ON period consumption (in which the radio is either passively or actively trying to receive messages) can be up to three orders of magnitude bigger than the OFF period (when the transceiver is off) [51]. Because of that, nodes will try to remain as much as possible in the former to extend their lifetime without neglecting their functionalities such as routing tasks, or data processing. Concerning duty-cycling techniques for WSNs, WiseMac [52] and B-MAC [53] were the first protocols implementing such techniques denoted as Low-Power listening (LPL) in the MAC layer [54]. LPL proved its efficiency for WSNs by significantly reducing the power consumption of receiving nodes from nearly  
Figure 2: Growing pattern of a power grid. 50 mW to just 3.5 mW [53]. In particular, in B-MAC, a node willing to send a message would initiate its dispatching phase by broadcasting a void preamble signal which is long enough to guarantee all receiver nodes wake up (enter in their ON phase), sense the preamble, get ready (leave the radio ON) and wait for the reception of the message. The preamble acts as a \"stay awake\" signal; therefore, if a node wakes up, and after sensing the physical channel does not detect any preamble, it would immediately go back to sleep mode, thus saving battery. This solution, while simple, presents many drawbacks that were coped with with later protocols. In this sense, X-MAC [55] replaces the void preambles with a \"packetized preamble\" that identifies the recipient node of a specific message. This way, if a node wakes up and detects a preamble addressed to another node, it would directly go back to sleep mode. Furthermore, X-MAC includes the possibility for the receiver node to acknowledge the reception of a preamble by means of an ACK packet. In particular, when a sender node receives an ACK, it stops dispatching packetized preambles and directly sends its message. The objective is to reduce the number of preambles sent and, therefore, to extend the entire network lifetime. BoX-MAC-2 [56] takes as its starting point the X-MAC and B-MAC protocols but incorporates a significant feature: instead of sending preambles, BoX-MAC-2 dispatches the message several times as a preamble. This improvement greatly contributes to further reduce the power consumption in nodes by eliminating extra messages like the preambles and acknowledgements (in comparison with X-MAC). It is worth remarking that, by default, TinyOS makes use of the BoX-MAC-2 algorithm for its transmissions, and although having been proved as an acceptable solution, it leaves room for improvement. Our solution here presented relies on the principles of the Contikimac [57] radio duty-cycling mechanism. It assumes the BoX-MAC-2 basis and, as an additional aspect, it includes a thin sender-receiver synchronization mechanism. This synchronization was firstly explored by [PERSON] and [PERSON] in their proposal for the Wise-MAC [52] algorithm, obtaining a notable savings of energy and an appreciable increase in the bandwidth utilization for WSNs. Instead of involving complex and tight clock-synchronization procedures (as in beacon-enabled ZigBee networks), this technique relies on a simple phase-lock mechanism: senders must learn when the receivers' radio is active (the ON phase of their duty cycle) so as to dispatch their packets at that precise moment. The phase-lock mechanism prevents senders from transmitting messages when receivers are not listening (their radios are OFF) which negatively affects their power consumption. Furthermore, since sender nodes will only use the wireless channel during short periods of time, other nodes will usually find it free, thus increasing the bandwidth utilization. The way senders learn receivers' duty-cycling phases is by means of link layer acknowledgements. The first time a sender wants to transmit to a specific receiver, it will continuously transmit its message (as if it were a preamble) until the receiver node receives such packet and acknowledges it by an ACK.