Professional Documents
Culture Documents
Unit 1 WSN
Unit 1 WSN
Unit – I
Dr.R.Kayalvizhi
Department of Networking and Communications
Introduction to computer and wireless sensor networks - Motivation
for a network of Wireless Sensor nodes - Sensing and sensors -
Challenges and constraints -
Node architecture - Sensing sub system -Processor sub system -
Communication interfaces-- prototypes - Application of Wireless
sensors -WSN Tools- Overview and Limitations -Contiki
–Introduction - Characteristics of Contiki WSN simulator
Adhoc Wireless Network
2
Motivation for a Network of Wireless
Sensor Nodes
Definitions WSN
Wireless Sensor Network (WSN) is an infrastructure-less wireless network that is
deployed in a large number of wireless sensors in an ad-hoc manner that is used to
monitor the system, physical or environmental conditions.
2
Introduction
3
Sensors, Transducer and Actuators
4
Sensor Classifications
q Sensors should be chosen for an application depends on the physical
property to be monitored.
q Ex: temperature, pressure, light, or humidity.
Physical property to be monitored determines type of required sensor
Type Examples
Power supply:
active sensors require external power, i.e., they emit energy
(microwaves, light, sound) to trigger response or detect change in
energy of transmitted signal (e.g., electromagnetic proximity sensor)
passive sensors detect energy in the environment and derive their
power from this energy input (e.g., Film photography, passive
infrared sensor – measure infrared light radiating from objects in
the proxiity)
Electrical phenomenon:
resistive sensors use changes in electrical resistivity (ρ) based on
physical properties such as temperature (resistance R = ρ*l/A)
Where ρ conductor’s electrical resistivity, l is the length of the
conductor and A is the area of the cross-section.
6
Wireless Sensor Network (WSN)
8
Wireless Sensor Network (WSN) – Cont.
9
History of Wireless Sensor Networks – Cont.
11
Single-Hop versus Multi-Hop
Star topology:
every sensor communicates directly (single-hop) with the base station
may require large transmit powers and may be infeasible in large
geographic areas
Mesh topology
sensors serve as relays (forwarders) for other sensor nodes (multi-hop)
may reduce power consumption and allows for larger coverage
introduces the problem of routing
12
Challenges in WSNs: Energy
14
Challenges in WSNs: Energy
Network layer:
responsible for finding energy-efficient routes
Requires transmission power, and available energy on relay nodes.
Operating system:
small memory footprint and efficient task switching
Security:
fast and simple algorithms for encryption, authentication, etc.
Middleware:
in-network processing of sensor data can eliminate redundant data
Challenges in WSNs: Self-Management
Ad-hoc deployment
many sensor networks are deployed “without design”
sensors dropped from airplanes
sensors placed wherever currently needed
moving sensors
sensor node must have some or all of the following abilities
determine its location
determine identity of neighboring nodes
configure node parameters
discover route(s) to base station
initiate sensing responsibility
15
Challenges in WSNs: Self-Management
Unattended operation
once deployed, WSN must operate without human intervention
device adapts to changes in topology, density, and traffic load
device adapts in response to failures
Self Managing
Device will monitor its surroundings, adapt to changes in the
environment, cooperate with neighbouring nodes to form topology or
agree on sensing, processing and communication strategies
Other terminology
self-organization is the ability to adapt configuration parameters based on
system and environmental state
self-optimization is the ability to monitor and optimize the use of the
limited system resources
self-protection is the ability recognize and protect from intrusions and
attacks
self-healing is the ability to discover, identify, and react to network
disruptions 16
Challenges in WSNs: Decentralization
Centralized management (e.g., at the base station) of the network often not feasible
to due large scale of network and energy constraints
Therefore, decentralized (or distributed) solutions often preferred, though they may
perform worse than their centralized counterparts
Example: routing
Centralized:
BS collects information from all sensor nodes
BS establishes “optimal” routes (e.g., in terms of energy)
BS informs all sensor nodes of routes
can be expensive, especially when the topology changes frequently
Decentralized:
each sensors makes routing decisions based on limited local information
routes may be non-optimal, but route establishment/management can be much
cheaper
18
Challenges in WSNs: Design Constraints
Many hardware and software limitations affect the overall system design
Examples include:
Low processing speeds (to save energy)
Low storage capacities (to allow for small form factor and to save energy)
Lack of I/O components such as GPS receivers (reduce cost, size, energy)
Lack of software features such as multi-threading (reduce software complexity)
19
Challenges in WSNs: Security
Sensor networks often monitor critical infrastructure or carry sensitive information,
making them desirable targets for attacks
20
Comparison
Traditional Networks Wireless Sensor Networks
2
Node Architecture
4
Node Architecture – Contd.
Connect the sensing subsystem with the processor
Connecting 2 or more analog sensors with a multichannel ADC system that
integrates multiple high-speed ADCs into a single IC design.
ADCs produce crosstalk and increase uncorrelated noise,
Reducing the signal to noise ratio (SNR)
Coupled signal can create harmonic terms, reducing spurious free dynamic
range (SFDR) & total harmonic distortion (THD)
Some sensors have own build-in ADC – directly connected with the
processor through a standard chip-to-chip protocol.
Microcontrollers have 1 or more internal ADCs to interface analog devices.
3
The Sensing Subsystem
2D and 3D acceleration of
Accelerometer Active Volcano Volcano activities
movements of people and objects
meter (AVM)
Capacitance
sensor PA Solute concentration Measure the water content of a soil
6
The Sensing Subsystem
Application
Sensor Sensed Event Explanation
Area
7
The Sensing Subsystem
Application
Sensor Area Sensed Event Explanation
Photo acoustic
Pipeline Gas sensing Detects gas leak in a pipeline
spectroscopy
8
Analog-to-Digital Converter
It consists of
processor chip
nonvolatile memory - stores program instructions
active memory - temporarily stores the sensed data
internal clock
12
Architectural Overview
14
Von Neumann Architecture
15
Harvard Architecture
Harvard architecture
provides separate memory spaces - storing program instructions and data
each memory space is interfaced with the processor with a
separate data bus
program instructions and data can be accessed at the same time
a special single instruction, multiple data (SIMD) operation, a special
arithmetic operation and a bit reverse
supports multi-tasking operating systems; but does not provide virtual
memory protection
17
Super-Harvard Architecture
19
Super-Harvard Architecture
Instruction Cache
Address Bs
Data Bus
I/O Controller
20
Microcontroller
Microcontroller is a computer on a single IC, consisting of a comparatively simple
central processing unit and additional components such as high-speed buses, a
memory unit, a watchdog timer and an external clock.
Structure of microcontroller
integrates the following components:
CPU core – 4 bit to complex 32 bit processors
volatile memory (RAM) for data storage
ROM, EPROM, EEPROM, or Flash memory for storing relatively simple
instruction program code.
parallel I/O interfaces
discrete input and output bits
clock generator
one or more internal analog-to-digital converters
19
serial communications interfaces
Microcontroller
Advantages:
suitable for building computationally less intensive, standalone
applications, because of its compact construction, small size,
low-power consumption, and low cost
high speed of the programming and eases debugging, because of
the use of higher-level programming languages
Disadvantages:
not as powerful and as efficient as some custom-made processors
(such as DSPs and FPGAs)
some applications (simple sensing tasks but large scale
deployments) may prefer to use architecturally simple but energy-
and cost-efficient processors
19
Outline
36
Communication Interfaces
37
Communication Interfaces
38
Serial Peripheral Interface
SPI (Motorola, in the mid-80s)
high-speed, full-duplex synchronous serial bus
does not have an official standard, but use of the SPI interface should
conform to the implementation specification of others - correct
communication.
ex: devices should agree whether to transmit the MSB or LSB first.
The SPI bus defines four pins:
MOSI (MasterOut/SlaveIn) or SIMO
used to transmit data from the master to the slave when a device is
configured as a master
MISO (MasterIn/SlaveOut) or SOMI
used to receive data from the master to the slave when a device is
configured as a slave.
SCLK (Serial Clock)
used by the master to send the clock signal that is needed to
synchronize transmission
used by the slave to read this signal synchronize transmission
CS (Chip Select) or SS (Slave Select) - communicate via the CS port
40
Connecting Devices with SPI bus
42
Inter-Integrated Circuit
The standard does not specify a CS or SS. Every
device type that uses I2C must have a unique address
that will be used to communicate with a device
In earlier versions, a 7 bit address was used, allowing
112 devices to be uniquely addressed - due to an
increasing number of devices, it is insufficient
Currently I2C uses 10 bit addressing
I2C is a multi-master half-duplex synchronous serial bus
only two bidirectional lines: (unlike SPI, which uses four)
Serial Clock (SCL)
Serial Data (SDA)
44
Inter-Integrated Circuit
45
Inter-Integrated Circuit
46
Communication in I2C
Old protocol
New protocol –
displayed with
the first two
bytes of
transfer and 10
bit address
Comparison
I2C
SPI
2 l i n e s reduce space and s i m p l i f y c i r c u i t l a y o u t ;
4 l i n e s enable f u l l - d u p l e x t ra ns mi s si on
Lowers c o s t s
Heterogeneous r e g i s t e r s s i z e allows f l e x i b i l i t y
Homogeneous r e g i s t e r s i z e reduces overhead
i n t h e de vi c e s t h a t a r e s up p o r te d .
49
The IMote Node Architecture
51
The IMote Node Architecture
A multiple-sensor board
contains :
a 12-bit, four channels
ADC
a high-resolution
temperature/humidity
sensor
a low-resolution digital
temperature sensor
a light sensor
the I2C bus is used to
connect low data rate
sources
the SPI bus is used to
interface high data rate
sources 52
The IMote Node Architecture
55
The XYZ Node Architecture
Consists of the four subsystems:
power subsystem
communication subsystem
mobility subsystem
sensor subsystem
56
The XYZ Node Architecture
59
The Hogthrob Node Architecture
By Bonnet et al in 2006
Designed for a specific application, namely, to monitor
pig production
Motivation:
monitors movements of a sow to predict onset of
estrus
so that appropriate care can be given for pregnant sows
60
The Hogthrob Node Architecture
61
The Hogthrob Node Architecture
62
The Hogthrob Node Architecture
63
Operating Systems
An operating System is
a thin software layer
resides between the hardware and the application layer
provides basic programming abstractions to application
developers
3
Operating Systems
Operating systems are classified as: single-task/
multitasking and single-user/multiuser operating systems
multi-tasking OS - the overhead of concurrent processing
because of the limited resources
single task OS - tasks should have a short duration
The choice of a particular OS depends on several
factors; typically functional and non-functional aspects
Functional Aspects Non-Functional Aspects
Data Types Separation of Concern
Scheduling System Overhead
Stacks Portability
System Calls Dynamic Reprogramming
Handling Interrupts
Multithreading
Thread-based vs. Event-based
Programming
Memory Allocation
4
TinyOS (Gay et al. 2007)
TinyOS is the most widely used, richly documented, and
tool-assisted runtime environment in WSN
static memory allocation
event-based system
27
TinyOS (Gay et al. 2007)
A component is made up of
a frame
command handlers
event handlers
a set of non-preemptive tasks
28
TinyOS (Gay et al. 2007)
Figure 4.1 Logical distinction between low-level and high-level components (Hill et al. 2000)
29
TinyOS (Gay et al. 2007)
Components are structured hierarchically and
communicate with each other through commands and
events:
higher-level components issue commands to lower-level
components
lower-level components signal events to higher-level
components
30
TinyOS (Gay et al. 2007)
The logical structure of components and component
configurations
A TinyOS components that uses an interface A TinyOS configuration that wires an interface
provider and an interface user
Figure 4.2
A TinyOS component providing an interface In Figure 4.3, Component B In Figure 4.4, a binding
expresses interest in between Component A
In Figure 4.2, Component A interface C by declaring a and Component B is
declares its service by call to command D1 and established through the
providing interface C, by providing an event Configuration E.
which in turn provides handler to process event
command D1 and signals D2.
event D2.
31
Tasks, Commands and Events
The fundamental building blocks of a TinyOS runtime
environment: tasks, commands, and events
enabling effective communication between the components of a
single frame
Tasks :
monolithic processes - should execute to completion - they
cannot be preempted by other tasks, though they can be
interrupted by events
possible to allocate a single stack to store context information
call lower level commands; signal higher level events; and post
(schedule) other tasks
scheduled based on FIFO principle (in TinyOS)
32
Tasks, Commands and Events
Commands:
non-blocking requests made by higher-level components to
lower-level components
split-phase operation:
a function call returns immediately
the called function notifies the caller when the task is completed
Events:
events are processed by the event handler
event handlers are called when hardware events occur
an event handler may react to the occurrence of an event in
different ways
deposit information into its frame, post tasks, signal higher level
events, or call lower level commands
33
Contiki (Dunkels et al. 2004)
Contiki is a hybrid operating system
an event-driven kernel but multi-threading with a dynamic linking
strategy
separate the kernel from processes
communication of services through the kernel by posting events
the kernel does not provide hardware abstraction
device drivers and applications communicate directly with the
hardware
the kernel is easy to reprogram and it is easy to replace services
42
Contiki (Dunkels et al. 2004)
For each SOS service:
it manages its own state in a private memory
the kernel keeps a pointer to the process state
it shares with other services the same address space
it implements an event handler and an optional poll handler
43
Contiki (Dunkels et al. 2004)
Figure 4.6 The Contiki operating system: the system programs are partitioned into core services and loaded programs
44
Contiki (Dunkels et al. 2004)
Figure 4.6 illustrates Contikiʼs memory assignment in
ROM and RAM
Basic assignment:
dispatch events
synchronous events
asynchronous events
periodically call polling handlers
the status of hardware components is sampled periodically
45
Service Structure
46
Service Structure
Figure 4.7 illustrates how application programs interact
with Contiki services
Contiki OS supports
dynamic loading
reconfiguration of services
This is achieved by defining
services
service interfaces
service stubs
service layers
47
Applications of Wireless Sensor Networks
Introduction
Background
Range of Applications
Examples of Category 2 WSN Applications
• Home Control
• Building Automation
• Industrial Automation
• Medical Applications
Examples of Category 1 WSN Applications
• Sensor and Robots
• Reconfigurable Sensor Networks
• Highway Monitoring
• Military Applications
• Civil and Environmental Engineering Applications
• Wildfire Instrumentation
• Habitat Monitoring
• Nanoscopic Sensor Applications
Another Taxonomy of WSN Technology
Conclusion
A short list of applications follows.
Military applications
Monitoring inimical forces
Monitoring friendly forces and equipment Home applications
Military-theater or battlefield surveillance Home automation
Targeting Instrumented environment
Battle damage assessment Automated meter reading
Nuclear, biological, and chemical attack detection and more . . .
and more . . . Commercial applications
Environmental applications Environmental control in industrial and office buildings
Microclimates Inventory control
Forest fire detection Vehicle tracking and detection
Flood detection Traffic flow surveillance
Precision agriculture and more . . .
and more . . .
Health applications
Remote monitoring of physiological data
Tracking and monitoring doctors and patients inside a
hospital
Drug administration
Elderly assistance
and more . . .
Introduction
• W S N s n o d e s (W N s ) c a n s e n s e t h e
environment, can communicate with
neighboring nodes, and can, in many
cases, perform basic computations on the
data being collected.
• WSNs support a wide range of useful
applications
Background
Sensor networks and systems into two basic categories:
• Category 1 WSNs (C1WSNs): almost invariably mesh-based
systems with multihop radio connectivity among or between WNs,
utilizing dynamic routing in both the wireless and wireline
portions of the network. Ex. Military theater systems.
• Category 2 WSNs (C2WSNs): point-to-point or multipoint-to-
point (starbased) systems generally with single-hop radio
connectivity to WNs, utilizing static routing over the wireless
network; typically, there will be only one route from the WNs to
the companion terrestrial/wireline forwarding node (WNs are
pendent nodes). Ex.Residential control systems
Characteristics of C1WSNs
• Sensor nodes (i.e., the WNs) do not support
communications on behalf of any other sensor nodes;
• The forwarding node supports only static routing to the
terrestrial network, and/or only one physical link to the
terrestrial network is present;
• The radio link is measured in hundreds of meters; and
• The forwarding node does not support data processing or
reduction on behalf of the sensor nodes.
Characteristics of C2WSNs
• Zigbee
• Bluetooth
• Wireless LAN
Zigbee
IEEE 802.15.1
Bluetooth is designed for high QoS, a variety of duty cycles, and moderate data rates in networks
with limited active nodes.
Wireless LAN
IEEE 802.15.3
For wide range of connectivity
Battery type used in WSN
Battery may be rechargeable or replaceable.
Majorly used battery types are
AA alkaline cells
Li-AA cell
Home Control
.
single point
Cont.,
A WSN used for building energy monitoring and control can improve
the same time, it can reduce the energy budget needed to condition the
space.
WSNs systems consist of wireless motes with relays that can turn lights off
The field of mobile robotics deals with mechanical aspects (the wheels, motors, grasping arms, or physical layout) as
well as with the logic aspects (the microprocessors, the software, and the telemetry).
• Can a mobile robot act as a gateway into a wireless sensor
network?
• Can sensor networks take advantage of a robot’s mobility and
a sensor network can be equipped with IEEE 802.11 capabilities to bridge the gap between
intelligence?
robotics and
wireless networks.
Motes equipped with 802.11 wireless capabilities can be added to a sensor network to act as wireless hubs.
Other motes in the network then utilize each other as links to reach the 802.11-equipped hubs; the hubs forward
the data packets to the main 802.11-capable gateway, which is usually a PC or laptop.
Sensor and Robots
WSN applications include preventive maintenance for
equipment in a semiconductor manufacturing fab, and sensor
networks for theme parks
Reconfigurable Sensor Networks
Military applications require support for tactical and surveillance
arrangements that employ reconfigurable sensor WNs that are capable of
forming networks on the fly.
Assembling themselves without central control, and being deployed
incrementally.
Reconfigurable ‘‘smart’’ WNs are self-aware, self-configurable, and
autonomous.
Self-organizing WSNs utilize mechanisms that allow newly deployed WNs to
establish connectivity (to build up a network topology) spontaneously. Also,
these networks have mechanisms for managing WN mobility (if any), WNs
reconfiguration, and WN failure (if and when that happens)
Highway
Monitoring
Transportation (traffic flow) is a sector that is expected to benefit
from increased monitoring and surveillance.
The system is installed along major highways; the digital sensor network gathers
lane-by-lane data on travel speeds, lane occupancy, and vehicle counts.
These basic data elements make it possible to calculate average speeds and travel
times. The data are then transmitted to the data center for reformatting.
The network monitors roadway conditions continuously on a 24/7 basis and provides
updates to the data center in real time. The system collects key traffic information, Typical
including vehicle speeds, counts (volume), and roadway density, transmitting the highway
data over a wireless network to a data center every 60 seconds. traffic-sensing
installation.
(Courtesy of
traffic.com)
Each center produces the information through a wide range of methods: video, aircraft,
mobile units, and monitoring of emergency and maintenance services frequencies.
Applications
include the following:
1. Private traffic information providers in the United States: The company’s realtime
and archived data offer valuable tools for a variety of commercial and
governmental applications.
2. Telematics: For mobile professionals and others, the company’s traffic
information complements in-vehicle navigation devices, informing drivers
not only how to get from point A to point B but how long it will take to get
there, or even direct them to an alternative route.
Military Surveillance