Unit VI Infrastructure Establishment for WSN • Localization and Positioning, tracking: Properties of positioning, Possible approaches, Task driven Sensing, Rolls of Sensor nodes and utilities, Information based sensor tracking, joint routing and information aggregation, Sensor Network Databases-BIGDATA, Sensor network platforms and tools, Single-hop localization, Positioning in multi-hop environments, Impact of anchor placement, • Operating Systems for WSN: OS Design Issues, Examples of OS(Architecture, Design Issues, Functions): Tiny OS, Mate, Magnet OS, MANTIS, Nano-RK OS Architecture Block Diagram, LiteOS Architectural Block Diagram, LiteFS Architectural Block Diagram, Content delivery networks. Introduction to Internet of Things(IoT). Prepared by : Prof. Mrs R. A. Satao 1 Infrastructure Establishment for WSN Prepared by : Prof. Mrs R. A. Satao 2 Prepared by : Prof. Mrs R. A. Satao 3 Architecture Prepared by : Prof. Mrs R. A. Satao 4 Infrastructure Establishment for WSN Definition: The task of initiating collaborative environment for sensor network when that network is activated is called infrastructure establishment. Prepared by : Prof. Mrs R. A. Satao 5 Infrastructure Establishment for WSN When sensor network is activated various task must be performed to establish necessary infrastructure that will allow useful collaborative work to be performed: 1) Discovering other nodes 2) Radio power adjustment to ensure adequate connectivity. 3) Cluster formation. 4) Node placement in a common temporal and spacial framework. Prepared by : Prof. Mrs R. A. Satao 6 Infrastructure Establishment for WSN Some common techniques used to establish the network are: 1) Topology control 2) Clustering 3) Time synchronization 4) Localization Prepared by : Prof. Mrs R. A. Satao 7 1) Topology control : idle node : Active node Prepared by : Prof. Mrs R. A. Satao 8 1) Topology control • A sensor node that wakes up execute a protocol to discover which other nodes it can communicate with. (bidirectional) • At initial state each node try to connect with neighbors according to the radio link capacity of its own. • The neighbor is determined by the radio power of the node as well as local topology and other conditions that may degrade performance of the radio link. • Sensor node are capable of broadcasting less that their maximum possible radio power. (for energy saving and network lifetime) • Example : Homogeneous topology : all nodes with same transmission range. Prepared by : Prof. Mrs R. A. Satao 9 Critical Transmission Range Problem Computing minimum common transmitting range “ r ” such that the network is connected. Solution : 1) Depends on physical placement of the node. 2) If node location is known CTR problem has a simple solution. CTR is defined as longest edge of minimum spanning tree Prepared by : Prof. Mrs R. A. Satao 10 Solution to CTR problem Example : GRG (Geometric Random Graph): N points are distributed into a region according to some distribution and then some aspect of the node placement is investigated with high probability Prepared by : Prof. Mrs R. A. Satao 11 2) Clustering Clustered Architecture Layered Architecture Base Station Base Station Layer 1 Layer 2 Layer 3 Larger Nodes denote Cluster Heads Prepared by : Prof. Mrs R. A. Satao 12 2) Clustering Hierarchical architecture enables more efficient use of sensor resources such as: • Frequency spectrum • Bandwidth • Power Advantages: 1) Health monitoring of network is easy. 2) Identifying misbehaving node is easy. 3) Some nodes can act as watchdogs for other nodes. 4) Maintenance of network is easy. Prepared by : Prof. Mrs R. A. Satao 13 2) Clustering Cluster formation: 1) Initially unique ids (UIDs) are assigned to each node 2) Node with higher ID than its uncovered neighbors declares itself as cluster head. 3) Cluster head nominated nodes then communicate with each other. 4) Node that can communicate with two or more cluster heads may become gateway. Gateway : node that aid in passing traffic from one cluster to other. Uncovered neighbors : node that have not been already claimed by another cluster head. Prepared by : Prof. Mrs R. A. Satao 14 3) Time Synchronization • Every node is operating independently so their clocks may not be synchronized with each other. • It is important to run network efficiently • to detect events • for localization • estimating internodes distances. • to arrange TDMA schedule Prepared by : Prof. Mrs R. A. Satao 15 3) Time Synchronization • In wired network NTP is used to achieve coordinated universal time (UTC). • In NTP highly accurate clock is mounted on one of the machine of the network. This is not applicable for WSN : • No master clocks are available. • Inconsistent common delay. • Connections are variable/dynamic and unpredictable. Prepared by : Prof. Mrs R. A. Satao 16 3) Time Synchronization • Time difference caused by the lack of common time origin is called as clock phase difference or clock bias. • Methods for clock synchronization in WSN : 1) Clock phase diff estimation using three msg exchanges. 2) Interval method. 3) Reference broadcast. Prepared by : Prof. Mrs R. A. Satao 17 4 ) Localization and Localization Services • What? – To determine the physical coordinates of a group of sensor nodes in a wireless sensor network (WSN) – Due to application context, use of GPS is unrealistic, therefore, sensors need to self-organize a coordinate system • Why? – To report data that is geographically meaningful – Services such as routing rely on location information; geographic routing protocols; context-based routing protocols, location-aware services Localization in Wireless Sensor Networks In general, almost all the sensor network localization algorithms share three main phases • DISTANCE ESTIMATION • POSITION COMPUTATION • LOCALIZATION ALGHORITHM Localization in Wireless Sensor Networks • The distance estimation phase involves measurement techniques to estimate the relative distance between the nodes. • The Position computation consists of algorithms to calculate the coordinates of the unknown node with respect to the known anchor nodes or other neighboring nodes. • The localization algorithm, in general, determines how the information concerning distances and positions, is manipulated in order to allow most or all of the nodes of a WSN to estimate their position. Optimally the localization algorithm may involve algorithms to reduce the errors and refine the node positions. Distance Estimation There are four common methods for measuring in distance estimation technique: • ANGLE OF ARRIVAL (AOA) • TIME OF ARRIVAL (TOA) • TIME DIFFERENT OF ARRIVAL (TDOA) • THE RECEIVED SIGNAL STRENGH INDICATOR (RSSI) Distance Estimation • ANGLE OF ARRIVAL method allows each sensor to evaluate the relative angles between received radio signals • TIME OF ARRIVAL method tries to estimate distances between two nodes using time based measures • TIME DIFFERENT OF ARRIVAL is a method for determining the distance between a mobile station and nearby synchronized base station • THE RECEIVED SIGNAL STRENGTH INDICATOR techniques are used to translate signal strength into distance. Position Computation The common methods for position computation techniques are: • LATERATION • ANGULATION Position Computation • LATERATION techniques based on the precise measurements to three non collinear anchors. Lateration with more than three anchors called multilateration. • ANGULATION or triangulation is based on information about angles instead of distance. Classifications of Localization Methods • • • • According to the ways of Sensors implementation, we classify the current wireless sensor network localization algorithms into several categories such as: Centralized vs Distributed Anchor-free vs Anchor-based Range-free vs Range-based Mobile vs Stationary Sensor Tasking and Control • Because of Limited battery power and Limited bandwidth careful tasking and the control id needed. • Information collected from the sensors. – All information aggregation is needed. – Selective information aggregation is needed. • Which sensor nodes to activate and what information to transmit is a critical issue. • Classical algorithms are not suitable for WSN : – Sense values are not known. – Cost of sensing may vary with the data. Designing strategy for Sensor Tasking and Ctrl: 1) What are the important object in the environment to be sensed ? 2) What parameters of these object are relevant? 3) What relations among these objects are critical to whatever high level information we need to know? 4) Which is the best sensor to acquire a particular parameter? 5) How many sensing and the communication operations will be needed to accomplish the task? 6) How coordinated do the world models of the different sensor need to be ? 7) At what level do we communicate information in a spectrum from a signal to symbol? Roles of Sensor nodes and utilities Prepared by : Prof. Mrs R. A. Satao 31 Roles of Sensor nodes Sensors R SR S SR I S S Prepared by : Prof. Mrs R. A. Satao 32 Prepared by : Prof. Mrs R. A. Satao 33 Prepared by : Prof. Mrs R. A. Satao 34 Prepared by : Prof. Mrs R. A. Satao 35 Prepared by : Prof. Mrs R. A. Satao 36 Prepared by : Prof. Mrs R. A. Satao 37 Prepared by : Prof. Mrs R. A. Satao 38 Information Driven Sensor Querying Prepared by : Prof. Mrs R. A. Satao 39 Prepared by : Prof. Mrs R. A. Satao 40 Prepared by : Prof. Mrs R. A. Satao 41 Prepared by : Prof. Mrs R. A. Satao 42 Prepared by : Prof. Mrs R. A. Satao 43 Prepared by : Prof. Mrs R. A. Satao 44 Sensor Network Databases • Sensor Network as Database: Think of a sensor network as a distributed database that store data within the network and allow queries to be injected anywhere in the network. • Research issues – how is data stored and organized after sensing – what’s the user interface to the sensor database – How does an external query find and process the data in an efficient manner? Prepared by : Prof. Mrs R. A. Satao 45 Challenges – The system is highly volatile. – Relational tables are not static. • New data is continuously sensed. – High communication cost. • In-net processing during query execution. – Arbitrarily long delay and rate of data arrival is variable – Limited storage • Older data has to be discarded • Keep statistics – Long-running, continuous queries. Prepared by : Prof. Mrs R. A. Satao 46 Querying the physical world – Common user operations in sensor network: • Queries • Actuate & control – Query: user specify the data they want • Simple, SQL-like queries • Using predicates, not specific addresses – Challenge is to provide: • Expressive and easy-to-use interface • High-level operators • Power efficient execution framework – Do sensor networks change query processing? Prepared by : Prof. Mrs R. A. Satao 47 Type of queries – Historical • What is the average rainfall over past 2 days? – Current • What is the current temperature in Lab_no 3 at building no 5 ? – Long running, continuous • Obtain an ID whenever sensors in region R detects person. Prepared by : Prof. Mrs R. A. Satao 48 Example Query – High-level query interface such as SQL For next 3 hours, retrieve every 10 minutes the max rainfall level in each county in California, if it is greater than 3.0 inch. SELECT max (rainfal_Level) ,county FROM sensors Where STATE = California GROUP BY country HAVING max (rainfal_Level) > 3.0in DURATION [ now, now+180min] SAMPLING PERIOD 10 min Prepared by : Prof. Mrs R. A. Satao 49 Sensor Database Properties 1. Persistence: Data stored in the system must remain available to queries, despite sensor node failures and changes in the network topology. 2. Consistency: A query must be routed correctly to a node where the data are currently stored. If this node changes, queries and stored data must choose a new node consistently. 3. Controlled access to data: Different update operations must not undo one another’s work, and queries must always see a valid state of the database. Prepared by : Prof. Mrs R. A. Satao 50 Sensor Database Properties… 4. Scalability in network size: As the number of nodes increases, the system’s total storage capacity should increase, and the communication cost of the system should not grow unduly. 5. Load balancing: Storage should not unduly burden any one node. Nor should any node become a concentration point of communication. 6. Topological generality: The database architecture should work well on a broad range of network topologies. Prepared by : Prof. Mrs R. A. Satao 51 Issues – How to identify relevant sensors? – Computation vs. communication tradoff Where to process query? • Inside the sensor network (route query) • At centralized location (route data) –Large amount of data transfer not efficiency • How to process? Prepared by : Prof. Mrs R. A. Satao 52 Cougar Sensor Network Database • SQL type query interface. • Distributed query execution. • Represents each sensor as ADT (applies encapsulation as OOP). • Each measurement is associate with a time stamp. • Whenever a signal processing function returns value a record is inserted into virtual relations (never updated or deleted). Prepared by : Prof. Mrs R. A. Satao 53 Probabilistic queries • Uncertainty in reading due to noise environmental disturbances. • Gaussian ADT (GADT) which models probability distribution function over possible measurement values. • Example SELECT * From Sensors WHERE Sensor.Temp.Prob([67.5,68.5]>=0.6) Prepared by : Prof. Mrs R. A. Satao 54 TinyDB Query Processing • System designed to support in-network aggregate query processing. • SQL type query interface. • Support functions like: min,max,count,sum,average Prepared by : Prof. Mrs R. A. Satao 55 Data Indices and Range Queries – Key idea: pre-storing the answers to certain special queries – One-dimensional indices • Canonical subset: the subset of data forming pre-stored answers. – Example: • Counting cars passing in each sensor • Query for counts over various contiguous segments of the road. 56 One-Dimensional Indices u4=s0S1s2 s3 s4 s5 s6 s7 … – Build a binary tree: • Map ui to si-1 • An internal node aggregates counts from all its descendant sensors in the tree • If query for segment between s0 an s4, can get answer from u2( stored in s1) • Any segment can be answered by combining subtrees – Partial data aggregation: key for indexing range queries u1=s0S1 u3=s2 s3 u4 u2 u1 s0 u7 u3 u5 s1 s2 s3 s4 s5 s6 u6 s7 57 Multi-dimensional Indices Select * From event s Where Temp >=50 and Temp<=60 and Light >=5 and Light <10 Light_reading 40 30 20 10 0 10 20 30 40 50 60 70 Temperature 58 Sensor Network Platforms and tools • Commercially available sensor nodes : 1. Specialized sensing platform such as Spec node designed at University of California-Berkeley. 2. Generic Sensor platform – Berkeley Mote. 3. High bandwidth sensing platform such as iMote. 4. Gateway Platform such as Stargate. (sink node). Prepared by : Prof. Mrs R. A. Satao 59 60 Mica2 Wireless Sensors MTS310 Sensor Boards • Acceleration, • Magnetic, • Light, • Temperature, • Acoustic, • Sounder New MicaZ follows IEEE 802.15.4 Zigbee standard with direct sequence spred spectrum radio and 256kbps data rate OS Design issues • • • • Should be compact and small in size. Should provide real time support. Should provide efficient resource management. Should provide reliable and efficient code distribution. • Should support Power Management. • Should provide generic programming interface. Prepared by : Prof. Mrs R. A. Satao 62 TinyOS • Started out as a research project at Berkeley goal: conserving resources • No file system. • No dynamic memory allocation. • No memory protection. • Very simple task model. • Minimal device and networking abstractions. • Application and OS are coupled—composed into one image. • Supports event based model. • Sleep mode facility is provided. • Commands are non blocking requests with return status. 63 TinyOS components • Components: reusable building blocks • Each component is specified by a set of interfaces – Provide “hooks” for wiring components together • A component C can provide an interface I – C must implement all commands available through I – Commands are methods exposed to an upper layer • An upper layer can call a command • A component C can use an interface J – C must implement all events that can be signaled by J – These are methods available to a lower layer • By signaling an event, the lower layer calls the appropriate handler • Components are then wired together into an application I C J 64 Mate • Is designed to work on the top of the TinyOS as one of its components. • It is a byte code interface aims to make TinyOS accessible to non expert programmers. • Also provides execution environment. • Program code is made up of capsules.(each capsule contains 24 instructions- 1 byte each) • Capsules types : msg send , msg rec , timer , subroutine. Prepared by : Prof. Mrs R. A. Satao 65 MagnetOS • Distributed adaptive Operating System for application adaption and Energy conservation. • Goals : 1) Adapt to underlying resource and its changes in stable manner. 2) Efficient energy conservation. 3) Provide general abstraction for applications. 4) To be scalable for large networks. Prepared by : Prof. Mrs R. A. Satao 66 MagnetOS • Is a Single System Image (SSI) or Single unified Java Virtual machine with static and dynamic components. • Dynamic Components are used for : monitoring , object creation, invocation, migration. • provide two online power aware algorithms : NetPull and NetCenter • NetPull and NetCenter use in moving components within the network to reduce energy consumption and extend network Lifetime. Prepared by : Prof. Mrs R. A. Satao 67 MANTIS • The MultimodAl system for NeTworks of In-situ wireless Sensors (MANTIS) provides a new multithreaded operating system for WSNs. • MANTIS is a lightweight and energy efficient operating system. • Includes kernel, scheduler, and network stack. • It is portable across multiple platforms, i.e., we can test MOS applications on a PDA or a PC Prepared by : Prof. Mrs R. A. Satao 68 MANTIS • MOS also supports remote management of sensor nodes through dynamic programming. • MOS is written in C and it supports application dev. in C. • MOS uses preemptive priority-based scheduling. • MOS uses a UNIX-like scheduler. • The length of time slice is configurable, by default it is set to 10 milliseconds (ms). • Context switches are also triggered by system calls and semaphore operations. • Energy efficiency is achieved by the MOS scheduler by switching the microcontroller to sleep mode when application threads are idle. Prepared by : Prof. Mrs R. A. Satao 69 Nano-RK Architeture • Nano-RK is a fixed, preemptive multitasking real-time OS. • The design goals for Nano-RK are: 1) Multitasking, 2) Support for multi-hop networking, 3) Support for priority-based scheduling, 4) Timeliness and schedulability, 5) Extended WSN lifetime, 6) Application resource usage limits, and small footprint. • It supports hard and soft real-time applications by the means of different real-time scheduling algorithms, • socket-like abstraction for N/W and supports FireFly and MicaZ sensing platforms. Prepared by : Prof. Mrs R. A. Satao 70 Nano-RK Architeture Prepared by : Prof. Mrs R. A. Satao 71 Lite OS • LiteOS is a Unix-like operating system designed for WSNs at the University of Illinois at Urbana-Champaign. • Unix-like OS for WSN, • Provide system programmers with a familiar programming paradigm . • A hierarchical file system, support for object-oriented programming in the form of LiteC++, and a Unix-like shell. • The footprint of LiteOS is small enough to run on MicaZ nodes. • LiteOS is primarily composed of three components: LiteShell, LiteFS, and the Kernel. Prepared by : Prof. Mrs R. A. Satao 72 Lite OS Prepared by : Prof. Mrs R. A. Satao 73