Sensors Network Simulators

Similar documents
Sensor Networks. Part 3: TinyOS. CATT Short Course, March 11, 2005 Mark Coates Mike Rabbat. Operating Systems 101

nesc Prof. Chenyang Lu How should network msg be handled? Too much memory for buffering and threads

The Emergence of Networking Abstractions and Techniques in TinyOS

Group Members: Chetan Fegade Nikhil Mascarenhas. Mentor: Dr. Yann Hang Lee

Sensors as Software. TinyOS. TinyOS. Dario Rossi Motivation

Programming Sensor Networks

Politecnico di Milano Advanced Network Technologies Laboratory. Internet of Things. TinyOS Programming and TOSSIM (and Cooja)

Towards a Wireless Lexicon. Philip Levis Computer Systems Lab Stanford University 20.viii.2007

TinyOS. Lecture Overview. UC Berkeley Family of Motes. Mica2 and Mica2Dot. MTS300CA Sensor Board. Programming Board (MIB510) 1.

Hardware Support for a Wireless Sensor Network Virtual Machine

TinyOS. Wireless Sensor Networks

Modeling of data networks by example: ns-2 (I)

nesc Ø Programming language for TinyOS and applications Ø Support TinyOS components Ø Whole-program analysis at compile time Ø Static language

TOSSIM simulation of wireless sensor network serving as hardware platform for Hopfield neural net configured for max independent set

Towards Robust and Flexible Low-Power Wireless Networking

Random Testing of Interrupt-Driven Software. John Regehr University of Utah

Self-Organization in Autonomous Sensor/Actuator Networks [SelfOrg]

A Roadmap for Hardware and Software Support for Developing Energy-Efficient Sensor Networks

Network Simulator 2: Introduction

Technology Perspective

System Architecture Directions for Networked Sensors[1]

CS 425 / ECE 428 Distributed Systems Fall 2014

Introduction to Programming Motes

CS434/534: Topics in Networked (Networking) Systems

Realistic Performance Analysis of WSN Protocols Through Trace Based Simulation. Alan Marchiori, Lin Guo, Josh Thomas, Qi Han

The Network Simulator Fundamentals. Downloads and further info at:

Politecnico di Milano Advanced Network Technologies Laboratory. TinyOS

NS-2: A Free Open Source Network Simulator

TOSSIM: Accurate and Scalable Simulation of Entire TinyOS Applications

Wireless Embedded Systems and Networking. How to get TinyOS open source dist.

System Architecture Directions for Networked Sensors. Jason Hill et. al. A Presentation by Dhyanesh Narayanan MS, CS (Systems)

MobilityFirst Future Internet Architecture. Samuel Nelson

TinyOS. Jan S. Rellermeyer

Network Simulators, Emulators and Testbeds

TinyOS: An Operating System for Wireless Sensor Networks

Simulation in Large Scale Sensor Networks

libcppa Now: High-Level Distributed Programming Without Sacrificing Performance

The Emergence of Networking Abstractions and Techniques in TinyOS

Politecnico di Milano Advanced Network Technologies Laboratory. Internet of Things. TinyOS Programming and TOSSIM

Programming TinyOS. Lesson 2. Execution Flow. Tasks. commands. Events generated by interrupts preempt tasks Tasks do not preempt tasks

TOSSIM: A Simulator for TinyOS Networks

EECE Hybrid and Embedded Systems: Computation

WSN Programming. Introduction. Olaf Landsiedel

Mobile and Ubiquitous Computing Routing Protocols. Niki Trigoni

CHAPTER 3: LITERATURE REVIEW 3.1 NEED FOR SIMULATION ENVIRONMENT IN WSN

Multithreading and Interactive Programs

Software-Defined Networking (SDN) Overview

Wireless Sensor Networks (WSN)

Ad hoc and Sensor Networks Chapter 3: Network architecture

Politecnico di Milano Advanced Network Technologies Laboratory. Internet of Things. TinyOS Programming and TOSSIM (and Cooja)

Ad hoc and Sensor Networks Chapter 3: Network architecture

Cache and Forward Architecture

Exam Ad Hoc and Sensor Networks HS 2007

Sensor Networks. Dr. Sumi Helal & Jeff King CEN 5531

Static Analysis of Embedded C

A Comparative Study of Various Network Simulation Tools

Lecture 8 Wireless Sensor Networks: Overview

Introduction to Parallel Performance Engineering

CPSC 213. Introduction to Computer Systems. I/O Devices, Interrupts and DMA. Unit 2a Oct 27, 29, 31. Winter Session 2014, Term 1

Accurate Emulation of Wireless Sensor Networks

Intel Research mote. Ralph Kling Intel Corporation Research Santa Clara, CA

A Survey of Simulation in Sensor Networks

ATEMU: A Fine-grained Sensor Network Simulator

Ad hoc and Sensor Networks Chapter 3: Network architecture

Visual Profiler. User Guide

Outline. Threads. Single and Multithreaded Processes. Benefits of Threads. Eike Ritter 1. Modified: October 16, 2012

Network Simulator 2. Telematica I (CdL Ing. INF) Ing. Giuseppe Piro.

Cooperative Wireless Communications. Ashutosh Sabharwal

Mobile Routing : Computer Networking. Overview. How to Handle Mobile Nodes? Mobile IP Ad-hoc network routing Assigned reading

Operating Systems. Operating System Structure. Lecture 2 Michael O Boyle

Title. EMANE Developer Training 0.7.1

AgentJ: Enabling Java NS-2 Simulations for Large Scale Distributed Multimedia Applications

CSC8223 Wireless Sensor Networks. Chapter 3 Network Architecture

Sensor Network Application Development ZIGBEE CONCEPTS 0

Evaluation Strategies. Nick Feamster CS 7260 February 26, 2007

Mercury System SB310

An Intrusion Detection System for Critical Information Infrastructures Using Wireless Sensor Network Technologies

Presented by: Murad Kaplan

Advanced Computer Networks. Wireless TCP

Mesh Networking Principles

Exploration of New Simulation Tools for Wireless Sensor Networks

3L Diamond. Multiprocessor DSP RTOS

WSN Programming. Introduction. Olaf Landsiedel. Programming WSNs. ! What do we need to write software for WSNs?! Programming language

UML MODELLING OF DESIGN PATTERNS FOR WIRELESS SENSOR NETWORKS

Introduction to QualNet

Tag a Tiny Aggregation Service for Ad-Hoc Sensor Networks. Samuel Madden, Michael Franklin, Joseph Hellerstein,Wei Hong UC Berkeley Usinex OSDI 02

Chap.6 Limited Direct Execution. Dongkun Shin, SKKU

Crossbow: MoteWorks Getting Started Guide. Presented by Catherine Greene, Bretny Khamphavong, Chloe Norris, and Nancy White

Implementation of Feedback Mechanism into AODV based on NS2

Contiki a Lightweight and Flexible Operating System for Tiny Networked Sensors

BeiHang Short Course, Part 5: Pandora Smart IP Generators

Mohammad Hossein Manshaei 1393

Object Orientated Analysis and Design. Benjamin Kenwright

Wireless Sensor Architecture GENERAL PRINCIPLES AND ARCHITECTURES FOR PUTTING SENSOR NODES TOGETHER TO

OCF for resource-constrained environments

Politecnico di Milano Advanced Network Technologies Laboratory. Internet of Things. Contiki and Cooja

Ubiquitous Sensor Network KIM, YONG-WOON ETRI

TinyDiffusion Application Programmer s Interface (API) 0.1

A VIRTUALLAB APPROACH FOR WIRELESS SENSOR MOTES AND WIRELESS SENSOR NETWORKS

Simulations: ns2 simulator part I a

Transcription:

Sensors Network Simulators Sensing Networking Qing Fang 10/14/05 Computation

This Talk Not on how to run various network simulators Instead What differentiates various simulators Brief structures of the major simulators and their design considerations Goal: understand what simulations can really achieve and which simulator to choose for your purpose. Pointers to how to get started.

Outline Network simulation 1-2-3 NS-2 TOSSIM NS-2 vs. TOSSIM

When a network simulator is needed? User System Application Application Network Stack Threads Transport Network Address Space Files Data Link Physical Layer Drivers If it s necessary to include the networking behaviors (multiple access control, flow control, etc.) to make your point. And You care about performance metrics, such as: packet loss, delay, etc. in an eventdriven distributed environment. Routers

Developing Protocols The distributed world view Event-driven programming Use of timers

Choosing a Simulator Accuracy expressiveness Scalability simple, only keep minimal fidelity to observe critical phenomena How much learning involved vs. how much time you have

Simulators for Sensornet Research NS-2: the de facto general network simulator (Multiple institutions funded by DARPAR, NSF). TOSSIM: the TinyOS mote simulator (Berkeley). SensorSim: built on top of ns-2 for WINS platform. No longer supported (UCLA). EmStar: a flexible environment for transitioning between simulation and deployment for ipaq-class sensors (UCLA) TOSSF: limited documentation, looks promising (Dartmouth)

NS-2 vs. TOSSIM 1. The predominant network simulator 2. Simulates networks at the packet level 3. Allows a wide range of heterogeneous network configurations. Built-in propagation models. 4. Simulates networking stacks from the physical layer all the way to the transport layer 1. A TinyOS simulator that provides a network model 2. Simulates at the bit level 3. External radio models 4. Component oriented modeling after TinyOS 5. Better GUI

NS-2 Wired and Wireless Size : (Current release adds around 10%) 100K lines of C++ 70K lines of OTcl 30K lines of test suites 20K lines of documentation

NS Architecture Completely follow the OSF layered architecture Object-oriented (C++, OTcl) Scalability + Extensibility Control/primitive separation Split Otcl/C++ object Modular approach Fine-grained object composition High reusability

C++ and Otcl Separation C++ for computation OTcl for control (programmable simulator) Periodic or triggered action Compromise between composibility and speed Learning and debugging

OTcl and C++: The Duality

NS2 Disadvantages Does not work well for large topologies(more than 300 nodes), but there is a work around for that when nodes are immobile Large memory footprint 100 nodes 23MB 1000 nodes 412 MB

Don t worry about Otcl. Its easy.. To Use NS2 Forget about Nam traces (slow, ugly, hard to see useful info anyway). Write your own visualization program if you want to impress others. The online documentation is quite resourceful. Get started as soon as possible. Adding new protocols by simply adding new subclasses of agent at the appropriate places. Some internal changes might be necessary.

Basics to Learn Write the configuration file in Otcl (plenty of examples on-line). How files are structured (read the manual and poke around in the ns directory). How to add a protocol: the agent class the packet.h file the void recv ( Packet * pkt, Handler* h) function in C++ the Otcl interface (the int command(int argc, const char*const* argc)) to its C++ function

My Own Experience with NS-2 Layered structure, easy to understand its logic flows Once understand how they interact and how the files are structured (a steep initial learning curve), easy to hack. The built-in routing algorithms could be buggy.

Goals of TOSSIM Scalability: able to handle large networks Completeness: capture complete system behavior Fidelity: capture behavior at a fine-grain Bridging: the gap between algorithms and implementation

The Radio Model Radio models external to TOSSIM Models network as a directed graph of bit error probabilities, which can be changed at runtime. Allows asymmetric links.

TOS Application = Graph of Components application Route map router sensor appln Active Messages bit byte packet Radio Packet Radio byte RFM Serial Packet UART Temp ADC photo clocks SW HW Example: ad hoc, multi-hop routing of photo sensor readings Graph of cooperating state machines on shared stack

A Multihop Routing Example

TOSSIM Architecture

Communication Services Allows PC applications (TCP/IP etc) to drive, monitor, debug simulation. TinyViz a java-based GUI allowing simulations to be visualized, analyzed and controlled. TinyViz engine manage the event/command interface between user plugins to TOSSIM.

A TinyViz Example Setting ADC values

Programming TOSSIM Write your own component (or modify the existing ones), assemble your application. Write your own plugins (states you want to observe or control) if needed. Comparatively easy to learn if you are not new to event-driven programming.

Things Can Make TOSSIM More Appealing CPU modeling : run-instantly model Energy modeling Supporting heterogeneous platforms

TOSSIM Summary The same code can be used both for simulation and testbed deployment. Fine-grained simulation, scalable to thousands of nodes (claimed). Does not address energy profiling. Applicable only on TinyOS platform.

NS-2 vs. TOSSIM - A Recap 1. The predominant network simulator 2. Simulates networks at the packet level 3. Allows a wide range of heterogeneous network configurations. Built-in propagation models. 4. Simulates networking stacks from the physical layer all the way to the transport layer 1. A TinyOS simulator that provides a network model 2. Simulates at the bit level 3. External radio models 4. Component oriented modeling after TinyOS 5. Better GUI 6. Comparatively easier to learn

After All Why do we need simulations in the first place? Controlled, Reproducible testing environment Cost-effective, alternative to real deployment Means to explore and improve design space while factoring into uncertainties (system, environment, etc.) So, be clear what you want, i.e. at what level of details you want your simulation to be. Then, design sensible scenarios and be specific in reporting how you made comparisons.

More Detailed Questions? Talk to the TA

The End

Components Modules provide code that implements one or more interfaces and internal behavior Configurations link together components to yield new component Interface logically related set of commands and events StdControl.nc Clock.nc interface StdControl { command result_t init(); } command result_t start(); command result_t stop(); interface Clock { command result_t setrate(char interval, char scale); event result_t fire(); }