16

Click here to load reader

Mannasim for NS2

Embed Size (px)

Citation preview

Page 1: Mannasim for NS2

Mannasim - a Sensor network simulator

T S Pradeep Kumar, VIT Chennai

http://www.nsnam.com

Page 2: Mannasim for NS2

IntroductioN• http://www.mannasim.dcc.ufmg.br/

• Mannasim comes with

• A sensor simulator that simulates a Carbon monoxide and temperature sensor

• a script generator tool to generate tcl files for testing the network

Page 3: Mannasim for NS2

Classes in Mannasim• SensorNode (sensorNode.h and .cc) extends MobileNode

• Battery (battery.h and .cc) extend EnergyModel

• DataGenerator (dataGenerator.h and .cc) extends TclObject

• TemperatureDataGenerator (temperatureDataGenerator.h and .cc) extends DataGenerator

• TemperatureAppData (temperatureAppData.h and .cc ) extends AppData

• Processing (processing.h and .cc) extends TclObject

Page 4: Mannasim for NS2

Classes in Mannasim• SensedData (sensedData.h and .cc) extends AppData

• OnDemandData (onDemandData.h and .cc) extends SensedData

• OnDemandParameter(onDemandParameter.h and .cc) extends AppData

• SensorBaseApp (sensorBaseApp.h and .cc) extends Application

• CommonNodeApp (commonNodeApp.h and .cc) extends SensorBaseApp

• ClusterHeadApp (ClusterHeadApp.h and .cc) extends SensorBaseApp

Page 5: Mannasim for NS2

Classes in Mannasim

• Each class has their own variables and functions

• Users are requested to go through the source code for understanding the algorithm for each class.

Page 6: Mannasim for NS2

TCL Parameters• Transport Protocol (TCP, UDP)

• Routing Protocol (DSR, TORA, LEACH, Directed Diffusion, DSDV and AODV)

• Medium Access Control (MAC) - MAC/802_11

• Link Layer - LL

• Physical Layer (either Crossbow Mica2 or 914MHz Lucent WaveLAN DSSS radio interface).

• Antenna An omnidirectional antenna, centered in node position and 1.5 meters above the ground is provided.

• Radio Propagation (FreeSpace, Shadowing, ShadowingVis, TwoRayGround).

• Interface Queue (IFQ) (DropTail (default), DropTail/XCP, RED, RED/Pushback, RED/RIO, Vq and XCP.)

• IFQ Length - 50 bytes

• Battery (Mannasim Battery model is used.)

• Scenario Size (in meters with x and y length)

Page 7: Mannasim for NS2

TCL - Access point details• Access Point Number - Number of access points in the WSN.

One access point.

• Access Point Location - Seven options are provided: Center (default), Down Left Corner, Down Right Corner, Grid, Random, Up Left Corner and Up Right Corner

• Initial Energy - 100.0 joules default

• Access Point Application - Provides a new instance of an access point in simulation scenario.

• Transmission Range - Communication range for access point node. Default range is set to 100.0 meters.

Page 8: Mannasim for NS2

TCL - Cluster Head Configuration

• Cluster Head Number - Number of clusters, and consequently cluster heads in the WSN. 0 for non hierarchical WSN

• Cluster Head Location - Random or Grid.

• Initial Energy - 10.0 joules default.

• Cluster Head Application - Provides a new instance of a cluster head in simulation scenario.

• Processing Type - Aggregate processing - Specifies how received data from cluster sons should be processed

• Transmission Range - Default range is set to 70.0 meters.

• Dissemination Type - Dissemination type for processed data. Three kinds of dissemination are provided: Continuous, On Demand and Programmed.

• Dissemination Interval - Time interval between two consecutive disseminations. Time defined in seconds. On demand dissemination don't makes use of this parameter and for continuous dissemination the interval should be as small as possible (0.001s for example). Default value is set to 50.0 seconds.

Page 9: Mannasim for NS2

Common node• Common Node Number - 10 common nodes as default.

• Common Node Location - Random or Grid.

• Initial Energy - 10.0 joules.

• Common Node Application

• Processing Type - Aggregate processing

• Transmission Range - Default range is set to 50.0 meters.

• Dissemination Type - Continuous, On Demand and Programmed (default).

Page 10: Mannasim for NS2

Common Node configuration

• Dissemination Interval - On demand dissemination don't makes use of this parameter and for continuous dissemination the interval should be as small as possible (0.001s for example). Default value is set to 20.0 seconds.

• Sensing Type - Continuous, On Demand and Programmed (default).

• Sensing Interval - Time interval between two consecutive data sensing tasks. Time defined in seconds. On demand dissemination don't makes use of this parameter and for continuous dissemination the interval should be as small as possible (0.001s for example). Default value is set to 5.0 seconds.

Page 11: Mannasim for NS2

Common Node configuration

• Data Generator Type - Temperature and carbon monoxide data generators are provided within Mannasim Framework. These generators create data based on Gaussian Distribution.

• Data Average Value - Average value used in Gaussian Distribution equation. Default value is set to 25.0 celsius degrees.

• Data Standard Deviation - Standard Deviation value used in Gaussian Distribution equation. Default value is set to 5.0 celsius degrees.

• Maximum Data Value - Generated data maximum allowed value. This parameter is used in event-driven WSN applications. Default value is set to 30.0 celsius degrees

Page 12: Mannasim for NS2

To Compile

• Unzip or untar the mannasim.tar.gz to ~ns-2.35/ folder

• Open the folder mannasim and copy the files from the ns-modified-files/ folder in the following location. (as specified in the next slide)

Page 13: Mannasim for NS2

To Compile• Copy the files from the ~mannasim/ns-modified-files/ and paste it to the

following location of NS2.35

• ns-allinone-2.35/ns-2.35/apps/udp.cc

• ns-allinone-2.35/ns-2.35/common/ns-process.h

• ns-allinone-2.35/ns-2.35/common/packet.cc

• ns-allinone-2.35/ns-2.35/common/packet.h

• ns-allinone-2.35/ns-2.35/Makefile.in

• ns-allinone-2.35/ns-2.35/tcl/lib/ns-default.tcl

• ns-allinone-2.35/ns-2.35/tcl/lib/ns-lib.tcl

Page 14: Mannasim for NS2

To Compile• Once done, open the terminal and go to the

~ns-2.35/ folder and do the following commands one by one

• ./configure

• make clean

• make

Page 15: Mannasim for NS2

To Run the Mannasim Files• From the terminal,

• Go to the mannasim folder

• cd scriptGeneratorTool and type

• ./msg-linux.sh

• Configure the network as recommended in the previous slides (Tcl Parameters). Once Tcl file is generated, run the program using

• ns filename.tcl

Page 16: Mannasim for NS2

Thank You, Questions?????