Skip to content

Realistic 3D Visualization of UWSN Scenario with NetSimulyzer

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.

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

NetSimulyzer

NetSimulyzer is a 3D visualization tool designed for the ns-3 network simulator. It helps users to simulate and analyze various network protocols and scenarios.

NetSimulyzer provides a graphical representation of the network simulation results in a 3D environment. It helps researchers and developers to visualize and understand the behavior of their network simulations more intuitively. With NetSimulyzer, users can observe the movement of nodes, visualize network topology, and analyze various network metrics.

The tool enhances the ns-3 simulation experience by providing a visual perspective, making it easier to identify potential issues and optimize network performance. It can be particularly useful for simulations involving wireless networks, where visualizing node movement and signal propagation can aid in evaluating network protocols and algorithms.

NetSimulyzer is an optional component that can be integrated with ns-3. It is not a built-in feature of the ns-3 simulator itself. To use NetSimulyzer, you would need to download and install it separately, following the provided instructions and documentation.

The new version of NetSimulyzer contains features to visualize nodes and their movements as well as transmission in 3D.

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.37 . We assume that you have already downloaded the ns-3 version ns-3.37 and it is ready to build.

 

If you want to install ns-3.37 before starting to install aqua-sim-ng and netsimulyzer moduels, then you may follow the procedure presented in the following article:

 

Cmake based ns-3.37 install in Debian 11 chroot Environment

 

Step 2: Download aqua-sim-ng

$ cd /home/your_home/ns-allinone-3.37/ns-3.37/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.

$ cd /home/your_home/ns-allinone-3.37/ns-3.37/contrib
$ git clone https://github.com/usnistgov/NetSimulyzer-ns3-module

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
 

A successful configure will show the lis of modules configured to be built.

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

  • 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 successful with some warning messages:

 

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.

Modifying the Script to make it a True 3D UWSN Scenario

We have to do the following modifications and additions in VBF.cc to make it a true 3D underwater sensor network scenario.

  • Using a suitable 3D mobility model- so that the source nodes, sink nodes and other nodes will be at different x,y,z locations to make it a realistic 3D underwater sensor network.
  • Using suitable 3D models for different types of nodes in the scenario.
  • Adding a 3D water body to mimic an underwater scene.
  • Enabling the blue sky above the water body and the green ground floor below the water body to mimic a realistic scene.
  • Nodes can be set as mobile or static as per the need
  • Suitable data flows can be set up
  • Adding triggers to display transmission events at the nodes with expanding spheres.
  • Enabling or Disabling node IDs and labels as per the need.
In the following output, the sink node is shown as a Boat that is at the surface of the water body.  Other sensor nodes are shown as spheres.
The following Gif Animation shows the drift in underwater sensor nodes because of the mobility model used:

As I mentioned earlier, the new version of NetSimulyzer contains features to visualize nodes and their movements as well as transmission in 3D. We may explore some of the interesting features below :

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
 

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