Bandwidth and Energy Consumption Tradeoff for IEEE 802.15.4 in Multihop Topologies

we analyze IEEE 802.15.4 mechanisms including node organization, MAC mechanisms, energy conservation, topology construction and node association. We detail how we should modify IEEE 802.15.4 to cope efficiently with multihop topologies, scheduling the transmissions. We quantify the impact of the cluster-tree algorithm on the network performances. We expose how the overall throughput can be improved with a novel cluster-tree construction algorithm defined formally as a Mixed Integer Linear Programming formulation. We quantify the impact of each parameter on the performances of IEEE 802.15.4. In particular, we present a self-configuration algorithm to dynamically adjust the Backoff Exponent so that the protocol always operates in optimal conditions.


MAC mechanisms
In these topologies, IEEE 802.15.4 may work either in non-beacon or in beacon-enabled mode. The MAC strategy impacts the duty-cycle and thus the capacity and energy consumption. In IEEE 802.15.4, one set of nodes (the coordinators) regulates the transmissions. Any exchange is initiated from the non-coordinator to the coordinator. In particular, the coordinator buffers all the packets destined to others. Then, each non-coordinator MUST periodically ask for the buffered packets to the coordinator by sending a data-request -a tm o s t every macTransactionPersistenceTime since packets are removed from the buffer of     15.4 implements two modes for the medium access. In non-beacon mode, transmissions use a classical CSMA-CA scheme while the beacon-enabled mode introduces the concept of superframes to schedule the transmissions more appropriately and to assign dedicated timeslots.

Non-beacon mode
In non-beacon mode, a node just uses a classical CSMA-CA procedure to transmit its packets ( Figure 3)  Figure 3 presents a simplified state diagram for the unslotted mode, separated for coordinators and children. As coordinator, the node has just to wait solicitation: the medium is pre-reserved by the other side. As child, it must choose a random backoff, trigger a CCA after the backoff is finished, and then transmit the frame if the medium is idle. The number of backoff retries and retransmissions are upper-bounded respectively by macMaxCSMABackoffs and macMaxFrameRetries. Besides, a node must ensure the BE values does not exceed macMaxBE. A child may wait for a response from the coordinator: either a simple ack if it transmitted a data packet or an ack followed by a data packet if it transmitted a data-request. As coordinator, the only response to wait can be an ack. IEEE 802.15.4 also proposes a Battery Life Extension (BLE) option for very energy-constrained devices. With this option enabled, a node will choose a minimal Backoff Exponent value after a successful transmission. Thus, it will gain medium access quicker than other nodes without BLE.

Beacon-enabled mode
In beacon-enabled mode, IEEE 802.15.4 introduces the concept of superframes ( Figure 4). Each coordinators sends periodically -every Beacon Interval (BI) -a beacon, piggybacking control information. Just after having received the beacon, children may engage a transmission during the Contention Access Period (CAP) using slotted CSMA-CA. Children may in particular map a reservation during the CAP to obtain a dedicated Guaranteed Timeslot (GTS) placed just after the CAP. Finally, the children and the coordinator may sleep until the next beacon. The whole active part of the superframe lasts for a Superframe Duration (SD). When a node has finished to participate to the superframe, it may sleep until the next beacon reception/transmission. The Superframe Duration (resp. Beacon Interval) are defined through the Beacon Order (resp. Superframe Order) values, according to the following relation: SD = aBaseSuperFrameDuration * 2 SO (1)  Figure 5. MAC procedure in the beacon-enabled mode for the child By adjusting the BO and SO values, we can obtain a tradeoff between network capacity and energy savings. For instance, a duty cycle of 1% can be obtained if SO = BO − 7(2 −7 < 1%). The beacon-enabled mode is only available in the star and cluster-tree topologies since we must maintain a hierarchy of coordinators to schedule appropriately the beacons.F i g u r e 5 illustrates a simplified state diagram of the child mode in slotted mode. The coordinators implement the same behavior as depicted in Figure 3. In particular, the node triggers two CCA before transmitting a packet (the CW parameter in the IEEE 802.15.4 standard). Besides, a child may sleep all other the time except during CCA, the transmission and while waiting for a response from the coordinator (a unique ack or a pair of ack and data packets).

Peer-to-peer topology
If no energy optimization technique is implemented in a peer-to-peer topology, a Full-Function Device (FFD) may receive a packet at any time from a neighbor. To save energy, the MAC layer must implement a synchronization mechanism so that two neighbors can agree on a sleeping schedule. The pair of nodes must be periodical awake to exchange packets. A Low-Power-Listening protocol with preambles may be implemented to be sure the receiver is awake. This technique was proposed to reduce the energy consumption in very low traffic conditions [4]. When a node wakes-up and senses a signal, it must stay awake to receive further a data packet. Bachir et al. [5] proposed to piggyback information in the preamble so that a node knows it is the destination of the next packet when it receives the preamble, technique known as preamble sampling. The nodes may also agree on their wake-up schedule, as proposed in S-MAC [6]. Nodes broadcast periodically beacons to publish their schedule and synchronize with their neighbors. This mechanism may be coupled with the preamble to deal with clock drifts and reduce the synchronization requirements, as in [7]. However, all these propositions are outside the scope of the standard and to the best of our knowledge were never evaluated with IEEE 802.15.4.

Star topology
In single hop networks (i.e. star topology), all transmissions are initiated by the followers (i.e. nodes which follow the PAN coordinator). Thus, a node may sleep safely, asking periodically for pending packets in the PAN coordinator with a data-request. Nodes may reduce their energy consumption: only the PAN coordinator has to stay awake continuously.

Cluster-trees
non-beacon mode In a cluster-tree, we may authorize some nodes to be categorized as Reduced-Function Devices (RFD). These nodes cannot relay packets because of energy constraints. Since they would constitute leaf nodes in the cluster-tree, they may sleep safely. However, all other nodes are Full-Function Devices (FFD) and cannot sleep: energy savings are very limited.
beacon-enabled mode As highlighted previously, all the transmissions are initiated by the children, i.e. the coordinator cannot start a transmission before a solicitation of its child. This feature permits to implement efficient power-saving mechanisms. As follower (i.e. a node which participates to a superframe without coordinating it), a node must wake-up to receive at least one beacon every macTransactionPersistenceTime. If packets are pending, it must retrieve them immediately by transmitting a data-request. As soon as a follower has neither pending packet nor packet in its own buffer to transmit to its parent, it may sleep. As coordinator, a node must stay awake during the whole active part of its superframe. For all these reasons, the beacon-enabled mode should be privileged since this constitutes the only way to optimize the energy consumption in multihop topologies.

Topology construction
Except for the peer-to-peer topology where a node can communicate with any neighbor, the cluster-tree and star topologies require a node to be associated before transmitting packets. An unassociated node must discover a neighboring associated coordinator and send an association-request. Then, the node sends a data-request to retrieve an association-reply. If the newly associated node is a Full-Function-Device (FFD), it may accept now the association requests. However, the standard does not specify what coordinator a node should choose to associate with. The properties of a cluster-tree when a node associates to the first available parent is studied in [8]. The impact of mobility on the topology formation process was also investigated in [9]: it creates some convergence problems. Zigbee [10] proposes to couple the association procedure with an address assignment scheme: addresses being hierarchical, routing is simplified. However, the limited pool of addresses could create the orphan problem, as highlighted in [11]. Thus, the cluster-tree must be well balanced. Only few attention has been given on determining the characteristics of the cluster-tree should own and what algorithms could obtain them.

Active versus passive discovery
To discover an already associated coordinator, we may implement two strategies: active discovery: an o d ee n t e r si nactive scan and sends a beacon-request on each operational channel. An already associated coordinator MUST reply with a beacon if the PAN work in the non-beacon mode, otherwise the coordinator ingnore the  beacon-request and continue sending its periodic beacons. Upon reception of a beacon, the node can engage the association procedure . If many nodes begin an active scan simultaneously, we may face to collisions. Besides, this method must be carefully implemented in beacon-enabled mode: a coordinator may sleep during the passive part of the superframe. Thus, one beacon-request has to be transmitted every Superframe Duration (SD), each channel being scanned during Beacon Interval (BI).
passive discovery: In beacon-enabled mode, a coordinator MUST transmit every Beacon Interval (BI) its beacon at the beginning of the active part of its superframe. Thus, a node may implement a passive scan: it has to stay at least BI on a channel to receive any beacon from already associated coordinators. If BI and channel are not known a priori, the node may assume the worst case, leading to very long discovery times. This strategy is impossible in non-beacon mode since an associated coordinator does not send any periodical packet.
The discovery process may be adapted for mobile nodes in beacon-enabled mode, as in [12] . They introduced a meeting channel: the manager in charge of mobile nodes send periodically their beacons on the meeting channel. Since the number of managers is limited and are geographically distributed, collisions may stay limited. Some focused on the discovery process for multichannel IEEE 802.15.4 (see [13]). The scan is optimized to discover first coordinators with a small Beacon-Interval (larger probability to be discovered first when a channel is scanned during a small duration). Figure 6 illustrates this behavior: the discovering node scans for small increasing durations each channel. Karowski et al. [14] extended this approach by reducing the redundancy in the discovery phase (a periodical slot has not to be scanned several times).

Required properties
Since Wireless Sensor Networks comprise a wide range of applications, we cannot focus on a particular topology: we may deploy a grid for surveillance applications, or pseudo-randomly for building automation. Moreover, the topology may be dynamic: we must be able to insert or remove nodes during the lifetime of the network. Thus, algorithms and protocols must distributed (decisions should use only local knowledge to decrease the overhead and improve the scalability) and self-configurable (the protocol must assign autonomously addresses and obtain its parameters values). In the same way, we must cope with different traffic patterns: convergecast (Multipoint to Point) : all the packets are transmitted to one sink;

Point to Multipoint : information is flooded in the network;
Point to Point : direction communications may exist between e.g. a sensor and an actuator. For instance, Zigbee [10] proposes routing shortcut mechanisms to cope with this traffic pattern. On the contrary, RPL [15] uses only the DAG to route packets.

Cluster-tree scheduling in multihop topologies
Because we aim at minimizing the energy consumption in multihop topologies, we focus here on the cluster-tree topology in beacon-enabled mode. As highlighted in section 2.2, other modes do not permit to save energy easily.

Problem statement
Any device has to participate to the superframe of its parent, denoted incoming superframe. Additionally, a FFD has also to maintain its own superframe, called outgoing superframe.T h e standard mentions the outgoing and incoming superframes are interspaced by StartTime.
Obviously, StartTime may be superior than Superframe Duration, else both superframes will overlap, creating collisions. Since cutting off its radio has an energy cost, we may choose StartTime = SD so that the outgoing superframe follows directly the incoming superframe. Figure 7 illustrates a simple cluster-tree with this approach. Thus, all the coordinators with the same depth in the cluster-tree will start the active part of their superframes simultaneously. They will in particular send their beacon at the same time, creating a collision and making IEEE 802.15.4 inefficient. CSMA-CA performs very poorly in multihop topologies because of hidden nodes, unfairness and collisions, as demonstrated in [16]. Thus, we face to the same pathological cases in IEEE 802.15.4: collisions increase quickly with the number of nodes and the density, making the network unsuitable for large-scale applications. We clearly have to solve these problems to make IEEE 802.15.4 efficient in multihop topologies.

Beacon-only period
To reduce the number of collisions, we may reserve a Beacon Only Period (BOP) at the beginning of the superframe, as proposed by the IEEE 802.15.4b [17]. The BOP is divided into slots: each coordinator has to choose a BOP slot to transmit its beacon. Thus, several coordinators may share the same superframe without interference by choosing different BOP slots for their beacons. Let consider Figure 8 illustrating such approach (with the same topology as Figure 7). We only represented the superframe of the nodes B, C and D. We have in this case 4 dedicated timeslots used for the beacons: B chooses the second slot for its beacons while node D chooses the 4 th one. An algorithm must be implemented to detect collisions of beacons during a BOP slot. Indeed, a node N may detect a collision but the transmitters may not if e.g. N is placed in the middle of both coordinators. While this technique limits collisions between beacons, data may keep on colliding. Indeed, the different coordinators share the same Contention Access Period, creating hidden terminals. Unfortunately, this scenario occurs frequently, as demonstrated in [18].

Superframe scheduling
A second solutions consists in scheduling the superframe so that nodes which participate simultaneously to the superframe of two different coordinators do not interfere with each other, as advocated by IEEE 802.15.4b [17]. In this way, the remove entirely the collisions among nodes which participate to different superframes. The standard advocates all the nodes to use the same Beacon Order (BO) and Superframe Order (SO) values. In this case, we can construct a schedule of superframes using a Time Division Multiple Access (TDMA) approach. Each slot may contain exactly one superframe: a node has consequently to find a slot not used by an interfering coordinator to transmit its superframes. Using different SO and the same BO is equivalent to reserving several consecutive slots for one coordinator. However, this implicates the scheduling problem by inserting new constraints. In particular, the consecutive slots must start at a multiple of SD. This scheduling problem has received strong attention in the past. A clustering approach could simplify the scheduling as in [19], in which the PAN coordinators find an accurate scheduling while controlling the power of each superframe. However, this requires a centralized approach, based on information complicated to obtain (i.e. interferences are not trivial to estimate). This scheduling has been extended for the mesh topologies in [20]. Thus, such solution does not permit to save energy. A greedy localized solution was proposed in [21]: a node picks a free slot in its 2-neighborhood to schedule its superframe. However, it only takes into account interferences among coordinators, and not with children, which occur frequently in a cluster-tree. The TDMA approach is often more efficient, as highlighted in [22]: it reduces obviously the collisions. However, a collision-free scheduling is practically complicated to achieve.

Combining both techniques
Since we deal with constrained nodes, we aim at minimizing the energy consumption. Thus, we should use shortest paths routing to reduce the number of transmissions. This metric permits to avoid oscillations when creating the DAG while avoiding any loop. We chose to preserve a route length stretch factor of 1: the routes length through the DAG has to be the same as in the original graph. We will adopt the following notation to make a distinction between the different slots: backoff slot : the units of time used by CSMA-CA algorithm; GTS slot : the active part of the superframe is divided into slots (which are different from the backoff slots) as described in the standard. The first slots of the active parts are not used, while the last slots correspond to the GTS slots; BOP slot : the Beacon-Only-Period is divided into slots, containing at most one beacon; superframe slot : a slot containing the whole active part of a superframe, as explained previously.
When the notation is not ambiguous, we will use the term slot alone. We integrated both the Beacon-Only Period and the superframe scheduling techniques as depicted in Figure 9. This organization has the following assets: 1. we avoid wasting bandwidth for coordinators without children; 2. the scheduling permits to maintain several parents, creating redundant paths toward the sink; 3. we reduce energy consumption by maximizing the number of nodes without children.

Neighborhood discovery
To implement a distributed scheduling solution, a coordinator should know the list of slots used by interfering coordinators. We consider two coordinators interfere with each other if their superframe collide. For instance, a child of the first coordinator may interfere with the child of the other one. Since determining the exact set of interfering coordinators is complicated to obtain, we should just estimate it. IEEE 802.15.4 [17] proposed to exchange this information along the cluster-tree although the radio and cluster-topologies may very different. We consider rather the 2-radio neighborhood constitutes a better approximation, collisions among 3 or 4-neighbors being solved separately as exceptions.
A coordinator has finally to piggyback in its beacons its depth in the cluster-tree (to break conflicts), a leaf flag (i.e. has the coordinator at least one child), the current BOP and superframe slots and a list of 1-neighbors with their short address and their BOP and superframe slots.
To have the radio and not the cluster-tree topology, a coordinator always wakes-up at the beginning of the slots used by its 1-neighbors. It will then go sleeping immediately after having received the corresponding beacon. To track changes, a coordinator must periodically stay awake to receive all the beacons and update its 2-neighborhood table.

BOP scheduling
The Beacon-Only-Period aims just at solving collisions between coordinators sharing the same superframe. Thus, a new coordinator just picks a random BOP slot not used by any 2-neighbor using the same superframe. We use consequently the approach proposed in [22].

Superframe scheduling
After having collected the slots used by the superframes of its 2-neighboring coordinators, a new coordinator C chooses a superframe slot as following: 1. C sorts the superframe slots according to the number of 2-neighbors using them; 2. C removes the slot of its parent: it cannot maintain a superframe simultaneously without a severe impact on performance; 3. C picks randomly one of the least loaded superframe slots.
Obviously, if a superframe slot is not used at all in the 2-neighborhood, it will pick it. However, collisions may even appear because of e.g. inconsistent simultaneous decisions. We can make the distinction between the following cases: • two coordinators are interfering. In particular, at least one coordinator detects a carrier sense when the other transmits a packet. If they use a different BOP slot, one coordinator will detect an interfering beacon: it reapplies the precedent rules forbidding the current slot.
If they use the same BOP slot, they cannot detect a carrier sense. However, children will not be able to finalize the association since they did not receive the beacon.T h u s , a coordinator without child (no association-request was received) just chooses another superframe slot forbidding the current slot. This change is safe since it does not have any follower.
• an unassociated node suffers from the hidden terminal problem, making a pair of coordinators colliding. With a high probability, this node has another neighboring coordinator with which it can associate. If no candidate exists, the unassociated node will simulate a beacon transmission to create a collision in the interfering coordinators: at least one of them will choose another superframe slot, solving the collision problem. A coordinator decides to change its slot at the beginning of the active part of its superframe.
If the slot has changed, it broadcasts its beacon as usually with the new superframe slot and goes sleeping. The possible receivers will be able to detect the source has changed its superframe slot and will update their neighborhood table. They will then follow this coordinator (i.e. listen to its new slot to receive its beacons).

Performance evaluation
We used the WSNet simulator [23], with the beacon-enabled IEEE 802.15.4 module [24]. We compared here different scheduling algorithms: original IEEE 802.15.4 (constant StartTime), random scheduling (any slot different except the slot of my parent), greedy (the algorithm presented here), ideal (centralized coloring).
We first illustrated the impact of the BOP duration ( Figure 10). With only a few BOP slots, collisions between coordinators are more frequent, with a negative impact on the packet delivery ratio. With no surprise, the original IEEE 802.15.4 algorithm performs badly, whatever the BOP duration is. Finally, we can remark having many BOP slots reduces the collision probability but consumes bandwidth: almost all the active part of the superframe is dedicated to beacons. We also measured the collision ratio, i.e. ratio of coordinators which have at least one interfering coordinator in the same superframe. We can verify IEEE 802.15.4 presents the largest collision ratio. The greedy scheduling limits collisions, even with low BO values: even when the number of superframe slots is limited, the collision probability remains acceptable. Our greedy solution performs quite close to the ideal scheduling algorithm, which uses centralized a priori knowledge.  Figure 11. Collisions between superframes same superframes, leading to collisions, wasting bandwidth. We propose here to formulate this problem as a Mixed Integer Linear Problem (MILP). We will translate all the cluster-tree relations, bandwidth sharing, and IEEE 802.15.4 mechanisms into linear constraints. If we define a linear objective, we face to a classical optimization problem. Our MILP formulation uses the radio and interference topology as an input. Thus, it provides an upper-bound, i.e. what we would obtain with an optimal centralized solution. In particular, we highlighted there exists a large gap to fill: we must still propose a distributed algorithm constructing an efficient cluster-tree.

Optimizing capacity & energy consumption in
The standard does not specify which parent to choose when creating the cluster-tree: it just specifies how to associate with. Surprisingly, only few articles investigated the impact of this choice on the cluster-tree topology. Cuomo et al. studied in [8] the average number of children and the height of the tree while Claudios et al. investigated in [25] the dynamic properties of the structure.We propose to investigate how to define formally the cluster-tree structure to create a linear optimization problem.

Model & assumptions
We expose here all our notations and the models we use : in a heterogeneous IEEE 802.15.4 network, we model the network with a symmetric graph G =(V, E), V being the set of devices and E the set of available links between them. Unidirectional links cannot be exploited in IEEE 802.15.4 and are simply dismissed from the topology. We denote by N(u) the neighborhood of u in G. We associate to G a classical link-interference (or conflict) graph G c , where each vertex is a radio link, and they are neighbor in G c if they interfere with each other.

Bandwidth and collisions
As the proposed model must be clearly independent from the PHY layer, we consider the radio bandwidth is equal to 1 unit, and is distributed between interfering transmitters. Collisions may decrease available bandwidth. Even if we assume that beacons do not collide during the BOP, CSMA-CA slotted mode does not permit to avoid entirely collisions. This is particularly true when the medium has to forward a large number of packets from different transmitters. A simple and efficient model has been proposed in [26]. Considering collisions are more frequent when the number of transmitters increases, authors demonstrated the percentage of radio bandwidth wasted by collisions is roughly proportional to the number of nodes. Interpolating these results, we estimate the bandwidth wasted due to collisions BW coll follows Equation 3 with a coefficient of determination of 0.97: BW coll = nb_stations * 0.018675 + 0.0104 (3) where nb_stations is the number of devices in contention. Note that a superframe should contain at most 53 stations, otherwise all available bandwidth may be wasted by collisions.

Superframes
An efficient way to model the schedule of coordinator's superframes would consist in dividing time into n slot superframes slots. Each active part of a superframe is included in exactly one superframe slot numbered from 0 to n slot − 1. Assuming all the nodes have the same beacon period BI and superframe duration SD values (e.g. BO and SO are imposed by the PAN), we have: In other words, if a node uses the superframe slot k to transmit its superframe, its child will use the superframe slot k + 1. Moreover, we assume that the PAN coordinator will use slot 1. Thus the depth of a node in the cluster-tree gives deterministically its superframe slot. Since the number of timeslots is bounded, we have a kind of modulo: a node with a large depth in the cluster-tree will re-use the superframe slot of the PAN coordinator. If we relax this constraint and and we consider StartTime is not anymore a constant (as in Section 3), we have rather to schedule the superframes to limit interference.

MILP formulation
We present a MILP formulation for the construction of a cluster-tree topology. Input data can be summarized as a collection of devices and the set of all available links represented with ag r a p hG =( V, E) and the corresponding link-interference graph G c .Amil p formulation consists in defining a problem using a set of unaffected variables, a set of linear constraints between them, and an objective function. Then a mil psolver produces a valid variables affectation respecting all the constraint while maximizing / minimizing the objective function. The domain definition and the type of each variable (continuous or integer) must be given as an input to the solver.

Variables
The following part describes all the variables used in our formulation, and their meaning in the resulting affectation. For clarity we have regrouped variables according to their use.
Role definition: we define for each node u ∈ V a binary variable root(u) ∈{ 0, 1} such that root(u)=1 if and only if u is the network PAN coordinator, and root(u)=0inallothercases. Any FFD may become coordinator as soon as it is associated to the cluster-tree. Inversely, a RFD is only a leaf of the tree, and cannot accept children. We model this different by using variables coord(u) ∈{0, 1},foreachnodeu ∈ V. coord(u)=1 iif u is a FFD.
Superframe Scheduling: in order to assign each coordinator a superframe slot, we introduce integer variables slot(u) ∈{ 0, n slot − 1} for each node u ∈ V such that slot(u)=k if and only if node u uses the superframe slot number k. When defining the constraints, we need also the additional variables superframe(u, k) ∈{ 0, 1} for each node u ∈ V and each integer k ∈ [0, n slot − 1]. super f rame(u, k)=1 iif coordinator u is assigned to superframe slot k,orsuper f rame(u, k)=0 otherwise. There is a natural equivalence between slot(u) and super f rame (u, k). Indeed, slot(u)=k iif super f rame(u, k)=1. We also note that nodes acting as end-devices won't be assigned a superframe slot, thus we state super f rame(u, k)=0f o r each RFD and each k ∈ [0, n slot − 1] by reducing the definition domain for concerned variables.
Link activity: our main objective consists in determining the subset of links from E restricted to the cluster-tree topology. Only these links may be used to forward the traffic. For each link (u, v) ∈ E we use a binary variable child(u, v) ∈{ 0, 1} such that child(u, v)=1 iif u is a child of node v,a n dchild(u, v)=0 otherwise. A link may be used during the superframe of the corresponding coordinator. We use the binary variables act(u, v, k) for each radio link (u, v) ∈ E and each integer k ∈ [0, n slot − 1]. act (u, v, k a coordinator using timeslot k and u is a child of v.Else,w eh a v eact(u, v, k)=0 .

Data flow:
We define continuous variables f(u) ∈ [0, 1] as the quantity of data generated by the node u to the PAN coordinator. Then, for each link(u, v) ∈ E and each integer k ∈ [0, n slot − 1],wenotef(u, v, k) ∈ [0, 1] the traffic from node u to node v using superframe slot k. We also use the continuous variables f(u, v) ∈ [0, 1] for each link (u, v) ∈ E. f (u, v) is the normalized quantity of bandwidth consumed by the radio link from u to v. It represents the fraction of time during which u transmits its packets to v.

Constraints
We now translate the IEEE 802.15.4 structure and mechanisms into linear constraints.
Tree structure: any device excepted the PAN coordinator has to be associated to exactly one parent node. As child(u, v) are binary integer variables, constraint 5 guarantees the parent unicity. Besides, the PAN coordinator has no parent since it is the root of the cluster-tree (constraint 6). We guarantee the cluster-tree is connected by stating f (u) > ǫ for each u ∈ V −{PC}.
A node with at least one child must be a coordinator (constraint 7). Reciprocally, a node without child does not maintain a superframe (constraint 8).
Superframe scheduling: the following constraint imposes that at most one superframe slot is assigned to any coordinator, and that no slot is assigned to a leaf node: 113 Bandwidth and Energy Consumption Tradeoff for IEEE 802. 15.4

in Multihop Topologies
We can also establish a link between variables superframe(u,k) and slot(u) with equation 10: Each coordinator must be assigned a slot immediately consecutive to it parent, excepted if the parent uses the largest slot number. Else, we have a modulo and the slot number of the child will be 0. We propose to split this problem into 3 constraints: 1. if u is a child of v, the difference between both slots cannot be superior to 2: The part (1 − child(u, v)) × n slot simply inhibits this constraint when u is not the child of v. 2. in the same way, if u is a child of v, the slot number of u must be at least equal to the slot number of v plus 1, except if u is a leaf (the second line inhibits the constraint in such situation), or if the maximum slot number is assigned to v (third line). Fourth line inhibits this constraint when u is not the child of v. (12) 3. Finally, if a node v uses the largest slot (n slot − 1), then its child u uses the slot 0: Bandwidth sharing: anodeu use the superframe slot of it parent v to exchange packets. Thus, the link (u, v) hasbeactiveduringtheslotk: Then the overall bandwidth from u to v is given as follows : Since we consider the superframe slots have the same size, the bandwidth dedicated to one superframe is the radio bandwidth (1 unit) divided by the number of slots. Besides, bandwidth is shared among interfering nodes for their data packets and the corresponding collisions. If we consider the conflict graph, interfering links are neighbors. Thus, we have just to reference all the cliques (interfering links) and verify the bandwidth sharing constraint holds for each clique independently: (17) where C is the set of all the cliques in the interference-link graph G c .

Flow conservation:
Only links between children and parents are available for data flow transmission : Beside, we use the classical flow conservation constraints. Each node sends to its parent both the data packets it generated toward the PAN coordinator and the data packets forwarded from its children: Since the PAN coordinator is the single destination (converge case), the following constraint holds:

Objective
Our MILP formulation can be associated to any objective defined with linear function. We may maximize the network fair capacity: We may also maximize the global network throughput, without guaranteeing fairness, or aim at maximizing the network lifetime by defining linear constraints for the energy consumption and then minimize the maximum energy consumed by each node.

Numerical results
We illustrate here the performances of the greedy algorithm (a node chooses the first parent to associate with) compared to the upper bound obtained through the MILP formulation (denoted as optimal in the graphs). We distribute randomly the nodes in a disk. We consider here 4 timeslots for the superframe scheduling, and use cplex v.12 to solve the MILP formulation. We also plot the 95% confidence intervals. We measure the aggregated network capacity while maintaining the density constant (8 neighbors)( Figure 12). Clearly, associating to the first available parent is sub-optimal: bottlenecks quickly appear, degrading the network capacity. On the contrary, the optimal solution leads to a constant global throughput whatever the number of nodes is (i.e. collisions are very seldom). While this formulation uses the a priori knowledge of the radio and interference topology, we highlighted here the fact that existing cluster-tree construction algorithms are not efficient to optimize the network throughput and the energy consumption.  Figure 12. Network capacity vs. nb. of nodes (avg. degree of 8) method to find always the best parameters values to operate always in optimal conditions. We will present here how we can obtain such property. To optimize the throughput and to reduce the energy consumption, we must reduce the collisions since retransmissions mean bandwidth and energy wastage, and also reduce the backoff times since we waste bandwidth. Obviously, the optimal solution will find the tradeoff between these two antagonist objectives. An analytical model has been presented in [27] to find the optimal parameters values in IEEE 802.15.4. They propose to solve an optimization problem concerning the delay, power-consumption and reliability. The nodes must estimate continuously the busy channel probability and the channel access probability. While IEEE 802.15.4 suggests default values for the parameters (e.g. BE, NB), they do not lead to optimal performances. Thus, a method has been presented in [18] to maintain a targeted packet delivery radio (PDR). A too large PDR means we waste bandwidth because of large backoff values while a small PDR would not be acceptable for some applications. We consider maximizing the throughput is more efficient: we do not need to drop packets when the traffic is light.

Defining good parameter values
We propose here to evaluate the impact of each parameter individually.

Contention Window (CW):
CW represents the number of times a node has to trigger a CCA before transmitting its frame. CW should be equal to 2: a node will avoid a collision when the medium is free and the source is waiting for the acknowledgement. Thus, the optimal CW is its default value. macMaxFrameRetries: macMaxFrameRetries denotes the number of times a frame is retransmitted when the ack is not received. Anastasi et al. [18] highlighted the fact that packets are very seldom dropped because of too many retransmissions (< 2% when macMaxFrameRetries=2).
To optimize the throughput, we may adopt an adaptive approach, depending on the traffic load. When the queue contains many frames to transmit, it should use a small macMaxFrameRetries: even if a packet is dropped, others have to be transmitted. On the contrary, a small queue length means we may authorize more retransmissions to fill the medium. The standard defining a maximum number of retransmissions of 4, the value may be obtained as following: with q max (resp. q(t)) the maximum (resp. current) queue length.

Backoff Exponent (BE):
The backoff exponent (BE) defines the range of the random value for the backoff time (backo f f ∈ [0..2 BE − 1]). Obviously, the backoff exponent has an impact on the throughput. However, its optimal value depends on the number of simultaneous transmitters (cf. Figure 13), which is practically complicated to estimate. We propose in the next section an adaptive approach to always operate close to the optimal BE value.
macMaxCSMABackoffs: macMaxCSMABackoffs denotes the maximum number of times a node can choose a new backoff value when it senses the medium busy after a CCA. Figure 14) illustrates the impact of macMaxCSMABackoffs on the throughput for different traffic loads. A large macMaxCSMABackoff value increases the throughput. Indeed, a CCA does not consume bandwidth: dropping a packet after a busy CCA is quite aggressive. Obviously, macMaxCSMABackoff does increase the throughput only in unsaturated mode: we have to fill the whole superframe. We propose the following simple method. When the node has still packets to transmit although the active part has elapsed, it decreases the macMaxCSMABackoff value. Inversely, a node which has an empty buffer before the end increases the macMaxCSMABackoff value.

Self-adaptation mechanism for the Backoff Exponent value
To increase the networks lifetime, the nodes must switch their radio off most of the time. The bandwidth is consequently reduced in the same proportion. Besides, all the nodes which participate to a superframe wake-up synchronously and try to send the frames they have buffered since the last beacon of their parent. Thus, even a low traffic may create an high collision rate at the beginning of the active part of the superframe. We must take care of efficiently sharing the bandwidth and reducing the collision rate. We proposed in the previous   Figure 14. Impact of macMaxCSMABackoff on the throughput section methods to find the optimal values for most of the parameters. We focus here on the Backoff Exponent, which is practically the most complicated to adjust dynamically.
Our objective consists in limiting bandwidth wastage. A too long backoff leads to medium under-utilization: the nodes wait a too long time, wasting bandwidth. Inversely, a collision consumes bandwidth. However, to estimate the sum of bandwidth dedicated to collisions and backoffs is a complicated task. Instead of minimizing bandwidth wastage, we propose rather to maximize the throughput, the antagonist metric. Indeed, we have highlighted the best throughput is stable in Figure 13, i.e. whatever the parameters values, we may obtain at most a throughput of 1,100 b/s. Thus, we just have to find the BE value which offers this throughput.

Dynamic exploration
We propose a dynamic exploration algorithm to find the most appropriate BE value. By appropriately testing some good BE values, we try to locally optimize the throughput. Indeed, we can remark for a fixed number of nodes, the throughput is monotonically increasing or decreasing when the BE value increases/decreases. We test continuously different values, oscillating around the optimal throughput. Besides, we can remark in Figure 13 the second best BE value leads to a throughput very close to the optimal throughput. Thus, oscillating between both values wastes a limited amount of bandwidth. While the throughput is increasing, we keep on exploring the same direction (either increasing or decreasing the BE value). As soon as the throughput is sub-optimal, we inverse the direction.

Stabilization
A coordinator reaching the optimal throughput should maintain the same BE. Since we have to cope with statistical variations, we consider the throughput has not changed if its difference with the previously measured throughput is inferior to a threshold (∆= 1 packet/Superframe Duration). To avoid freezing the self-adaptation, a node MUST initiate a new exploration, even if the throughput does not change for a long time. When BE stays unchanged for k successive superframes (3 in our simulations), the coordinator MUST explore another BE value in the same direction as the previous exploration.

Topology formation
In section 4, we have presented a method to evaluate the capacity and energy consumption inherent to any cluster-tree. By providing a tight upper-bound, we can estimate the gap to fill before obtaining an optimal cluster-tree concerning e.g. energy, bandwidth. However, how to reach this objective in a distributed way is still an open problem. Yu et al. [28] proposed to minimize the number of clusters: aggregation is simplified, and more wireless routers can sleep. However, we could exploit with benefit the low duty-cycle property of IEEE 802.15.4 to save energy. What strategy is the most efficient in these scenarios? We have also to jointly optimize the scheduling and the cluster-tree hierarchy in a convergecast scenario to minimize the end-to-end delay or at least upper-bounding it. To construct a list of interfering nodes, Tseng et al. [29] proposed to use a larger transmission power for neighborhood discovery. However, such process will break the other data transmissions impacting negatively the performances. Besides, a trade-off between over and under-estimation is practically complicated to achieve. Moreover, many collisions may occur before converging to a legal scheduling.

Real-time traffic
IEEE 802.15.4 provides Guaranteed-Time-Slots (GTS) for real time traffic: these slots have to be pre-reserved during the Contention Access Period. In the last version of the standard, the number of GTS can be extended to cope with the particular requirements of the scenario. Park et al. [30] studied how to minimize energy consumption for real-time traffic in IEEE 802.15.4 networks. A multihop flow must reserve the GTS along all the path toward the PAN coordinator. Besides, a flow may not require one GTS during each superframe: it depends on the Beacon Order (BO) value and on the data rate of the flow. In that case, the coordinators must multiplex different real-time flows in the same GTS: this corresponds to a bin-packing problem, without knowing a priori the next real-time traffic requests. Finally, some bursty sensitive traffic may be generated because of e.g. alarms. These transmissions should be protected while minimizing the end-to-end delay.

Metric
A node has to choose the best parent in the cluster-tree. Obviously, it has to define what metric is the most accurate to represent the aptitude of a node to serve as parent. This property depends on selfish (offered bandwidth, reliability, delay) and global metrics (energy consumption toward the PAN coordinator, load-balancing). Thus, a node must take a decision after having captured all these criteria.

Conclusion
IEEE 802.15.4 is emerging as the standard for Low-Power Wireless Personal Area Networks. We have presented here how we should modify IEEE 802.15.4 to cope with multihop environments: we must be able to forward traffic while limiting energy consumption. Slots should be carefully scheduled in a distributive way to forward traffic without collisions since it wastes energy. Moreover, a node should choose appropriately its parent to balance the load and energy: the cluster-tree should avoid the creation of bottlenecks. Finally, we have presented a very simple algorithm to find dynamically the best parameters values in IEEE 802.15.4. This enhanced version of IEEE 802.15.4, only modifying slightly the standard optimizes greatly the performances, enabling new types of multihop applications.