Skip to content

Installation of Cognitive Radio Extension for ns-3 (CRE-NS3)

Cognitive Radio

Cognitive Radio is an intelligent wireless communication system. Each radio is contextually aware of the surrounding environment, is able to dynamically adjust its radio parameters and switch channels based on predefined policies. More specifically, a cognitive radio needs to be able to sense the medium and infer whether a Primary User is active, be able to make decisions as to whether to switch to a vacant channel and to which channel it should switch to, and communicate that information with surrounding radios so that the data can be resumed on the new spectrum.[1]”

 

In [5], Abdulla Al-Ali and Kaushik Chowdhury proposed a framework for the network simulator 3 (ns-3) that is suitable for large networks. Their approach introduces several CR capabilities, such as spectrum sensing, primary user detection, and spectrum hand-off. Their simulator demonstrates improvements in execution time and memory usage when compared to the earlier versions implemented for the ns-2 environment. 

The Cognitive radio extension (CRE-NS3) for ns-3

This extension is written to add cognitive radio (CR) capabilities to the Network Simulator-3.
 

As presented in [1], this extension provides the following basic building blocks:

Further, in [1] they listed following features of this extenstion 

  • Spectrum Manager: This global block will expose the cognitive radio APIs to any network layer in the simulator. Example of such APIs are “startSensing”, “startHandoff”, etc. This block serves as a “blackbox” to mask the internal submodules of this extension.
  • Spectrum Sensing/DB Query: This submodule performs the functionality of sensing or querying the FCC database to determine the PU availability. It uses a static database file to infer the PU activity.
  • Spectrum Mobility: performs handoff from one channel to another.
  • Spectrum Decision: contains expandable decision policies such as when to handoff to a new channel and to what channel. This submodule is also linked to a global repository that holds each node’s current channel assignment. Such information can be used when deciding to switch to the least congested channel, for example.
  • Spectrum Sharing: this building block ensures that free spectrum is shared among CR nodes collision-free using the protocols that are provided by ns-3 such as 802.11

The following diagram presented in [1] shows the overview of our changes to the core of the ns-3 simulator for the construction if this cognitive radio extension.

Every ns-3 node may combine any number of cognitive interfaces per node. Mote details about the changes needed to implement this extension can be found in [2].  The API documentation can be found at [3].

 

Installing CRE-NS3 Simulator

You may try installing this as explained in the following steps. Before proceeding the steps, you may install the dependencies as explained in [4].

The main secret of installing this extension is:

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 1: Clone the Git repository.

$ cd /home/your_home
$ git clone https://github.com/abdulla-alali/CRE-NS3.git -b cognitive ns-3.17

Step 2: Configure ns-3.

$ cd /home/your_home/ns-3.17
$ ./waf configure
 
The following screenshot shows the end of a successful configure process.

Step 3: Compiling ns-3.

$ cd /home/your_home/ns-3.17
$ ./waf -vv
If the compilation fails, then you have to configure ns-3 as follows and then proceed the compilation again:
 

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 screen shows the successful installation of the cognitive radio extension on ns-3.17
 
 

Testing the installation with an Example Script

You may now run the example of  cognitive radio network simulation as follows and see the results.

 
$ cd /home/your_home/ns-3.17
$ ./waf –run example

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 screenshot shows the successful run of the simulation

 

The following screenshot shows the NetAnim output of the cognitive radio example simulation.

 

The following gif animation shows the cognitive radio network in action.

In a future article, we may see an elaborate cognitive radio network simulation with suitable NetAnim output to understand its working in a better way.

 

It is possible to simulate recurrent learning based cognitive radio networks using ns-3-gym framework. The following article explains the installation of ns3-gym.

Installing ns3-gym AI Model under Chroot Jail

In an example of ns3-gym, they are presenting the idea of a simulation of cognitive radio. They consider the problem of radio channel selection in a wireless multi-channel environment, e.g. 802.11 networks, with external interference. The objective of the gym agent is to select for the next time slot a channel free of interference. They consider a simple illustrative example where the external interference follows a periodic pattern, i.e. sweeping over all channels one to four in the same order as shown in the table.

drawing

So, it is possible to use CRE-NS3 along with ns3-gym framework to design more intelligent cognitive radio networks. One may consider addressing the issues of combining these two frameworks in their research.

References

  1. https://coe.northeastern.edu/Research/krclab/crens3/index.html
  2. https://coe.northeastern.edu/Research/krclab/crens3/paper/cre-ns3.pdf
  3. http://www.coe.neu.edu/Research/krclab/crens3-doc
  4. https://www.projectguideline.com/installing-ns3-35-in-debian-10-chroot-jail-under-debian-11-host-os-or-any-version-of-linux-host/
  5. A. Al-Ali and K. R. Chowdhury, “Simulating Dynamic Spectrum Access using ns-3 for Wireless Networks in Smart Environments,” IEEE SECON Workshop on Self-Organizing Wireless Access Networks for Smart City, Singapore, June 2014.
  6. https://github.com/tkn-tub/ns3-gym
WhatsApp Discuss Through WhatsApp