system architecture of networked sensor platforms

49
System Architecture of Networked Sensor Platforms

Upload: korbin

Post on 09-Jan-2016

33 views

Category:

Documents


0 download

DESCRIPTION

System Architecture of Networked Sensor Platforms. Introduction. Wireless sensor networks (WSN) consists of group of sensor nodes to perform distributed sensing task using wireless medium. Characteristics - low-cost, low-power, lightweight - densely deployed - prone to failures - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: System Architecture of Networked Sensor Platforms

System Architecture of Networked Sensor Platforms

Page 2: System Architecture of Networked Sensor Platforms

Wireless sensor networksWireless sensor networks (WSN) consists of group of sensor (WSN) consists of group of sensor

nodes to perform distributed sensing task using wireless nodes to perform distributed sensing task using wireless

medium.medium.

CharacteristicsCharacteristics- low-cost, low-power, lightweight- low-cost, low-power, lightweight

- densely deployed- densely deployed

- prone to failures- prone to failures

- two ways of - two ways of deploymentdeployment: randomly, pre-determined or engineered: randomly, pre-determined or engineered

ObjectivesObjectives-- Monitor activitiesMonitor activities- Gather and fuse information- Gather and fuse information

- Communicate with global data processing unit- Communicate with global data processing unit

Introduction

Page 3: System Architecture of Networked Sensor Platforms

– Recent sensor networks research involves almost all the layers and can Recent sensor networks research involves almost all the layers and can

be categorized into the following three aspects: be categorized into the following three aspects: [Akyildiz+2002, [Akyildiz+2002,

Elson+2002]:Elson+2002]:

Energy Efficiency: Energy Efficiency:

small devices, limited amount of energy, essential to prolong system small devices, limited amount of energy, essential to prolong system

lifetimelifetime

Scalability: Scalability:

deployment of thousands of sensor nodes, low-costdeployment of thousands of sensor nodes, low-cost

Locality: Locality:

smallest networks cannot depend on having global statessmallest networks cannot depend on having global states

Introduction

Page 4: System Architecture of Networked Sensor Platforms

– Traditional mechanisms of exploring the network (analysis and Traditional mechanisms of exploring the network (analysis and

simulation) are not satisfied for exploring such a large-scale, dynamic simulation) are not satisfied for exploring such a large-scale, dynamic

and resource-constrained networks due to their difficulties to modeling and resource-constrained networks due to their difficulties to modeling

every aspect of the system as a wholeevery aspect of the system as a whole

– For example, energy consumption model of the hardware platforms, For example, energy consumption model of the hardware platforms,

including sensing, computation and communication, is not fully including sensing, computation and communication, is not fully

considered and overly-simplified assumptions have been madeconsidered and overly-simplified assumptions have been made

– Application-specific property of WSN makes the existing research Application-specific property of WSN makes the existing research

mechanisms even harder to obtain meaningful results mechanisms even harder to obtain meaningful results

– Therefore, the demand to build a platform is increasing; e.g., Berkeley’s Therefore, the demand to build a platform is increasing; e.g., Berkeley’s

motes and MANTISmotes and MANTIS

Why Sensor Platforms?

Page 5: System Architecture of Networked Sensor Platforms

– Compared to analysis and simulation techniques, designing a system Compared to analysis and simulation techniques, designing a system

platform has the following advantages:platform has the following advantages:

Provides genuine executive environment: various proposed Provides genuine executive environment: various proposed

algorithms can be exactly evaluated; good way to examine existing algorithms can be exactly evaluated; good way to examine existing

design principles and discover new ones under different design principles and discover new ones under different

configurationsconfigurations

More attention can be focused on the application-layerMore attention can be focused on the application-layer

A real system platform can accelerate the pace of research and A real system platform can accelerate the pace of research and

developmentdevelopment

Why Sensor Platforms?

Page 6: System Architecture of Networked Sensor Platforms

– Constructing a platform for WSN falls into the area of embedded system Constructing a platform for WSN falls into the area of embedded system

development which usually consists of developing environment, development which usually consists of developing environment,

hardware and software platforms.hardware and software platforms.

1.1. Hardware PlatformHardware Platform

Consists of the following four components:Consists of the following four components:

a) Processing Unita) Processing Unit

Associates with small storage unit (tens of kilo bytes order) and Associates with small storage unit (tens of kilo bytes order) and

manages the procedures to collaborate with other nodes to carry out themanages the procedures to collaborate with other nodes to carry out the

assigned sensing taskassigned sensing task

b) Transceiver Unitb) Transceiver Unit

Connects the node to the network via various possible transmissionConnects the node to the network via various possible transmission

medias such as infra, light, radio and so onmedias such as infra, light, radio and so on

General WSN System Architecture

Page 7: System Architecture of Networked Sensor Platforms

1.1. Hardware PlatformHardware Platform

c) Power Unitc) Power Unit

Supplies power to the system by small size batteries which makes the Supplies power to the system by small size batteries which makes the

energy a scarce resourceenergy a scarce resource

d) Sensing Unitsd) Sensing Units

Usually composed of two subunits: sensors and analog-to-digitalUsually composed of two subunits: sensors and analog-to-digital

Converters (ADCs). The analog signal produced by the sensors areConverters (ADCs). The analog signal produced by the sensors are

converted to digital signals by the ADC, and fed into the processing unitconverted to digital signals by the ADC, and fed into the processing unit

e) Other Application Dependent Componentse) Other Application Dependent Components

Location finding system is needed to determine the location of sensor Location finding system is needed to determine the location of sensor

nodes with high accuracy; mobilizer may be needed to move sensor nodes with high accuracy; mobilizer may be needed to move sensor

nodes when it is required to carry out the tasknodes when it is required to carry out the task

General WSN System Architecture

Page 8: System Architecture of Networked Sensor Platforms

1.1. Hardware PlatformHardware Platform

General WSN System Architecture

Figure 1: The components of a sensor nodeFigure 1: The components of a sensor node [Akyildiz+2002][Akyildiz+2002]

Page 9: System Architecture of Networked Sensor Platforms

2.2. Software PlatformSoftware Platform

Consists of the following four components:Consists of the following four components:

a) Embedded Operating System (EOS)a) Embedded Operating System (EOS)

Manages the hardware capability efficiently as well as supportsManages the hardware capability efficiently as well as supports

concurrency-intense operations. Apart from traditional OS tasks such asconcurrency-intense operations. Apart from traditional OS tasks such as

processor, memory and I/O management, it must be real-time to rapidlyprocessor, memory and I/O management, it must be real-time to rapidly

respond the hardware triggered events, multi-threading to handle respond the hardware triggered events, multi-threading to handle

concurrent flows concurrent flows

b) Application Programming Interface (API)b) Application Programming Interface (API)

A series of functions provided by OS and other system-level components A series of functions provided by OS and other system-level components

for assisting developers to build applications upon itselffor assisting developers to build applications upon itself

General WSN System Architecture

Page 10: System Architecture of Networked Sensor Platforms

2.2. Software PlatformSoftware Platform

c) Device Driversc) Device Drivers

A series of routines that determine how the upper layer entities A series of routines that determine how the upper layer entities

communicate with the peripheral devicescommunicate with the peripheral devices

d) Hardware Abstract Layer (HAL)d) Hardware Abstract Layer (HAL)

Intermediate layer between the hardware and the OS. Provides uniformIntermediate layer between the hardware and the OS. Provides uniform

interfaces to the upper layer while its implementation is highly dependentinterfaces to the upper layer while its implementation is highly dependent

on the lower layer hardware. With the use of HAL, the OS and on the lower layer hardware. With the use of HAL, the OS and

applications easily transplant from one hardware platform to anotherapplications easily transplant from one hardware platform to another

General WSN System Architecture

Page 11: System Architecture of Networked Sensor Platforms

2.2. Software PlatformSoftware Platform

General WSN System Architecture

Figure 2: The software platform for WSNFigure 2: The software platform for WSN

Page 12: System Architecture of Networked Sensor Platforms

3.3. System Development EnvironmentSystem Development Environment

Provides various of tools for every stage of software development over Provides various of tools for every stage of software development over

the specific hardware platformthe specific hardware platform

a) Cross-Platform Developmenta) Cross-Platform Development

Generally, an embedded system unlike PC and does not have the ability Generally, an embedded system unlike PC and does not have the ability

of self-development. The final binary code run on that system, termed asof self-development. The final binary code run on that system, termed as

target system, will be generated on the PC, termed as host system, by target system, will be generated on the PC, termed as host system, by

cross-platform compilers and linkers, and download the resulted image cross-platform compilers and linkers, and download the resulted image

via the communication port onto the target systemvia the communication port onto the target system

General WSN System Architecture

Page 13: System Architecture of Networked Sensor Platforms

3.3. System Development EnvironmentSystem Development Environment

Provides various of tools for every stage of software development over Provides various of tools for every stage of software development over

the specific hardware platformthe specific hardware platform

b) Debug Techniquesb) Debug Techniques

Due to the difficulties introduced by cross-platform development mode, Due to the difficulties introduced by cross-platform development mode,

the debug techniques become critical for the efficiency of software the debug techniques become critical for the efficiency of software

production. For this reason, many chips on the system provide the production. For this reason, many chips on the system provide the

on-chip debugger, such as JTAF, to reduce the development time.on-chip debugger, such as JTAF, to reduce the development time.

General WSN System Architecture

Page 14: System Architecture of Networked Sensor Platforms

– Motes are tiny, self-contained, battery powered computers with radio Motes are tiny, self-contained, battery powered computers with radio

links, which enable them to communicate and exchange data with one links, which enable them to communicate and exchange data with one

another, and to self-organize into ad hoc networksanother, and to self-organize into ad hoc networks

– Motes form the building blocks of wireless sensor networksMotes form the building blocks of wireless sensor networks

– TinyOS TinyOS [TinyOS][TinyOS], component-based runtime environment, is designed to , component-based runtime environment, is designed to

provide support for these motes which require concurrency intensive provide support for these motes which require concurrency intensive

operations while constrained by minimal hardware resourcesoperations while constrained by minimal hardware resources

Berkeley Motes [Hill+ 2000]

Figure 3: Berkeley MoteFigure 3: Berkeley Mote

Page 15: System Architecture of Networked Sensor Platforms

Hardware PlatformHardware Platform

– Consists of Consists of

o micro-controller with internal flash program memory micro-controller with internal flash program memory

o data SRAMdata SRAM

o data EEPROMdata EEPROM

o a set of actuator and sensor devices, including LEDsa set of actuator and sensor devices, including LEDs

o a low-power transceivera low-power transceiver

o an analog photo-sensoran analog photo-sensor

o a digital temperature sensora digital temperature sensor

o a serial porta serial port

o a small coprocessor unita small coprocessor unit

Berkeley Motes [Hill+ 2000]

Page 16: System Architecture of Networked Sensor Platforms

Hardware PlatformHardware Platform

Berkeley Motes [Hill+ 2000]

Figure 4: The schematic for representative network sensor platformFigure 4: The schematic for representative network sensor platform

Page 17: System Architecture of Networked Sensor Platforms

Hardware PlatformHardware Platform

– The The processing unitprocessing unit

o MCU (ATMEL 90LS8535), an 8-bit architecture with 16-bit addressesMCU (ATMEL 90LS8535), an 8-bit architecture with 16-bit addresses

o provides 32 8-bit general registers and runs at 4 MHz and 3.0 Vprovides 32 8-bit general registers and runs at 4 MHz and 3.0 V

o has 8 KB flash as the program memory and 512 Bytes of SRAM as has 8 KB flash as the program memory and 512 Bytes of SRAM as

the data memorythe data memory

o MCU is designed such that the processor cannot write to instruction MCU is designed such that the processor cannot write to instruction

memory; the prototype uses a coprocessor to perform this functionmemory; the prototype uses a coprocessor to perform this function

o the processor integrates a set of timers and counters which can be the processor integrates a set of timers and counters which can be

configured to generate interrupts at regular time intervalsconfigured to generate interrupts at regular time intervals

o three sleep modes: three sleep modes: idleidle (shuts off the processor), (shuts off the processor), power downpower down (shuts (shuts

off everything, but the watchdog and asynchronous interrupt logic off everything, but the watchdog and asynchronous interrupt logic

necessary to wake up), necessary to wake up), power savepower save (keep asynchronous timer on) (keep asynchronous timer on)

Berkeley Motes [Hill+ 2000]

Page 18: System Architecture of Networked Sensor Platforms

Hardware PlatformHardware Platform

– The The sensing unitssensing units

o contains two sub-components: photo sensor and temperature sensorcontains two sub-components: photo sensor and temperature sensor

o photo sensorphoto sensor represents an analog input device with simple control represents an analog input device with simple control

lines which eliminate power drain through the photo resistor when not lines which eliminate power drain through the photo resistor when not

in usein use

o temperature sensor temperature sensor (Analog Devices AD7418) represents a large (Analog Devices AD7418) represents a large

class of digital sensors which have internal A/D converters and class of digital sensors which have internal A/D converters and

interface over a standard chip-to-chip protocol (the synchronous two-interface over a standard chip-to-chip protocol (the synchronous two-

wire Iwire I22C protocol with software on the micro-controller synthesizing C protocol with software on the micro-controller synthesizing

the Ithe I22C master over general I/O pins. There is no explicit arbiter and C master over general I/O pins. There is no explicit arbiter and

bus negotiations are carried out by the software on the micro-bus negotiations are carried out by the software on the micro-

controllercontroller

Berkeley Motes [Hill+ 2000]

Page 19: System Architecture of Networked Sensor Platforms

Hardware PlatformHardware Platform

– The The transceiver unittransceiver unit

o consist of an RF Monolithics 916.50 MHz transceiver (TR1000), consist of an RF Monolithics 916.50 MHz transceiver (TR1000),

antenna, and a collection of discrete components to configure the antenna, and a collection of discrete components to configure the

physical layer characteristics such as signal strength and sensitivityphysical layer characteristics such as signal strength and sensitivity

o operates in an ON-OFF key mode at speeds up to 19.2 Kbpsoperates in an ON-OFF key mode at speeds up to 19.2 Kbps

o control signals configure the radio to operate in either transmit, control signals configure the radio to operate in either transmit,

receive, or power-off modereceive, or power-off mode

o the radio contains no buffering, so each bit must be serviced by the the radio contains no buffering, so each bit must be serviced by the

controller on timecontroller on time

o the transmitted value is not latched by the radio, so the jitter at the the transmitted value is not latched by the radio, so the jitter at the

radio input is propagated into the transmission signalradio input is propagated into the transmission signal

Berkeley Motes [Hill+ 2000]

Page 20: System Architecture of Networked Sensor Platforms

Hardware PlatformHardware Platform

– The The transceiver unittransceiver unit is an Energizer CR2450 lithium battery rated at is an Energizer CR2450 lithium battery rated at

575 mAh575 mAh

– The The other auxiliary other auxiliary components include:components include:

The coprocessorThe coprocessor

o represents a synchronous bit-level device with byte-level supportrepresents a synchronous bit-level device with byte-level support

o MCU (AT09LS2343, with 2KB instruction memory, 128 bytes of MCU (AT09LS2343, with 2KB instruction memory, 128 bytes of

SRAM and EEPROM) that uses I/O pins connected to an SPI SRAM and EEPROM) that uses I/O pins connected to an SPI

controller where SPI is a synchronous serial data link, providing high controller where SPI is a synchronous serial data link, providing high

speed full-duplex connections (up to 1 Mbit) between peripheralsspeed full-duplex connections (up to 1 Mbit) between peripherals

o the sensor can be reprogrammed by transferring data from the the sensor can be reprogrammed by transferring data from the

network into the coprocessor’s 256 KB EEPROM (24LC256)network into the coprocessor’s 256 KB EEPROM (24LC256)

o can be used as a gateway to extra storage by the main processorcan be used as a gateway to extra storage by the main processor

Berkeley Motes [Hill+ 2000]

Page 21: System Architecture of Networked Sensor Platforms

Hardware PlatformHardware Platform

– The The other auxiliary other auxiliary components include:components include:

The serial portThe serial port

o represents a synchronous bit-level device with byte-level controller represents a synchronous bit-level device with byte-level controller

supportsupport

o uses I/O pins that are connected to an internal UART controlleruses I/O pins that are connected to an internal UART controller

o in transmit mode, the UART takes a byte of data and shifts it out in transmit mode, the UART takes a byte of data and shifts it out

serially at a specified intervalserially at a specified interval

o in receive mode, it samples the input pin for a transition and shifts in in receive mode, it samples the input pin for a transition and shifts in

bits at a specified interval from the edgebits at a specified interval from the edge

o interrupts are triggered in the processor to signal completion of the interrupts are triggered in the processor to signal completion of the

eventsevents

Berkeley Motes [Hill+ 2000]

Page 22: System Architecture of Networked Sensor Platforms

Hardware PlatformHardware Platform

– The The other auxiliary other auxiliary components include:components include:

Three LEDsThree LEDs

o represent outputs connected through general I/O ports; they may be represent outputs connected through general I/O ports; they may be

used to display digital values or statusused to display digital values or status

Software PlatformSoftware Platform

– based on Tiny Micro-Threading Operating System (TinyOS) which is based on Tiny Micro-Threading Operating System (TinyOS) which is

designed for resource-constrained MEMS sensorsdesigned for resource-constrained MEMS sensors

– TinyOS adopts an event model so that high levels of concurrency can be TinyOS adopts an event model so that high levels of concurrency can be

handled in a small amount of spacehandled in a small amount of space

– A stack-based threaded approach would require that stack space be A stack-based threaded approach would require that stack space be

reserved for each execution contextreserved for each execution context

Berkeley Motes [Hill+ 2000, TinyOS]

Page 23: System Architecture of Networked Sensor Platforms

Software PlatformSoftware Platform

– A complete system configuration consists of a tiny A complete system configuration consists of a tiny schedulerscheduler and a graph and a graph

of of componentscomponents

– A component has four interrelated parts: a set of A component has four interrelated parts: a set of

o a set of command handlersa set of command handlers

o a set of event handlersa set of event handlers

o an encapsulated fixed-size framean encapsulated fixed-size frame

o Bundle of simple tasksBundle of simple tasks

– tasks, commands and event handlers execute in the context of the frame tasks, commands and event handlers execute in the context of the frame

and operate on its stateand operate on its state

– each component declares the commands it uses and the events it signalseach component declares the commands it uses and the events it signals

– these declarations are used to compose the modular components in a these declarations are used to compose the modular components in a

per-application configurationper-application configuration

Berkeley Motes [Hill+ 2000, TinyOS]

Page 24: System Architecture of Networked Sensor Platforms

Software PlatformSoftware Platform

– the composition process creates layers of components where higher-level the composition process creates layers of components where higher-level

components issue commands to lower-level components and lower-level components issue commands to lower-level components and lower-level

components signal events to the higher-level componentscomponents signal events to the higher-level components

FramesFrames

– fixed-size and statistically allocated which allows us to know memory fixed-size and statistically allocated which allows us to know memory

requirements of a component at a compile time -- prevents overhead requirements of a component at a compile time -- prevents overhead

associated with dynamic allocationassociated with dynamic allocation

CommandsCommands

– non-blocking requests made to lower level componentsnon-blocking requests made to lower level components

– typically, a command will deposit request parameters into its frame and typically, a command will deposit request parameters into its frame and

conditionally post a task for later executionconditionally post a task for later execution

Berkeley Motes [Hill+ 2000, TinyOS]

Page 25: System Architecture of Networked Sensor Platforms

Software PlatformSoftware Platform

CommandsCommands

– can invoke lower commands, but it must not wait for longcan invoke lower commands, but it must not wait for long

– must provide feedback to its caller by returning status indicating whether it must provide feedback to its caller by returning status indicating whether it

was successful or notwas successful or not

Event handlersEvent handlers

– Invoked to deal with hardware events, either directly or indirectlyInvoked to deal with hardware events, either directly or indirectly

– The lowest level components have handlers connected directly to The lowest level components have handlers connected directly to

hardware interrupts which may be external interrupts, timer events, or hardware interrupts which may be external interrupts, timer events, or

counter eventscounter events

– An event handler can deposit information into its frame, post tasks, signal An event handler can deposit information into its frame, post tasks, signal

higher level events or call lower level commandshigher level events or call lower level commands

Berkeley Motes [Hill+ 2000, TinyOS]

Page 26: System Architecture of Networked Sensor Platforms

Software PlatformSoftware Platform

Event handlersEvent handlers

– in order to avoid cycles in the command/event chain, commands cannot in order to avoid cycles in the command/event chain, commands cannot

signal eventssignal events

– both signals and events are intended to perform a small, fixed amount of both signals and events are intended to perform a small, fixed amount of

work, which occurs within the context of their component’s statework, which occurs within the context of their component’s state

TasksTasks

– perform the primary workperform the primary work

– atomic entities with respect to other tasks, run to completion and can be atomic entities with respect to other tasks, run to completion and can be

preempted by eventspreempted by events

– can call lower level commands, signal higher level events, and schedule can call lower level commands, signal higher level events, and schedule

other tasks within a componentother tasks within a component

Berkeley Motes [Hill+ 2000, TinyOS]

Page 27: System Architecture of Networked Sensor Platforms

Software PlatformSoftware Platform

TasksTasks

– run-to-completion semantics make it possible to allocate a single stack run-to-completion semantics make it possible to allocate a single stack

that is assigned to the currently executing task which is essential in that is assigned to the currently executing task which is essential in

memory constrained systemsmemory constrained systems

– allows to simulate concurrency within each component, since tasks allows to simulate concurrency within each component, since tasks

execute asynchronously with respect to the eventsexecute asynchronously with respect to the events

– must never block or spin wait, otherwise, they will prevent progress in must never block or spin wait, otherwise, they will prevent progress in

other componentsother components

Task schedulerTask scheduler

– Utilizes a bounded size scheduling data structure to schedule various Utilizes a bounded size scheduling data structure to schedule various

tasks base on FIFO, priority-based or deadline-based policy which is tasks base on FIFO, priority-based or deadline-based policy which is

dependent on the requirements of the applicationdependent on the requirements of the application

Berkeley Motes [Hill+ 2000, TinyOS]

Page 28: System Architecture of Networked Sensor Platforms

Software PlatformSoftware Platform

Berkeley Motes [Hill+ 2000, TinyOS]

Figure 5: The schematic for the architecture of TinyOSFigure 5: The schematic for the architecture of TinyOS

Page 29: System Architecture of Networked Sensor Platforms

– MANTISMANTIS ( (MMultimodultimodAAl system for l system for NNeeTTworks of works of IIn-situ wireless n-situ wireless SSensors) ensors)

provides a new multi-threaded embedded operating system integrated provides a new multi-threaded embedded operating system integrated

with a general-purpose single-board hardware platform to enable flexible with a general-purpose single-board hardware platform to enable flexible

and rapid prototyping of wireless sensor networksand rapid prototyping of wireless sensor networks

– the key design goals of MANTIS are the key design goals of MANTIS are

o ease of useease of use, i.e., a small learning curve that encourages novice , i.e., a small learning curve that encourages novice

programmers to rapidly prototype sensor applicationsprogrammers to rapidly prototype sensor applications

o flexibilityflexibility such that expert researchers can continue to adapt and such that expert researchers can continue to adapt and

extend the hardware/software system to suit the needs of advanced extend the hardware/software system to suit the needs of advanced

researchresearch

MANTIS [Abrach+ 2003]

Page 30: System Architecture of Networked Sensor Platforms

– MANTIS OS is called MOSMANTIS OS is called MOS

o MOS selects its model as classical structure of layered multi-MOS selects its model as classical structure of layered multi-

threaded operating systems which includes multi-threading, threaded operating systems which includes multi-threading,

preemptive scheduling with time slicing, I/O synchronization via preemptive scheduling with time slicing, I/O synchronization via

mutual exclusion, a standard network stack, and device driversmutual exclusion, a standard network stack, and device drivers

o MOS choose a standard programming language that the entire MOS choose a standard programming language that the entire

kernel and API are written in standard C. This design choice not only kernel and API are written in standard C. This design choice not only

almost eliminates the learning curve, but also accrues many of the almost eliminates the learning curve, but also accrues many of the

other benefits of a standard programming language, including cross-other benefits of a standard programming language, including cross-

platform support and reuse of a vast legacy code base. C also eases platform support and reuse of a vast legacy code base. C also eases

development of cross-platform multimodal prototyping environments development of cross-platform multimodal prototyping environments

on X86 PCson X86 PCs

MANTIS [Abrach+ 2003]

Page 31: System Architecture of Networked Sensor Platforms

Hardware PlatformHardware Platform

– MANTIS hardware nymph’s design was inspired by the Berkeley MICA an MANTIS hardware nymph’s design was inspired by the Berkeley MICA an

MICA2 Mote architectureMICA2 Mote architecture

– MANTIS Nymph is a single-board design, incorporating the micro-MANTIS Nymph is a single-board design, incorporating the micro-

controller, analog sensor ports, RF communication, EEPROM, and serial controller, analog sensor ports, RF communication, EEPROM, and serial

ports on one dual-layer 3.5 x 5.5 cm printed circuit boardports on one dual-layer 3.5 x 5.5 cm printed circuit board

– the Nymph is centered around the AMTEL ATmega128(L) MCU, including the Nymph is centered around the AMTEL ATmega128(L) MCU, including

interfaces for two UARTs, an SPI bus, an Iinterfaces for two UARTs, an SPI bus, an I22C bus, and eight analog-to-C bus, and eight analog-to-

digital converter channels. It provides additional 64KB EEPROM external digital converter channels. It provides additional 64KB EEPROM external

to MCU in addition to 4KB EEPROM included in MCUto MCU in addition to 4KB EEPROM included in MCU

– the unit is powered either by batteries or an AC adapter, and a set of three the unit is powered either by batteries or an AC adapter, and a set of three

on-board LEDs are included to aid in the debugging process. It is designed on-board LEDs are included to aid in the debugging process. It is designed

to hold a 24mm diameter lithium ion coin cell battery (CR2477), but any to hold a 24mm diameter lithium ion coin cell battery (CR2477), but any

battery in the range of 1.8V to 3.6V can be connectedbattery in the range of 1.8V to 3.6V can be connected

MANTIS [Abrach+ 2003]

Page 32: System Architecture of Networked Sensor Platforms

Hardware PlatformHardware Platform

– in order to facilitate rapid prototyping in research environment, the Nymph in order to facilitate rapid prototyping in research environment, the Nymph

has solderless plug connections for both analog and digital sensors, which has solderless plug connections for both analog and digital sensors, which

eliminates the external sensor board for many applicationseliminates the external sensor board for many applications

– each connector provides lines for ground, power and sensor signal, each connector provides lines for ground, power and sensor signal,

allowing basic sensors such as photo sensors or complex devices such allowing basic sensors such as photo sensors or complex devices such

as infrared an ultra sounds receivers to be connected easilyas infrared an ultra sounds receivers to be connected easily

– the Chipcon CC1000 radio was chosen to handle wireless the Chipcon CC1000 radio was chosen to handle wireless

communication. It supports four carrier frequency bands (315, 433, 868, communication. It supports four carrier frequency bands (315, 433, 868,

and 915 MHz) and allows for frequency hopping which is useful for multi-and 915 MHz) and allows for frequency hopping which is useful for multi-

channel communication. It is one of the lowest power commercial radios channel communication. It is one of the lowest power commercial radios

and allows MOS to optimize the radio to further reduce the power and allows MOS to optimize the radio to further reduce the power

consumptionconsumption

MANTIS [Abrach+ 2003]

Page 33: System Architecture of Networked Sensor Platforms

Hardware PlatformHardware Platform

– for additional modules, the Nymph includes JTAG interface which allows for additional modules, the Nymph includes JTAG interface which allows

the user to easily download code to the hardware. This addition eliminates the user to easily download code to the hardware. This addition eliminates

a need for separate programming board, simplifying the process of a need for separate programming board, simplifying the process of

reprogramming the nodes while reducing the cost of overall system. As reprogramming the nodes while reducing the cost of overall system. As

added benefit, the JTAG port allows the user to single-step through code added benefit, the JTAG port allows the user to single-step through code

on the MCU and also supports the remote shellon the MCU and also supports the remote shell

– the Nymph uses one of the UARTs to supply a serial port (RS232) for the Nymph uses one of the UARTs to supply a serial port (RS232) for

connection to a PC while the second one is used as an interface to the connection to a PC while the second one is used as an interface to the

optional GPS unitoptional GPS unit

– MAX3221 RS232 serial chip is used and may be set in three different MAX3221 RS232 serial chip is used and may be set in three different

power saving modes: power-down, receive only and shut downpower saving modes: power-down, receive only and shut down

MANTIS [Abrach+ 2003]

Page 34: System Architecture of Networked Sensor Platforms

Hardware PlatformHardware Platform

MANTIS [Abrach+ 2003]

Figure 6: MANTIS NymphFigure 6: MANTIS Nymph

Page 35: System Architecture of Networked Sensor Platforms

Software PlatformSoftware Platform

– MANTIS OS (MOS) adheres to classical layered multi-threaded designMANTIS OS (MOS) adheres to classical layered multi-threaded design

– top application and API layers show a simple C API which promotes the top application and API layers show a simple C API which promotes the

ease of use, cross-platform portability, and reuse of a large installed code ease of use, cross-platform portability, and reuse of a large installed code

basebase

– in lower layers of MOS, it adapts the classical OS structures to achieve in lower layers of MOS, it adapts the classical OS structures to achieve

small memory footprintsmall memory footprint

System APIsSystem APIs

– MANTIS provides comprehensive System APIs for I/O and system MANTIS provides comprehensive System APIs for I/O and system

interactioninteraction

– the choice of C language API simplifies cross-platform support and the the choice of C language API simplifies cross-platform support and the

development of a multimodal prototyping environmentdevelopment of a multimodal prototyping environment

MANTIS [Abrach+ 2003]

Page 36: System Architecture of Networked Sensor Platforms

Software PlatformSoftware Platform

System APIsSystem APIs

– since MANTIS System API is preserved across both physical sensor since MANTIS System API is preserved across both physical sensor

nodes as well as virtual sensor nodes running on X86 platforms, the same nodes as well as virtual sensor nodes running on X86 platforms, the same

C code developed for MANTIS sensor Nymphs with AMTEL MCU can be C code developed for MANTIS sensor Nymphs with AMTEL MCU can be

compiled to run on X86 PCs with little or no alterationcompiled to run on X86 PCs with little or no alteration

Kernel and SchedulerKernel and Scheduler

– design of MOS kernel resembles classical UNIX-style schedulersdesign of MOS kernel resembles classical UNIX-style schedulers

– The services provided are subset of POSIX threads, most notably priority-The services provided are subset of POSIX threads, most notably priority-

based thread scheduling with round-robin semantics within a priority levelbased thread scheduling with round-robin semantics within a priority level

– binary (mutex) and counting semaphores are also supportedbinary (mutex) and counting semaphores are also supported

– the goal of the kernel design is to implement these familiar services in an the goal of the kernel design is to implement these familiar services in an

efficient manner for resource-constrained environment of a sensor nodeefficient manner for resource-constrained environment of a sensor node

MANTIS [Abrach+ 2003]

Page 37: System Architecture of Networked Sensor Platforms

Software PlatformSoftware Platform

Network StackNetwork Stack

– focused on efficient use of limited memory, flexibility, and conveniencefocused on efficient use of limited memory, flexibility, and convenience

– implemented as one or more user-level threadsimplemented as one or more user-level threads

– different layers can be implemented in different threads, or all layers in the different layers can be implemented in different threads, or all layers in the

stack can be implemented in one threadstack can be implemented in one thread

– the tradeoff is between performance and flexibilitythe tradeoff is between performance and flexibility

– designed to minimize memory buffer allocation through layersdesigned to minimize memory buffer allocation through layers

– the data body for a packet is common through all layers within a threadthe data body for a packet is common through all layers within a thread

– the headers for a packet is variably-sized and are pre-pended to the single the headers for a packet is variably-sized and are pre-pended to the single

data bodydata body

– designed in a modular manner with standard APIs between each layers, designed in a modular manner with standard APIs between each layers,

thereby allowing developers easily modify or replace layer modulesthereby allowing developers easily modify or replace layer modules

MANTIS [Abrach+ 2003]

Page 38: System Architecture of Networked Sensor Platforms

Software PlatformSoftware Platform

Device DriversDevice Drivers

– Adopts the traditional logical/physical partitioning with respect to device Adopts the traditional logical/physical partitioning with respect to device

driver design for the hardwaredriver design for the hardware

– The application developer need not to interact with the hardware to The application developer need not to interact with the hardware to

accomplish a given taskaccomplish a given task

MANTIS [Abrach+ 2003]

Page 39: System Architecture of Networked Sensor Platforms

Software PlatformSoftware Platform

MANTIS [Abrach+ 2003]

Figure 7: MANTIS OS ArchitectureFigure 7: MANTIS OS Architecture

Page 40: System Architecture of Networked Sensor Platforms

System DevelopmentSystem Development

– application developers need to be able to prototype and test applications application developers need to be able to prototype and test applications

prior to distribution and physical deployment in the fieldprior to distribution and physical deployment in the field

– during deployment, in-situ sensor nodes need to be capable of being both during deployment, in-situ sensor nodes need to be capable of being both

dynamically reprogrammed and remotely debuggeddynamically reprogrammed and remotely debugged

– in order to facilitates these issues, MANTIS identifies and implements in order to facilitates these issues, MANTIS identifies and implements

three key advanced features for expert users of general-purpose sensor three key advanced features for expert users of general-purpose sensor

systemssystems

o multimodal prototyping environmentmultimodal prototyping environment

o dynamic reprogrammingdynamic reprogramming

o remote shell and commander serverremote shell and commander server

MANTIS [Abrach+ 2003]

Page 41: System Architecture of Networked Sensor Platforms

System DevelopmentSystem Development

Multimodal Prototyping EnvironmentMultimodal Prototyping Environment

– Provides a framework for prototyping diverse applications across Provides a framework for prototyping diverse applications across

heterogeneous platformsheterogeneous platforms

– A key requirement of sensor systems is the need to provide a prototyping A key requirement of sensor systems is the need to provide a prototyping

environment to test sensor networking applications prior to deploymentenvironment to test sensor networking applications prior to deployment

– Postponing testing of an application until after its deployment across a Postponing testing of an application until after its deployment across a

distributed sensor network can incur severe consequencesdistributed sensor network can incur severe consequences

– MANTIS prototyping environment extends beyond simulation to provide MANTIS prototyping environment extends beyond simulation to provide

larger framework for development of network management and larger framework for development of network management and

visualization applications as virtual nodes within a MANTIS networkvisualization applications as virtual nodes within a MANTIS network

o MANTIS has property of enabling an application developer to test MANTIS has property of enabling an application developer to test

execution of the same C code on both virtual sensor nodes and later execution of the same C code on both virtual sensor nodes and later

on in-situ physical sensor nodes on in-situ physical sensor nodes

MANTIS [Abrach+ 2003]

Page 42: System Architecture of Networked Sensor Platforms

System DevelopmentSystem Development

Multimodal Prototyping EnvironmentMultimodal Prototyping Environment

o Seamlessly integrates virtual environment with the real deployment Seamlessly integrates virtual environment with the real deployment

network such that both virtual and physical nodes can co-exit and network such that both virtual and physical nodes can co-exit and

communicate with each other in the prototyping environmentcommunicate with each other in the prototyping environment

o Permits a virtual node to leverage other APIs outside of the MANTIS Permits a virtual node to leverage other APIs outside of the MANTIS

API, e.g., a virtual node with the MANTIS API could be realized as a API, e.g., a virtual node with the MANTIS API could be realized as a

UNIX X windows application that communicates with other rendering UNIX X windows application that communicates with other rendering

or database APIs to build visualization and network management or database APIs to build visualization and network management

applicationsapplications

MANTIS [Abrach+ 2003]

Page 43: System Architecture of Networked Sensor Platforms

System DevelopmentSystem Development

Multimodal Prototyping EnvironmentMultimodal Prototyping Environment

MANTIS [Abrach+ 2003]

Figure 8: Multimodal prototyping integrates both virtual and physical sensorFigure 8: Multimodal prototyping integrates both virtual and physical sensornodes across heterogeneous X86 and AMTEL sensor platformsnodes across heterogeneous X86 and AMTEL sensor platforms

Page 44: System Architecture of Networked Sensor Platforms

System DevelopmentSystem Development

Dynamic ReprogrammingDynamic Reprogramming

– Sensor nodes should be remotely reconfigurable over a wireless multi-hop Sensor nodes should be remotely reconfigurable over a wireless multi-hop

network after being deployed in the field. Since sensor nodes may be network after being deployed in the field. Since sensor nodes may be

deployed in inaccessible areas and may scale to thousands of nodes, this deployed in inaccessible areas and may scale to thousands of nodes, this

simplifies management of the sensor networksimplifies management of the sensor network

– MOS achieves dynamic reprogramming in several granularities: re-flashing MOS achieves dynamic reprogramming in several granularities: re-flashing

the entire OS; reprogramming of a single thread; and changing of variables the entire OS; reprogramming of a single thread; and changing of variables

within a threadwithin a thread

– Another useful feature would be the ability to remotely debug a running Another useful feature would be the ability to remotely debug a running

thread. MOS provides a remote shell that enables a user to login and thread. MOS provides a remote shell that enables a user to login and

inspect the sensor node’s memoryinspect the sensor node’s memory

– MOS includes two programming modes (simpler and more advanced) in MOS includes two programming modes (simpler and more advanced) in

order to overcome the difficulty of reprogramming the networkorder to overcome the difficulty of reprogramming the network

MANTIS [Abrach+ 2003]

Page 45: System Architecture of Networked Sensor Platforms

System DevelopmentSystem Development

Dynamic ReprogrammingDynamic Reprogramming

– The The simpler programmingsimpler programming mode is similar to that used in many other mode is similar to that used in many other

systems and involves a direct communication with a specific MANTIS nodesystems and involves a direct communication with a specific MANTIS node

– On a Nymph, this would be accomplished via a serial port: the user simply On a Nymph, this would be accomplished via a serial port: the user simply

connects the node to a PC and opens the MANTIS shellconnects the node to a PC and opens the MANTIS shell

– Upon reset, MOS enters a boot loader that checks for communication from Upon reset, MOS enters a boot loader that checks for communication from

the shell. At this point, the node will accept a new code image, which is the shell. At this point, the node will accept a new code image, which is

downloaded from the PC over the direct communication linedownloaded from the PC over the direct communication line

– From the shell, the user has the ability to inspect and modify the node’s From the shell, the user has the ability to inspect and modify the node’s

memory directly as well as spawn threads and retrieve debugging memory directly as well as spawn threads and retrieve debugging

information including thread status, stack fill, and other statistics from OSinformation including thread status, stack fill, and other statistics from OS

– The boot loader transfers control to the MOS kernel on command from the The boot loader transfers control to the MOS kernel on command from the

shell, or at a startup if the shell is not presentshell, or at a startup if the shell is not present

MANTIS [Abrach+ 2003]

Page 46: System Architecture of Networked Sensor Platforms

System DevelopmentSystem Development

Dynamic ReprogrammingDynamic Reprogramming

– The more The more advanced programmingadvanced programming mode is used when a node is already mode is used when a node is already

deployed, and does not require direct access to the nodedeployed, and does not require direct access to the node

– The spectrum of dynamic reprogramming of in-situ sensor networks ranges The spectrum of dynamic reprogramming of in-situ sensor networks ranges

from fine grained reprogramming to complete reprogramming from fine grained reprogramming to complete reprogramming

– MOS has a provision for reprogramming any portion of the node up to and MOS has a provision for reprogramming any portion of the node up to and

including the OS itself while the node is deployed in the fieldincluding the OS itself while the node is deployed in the field

– This is accomplished through the MOS dynamic reprogramming interfaceThis is accomplished through the MOS dynamic reprogramming interface

MANTIS [Abrach+ 2003]

Page 47: System Architecture of Networked Sensor Platforms

System DevelopmentSystem Development

Remote Shell and Commander ServerRemote Shell and Commander Server

– MOS includes the MANTIS Command Server (MCS) which is MOS includes the MANTIS Command Server (MCS) which is

implemented as an application threadimplemented as an application thread

– From any device in the network equipped with a terminal, the user may From any device in the network equipped with a terminal, the user may

invoke the command server client (also referred to as the shell) and log in invoke the command server client (also referred to as the shell) and log in

to either a physical node (e.g., on a Nymph or Mica board) or a virtual node to either a physical node (e.g., on a Nymph or Mica board) or a virtual node

running as a process on a PCrunning as a process on a PC

– MCS listens on a network port for commands and replies with the results, MCS listens on a network port for commands and replies with the results,

in a manner similar to RPCin a manner similar to RPC

– The shell gains the ability to control a node remotely through MCSThe shell gains the ability to control a node remotely through MCS

MANTIS [Abrach+ 2003]

Page 48: System Architecture of Networked Sensor Platforms

System DevelopmentSystem Development

Remote Shell and Commander ServerRemote Shell and Commander Server

– The user may alter the node’s configuration settings, run or kill programs, The user may alter the node’s configuration settings, run or kill programs,

display the thread table and other OS data, inspect and modify the node’s display the thread table and other OS data, inspect and modify the node’s

data memory, and call arbitrary user-defined functions data memory, and call arbitrary user-defined functions

– The shell is powerful debugging tool since it allows the user to examine The shell is powerful debugging tool since it allows the user to examine

and modify the state of any node, without requiring physical access to the and modify the state of any node, without requiring physical access to the

nodenode

MANTIS [Abrach+ 2003]

Page 49: System Architecture of Networked Sensor Platforms

[Abrach+ 2003] H. Abrach, S. Bhatti, J. Carlson, H. Dai, J. Rose, A. Sheth, B. Shucker, J, Deng and R. Han, MANTIS: System Support for MultimodAl NeTworks of In-Situ Sensors, 2nd ACM International Workshop on Wireless Sensor Networks and Applications (WSNA 2003), September 2003.

[Akyildiz+ 2002] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci, A Survey on Sensor Networks, IEEE Communications Magazine, Vol. 40, No. 8, pp. 102-114, August 2002.

[Elson+ 2002] J. Elson and K. Romer, Wireless Sensor Networks: A New Regime for Time Synchronization, First Workshop on Hot Topics in Networks (Hotnets-I), Princeton, USA, October 2002.

[Hill+ 2000] J. Hill, R. Szewczyk, A. Woo, S. Hollar, D. Culler, and K. Pister, System Architecture Directions for Networked Sensors, Architectural Support for Programming Languages and Operating Systems (ASPLOS) 2000

[TinyOS] TinyOS: a component-based OS for the networked sensor regime.

References