nism called LPL (Low Power Listening) to reduce their energy consumption. ..... 124 bytes(the maximum size of the PHY payload in 802.15.4 is 127 bytes).
1
Medium Access Control for a Tree-Based Wireless Sensor Network: Synchronization Management G´erard C HALHOUB, Alexandre G UITTON, Fr´ed´erique JACQUET, Antonio F REITAS, Michel M ISSON Clermont Universit´e / LIMOS CNRS Complexe scientifique des C´ezeaux, 63177 Aubi`ere cedex, France Emails: {chalhoub,guitton,jacquet,freitas,misson}@sancy.univ-bpclermont.fr
Abstract—Energy efficiency is a primordial issue in the wireless sensor networks. This is achieved by deactivating nodes when possible. In this paper we describe the MAC protocol MaCARI that synchronizes nodes in order to schedule active and inactive periods. MaCARI divides time into three periods: a synchronization period, a scheduled activities period where communications are constrained by a tree and an unscheduled activities period where nodes can communicate whenever in range. With this synchronization, nodes are able to save energy during specific time intervals. Therefore, we focus on the synchronization period and apply an optimization to reduce its duration. We validate this approach by simulations under different tree topologies.
Keywords: energy-efficient MAC protocol, wireless sensor network, synchronization. I. I NTRODUCTION Wireless sensor networks might be the most cost-effective solution today to monitoring buildings, water dams or wide areas. Such networks have to run several applications (monitoring, data collection, etc.). The most distinctive feature of such networks is their ability to run for long periods of time. However, having many small range wireless nodes collaborating while applying energy-efficient mechanisms is an important challenge. This work is part of the OCARI project [1] that focuses on optimizing communications in an industrial network. Our objective is to develop a MAC (medium access control) protocol that is compliant to the IEEE 802.15.4 standard [2]. Therefore, we assume the existence of two communicating entities: end devices and coordinator nodes. End devices are associated to sensors or actuators. These communicating entities have no routing features. They are also called reduced function devices in the 802.15.4 standard. Coordinator nodes are organized as a tree, whose root is the PAN coordinator. Each coordinator node is also the core of a star whose extremities are the end devices linked to it. A coordinator node has the ability to manage its end devices, to communicate with its parent (except for the root of the tree) and its potential children, and to relay or route packets. This organization is depicted on Fig. 1. In order to spare energy, MAC protocols define inactive periods during which nodes switch their radio devices off, which is the main source of energy consumption. They also save energy by scheduling transmissions to avoid collisions, which is a complicated task of the MAC protocols. In an industrial environment, the propagation conditions are specific
A
C
B
E
G
F
C
D
H
E
G
coordinator node Figure 1.
A
link
end device
B
F
D
H
tree links
Example of a tree-based network: physical structure and tree.
due to the presence of metallic machinery and mobile obstacles that perturb wireless communications. In order to avoid collisions caused by interferences, we schedule the activity periods of stars sequentially. However, this requires a precise synchronization of senders and receivers. In this paper, we propose a tree-based MAC protocol for a wide deployment of sensors. In our approach, we use the tree to synchronize all the nodes and split the activity into time slots. Within each time slot, a statistical approach such as CSMA/CA can be used. Moreover, by observing that the energy used to retrieve information increases as it is relayed by more wireless nodes, we decided to prioritize the communications between a node and its children in the tree by allocating small periods where father and children can communicate together. The tree is thus used as a default route by the routing protocol. The paper is organized as follows. Section II presents the state of the art of energy-efficient wireless MAC protocols. Section III describes our MaCARI protocol. In the description, we focus on the synchronization part of MaCARI, which is a fundamental mechanism to save energy. Section IV describes an optimization of the synchronization period and shows how the topology impacts on the synchronization delay of this mechanism. Finally, we conclude our work in Sect. V. II. S TATE OF
THE ART
Many research papers have proposed MAC protocols in order to reduce the energy usage. We start this section with a brief review of several such protocols, and we describe two important wireless standards. Then, we describe two protocols for wireless sensor networks that synchronize nodes.
2
A. Energy-efficient MAC protocols The energy of most sensor nodes is mainly consumed by their radio devices, which uses a comparable amount of energy to receive or to send frames. A large number of energyefficient MAC protocols have been proposed in the literature to overcome this issue. They can be categorized into three broad families: those based on contention, those based on time division medium access (TDMA) and those based on both. Note that some MAC protocols use a physical-layer mechanism called LPL (Low Power Listening) to reduce their energy consumption. LPL consists in sending a long preamble before the payload. The receiver does not need to be awaken when the sender starts sending, it just needs to be awaken during the preamble. For instance, LPL is used in a static way in [3] and in a dynamic way in [4], [5]. A study of its efficiency is illustrated in [6]. 1) Protocols based on contention: One of the first MAC protocol based on contention to reduce energy consumption is PAMAS (Power Aware Multi-Access protocol with Signaling) [7]. PAMAS is designed for sensor networks in which transmission and reception is the main source of energy consumption. Its goal is to eliminate overhearings by using a separate channel to exchange RTS/CTS. As PAMAS, S-MAC (Sensor MAC) [8] avoids overhearings, but it uses only one channel. Moreover, S-MAC reduces the idle listening of nodes by allowing them to switch their network interfaces off periodically during predefined time intervals. T-MAC (Timeout MAC) [9] is an improvement of SMAC. It dynamically modifies the time intervals during which the sensors sleep. D-MAC (Data gathering MAC) [10] has been proposed to reduce the latency of forwarding (which is a drawback of SMAC and T-MAC): all the nodes along the path from the source to the destination are awaken to forward the packets. 2) Protocols based on TDMA: The first MAC protocol based on TDMA to reduce energy consumption is TRAMA (Traffic-Adaptive Medium Access) [11]. With this protocol, nodes that neither receive nor transmit during a time slot can sleep by deactivating their radio interface, which reduces the energy consumption wasted in overhearing. Time slot reservations are based on the activity level of each node. FLAMA (Flow-Aware Medium Access) [12] brings an improvement over TRAMA. It uses a simpler algorithm to reduce the overhead of TRAMA. This algorithm is applied during a contention period, and data exchanges occur during the resulting time slots. 3) Hybrid protocols: ER-MAC (Energy and Rate based MAC) [6] and DE-MAC (Distributed Energy-aware MAC) [13] allow critical nodes (those with limited remaining energy) to sleep longer. Unlike TRAMA and FLAMA, critical nodes use their time slot to sleep and spare more energy than the non critical nodes. This result into balancing the energy among the nodes of the network. G-MAC (Game-theoretic MAC) [14] dedicates a time period for exchanges in CSMA and a time period for slotted communications. The slots are pre-allocated to transmitters and receivers depending on their activities.
Our contribution can be seen as a member of the family of hybrid protocols. B. IEEE standards for wireless MAC protocols The IEEE 802.11 standard [15] has been designed for wireless networks. It includes a power-save feature for both infrastructure and ad-hoc modes. It is based on a beacon mechanism managing rendez-vous between nodes1 . Improvements of the standard have been proposed in [16]. The main drawback of IEEE 802.11 in our context is that its characteristics do not match those of sensor networks (e.g., small throughput, low transmission power, small communication range, low computation capacities). The IEEE 802.15.4 standard [2] has been specifically designed for wireless personal area networks with low throughput. It covers the two lower layers of the OSI model: the physical layer and the MAC layer. It has two modes, a beaconenabled mode and a non-beacon mode, but only the former is energy-efficient. 802.15.4 proposes a new access method based on the CSMA/CA algorithm, which takes into account the fact that idle listening in wireless sensor nodes consumes nearly as much energy as receiving or transmitting. Thus, while 802.11 senses the channel frequently during the backoff, 802.15.4 senses the channel only once the backoff has expired. It is worth noticing that 802.15.4 possesses an energy saving mode, which is controlled by the Battery Life Extension (BLE) parameter. In the beacon-enabled mode of 802.15.4, nodes follow an activity cycle which is given in a superframe. The CSMA/CA mechanism of the 802.15.4 standard, called slotted CSMA/CA, defines two transmission modes: with contention and contention free. Nodes can communicate during contention free slots, and therefore during collision free slots, by using Guaranteed Time Slots (GTS). The main problem of GTS is that it is hard to forbid two concurrent nodes with overlapping radio interfering area to be allocated the same GTS. This problem is equivalent to synchronizing the superframes of all the nodes in the network. Two solutions have been proposed in the standard: the time division approach [17] and beacon only period [18]. An implementation is proposed for the first solution in [19]. C. Synchronization protocols for wireless sensor nodes In RBS (Reference Broadcasts Synchronization) [20], the authors emphasize the need of fine-grained synchronization in the context of sensor networks. While the sender-receiver approach synchronizes a sender with a receiver, RBS uses a new approach called receiver-receiver, where only receivers synchronize themselves. The sender initiates the synchronization by sending a message, and receivers exchange messages to inform each other when the first message was received. The main advantage of this method is to remove the time uncertainty of the sender side. In TPSN (Timing-sync Protocol for Sensor Networks) [21], the authors use the sender-receiver approach to synchronize 1 Notice that this feature has not been implemented yet because of its important complexity.
3
a network organized as a tree. They are able to achieve a better synchronization than RBS by studying the effect of uncertainties on both protocols. They showed that TPSN reduces the impact of propagation and receiver side time uncertainties, and removed the sender side time uncertainties by having the MAC layer timestamp messages.
A a B b C c D d E
III. O UR PROPOSITION : M ACARI PROTOCOL In this paper, we describe our protocol called MaCARI, and we focus on the optimization of the synchronization period. The network management in MaCARI is achieved using a tree structure. MaCARI divides time into three periods: a synchronization period, a period of scheduled activities constrained by the tree and a period of communications not constrained by the tree. These three periods are represented on Fig. 2 and detailed in the following. 1111 0000 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111
T0
synch.
Figure 2.
T1
T2
1111 0000 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111
T0
T1
scheduled act. unscheduled act. global cycle Global cycle is split into three periods.
A. The synchronization period [T0 ; T1 ] The goal of the synchronization is to provide the same vision of a global time to all the coordinators and the end devices of the tree. This shared time allows the coordinators and the end devices to sleep and to wake up at predefined instants, sparing energy while sleeping. The main difficulty is to broadcast a synchronization beacon in a multi-hop fashion, which increases the complexity and the error margins on time. Unlike the IEEE 802.15.4 standard, we completely avoid beacon frame collisions by scheduling the beacon transmissions. We use a single mechanism to: • schedule the beacon transmissions in [T 0; T 1], • share a time schedule based on the instant T1 , • broadcast the scheduling (i.e., the activation order) of all the stars of the tree for [T 1; T 2], • broadcast the activity schedule of the star of each coordinator. Figure 3 shows a possible result obtained by the application of our mechanism on the example of Fig. 1. Notice that on the y-axis of the figure, capital letters represent coordinators, and small letters denote all the end-devices of the star of a coordinator. The synchronization is initiated by the PAN coordinator, A on the figure, which sends a beacon. A beacon is broadcasted by every coordinator according to an order decided by the PAN coordinator and included in each beacon: (A, C, B, E, F, D, G, H). This list is called the synchronization order in the following. By respecting this synchronization order, every coordinator sends its beacon during its own time interval. This ensures that there is no beacon collision. When A sends its beacon, it is received by all the enddevices of its star (denoted by a in the example), and by
e F f G g H h
000 111 111 000 000 111 111 000 000 000111 111 000000 111 111 111 000 000 111 111 000 000 111 000 111 000 111 000 111 000 111111 000 1111111 0000 000 111 000 000 111 T0
T1 transmission
Figure 3. nators.
time
listening
000 reception 111
The synchronization is performed sequentially by all the coordi-
coordinators B and C which are its two children. Thanks to the synchronization order, C determines that it is the next coordinator to transmit its beacon, and sends it to its enddevices (denoted by c) and its children coordinators (E and F ). Based on the synchronization order, B knows that it has to wait for one beacon transmission time, as there is only one coordinator (which is C) between A and B in the synchronization order. After having waited for one waiting time, B sends its own beacon. The process iterates for all the coordinators of the tree. By the end of the synchronization period, which is T1 , all the entities (coordinators and enddevices) of the tree are synchronized on T1 , and they are aware of the scheduled activities in [T1 ; T2 ], which are included in the payload of every beacon. B. Scheduled activities period [T1 ; T2 ] MaCARI schedules the activities during [T1 ; T2 ] in a way that it allocates a specific activity period to each star without having interferences with the rest of the stars of the tree. To allow the coordinators to communicate with one another, the parent coordinator is listening during the whole activity period of its children coordinators. That creates common active periods between two coordinators (the father and its child) at the end of the activity period of each child coordinator. These two coordinators are the only two active elements of the tree during the common active period, which guarantees a collision free time interval by applying a pulling/selecting mechanism. Thus, the cycle of activity of each star is composed of two parts (except for the root coordinator): (i) a first part during which the coordinator collects the data from the sensors or pilots its actuators, and (ii) a second part during which collected data from its descendants (including itself) is relayed to the father coordinator, and data from the father coordinator is transmitted to the coordinator. Each coordinator manages the activity of its star according to the number of its end devices and their levels of activity; the optional use of GTS is ensured without risk of superposition of GTS of other stars from which the 802.15.4 standard suffers.
4
A a
10 00 11 00 1010 11 11 00
1010 10
IV. T OPOLOGY
IMPACT ON SYNCHRONIZATION DELAYS
A. Optimization of [T0 ; T1 ] In Subsect. III-A, we assumed that the transmission of D d 00 11 0 1 a beacon can follow its reception2. This was the case for E 00 11 10 e coordinator C which sends its own beacon right after having F 11 00 f received the beacon from A (see Fig. 3). However, this is G 1 0 g 00 11 H 00 11 h time not the case since the time needed for (i) the communications between the physical layer and the MAC layer and (ii) the T1 T2 MAC processing time cannot be neglected. In the following, activities within the star 1010 father-child communications we denote these two phenomenons as the processing. While the transmission time of a beacon is only depending on its Figure 4. A scheduling of the activity periods of the stars. length, the processing time might vary depending on the component. Our optimization is based on the fact that all the children The PAN coordinator of the network decides how the activities of each star are scheduled. A possible scheduling of a coordinator receive the beacon at the same time, and thus the processing time is consumed simultaneously by all corresponding to the tree of Fig. 1 is given in Fig. 4. the children. An example of this optimization is shown on Fig. 5. This figure shows how nodes A, B and C perform the C. Unscheduled activities period [T2 ; T0 ] During [T1 ; T2 ], direct exchanges between coordinators are synchronization. A first sends its beacon, which is received carried out only through the tree. This might cause routing and by B and C at the same time. Both nodes have to wait for relaying delays. The time interval [T2 ; T0 ] is devoted to the the processing time before their MAC layers detect that a exchange of data between coordinators without being forced new beacon has arrived. C is the next coordinator to send to respect the tree topology as long as a physical connection its beacon, according to the synchronization order. Therefore, exists between them. Only the coordinators are active, and C sends its beacon one processing time after the end of the transmission of the beacon by A, whereas B can send its medium can be accessed using slotted CSMA/CA. On the example of Fig. 1, the coordinator H could com- beacon immediately after the end of the transmission of C. municate directly with the coordinator F which is within its range, without following the path (H, E, C, F ) on the tree. B
b
C
c
11 00 00 11 1010
0110
D. Energy efficiency The activity ratio of the various entities of the network varies according to their type (coordinator or end-device) and according to the three periods of the global cycle. 1) [T0 ; T1 ]: During this period end-devices are active until they receive the beacon, whereas coordinators are active until they send the beacon. Additionally, coordinators can sleep if the period separating the reception of the beacon and the time it has to send it is long enough to go to sleep mode. For example on Fig. 3 the coordinator B does not have enough time to go to sleep mode while D could. 2) [T1 ; T2 ]: The activity of each star can be divided into two parts: end devices and coordinators are active during the first part to exchange the data concerning intra-star activity, and the coordinators are active alone during the second part to communicate with their parent coordinator. This means that outside the activity period of a star the end devices are sleeping and the coordinators are active during the activity period of their stars and of their children stars as well. For example, coordinator C is active during 3/8 of [T1 ; T2 ] and the enddevices of C are active during less than 1/8 of [T1 ; T2 ]. This is important because most entities are end-devices. 3) [T2 ; T0 ]: The unscheduled activities period constitutes the remainder of the global cycle during which the enddevices are in sleep mode. Only the coordinators, taking part in the routing protocol, are active. The energy-efficiency of coordinators during this period is ensured by an energyefficient routing protocol.
A B C
0000 1111 1111 0000
transmission
time processing
1111 reception 0000
Figure 5. C transmits its beacon one processing time after the end of the transmission of A, while B transmits it immediately after the end of the transmission of C.
This is achieved in MaCARI by adding extra information in the payload of the beacon, so that the coordinators can determine how long they have to wait to send their beacon at the right time. B. Simulation We implemented MaCARI on the NS-2 simulator [22], version 2.31. The results presented here concern the synchronization period [T0 ; T1 ]. We varied the number of nodes from 10 to 24. This results into beacon frames having a length between 54 to 124 bytes(the maximum size of the PHY payload in 802.15.4 is 127 bytes). Therefore, the transmission time over the 250 Kbps medium varies from 1.728 ms to 3.968 ms. We fixed the processing time to be the transmission time plus a constant of 0.08 ms. We considered random tree topologies of fixed depth (set to 3), with random nodes placement. We varied the number 2 According to the fact that the communication range of nodes is limited to a few meters, propagation times can be neglected with respect to the frame duration.
5
of children per coordinator from 3 to 5. Each result has been averaged over 100 retries and considering a 95% confidence interval. The synchronization order computed by the PAN coordinator is a simple breadth-first search of the tree. C. Results
R EFERENCES
Fig. 6 shows the duration of the synchronization period (i.e., T1 − T0 ) as a function of the number of nodes of the topology. Without optimization, the processing time has to be added before each reception of a beacon. The solid line shows the duration of the synchronization period with no optimization. Without optimization, the results only depend on the number of nodes in the network; the non-linearity is due to the increase of the beacon length as the number of nodes increases. Each of the three dashed lines represents the duration of the period, with our optimization and with topologies having a maximum number of children of 3, 4 and 5. As the number of children increases, the parallelism of processing is more frequent, and therefore the duration slightly decreases. Using the optimization, we are able to reduce significantly the duration of the period from 28.3% (for 3 children and 10 nodes) to 33.5% (for 5 children and 24 nodes).
Duration (in seconds)
0.2
0.15
0.1
Without optimisation 3 children max 4 children max 5 children max
0.05
0
10
Our future work consists in determining the best synchronization order to further reduce the synchronization duration. Also, we plan to work on the reduction of the scheduled activities period by parallelizing the activities of non-interfering stars.
12
14
16
18
20
22
24
Number of nodes Figure 6. The topology has little impact on our optimization of the synchronization period.
V. C ONCLUSION MaCARI concerns wireless sensor networks characterized by a topology which connectivity can be codified by a tree. It contains three periods: first, all the entities of the tree are synchronized, then scheduled activities take place during which communications are constrained by the tree links, and finally coordinators apply an energy-efficient routing protocol and are free to communicate with any coordinator in range. Our access method saves energy during each period, for end devices as well as for coordinators. Also, coordinators are able to communicate to perform relay or routing activities during [T1 ; T2 ] and [T2 ; T0 ]. We detailed an optimization of the synchronization period [T0 ; T1 ] and we showed with simulations that the topology has only a limited impact on the synchronization duration.
[1] “Ocari,” http://ocari.lri.fr/. [2] “Part 15.4: Wireless medium access control (MAC) and physical layer (PHY) specifications for low-rate wireless personal area networks (WPANs),” ANSI/IEEE, Standard 802.15.4 R2006, 2006. [3] J. Polastre, J. Hill, and D. Culler, “Versatile low power media access for wireless sensor networks,” in Sensys, November 2004. [4] A. El-Hoiydil and J.-D. Decotigniel, “WiseMAC: An ultra low power MAC protocol for multi-hop wireless sensor networks,” in Algorithmic Aspects of Wireless Sensor Networks, ser. LNCS, vol. 3121. Springer Berlin / Heidelberg, 2004, pp. 18–31. [5] W. Ye, F. Silva, and J. Heidemann, “Ultra-low duty cycle MAC with scheduled channel polling,” in 4th ACM Conference on Embedded Networked Sensor Systems (SenSys), Boulder, Colorado, USA, November 2006. [6] R. Kannan, R. Kalidindi, and S. S. Iyengar, “Energy and rate based MAC protocol for wireless sensor networks,” ACM SIGMOD Record; Special issue: Special section on sensor network technology and sensor data managment, vol. 32, no. 4, December 2003. [7] S. Singh and C. Raghavendra, “PAMAS: Power aware multi-access protocol with signalling for ad hoc networks,” ACM Computer Communications Review, July 1998. [8] W. Ye, J. Heidemann, and D. Estrin, “An energy-efficient MAC protocol for wireless sensor networks,” in INFOCOM, 2002, pp. 1567–1576. [9] T. van Dam and K. Langendoen, “An adaptive energy-efficient MAC protocol for wireless sensor networks,” in international conference on Embedded networked sensor systems, Los Angeles, California, USA, November 2003. [10] G. Lu, B. Krishnamachari, and C. Raghavendra, “An adaptive energyefficient and low-latency MAC for data gathering in sensor networks,” in Ad Hoc and Sensor Networks, April 2004. [11] V. Rajendran, K. Obraczka, and J. Gracia-Luna-Aceves, “Energyefficient, collision-free medium access control for wireless sensor networks,” in Proceedings of the First International Conference on Embedded Networked Sensor Systems, (SensSys), Los Angeles, California, USA, November 2003. [12] V. Rajendran, J. Garcia-Luna-Aveces, and K. Obraczka, “Energyefficient, application-aware medium access for sensor networks,” in IEEE International Conference on Mobile Adhoc and Sensor Systems Conference, Washington, USA, November 2005. [13] R. Kalidindi, R. Kannan, S. S. Iyengar, and L. Ray, “Distributed energy aware MAC layer protocol for wireless sensor networks,” in International Conference on Wireless Networks, 2003, pp. 282–286. [14] M. Brownfield, Y. Gupta, and N. Davis, “Wireless sensor network denial of sleep attack,” in IEEE Workshop on Information Assurance, June 2005. [15] “Part 11: Wireless LAN medium access control (MAC) and physical layer (PHY) specifications,” ANSI/IEEE, Standard 802.11 R2003, 1999. [16] Y.-C. Tseng, C.-S. Hsu, and T.-Y. Hsieh, “Power-saving protocols for IEEE 802.11-based multi-hop ad hoc networks,” in IEEE INFOCOM, 2002. [17] A. Koubaa, M. Alves, M. Attia, and A. Van Nieuwenhuyse, “Collisionfree beacon scheduling mechanisms for IEEE 802.15.4/Zigbee clustertree wireless sensor networks,” Polytechnic Institute of Porto, Technical Report TR-061104, November 2006. [18] A. Koubaa, A. Cunha, and M. Alves, “A time division beacon scheduling mechanism for IEEE 802.15.4/Zigbee cluster-tree wireless sensor networks,” Polytechnic Institute of Porto, Tech. Rep. TR-070401, April 2007. [19] A. Cunha, M. Alves, and A. Koubaa, “Implementation details of the time division beacon scheduling approach for ZigBee cluster-tree networks,” Polytechnic Institute of Porto, Technical Report TR-070102, November 2007. [20] J. Elson, L. Girod, and D. Estrin, “Fine-Grained Network Time Synchronization using Reference Broadcasts,” in OSDI, 2002. [21] S. Ganeriwal, R. Kumar, and M. B. Srivastava, “Timing-sync protocol for sensor networks,” in Sensys, 2003. [22] “Network simulator 2,” http://www.isi.edu/nsnam/ns/.