spanning tree based algorithms for low latency and energy ... · spanning tree based algorithms for...

23
Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in wireless sensor networks S. Upadhyayula, S.K.S. Gupta * Department of Computer Science and Engineering, Fulton School of Engineering, Arizona State University, Tempe, AZ 85287, United States Received 28 February 2005; received in revised form 26 March 2006; accepted 22 April 2006 Abstract Many wireless sensor networks (WSNs) employ battery-powered sensor nodes. Communication in such networks is very taxing on its scarce energy resources. Convergecast – process of routing data from many sources to a sink – is com- monly performed operation in WSNs. Data aggregation is a frequently used energy-conversing technique in WSNs. The rationale is to reduce volume of communicated data by using in-network processing capability at sensor nodes. In this paper, we address the problem of performing the operation of data aggregation enhanced convergecast (DAC) in an energy and latency efficient manner. We assume that all the nodes in the network have a data item and there is an a priori known application dependent data compression factor (or compression factor), c, that approximates the useful fraction of the total data collected. The paper first presents two DAC tree construction algorithms. One is a variant of the Minimum Spanning Tree (MST) algorithm and the other is a variant of the Single Source Shortest Path Spanning Tree (SPT) algorithm. These two algo- rithms serve as a motivation for our Combined algorithm (COM) which generalized the SPT and MST based algorithm. The COM algorithm tries to construct an energy optimal DAC tree for any fixed value of a (= 1 c), the data growth factor. The nodes of these trees are scheduled for collision-free communication using a channel allocation algorithm. To achieve low latency, these algorithms use the b-constraint, which puts a soft limit on the maximum number of children a node can have in a DAC tree. The DAC tree obtained from energy minimizing phase of tree construction algorithms is re- structured using the b-constraint (in the latency minimizing phase) to reduce latency (at the expense of increasing energy cost). The effectiveness of these algorithms is evaluated by using energy efficiency, latency and network lifetime as metrics. With these metrics, the algorithms’ performance is compared with an existing data aggregation technique. From the exper- imental results, for a given network density and data compression factor c at intermediate nodes, one can choose an appro- priate algorithm depending upon whether the primary goal is to minimize the latency or the energy consumption. Ó 2006 Elsevier B.V. All rights reserved. Keywords: Convergecast; Spanning trees; Data aggregation; Energy-efficiency; Wireless sensor networks 1570-8705/$ - see front matter Ó 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.adhoc.2006.04.004 * Corresponding author. Tel.: +1 480 965 3806; fax: +1 480 965 2751. E-mail addresses: [email protected] (S. Upadhyayula), [email protected] (S.K.S. Gupta). Ad Hoc Networks xxx (2006) xxx–xxx www.elsevier.com/locate/adhoc ARTICLE IN PRESS

Upload: others

Post on 11-Jul-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

ARTICLE IN PRESS

Ad Hoc Networks xxx (2006) xxx–xxx

www.elsevier.com/locate/adhoc

Spanning tree based algorithms for low latency andenergy efficient data aggregation enhanced convergecast

(DAC) in wireless sensor networks

S. Upadhyayula, S.K.S. Gupta *

Department of Computer Science and Engineering, Fulton School of Engineering, Arizona State University, Tempe, AZ 85287, United States

Received 28 February 2005; received in revised form 26 March 2006; accepted 22 April 2006

Abstract

Many wireless sensor networks (WSNs) employ battery-powered sensor nodes. Communication in such networks isvery taxing on its scarce energy resources. Convergecast – process of routing data from many sources to a sink – is com-monly performed operation in WSNs. Data aggregation is a frequently used energy-conversing technique in WSNs. Therationale is to reduce volume of communicated data by using in-network processing capability at sensor nodes. In thispaper, we address the problem of performing the operation of data aggregation enhanced convergecast (DAC) in an energyand latency efficient manner. We assume that all the nodes in the network have a data item and there is an a priori knownapplication dependent data compression factor (or compression factor), c, that approximates the useful fraction of the totaldata collected.

The paper first presents two DAC tree construction algorithms. One is a variant of the Minimum Spanning Tree (MST)algorithm and the other is a variant of the Single Source Shortest Path Spanning Tree (SPT) algorithm. These two algo-rithms serve as a motivation for our Combined algorithm (COM) which generalized the SPT and MST based algorithm.The COM algorithm tries to construct an energy optimal DAC tree for any fixed value of a (= 1 � c), the data growth

factor. The nodes of these trees are scheduled for collision-free communication using a channel allocation algorithm.To achieve low latency, these algorithms use the b-constraint, which puts a soft limit on the maximum number of childrena node can have in a DAC tree. The DAC tree obtained from energy minimizing phase of tree construction algorithms is re-structured using the b-constraint (in the latency minimizing phase) to reduce latency (at the expense of increasing energycost). The effectiveness of these algorithms is evaluated by using energy efficiency, latency and network lifetime as metrics.With these metrics, the algorithms’ performance is compared with an existing data aggregation technique. From the exper-imental results, for a given network density and data compression factor c at intermediate nodes, one can choose an appro-priate algorithm depending upon whether the primary goal is to minimize the latency or the energy consumption.� 2006 Elsevier B.V. All rights reserved.

Keywords: Convergecast; Spanning trees; Data aggregation; Energy-efficiency; Wireless sensor networks

1570-8705/$ - see front matter � 2006 Elsevier B.V. All rights reserved.

doi:10.1016/j.adhoc.2006.04.004

* Corresponding author. Tel.: +1 480 965 3806; fax: +1 480 965 2751.E-mail addresses: [email protected] (S. Upadhyayula), [email protected] (S.K.S. Gupta).

Page 2: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

2 S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx

ARTICLE IN PRESS

1. Introduction

One important function of many wireless sensornetworks (WSNs) is to gather data from hostile orremote environments. It is expected of such net-works to work untended for a long duration. Dueto limited energy resources, the above requirementsput constraints on the energy usage. Examining var-ious functionalities of sensor networks, communica-tion can be singled out as one function that devoursbig share of the energy resources. A review of the lit-erature suggests that many attempts have beenmade to minimize energy consumption during com-munication [1–7]. The process of routing data fromall the nodes to one node (called a sink node) iscalled a convergecast. In WSNs the energy costfor transmitting data far exceeds the cost of process-ing it [19]. Data aggregation is an energy conserva-tion technique which tries to reduce the volume ofdata communicated by collecting local data at inter-mediate nodes and forwarding only the result of anaggregation operation, such as min and max,towards the sink node. Since a convergecast opera-tion usually follows a broadcast operation [6], thepath taken by a broadcast packet is also used foraggregating data in the convergecast. However,research shows that performing data aggregationalong this routing path is not energy efficient [5].

In [6], authors study the general data aggregationproblem and propose several (suboptimal) dataaggregation techniques. The general data aggrega-tion problem is – given m sources and one sink ina n node network (m < n), find a minimum weightsubgraph that includes all sources. This is a wellknown NP-complete problem, known as the SteinerTree Problem (STP) [8]. There are many approxima-tion algorithms for solving STP [9–13]. From sensornetworks’ perspective, in the literature there are sev-eral heuristic approaches to solve this problem [6,7].

The problem addressed in this paper is an impor-tant special case of the general data aggregationproblem in which all the nodes in the network aresource nodes. We refer to the task of collecting datafrom all the nodes in the network while performingdata aggregation at intermediate nodes as a DAC

(Data Aggregation enhanced Convergecast) opera-tion. Some heuristics addressing efficient implemen-tations of DAC operations are presented in [14,15].Performance metrics vary depending on the systemrequirements. Energy, latency [5–7,15], reliability[5,15] and network lifetime [3,14] are few that arefound in the literature. Node placement models

were studied to find their effect on energy consump-tion in WSNs [6,16].

This paper addresses the problem of optimalimplementation of DAC operations incorporatingconstraints such as data compression at intermediatenodes. Data compression factor c 2 [0,1] is used todenote the effectiveness of aggregation in reducingthe data volume in comparison to the volume of theinput data at an intermediate node. Under these con-straints, this paper presents solutions for minimumenergy data aggregation with emphasis on reducingthe latency. Two algorithms are proposed, one basedon Minimum Spanning Tree (MST) and anotherbased on Shortest-Path spanning Tree (SPT), tomotivate the combined SPT–MST (COM) algorithmwhich generalizes the MST and the SPT algorithmand tries to construct energy optimal DAC trees forall values of a (= (1 � c)), the data growth factor.

In order to ensure collision-free data aggrega-tion, the nodes are scheduled using a combinedCode-Division Multiple Access (CDMA) andTime-Division Multiple Access (TDMA) basedchannel allocation algorithm. Latency of the pro-posed algorithms is improved by introducing a con-cept called b-constraint. This rule places an upper(soft) limit on the number of children each node inthe tree can have. This limit is soft in the sense thatb-constraint is violated in cases where there is a riskof a node being left out of the tree.

The performance of the algorithms is testedagainst some of the existing techniques [5,14,15]on randomly generated graphs. Network lifetime isalso observed as a by-product while running thesealgorithms. Empirical observations are made withregards to answering questions such as – given anetwork of source nodes and data growth factor(a), the tree constructed by which algorithm is rec-ommended? and, what is the suggested value for b?

The paper is organized as follows. In Section 2, aformal definition of the problem this paper dealswith is presented. It also identifies the performancemetrics used in this work. In Section 3, systemmodel used in the paper is given. In Section 4, thetree construction and channel allocation algorithmsare explained. Section 5 describes the simulationenvironment and Section 6 discusses the experimen-tal results. The paper is concluded in Section 7.

2. Problem description and design goals

In this paper, we address the problem ofconstructing energy and latency efficient DAC trees

Page 3: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx 3

ARTICLE IN PRESS

taking into account the degree of data aggregationthat an application permits. Formally, for a givennetwork (of n sensor nodes and a base station (sinknode), with each sensor node having a unit data tobe sent to the sink node) and an (average) compres-sion ratio c (determined by the application specifiedaggregation operator), the problem is to determinethe data aggregation enhanced convergecast(DAC) tree structure (determined by combinationof tree type (MST or SPT) and b value (range) thatwould be better for a desired primary optimizationmetric: total energy or latency.

Total energy spent by a network in communica-tion is defined as the sum of the energy spent byeach node in the network. Since WSNs have lowenergy resources, their efficient use is highly desired.More so because, typically, energy consumed forcommunication in wireless networks is high (pro-portional to rk where r is the range of communica-tion and k is between 2 and 4) [4]. Therefore, tominimize this high communication costs, dataaggregation algorithms adopt multi-hop routingfor their data [5,14].

Total latency is the time taken to perform oneinstance of a DAC operation. Low latency indicatesthe promptness with which data is delivered to thebase station. Hence, it is a desired communicationfeature in wireless networks. Collision-free commu-nication saves energy which would otherwise bewasted in retransmissions and hence, should becomea consideration for the scheduling algorithm. Net-work lifetime is defined as the longevity of networkin terms of number of rounds of DAC operationsperformed before the failure of a predefined numberof nodes. Since WSNs are generally deployed ininaccessible environments, long network lifetime ishighly desired.

The objective in this paper is to simultaneouslyminimize total energy consumption and achievelow latency during the entire DAC operation. Inthe process, variation of network lifetime isobserved. Since collisions result in data loss and/or retransmissions, which wastes energy, collisionavoidance is an inherent design goal in this problem.

3. System model

The following system model is used in this paper.The network consists of n wireless sensors, eachcontaining a transceiver with a maximum transmis-sion range. This network is represented by a undi-rected graph G(V,E) where nodes in the set V

represent the sensor nodes and an edge (i, j), wherei 2 V and j 2 V, in the set E denotes that the twonodes i and j are in the communication range ofeach other. The weight w(i, j) associated with anedge (i, j) 2 E indicates the cost (in terms of energyconsumption) of communication between the twovertices i and j.

This work adopts the use of multi-hop transmis-sions in its communication model. For this purpose,a tree is constructed, i.e., a parent–child relationshipis established among various nodes. In-networkaggregation at intermediate nodes usually resultsin reducing the size of data (in comparison to cumu-lative data obtained from all its children and thedata generated by node itself) that is forwarded byan intermediate node to its parent. We refer to thefraction by which the data obtained from the chil-dren node gets compressed due to the aggregationoperation performed at the parent node as thecompression factor c. An example of 100% datacompression (c = 1) case would be max, min or avg

temperature in a room. An example of 100% dataconcatenation (c = 0) case would be temperaturesat various points in the environment.

If a node i transmits a packet of size datai to anode j then the size of the packet at the node j

(denoted as dataj) after receiving the packet fromthe node i is modeled as

dataj dataj þ ð1� cÞ � datai: ð1ÞAs mentioned above, if c = 0 then all the data fromindividual nodes are appended without compressingthem. If c = 1 then there is a complete compressionof all the individual node data.

3.1. Assumption of system model

All the nodes in the network are static and areloosely synchronized to enable TDMA scheduling.The topology graph constructed from the networkis connected. Weights associated with all the edgesare positive and hence, there are no negative weightcycles. A node can adjust its power level dependingon its requirements. This means that one node canbe neighbor of the other, but vice versa need notbe true. In this paper, weight of an edge and energyfor communicating between the two nodes con-nected by the edge are used interchangeably. Theenergy spent for transmitting a data packet fromnode i to node j is the same as that from node j tonode i. Data aggregation in the network is donealong a tree. Although, the maximum transmission

Page 4: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

4 S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx

ARTICLE IN PRESS

power of a node is assumed to be sufficiently largeso as to reach every other node in the network, anode employs power control techniques to use sig-nal strength which is sufficient to reliably communi-cate with its parent node. Every node generates aconstant sized data packet (k units). Each node isassigned a time slot during which it has to transmitits data. Communication is assumed to be done intime slots. Every node in the network is equippedwith only one transceiver. Therefore, multiple recep-tions by a node in the same time slot is not possible.In addition to time slots, the nodes use CDMAcodes for communication. When a node is notcommunicating, it goes to power-save mode, therebyexpending negligible amount of energy in runningthe transceiver circuitry. The scheduling algorithmassumes that a node does not transmit until itreceives data from all its children. All the nodes inthe network use a fixed compression factor whilecollecting data. In this paper, DAC operation isevaluated in terms of latency of a round of DACoperation. A round is defined as the collection ofone data unit from every node in the network anddelivering the resulting aggregated data to the sinknode. The latency of one round of DAC operationis the time taken starting from the first data packettransmission along the tree till the last data packetreception by the sink. In every round, each parentin the tree will wait till it receives data from all itschildren. A node after participating in a round ofa DAC can immediately participate in its nextround.

1 Nodes are assumed to enter a low energy-consumption sleep

state whenever they are not sending or receiving data.

3.2. Energy model

Let Eelec be the electrical energy required to runthe circuitry in the transceiver. The following gen-eric model is used to account for the energy con-sumed during communication. If a node i istransmitting k bits of data to a node j, then theamount of energy spent in this process by node i,ETx(i, j,k), and node j, ERx(j,k), is given as:

ETxði; j; kÞ ¼ Eelec � k þ Eampði; jÞ � k; and

ERxðj; kÞ ¼ Eelec � k;ð2Þ

where Eamp(i, j) is the minimum amplification energyper bit required to reliably transmit data from nodei to node j (measured in nJ/bit). The value of ampli-fication energy required between any two nodes de-pends upon the radio communication channelcharacteristics. In many works, Eamp(i, j) is approx-

imated using a distance based formula Eamp(i, j) =�amp · dist(i, j)k, where �amp is the amplificationenergy required to transmit a bit a unit distance,dist(i, j) is the distance between nodes i and j, k isa positive integer typically having values, dependingon the communication medium, from 2 to 4 [3,4].The formula in Eq. (2) is very general and encom-passes non-distance based models for energyconsumption. For example, the Eamp(i, j) can beassigned the value obtained from actual in-fieldmeasurements conducted by the two nodes i and j.Note that, we are assuming that the nodes employpower control in order to optimize power expendedfor communication and to minimize interference toother concurrent communication.

The total energy needed to transmit k bits of datafrom node i to node j would be denoted by E(i, j,k),where

Eði; j; kÞ ¼ ETxði; j; kÞ þ ERxðj; kÞ: ð3ÞNodes are assumed to have two states: a high energyconsuming on state and a low energy consumingsleep state. A node is in on state only when it iseither sending or receiving data. For sake of simplic-ity, we assume that the energy consumed in the sleepstate is negligible. Slot duration are expressed inunits of time duration for transmitting one bit. Ifa slot is of duration of B bits and the node is onlyon for receiving or transmitting k bits then it isassumed to spend energy required for transmittingor receiving only k bits instead of B bits.

3.3. b-constraint

Consider any two nodes i and j having a commonparent p. If one of these nodes (say node i) has agreater number of children than the other node,then the parent node p may have to wait for a longerduration before receiving messages from node i. Ifthese nodes have roughly the same number of chil-dren (i.e. the tree is roughly balanced), then it islikely that both node i and node j will be preparedto transmit data at the same time and node p willhave to be awake for a shorter duration to collectdata from all its children. This is advantageous fromthe perspective of energy consumption minimizationsince nodes have to be in high energy consuming on

state for a shorter duration.1 For this purpose a newconstraint called the b-constraint is introduced:

Page 5: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx 5

ARTICLE IN PRESS

Definition 1 (b-Constraint). A node cannot havemore than b children unless an intended child nodeis likely to be left out from the DAC tree.

The b-constraint ensures that a (almost) balancedDAC tree is constructed while ensuring that all thenode are included in the tree. Note that, in theresulting DAC tree, some nodes can have fewer thanb children and some other nodes may have morethan b children. However, in a dense sensor networkmost of the nodes will have exactly b children –resulting in an almost balanced tree.

Define a = 1 � c as the data growth factor. Thisterm gives an indication of the rate at which thedata grows as it moves up the tree. Rest of the paperuses a and c interchangeably. Theoretically, for afixed a, the value of b for which latency achievesoptimal value is discussed in the following section.

2 A complete b-ary tree is a b-ary tree in which all leaves are atthe same level and all the internal nodes have b children.

3.4. Data latency

Latency is defined as the time required from thestart of data transmission by the first source tillthe last packet is received by the sink in one roundof a DAC. The communication in this model takesplace using variable length time slots. On the entiretree, the length of a time slot is variable. However,the transmission slot length of the nodes at a partic-ular level in a tree is fixed (as described below). As itwill be seen later in the paper (Section 4.5), thisassumption simplifies contention-free channel allo-cation. Note that a parent node’s reception timeslots are determined by the transmission time slotsof its children, i.e., a parent node is scheduled tobe listening (on an appropriate channel) wheneverits children node are scheduled to transmit.

In this work, the length of the transmission timeslot for a node at level i is defined as follows:

Definition 2 (Length of a time slot at level i). It is thelength of time required to transmit the largest sizedata packet from any level i node to its parent atlevel (i + 1) in the DAC tree.

For instance, consider a DAC tree of the height h

with the root node at level h and the leaf nodes atlevel 1. And let all the leaves have a unit of data(say of size k) to transmit. Therefore, the length ofthe transmission time slot for the level 1 is k unit.Further, let fni1 ; ni2 ; ni3 ; . . .g represent nodes at leveli and fdi1 ; di2 ; di3 ; . . .g represent the size of data theyhave to transmit to their respective parents at leveli + 1. Then the length of the time slot for this trans-

mission is given by the time to transmit a data ofsize Di, where

Di ¼ maxfdi1 ; di2 ; di3 ; . . .g: ð4ÞDefine Li to be the time required for level i nodes tofinish transmitting data to the next level. Assumingthat bi is the maximum number of children any nodeat level i + 1 has in a given DAC tree, we have

Li P biDi; ð5Þsince each parent has to wait for receiving data fromall its b children.

For a DAC tree of height h, the total latencyLatency is defined as:

Latency ¼Xh�1

i¼1

Li: ð6Þ

For example consider a complete b-ary tree.2 Thelatency of a round of DAC operation for a givencomplete b-ary tree can be calculated as follows.For a tree with height (or level) h, the (maximum)data size at level i, 1 6 i < h, is given as

Di ¼ k 1þ ðabÞ þ ðabÞ2 þ � � � þ ðabÞði�1Þh i

;

¼ kðabÞi � 1

ðabÞ � 1:

ð7Þ

For instance,

• At level 1 the largest packet size = k (= D1)• At level 2 the largest packet size = k[1 + (ab)]

(= D2)• At level 3 the largest packet size = k[1 + (a-

b) + (ab)2] (= D3)• . . .• At level h � 1 the largest packet size = k[1 +

(ab) + (ab)2 + � � � + (ab)h�2] (= Dh�1)• According to the system model, the root node is

the sink node and does not sense or transmit anydata itself therefore Dh is not defined.

In the case of complete b-ary tree:

Latency P kbXh�1

i¼1

ðabÞi � 1

ðabÞ � 1; ð8Þ

P kb1

ðabÞ � 1

ðabÞh � ðabÞðabÞ � 1

� ðh� 1Þ !

:

ð9Þ

Page 6: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

α = 0 α = 1.0

3.6

3.8

4

4.2

4.4

4.6

4.8

5

5.2

1.5 2 2.5 3 3.5 4

Lat

ency

(s)

0

50

100

150

200

250

1 1.5 2 2.5 3 3.5 4

Lat

ency

(s)

Beta Beta

Fig. 1. Plot of theoretical analysis of latency vs b for (a) a = 0 and (b) a = 1.0.

6 S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx

ARTICLE IN PRESS

As shown in Fig. 1, for a = 0 the minimum value oflatency in Eq. (9) changes to db logbNe which attainsleast value for b = e (2.76, natural number). Whenthe value of b is restricted to integral values the min-imum value is attained for b = 2 or b = 3 dependingupon the value of N. This derivation assumes thatthe tree is balanced with each node having b chil-dren. It also assumes that each internal noderequires b time slots.

3.5. Lifetime of a DAC tree

Lifetime of a DAC tree is defined as the numberof rounds of DAC operation that can be performedbefore the failure of certain percentage of totalnodes. A node is said to have failed if, due to deple-tion of its energy resources, it cannot transmit itsdata to its parent or if it cannot receive data fromat least one of its children. Trees performing DACoperations with minimum energy may not necessar-ily have a long life. In such trees, it is possible thatcertain nodes spend more energy than the rest,and therefore, die early. Hence, minimum energyconsumption and maximizing life time of networkare competing goals. Therefore, in this paper, life-time of a DAC tree is defined as the failure of 5%of the total nodes of the tree.

3.6. Radio communication model

For communication, each node will be assigned a3-tuple consisting of two CDMA codes and a timeslot. One code is for transmission and another forreception. The time slot indicates the period duringwhich a node has to transmit its data to its parent.Parent node will be prepared to receive data duringthat time slot. Once a node completes its transmis-

sion, it switches itself to the power-save mode untilnext round of DAC. The reception code of a node issame as the transmission code of all its children. Anode does not transmit its data until it has finishedreceiving data from all its children. Every node fusesa fraction of the data it receives with its own dataand the resultant packet is transmitted. This exercisecontinues till the base station receives data from allits children.

In this paper, Direct Spread Spectrum SequenceCDMA (DSSS-CDMA) codes are used for commu-nication. However, for scenarios where there ismore possibility of interference (like large networksize, dense networks) frequency hopping can beused as it offers lesser interference. Our channel allo-cation technique eliminates any packet collisions fortransmission using a specific channel, i.e. (time-slot,code) pair, however, there exists possibility of inter-ference from simultaneous communication usingdifferent codes. Our channel allocation algorithmtakes this into account by considering: (1) the num-ber of codes which can be used, and (2) the commu-nication range of each node. However, we make thesimplifying assumption that no packets are lost dueto channel bit errors. Hence, the results presented inthis paper can be viewed as an upper bound on theachievable performance.

4. Algorithms

In this section algorithms for tree constructionare presented. The notations used in this algorithmis explained in Table 1. A channel allocation algo-rithm for the constructed tree is also presented.Channel allocation determines a time slot for eachnode and assigns two CDMA codes to each node(one for transmission and one for reception). The

Page 7: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

Table 1Notations for tree construction algorithms

Notations Definitions Initial value

S {vjv 2 V(T), where T is the tree} ;s Root node Inputw(u,v) Weight on edge

connecting u and v

Input

PQ Priority Queue of thenodes keyed by their d values

Adj[u] Adjacent nodes of u InputChild[u] List of child nodes of u ;d[u] Weight of path to node u 1 if u 5 s

from base station(for SPT algorithm)

0 otherwise

Minimum weight ofany edge connecting

1 if u 5 s

node u to the tree(for MST algorithm)

0 otherwise

dist[u,v] Distance between node u and v –p[u] Parent node of u NULLP[u] Sorted list of alternate

parent nodes for node u

;

a Data growth factor Inputc Data compression factor 1 � aC(u) Time slot for transmission

assigned to node u

U

b jChild[u]j 6 b InputTðuÞ Transmission code of node u 0RðuÞ Reception code of node u 0PðiÞ fuju 2 V ½G� and RðuÞ 6¼ ig ;CðiÞ fuju 2 V ½G� and TðuÞ 6¼ ig ;L Set of leaf nodes Input{1, . . . ,H} Set of allowed CDMA codes Input

S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx 7

ARTICLE IN PRESS

time slot assigned to a node indicates when to trans-mit its data to its parent node. Concurrently, theparent node will wake up from sleep state to receivedata from its children during this time slot.

4.1. Tree construction

A node can directly transmit its sensed data tothe base station (sink node) or route it throughother nodes. Examining the energy model in Section3, it can be concluded that multi-hop routing ofdata will result in energy savings whenever singlehop communication involves transmission over longdistances. Hence, in this work, a tree basedapproach is adopted to solve the problem of con-vergecast. It is easy to see that a tree based approachcan represent both single hop and multi-hop com-munications. Following are some of the basic defini-tions we use in tree construction algorithms:

Definition 3. Let path from u to v, p(u,v) ={u0,u1,u2, . . . ,un} be defined as "i, 1 6 i 6 n,

p[ui�1] = ui, where u0 = u and un = v, and p[ui]indicates parent node of ui.

Definition 4. Weight of a node u, denoted as d[u], isdefined as follows:

d½u� ¼

cost of the ðknownÞ shortest path from

base station to u – SPT algorithm;

cost of shortest link connecting

node u to MST – MST algorithm:

8>>><>>>:

Note that (1) d[u] is used as the key value of u whenplacing the node in a priority queue, (2) ‘‘shortest’’is in terms of energy cost, and (3) the link costs(weights) are assumed to be symmetric, i.e.w(i, j) = w(j, i), implying that the path costs are alsosymmetric.

We now motivate our algorithm for tree con-struction (COM) by first presenting two tree con-struction algorithms: one based on the MinimumSpanning Tree (MST) algorithm and the otherbased on the Single Source Shortest Path (SPT)algorithm. Conditions (values of a and b) are givenunder which performance of each of these algo-rithms is optimum in terms of energy. Then we pres-ent the Combined SPT and MST algorithm,referred to as COM, which works for any value of a.

4.1.1. Rationale for SPT approach

Since each node in the network has some bits totransmit to the base station, it can be viewed as anetwork with (n � 1) sources and one sink (n nodesin the network). If the compression factor is 0%(a = 1), then it can be interpreted that the entiredata sensed by each node travels to the base station.Let the energy expended for each packet be the sumof energy spent by every node involved in its trans-mission from the source to the base station. Fromthe energy model in Section 3, it can be concludedthat shorter the path traveled by the packet andlesser the number of hops, lower is the energyexpended. SPT constructs trees based on thisnotion. A node in a SPT is at a shortest-distance

away from the root node. Since, weight on the edgesin the graph represents energy for communication,SPT also accounts for the number of hops betweena node and the base station. Therefore, SPTbased approach is used for tree construction whena = 1.

Energy spent by a node in communication alsodepends on the amount of data it is transmitting.

Page 8: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

1: if TYPE = SPT2: if d[v] > d[u] + E(u,v,k)3: d[v] = d[u] + E(u,v,k)4: p(v) = u

5: P[v] = P[v] [ {u}6: if TYPE = MST7: if d[v] > E(u,v,k)8: d[v] = E(u,v,k)9: p(v) = u

10: P[v] = P[v] [ {u}11: if TYPE = COM12: if d[v] > a * d[u] + E(u,v,k)13: d[v] = a * d[u] + E(u,v,k)14: p(v) = u15: P[v] = P[v] [ {u}

1: C = ; /* C is a stack */2: push(C,u)3: while (C 5 ;)4: u = pop(C)5: for each v 2 Child(u)6: push(C,v)7: p = p(u)8: if (u 5 s) /* s is base station */9: if (jChild(p)j > b)10: find t 2 P(u) such that jChild(t)j < b11: p(u) = t

12: Child(p) = Child(p) � {u}13: Child(t) = Child(t) [ {u}

8 S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx

ARTICLE IN PRESS

Contribution of a node b at height j to theamount of data transmitted by its ancestor nodeat height i, (i < j) is given by (a)j�ik, where k is thenumber of bits transmitted by b. For 0% compres-sion (a = 1), it can be observed from Eq. (7) thatthe data transmitted by any node in the tree willtravel, uncompressed, along the tree to the basestation. Hence, the energy consumed for deliveringthe data packet originating at a node will be mini-mized if it is routed to the base station along theshortest (minimum energy) path from the node tothe base station. Clearly, to minimize the energycost for the entire DAC operation, the path traveledby a packet from every node should be minimized.This is achieved by a SPT.

4.1.2. Rationale for MST approach

Consider a DAC scenario with 100% (a = 0)compression. In this case, a packet transmitted byany node does not exist after one hop. To spendleast energy in transmitting a packet, a node shouldtransmit it to its closest (by weight) neighbor(towards the sink node). Total energy consumed inthis type of model is given by:

ETotal ¼ k �X8ðu;vÞ2T

wðu; vÞ; ð10Þ

where k is a constant packet traveling along thegraph, w(u,v) is the weight of the link between nodesu and v, and T is the DAC tree. In Eq. (10), ETotal isminimized only when

P8ðu;vÞ2T wðu; vÞ is minimized.

This is the problem of finding a minimum (edge-weight) spanning tree.

4.2. SPT based algorithm

The first tree construction algorithm is based onthe concept of single source shortest path algorithm.This paper uses Dijkstra’s SPT algorithm for thisproblem. Due to reasons given in Section 3, a con-straint is put on the number of children per nodein the tree (called the b-constraint). b is an inputto the algorithm. If an intended child node is likelyto be left out of the tree due to the b-constraint, thenit is overlooked. This is to ensure that all the nodesin the network are included in the DAC tree. Thenotations used in this algorithm is explained inTable 1.

Algorithm 4 is a two-phase algorithm. In the firstphase, it constructs a Dijkstra’s Single Source SPTwhich minimizes energy for communication. In thesecond phase, it restructures the tree trying to

balance it so as to reduce latency. By constructinga balanced tree there is a greater chance of multiplesimultaneous transmissions, thereby reducinglatency. However, a restructured tree may not showany improvement in latency. In such cases, thebehavior of network lifetime is observed to find anexplanation for this behavior.

For b P jVj Algorithm 4 behaves similar to theDijkstra’s Single Source SPT. It is well-known thatupon termination of Dijkstra’s Single Source Short-est path algorithm with source node s on a graphG(V,E), the resulting predecessor subgraph Gp =(Vp,Ep), where Vp = {v 2 V : p[v] 5 NULL} [ {s}and Ep = {(p[v], v) 2 E : v 2 Vp � {s}} inducedby p values is a shortest-path tree rooted at s

[18].

Algorithm 1. Relax(TYPE,u,v)

Algorithm 2. AdjustTree(u)

Page 9: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx 9

ARTICLE IN PRESS

Algorithm 3. AdjustWeight(TYPE,u)

1: for each v 2 Child(u)2: if TYPE = SPT3: d[v] = d[u] + w(u,v)4: if TYPE = MST5: d[v] = w(u,v)6: if TYPE = COM7: d[v] = a * d[u] + w(u,v)8: AdjustWeight(TYPE,v) /*Adjust Weight in

the subtree */

Algorithm 4. SPT Based Tree Construction

1: /*Energy Minimizing Phase*/2: Initialize(G,s)

3: S = ;4: PQ = V[G]5: while PQ 5 ;6: u = Extract_min(PQ)7: if (u 5 s)8: p = p[u]9: Child[p] = Child[p] [ {u}10: S = S [ {u}11: for all v 2 Adj[u]12: Relax(TYPE,u,v) /* TYPE is SPT,

MST or COM (for Combined-SPT–MST) */13:14: /*Latency Minimizing Phase*/15: AdjustTree(s)16: AdjustWeight(TYPE, s) /* TYPE is SPT,

MST or COM (for Combined-SPT–MST) */

1: /*Energy Minimizing Phase*/2: Initialize(G,s)

3: while PQ 5 ;4: u = Extract_min(PQ)5: if u 5 s

6: Child[p(u)] = Child[p(u)] [ {u}7: for all v 2 Adj[u]

Before discussing the algorithm in further detail,the following terms needs to be explained: Extra-ct_min points to the minimum value from a prior-ity queue. Next_min is a pointer to the nextminimum value in the queue. For any queue, ini-tially, Next_min is same as Extract_min. Ini-tialize(G,s) sets d[s] = 0, where, s is the basestation and for the rest of the nodes their d valueis set to infinity.

Fig. 2 explains the working of the SPT algorithm.An example scenario is presented, where a tree isconstructed from the given network. The nodes ofthe tree are also scheduled (assigned time slots andCDMA codes for communication). Fig. 2(a) showsthe network with edge weights representing energy(in nano Joules (nJ)) spent in transmitting one bitof data over a square meter area. The tree, showedas solid lines in Fig. 2(b), shows shortest path(denoted by dark lines) of each node from base

station (node s). This tree is the product of Energy

Minimizing Phase of the algorithm. Energy requiredfor one round of communication in this tree is44 nJ. This is obtained for a single bit data packetby substituting 100 nJ/bit and dist(i, j)2 · 0.1 nJ/bit/m2 for Eelec and Eamp(i, j) in Eq. (2), respectively.The tree in Fig. 2(c) is the result of AdjustTree algo-rithm of Latency Minimizing Phase. It changes theparent of node E from node D to node B. This algo-rithm only adjusts the tree structure to satisfy b-con-

straint. It does not change the value of energyrequired to transmit a unit packet to base station.Therefore, d[u] value, where u is any node in the net-work, is unchanged (e.g., d[E] = 11 instead of 12 inFig. 2(c)). Fig. 2(d) shows the result of runningAdjustWeight algorithm. It corrects the energy valueof each node in the network. This change can beseen by observing the energy value of node E.

The schedules for Fig. 2(b)–(d) (as shown inFig. 2(e)–(f) respectively) are given before introducingthe scheduling algorithm in order to help the readerbetter understand the reasoning behind the tree con-struction algorithm. Scheduling algorithm is notenforced until the completion of tree construction.A brief explanation of this algorithm is given here.

Communication latency in Fig. 2(b) is 8 timeunits. It can be derived as follows. Nodes B and Etransmit in the first time slot using transmissioncodes 2 and 1 respectively. Nodes C and F follow inthe second and the third time slots. D concatenatesall the data with its own data and transmits a packetof size 4 units in the fourth time slot. Therefore, thelength of time required for this communication is 8time slots. By similar calculation, latency for the treein Fig. 2(d) is 7 time units. Therefore, this algorithmimproves the DAC operation’s latency at the expenseof energy. In this example, for calculating latency, itis assumed that there is more than one CDMA codeavailable to chose from. The symbol U indicatesabsence of code or time-slot assignment.

4.3. MST based algorithm

Algorithm 5. MST Based Tree Construction

Page 10: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

8: if v 2 PQ and w(u,v) < d[v]9: Relax(MST,u,v)10:11: /*Latency Minimizing Phase*/12: AdjustTree(s)13: AdjustWeight(MST, s)

10 S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx

ARTICLE IN PRESS

Algorithm 5 is the MST based algorithm forDAC tree construction. Similar to the SPT basedalgorithm, it has two phases: (1) Energy Minimiza-tion Phase: that constructs an MST tree, and (2)Latency Minimizing Phase that tries to adjust thenumber of children a node has in accordance withb constraint.

Working of MST based tree construction algo-rithm is explained using Fig. 3. Tree resulting fromEnergy Minimizing Phase of Algorithm 5 is given byFig. 3(b). Energy consumed by this tree to performone round of DAC is 44 nJ/bit (with Eelec and Eamp

values as mentioned earlier). Fig. 3(c) of this figureis the product of AdjustTree algorithm. Fig. 3(d) isthe end result of the MST based tree constructionalgorithm. Latency due to the tree in Fig. 3(b) is 4

0

FC

7 5

E

B D

4

5

6

5

4

2 2

6

(a)

s

(1, Φ, 2) (1, Φ, 3)(c)

0

FC

7 5

E

B D

56

7 5

10 11

5

11

s (Φ, 2, Φ)

(2, Φ, 1) (2, 1, 4)

(1, Φ, 1) (1, Φ, 1) (2, Φ, 1)

(1, 1, 2)

(Φ, 1, Φ)

(d)

0

C

7 5

E

B

5

7

10

5

12

s

α = 1 β = 2Energy = 45 nJ Latency =

(1, Φ, 1)

(2, Φ, 1)

(1, Φ, 2)

(Φ, 2, Φ)

(b)

0

FC

7 5

E

B7

11 10

5

6

s

SPTEnergy = 44 nJ Latency = 8

Fig. 2. Example of SPT based algorithm. The three tuple indicate (Tindicates that no code has been assigned, and the value within each cir

time units. Imposing b-constraint with b = 2 willgive a tree whose communication latency is 3 timeunits. There is an improvement in latency to 3 timeunits with the energy trade off of 1 nJ/bit.

The AdjustTree algorithm rearranges the parentpointers of each node in the network to satisfy theb-constraint.

Note that for b P jVj and a = 0, Algorithm 5results in minimum energy for aggregating data dur-ing convergecast. That is because for the aboveassumption, AdjustTree algorithm will make nochanges to the tree constructed by Algorithm 5.The tree obtained in such a case is an MST whichensures that the sum of the weights on edges con-necting the nodes is minimum.

Note that, for 0 < a < 1, neither of the algorithmsguarantee minimum energy consumption for theDAC operation.

4.4. Combined SPT–MST algorithm

In this section, we present the combined SPT–MST algorithm which builds a DAC tree for all

BE

C D F D

D SB S

Code 2

1 2 3 4 5 6 7

Code 1

Time Slots

(f)

Transmission schedule of (d)

DE C D F D

B S D S

1 2 3 4 5 6 7 8

Code 2

Code 1

Time Slots

(2, Φ, 2)

(1, 2, 3)

F

D

6

5

11

7 units

(1, Φ, 3)

(2, 1, 4)D

6

11

units

(e)Transmission schedule of (b)

5

ransmission Code, Reception Code, Time Slot), the value of Ucle is the d[ ] value for that node.

Page 11: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

(a)

0

4

5

5

5 566

7 8

8

BC D

E F

s

(1, Φ, 1) (2, Φ, 1)

(2, Φ, 2)

(2, 1, 3)

(Φ, 1, Φ)

(1, 2, 4)

(c)

0

4

5

5 5

7

BC D

E F

4

5 5

55

s

BE C S

F C D CB C

1 2 3 4

Code 1

Code 2

Time Slots

(e)Transmission schedule of (b)

BE

F C

C S

D C

B C

Code 2

Code 1

Time Slots1 2 3 4

Transmission schedule of (d)

(f)

Energy = 45 nJLatency = 3 units

(1, Φ, 1) (2, Φ, 1)

(2, Φ, 2)

(1, 1, 2)

(Φ, 1, Φ)

(1, 2, 3)

(d)

0

4

5

5 5

7

BC D

E F

4

5 5

57

β = 2α = 0

s

(1,Φ, 1) (2, Φ, 1)

(2, Φ, 2)(2, 1, 3)

(Φ, 1, Φ)

(1, 2, 4)

(b)MST

0

4

5

5

5 5

BC D

E F

5 5

5 5

4

s

Energy = 44 nJLatency = 4 units

Fig. 3. Example of MST based algorithm. The three tuple indicate (Transmission Code, Reception Code, Time Slot).

S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx 11

ARTICLE IN PRESS

values of a. The change that is needed for SPT tooperate as the Combined SPT–MST algorithm(COM) is in the relaxation operation (see lines 12–13 of Algorithm 1). For a = 1 the relaxation opera-tion is same as that used in the original Dijkstra’sSPT algorithm and for a = 0 the relaxation opera-tion is same as the original Prim’s MST algorithm.In the following we motivate the algorithm. Webegin with the following definition:

Definition 5. Assuming path p(u,v) = {u0,u1, . . . ,ul}, u0 = u and ul = v, define

ECðpðu; vÞ; k; aÞ � Eðu0; u1; kÞ þ aEðu1; u2; kÞþ � � � þ al�1Eðul�1; ul; kÞ

¼Xl

i¼1

ai�1Eðui�1; ui; kÞ: ð11Þ

EC(p(u,v), k,a) corresponds to the energy expendedfor delivering node u’s contribution to the aggre-gated data of (its ancestor) node v along the(DAC tree) path p(u,v) assuming that the size ofdata originating at node u is k bits and the datacompression factor is (1 � a). Specifically, fora = 1 the EC( ) path metric is same as the shortest-path metric used by SPT.

COM is a greedy algorithm. At every step, it addsto the DAC tree a node which has minimum esti-mate of EC( )-value (d-value) path to a node in thepartial DAC tree. Since COM constructs an acyclicgraph which covers all the nodes in the network, itconstructs a tree. However, it should be noted thatthe DAC tree constructed by COM’s Energy Mini-mizing phase may not optimal for the intermediatevalue of a, i.e. when 0 < a < 1. However, our

Page 12: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

1: Lnew ¼ ;, time = 1

12 S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx

ARTICLE IN PRESS

simulation results show that COM’s DAC tree areenergy-efficient compared to SPT or MST tree fornon-one and non-zero value of a, respectively.

2: while L 6¼ ;3: for all u 2L4: if ðpðuÞ 6¼ sÞ ^ ðRðpðuÞÞ > 0Þ5: /* Parent of u has been

assigned code */6: @ ¼ RðpðuÞÞ7: if u 62 Cð@Þ ^ pðuÞ 62 Pð@Þ8: NodeInfoðu;@;Lnew; timeÞ9: else

10: Lnew ¼Lnew [ fug11: else

12: for all 1 6 @ 6 H13: if u 62 Cð@Þ ^ pðuÞ 62 Pð@Þ14: RðpðuÞÞ ¼ @15: NodeInfoðu;@;Lnew; timeÞ16: break /* Exit the For loop */17: if TðuÞ ¼ 018: /* Node u could not be scheduled

in the current time slot*/19: Lnew ¼Lnew [ fug20: L ¼Lnew;Lnew ¼ ;; time ¼ timeþ 1

4.5. Channel allocation

For completeness, channel allocation algorithmis presented in this section. The problem of optimalchannel allocation is NP-complete [17]. The algo-rithm presented here assigns codes with the objec-tive of avoiding collisions. The allocation ofchannels in this algorithm starts with the leaf nodesand continues along the tree until the root node isreached.

In Table 1, the symbol PðiÞ indicates the set ofnodes that cannot receive data using the code i inthe current time slot. Similarly CðiÞ is a set of nodesthat cannot transmit data using code i in the sametime slot. Stated otherwise, PðiÞ and CðiÞ indicatethe set of nodes that cannot become parent andchild, respectively, using code i in the current timeslot.

Algorithm 6. NodeInfoðu;@;Lnew; timeÞ

21: for all 1 6 @ 6 H, Cð@Þ ¼ Pð@Þ ¼ ;

TðuÞ ¼ @C(u) = time

for all v 2 Adj(u) ^ E(u,v, 1) 6 E(u,p(u),1)Pð@Þ ¼ Pð@Þ [ fvg

for all v 2 Adj(p(u)) ^ E(v,p(u),1) 6 E(v,p(v),1)Cð@Þ ¼ Cð@Þ [ fvg

if all children of u are scheduledLnew ¼Lnew [ fug

Algorithm 7 starts assigning two CDMA codesand a time slot to each node in the tree. This algo-rithm takes as input the set of leaf nodes, L, andset of CDMA codes {1, . . . ,H}. The algorithmassigns code-time slot pairs (called channels) withthe objective to avoid interference during communi-cation. While examining a node u for assignment ofcode @ in a given time slot time, the algorithmchecks two sets: (a) Set Pð@Þ for presence of p[u]and (b) set Cð@Þ for u. If either of the nodes are pres-ent in the respective sets, then the node cannot beassigned code @. The algorithm then goes on tocheck for other codes for assignment. The setsPð@Þ and Cð@Þ contain elements that cannot becomeparent node and child node respectively using code@. If a node cannot be assigned any code in a giventime slot, then that node should wait for the nexttime slot for transmission.

Algorithm 7. Channel AllocationðL; f1; . . . ;HgÞ

Motivation for constructing the sets Pð@Þ andCð@Þ is as follows: When a node is assigned a code@ during a time slot, no node in its transmissionrange can receive data using code @ in the same timeslot. Therefore, all the neighbors of the assignednode will be added to the set Pð@Þ. Similarly, whena node is receiving data using code @ in a timeslot, it should not be in the transmission range ofother nodes. The set Cð@Þ is filled using thisconstraint.

Working of this algorithm is illustrated in Fig. 3.Consider the scenario in Fig. 3(b). Node E is sched-uled for transmission in time slot 1 using code 1.Node C, which is the parent of node F, cannotreceive data using code 1 since it is in the transmit-ting range of node E. So, the algorithm assigns code2 to node F for transmission. Therefore node F willtransmit its data in the first time slot. Since node Cis receiving data using code 2, node D will use thesame code for transmission but in the next time slot.By similar reasoning node C will have a transmis-sion code 1 and reception code 2 and it will transmitits data in the fourth time slot (node B transmits toit in the third time slot).

Page 13: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

Fig. 4. Working of Pegasis.

S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx 13

ARTICLE IN PRESS

4.6. Complexity analysis

The SPT based tree construction algorithmbegins by calling Initialize(G,s). Its runningtime is OðV Þ. Algorithm 1 takes constant time forexecution. In Algorithm 4 if PQ is implemented asan array, then Extract_min operation takesOðV Þ. Since the while loop runs for OðV Þ, total num-ber of Extract_min operations are OðV 2Þ. Eachedge in the adjacency list Adj[u] is relaxed exactlyonce in the algorithm. So, Algorithm 1 is executeda total of jEj times. Thus, the running time of thealgorithm without AdjustTree, Initialize(G,s) andAdjustWeight code is OðV 2 þ EÞ. This is the runningtime of the Energy Minimizing Phase of the SPTbased tree construction algorithm.

In AdjustTree algorithm, the while loop runsexactly once for each node. The running time ofthe algorithm is same as the running time of lines8–10 which is OðV Þ. Therefore, the complexity ofAdjustTree algorithm is OðV 2Þ. AdjustWeight algo-rithm executes once for every node in the network.The for loop runs for OðbÞ times. The complexityof the AdjustWeight algorithm is OðbV Þ. Therefore,the complexity of Algorithm 4 is OðV 2 þ E þ bV Þ.

It should be noted that the OðV 2Þ is the complex-ity of AdjustTree algorithm in the worst casescenario. For every node u in the tree, entire listP(u) may not be always scanned. Moreover, notall nodes may be present in P(u). However, tightbound on the complexity of AdjustTree algorithmdoes not improve the overall complexity of Algo-rithm 4 because of the complexity of Energy Mini-

mizing Phase.The run time complexity of MST based tree con-

struction algorithm can be determined on similarlines as the SPT based algorithm. Initialize will takeOðV Þ time. The while loop runs for OðV Þ time.Extract_min operation takes OðV Þ time due toarray implementation of PQ. The for loop will runfor OðEÞ times because each edge is visited onlyonce. The AdjustTree, as stated above, will takeOðV 2Þ in worst case scenario. AdjustWeight algo-rithm will take OðbÞ time. Running time of this algo-rithm, therefore, is OðV 2 þ E þ bV Þ.

Run time complexity of NodeInfo algorithm isOðV Þ, because a node can have at most all othernodes in its adjacency list. Algorithm 7 runs at leastonce for every node in the network. If the parent ofa node is receiving on a channel, then the node willcheck if it can transmit on that channel. Line 7 per-forms this check which, in the worst case, takes

OðV Þ. If the parent of a node has decided on recep-tion channel then the node examines which CDMAcode it should choose to avoid interference. Lines12–15 performs this check which, in the worst case,takes OðV HÞ. Rest of the code takes constant time.Therefore, the runtime of the algorithm is OðV 2HÞ.

5. Simulation environment

The simulations are based on the input networkgraphs generated with varying node densities, num-ber of nodes and b value. In this work, node densityis considered as number of nodes per unit area. Theunderlying assumption in this definition is that therecannot be more than one node per unit area. Nodedensity is computed as nos: nodes

total area� 100. Therefore,

100% node density corresponds to one node per unitsquare area and 10% node density corresponds toone node per 10 unit square area. For simulations,networks with node density varying from 10% to80% in the increments of 10% are considered. Foreach node density, network with sizes varying from50 nodes to 300 nodes are generated. The value of b,an input to tree construction algorithm, is variedfrom 1 to 3. From the numerous trial graphs gener-ated, it was observed that typically, most of thenodes in MST and SPT will have no more thanthree children. Therefore increasing b greater than3 will not help attain significant latency gain.Another simulation test was performed withb > jVj. The reason for taking such inputs is toobserve the performance of the proposed algorithmon sparse and small networks to dense and largenetworks while varying b for each configuration.The number of codes (H) used is 3. The reason isthat during our trial runs, we did not see significantimprovement in the latency by increasing H beyond3. The energy model used is r2 energy model and theperformance of the proposed algorithms is testedagainst Pegasis [14] for the above inputs. Perfor-mance was measured using the following metrics:total energy consumption, latency and network life

Page 14: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

14 S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx

ARTICLE IN PRESS

time. For a given node density and network size,input data was randomly generated, and algorithmstested. This simulation was performed for 50 differ-ent random graphs (for each set of inputs) and theaverage performance was measured. Values ofparameters used in Eq. (2) are, Eelec = 50 nJ/bit,

Fig. 5. Table summarizing th

�amp=100 pJ/bit/m2. These parameters are same asthose used in [3]. Communication range of eachnode is set to 15 m. The results for lifetime areobtained for the 95% confidence interval.

The reason for choosing Pegasis for comparisonwas its network longevity and better performance

e experimental results.

Page 15: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

Fig. 6. Behavior of Pegasis, COM, MST-based and SPT-based Algorithms for a = 0%.

S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx 15

ARTICLE IN PRESS

Page 16: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

Fig. 6 (continued )

16 S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx

ARTICLE IN PRESS

Page 17: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

Fig. 7. Behavior of Pegasis, COM, MST-based and SPT-based algorithm for a = 50%.

S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx 17

ARTICLE IN PRESS

Page 18: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

Fig. 7 (continued )

18 S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx

ARTICLE IN PRESS

Page 19: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

Fig. 8. Behavior of Pegasis, COM, MST-based and SPT-based algorithm for a = 100%.

S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx 19

ARTICLE IN PRESS

Page 20: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

Fig. 8 (continued )

20 S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx

ARTICLE IN PRESS

Page 21: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx 21

ARTICLE IN PRESS

[14] – especially for a = 0 case. Pegasis is a chain-based protocol. It works by taking turns to trans-mit data to the base station. The motivation toperform such a task is to average out the energyrequired per node to transmit the data to base sta-tion. In every round a node collects the data fromall other nodes along the chain and transmits it tobase station. The designated node fuses the data ithas collected and transmits them to the base sta-

SPT

COM

PEGMST

300

400

500

600

700

800

900

1000

50 100 150 200 250 300

Rou

nds

Nodes

SPTPEG

MST

COM

0

100

200

300

400

500

600

700

50 100 150 200 250 300

Rou

nds

Nodes

COM

MST

PEGSPT

0

10

20

30

40

50

60

50 100 150 200 250 300

Rou

nds

Nodes

(a)

(c)

(e)

Fig. 9. Life Time of Pegasis, MST-based, SPT

tion. Performance of Pegasis in terms of energysaving and network longevity is shown to bemuch better than some of the existing protocols[3]. To allow efficient use of this technique, athreshold is put on the distance of the designatednode from base station. Only those nodes withinthis threshold can transmit data to base station.Working of Pegasis is shown with a simple figure(Fig. 4).

SPTPEG

MST

COM

400

600

800

1000

1200

1400

1600

50 100 150 200 250 300

Rou

nds

Nodes

SPT

PEG

COM

MST

0

200

400

600

800

1000

1200

1400

1600

50 100 150 200 250 300

Rou

nds

Nodes

COM

MST

PEG

SPT

0

200

400

600

800

1000

1200

1400

1600

50 100 150 200 250 300

Rou

nds

Nodes

(b)

(d)

(f)

-based algorithm and COM algorithms.

Page 22: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

22 S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx

ARTICLE IN PRESS

6. Results and analysis

In the following section, the terms low density

and high density refers to densities in the range of10% and 80%, respectively. The terms small network

and large network implies network size containingabout 50 nodes and 300 nodes, respectively. Theword closeness refers to the weight on the edgesand not the distance between nodes.

From the simulations conducted using variousinput data (Section 5), the following observationswere made (also see Figs. 5–9).

• For a given b, COM consumes least energy forany 0 < a < 100% when compared to all algo-rithms. However, b = 2 gives lower latency forCOM than other b values. Therefore COM withb = 2 helps in achieving low energy with lowlatency.

• MST consumes least energy when a = 0. But itsenergy consumption increases rapidly with theincrease in a. For a > 25%, MST consumes moreenergy than SPT.

• For very low values of a < 25%, Pegasis’ energyconsumption is comparable to MST’s energyconsumption. However, it is a prohibitive algo-rithm for a > 25%.

• Chain structure of Pegasis results in linear depen-dence of latency on number of nodes in thenetwork.

• For low density networks, SPT or COM are rec-ommended algorithms for latency. And it per-forms better with b = 2 or 3.

• As density of the network increases, MST’slatency outperforms other algorithms.

• Latency performance of COM is similar to SPT –good for low density networks and poor for highdensity networks.

• For a = 0, the lifetime of the network which usesMST is same as that of COM (regardless of b).Similarly, for a = 100%, lifetime of networkusing SPT is same as that of COM.

• For a = 0, and for low density networks, Pegasishas longest lifetime. But with the increase in den-sity, SPT has longer life than all the algorithmsfor smaller networks (<150 nodes). For largernetworks (>150 nodes), Pegasis has better life-time performance. This clearly indicates thateven though MST consumes least energy fora = 0, its fixed tree structure will drain out ener-gies of certain nodes quickly. Among all the three

algorithms (MST and COM are similar for a = 0)networks using MST has least life expectancy.

• As with the latency, SPT networks’ life timedepends greatly on density of the network. Den-ser the network, higher is the life time.

7. Conclusions

In this paper, we first presented two algorithms,one based on MST and the other on SPT, to solvethe problem of minimum energy data aggregationenhanced convergecast (DAC) operations in wire-less sensor networks. These algorithms were shownto be energy efficient for different extreme value ofa (data growth factor). Based on these observations,a (generalized) combined SPT–MST algorithm wasproposed which constructs DAC trees for all valuesof a. The data latency was reduced by re-structuringthe energy-efficient tree using the b-constraint. Itwas also proved that for a given tree and for b P jVjalgorithms presented here consumes least energy forvarious scenarios (MST for a = 0, SPT for a = 1,and COM for 0 6 a 6 1). The performance of thesealgorithms were then compared with the popularPegasis technique, which demonstrated superiorefficiency of our approach. A summary of the resultsis presented suggesting the appropriate algorithmsfor various scenarios of network density and datacompression factors.

Acknowledgements

The authors would like to thank the reviewers fortheir constructive comments which helped to im-prove the quality of this paper. This work was sup-ported in part by the NSF grant # ANI-0196156.

References

[1] Imrich Chlamtac, Shay Kutten, Tree-based broadcasting inmulti-hop radio networks, IEEE Transactions on ComputersC-36 (10) (1987).

[2] Imrich Chlamtac, Orly Weinstein, The wave expansionapproach to broadcasting in multi-hop radio networks,IEEE Transactions on Communications 39 (3) (1991).

[3] Wendi Rabiner Heinzelman, Anantha Chandrakasan, HariBalakrishnan, Energy-efficient communication protocol forwireless micro sensor networks, in: Proceedings of theHawaii International Conference on System Science, Janu-ary 2000.

[4] Rex Min, Anantha Chandrakasan, Energy-efficient commu-nication for ad-hoc wireless sensor networks, in: Conference

Page 23: Spanning tree based algorithms for low latency and energy ... · Spanning tree based algorithms for low latency and energy efficient data aggregation enhanced convergecast (DAC) in

S. Upadhyayula, S.K.S. Gupta / Ad Hoc Networks xxx (2006) xxx–xxx 23

ARTICLE IN PRESS

Record of the Thirty-Fifth Asilomar Conference on Signals,Systems and Computers, 2001, vol. 1, 4–7 November 2001.

[5] Sarma Upadhyayula, Valliappan Annamalai, SandeepGupta, A low-latency and energy-efficient algorithm forconvergecast in wireless sensor networks, in: IEEE GlobalCommunications Conference, 2003.

[6] Bhaskar Krishnamachari, Deborah Estrin, Stephen Wicker,Impact of data aggregation in wireless sensor networks, in:International Workshop on Distributed Event-Based Sys-tems (DEBS’02) Vienna, Austria, July 2002.

[7] Chalermek Intanagonwiwat, Deborah Estrin, RameshGovindan, John Heidemann, Impact of network density ondata aggregation in wireless sensor networks, in: Proceedingsof International Conference on Distributed ComputingSystems (ICDCS), Vienna, Austria, July 2002.

[8] Steven S. Skeina, The Algorithm Design Manual, Springer-Verlag, New York, 1997, pp. 339–342.

[9] Marek Karpinski, Alexander Zelikovsky, New Approxima-tion Algorithms for the Steiner Tree Problems, Journal ofCombinatorial Optimization 1 (1997) 47–65.

[10] H. Takahashi, A. Matsuyama, An approximate solutions forthe Steiner problem in graphs, Mathematica Japonica 6(1980) 573–577.

[11] Hans J. Promel, Angelika Steger, RNC-approximationalgorithms for the Steiner tree problems, in: Proceedings of14th Annual Symposium on Theoretical Aspects of Com-puter Science, 1997, pp. 559–570.

[12] Alexander Zelikovsky, An 11/6-approximation algorithm forthe network Steiner problem, Algorithmica 9 (1993) 463–470.

[13] Alexander Zelikovsky, Better approximation bounds for thenetwork and Euclidean Steiner tree problems, TechnicalReport CS-96-06, University of Virginia.

[14] Stephanie Lindsey, Cauligi Raghavendra, Krishna M. Siv-alingam, Data gathering algorithms in sensor networks usingenergy metrics, IEEE Transactions on Parallel and Distrib-uted Systems 13 (9) (2002).

[15] Valliappan Annamalai, Sandeep K.S. Gupta, On tree-baseconvergecasting for wireless sensor networks, in: Proceedingsof IEEE Wireless Communications and Networking Con-ference, 2003, Louisiana, USA.

[16] J.L. Gao, Analysis of energy consumption for ad hocwireless networks using bit-meter-per-joule metric, IPNProgress Report 42-150, August, 2002.

[17] Jie Chen, David Seah, Wen Xu, Channel allocation forcellular networks using heuristic methods. Available from:<http://foulard.ee.cornell.edu/wxu/projects/cs574_project.pdf>.

[18] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest,Clifford Stein, Introduction to Algorithms, second ed., MITPress, 2001.

[19] Ian F. Akyildiz, Weilian Su, Yogesh Sankarasubramaniam,Erdal Cayirci, Wireless sensor networks: a survey, ComputerNetworks 3 (2002) 393–422.

Sarma Upadhyayula received his master’sdegree in Computer Science and Engi-neering from Arizona State University,Tempe. His main research interestsinclude low power data aggregationalgorithms in wireless sensor networks(WSN) and self-stabilizing protocols.

Sandeep Kumar S. Gupta is an AssociateProfessor in the Ira A. Fulton School ofEngineering in the Department of Com-puter Science and Engineering and Ari-zona State University. He received theB.Tech degree in Computer Science andEngineering (CSE) from Institute ofTechnology, Banaras Hindu University,Varanasi, India, M.Tech. degree in CSEfrom Indian Institute of Technology,Kanpur, and M.S. and Ph.D. degree in

Computer and Information Science from The Ohio State Uni-versity, Columbus, OH. He has served at Duke University,

Durham, NC as a post-doctoral researcher; at Ohio University,Athens, OH as a Visiting Assistant Professor; and at ColoradoState University, Ft. Collins, CO as an Assistant Professor. Hiscurrent research is focused on dependable and adaptive distrib-uted systems with emphasis on wireless sensor networks, mobilecomputing, and biomedical applications. His research has beenfunded by the National Science Foundation (NSF), the Consor-tium for Embedded Systems (CES), Intel Corporation andMediServe Information Systems. He is co-author of the book‘‘Fundamentals of Mobile and Pervasive Computing’’ publishedby McGraw Hill, 2004. He has co-guest edited special issues ofIEEE Personal Communication Magazine (on Pervasive Com-puting, 2001), IEEE Transactions on Computers (on MobileComputing and Databases, 2002), ACM/Baltzer Winet (Advan-ces in Mobile Computing and Wireless Systems, 2003) and ACM/Baltzer Monet (on Pervasive Computing, 2001). He was programchair for Int’l workshop on Group Communication and a pro-gram co-chair for Int’l Workshop on Wireless Networks andMobile Computing, Int’l Workshop on Pervasive Computing(PC’00), and Future Trends in Distributed Computing Systems(FTDCS’01), Int’l Workshop on Wireless Security and Privacy(WiSPr’2003). He is a member of the ACM and a senior memberof the IEEE. He heads the IMPACT (Intelligent Mobile andPervasive Applications and Computing Technologies) Lab atArizona State University. For information about his recentresearch projects and publications visit http://impact.asu.edu.