Chapter 6
Optimization Approaches in Distributed Embedded Wireless Sensor Networks*

Embedded wireless sensor networks (EWSNs) are distributed embedded systems consisting of embedded sensor nodes with attached sensors to sense data about a phenomenon and communicate with neighboring sensor nodes over wireless links (we refer to wireless sensor networks (WSNs) as EWSNs since sensor nodes are embedded in the physical environment/system). Due to advancements in silicon technology, micro-electro-mechanical systems (MEMS), wireless communications, computer networking, and digital electronics, distributed EWSNs have been proliferating in a wide variety of application domains. These application domains include military, health, ecology, environment, industrial automation, civil engineering, and medical, to name a few. This wide application diversity combined with complex embedded sensor node architectures, functionality requirements, and highly constrained and harsh operating environments makes EWSN design very challenging.

One critical EWSN design challenge involves meeting application requirements such as lifetime, reliability, throughput, and delay (responsiveness) for a myriad of application domains. Furthermore, EWSN applications tend to have competing requirements, which exacerbate design challenges. For example, a high-priority security/defense system may have both high responsiveness and long lifetime requirements. The mechanisms needed for high responsiveness typically drain battery life quickly, thus making long lifetime difficult to achieve given limited energy reserves.

Commercial off-the-shelf (COTS) embedded sensor nodes have difficulty in meeting application requirements because of the generic design traits necessary for wide application diversity. COTS sensor nodes are mass-produced to optimize cost and are not specialized for any particular application. Fortunately, COTS sensor nodes contain tunable parameters (e.g., processor voltage and frequency, sensing frequency) whose values can be specialized to meet application requirements. However, optimizing these tunable parameters is left to the application designer.

Optimization techniques at different design levels (e.g., sensor node hardware and software, data link layer, routing, operating system (OS)) assist designers in meeting application requirements. EWSN optimization techniques can be generally categorized as static or dynamic. Static optimizations optimize an EWSN at deployment time and remain fixed for the EWSN's lifetime. These optimizations are suitable for stable/predictable applications, whereas they are inflexible and do not adapt to the changing application requirements and environmental stimuli. Dynamic optimizations provide more flexibility by continuously optimizing an EWSN/embedded sensor node during runtime, providing better adaptation to changing application requirements and actual environmental stimuli.

This chapter introduces distributed EWSNs from an optimization perspective and explores optimization strategies employed in EWSNs at different design levels to meet application requirements as summarized in Table 6.1. We present a typical WSN architecture and architectural-level optimizations in Section 6.1. We describe sensor node component-level optimizations and tunable parameters in Section 6.2. Next, we discuss data link-level medium access control (MAC) optimizations and network-level routing optimizations in Sections 6.3 and 6.4, respectively, and OS-level optimizations in Section 6.5. After presenting these optimization techniques, we focus on dynamic optimizations for WSNs. There exists much previous work on dynamic optimizations (e.g., [185–188]), but most previous work targets the processor or cache subsystem in computing systems. WSN dynamic optimizations present additional challenges because of a unique design space, stringent design constraints, and varying operating environments. We discuss the current state of the art in dynamic optimization techniques in Section 6.6. Finally, Section 6.7 concludes the chapter.

Table 6.1 EWSN optimizations at different design levels

Design level Optimizations
Architecture level Bridging, sensor web, tunneling
Component level Parameter-tuning (e.g., processor voltage and frequency, sensing frequency)
Data link-level Load balancing and throughput, power/energy
Network level Query dissemination, data aggregation, real-time, network topology, resource adaptive, dynamic network reprogramming
Operating system level Event-driven, dynamic power management, fault-tolerance

6.1 Architecture-Level Optimizations

Figure 6.1 shows an integrated EWSN architecture (i.e., an EWSN integrated with external networks). Embedded sensor nodes are distributed in a sensor field to observe a phenomenon of interest (i.e., environment, vehicle, object). Embedded sensor nodes in the sensor field form an ad hoc wireless network and transmit the sensed information (data or statistics) gathered via attached sensors about the observed phenomenon to a base station or sink node. The sink node relays the collected data to the remote requester (user) via an arbitrary computer communication network such as a gateway and the associated communication network. Since different applications require different communication network infrastructures to efficiently transfer sensed data, EWSN designers can optimize the communication architecture by determining the appropriate topology (number and distribution of embedded sensor nodes within the EWSN) and the communication infrastructure (e.g., gateway nodes) to meet the application's requirements.

c06f001

Figure 6.1 Embedded wireless sensor network architecture

An infrastructure-level optimization called bridging facilitates the transfer of sensed data to remote requesters residing at different locations by connecting the EWSN to external networks such as Internet, cellular, and satellite networks. Bridging can be accomplished by overlaying a sensor network with portions of the IP network where gateway nodes encapsulate sensor node packets with transmission control protocol or user datagram protocol/Internet protocol (TCP/IP or UDP/IP).

Since embedded sensor nodes can be integrated with the Internet via bridging, this EWSN–Internet integration can be exploited to form a sensor web. In a sensor web, embedded sensor nodes form a web view where data repositories, sensors, and image devices are discoverable, accessible, and controllable via the World Wide Web (WWW). The sensor web can use service-oriented architectures (SoAs) or sensor web enablement (SWE) standards [189]. SoAs leverage extensible markup language (XML) and simple object access protocol (SOAP) standards to describe, discover, and invoke services from heterogeneous platforms. SWE is defined by the OpenGIS Consortium (OGC) and consists of specifications describing sensor data collection and web notification services. An example application for a sensor web may consist of a client using EWSN information via sensor web queries. The client receives responses either from real-time sensors registered in the sensor web or from the existing data in the sensor data base repository. In this application, clients can use EWSN services without knowledge of the actual embedded sensor nodes' locations.

Another EWSN architectural optimization is tunneling. Tunneling connects two EWSNs by passing Internet work communication through a gateway node that acts as an EWSN extension and connects to an intermediate IP network. Tunneling enables construction of large virtual EWSNs using smaller EWSNs [190].

6.2 Sensor Node Component-Level Optimizations

COTS sensor nodes provide optimization opportunities at the component level via tunable parameters (e.g., processor voltage and frequency, sensing frequency, duty cycle), whose values can be specialized to meet varying application requirements. Figure 6.2 depicts a sensor node's main components such as a power unit, storage unit, sensing unit, processing unit, and transceiver unit along with potential tunable parameters associated with each component [190]. In this section, we discuss these components and the associated tunable parameters.

c06f002

Figure 6.2 Embedded sensor node architecture with tunable parameters

6.2.1 Sensing Unit

The sensing unit senses the phenomenon of interest using sensors and an analog-to-digital converter (ADC). The sensing unit can contain a variety of sensors depending upon an EWSN application since there are sensors for virtually every physical quantity (e.g., weight, electric current, voltage, temperature, velocity, and acceleration). A sensor's construction can exploit a variety of physical effects including the law of induction (voltage generation in an electric field) and photoelectric effects. Recent advances in EWSNs can be attributed to the large variety of available sensors. ADCs convert the analog signals produced by sensors to digital signals, which serve as input to the processing unit.

The sensing unit's tunable parameters can control power consumption by changing the sensing frequency and the speed-resolution product of the ADC. Sensing frequency can be tuned to provide constant sensing, periodic sensing, and/or sporadic sensing. In constant sensing, sensors sense continuously and sensing frequency is limited only by the sensor hardware's design capabilities. Periodic sensing consumes less power than constant sensing because periodic sensing is duty cycle based where the sensor node takes readings after every c06-math-0001 seconds. Sporadic sensing consumes less power than periodic sensing because sporadic sensing is typically event-triggered by either external (e.g., environment) or internal (e.g., OS-based or hardware-based) interrupts. The speed-resolution product of the ADC can be tuned to provide high speed-resolution with higher power consumption (e.g., seismic sensors use 24-bit converters with a conversion rate on the order of thousands of samples per second) or low speed-resolution with lower power consumption.

6.2.2 Processing Unit

The processing unit consists of a processor (e.g., Intel's StrongARM [191], Atmel's AVR [192]) whose main tasks include controlling sensors, gathering and processing sensed data, executing EWSN applications, and managing communication protocols and algorithms in conjunction with the OS. The processor's tunable parameters include processor voltage and frequency, which can be specialized to meet power budget and throughput requirements. The processor can also switch among different operating modes (e.g., active, idle, sleep) to conserve energy. For example, the Intel's StrongARM consumes 75 mW in idle mode, 0.16 mW in sleep mode, and 240 and 400 mW in active mode while operating at 133 and 206 MHz, respectively.

6.2.3 Transceiver Unit

The transceiver unit consists of a radio (transceiver) and an antenna, and is responsible for communicating with neighboring sensor nodes. The transceiver unit's tunable parameters include modulation scheme, data rate, transmit power, and duty cycle. The radio contains different operating modes (e.g., transmit, receive, idle, and sleep) for power management purposes. The sleep state provides the lowest power consumption, but switching from the sleep state to the transmit state consumes a large amount of power. The power-saving modes (e.g., idle, sleep) are characterized by their power consumption and latency overhead (time to switch to transmit or receive modes). Power consumption in the transceiver unit also depends on the distance to the neighboring sensor nodes and transmission interferences (e.g., solar flare, radiation, channel noise).

6.2.4 Storage Unit

Sensor nodes contain a storage unit for temporary data storage when immediate data transmission is not always possible due to hardware failures, environmental conditions, physical layer jamming, and energy reserves. A sensor node's storage unit typically consists of Flash and static random access memory (SRAM). Flash is used for persistent storage of application code and text segments, whereas SRAM is for runtime data storage. One potential optimization uses an extremely low-frequency (ELF) Flash file system, which is specifically adapted for sensor node data logging and operating environmental conditions. Storage unit optimization challenges include power conservation and memory resources (limited data and program memory, e.g., the MICA2 sensor node contains only 4 KB of data memory (SRAM) and 128 KB of program memory (Flash)).

6.2.5 Actuator Unit

The actuator unit consists of actuators (e.g., mobilizer, camera pan tilt), which enhance the sensing task. Actuators open/close a switch/relay to control functions such as camera or antenna orientation and repositioning sensors. Actuators, in contrast to sensors which only sense a phenomenon, typically affect the operating environment by opening a valve, emitting sound, or physically moving the sensor node. The actuator unit's tunable parameter is actuator frequency, which can be adjusted according to application requirements.

6.2.6 Location Finding Unit

The location finding unit determines a sensor node's location. Depending on the application requirements and available resources, the location finding unit can be either global positioning system (GPS) based or ad hoc positioning system (APS) based. The GPS-based location finding unit is highly accurate, but has high monetary cost and requires direct line of sight between the sensor node and satellites. The APS-based location finding unit determines a sensor node's position with respect to landmarks. Landmarks are typically GPS-based position-aware sensor nodes, and landmark information is propagated in a multiple-hop manner. A sensor node in direct communication with a landmark estimates its distance from a landmark based on the received signal strength. A sensor node two hops away from a landmark estimates its distance from the landmark using message propagation of the distance estimate of the sensor node one hop away from the landmark. When a sensor node has distance estimates to three or more landmarks, the sensor node computes its own position as a centroid of the landmarks.

6.2.7 Power Unit

The power unit supplies power to a sensor node and determines a sensor node's lifetime. The power unit consists of a battery and a DC–DC converter. The electrode material and the diffusion rate of the electrolyte's active material affect the battery capacity. The DC–DC converter provides a constant supply voltage to the sensor node.

6.3 Data Link-Level Medium Access Control Optimizations

Data link-level MAC manages the shared wireless channel and establishes data communication links between embedded sensor nodes in an EWSN. Traditional MAC schemes emphasize high quality of service (QoS) [193] or bandwidth efficiency [194, 195]; however, EWSN platforms have different priorities [196], thus inhibiting the straightforward adoption of the existing MAC protocols [197]. For example, since EWSN lifetime is typically an important application requirement and batteries are not easily interchangeable/rechargeable, energy consumption is a primary design constraint for EWSNs. Similarly, since the network infrastructure is subject to change because of dying nodes, self-organization and failure recovery are important. To meet application requirements, EWSN designers tune MAC layer protocol parameters (e.g., channel access schedule, message size, duty cycle, and receiver power-off). This section discusses MAC protocols for EWSNs with reference to their tunable parameters and optimization objectives.

6.3.1 Load Balancing and Throughput Optimizations

MAC layer protocols can adjust wireless channel slot allocation to optimize throughput while maintaining the traffic load balance between sensor nodes. A fairness index measures load balancing or the uniformity of packets delivered to the sink node from all the senders. For the perfectly uniform case (ideal load balance), the fairness index is 1. MAC layer protocols that adjust channel slot allocation for load balancing and throughput optimizations include Traffic-Adaptive Medium Access (TRAMA) protocol [198], Berkeley Media Access Control (B-MAC) [199], and Zebra MAC (Z-MAC) [200].

TRAMA is a MAC protocol that adjusts channel time slot allocation to achieve load balancing while focusing on providing collision-free medium access. TRAMA divides the channel access into random and scheduled access periods and aims to increase the utilization of the scheduled access period using time division multiple access (TDMA). TRAMA calculates a message-digest algorithm 5 (MD5) hash for every one-hop and two-hop neighboring sensor nodes to determine a node's priority. Experiments comparing TRAMA with both contention-based protocols (IEEE 802.11 and sensor-MAC (S-MAC) [201]) and a scheduled-based protocol (node-activation multiple access (NAMA) [202]) revealed that TRAMA achieved higher throughput than contention-based protocols and a comparable throughput with NAMA [203].

B-MAC is a carrier sense MAC protocol for EWSNs. B-MAC adjusts the duty cycle and time slot allocation for throughput optimization and high channel utilization. B-MAC supports on-the-fly reconfiguration of the MAC backoff strategy for performance (e.g., throughput, latency, power conservation) optimization. Results from B-MAC and S-MAC implementations on TinyOS using MICA2 motes indicated that B-MAC outperformed S-MAC by 3.5 c06-math-0002 on average [199]. No sensor node was allocated more than 15% additional bandwidth as compared with other nodes, thus ensuring fairness (load balancing).

Z-MAC is a hybrid MAC protocol that combines the strengths of TDMA and carrier sense multiple access (CSMA) and offsets their weaknesses. Z-MAC allocates time slots at sensor node deployment time by using an efficient channel scheduling algorithm to optimize throughput, but this mechanism requires high initial overhead. A time slot's owner is the sensor node allocated to that time slot, and all other nodes are called non-owners of that time slot. Multiple owners are possible for a given time slot because Z-MAC allows any two sensor nodes beyond their two-hop neighborhoods to own the same time slot. Unlike TDMA, a sensor node may transmit during any time slot, but slot owners have a higher priority. Experimental results from Z-MAC implementation on both nsc06-math-00032 and TinyOS/MICA2 indicated that Z-MAC performed better than B-MAC under medium-to-high contention, but exhibited worse performance than B-MAC under low contention (inherits from TDMA-based channel access). The fairness index of Z-MAC was between 0.7 and 1, whereas that of B-MAC was between 0.2 and 0.3 for a large number of senders [200].

6.3.2 Power/Energy Optimizations

MAC layer protocols can adapt their transceiver operating modes (e.g., sleep, on, and off) and duty cycle for reduced power and/or energy consumption. MAC layer protocols that adjust duty cycle for power/energy optimization include power aware multi-access with signaling (PAMAS) [190, 204], S-MAC [201], timeout-MAC (T-MAC) [205], and B-MAC.

PAMAS is a MAC layer protocol for EWSNs that adjusts the duty cycle to minimize radio on time and optimize power consumption. PAMAS uses separate data and control channels (the control channel manages the request to send/clear to send (RTS/CTS) signals or the receiver busy tone). If a sensor node receives an RTS message on the signaling channel while the sensor node is receiving a message on the data channel, then the sensor node responds with a busy tone on the signaling channel. This mechanism avoids collisions and results in energy savings. The PAMAS protocol powers off the receiver if either the transmit message queue is empty and the node's neighbor is transmitting or the transmit message queue is not empty but at least one neighbor is transmitting and one neighbor is receiving. EWSN simulations with 10–20 sensor nodes with 512-byte data packets, 32-byte RTS/CTS packets, and 64-byte busy tone signal packets revealed power savings between 10% and 70% [206]. PAMAS optimization challenges include implementation complexity and the associated area cost because the separate control channel requires a second transceiver and duplexer.

The S-MAC protocol tunes the duty cycle and message size for energy conservation. S-MAC minimizes wasted energy due to frame (packet) collisions (since collided frames must be retransmitted with additional energy cost), overhearing (a sensor node receiving/listening to a frame destined for another node), control frame overhead, and idle listening (channel monitoring to identify possible incoming messages destined for that node). S-MAC uses a periodic sleep and listen (sleep–sense) strategy defined by the duty cycle. S-MAC avoids frame collisions by using virtual sense (network allocation vector (NAV)-based) and physical carrier sense (receiver listening to the channel) similar to IEEE 802.11. S-MAC avoids overhearing by instructing interfering sensor nodes to switch to sleep mode after hearing an RTS or CTS packet [204]. Experiments conducted on Rene Motes [207] for a traffic load comprising of sent messages every 1–10 s revealed that an IEEE 802.11-based MAC consumed 2c06-math-0004–6c06-math-0005 more energy than S-MAC [208].

T-MAC adjusts the duty cycle dynamically for power-efficient operation. T-MAC allows a variable sleep–sense duty cycle as opposed to the fixed duty cycle used in S-MAC (e.g., 10% sense and 90% sleep). The dynamic duty cycle further reduces the idle listening period. The sensor node switches to sleep mode when there is no activation event (e.g., data reception, timer expiration, communication activity sensing, or impending data reception knowledge through neighbors' RTS/CTS) for a predetermined period of time. Experimental results obtained from T-MAC protocol implementation on OMNeT++ [209] to model EYES sensor nodes [210] revealed that under homogeneous load (sensor nodes sent packets with 20- to 100-byte payloads to their neighbors at random), both T-MAC and S-MAC yielded 98% energy savings as compared to CSMA, whereas T-MAC outperformed S-MAC by 5c06-math-0006 under variable load [203].

B-MAC adjusts the duty cycle for power conservation using channel assessment information. B-MAC duty cycles the radio through a periodic channel sampling mechanism known as low power listening (LPL). Each time a sensor node wakes up, the sensor node turns on the radio and checks for channel activity. If the sensor node detects activity, the sensor node powers up and stays awake for the time required to receive an incoming packet. If no packet is received, indicating inaccurate activity detection, a time out forces the sensor node to sleep mode. B-MAC requires an accurate clear channel assessment to achieve low power operation. Experimental results obtained from B-MAC and S-MAC implementations on TinyOS using MICA2 motes revealed that B-MAC power consumption was within 25% of S-MAC for low throughputs (below 45 bits/s), whereas B-MAC outperformed S-MAC by 60% for higher throughputs. Results indicated that B-MAC performed better than S-MAC for latencies under 6 s, whereas S-MAC yielded lower power consumption as latency approached 10 s [199].

6.4 Network-Level Data Dissemination and Routing Protocol Optimizations

One commonality across diverse EWSN application domains is the embedded sensor node's task to sense and collect data about a phenomenon and transmit the data to the sink node. To meet application requirements, this data dissemination requires energy-efficient routing protocols to establish communication paths between the embedded sensor nodes and the sink node. Typically, harsh operating environments coupled with stringent resource and energy constraints make data dissemination and routing challenging for EWSNs. Ideally, data dissemination and routing protocols should target energy efficiency, robustness, and scalability. To achieve these optimization objectives, routing protocols adjust transmission power, routing strategies, and leverage by either single-hop or multiple-hop routing. In this section, we discuss protocols, which optimize data dissemination and routing in EWSNs.

6.4.1 Query Dissemination Optimizations

Query dissemination (transmission of a sensed data query/request from a sink node to a sensor node) and data forwarding (transmission of sensed data from a sensor node to a sink node) require routing layer optimizations. Protocols that optimize query dissemination and data forwarding include Declarative Routing Protocol (DRP) [211], directed diffusion [212], GRAdient routing (GRAd) [213], GRAdient Broadcast (GRAB) [214], and energy aware routing (EAR) [203, 215].

DRP targets energy efficiency by exploiting in-network aggregation (multiple data items are aggregated as they are forwarded by sensor nodes). Figure 6.3 shows in-network data aggregation where sensor node I aggregates sensed data from source nodes A, B, and C; sensor node J aggregates sensed data from source nodes D and E; and sensor node K aggregates sensed data from source nodes F, G, and H. The sensor node L aggregates the sensed data from sensor nodes I, J, and K and transmits the aggregated data to the sink node. DRP uses reverse path forwarding where data reports (packets containing sensed data in response to query) flow in the reverse direction of the query propagation to reach the sink.

c06f003

Figure 6.3 Data aggregation

Directed diffusion targets energy efficiency, scalability, and robustness under network dynamics using reverse path forwarding. Directed diffusion builds a shared mesh to deliver data from multiple sources to multiple sinks. The sink node disseminates the query, a process referred to as interest propagation (Fig. 6.4(a)). When a sensor node receives a query from a neighboring node, the sensor node sets up a vector called the gradient from itself to the neighboring node and directs future data flows on this gradient (Fig. 6.4(b)). The sink node receives an initial batch of data reports along multiple paths and uses a mechanism called reinforcement to select a path with the best forwarding quality (Fig. 6.4(c)). To handle network dynamics such as sensor node failures, each data source floods data reports periodically at lower rates to maintain alternate paths. Directed diffusion challenges include formation of initial gradients and wasted energy due to redundant data flows to maintain alternate paths.

c06f004

Figure 6.4 Directed diffusion: (a) interest propagation, (b) initial gradient setup, and (c) data delivery along the reinforced path

GRAd optimizes data forwarding and uses cost-field based forwarding where the cost metric is based on the hop count (i.e., sensor nodes closer to the sink node have smaller costs and those farther away have higher costs). The sink node floods a REQUEST message, and the data source broadcasts the data report containing the requested information (information is based on the data sensed by the data source). The neighbors with smaller costs forward the report to the sink node. GRAd drawbacks include wasted energy due to redundant data report copies reaching the sink node.

GRAB optimizes data forwarding and uses cost-field based forwarding where the cost metric denotes the total energy required to send a packet to the sink node. GRAB was designed for harsh environments with high channel error rate and frequent sensor node failures. GRAB controls redundancy by controlling the width (number of routes from the source sensor node to the sink node) of the forwarding mesh but requires that sensor nodes make assumptions about the energy required to transmit a data report to a neighboring node.

EAR optimizes data forwarding and uses cost-field based forwarding where the cost metric denotes energy per neighbor. EAR optimization objectives are load balancing and energy conservation. EAR makes forwarding decisions probabilistically where the assigned probability is inversely proportional to the neighbor energy cost so that paths consuming more energy are used less frequently [203].

6.4.2 Real-Time Constrained Optimizations

Critical EWSN applications may have real-time requirements for sensed data delivery (e.g., a security/defense system monitoring enemy troops or a forest fire detection application). Failure to meet the real-time deadlines for these applications can have catastrophic consequences. Routing protocols that consider the timing constraints for real-time requirements include real-time architecture and protocol (RAP) [216] and a stateless protocol for real-time communication in sensor networks (SPEED) [217].

RAP provides real-time data delivery by considering the data report expiration time (time after which the data is of little or no use) and the remaining distance the data report needs to travel to reach the sink node. RAP calculates the desired velocity c06-math-0007 where c06-math-0008 and c06-math-0009 denote the destination distance and packet lifetime, respectively. The desired velocity is updated at each hop to reflect the data report's urgency. A sensor node uses multiple first-in-first-out (FIFO) queues where each queue accepts reports of velocities within a certain range and then schedules transmissions according to a report's degree of urgency [203].

SPEED provides real-time data delivery and uses an exponentially weighted moving average for delay calculation. Given a data report with velocity c06-math-0010, SPEED calculates the speed c06-math-0011 of the report if the neighbor c06-math-0012 is selected as the next hop and then selects a neighbor with c06-math-0013 to forward the report [203].

6.4.3 Network Topology Optimizations

Routing protocols can adjust radio transmission power to control network topology (based on routing paths). Low-Energy-Adaptive Clustering Hierarchy (LEACH) [218] optimizes the network topology for reduced energy consumption by adjusting the radio's transmission power. LEACH uses a hybrid single-hop and multiple-hop communication paradigm. The sensor nodes use multiple-hop communication to transmit data reports to a cluster head (LEACH determines the cluster head using a randomized distributed algorithm). The cluster head forwards data to the sink node using long-range radio transmission.

6.4.4 Resource-Adaptive Optimizations

Routing protocols can adapt routing activities in accordance with the available resources. Sensor Protocols for Information via Negotiation (SPIN) [219] optimizes performance efficiency by using data negotiation and resource adaptation. In data negotiation, sensor nodes associate metadata with nodes and exchange this metadata before actual data transmission begins. The sensor nodes interested in the data content, based on metadata, request the actual data. This data negotiation ensures that data is sent only to interested nodes. SPIN allows sensor nodes to adjust routing activities according to the available energy resources. At low-energy levels, sensor nodes reduce or eliminate certain activities (e.g., forwarding of metadata and data packets) [196].

6.5 Operating System-Level Optimizations

An embedded sensor node's OS presents optimization challenges because embedded sensor node operation falls between single-application devices that typically do not need an OS and general-purpose devices with resources to run traditional embedded OSs. An embedded sensor node's OS manages processor, radio, I/O buses, and Flash memory and provides hardware abstraction to application software, task coordination, power management, and networking services. In this section, we discuss several optimizations provided by existing OSs for embedded sensor nodes [196].

6.5.1 Event-Driven Optimizations

Embedded sensor nodes respond to events by controlling sensing and actuation activity. Since sensor nodes are event-driven, it is important to optimize the OS for event handling. EWSN OSs optimized for event handling include TinyOS [220] and PicOS [221].

TinyOS operates using an event-driven model (tasks are executed based on events). TinyOS is written in the nesC programming language and allows application software to access hardware directly. TinyOS's advantages include simple OS code, energy efficiency, and a small memory foot print. TinyOS challenges include introduced complexity in application development and porting of existing C code to TinyOS.

PicOS is an event-driven OS written in C and designed for limited memory microcontrollers. PicOS tasks are structured as a finite state machine (FSM) and state transitions are triggered by events. PicOS is effective for reactive applications whose primary role is to react to events. PicOS supports multitasking and has small memory requirements but is not suitable for real-time applications.

6.5.2 Dynamic Power Management

A sensor node's OS can control hardware components to optimize power consumption. Examples include Operating System-directed Power Management (OSPM) [222] and MagnetOS [223], each of which provide mechanisms for dynamic power management. OSPM offers greedy-based dynamic power management, which switches the sensor node to a sleep state when idle. Sleep states provide energy conservation; however, transition to sleep state has the overhead of storing the processor state and requires a finite amount of wake-up time. OSPM greedy-based adaptive sleep mechanism disadvantages include wake-up delay and potentially missing events during sleep time. MagnetOS provides two online power-aware algorithms and an adaptive mechanism for applications to effectively utilize the sensor node's resources.

6.5.3 Fault Tolerance

Since maintenance and repair of embedded sensor nodes is typically not feasible after deployment, embedded sensor nodes require fault-tolerant mechanisms for reliable operation. MANTIS [224] is a multithreaded OS that provides fault-tolerant isolation between applications by not allowing a blocking task to prevent the execution of other tasks. In the absence of fault-tolerant isolation, if one task executes a conditional loop whose logical condition is never satisfied, then that task will execute in an infinite loop blocking all other tasks. MANTIS facilitates simple application development and allows dynamic reprogramming to update the sensor node's binary code. MANTIS offers a multimodal prototyping environment for testing EWSN applications by providing a remote shell and command server to enable inspection of the sensor node's memory and status remotely. MANTIS challenges include context switch time, stack memory overhead (since each thread requires one stack), and high energy consumption.

6.6 Dynamic Optimizations

Dynamic optimizations enable in situ parameter tuning and empower the embedded sensor node to adapt to the changing application requirements and environmental stimuli throughout the embedded sensor node's lifetime. Dynamic optimizations are important because application requirements change over time and environmental stimuli/conditions may not be accurately predicted at design time. Although some OS, MAC layer, and routing optimizations discussed in prior sections of this chapter are dynamic in nature, in this section we present additional dynamic optimization techniques for EWSNs.

6.6.1 Dynamic Voltage and Frequency Scaling

Dynamic voltage and frequency scaling (DVFS) adjusts a sensor node's processor voltage and frequency to optimize energy consumption. DVFS trades off performance for reduced energy consumption by considering that the peak computation (instruction execution) rate is much higher than the application's average throughput requirement and that sensor nodes are based on CMOS logic, which has a voltage-dependent maximum operating frequency. Min et al. [225] demonstrated that a DVFS system containing a voltage scheduler running in tandem with the operating system's task scheduler resulted in a 60% reduction in energy consumption. Yuan and Qu [226] studied a DVFS system for sensor nodes that required the sensor nodes to insert additional information (e.g., packet length, expected processing time, and deadline) into the data packet's header. The receiving sensor node utilized this information to select an appropriate processor voltage and frequency to minimize the overall energy consumption.

6.6.2 Software-Based Dynamic Optimizations

Software can provide dynamic optimizations using techniques such as duty cycling, batching, hierarchy, and redundancy reduction. Software can control the duty cycle so that sensor nodes are powered in a cyclic manner to reduce the average power draw. In batching, multiple operations are buffered and then executed in a burst to reduce startup overhead cost. Software can arrange operations in a hierarchy based on energy consumption and then invoke low-energy operations before high-energy operations. Software can reduce redundancy by compression, data aggregation, and/or message suppression. Kogekar et al. [227] proposed an approach for software reconfiguration in EWSNs. The authors modeled the EWSN operation space (defined by the EWSN software components' models and application requirements) and defined reconfiguration as the process of switching from one point in the operation space to another.

6.6.3 Dynamic Network Reprogramming

Dynamic network reprogramming reprograms embedded sensor nodes to change/modify tasks by disseminating code in accordance with changing environmental stimuli. Since recollection and reprogramming are not a feasible option for most sensor nodes, dynamic network reprogramming enables the sensor nodes to perform different tasks. For example, an EWSN initially deployed for measuring relative humidity can measure temperature statistics after dynamic reprogramming. The MANTIS OS possesses the dynamic reprogramming ability (Section 6.5.3).

6.7 Chapter Summary

In this chapter, we discussed distributed EWSNs from an optimization perspective and explored optimization strategies employed in EWSNs at different design levels to meet application requirements. We discussed architectural-level optimizations in EWSNs, particulary tunneling and bridging, which could be exploited to form sensor web. We elaborated sensor node component-level optimizations that leveraged tunable parameters (e.g., processor voltage and frequency, sensing frequency, duty cycle, etc.), whose values could be specialized to meet varying application requirements. We presented data link-level MAC optimizations that exploited MAC layer protocol parameters (e.g., channel access schedule, message size, duty cycle, and receiver power-off). We illustrated network-level routing optimizations and routing protocols that adjusted transmission power and routing strategies for improving energy efficiency, robustness, and scalability. We illustrated OS-level optimizations of sensor nodes, such as power management and fault tolerance, via examples of state-of-the-art sensor node OSs. Finally, we described dynamic optimizations such as DVFS and dynamic network reprogramming.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset