Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to OMNeT++

Similar presentations


Presentation on theme: "Introduction to OMNeT++"— Presentation transcript:

1 Introduction to OMNeT++
Nailah Shokre Al Madi

2 Outline What is OMNeT++? Installing OMNeT++ OMNeT++ Main Components
Simple Example WSN Routing Algorithms (ex: LEACH, PEGASIS) WSN Example

3 What is OMNeT++? OMNeT++ is a C++-based discrete event simulator for modeling communication networks, multiprocessors and other distributed systems. A new simulator for wireless sensor networks. Its results are very close to real world results.

4 Installing OMNeT++ To install OMNeT++: Install Microsoft Visual C++.
Install OMNeT (binary release) for windows. OMNET++ version 4, released in November 2008. OMNET++ Mailing List; you can send a message to the mailing list

5

6 OMNET++ Main Components
Your simulation must have 4 files: omnetpp.ini   Specify: network, simulation speed, output-scalar-file, network area (x,y),number of nodes, other parameters,   module. ned     Defines the network and the modules in side it, and each module ( its gates and other parameters).   module.cc , module.h        Define the functionality of each module, mainly include: initialize() handleMessage(cMessage * msg) finish()

7 Simple Example After creating the files ( .ned, .cc, .h, and omnetpp.ini) Open cmd console and go to your algorithm folder: Important: make sure that your path doesn’t contain any spaces. OR it will not run. Write these : opp_nmakemake -f nmake -f makefile.vc depend nmake -f makefile.vc Algo.exe will result Algo.  lets go to TicToc example

8 WSN Routing Algorithms
Wireless Sensor Network- WSN: a collection of a large number of sensors without the support of pre-existing infrastructure, distributed to be close to the phenomena being monitored. WSN main drawback is limited energy supported in sensors. (limited rechargeable, un-replaceable batteries) Main factor of energy consumption is communication: Transmitting, Receiving (consumes less). Routing algorithms control communication.

9 WSN Routing Algorithms
Cluster based routing algorithms: routing algorithms based on the idea of creating clusters to collect the data and route it from the sensors to the sink (BS). It is efficient because it: Reduces energy consumption within the cluster, Performs data aggregation, which: reduces the amount of data. reduces the number of packets to send to the sink.

10 WSN Routing Algorithms
LEACH - Low Energy Adaptive Clustering Hierarchy PEGASIS - Power–Efficient Gathering in Sensor Information System

11 Low Energy Adaptive Clustering Hierarchy LEACH
Random < p/(1- p*(r mod 1/p) )? Steady-state Phase a b Setup Phase 1. Advertisement Phase 2. Cluster Setup Phase 3. Schedule creation d c BS a b c d

12 LEACH Advantages: Energy savings due to combining lossy compression with the data routing. It distributes energy-usage among the nodes; nodes die randomly and at the same rate. Disadvantage Doesn’t ensure that CH’s are uniformly placed across the whole sensor field, CH’s transmit data directly to the distant BS, while members sends to a close CH.

13 Power–Efficient Gathering in Sensor IS PEGASIS
Chain Construction Phase Data Aggregation Phase BS Id= Round/N

14 PEGASIS Advantages: Saving energy by minimizing:
The transmission distance The number of transmissions and receives for each node Each node will be the leader once every 100 rounds (for 100 nodes network). Disadvantages Main: long chain and the very high delay probability; Nodes may have distant neighbours along the chain. Increasing neighbour distances will have a significant effect on PEGASIS performance

15 WSN Example Lets see Solar Leach Example
( you can download it from

16 Statistics - Scalars To test a value through the simulation and create a graph of its behavior. Use this in the .cpp files: recordScalar(“ValName", Value); ex: recordScalar("Rounds", this->rdone); recordScalar(" Dead Nodes", this->deadnodes); In omnetpp.sca file : The recorded values. Creating the graphs for values

17 Resources OMNeT++ Folder Documentation Tutorial Samples
OMNeT++ website: omnetpp.org Other WSN simulators: Castalia,  NesCT, Jsim, NS2.


Download ppt "Introduction to OMNeT++"

Similar presentations


Ads by Google