Skip to content

Installing Aquasim-NG in ns-3.38 and Visualizing UWSN in 3D.

Aqua-Sim

Aqua-Sim is an underwater network simulator that supports a vast amount of protocols and features. Originally developed on the basis of NS-2, Aqua-Sim can effectively simulate acoustic signal attenuation and packet collisions in underwater sensor networks (UWSN). Moreover, Aqua-Sim supports three-dimensional deployment[1].

Aqua-Sim-NG

Aqua-Sim-NG consists of rewriting and porting Aqua-Sim to NS-3 to improve upon current simulation issues such as memory leakage and usage simplicity[1]. This work is supported by the UWSN Lab at the University of Connecticut.

Aqua-Sim NG core continues to support basic underwater functions seen in Aqua-Sim 1.0, such as half-duplex, long propagation delays, and acoustic signal attenuation[1].

The following Diagram from [1] explains the overall architecture of Aqua-Sim-NG.

Aqua-Sim NG Diagram

Current protocol support includes: (MAC layer:) BroadcastMAC, Underwater ALOHA, CopeMAC, Underwater FAMA, Underwater Slotted FAMA, GOAL, UWAN, RMac, Tmac, (Routing Layer:) DBR, Residual-DBR, Static, Dynamic, Dummy, Flooding, DDoS-Restriction, VBF, and VBVA[1].

Other Supported Features

The following are the supported features listed at[1] :

  1. NS3 Architecture Support

    • Core Aqua-Sim revamp and API integration
    • Example and helper scripts addition
  2. Protocol Port

    • Extensive protocol port
  3. Real-World Features

    • Synchronization support
    • Localization support
    • Busy terminal model integration
    • Fluctuating SNR
    • Enhanced channel model support
    • Transmission range uncertainty module
    • Security features and module support
    • Trace-driven support for the channel layer
  4. Information-Centric Integration

    • Adapted Named Data Network components
    • Helper and test scripts integrated
    • Specialized protocols addition

Installing Aqua-sim-ng ns-3 Extension

Step 1: Download a suitable version of ns-3

In this example, we are using previously downloaded ns-3 version ns-3.38 (that we previously used for another article ). We assume that you have already downloaded the ns-3 version ns-3.38 and it is ready to build.

Step 2: Download aqua-sim-ng

$ cd /ns3/contrib
$ git clone https://github.com/rmartin5/aqua-sim-ng  aqua-sim-ng

Step 3: Cloning the NetSimulyzer add-on module from the GitHub repository

Now we can clone the NetSimulyzer add-on module from its repository[4] under the ‘contrib’ folder or ‘src’ folder of ns-3.

The flowing screenshot shows the completion of the cloning of NetSimulyzer add-on module repository.

Step 4: Configure ns-3

We should configure ns-3 as follows:

Hidden Section! Contact Charles  

The key/passphrase will be given once you have been approved for getting paid research support/assistance from Charles. To get paid support, you may start a 'free' research discussion.  

WhatsApp chatDiscuss Through WhatsApp
 

If you carefully notice the above output, then you can find the following modules in the “modules configured to be built” list.

  • iodsim   (this is not needed for aqua-sim-ng simulations)
  • netsimulyzer
  • aqua-sim-ng

 

Step 5: Building ns-3 with Aqua-Sim-NG and NetSimulyzer

After successful configuration, now we can build the ns-3 – so that the newly compiled ns-3 will have aqua-sim-ng and netsimulyzer modules in it.

$ ./ns3 build
If you carefully notice the console outputs, you can understand that the netsimulyzer and aqua-sim-ng components are getting compiled along with ns-3 components.
The build may fail with the following errors:
We should do the modifications to overcome this errors.

Hidden Section! Contact Charles  

The key/passphrase will be given once you have been approved for getting paid research support/assistance from Charles. To get paid support, you may start a 'free' research discussion.  

WhatsApp chatDiscuss Through WhatsApp
 

Now the build operation will succeed and end with the following output:

Step 6: Testing the working of aqua-sim-ng installation

Now we can run an example script to test the working of aqua-sim-ng module

$ ./ns3 run VBF
The following output of VBF simulation confirms the good working of aqua-sim-ng module.

Installing NetSimulyzer 3D Visualization Tool

We may install NetSimulyzer 3D Visualization Tool as explained in the following article:

Installing NetSimulyzer 3D Visualization Tool under Debian 11

 

Visualizing UWSN Simulation in 2D using NetAnim

After doing the necessary modifications in two files, we will be able to create 2D outputs of the simulation for visualizing it in NetAnim.

Hidden Section! Contact Charles  

The key/passphrase will be given once you have been approved for getting paid research support/assistance from Charles. To get paid support, you may start a 'free' research discussion.  

WhatsApp chatDiscuss Through WhatsApp
 

The following output shows the 2D projection of the simulated 3D UWSN  scenario.

Visualizing UWSN Simulation in 3D using NetSimulyzer

After doing the necessary modifications in two files, we will be able to create 2D outputs of the simulation for visualizing it in NetAnim.

Hidden Section! Contact Charles  

The key/passphrase will be given once you have been approved for getting paid research support/assistance from Charles. To get paid support, you may start a 'free' research discussion.  

WhatsApp chatDiscuss Through WhatsApp
 

The following output shows the 3D output of the  UWSN example script VBF.cc. In fact, this example is only constructing a 2D Network in a 3D visualizer (since the z-coordinate of all the nodes is zero)

So we have to alter the VBF.cc code to make it a real 3D UWSN network scenario. We will see it in another article.

Related Articles

Realistic 3D Visualization of UWSN Scenario with NetSimulyzer

3D Aquatic Animal Tracking Underwater Network Simulation (UWSN) Under ns-3

Installing Aquasim & Aqua3D on an old Linux under VirtualBox

Simulating and Visualizing 3D Underwater Wireless Sensor Network (UWSN) Under Omnet++

References

 

  1. https://github.com/rmartin5/aqua-sim-ng
  2. https://github.com/usnistgov/NetSimulyzer-ns3-module
  3. https://github.com/usnistgov/NetSimulyzer
WhatsApp Discuss Through WhatsApp