Unmanned Aerial Vehicle (UAV)
Unmanned Aerial Vehicle (UAV) networks play important role in the future generations of wireless networks. Due to the high cost and failures involved in real system based tests, simulation-based studies are gaining much attention.
The Aerial Ad-hoc Network (AANET) :
The term AANET is interchangeably used to denote Aerial Ad hoc Network, Aircraft Ah hoc Network and Aeronautical Ad hoc Network. Aerial Ad hoc Network (AANET) is a particular type of three-dimensional (3D) wireless ad hoc network. And alternatively, the term FANET is used to denote a Flying Ad hoc Network in general,
The Flying Ad-hoc Network (FANET)
FANET is a self-organizing wireless network that enables inexpensive, flexible, and easy-to-deploy flying nodes, such as unmanned aerial vehicles (UAVs), to communicate among themselves in the absence of fixed network infrastructure.
Problems in simulating and visualizing 3D UAV or FANET or AANET under ns-3 :
- In the ns-3 (versions up to 3.33) , there are no rich, 3D mobility models available so that we can not simulate a practical 3D FANET or AANET by using the available components and models.
- Even though if we simulate a 3D scenario with a custom 3D mobility model, the standard visualization tool of ns-3 (NetAnim) can only show the 2D view of a 3D simulation. It makes it impractical to visualize the simulated 3D scenario.
3D FANET simulation using ‘GaussMarkovMobilityModel’
By using the ‘GaussMarkovMobilityModel’ and ‘RandomBoxPositionAllocator’, which are readily available under ns-3, we can do a FANET simulation, we can simulate any type of 3D mobile Network.
This 3-dimensional Gauss-Markov mobility model available under ns-3 can be used for modelling the mobility of aircraft flying at different altitudes. In general, this mobility model can be used to simulate any multi-tier UAV/AANET/FANET.
About this 3D FANET Simulation
In this article, we will see the way of simulating and visualizing a 3D FANET or AANET under ns-3 using NetSimulyzer.
NetSimulyzer 3D visualization tool able to ‘play’ the 3D network scenario from different camera perspectives using a special trace output file (.json format) which was created during the ns-3 simulation (the simulation which uses ns-3 NetSimulyzer module).
So, the NetSimulyzer 3D visualization tool can be used to play/animate/visualize ns-3 network scenarios for better understanding, presenting and debugging them.
We can simulate realistic FANETs using ns3 along with NetSimulyzer. In this article, we will see the way of simulating a FANET of Quadcopters that are roving above the buildings.
To simplify the understanding of the 3D components of a FANET simulation, we purposely didn’t include the traffic-related components and routing related components of FANET in this simulation.
The Components of the Simple 3D UAV/AANET/FANET ns-3 Simulation Script
The following code segment presents the important components of the ns-3 simulation script which is used to simulate our 3D FANET.
Include the header files Needed
The following lines include the necessary header files. The suitable 3D mobility model should be incorporated in mobility-module.h and the Netsimulyzer ns-3 module should be installed in the ns-3 directory tree.
#include “ns3/core-module.h”
#include “ns3/mobility-module.h”
#include “ns3/netanim-module.h”
#include “ns3/netsimulyzer-module.h”
The following two articles explain the way to set up the Netsimulyzer 3D visualization support.
Installing NetSimulyzer 3D Visualization Support Add-on Module in ns-3 under Debian/Ubuntu
Installing NetSimulyzer 3D Visualization Tool under Debian/Ubuntu
Simulate some 3D buildings on Ground
// create a some buildings
double buildingSizeX = 100; // m
double buildingSizeY = 50; // m
double streetWidth = 25; // m
double buildingHeight = 10; // m
uint32_t numBuildingsX = 10;
uint32_t numBuildingsY = 10;
std::vector
for (uint32_t buildingIdX = 0; buildingIdX < numBuildingsX; ++buildingIdX)
{
for (uint32_t buildingIdY = 0; buildingIdY < numBuildingsY; ++buildingIdY)
{
Ptr < Building > building;
building = CreateObject
building->SetBoundaries (Box (buildingIdX * (buildingSizeX + streetWidth),
buildingIdX * (buildingSizeX + streetWidth) + buildingSizeX,
buildingIdY * (buildingSizeY + streetWidth),
buildingIdY * (buildingSizeY + streetWidth) + buildingSizeY,
0.0, buildingHeight));
building->SetNRoomsX (1);
building->SetNRoomsY (1);
building->SetNFloors (1);
buildingVector.push_back (building);
}
}
Create Some Drone Nodes and install ‘GaussMarkovMobilityModel’ in them
NodeContainer drones;
sta.Create (10);
MobilityHelper mobility;
mobility.SetMobilityModel (“ns3::GaussMarkovMobilityModel”,
“Bounds”, BoxValue (Box (0, 300, 0, 300, 100, 500)),
“TimeStep”, TimeValue (Seconds (0.5)),
“Alpha”, DoubleValue (0.85),
“MeanVelocity”, StringValue (“ns3::UniformRandomVariable[Min=0|Max=20]”),
“MeanDirection”, StringValue (“ns3::UniformRandomVariable[Min=0|Max=6.283185307]”),
“MeanPitch”, StringValue (“ns3::UniformRandomVariable[Min=0.05|Max=0.05]”),
“NormalVelocity”, StringValue (“ns3::NormalRandomVariable[Mean=0.0|Variance=0.0|Bound=0.0]”),
“NormalDirection”, StringValue (“ns3::NormalRandomVariable[Mean=0.0|Variance=0.2|Bound=0.4]”),
“NormalPitch”, StringValue (“ns3::NormalRandomVariable[Mean=0.0|Variance=0.02|Bound=0.04]”));
Configure Things for 3D Netsimulyzer Visualization
The following are the three important things that will be done by this section of code:
- The 3D simulation output will be stored in the file “SimpleNS3FANETGaussMarkovMobilityModel3D.json”.
- A Quadcopter Drone 3D model will be set to all the FANET nodes.
- The 3D buildings will be created using the previously configured buildings information
Configure standard NetAnim file and end the simulation
For comparison purposes, we create a NetAnim simulation file, which will only be capable of showing 2D of this 3D scenario.
AnimationInterface anim (“SimpleNS3FANETGaussMarkovMobilityModel3D.xml”);
Simulator::Stop (Seconds (simTimeSec));
Simulator::Run ();
Simulator::Destroy ();
return 0;
The 2D output of the Simulation using NetAnim
The following output shows the output of FANET simulation on NetAnim. A 3D scene that is rendered on a 2D canvas will be similar to the following output.
The following video shows the 2D animation of the 3D FANET scenario.
The 3D Visualization using NetSimulyzer Tool
The following output shows the NetSimulyzer GUI on initialization(before loading our FANET simulation).
The following output shows the NetSimulyzer GUI after loading our FANET simulation. Please note that the groups of drones are flying at different altitudes because of the GaussMarkovMobilityModel.
The 3D Simulation output with NetSimulyzer
The following video shows the 3D output of the simulation on NetSimulyzer.
Note: The visualization of Packet Transmission and wave Propagation on Medium are not yet implemented in NetSimulyzer. So we can only see the movement of nodes. But we can add “log events” to understand the events of transmission and reception through some text messages that will be displayed in a separate text window of NetSimulyzer.
Note: While using Gauss-Markov 3D Mobility Model Under ns-3, a group of nodes will only fly in some fixed altitudes, and they will not move to other altitudes. We have to keep it in mind while designing our UAV/AANET/FANET.
In the following articles, we present our CircleMobilityModel and SpringMobilityModel for FANET:
- Implementation of Spring Mobility Model for ns-3 and Visualizing it in 3D along with Circle Mobility
References:
- https://sq.wikipedia.org/wiki/FANET
- https://www.researchgate.net/publication/228568810_Design_and_analysis_of_a_3-D_gauss-markov_mobility_model_for_highly-dynamic_airborne_networks