Top Banner
AdaptSens: An Adaptive Data Collection and Storage Service for Solar-Powered Sensor networks Lili Wang, Dong Kun Noh, Yong Yang, Hieu K. Le, Tarek F. Abdelzaher and Michael Ward * Department of Computer Science ( * Department of Natural Resources and Environmental Sciences) University of Illinois at Urbana Champaign Urbana, IL 61801 Abstract— In this paper, we present AdaptSens: a reliable storage system for solar-powered sensor networks. Unlike battery- operated devices, solar-powered systems have a less predictable energy supply and their ability to harvest energy depends on past spending, thereby creating incentives for adaptive matching of energy supply and demand. Our storage system is novel in its layered architecture and its incremental layer activation mechanism. AdaptSens provides a set of functions, in separate layers, such as sensory data collection, replication (to prevent failure-induced data loss), and storage balancing (to prevent depletion-induced data loss). The mechanism utilizes surplus energy when available by activating more layers, and resorts to progressively more energy-efficient (partial hibernation) modes when energy is scarce. Best reliability is achieved when all layers are active but meaningful intermediate modes allow different degrees of energy conservation. The efficacy of AdaptSens in trading off reliability for energy is tested on an experimental platform. Evaluation results show that AdaptSens minimizes the sum of all lost data when combining the energy, storage and node failure factors. I. INTRODUCTION This paper presents a data collection and storage service, called AdaptSens, for solar-powered sensor networks. The main contribution of this service lies in adaptively trading-off energy versus reliability. The highest degree of storage reliability is achieved when energy is plentiful. When energy is scarce, reliability-related functions are incrementally turned off. The paper is novel in two respects. First, it addresses energy- adaptive file system architecture in the specific context of solar- powered sensor networks. Second, it introduces layering that leads to efficient partial hibernation modes for flexible energy adaptation. The need for adaptation arises from the lack of predictability of the energy supply in solar-powered systems. The amount of energy available depends on environmental conditions, such as weather, as well as on the conditions of the solar panels themselves (e.g., the presence of dust or other optical occlu- sions) [1] [2]. Moreover, the ability of the system to harvest energy depends on the fill level of the battery. In particular, energy cannot be harvested when the battery is full. This generates an incentive to keep batteries from becoming full, which further motivates adapting energy demand to supply. The choice of data collection and storage as the focus of adaptation in our architecture is attributed to the primary use patterns of sensor networks in current practice. While there has been a significant amount of literature that describes in- network computing paradigms and distributed sensor system abstractions, the predominant use of the network in experi- mental deployments to date has been to collect data and relay these data safely to a base-station [3] [4]. In many cases, deployments were in remote areas. Hence, connectivity to an external base-station may not always be assured. When the system is disconnected, its main function becomes to buffer (or store data) until upload opportunities arise. This is the main goal of AdaptSens. In networks such as those described above, the main application-derived value from the network lies in the data collected. A perfect system would eventually upload all sensed data. Unfortunately, three factors may cause deviations from such ideal behavior; namely, energy depletion (which results in loss of sensing ability), node storage depletion (which results in overflow-induced loss of sensed data), and node damage (which results in damage-induced data loss). A goal of AdaptSens is therefore to minimize the sum of all lost data due to the above three factors combined. In accordance with the above, two reliability-related func- tions are designed to reduce data loss. The first function is load balancing. It allows nodes with more free storage to accept data from nodes with less free storage, hence protecting against loss due to storage depletion. Load balancing comes at the cost of additional communication energy. The second function is ensuring storage redundancy. Storing redundant data on different nodes mitigates against damage-induced loss. It also requires communication energy. To prevent energy depletion in our architecture, the above reliability functions are enabled only when energy reserves are sufficiently large. Hence, AdaptSens is designed as a layered system, in which the layers are activated or deactivated depending on the energy available. It is this energy-dependent adaptation of system functionality that separates AdaptSens from previous disconnection-tolerant storage networks, such as EnviroMic [3] and EnviroStore [4]. AdaptSens tolerates disconnection by providing two work- ing (network) modes: pushing mode and disconnected mode (Figure 1). When the network cannot find a basestation, it operates in the disconnected mode, in which the data are distributed for temporary storage in an effective and reliable manner. The pushing mode is invoked when the network detects a basestation. Each node then pushes its data to the basestation proactively. Finally, AdaptSens provides a friendly (delay-tolerant) stream-oriented user interface, which allows in-network nodes to write data and the base-station to read.
9

AdaptSens: An Adaptive Data Collection and Storage Service for Solar-Powered Sensor Networks

Mar 29, 2023

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: AdaptSens: An Adaptive Data Collection and Storage Service for Solar-Powered Sensor Networks

AdaptSens: An Adaptive Data Collection andStorage Service for Solar-Powered Sensor networks

Lili Wang, Dong Kun Noh, Yong Yang, Hieu K. Le, Tarek F. Abdelzaher and Michael Ward∗Department of Computer Science (∗Department of Natural Resources and Environmental Sciences)

University of Illinois at Urbana ChampaignUrbana, IL 61801

Abstract— In this paper, we present AdaptSens: a reliablestorage system for solar-powered sensor networks. Unlike battery-operated devices, solar-powered systems have a less predictableenergy supply and their ability to harvest energy depends onpast spending, thereby creating incentives for adaptive matchingof energy supply and demand. Our storage system is novelin its layered architecture and its incremental layer activationmechanism. AdaptSens provides a set of functions, in separatelayers, such as sensory data collection, replication (to preventfailure-induced data loss), and storage balancing (to preventdepletion-induced data loss). The mechanism utilizes surplusenergy when available by activating more layers, and resorts toprogressively more energy-efficient (partial hibernation) modeswhen energy is scarce. Best reliability is achieved when all layersare active but meaningful intermediate modes allow differentdegrees of energy conservation. The efficacy of AdaptSens intrading off reliability for energy is tested on an experimentalplatform. Evaluation results show that AdaptSens minimizes thesum of all lost data when combining the energy, storage and nodefailure factors.

I. INTRODUCTION

This paper presents a data collection and storage service,called AdaptSens, for solar-powered sensor networks. The maincontribution of this service lies in adaptively trading-off energyversus reliability. The highest degree of storage reliability isachieved when energy is plentiful. When energy is scarce,reliability-related functions are incrementally turned off. Thepaper is novel in two respects. First, it addresses energy-adaptive file system architecture in the specific context of solar-powered sensor networks. Second, it introduces layering thatleads to efficient partial hibernation modes for flexible energyadaptation.

The need for adaptation arises from the lack of predictabilityof the energy supply in solar-powered systems. The amount ofenergy available depends on environmental conditions, suchas weather, as well as on the conditions of the solar panelsthemselves (e.g., the presence of dust or other optical occlu-sions) [1] [2]. Moreover, the ability of the system to harvestenergy depends on the fill level of the battery. In particular,energy cannot be harvested when the battery is full. Thisgenerates an incentive to keep batteries from becoming full,which further motivates adapting energy demand to supply.

The choice of data collection and storage as the focus ofadaptation in our architecture is attributed to the primary usepatterns of sensor networks in current practice. While therehas been a significant amount of literature that describes in-network computing paradigms and distributed sensor system

abstractions, the predominant use of the network in experi-mental deployments to date has been to collect data and relaythese data safely to a base-station [3] [4]. In many cases,deployments were in remote areas. Hence, connectivity to anexternal base-station may not always be assured. When thesystem is disconnected, its main function becomes to buffer(or store data) until upload opportunities arise. This is the maingoal of AdaptSens.

In networks such as those described above, the mainapplication-derived value from the network lies in the datacollected. A perfect system would eventually upload all senseddata. Unfortunately, three factors may cause deviations fromsuch ideal behavior; namely, energy depletion (which resultsin loss of sensing ability), node storage depletion (whichresults in overflow-induced loss of sensed data), and nodedamage (which results in damage-induced data loss). A goalof AdaptSens is therefore to minimize the sum of all lost datadue to the above three factors combined.

In accordance with the above, two reliability-related func-tions are designed to reduce data loss. The first function isload balancing. It allows nodes with more free storage toaccept data from nodes with less free storage, hence protectingagainst loss due to storage depletion. Load balancing comesat the cost of additional communication energy. The secondfunction is ensuring storage redundancy. Storing redundant dataon different nodes mitigates against damage-induced loss. Italso requires communication energy.

To prevent energy depletion in our architecture, the abovereliability functions are enabled only when energy reservesare sufficiently large. Hence, AdaptSens is designed as alayered system, in which the layers are activated or deactivateddepending on the energy available. It is this energy-dependentadaptation of system functionality that separates AdaptSensfrom previous disconnection-tolerant storage networks, suchas EnviroMic [3] and EnviroStore [4].

AdaptSens tolerates disconnection by providing two work-ing (network) modes: pushing mode and disconnected mode(Figure 1). When the network cannot find a basestation, itoperates in the disconnected mode, in which the data aredistributed for temporary storage in an effective and reliablemanner. The pushing mode is invoked when the networkdetects a basestation. Each node then pushes its data to thebasestation proactively. Finally, AdaptSens provides a friendly(delay-tolerant) stream-oriented user interface, which allowsin-network nodes to write data and the base-station to read.

Page 2: AdaptSens: An Adaptive Data Collection and Storage Service for Solar-Powered Sensor Networks

Sensor Field Sensor Field

Data

DataSensor Network Sensor Network

Basestation

pushing mode disconnected mode

No Basestation

Fig. 1. Network modes of AdaptSens

The mechanism keeps the position and organization of datawithin the network hidden from both the writers and readers.Moreover, writers do not need to worry about whether or nota reader is currently connected.

We implement AdaptSens and evaluate it on an experimentallaboratory testbed that replicates the software and hardware ofour target system deployed outdoors for acoustic monitoringof bird habitats. Unlike the outdoors system, the laboratorytestbed allows emulation of different solar conditions (at ar-bitrary latitudes and longitudes), solar panel specifications,and mounting angles. It also allows comparative studies byreplaying the same set of conditions multiple times to compareperformance of different protocols. Evaluation shows the effi-cacy of AdaptSens in reducing the total data loss compared tonon-adaptive schemes. To the authors knowledge, AdaptSenseis the only sensor network system where the functionality of astorage system is changed depending on available solar energyin a way that minimizes data loss.

The organization of this paper is as follows. Section IIdiscusses related work. In Section III, we present the design ofAdaptsens. Section IV evaluates its performance. Finally, wedraw some conclusions in Section V.

II. RELATED WORK

The lifetime of sensor nodes can be extended indefinitelyusing energy-harvesting techniques, due to the reusable natureof environmental energy [5]. Among them, Solar cells arevery popular due to their low cost and high efficiency. Muchresearch has focused on hardware design and operation ofsolar-powered nodes. For example, Vijay et al. [6] describe thekey issues and tradeoffs which arise in the design of a solar-powered wireless embedded system and present a prototypecalled Heliomote. Cesare Alippi and Cristian Galperti [7]propose a low-power maximum power point tracker (MPPT)circuit specifically designed for wireless sensor nodes to op-timally convey solar energy into rechargeable batteries. Jay etal. [8] describe a systematic approach of building micro-solarpower subsystems for wireless sensor network nodes. Giventhe popularity of solar-powered sensing systems, it becomesinteresting and timely to consider software design that allowsmaximum flexibility in exploiting the fluctuating (and lesspredictable) energy supply. AdaptSens explores the design ofsensor network storage systems, where the level of availablefunctionality varies according to the energy level.

Adaptive design is a well studied topic in sensor networks.For example, Chameleon [9] is an adaptive sensor networkcommunication architecture, designed for adapting to different

communication protocols and mechanisms as well as accom-modating typical sensor network protocols. Sora [10] presentsan approach to adapt resource allocation in sensor networks,letting individual sensor nodes be modeled as self-interestedagents that attempt to maximize their profit for performinglocal actions in response to globally-advertised price informa-tion. Flinn and Satyanarayanan [11] provide an adaptation todynamically modify the behaviors of applications to conserveenergy. Their goal is to balance energy conservation andapplication quality. ECOSystem [12] adapts applications toproportionally share the limited energy resource among them.Both of them are geared to extending life time by tradingquality of service for energy savings. FPS [13] is a distributedpower management protocol for sensor networks. It allowsadaptive scheduling and enables trade-off between energy andlatency. It combines coarse grain scheduling at the routinglayer to plan radio on/off times and fine grain medium accesscontrol to provide channel access. Avvenuti et al. [14] presentan approach to adapt the behavior of running applications byintercepting the calls made to the operating system services andchanging their effects at run-time. Kallakuri and Doboli [15]present an online control method to adapt the architecturefor saving energy and satisfying latency constraints. Theypredict processing load requirements over a finite time windowand accordingly adapt the architecture. However, they are notdesigned for solar-powered systems and thereby differ fromAdaptSens. Sorber et al. [16] present an automatic adaptationfor solar-Powered devices. It extends its previous work [17] toprovide an application adaptation policy by profiling the energycost and frequency of individual execution. It is designedfor individual single devices, while AdaptSens adapts thebehavior of nodes that compose a network. Eon [18] is anenergy-aware programming language and runtime system thatemploys adaptation for solar-powered systems. It dynamicallyadjusts the execution rate of flows and enables or disablesapplication features in response to changes in energy. It issimilar to AdaptSens in the point that it also uses energystates to associate particular control flows. Its energy adaptionis done at the application programming level, while AdaptSensconcentrates specifically on network storage services.

AdaptSens assumes a normally-disconnected operationmodel. Much previous work addressed disconnected operationin the sensor networks domain. DALi [19] is a data abstractionlayer for mobile and frequently-disconnected sensor networks.It aims at data search, naming and reduction services. In con-trast, AdatpSens is geared for a “sense and buffer” paradigmand considers reliability and storage capacity management.Previous work also addressed the design of reliable file systemsfor sensor networks [20]. It assumes a flat, distributed networkorganization devoid of a base station, encrypts data stored onlocal storage of sensor nodes, and backs it up regularly ontoneighbor nodes. However, its focus is mainly on security. Itdoes not take into account the management of network storagecapacity and energy, as AdaptSens does. EnviroStore [4] andEnviroMic [3] are distributed storage systems designed for dis-connected operation of sensor networks, aiming at maximizingthe network storage capacity. EnviroMic focuses on acoustic

2

Page 3: AdaptSens: An Adaptive Data Collection and Storage Service for Solar-Powered Sensor Networks

Colletion

Scattering File Access

Disk

ApplicationsM

y In

f o.

Res

ourc

e M

onito

r

Ne i

ghbo

r s In

fo

Wireless Network

Ada

ptS e

ns

Info. Flow

Data Flow

Func

tiona

li ty

Ad a

ptat

ion

Mod

e A

dapt

a tio

nAda

ptor

Control Flow

Functionality Set

Replication

Fig. 2. The architecture of AdaptSens

monitoring and EnviroStore provides more general storagebalancing solutions. Both of them present storage schemes.AdaptSens extends these schemes by considering solar energy,presenting a layered architecture and implementing adaptiveenergy-dependent layer activation.

III. ADAPTSENS ARCHITECTURE

The goal of AdaptSens is to provide a reliable service fordata collection and storage in solar-powered sensor networkswhose energy supply is unpredictable and frequently changing.AdaptSens is a distributed service that consists of two parts:a service component on the network and a service componenton the basestation. The role of the basestation lies primarily inpassively receiving and filing data. We will thus focus on thedesign of the network component in this section.

The architecture of (the network component of) AdaptSens isshown in Figure 2. It consists of two control modules (resourcemonitor and adaptor) and a layered structure, or functionalityset, where the set of services that AdaptSens can provideresides. Below, we elaborate on this architecture.

A. Resource MonitorThe resource monitor module is responsible for collecting

the resource information that is required for system control,including the energy and storage fill-level information of boththe local node and its neighborhood, the status of neighbornodes (awake or asleep), and the existence (or not) of a pathto the basestation. Local disk (storage) information is easy toobtain. We also measure the amount of energy available usinghardware probes of battery voltage and both charging and loadcurrent.

The resource monitor module maintains neighbor informa-tion by periodically exchanging short messages within theneighborhood. These messages, called RM messages, containboth energy and storage information. Since AdaptSens isdesigned for long-lasting outdoors operation, where neitherenergy nor storage would change dramatically in a short periodof time, this message exchange is conducted at a low frequency(e.g., once every 10 minutes). A neighbor is considered to beawake if its RM message is received regularly. On the otherhand, if a neighbor has not been in contact for a certain amount

Colletiondata stream

chunks

Application

File Access

(a) Data transform when replication layer is not acti-vated

Colletion

File Access

Replication

data stream

chunks

elements

Application

(b) Data transform when replication layer is activated

Fig. 3. Data transform in functionality set

of time (a configurable value), it is considered to be asleep(perhaps to conserve energy). A neighbor is assumed to haveawakened if its RM message is received again.

To detect the presence of a basestation, the resource monitormodule listens for a proactive application-layer broadcast fromthe basestation that announces its presence. Failure of the rout-ing layer to maintain a valid route to the basestation triggersa timeout which tells the resource monitor that the basestationhas left. We do not address security and authentication issuesin this paper as they are orthogonal to our main contributionand covered in previous work.

B. The Functionality Set

The reliability-related functionality of AdaptSens is a lay-ered set providing a collection of services, each service de-signed as a logically independent layer, as shown in Figure 2.Collectively, this set transforms the input data stream intodiscrete files stored on nodes and eventually uploaded to abasestation. The following layers are used.

1) Data Collection: The data collection layer receives aninput data stream from local sensors and divides it into datapieces, called chunks, as shown in Figure 3. Each chunk istimestamped and contains data collected in a given interval oftime. Using the collection-time timestamp makes subsequentdata organization and recovery simpler. Observe that onlyapproximate time synchronization is needed to order chunksglobally, since each chunk extends over a large time interval(e.g., minutes). The chunks are then passed to a layer below(when one is activated). A cross-layer descriptor is createdfor each chunk that includes a stream ID, a Chunk ID field,a replica number filed (default is zero), the original collectiontime of the chunk, the node ID, and the time interval covered.

The data collection layer provides a stream-oriented interfaceto user applications. The main interface function for sensornodes is append to a local file. This file is logically created in avirtual sensor network directory visible only to the basestation.

3

Page 4: AdaptSens: An Adaptive Data Collection and Storage Service for Solar-Powered Sensor Networks

Our storage system assumes that sensor network applicationsare append-only, whereas the basestation is read-only. Thissignificantly simplifies data management (e.g., consistency) inthe network. We differ from similar abstractions such as theuni-directional UNIX PIPE in that we do not actually requirethat the reader and writer be connected. The writer may operatedisconnected for long periods of time. We also do not providestrict reliability semantics. Data may be lost, for example, ifenough nodes are down. The timestamps of individual chunks(and their sizes) will allow the reader to identify gaps andreport them as errors codes when a read is executed across agap in the file on the basestation.

In principle, our system imposes no size limitations on thedata being written. This meets our design goal to treat theinput data as a continuous append stream. Hence, files simplycontinue to grow. A basestation may explicitly erase a file usinga delete primitive. It may also impose a limit on file size, inwhich case when the sensor network is “sync’ed” with thebasestation, at most the specified size of data will be stored,with more recent data erasing the oldest data.

2) Replication and Scattering Layers: Underneath the abovelayer and interface, the replication layer (when activated) isresponsible for achieving reliability by creating redundancy.Specifically, it encodes each chunk into a number of redundantpieces, called elements, as shown in Figure 3(b). Differentreliability mechanisms can be employed to create these el-ements. For example, the elements could be duplicates of achunk, which is the simplest scheme. Reliability in this caseis achieved by redundancy alone. In this paper, we use LTcodes [21] and make each element an encoded replica. Supposea chunk is divided into k elements. The encoding ensuresthat as long as (1 + ε)k (for some small ε > 0) elementsare collected by the basestation, the original chunk can berecovered in a computationally simple way. Since the encodingcomplexity is liner in LT codes, low energy consumption isincurred here. Elements created by the replication layer arethen sent to neighbors evenly by calling the interfaces providedby the file access layer, underneath. Each element has its owncross-layer descriptor with the same fields as those describedfor the chunks in the preceding section. Elements of the samechunk have unique replica numbers (stored in their cross-layer descriptor). The information contained in the descriptoris transferred along with the element when it is sent to anothernode.

The scattering layer (when activated) performs data balanc-ing in order to reduce the possibility of disk overflow, whichmay induce data loss. Different balancing mechanisms couldbe adopted here. In AdaptSens, we adopt the “in-network dataredistribution algorithm” of EnviroStore [4], to balance thefree storage space among nodes. The scattering layer readslocal data and migrates them to neighborhood by callinginterfaces provided by the file access layer. During this process,the scattering layer reads the chunk ID from the cross-layerdescriptor. It ensures that the payloads of the same chunkID are distributed to neighbors evenly. Ideally, if the numberof neighbors is no less than k (the number of elements thata chunk is encoded into by the replication layer), no two

/stream1

/2008

/April

/01t1-t2-7.datt2-t3-5.datt3-t4-8.dat

......

/02t1-t2-9.datt2-t3-7.datt3-t4-3.dat

......

......

......

......

/stream2

/AdaptSens

......

/node9...... ......

......

......

/2008

/Jan

/25t1-t2-1.datt2-t3-6.datt3-t4-7.dat

......

......

......

......

/node1 ......

......

......

Fig. 4. Data organization on a node

payloads of the same chunk ID are sent to the same node.Hence, elements of the same chunk are maximally spread out,thereby reducing chances of correlated loss.

We do not claim contribution for the protocols used bythe aforementioned replication and balancing layers, as suchprotocols have been described in past literature. What weexplore in this paper is the benefit of a layered architecturewith adaptive, energy-dependent invocations of such functions.In our architecture, replication, scattering, or both can beindependently activated or deactivated on demand.

3) File Access Layer: The most important functionality ofthis layer is to name data as files and organize them locally, aswell as to send them to and receive them from the network, asshown in Figure 2. The file access layer is the only layer thatoperates on the file system and network modules to deal withor transfer data. It provides a simple write interface to upperlayers. Besides the data, only a destination is required. It thensends data to remote nodes or saves them locally (if it is thedestination). When receiving data, the file access layer readsthe cross-layer descriptor coming with it and saves it locally.

Locally, data are organized by stream name, origin (node ID)and generation time. No understanding of raw data is needed.Figure 4 depicts the organization of files and directories on anode. The approximate collection timestamp is reflected in thefile name. The naming scheme of a file chunk or element is thustbegin− tend− index, where tbegin and tend are the beginningand end time point of the period during which data reflectedin the file were collected, index is the identifier assigned bythe replication layer, distinguishing this element from others inthe same chunk.

The index also gives a clue to chunk recovery. Given a set ofelements, we can know whether the chunk could be recoveredfrom them only by their names. For chunks, this field is leftempty for simplicity. This naming and organization schemehelps us get the basic information of a file without reading it,which simplifies design of other components, which will bediscussed in Subsection III-D.

C. Adaptor Module

1) Incremental Adaptation Mechanism: The adaptor moduleemploys an incremental adaptation mechanism to control theactivation of different layers above, according to the energystatus. This mechanism utilizes surplus energy when it isavailable by activating more layers, and resorts to progressively

4

Page 5: AdaptSens: An Adaptive Data Collection and Storage Service for Solar-Powered Sensor Networks

basic mode

reliable mode

balance mode

0% 100%Eb Er

remaining energy level

E(t)

Fig. 5. The incremental layer activation mechanism of AdaptSens

more energy-efficient (partial hibernation) modes when energyis scarce.

Obviously, the Collection layer and the File Access layershould always be on. Together, they provide the most funda-mental services such as collecting data and storing it directlyto local disk. When only these layers are activated, there is nocooperation between nodes and the system consumes the leastenergy. However, there is no reliability either. When energypermits, more layers are invoked. From the energy consumptionperspective, the replication layer costs less energy than thescattering layer. This is because the former only performs alocal action, whereas the latter performs global balancing. Tomaximize return on (energy) investment, the replication layeris given priority in using energy.

Moreover, from the perspective of ensuring reliability, thereplication layer is always necessary, since it tolerates nodefailures which may happen at any time. On the other hand,the scattering layer is needed only after a while, when thesystem has run for long time and there are nodes running outof storage. Hence, if only a limited amount of energy could beallocated for increasing reliability, the replication layer shouldbe invoked rather than the scattering layer.

As a result, AdaptSens operates in one of three modes: (i)basic mode, where only the collection layer and file accesslayer are activated, (ii) reliable mode, where the replicationlayer is also invoked, and (iii) balance mode, where all thelayers are activated. There is no mode where the scatteringlayer is enabled while replication layer is not, since it wouldnot be productive (per the discussion above).

The key idea of the incremental adaptation mechanism isthat as long as enough energy has been set aside to guaranteethe system’s survival (in basic mode) for a specified amountof time into the future, surplus energy should be used up forproviding more services.

More specifically, as shown in Figure 5, at time t, letE(t) be the local remaining energy, Eb and Er be theenergy thresholds for entering the reliable and balance mode,respectively. Let Sc denote the current working mode. Hence:If E(t) ≤ Eb, then Sc = basic modeIf E(t) > Eb and E(t) ≤ Er, then Sc = reliable modeIf E(t) > Er, then Sc = balance mode

Note that, the threshold Eb and Er can be set to be thesame in which case the system operates in either the basicmode or the maximum mode. In this paper, we choose thesethresholds to be the amounts of energy needed to maintainthe system in basic mode and reliable mode, respectively (fora configurable amount of time into the future). One might

observe a possible need for hysteresis here. This is because,once a threshold is exceeded and another layer is activated,energy consumption increases immediately, which in principlecan send the system below threshold again. In general, thisis not the case in solar-powered systems. The system typicallyexceeds a threshold when it is charged at day time after havingbeen nearly depleated at night. Since the hardware is chosensuch that daytime-collected energy is sufficient to operate itovernight as well, the charging rate usually remains larger thanthe consumption rate even when additional layers are activated.Hence, activation of such layers does not usually cause thesystem to sink below threshold. With that in mind, no hysteresisis used in our design.

The next problem to solve is how to compute Eb and Er.Before going into it, we first discuss the energy dischargingrates under both the basic and reliable modes. Under thebasic mode, since no communication is involved, the energyconsumption does not fluctuate much. Under the reliable mode,a small amount of data elements is exchanged within neigh-borhoods regularly. Since there is no burst in data migration,the energy consumption under this mode does not fluctuatemuch either. Let Rb(t) and Rr(t) denote the average energyconsumption (discharging) rates under basic and reliable modesat time t, respectively. Both of them could be obtained usinga moving average filter. Thus, AdaptSens maintains the recordof energy discharging rate and uses it to calculate the averagevalue of one mode. The longer the history record observed,the more accurate is the discharging rate obtained. The realtime discharging rate is obtained by the resource monitor aswe discuss in SectionIV.

In order to obtain Eb and Er, a configurable time periodT is introduced. At any time t, Eb = Rb(t) × T and Er

= Rr(t) × T . The underlying meaning is that if the energy,say x, can sustain the system to work under mode i with noinput energy (charging rate equals zero) for a period T oftime, x is the energy required to survive at mode i. Hence,should severe overcast prevent proper charging, for example,the system should still survive for a period T from the lasttime it was charged.

2) Network Mode Changes: The other objective of theadaptor module is to control the switching of network modeschanges (i.e., pushing mode versus disconnected mode). Aswe mentioned before, the system works in pushing mode onlywhen the basestation is available.

The adaptor module switches to pushing mode immediatelywhen the basestation is detected. In this mode, it disables alllayers except the collection and file access layers, and transmitsstored data to the basestation. Newly collected data are alsodirectly transmitted to the basestation. When the connection tothe base-station times out, the original disconnected mode isrestored.

D. Service on Basestation

The responsibility of the basestation in AdaptSens is re-ceiving and recovering data. Because the replication layerintroduces redundancy by encoding each chunk into elements,some elements become useless after enough elements have

5

Page 6: AdaptSens: An Adaptive Data Collection and Storage Service for Solar-Powered Sensor Networks

6

5

4

2

7

9

1 8

3

Fig. 6. Network topology of testbeds

been retrieved. In order to save the effort and resources ofhandling these waste elements, a scheme is adopted to clearthem, called data evaporation.

Data evaporation refers to removal of files that are nolonger needed. It could be done in either a distributed way,where each node keeps track of the elements it uploaded, or acentralized way, where the basestation informs the network toeliminate the elements it has recovered. The former is morecomplicated and incurs heavy overhead because it requiresexchanging a great deal of information within the network, andalso occupies lots of resources on nodes, such as computingand storage resources. It is also not clear when an elementneeds to be deleted when multiple basestations are present.Thus, we choose the latter mode alone in AdaptSens. Whenthe basestation starts receiving data, the receive protocol canspecify whether it operates in destructive mode or not. Areceive in destructive mode causes data recovered to be erasedfrom the network if the user has a delete right to the receivedstream. This mode is suitable when only one basestation ispresent. In this case, the basestation analyzes the names ofcollected chunks or elements to tell whether complete chunksor a sufficient number of elements have been received forrecovery. This is very lightweight because of our namingscheme. The basestation periodically updates the network withthe names of recoverable chunks. All related files are thendeleted from the network. If more than one basestation ispresent, it is up to the user when data should be deleted. Todelete data a delete primitive should be executed on one of thebasestations. The primitive takes a timestamp and stream asinput. The timestamp is flooded through the network. Specifieddata with prior timestamps are deleted if the user has a deleteright to that stream.

IV. EVALUATION

A. Testbeds

We built both an outdoor solar-powered system and an in-doors testbed to experiment with protocols being deployed. Theoutdoors system features an acoustic monitoring application.The indoors testbed replicates both the hardware and softwareon that system to provide a faithful laboratory set up thathelps understand protocol performance before protocols areused with the actual application. Both systems consist of ninenodes and have the same topology, shown in Figure 6. In the

Node Microphone Solar panels

(a) A node of indoor testbed

Solar Panels

(2 105-Watt)

Battery

(12V 105AH Sealed Gel Battery)

Charging Controller(12 Amp 3-stage)

Load Controller(DC load Controller )

Energy Tracker

Sensor System

Solar-Energy Harvesting System

Phidget Voltage SensorPhiget Current Sensor

Info./ControlPower

Info.

Info.

Info.

Control

Control

(b) Architecture of outdoor testbed

Fig. 7. The outdoor testbed for AdaptSens

laboratory version, this topology is created artificially since allnodes are in the same broadcast domain.

Note that, in a departure from much of the sensor networkliterature, which focuses on applications of very low-enddevices, such as MicaZ motes, our system is geared for a high-performance acoustic sensing application. The purpose of thesystem is to record bird vocalizations for environmental andecological research addressing bird populations, behavior, andinteraction with their environment. High-fidelity microphonesare used that sample sound at a high-enough rate to includeharmonics that allow not only recognition of the species ofbirds, but also recognition of the individual member (the actualbird) performing a vocalization. An embedded PC is neededto process and store data at that rate.

In the outdoor system (Figure 7), each node is powered byone 12 Volt deep cycle battery (DEKA 8G31) with capacityof 105 AH. A set of two solar panels are used on each nodeto charge the battery, and the output of each panel is rated as120 Watts. In order to avoid overcharging the battery, a chargecontroller (Xantrex C35 in charge control mode) is used toregulate the output voltage and current of the panels down towhat the battery needs at the time. The whole system drawspower from the battery, with a load controller (Xantrex C35 inload control mode) located between the battery and the node,which disconnects the circuit when the battery is nearly empty.We use an Asus EEE PC as the computing box, which isequipped with an Intel 900 MHz CPU, 1GB DDR2, 20GBsolid state disk and runs Linux. It consumes only about 16

6

Page 7: AdaptSens: An Adaptive Data Collection and Storage Service for Solar-Powered Sensor Networks

(a) The indoor testbed

Amount of the Consumed Energy

by the Node(Using Current

Sensor)

Amount of the Harvested Energy

From the Solar Panel(Using Solar Emulator)

Update The Amount

of Energy in the

Battery

Turn Off ?

Turn On ?

No

Yes

No

Yes

Set Node to "Turn On"

Set Node to "Turn Off"

Remainedenergy < THs

Periodic Execution

Sens

or N

ode

Simulator for Solar-Powered System

Remained Energy ≥ THw

X10 Controller

X10 Controller

(b) Architecture of indoor testbed

Fig. 8. The indoor testbed for AdaptSens

Watts under moderate load and 24 Watts when heavily loaded.We use a stand-alone wireless radio (Linksys WRT54GL) toprovide the communication. It consumes 6 Watts and supportthird-party firmware, which allow us to program the router.

The indoor testbed, as shown in Figure 8, has exactly thesame computing and communication devices as the outdoortestbed, except that the solar panel is emulated. The charge rateis computed according to a solar energy model [22] that acceptsas input the latitude, longitude and the emulated weatherconditions. The discharge rate is read from the hardwarecurrent sensor on each node as on the real system. Based on thedischarge and charge rates, the residual energy in the battery ofeach node is calculated. The emulator disconnects the powersupply from a testbed node if its emulated battery approachesempty status. It connects the power back when the batteryreceives enough energy again. This automatic control of ACpower is done by a PC through X10 modules, which implementPC-controlled on-off electric switches. In our system, we usetwo thresholds, THs and THw , to decide when to disconnectand reconnect to the power supply, respectively.

In the outdoor system, the remaining capacity of a batteryis approximately estimated as a function of its voltage. Thevoltage of our 12V battery decreases to 10.6V when heavilydepleted and becomes 14V when fully charged. We use aPhidget precision voltage sensor with a resolution of 0.1V [23],

wired in parallel with the battery to measure the voltage.Moreover, we use a Phidget current sensor [23] in seriesbetween the Charge Controller and the battery to measure it.Both the voltage sensor and the current sensor are connected toa Phidget InterfaceKit [23], which converts the analog readingsof the sensors to digital and then feeds them to the node’scomputing device through a USB port. A callback function iscalled when there is a change in the sensor reading. It recordsthis new reading together with a time stamp into a log file.

Since the energy harvested from solar panels greatly dependson the weather, experiments done on the outdoor systemcannot be repeated and performance of different protocolscannot be compared. Hence, in our evaluation, we compare theperformance of different mechanisms on the indoor testbed.This testbed allows reproducing the same emulated weatherconditions at the actual longitude and latitude of the originalsystem, hence leading to repeatable experiments. Anotherimportant advantage of having an indoor testbed lies in itsflexibility to set solar conditions and locations, although wedo not take advantage of such flexibility in the followingevaluation.

B. Performance evaluation

We consider a scenario where each node runs an acousticdata collection application. Since different nodes in the out-doors testbed will likely be subjected to different amountsof acoustic input (depending on whether they are placed inquiet or noisy areas), we artificially set the data input rateto a different value at different nodes. For example, in ourapplication where environmental scientists collect the wildbirds’ calls in a field, there are several trees in the deploymentarea and nodes closer to the trees have more data to store (therest being discarded as white noise).

Each node is assigned a data rate randomly and the datainput rate of the network in all is 450KB/s. Each node has adisk space of 16GB. There is also a basesattion retrieving dataevery 3.5 days when around 90% of network storage space isconsumed. In order to emulate the situation in which the systemhas been running for a long time, the initial energy level ofnodes is uniformly distributed in the range of [20%, 100%].

In the following, we compare the performance of AdaptSensand four non-adaptive schemes that include all the otherpossible combinations of layers. In the figures below, C, R andS represent the collection layer, replication layer and scatteringlayer, respectively. Hence, With C, With C+R and With C+R+Srepresent the basic mode, reliable mode and balance mode,respectively. Each round of experiments runs for 7 days. Thetime parameter T that controls the thresholds between modeswitches is set to be 32 hours.

We first observe the system’s up time with AdaptSens.Figure 9 demonstrates the change of energy on the node withthe lowest initial supply. When only the collection layer isemployed, the energy level keeps increasing because the energygained is more than that consumed. If the scattering layeris activated too, the energy harvested can not compensatefor consumption and the energy level decreases. In the casethat all three layers are on (which obviously consumes the

7

Page 8: AdaptSens: An Adaptive Data Collection and Storage Service for Solar-Powered Sensor Networks

0 day1 day2 day3 day4 day5 day6 day710

15

20

25

30

35

40

45

50

Time (day)

Rem

aini

ng e

nerg

y le

vel (

%)

With CWith C+RWith C+SWith C+R+SWith AdaptSens

Fig. 9. The change of energy level on the node with initial energy of 20%

With CWith C+S

With C+R+SWith AdaptSens

With C+R

01000

20003000

40005000

0

1

2

3

4

5

6

7

8

Time (min)

Num

ber

of n

odes

out

of d

isk

Fig. 10. The number of nodes out of storage space over time

most energy), there are five nights in which the node shutsdown, leading to high data loss. On the contrary, if AdaptSensis employed, the system never shuts down. This shows thatAdaptSens is effective at preventing blackouts. The question isat what cost that is attained in terms of depletion-induced anddamage-induced data loss?

To answer the above question, we first study the performanceof AdaptSens in relieving storage depletion-induced data loss.We compare the number of nodes that run out of disk in thefirst 3.5 days (around 5000 min), before the basestation comesin to collect data. As shown in Figure 10, AdaptSens causesno nodes to run out of disk space during this period of time.On the other hand, storage depletion occurs at some nodes inall cases where the scattering layer is not activated. In the caseof the collection layer alone, data loss occurs at as early as1767 min and 7 nodes can not accept data towards the end.The replication layer, despite increasing the data volume, stillalleviates depletion-induced data loss to some extent becauseof data spreading within a neighborhood. However, data stillstarts getting lost at around 4520 min.

Next, we explore the susceptibility of AdaptSens to nodefailure-induced data loss in Figure 11. In this experiment,

1 2 3 40

0.2

0.4

0.6

0.8

1

Amount of nodes failed

Rec

over

y ra

tio

C C+R C+S C+R+S AdaptSens

Fig. 11. The data recovery ratio in random attacks

With C

With C+R

With C+S

With C+R+S

With AdaptSens

none

1

2

3

4

0

0.5

1

1.5

2

2.5

3

x 108

Number of nodes failed

Dat

a su

rviv

ed in

ran

dom

failu

res

(KB

)

Fig. 12. The amount of data survived in random attacks

an increasing number of nodes are randomly turned off toemulate failure (where their data cannot be retrieved). It is notunreasonable that many nodes might go down in a short time.For example, in a recent historic cold wave affecting centralIllinois, temperature in the deployment area dropped to −25degrees Celsius (−13 degree Fahrenheit), which was outsidethe recommended range for several components, causing nodecrashes and data loss. On the indoors testbed, we measure theratio of the amount of data that could be recovered to theoriginal total amount of data collected in network, called therecovery ratio. As demonstrated in Figure 11, the replicationlayer helps recover a lot more data when activated. Therecovered data are further increased if the scattering layeris also activated because it migrates the encoded elementsglobally in the network, not limited to a neighborhood. Thereliability achieved by AdaptSens is between that achieved inthe reliable mode and that in the balance mode alone. This isthe cost paid by adaptation. In the following, however, we showthat overall AdaptSens comes ahead when the total amount of

8

Page 9: AdaptSens: An Adaptive Data Collection and Storage Service for Solar-Powered Sensor Networks

With data evaporationWithout data evaporation

0.10.2

0.30.4

0.50.6

0.70.8

0.91.0

0

0.02

0.04

0.06

0.08

Data uploaded / total data

Was

te d

ata

/tota

l dat

a

Fig. 13. The amount of waste data with different amounts of data uploaded

data loss is compared regardless of cause.In Figure 12, we compare the sum of all the three types

of data loss, discussed above, observed over a 7 day period.As the figure shows, AdaptSens collects the most data. This isbecause neither energy depletion nor storage deletion happensto AdaptSens, while the other four mechanisms suffer variousdegrees of data loss due to these factors. Interestingly, forexample, even in the case where 4 nodes fail, the total amountof data collected by AdaptSens is still 3.45% more than thatcollected in the reliable mode alone, whose performance is thebest among the other three. Other combinations achieve morethan 100% improvements.

Finally we evaluate the effect of data evaporation by study-ing the amount of waste data after the basestation leaves(Figure 13). First, we let the basestation collect data withoutevaporation (i.e., in non-destructive mode). The amount ofwaste data increases sharply. In contrast, when data evaporationis employed, the amount of waste data keeps stable no matterhow much data has been uploaded. By employing the dataevaporation scheme, AdaptSens frees storage space, bandwidthand energy.

V. CONCLUSION

In this paper, we presented AdaptSens, a reliable datacollection and storage service for solar-powered sensor net-works whose energy supply is difficult to predict and whereconnection to basestation can not be assured. In order to makethe best use of data upload opportunities, AdatpSens supportstwo working modes: a pushing mode and a disconnectedmode. It controls the switching between nodes according tothe availability of basestations. To make a tradeoff betweenenergy and reliability, AdaptSens provides a set of layers andemploys an incremental activation mechanism to invoke themaccording to the system energy level. Besides the basic datacollection functionality, AdaptSens includes a layer to provideredundant data storage and a layer for balancing data within thenetwork to help tolerate failure-induced and depletion-induced

data loss, respectively. We evaluated AdaptSens on an indoortestbed that emulates an outdoor scenario on target hardware.Evaluation results show that AdaptSens minimizes the sum ofall lost data when combining the energy, storage and nodefailure factors.

REFERENCES

[1] T. Voigt, H. Ritter, and J. Schiller, “Utilizing solar power in wirelesssensor networks,” in Proceedings of the 28th Annual IEEE Internationalconference on local computer networks (LCN), 2003.

[2] P. Corke, P. Valencia, and P. Sikka, “long-duration solar-powered wirelesssensor networks,” in The Workshop on Embedded Networked Sen-sors(EmNets), 2007.

[3] L. Luo, Q. Cao, C. Huang, T. Abdelzaher, J. A. Stankovic, and Michael-Ward, “Enviromic: towards cooperative storage and retrieval in audiosensor networks,” in ICDCS, 2007.

[4] L. Luo, C. Huang, T. Abdelzaher, and J. Stankovic, “Envirostore: a co-operative storage system for disconnected operation in sensor networks,”in INFOCOM, 2007.

[5] S. Roundry, B. Otis, Y. H. Chee, J. Rabaey, and P. Wright, “A 1.9GHzRF transmit beacon using environmentally scanenged energy,” in The In-ternational Symposium on Low Power Electronics and Design (ISLPED),2003.

[6] V. Raghunathan, A. Kansal, J. Hsu, J. Friedman, and M. Srivastava,“Design considerations for solar energy harvesting wireless embeddedsystems,” in IPSN/SPOTS, 2005.

[7] C. Alippi and C. Galperti, “An adaptive system for optimal solar energyharvesting in wireless sensor network nodes,” in IEEE TRANSACTIONSON CIRCUITS AND SYSTEMS, 2008.

[8] J. Taneja, J. Jeong, and D. Culler, “Design, modeling, and capacityplanning for micro-solar power sensor networks,” in IPSN, 2008.

[9] A. Dunkels, F. Osterlind, and Z. He, “An adaptive communicationarchitecture for wireless sensor networks,” in Sensys, 2007.

[10] G. Mainland, D. C. Parkes, and M. Welsh, “Decentralized, adaptiveresource allocation for sensor networks,” in Proceedings of the 2ndconference on Symposium on Networked Systems Design and Implemen-tation, 2005.

[11] J. FLINN and M. SATYANARAYANAN, “Managing battery lifetimewith energy-aware adaptation,” ACM Transactions on Computer Systems(TOCS), 2004.

[12] H. Zeng, C. S. Ellis, A. R. Lebeck, and A. Vahdat, “Ecosystem: Managingenergy as a first class operating system resource,” in Proceedings of theTenth international conference on architectural support for programminglanguages and operating systems, 2002.

[13] B. Hohlt, L. Doherty, and E. Brewer, “Flexible power scheduling forsensor networks,” in IPSN, April 2004.

[14] M. Avvenuti, P. Corsini, P. Masci, and A. Vecchio, “An applicationadaptation layer for wireless sensor networks,” Pervasive and MobileComputing, vol. 3, pp. 413–438, 2007.

[15] S. Kallakuri and A. Doboli, “Energy conscious online architectureadaptation for varying latency constraints in sensor network applications,”in The International Conference on Hardware-Software Codesign andSystem Synthesis (CODES+ISSS), September 2005.

[16] J. Sorber, A. Kostadinov, M. Brennan, M. Corner, and E. Berger, “eflux:Simple automatic adaptation for environmentally powered devices,” inProceedings of the Seventh IEEE Workshop on Mobile ComputingSystems and Applications (WMCSA), 2006.

[17] B. Burns, K. Grimaldi, A. Kostadinov, E. D. Berger, and M. D. Cor-ner, “Flux: A language for programming high-performance servers,” inUSENIX Technical Conference, 2006.

[18] J. Sorber, A. Kostadinov, M. Garber, and M. Brennan, “Eon: A languageand runtime system for perpetual systems,” in SenSys, 2007.

[19] C. M. Sadler and M. Martonosi, “Dali: A communication-centric dataabstraction layer for energy-constrained devices in mobile sensor net-works,” in Mobisys, 2007.

[20] N. Bhatnagar and E. L. Miller, “Designing a secure reliable file sys-tem for sensor networks,” in ACM workshop on Storage security andsurvivability, 2007.

[21] M. Luby, “Lt codes,” in IEEE Symposium on the Foundations ofComputer Science (FOCS), 2002.

[22] R. L. Bras, “Hydrology: An introduction to hydrologic science,” Addison-Wesley, 1990.

[23] Http://www.phidgets.com/.

9