Presentation is loading. Please wait.

Presentation is loading. Please wait.

Nailah Shokre Al Madi Introduction to OMNeT++

Similar presentations


Presentation on theme: "Nailah Shokre Al Madi Introduction to OMNeT++"— Presentation transcript:

1 Nailah Shokre Al Madi nsalmadi06@cit.just.edu.jo Introduction to OMNeT++

2 Outline  What is OMNeT++?  Installing OMNeT++  OMNeT++ Main Components  Simple Example  WSN Routing Algorithms (ex: LEACH, PEGASIS)  WSN Example nsalmadi06@cit.just.edu.jo 2

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. www.Omnetpp.org nsalmadi06@cit.just.edu.jo 3

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

5 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() nsalmadi06@cit.just.edu.jo 6

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 nsalmadi06@cit.just.edu.jo 7

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. nsalmadi06@cit.just.edu.jo 8

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: 1. Reduces energy consumption within the cluster, 2. Performs data aggregation, which: reduces the amount of data. reduces the number of packets to send to the sink. nsalmadi06@cit.just.edu.jo 9

10 WSN Routing Algorithms LEACH - Low Energy Adaptive Clustering Hierarchy PEGASIS - Power–Efficient Gathering in Sensor Information System nsalmadi06@cit.just.edu.jo 10

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

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. nsalmadi06@cit.just.edu.jo 12

13 BS Id= Round/N Data Aggregation Phase Chain Construction Phase Power–Efficient Gathering in Sensor IS PEGASIS nsalmadi06@cit.just.edu.jo 13

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 nsalmadi06@cit.just.edu.jo 14

15 WSN Example Lets see Solar Leach Example ( you can download it from www.omnetpp.org) nsalmadi06@cit.just.edu.jo 15

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 nsalmadi06@cit.just.edu.jo 16

17 Resources - OMNeT++ Folder - Documentation - Tutorial - Samples - OMNeT++ website: omnetpp.org - Other WSN simulators: Castalia, NesCT, Jsim, NS2. nsalmadi06@cit.just.edu.jo 17


Download ppt "Nailah Shokre Al Madi Introduction to OMNeT++"

Similar presentations


Ads by Google