# A New TDMA Scheduling Algorithm for Data Collection over Tree-Based Routing in Wireless Sensor Networks

Authors: Vahid Zibakalam
Journal: ISRN Sensor Networks
 (2012)

---

## Abstract

Data collection is one of the most important tasks in Wireless Sensor Networks (WSNs) where a set of sensors measure properties of a phenomenon of interest and send their data to the sink. Minimizing the delay of the data collection is important for applications in which certain actions based on deadline are needed, such as event-based and mission-critical applications. Time Division Multiple Access (TDMA) scheduling algorithms are widely used for quick delivery of data with the objective of minimizing the time duration of delivering data to the sink, that is, minimizing the delay. In this paper, we propose a new centralized TDMA scheduling algorithm that is based on nodes congestion for general ad hoc networks. In the proposed algorithm, the scheduling is obtained using colouring of the original network. Colouring the original network is accomplished based on congestion degree of nodes. The simulation results indicate that the performance of our algorithm is better than that of node-based and level-based scheduling algorithms. We will also show that the performance of our proposed algorithm depends on the distribution of the nodes across the network.


---

## Body

## 1. Introduction

A WSN typically consists of a set of sensor nodes deployed in an area of interest. These sensor nodes communicate with each other via a wireless medium and collaborate to accomplish a common task such as traffic analysis, environment monitoring, battle field, and industrial process monitoring [1]. In order to process data, the sensor nodes periodically send their collected data to the sink. Because of some communication limitations, the nodes that are located at a great distance from the sink transmit their sensed data toward the sink via one or more intermediate nodes over a tree-based routing topology [2]. Two protocols are commonly used to access to the communication media. One is contention-based protocol and the other is schedule-based protocol. Contention-based protocols such as Carrier-Sense Multiple Access (CSMA) are inefficient and may fail if the communication media are highly utilized or when the number of sensor nodes is large due to high probability of collisions causing retransmissions. On the other hand, since schedule-based protocols such as TDMA prevent conflict, they are more suitable for applications that require high rates. Since schedule-based protocols remove collisions, idle listening, and overhearing which are the main sources of energy consumption; they have advantages for data collection in comparison to contention-based protocols [3]. Also, in TDMA when nodes are not in the transmission or reception mode, they go to sleep mode to reduce energy consumption. In TDMA, when a node is transmitting, the other nodes which are in conflict with it cannot transmit. There are two types of conflicts: primary conflict and secondary conflict. The primary conflict happens when a node receives more than one transmissions destined to it or transmits and receives at the same time. The secondary conflict happens when an intended receiver of a particular transmission is also within the range of another transmission intended for other nodes [4]. For example, in Figure 1, because of the primary conflict, the nodes v1 and v2 cannot transmit simultaneously or the node v3 cannot transmit and receive simultaneously. Also, because of the secondary conflict, if the node v1 is within the range of the node v6, the nodes v6 and v1 cannot transmit simultaneously. A TDMA scheduling is conflict-free if all the links which conflict with each other in simultaneous transmissions transmit at different time slots [4].Figure 1
The primary and secondary conflicts.The rest of the paper is organized as follows. Section2 explains the model network. Section 3 presents the related work on the TDMA scheduling. In Section 4, we propose a centralized algorithm for scheduling TDMA. The simulation results are given in Section 5. We conclude our paper in Section 6.


## 2. Network Model

We consider that network consists of a set of nodes and a base station (BS). The sensor nodes transmit their sensed data to the BS via a multihop path over the tree routing. All the nodes are equipped with a bidirectional transceiver. Network is represented by a graph G = (V, E), whereV={v1,v2,…,vN} is the set of nodes including the BS and E is the set of edges which represent the wireless links among the nodes. Each node has fixed transmission power, transmission range (rs), and an interference range (rm). If node vi wants to receive the data from vj correctly, their distance must be less than rs. The signal of vi is interfered by the signal of vj, if their distance is less than rm and vj is not intended receiver. rs is not necessarily equal to rm. Typically, rs is smaller than  rm (i.e.,rs<rm) and in practice 2≤rm/rs≤4 [5]. A node is at level k if it is located at a distance of k hops from the BS. The conflict graph GC = (V, EC) is a graph in which every node represents an edge in the original graph and two nodes are connected if their corresponding edges conflict in the original graph. The linear network is called GL = (VL, EL). In GL every node represents a level in the original graph and two nodes i and j are connected if there is an edge between a node at level i and any node at level j in the conflict graph of the original network [4]. The protocol model in [6] is selected for interference in which a message is correctly received if there is no other simultaneous transmission within a close proximity of the receiver. The advantage of this modelling is utilization of graph colouring-based scheduling algorithms. In TDMA, time is divided into time slots. Multiple noninterfering transmissions can be with each other in each time slot. The scheduling length is equal to the number of time slots which are needed to send the packets of all nodes to the sink in a data collection cycle. We consider scheduling on a single channel with the aim of minimizing the scheduling length.


## 3. Related Work

In general, TDMA scheduling algorithms allocate time slots to the links [7–9] or to the nodes [10, 11] to minimize the number of time slots. Current TDMA scheduling algorithms [4, 12–15] consider that each senor node transmits at least once a frame. They are based on graph colouring to avoid conflicts, and their goals are to maximize the slot spatial reuse for all nodes in a network to minimize TDMA scheduling length and delay by slot assignment scheme.In [4] Ergen proposes two centralized scheduling heuristic algorithms using graph colouring: one is node-based scheduling and the other is level-based scheduling. In node-based scheduling, first the original network is coloured. In graph colouring, the colour of each node must differ from that of all nodes in conflict with it. For colouring the original network, the nodes are ordered in a decreasing degree of conflict. So, the nodes having upper conflict degree are in priority for colouring. Then, scheduling is accomplished based on colouring the original network. The nodes that have a same colour can send simultaneously. After determining the nodes corresponding to current time slot, other nodes that other colours are allocated to, are added as long as the resulting set is nonconflicting. In the level-based scheduling, first the linear network is obtained. Afterwards, the linear network is coloured. If two nodes in two levels are in conflict with each other, their corresponding levels conflict with each other. The colour of each level should differ from that of all levels that are in conflict with it. Scheduling is accomplished based on colouring the linear network. This algorithm schedules a non-conflicting set of nodes corresponding to levels of each colour for the current slot and then schedules additional nodes, if possible. A super slot in node- (level-) based algorithm is a set of sequential time slots such that each node (level) having at least one packet at the beginning of the super slot sends at least once during the super slot.


## 4. Congestion-Based Scheduling

The congestion is a considerable problem in the data collection process from the sensor nodes. This problem is usually stricter in the nodes close to the sink, because these nodes not only send their generated data but also forward data of the nodes leading to them in the routing tree. A single node in a WSN can both gather and forward the packets. The number of forwarded packets by the nodes is different; some nodes do not forward any packet; some nodes forward so many packets. The nodes that transmit more packets experience more strict congestion leading to delay in packet transition to the sink. Thus, the proposed algorithm which is based on the congestion of the nodes aims to decrease congestion by prioritizing the nodes with more congestion in the data transmission process. The nodes that are prioritized in colouring more likely transmit packets in several time slots in a super slot. In the node-based scheduling algorithm [4], the priority of colour assignment is given to the nodes with a more conflict degree in the conflict graph. On the other hand, in the presented algorithm which we call the congestion-based scheduling algorithm, the priority of colour assignment is given to the nodes with a more congestion degree in the original graph. The congestion degree of each node is equal to the number of the nodes which forward their packets through that node over routing tree. Figure 2 shows a network with the congestion degree of the nodes. The congestion-based scheduling algorithm consists of two parts: colouring the original network and scheduling the network.Figure 2
A network with the congestion degree of the nodes.


### 4.1. Colouring the Network

In colouring the network, each of the two nodes that conflict with each other has different colours. So, for colour assignment, first the congestion degree of each node is computed, and then, the nodes are ordered in a decreasing degree of congestion. If two nodes have same congestion degrees, the node with higher conflict degree is prioritized. Colouring the original network is accomplished based on the order of congestion degree in such a way that each node with upper congestion degree is prioritized for colouring. The colouring algorithm is given in Algorithm1.Algorithm 1:The colouring algorithm.
Input:originalgraphG=(V,E)conflictgraphGC=(VC,EC)VC=V={v1,v2,…,vN}Output:{(v1,c1),(c2,c2),…,(vN,cN)}Ci∈{1,2,…,Z}Z:numberofcolorsGraph Coloring[beginsortthesetsascongestiondegreeas{n1,n2,…,nN}{n1,n2,…,nN}={v1,v2,…,vN}[fork=1toNi=1[while(∃jallocatedtocolorist.(j,mk)∈ES)i=i+1endallocatecoloritomkendend


### 4.2. Scheduling the Network

A super slot in the congestion-based scheduling algorithm is a set of sequential time slots such that each node with at least one packet at beginning of the super slot sends at least once during the super slot. The scheduling algorithm is accomplished based on colouring the original network. The number of time slots in each super slot in congestion-based scheduling algorithm is at most equal to the number of colours used for colour assignment to all nodes in the original network. Two examples are given in Figures3 and 4 that the original graph, the conflict graph, and the linear network are represented from left to right, respectively. The transmission links and conflict links are represented by solid lines and dashed lines, respectively. In the node-based scheduling, the nodes are ordered based on their degrees in conflict graph, which are (s2,s3,s1,s5,s6,s4) and (s2,s3,s4,s5,s6,s8,s9,s1,s7,s10,s11) in Figures 3 and 4, respectively. But, in the congestion-based algorithm, the nodes are ordered based on their degree of congestion in the original graph, which are (s2,s3,s1,s5,s6,s4) and (s1,s2,s7,s3,s8,s9,s4,s5,s6,s10,s11) in Figures 3 and 4, respectively. The scheduling results of node-based, level based and congestion-based, algorithms are given in Figures 3(a)–3(c) and 4(a)–4(c).Figure 3
An example where congestion-based scheduling performs better than level-based scheduling and similar to node-based scheduling. (a) Node-based scheduling. (b) Level-based scheduling. (c) Congestion-based scheduling.Figure 4
An example where congestion-based scheduling performs better than nod-based scheduling and similar to level-based scheduling. (a) Node-based scheduling. (b) Level-based scheduling. (c) Congestion-based scheduling.Figure3 shows a topology in which congestion-based scheduling performs better than level-based scheduling and its performance is similar to that of node-based scheduling whereas Figure 4 shows a topology in which congestion-based scheduling performs better than node-based scheduling and its performance is similar to that of level-based scheduling. Figure 3 shows that the congestion-based scheduling performs better than level-based scheduling and similar to the node-based algorithm in balancing the movement of packets across the network in a network with equal density of the packets across the network or higher packet density at low levels of the routing tree. But Figure 4 shows that in topologies with higher density of the packets at high levels of the routing tree congestion-based scheduling performs better than node-based scheduling and its performance is similar to that of level-based scheduling in balancing the movement of packets across the network.


## 4.1. Colouring the Network

In colouring the network, each of the two nodes that conflict with each other has different colours. So, for colour assignment, first the congestion degree of each node is computed, and then, the nodes are ordered in a decreasing degree of congestion. If two nodes have same congestion degrees, the node with higher conflict degree is prioritized. Colouring the original network is accomplished based on the order of congestion degree in such a way that each node with upper congestion degree is prioritized for colouring. The colouring algorithm is given in Algorithm1.Algorithm 1:The colouring algorithm.
Input:originalgraphG=(V,E)conflictgraphGC=(VC,EC)VC=V={v1,v2,…,vN}Output:{(v1,c1),(c2,c2),…,(vN,cN)}Ci∈{1,2,…,Z}Z:numberofcolorsGraph Coloring[beginsortthesetsascongestiondegreeas{n1,n2,…,nN}{n1,n2,…,nN}={v1,v2,…,vN}[fork=1toNi=1[while(∃jallocatedtocolorist.(j,mk)∈ES)i=i+1endallocatecoloritomkendend


## 4.2. Scheduling the Network

A super slot in the congestion-based scheduling algorithm is a set of sequential time slots such that each node with at least one packet at beginning of the super slot sends at least once during the super slot. The scheduling algorithm is accomplished based on colouring the original network. The number of time slots in each super slot in congestion-based scheduling algorithm is at most equal to the number of colours used for colour assignment to all nodes in the original network. Two examples are given in Figures3 and 4 that the original graph, the conflict graph, and the linear network are represented from left to right, respectively. The transmission links and conflict links are represented by solid lines and dashed lines, respectively. In the node-based scheduling, the nodes are ordered based on their degrees in conflict graph, which are (s2,s3,s1,s5,s6,s4) and (s2,s3,s4,s5,s6,s8,s9,s1,s7,s10,s11) in Figures 3 and 4, respectively. But, in the congestion-based algorithm, the nodes are ordered based on their degree of congestion in the original graph, which are (s2,s3,s1,s5,s6,s4) and (s1,s2,s7,s3,s8,s9,s4,s5,s6,s10,s11) in Figures 3 and 4, respectively. The scheduling results of node-based, level based and congestion-based, algorithms are given in Figures 3(a)–3(c) and 4(a)–4(c).Figure 3
An example where congestion-based scheduling performs better than level-based scheduling and similar to node-based scheduling. (a) Node-based scheduling. (b) Level-based scheduling. (c) Congestion-based scheduling.Figure 4
An example where congestion-based scheduling performs better than nod-based scheduling and similar to level-based scheduling. (a) Node-based scheduling. (b) Level-based scheduling. (c) Congestion-based scheduling.Figure3 shows a topology in which congestion-based scheduling performs better than level-based scheduling and its performance is similar to that of node-based scheduling whereas Figure 4 shows a topology in which congestion-based scheduling performs better than node-based scheduling and its performance is similar to that of level-based scheduling. Figure 3 shows that the congestion-based scheduling performs better than level-based scheduling and similar to the node-based algorithm in balancing the movement of packets across the network in a network with equal density of the packets across the network or higher packet density at low levels of the routing tree. But Figure 4 shows that in topologies with higher density of the packets at high levels of the routing tree congestion-based scheduling performs better than node-based scheduling and its performance is similar to that of level-based scheduling in balancing the movement of packets across the network.


## 5. Simulation

The proposed algorithm for evaluation was implemented by MATLAB. The results of simulation are compared with the node-based and the level-based scheduling algorithms proposed in [4]. In simulations, the WSN consists of 1000 nodes which are randomly deployed within a circular region with radius of 100 units. The BS is located in the center of circle. The density of nodes inside the radius 100/2  is  λ1 and between the radius 100/2  and 100 is  λ2. The Dijkstra routing is exploited to determine the routing tree rooted at the BS. The simulation results are average performance of 100 different network realizations. λ1/λ2 ratio represents that how the nodes and packets are distributed across the network.(i)
λ1/λ2=1/9 represents a topology in which the density of nodes and packets is higher at the high levels of the routing tree.(ii)
λ1/λ2=1 represents a topology in which the density of nodes and packets is equal across the network.(iii)
λ1/λ2=9/1 represents a topology in which the density of nodes and packets is higher at the low levels of the routing tree.Figures5, 6, and 7 show WSN configurations for λ1/λ2=1/9, λ1/λ2=1, and λ1/λ2=9/1 ratios, respectively. Figure 8 displays the delay of congestion-based, node-based, and level-based scheduling versus λ1/λ2 for  rm/rs=2. As the results of simulation show and expected from the examples in Figures 3 and 4, the congestion-based algorithm performs better than level-based scheduling for all  λ1/λ2 ratios. The congestion-based algorithm performs better than node-based scheduling for low  λ1/λ2 ratios and its behavior is similar to node-based scheduling for high  λ1/λ2. In topologies with low  λ1/λ2 ratios, the conflict degree of nodes that forward more packets is low and these nodes do not have high priority for colouring in node-based Scheduling while our proposed algorithm prioritizes these nodes in colouring. Therefore, comparing to node-based scheduling, in the congestion-based algorithm, these nodes transmit in more time slots in a super slot leading to less congestion in these nodes and delay decrement. In topologies with high  λ1/λ2 ratios, the conflict degree of nodes which forward more packets is high. Therefore, these nodes have high priority for colouring and the performance of two algorithms becomes similar.Figure 5
A WSN configure withλ1/λ2=1/9.Figure 6
A WSN configure withλ1/λ2=1.Figure 7
A WSN configure withλ1/λ2=9/1.Figure 8
Comparison of the delay of congestion-based, node-based, and level-based scheduling algorithms for differentλ1/λ2 and rm/rs=2.Figure9 shows the delay of congestion-based scheduling, node-based scheduling, and level-based scheduling as a function rm/rs  for  λ1/λ2=1/9.Figure 9
Comparison of the delay of congestion-based, node-based, and level-based scheduling algorithms versusrm/rs for λ1/λ2=1/9.Results show that the congestion-based scheduling outperforms the node-based scheduling for lowλ1/λ2 ratios up to a certain value of  rm/rs, and for higher values of  rm/rs, their performance is similar. Moreover, for low λ1/λ2 ratios, the congestion-based scheduling performs better than level-based scheduling for all values of rm/rs, and with increasing value of  rm/rs, the congestion-based scheduling performance is close to level-based scheduling. Figure 10 illustrates the delay of congestion-based, node-based, and level-based scheduling algorithms versus rm/rs for  λ1/λ2=9/1. Results show that for high  λ1/λ2 ratios, the congestion-based scheduling is similar to node-based scheduling and outperforms the level-based scheduling for all of rm/rs.Figure 10
Comparison of the delay of congestion-based, node-based, and level-based scheduling algorithms versusrm/rs for λ1/λ2=9/1.


## 6. Conclusion

Data collection is one of the main functions in wireless sensor networks. The scheduling is a way to improve quality of data collection. Decreasing the scheduling length reduces the delay of packets transmission to BS. In this paper a scheduling algorithm was proposed which is based on congestion rate of nodes. In congestion-based scheduling algorithm, colouring the original network is accomplished according to congestion degree of the nodes and scheduling is similar to node-based scheduling. The performance of this algorithm depends on the distribution of the packets at levels of the routing tree. The congestion-based scheduling outperforms the level-based scheduling and in comparison to node-based scheduling is better for topologies that higher density of packets is at the high levels of the tree and similar to it for topologies that have equal density of packets across the network or higher density of packets at low levels of the tree.



---

*Source: 864694-2012-02-15.xml*