Search This Blog

Underwater Sensor Network Simulations in ns-2 using Aqua-Sim

Labels: , , , , ,

Reactions: 

This post describes a step-by-step procedure to simulate "Underwater Sensor Networks" in ns-2 by using Aqua-Sim tool [1]. Some of the outstanding features of Aqua-Sim are [2]:

1. Simulates acoustic signal attenuation and packet collisions in underwater sensor networks.
2. Supports 3D deployment.
3. Can be easily integrated with existing codes of ns-2.
4. Independent of CMU wireless simulation package of ns-2.
5. Changes in either of them do not affect the other packages.

NOTE: 
1. You do not need to have ns-2 pre-installed to work with Aqua-Sim.
2. Aqua-Sim tool is distributed as a *tarball* rather than a *patch* [2].
3. Aqua-Sim tarball = Original ns-2.30 tarball + Aqua-Sim Source Codes.
4. Installing the *tarball* distributed by Aqua-Sim developers is enough.
5. Source code for 3D deployment is not distributed inside the above mentioned tarball.
6. For 3D deployment, separate tarball called *Aqua-3D* is distributed [3].
7. First, this post explains the installation of Aqua-Sim tarball.
8. Secondly, this post explains the installation of Aqua-3D.

Follow the steps given below to install Aqua-Sim:

1. Download Aqua-Sim-1.0.tgz

2. Unzip Aqua-Sim-1.0.tgz. You will get a folder named Aqua-Sim-1.0

3. Give the following command:

./install

4. If you get error in *otcl* installation, then go to the following folder:

Aqua-Sim-1.0/otcl-1.12

and then open the *configure* file. Go to line number 5516 and replace

ld -shared

by

gcc -shared

then go back to Aqua-Sim-1.0 folder via terminal and try to re-install Aqua-Sim by giving the following command:

./install

5. You may or may not get further errors depending on the gcc version of your Linux flavor.

6. Once the installation is completed, go to following directory:

Aqua-Sim-1.0/ns-2.30

and give the following command (NOTE: this command requires *root* access):

make install 

7. Verify whether Aqua-Sim is installed successfully or not by going to the following folder:

Aqua-Sim-1.0/ns-2.30/underwatersensor/uw_tcl

and give the following command

ns vbf_example_5.tcl

If the above TCL Script works fine, Aqua-Sim has installed successfully!

Otherwise, please feel free to report the errors that you get during the installation procedure.

Following are the steps to install Aqua-3D:

1. Download Aqua3d-1.0.0-src.tgz

2. Depending on your Linux flavor, install the packages listed on the following link, before proceeding for installation:

http://obinet.engr.uconn.edu/wiki/index.php/Aqua-3D#Requirements

3. Unzip Aqua3d-1.0.0-src.tgz. You will get a folder named aqua3d-1.0.0-src

4. Go in aqua3d-1.0.0-src folder via terminal and give the following command:

make

5. If all packages were properly installed during Step 2, you will get a exectuable named *aqua3d* in aqua3d-1.0.0-src folder. Try running it by giving the following command;

./aqua3d

or just *double click* on aqua3d.

6. New window, like the one shown below, will open:

                                                          [Click on the image to enlarge]

7. Aqua-Sim takes *.nam* files as input. A Sample .nam file called *vbva.nam* is provided in the following folder:

aqua3d-1.0.0-src/trace_example

8. Using the *File -> Open Trace (no options)* option in the window shown above, open vbva.nam. A new window, as shown below, would open:

                                                         [Click on the image to enlarge]

9. Alternatively, you can also open the same file with *File -> Open Trace (with options)*

A very detailed and clear information about Aqua-Sim's features, architecture, support of routing protocols and mac protocols, mailing lists,  etc is provided on the following link:


A very clear and basic tutorial (contains explanation of the TCL scripts corresponding to Aqua-Sim) is available on the following link:


References / Acknowledgements:

[1] "Aqua-Sim 2: An NS-2 Based Simulator for Underwater Sensor Networks", Yibo Zhu, Xiaoyan Lu, Lina Pu, Yishan Su, Robert Martin, Michael Zuba, Zheng Peng and and Jun-Hong Cui, in Proc. of ACM WUWNet, Kaohsiung, Taiwan, 2013.

[2] Official webpage of Aqua-Sim: http://obinet.engr.uconn.edu/wiki/index.php/Aqua-Sim

[3] Official webpage of Aqua-3D: http://obinet.engr.uconn.edu/wiki/index.php/Aqua-3D

Hope it helps.

Regards,
Mohit P. Tahiliani

Comments (11)

I need NS-2 simulation for VBF, HH-VBF, DBR

After installing the g++ compiler, NVIDIA binary Xorg driver, freeglut-2.6.0, GTK+ 2.0 , wxGTK-2.8.11 packages for aquasim,my mouse pointer is not moving and it is in top of the left corner. I tried enter ctrl+alt+F1 or ctrl+alt+F2. But unfortunately it was not worked.So i was unable to login to my account. Will you please provide a solution for above problem

@Kiyafat Ullah Jan - I believe with aquasim, all the three routing protocols that you mentioned are available.

@Jithin James - You may have installed a package which is not required for your system. Does your system have NVIDIA graphics card? If not, that package is not required.

Hope it helps.

Regards,
Mohit P. Tahiliani

After running ns vbf_example_5.tcl, i am getting this type of error....

the file name is vbf_example_5.data
the sending interval is 10.0
invalid command name "Agent/Vectorbasedforward"
while executing
"Agent/Vectorbasedforward set hop_by_hop_ 0"
(file "vbf_example_5.tcl" line 64)

@manwendra tiwari - You probably missed out on giving the following command at the end of recompiling:

sudo make install

Note that this command must be given in ns-2.30 directory.

Hope it helps.

Regards,
Mohit P. Tahiliani

hello sir ,im chaity
sir is it possible for ns-2.34? sir which operating system do you use for this ns-2.30?i mean which version ?Sir can u please suggest me which dynamic routing protocol is used for it?can i use AODV,AOMDV for this?

hello sir,
I am amritha. I am doing my project in wireless sensor network. Whether is it possible to simulate sensing of sensor in ns2..

Thank You

@Amritha - If you meant sensing actual real data like temperature, humidity, etc - the answer is no. But you can generate dummy data and simulate how it passes across the network.

Hope it helps.

Regards,
Mohit P. Tahiliani

Respected Sir,

I want to implement the Sinkhole attack using AODV routing protocol , pls send me any code related to this. i am using ns2.35 .

i got this error while runing the ./configure command in ns2.35.

./configure: line 2097: config.log: Permission denied
./configure: line 2107: config.log: Permission denied

Respected Sir,

Need your guidance to implement AOMDV in NS3.

Any available help and support will help me. I am new to NS3, kindly suggest from where I should start?

Guest Book...!!!