Skip to content

Simulation of UAV based Search and Rescue Scenario with ns-3

Drones enable a significant enhancement in Search and Rescue (SAR) operations. Drones are a potentially life-saving tool in SAR operations, providing critical support to SAR teams to reduce risk to humans, enable quicker search and provide aerial support during adverse weather conditions[1].

Search and Rescue

‍Search and rescue (SAR) is a subset of public safety operations and involves activities revolving around finding missing people. It generally comes under the purview of the fire department in most countries[2].

Advantages of Drones for SAR

‍Search and rescue operations are fairly difficult and unpredictable, unlike other public safety operations. These two factors play an important role in the overall outcome of a SAR mission[2]:

  • Time: In most SAR missions, the missing person is trapped in a life-threatening situation, where the person has less time. So it becomes important for rescuers to find the person at the earliest.
  • Terrain: SAR missions outside human establishments can face challenging terrain in the form of a snowy mountain, rainforest,  etc. which might slow the entire operation.

Here are some of the reasons highlighted in[2] why SAR teams, all over the world, are using drones to overcome challenges in their work:

  • Drones are fast: Compared to ground-based vehicles, drones can reach a location a lot faster; even reach inaccessible places. For example, in the Czech Republic, there is an agency called the Mountain Rescue Service of the Czech Republic that uses drones to find missing people trapped by an avalanche.
  • Situational awareness: Drones provide cheap, fast access to aerial data of a large area.  This allows responders to map the entire search zone and pinpoint possible places where the missing person might be trapped.
  • Detect and identify:  Drones can carry different sensors that can be used for identifying ground objects. In the next section, we will discuss in detail how these sensors are used.
  • Communication: A drone, carrying a loudspeaker, can repeatedly broadcast a message making the missing person aware that people are looking for him/her.

Simulation of Drones-based Search and Rescue(SAR) Scenario with ns-3 and NetSimylyzer.

Things Needed:

  • Preferably a good Linux Variant OS
  • ns-3 Simulator,
  • NetAnimator 2D Visualization tool,
  • NetSimylyzer add-on module for ns-3
  • NetSimulyzer 3D Visualization Tool,
  • A suitable Mobility Model
  • A suitable Traffic Model
  • 3D models of Drones
  • 3D model of a suitable landscape.

Installing Necessary Software

Step 1: Installing Linux Variant OS

If you are planning to install a suitable Linux Operating system Under VirtualBox, then you may need to install VirtualBox First,

You may install VirtualBox and a suitable version of Linux by doing a procedure as the one explained in the following article[3].

Installing an old Linux under VirtualBox and using Shared Folders.

Step 2: Installing a Suitable Version of ns-3

You may install a suitable version of ns-3 by following the article[4].

Cmake based ns-3.37 install in Debian 11 chroot Environment

Step 3: Installing NetSimulyzer Add-on Module in ns-3

You may install a suitable version of NetSimulyzer Add-on Module in ns-3 by following the article[5].

Installing NetSimulyzer 3D Visualization Module with ns-3.37

Step 4: Installing NetSimulyzer 3D Visualization Tool

You may install a suitable version of NetSimulyzer 3D Visualization Tool by following the article[6].

Installing NetSimulyzer 3D Visualization Tool under Debian 11

Step 5: Simulating a Basic 3D UAV/Drone Scenario by following an Example

You may construct a ns-3 simulation and set up the 3D components of the simulation as explained in the article[7] and construct the UAV-based Search and Rescue (SAR) scenario.

Using Gauss-Markov 3D Mobility Model Under ns-3 for Simulating Unmanned Aerial Vehicle (UAV), Aerial Ad-hoc Network (AANET) and Flying Ad-hoc Network (FANET)

From the following article[8], you may understand the way of using a 3D landscape (here the buildings) in a 3D network simulation :

Testing the New Semi Random Circular Mobility Model of ns-3.

Step 6: Implementing the Actual Search and Rescue (SAR) Scenario.

If you are successful up to step-5, then you may proceed to remodel the above example FANET scenario for doing the proposed Search and Rescue (SAR) Scenario.  For that, we will need some suitable 3D objects to mimic the actual Search and Rescue (SAR) Scenario. In this example, we assume that the search and rescue operation was conducted on a mountain forest landscape. So to simulate that landscape, we will need a suitable 3D model of a landscape. In addition to that, we may need different models of Drones/UAVs. There are some internet resources from which you may collect such royalty-free 3D models. You may first download the necessary 3D models from such resources.

In ns-3 simulation script, we should do the following

  1. Include necessary header files
  2. Declare variable
  3. Optionally set up some functions for tracing purposes
  4. Setting up things to log 2D outputs with NetAnim
  5. Setting up things to log 3D outputs with NetSimulyzer
  6. Optionally setting up some UDP/TCP flows to mimic communication in SAR
  7. Optionally setting up FlowMonitor for analyzing the performance of TCP and UDP flows
  8. Use a suitable Mobility model for simulating UAVs under SAR scenario

    Further, to construct one such basic 3D scenario will need the following :

  9. A 3D model of a forest landscape or any suitable landscape to mimic SAR scenario
  10. 3D models of Drones/UAVs

If you check the sections of the code from examples from [7] and [8], you may understand the above 10 things that are necessary to construct the proposed Search and Rescue (SAR) Scenario.

 

The following are the parameters of the actual implementation:

Some Input Parameters of the Simulation:

  • The size of the Topology       : 1000m X 1000m
  • Type of landscape                   :  Mountain forest landscape.
  • Height of the highest peak    :  100 m
  • The Number of Drones          : 25 to 50
  • Size of the Drones                   :  ?
  • The Flying Height of Drones :  75 m to 120 m [10]
  • Speed of the Drones                : 11 m/s   [9]
  • Drone’s Mobility Model          :  3D Gauss-Markov Mobility
  • Number of Base Stations        :  1
  • Drone Data Rate                      :  500 kb/s (to mimic a small compressed image sent to the base station node)
  • Transport Protocol                   : TCP
  • Multi-hop Routing Protocol    : AODV
  • Mac Layer Protocol                  : 802.11p or 802.11b
  • Simulation Duration                : 10 to 20 minutes (depends upon the estimated battery capacity of the drones)

Some Outputs of the Simulation:

  • Analysis of FlowMonitor outputs (if possible, prepare some Tables & Graphs)
    • Consumed Battery Energy
    • PDF
    • Throughput
    • E2E Delay
    • etc.
  • 2D NetAnim Output
  • 3D NetSimulyzer Output

 

Step 6a: Staring a Skeleton Simulation Code

First, we may create a new simulation file “SimulationOfSARusingDrones1.cc” and prepare a few lines to start a 3D FANET/UAV simulation.

First, include the necessary header files and use the necessary namespaces.

#include “ns3/core-module.h”
#include “ns3/mobility-module.h”
#include “ns3/netanim-module.h”
#include “ns3/netsimulyzer-module.h”using namespace ns3;

Now enable 3D NetSimulyzer to create 3D output traces in a file “SimulationOfSARusingDrones.json”.

int main (int argc, char *argv[])
{
double simTimeSec=200.0;

auto orchestrator = CreateObject (“SimulationOfSARusingDrones.json”);

Setup a 3D model to represent the mountain forest area

 auto decoration = CreateObject(orchestrator);
decoration->SetAttribute (“Model”, StringValue(netsimulyzer::models::LAND_FOREST));

Create 2D NetAnim output if necessary.

AnimationInterface anim (“SimulationOfSARusingDrones.xml”);

Instruct to stop the simulation at ‘simTimeSec’ and run the simulation at last and destroy all the objects at the end of the simulation.

Simulator::Stop (Seconds (simTimeSec));
Simulator::Run ();
Simulator::Destroy ();

return 0;
}

If we now run the simulation, it will show the following output:

Now we can open the 3D output of the simulation with NetSimulyzer. Now we are having a roughly 1000 mX 1000 m forest area to do search and rescue operations.

 

The following is a runnable version of the small skeleton simulation script:

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
 

Step 6b: Now Create Two Sink nodes

Here we are going to use two jeeps as sink nodes. So we have to use appropriate 3D models as shown below:

uint32_t numBS = 2;

NodeContainer bsContainer;
bsContainer.Create (numBS);

Set static mobility model in them.
Ptr position = CreateObject ();
position->Add(Vector(-480,480,0));
position->Add(Vector(-480,350,0));
//Set sink at origin and surround with uniform distribution of regular nodes.
MobilityHelper StaticMobility;
StaticMobility.SetPositionAllocator(position);
StaticMobility.SetMobilityModel(“ns3::ConstantPositionMobilityModel”);
StaticMobility.Install(bsContainer);
Set suitable 3D models to represent the Jeep sink object.
netsimulyzer::NodeConfigurationHelper bsHelper{orchestrator};
bsHelper.Set (“Model”, StringValue( StringValue(netsimulyzer::models::JEEP)));
bsHelper.Install(bsContainer);
If we run the simulation and visualize the 3D output in NetSimulyzer, then we will see two Jeeps parked at a corner of the forest.

Step 6c: Now Create 25 Drone nodes

Here we are going to use 25 drone objects to do a search and rescue operations. So we have to use appropriate 3D models as shown below:

uint32_t numDrones = 25;

NodeContainer dronesContainer;
dronesContainer.Create (numDrones);

Set the Gauss-Markov mobility model in them.

 

mobility.SetMobilityModel (“ns3::GaussMarkovMobilityModel”,
“Bounds”, BoxValue (Box (-500, 500, -500, 500, 50, 60)),
“TimeStep”, TimeValue (Seconds (0.5)),
“Alpha”, DoubleValue (0.85),
“MeanVelocity”, StringValue (“ns3::UniformRandomVariable[Min=0|Max=11]”),
“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|Variance=0.1|Bound=0.4]”),
“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]”));

mobility.SetPositionAllocator (“ns3::RandomBoxPositionAllocator”,
“X”, StringValue (“ns3::UniformRandomVariable[Min=-500.0|Max=500.0]”),
“Y”, StringValue (“ns3::UniformRandomVariable[Min=-500.0|Max=500.0]”),
“Z”, StringValue (“ns3::UniformRandomVariable[Min=50.0|Max=60.0]”));

mobility.Install (dronesContainer);

Set suitable 3D models to represent them
// Use helper to define model for visualizing nodes and aggregate to Node object
netsimulyzer::NodeConfigurationHelper DroneHelper{orchestrator};
DroneHelper.Set (“Model”, StringValue(netsimulyzer::models::DRONE));
DroneHelper.Install(dronesContainer);
If we run the simulation and visualize the 3D output in NetSimulyzer, then we will see 25 drones along with two Jeeps that are parked at a corner of the forest.
The following gif animation of the NetSimulyzer output shows the SAR operation in action.

The following is the runnable version of the complete simulation script with detailed explanation:

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
 

Doing Scholarly Research on SAR Network Simulation

The above outputs are elementary ones. In fact, it is possible to do excellent research work on UAV/FANET since it has a lot of scope for new innovations in this area. For example, it is possible to do an evaluation of MAC layer protocols or Network Layer protocols or Transport Layer protocols under the SAR scenario.

It is possible to do a research quality evaluation and new innovations in this area and attain results such as the one shown in the following article.

Generating Genuine, Quality Tables & Graphs for Publication.

References:

  1. https://cp.catapult.org.uk/news/using-drones-in-search-and-rescue-operations/
  2. https://www.flytnow.com/blog/drones-for-search-rescue
  3. Installing an old Linux under VirtualBox and using Shared Folders.
  4. Cmake based ns-3.37 install in Debian 11 chroot Environment
  5. Installing NetSimulyzer 3D Visualization Module with ns-3.37
  6. Installing NetSimulyzer 3D Visualization Tool under Debian 11
  7. Using Gauss-Markov 3D Mobility Model Under ns-3 for Simulating Unmanned Aerial Vehicle (UAV), Aerial Ad-hoc Network (AANET) and Flying Ad-hoc Network (FANET)
  8. Testing the New Semi Random Circular Mobility Model of ns-3.
  9. https://www.propelleraero.com/blog/five-points-you-should-know-about-drone-data-accuracy/
  10. https://register-drones.caa.co.uk/drone-code/where-you-can-fly

 

 

 

WhatsApp Discuss Through WhatsApp