In this section we present the combination of TDMA/CA, a medium access protocol and SERENA, its associated node coloring algorithm. We first define the logical architecture and then detail each module.
3.3. Complexity Analysis
Let
be a graph representing the network topology. Each vertex
represents a network node and for all vertices
u and
v in
V, the edge
if and only if the two nodes
u and
v are one-hop neighbors. One-hop coloring of
G consists in coloring each vertex in
V using the smallest number of colors and in such a way that two vertices with the same color have no common edge. The associated decision problem can be defined as follows. Let
k be a positive integer strictly smaller than the cardinal of
V. Can
G be colored with
k colors in such a way that two nodes that are one-hop neighbors have not the same color? Clearly, the answer is yes if and only if
G can be one-hop colored with
k colors. This problem has been proved NP-complete in [
18]. We want to generalize this property to three-hop coloring problem.
For simplicity reasons, colors are represented by natural integers, starting with zero.
Theorem 1: The decision problem of three-hop coloring is NP-complete.
Proof: First, we show that this problem is in NP. Given a three-hop coloring of
G, we can check in polynomial time (
, where
n is the number of nodes) that the coloring produced by a given three-hop algorithm does not assign the same color to two nodes that are one, two or three-hop neighbors, and the total number of colors is
k. Second, we reduce the
k-color one-hop coloring problem that has been shown NP-complete in [
18] to the
-color three-hop coloring problem, with
a positive integer. Let us consider any graph
, we can build a graph
where:
assuming a bijective function f
we define the set , where is called the conjunction node and U denotes the set of mapping nodes. Hence, the cardinal of U is equal to n, the number of nodes in G.
we define the set .
This construction is polynomial in time. An example of graphs
G and
is illustrated in
Figure 1.
Figure 1.
Example of: (a) Graph G; (b) Transformed graph .
Figure 1.
Example of: (a) Graph G; (b) Transformed graph .
Lemma 1: All nodes in are one-hop or two-hop neighbors.
Proof: By construction of . ■
Lemma 2: The number of colors needed by a three-hop coloring of nodes in in graph is equal to , where n is the number of nodes in G.
Proof: From lemma 1, all nodes in are one-hop or two-hop neighbors. Hence, no color can be reused with three-hop coloring. By construction of , the number of these nodes is equal to . ■
Lemma 3: Any color used for a node in V by a three-hop coloring of cannot be used by any node in .
Proof: Let us consider any node and any node . By construction, the distance between v and u, denoted meets . From Lemma 1, . Hence . Hence, they should use different colors with three-hop coloring.
■
We want to show that has a one-hop coloring with k colors if and only if has a three-hop coloring with colors.
Given a one-hop coloring of G with k colors, we want to show that there exists a three-hop coloring of with colors as follows. This three-hop coloring will use k colors for nodes in V and colors for nodes in according to Lemma 2. From Lemma 3, colors used in V cannot be reused in . It follows that there exists a three-hop coloring of with exactly colors.
Now, let us assume that we have a three-hop coloring of with colors and we want to show that we can find a one-hop coloring of G with k colors. From Lemma 2, colors are needed for three-hop coloring of nodes in . From Lemma 3, colors used in V cannot be reused in . Hence, colors are used to color the nodes in V. Since, any two nodes and in V that are one-hop neighbors in G are three-hop neighbors in , by construction of , we deduce that no two one-hop neighbors in G use the same color. Hence, we can find a valid one-hop coloring of G with colors. ■
3.5. Overhead Reduction and Properties of SERENA
We now show how to minimize the overhead caused by the messages exchanged during network coloring.
3.5.1. Overhead Reduction
During the coloring algorithm, each node N periodically broadcasts a message to its 1-hop neighbors. In a naive implementation, this message would include the priority and color of (a) the node N itself, (b) its 1-hop neighbors in , as well as (c) its 2-hop neighbors in . Such messages lead to a high overhead, that can be unacceptable in dense networks with a short MAC frame size. That is why we propose in this paper, an optimized message. The content of the message is reduced: it is no longer required to transmit each one-hop and two-hop neighbor with its priority and its color.
More precisely, in a general application with broadcast and immediate acknowledgement of unicast communications, any node N after having built its two-hop neighborhood by means of the messages sends a message containing all its two-hop neighbors. Notice that this message can be fragmented if requested by the MAC layer. New fields are added such as a fragment number and a flag indicating the last fragment. This message is sent once, at the beginning of the coloring in general applications. This message should also be transmitted whenever the one or two-hop neighborhood changes. Hence, any receiving node M can build its set and determine its priority. The priority of node N is equal to its number of neighbors up to three-hop.
The optimized
message sent by node
N to its one-hop neighbors contains:
For node N: its address, priority and color.
The address and priority, denoted , of the uncolored one-hop neighbor having the highest priority. Let denote the set of one-hop neighbors of N. We have: ,
The bitmap of colors already selected by its one-hop neighbors.
The address and priority, denoted , of the uncolored node P providing the highest among all nodes .
By definition, ,
The bitmap of colors already selected by its two-hop neighbors.
In a data gathering application with broadcast and immediate acknowledgement of unicast communications, each node first computes its priority. For this, it sends its number of descendants to its parent. This parent computes its priority by summing the number of descendants of each child and sends it to its own parent. In its
message, any node uses two specific flags to indicate its parent and children among its one-hop neighbors. Node
N sends to its one-hop neighbors its
message containing:
For node N: its address, priority and color.
The address and priority, denoted , of the uncolored one-hop neighbor having the highest priority. We have ,
The bitmap of colors already selected by its one-hop neighbors.
The bitmap of colors already selected by its parent and children.
The address and priority, denoted , of the uncolored parent or child of one-hop neighbors having the highest priority.
By definition, where P is a parent or child of . This is because only a subset of the three-hop neighbors is needed by the receivers.
The bitmap of colors already selected by the parents or children of one-hop neighbors.
Notice that it is sufficient to know that a node is parent or child of one-hop neighbors of the parent or children node. It does not matter to know which exact role it plays among the two.
In general applications as well as in data gathering ones, node N processes the received messages and applies the principles previously given to color itself. This optimization considerably reduces the overhead induced by the coloring algorithm, making possible its use in dense networks with small MAC frame size.
Property P0: With assumptions to , in three-hop coloring and tree coloring, any node N can color itself if and only if , with: , , in the general case, in the tree case, where where P is a parent or child of .
Proof: With three-hop coloring and tree coloring, any node N can color itself if and only if no uncolored node in has a priority higher than N. We recall that two different nodes never have the same priority insofar as ties are broken by node identifiers that are assumed unique in the considered network.
Let us show that if any node N is coloring itself, then .
If node
N is coloring itself, it means that:
all its uncolored one-hop neighbors have a smaller priority. Hence, for any M uncolored one-hop neighbor of N, we have . Hence, ;
all its uncolored two-hop neighbors have a smaller priority.
is the maximum priority of uncolored nodes
P that are one-hop neighbors of
M, any one-hop neighbor of
N. Consequently, we have the following cases:
- –
node P is the node N itself and has priority ;
- –
P is a one-hop or two-hop neighbor of node N. In which case, we have by assumption: .
Hence, .
and all its uncolored three-hop neighbors in
have a smaller priority.
- –
In the general coloring,
is the maximum priority of uncolored nodes
Q that are one-hop neighbors of
P, itself one-hop neighbor of
M, one-hop neighbor of
N. Consequently, we have the following cases:
- *
node Q is the node N itself and has priority ;
- *
Q is a one-hop, two-hop or three-hop neighbor of node N. In which case, we have by assumption: .
Hence, .
- –
In the tree coloring,
is the maximum priority of uncolored nodes
Q that are parent or child of
P, itself one-hop neighbor of
M a parent or child of
N. We then have the following cases:
- *
node Q is the node N itself and has priority ;
- *
Q is a one-hop or two-hop neighbor of node N. In which case, we have by assumption: .
- *
Q is a three-hop neighbor . In which case, we have by assumption: .
Hence, .
Hence, in both colorings, .
Conversely, let us assume:
. We now show than N can color itself. Since , no uncolored one-hop neighbor has a priority higher than N. Since , no uncolored two-hop neighbor has a priority higher than N, otherwise we would have the contradiction . Since , no uncolored three-hop neighbor in has a priority higher than N, otherwise we would have the contradiction . Hence, node N has the highest priority among the uncolored nodes in . ■
3.5.2. Properties
More generally, we can now give the properties met by SERENA algorithm.
Property P1: With assumptions A0, A1 and A2, ∀ node N if ∃ node then .
Proof: This property is deduced from assumptions , and . ■
Property P2: In an ideal environment, the only types of collision that can occur in a general application with broadcast and immediate acknowledgement are between one-hop, two-hop or three-hop neighbors.
Proof: In a general application with broadcast and immediate acknowledgement, the only collisions that can occur are caused by a unicast data frame, a broadcast data frame or an acknowledgement frame.
Table 1 summarizes all possible cases. In case of a collision involving a unicast or broadcast data frame, the color of the data frame sender is conflicting, whereas in the case of a collision involving an acknowledgement frame, the destination of the acknowledgement has a conflicting color. That is why this table is symmetric and lines corresponding to unicast and broadcast data are identical.
Table 1.
Possible collisions in case of general application, broadcast and immediate acknowledgement.
Table 1.
Possible collisions in case of general application, broadcast and immediate acknowledgement.
| Unicast Data | Acknowledgement | Broadcast Data |
Unicast Data | 1 or 2-hop nodes | 1 or 3-hop nodes | 1 or 2-hop nodes |
Acknowledgement | 1 or 3 hop nodes | 2-hop nodes | 1 or 3-hop nodes |
Broadcast Data | 1 or 2-hop nodes | 1 or 3-hop nodes | 1 or 2-hop nodes |
As a consequence, all possible collisions are taken into account by three-hop coloring. ■
Property P3: SERENA three-hop coloring provides a valid coloring for general applications, assuming an ideal environment.
Proof: For three-hop coloring, the set contains by construction all nodes up to 3-hop from N, assuming an ideal environment. SERENA ensures by construction that no node in will color simultaneously with N. Moreover, when N colors itself, it knows all the colors taken by nodes in with a higher priority. Hence, it takes a color that is not already used in . Furthermore, assuming an ideal environment, nodes that do not belong to cannot create a collision with data sent by N or acknowledgement sent to N, as shown by Property P2. Hence, SERENA does not create collision. ■
Property P4: In an ideal environment, the only types of collision that can occur in a data gathering application with broadcast and immediate acknowledgement are between one-hop, two-hop nodes or correspond to cases 1 to 4 in Figure 2. Proof: In a data gathering application with broadcast and immediate acknowledgement, the only collisions that can occur are caused by a unicast data frame sent to its parent or child, a broadcast data frame sent to its neighbors or an acknowledgement frame sent to its parent or child.
Table 2 summarizes all possible cases. This table is symmetric. In case of tree communications where all unicast data transmissions of a cycle are either upstream or downstream, unicast and broadcast data frames do not cause the same collisions, unlike in the general communications case (see for instance the acknowledgement column).
Table 2.
Possible collisions in case of data gathering application, broadcast and immediate acknowledgement.
Table 2.
Possible collisions in case of data gathering application, broadcast and immediate acknowledgement.
| Unicast Data | Acknowledgement | Broadcast Data |
Unicast Data | same parent | cases 1 to 4 | 1 or 2-hop nodes |
Acknowledgement | cases 1 to 4 | a child of a 1-hop node of the other | 2-hop node of parent or child |
Broadcast Data | same parent | 2-hop node of parent or child | 1 or 2-hop nodes |
As a consequence, all possible collisions are taken into account by tree coloring. ■
Property P5: SERENA tree coloring provides a valid coloring for data gathering applications, assuming an ideal environment.
Proof: For SERENA tree coloring, the set
contains by construction, all nodes up to 2-hop from
N, and all nodes
M meeting one of the four cases depicted in
Figure 3. Assuming an ideal environment, SERENA ensures that no other node in
can take the same color as
N. Furthermore, assuming an ideal environment, nodes that do not belong to
cannot create a collision with data sent by
N or acknowledgement sent to
N, as shown by property P4. Hence, SERENA does not create collision. ■
3.6. TDMA/CA MAC Protocol
TDMA/CA (Time-Division Multiple Access with Collision Avoidance) is an hybrid protocol that combines TDMA and CSMA/CA approaches. TDMA/CA uses a synchronization module that divides time into cycles. Each cycle starts with a synchronization period, is followed by a period for each color, and ends with an inactivity period.
During the synchronization period, all the nodes of the network are synchronized, and the color sequence is broadcast to each node. During the colored period of a color
c, only nodes of color
c are allowed to send frames. Similarly, all the nodes having a one-hop neighbor of color
c are listening. The other nodes sleep. During the inactivity period, all the nodes sleep. The cycle organization is represented on
Figure 4. On this example, color slots are sequenced according to a decreasing order and they all have the same duration.
Figure 4.
Cycle with the active period and the inactive one.
Figure 4.
Cycle with the active period and the inactive one.
The novelty of TDMA/CA resides in the medium access mechanism used during each colored slot. The mechanism is based on the two following facts:
As SERENA reduces the possibility of color conflicts, the probability of frame collisions is limited. Thus, the nodes should transmit frames immediately, without having to wait for a backoff.
As SERENA cannot guarantee that there is no color conflict (such conflicts can occur due to propagation condition changes or node mobility), there should be a collision detection mechanism.
The medium access mechanism used by TDMA/CA in each colored slot acts as follows. When a node decides to transmit a frame, it waits for its colored slot. Then, it first attempts to transmit the frame without backoffs. If it receives an acknowledgement, from the receiving node, the transmission was successful (and in this case, the medium is used efficiently as there was no unnecessary backoff). However, if the sender does not receive an acknowledgement from the receiving node, TDMA/CA assumes that there has been a collision due to a color conflict. In this case, the sender attempts to retransmit the frame with a random backoff, similarly to the IEEE 802.15.4 standard. At the end of the backoff, the sender performs two CCAs in order to ensure that there is no other node transmitting. If it detects activity on the channel, the sender draws a backoff in a larger window. For each transmission attempt, the backoffs are randomly chosen within ranges , where i denotes the number of times the channel was detected busy, and . If the channel is detected busy more than five times, or if there has been more than five transmission attempts, the frame is dropped by TDMA/CA.
TDMA/CA has the following properties:
If there is no color conflict and no frame loss, frames are transmitted immediately (that is, without backoffs).
If there is no color conflict but frame losses, frames are transmitted with a small backoff, as with CSMA/CA.
If there is a color conflict, frames can still be received but at the cost of a throughput reduction as backoffs are added.
TDMA/CA is therefore able to adapt to the quality of the node coloring given by SERENA. In
Section 5, we describe another interesting feature of TDMA/CA: its ability to notify SERENA of color conflicts. Note that SERENA is not notified of color conflicts after the first loss of an acknowledgement frame, as this could be caused by the propagation conditions, but rather after several consecutive frame losses.
In this paper, we assumed that the traffic distribution is balanced among all the nodes. Heterogeneous traffic has an impact on the performance of our method. If a node does not have enough time during its time slot to send its data, it has to wait for its next time slot, which introduces significant delays. This issue can be dealt with in the following ways.
The assignment and duration of time slots is achieved by a centralized entity (which is the coordinator of the PAN). If the traffic production rate is known by this entity, it can allocate longer time slots for colors having high traffic. However, it is not sufficient to increase the duration of the sender time slots, as the traffic is routed to other nodes with other colors. The central entity has to take into account the routes used by the routing protocol in order to optimize the color allocation.
If the traffic production rate is not known by the central entity, it is possible to insert a CSMA/CA period between the colored period and the inactivity period. All the nodes are active during this period, and they are all able to send. This period can be used as a buffer for the traffic that exceeds the duration of the colored time slots, and it can also be used to accommodate non-colored nodes to join the network. This approach has been studied in [
26,
27].
SERENA is based on node coloring. Node coloring has the advantage to allow a node to transmit any type of traffic (unicast or broadcast) in its slots. Hence, a node can optimize its transmissions in the slots associated with its color, unlike link coloring where the slots granted to a link cannot be used for another traffic sent by the same node. If the node has no more traffic to send, it can sleep, as well as its one-hop neighbors after having detected a silent period.
However, taking into account traffic heterogeneity has an impact on the delay of the mechanism. This issue is a perspective of our work. Some simulation results are reported in
Section 4.6.
3.7. Comparison with Z-MAC Protocol
We now compare the performances of Z-MAC and SERENA on a small example. The chosen configuration, depicted in
Figure 5, is very close to the one used by the authors of Z-MAC in [
7]. We first evaluate the number of colors needed to color the nine nodes using DRAND (see [
8] for more details) and SERENA. DRAND is the probabilistic two-hop node coloring algorithm used by Z-MAC. For SERENA, we use different variants: two-hop coloring because it supports the same requirements as DRAND, tree-coloring for data gathering applications and three-hop coloring for general applications.
Figure 5.
Configuration used for comparing Z-MAC and SERENA.
Figure 5.
Configuration used for comparing Z-MAC and SERENA.
With Z-MAC, the nodes with a small number of one-hop neighbors have a higher probability to color themselves before the others and to take the smallest colors. For the configuration considered, six colors are needed. Color 0 is used by three nodes whereas color 1 is used by two nodes. The Z-MAC superframe is illustrated in
Table 3. Since the size of the superframe is equal to 1 + the maximum number of (one-hop nodes + two-hop nodes), the superframe contains 9 slots. A node
N uses the slot corresponding to its color
c as well as all slots corresponding to
, with
a and
k positive integers such that
, where
is the maximum number of one-hop neighbors of any node
M up to two hops from node
N. In this configuration, we have
=4 for any network node. It follows that only color 0 can use several slots in the same cycle. Notice that color 0 is used by nodes
A,
G and
H having a low number of one-hop neighbors. If we assume that the amount of traffic forwarded by a node depends on its number of neighbors, offering these nodes a bandwidth amount twice the amount of other nodes has a limited interest. We can also observe that slots 6 and 7 are unused at each cycle, leading to about 22% of bandwidth waste at each cycle. Furthermore, two cycles of Z-MAC correspond to three cycles of SERENA with two-hop coloring, giving the opportunity to transmit more frames.
With SERENA two-hop coloring, we get 5 colors, one less than DRAND. With SERENA, the nodes with the highest number of neighbors up to two-hop color themselves first. Color 1 is used twice, as well as color 2, whereas color 3 is used three times. We obtain the cycle illustrated in
Table 4.
If the support of immediate acknowledgement is required for this tree whose root is node
A, SERENA tree-coloring is applied, leading to seven colors, one more than DRAND but with the support of immediate acknowledgement. Colors 4 and 5 are used twice. The MAC cycle comprising seven color slots, is depicted in
Table 5. The main advantage of tree-coloring is that in a single cycle, the data sent by all nodes can reach the sink, assuming data aggregation. We will evaluate the end-to-end delays in more details in
Section 4.4. This property is not ensured with Z-MAC, where in the worst case, the maximum end-to-end delay is equal to the superframe size times the hop number toward the sink.
Table 3.
Slot schedule with Z-MAC.
Table 3.
Slot schedule with Z-MAC.
Node | slot0 | slot1 | slot2 | slot3 | slot4 | slot5 | slot6 | slot7 | slot8 |
A | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
B | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
C | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
D | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
E | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
F | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
G | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
H | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
I | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Table 4.
Slot schedule with SERENA two-hop coloring.
Table 4.
Slot schedule with SERENA two-hop coloring.
Node | slot0 | slot1 | slot2 | slot3 | slot4 | slot5 |
A | 0 | 0 | 0 | 1 | 0 | 0 |
B | 1 | 0 | 0 | 0 | 0 | 0 |
C | 0 | 1 | 0 | 0 | 0 | 0 |
D | 0 | 0 | 1 | 0 | 0 | 0 |
E | 0 | 0 | 0 | 0 | 1 | 0 |
F | 0 | 0 | 0 | 1 | 0 | 0 |
G | 0 | 0 | 1 | 0 | 0 | 0 |
H | 0 | 1 | 0 | 0 | 0 | 0 |
I | 0 | 0 | 0 | 1 | 0 | 0 |
Table 5.
Slot schedule with SERENA tree or three-hop coloring.
Table 5.
Slot schedule with SERENA tree or three-hop coloring.
Node | slot0 | slot1 | slot2 | slot3 | slot4 | slot5 | slot6 |
A | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
B | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
C | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
D | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
E | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
F | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
G | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
H | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
I | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
If now we apply SERENA three-hop coloring, we get exactly the same colors as previously. We conclude that for this configuration, our solution combining SERENA and TDMA/CA is more efficient for both general applications and data gathering ones.