Crsimulator: A Discrete Simulation Model For Cognitive Radio Ad Hoc Networks in Omnet ++
Crsimulator: A Discrete Simulation Model For Cognitive Radio Ad Hoc Networks in Omnet ++
Crsimulator: A Discrete Simulation Model For Cognitive Radio Ad Hoc Networks in Omnet ++
net/publication/261160998
CITATIONS READS
12 572
3 authors:
Andreas Mitschele-Thiel
Technische Universität Ilmenau
249 PUBLICATIONS 1,617 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Multi-Numerology Based Resource Allocation for Reducing Average Scheduling Latencies for 5G NR Wireless Networks View project
All content following this page was uploaded by Shah Nawaz Khan on 29 June 2015.
Email: shah-nawaz.khan,mohamed.abdrabou,mitsch@tu-ilmenau.de
Abstract—Cognitive Radio is an exciting new technology for a wide range of models and analysis tools with a continuous-
efficient use of radio spectrum. Research on cognitive radio has time simulation model. Networking researchers on the other
for a large part, focused on physical layer issues such as robust hand use discrete time simulation tools such as NS2/3 [4]
spectrum sensing and radio environment characterization. The
networking of cognitive radio nodes is equally important however or OMNeT++ [5]. Both these domains present their own
as new protocols need to be developed to cope with physical layer challenges and this is one of the main reason why research
dynamics. The lack of a widely used and open source simulation has remained isolated in each area. Bridging the two domains
platform has been a hindrance in this regard. In this paper, we with realistic models has never been actively pursued primarily
present crSimulator, which is a discrete simulation model for cog- since the dependencies are mostly abstracted in each field.
nitive radio ad hoc networks in OMNeT++. We present the core
concepts, major requirements, architectural model of cognitive The opportunistic spectrum use of CR creates new challenges
radio nodes, and the implementation details of crSimulator. The such as channel mobility/handover, interference avoidance
crSimulator model effectively captures the physical layer level with primary users, efficient detection and use of spectrum
dynamics and facilitates higher layers protocol research. The opportunities etc. Dealing with these challenges requires ef-
model is validated with an implementation of cognitive radio ficient and robust sensing of the RF environment and its
MAC protocol having spectrum sensing and handover features
together with a node architecture designed to operate in ad hoc usage through reconfigurable transmission. As most of these
networks. issues are addressed at the antenna, transceiver and physical
layer level, networking aspects have remained largely un-
I. I NTRODUCTION addressed. It is understandable however, that the lower layers
dynamics of CR directly impact the higher layers entities
Radio frequency spectrum is a precious and scarce resource and their performance. It is very difficult for example to
from wireless communication perspective. It is well recog- provide guarantees of quality of service for an application
nized, that the spectrum utilization approach based on fixed when the wireless channel not only fluctuates in performance
licensed allocation to different organizations is very inefficient over time but also can be switched over or turned off due
as it develops the spectrum scarcity and under-utilization to primary user’s appearance on that channel. A hindrance
problems [1]. Cognitive Radio (CR) is widely considered to for networking research in CR domain is the lack of widely
be the way forward for efficient utilization of radio spectrum used simulation tools and models that can effectively abstract
[2]. Research is fundamental for any new technology before its the physical layer dynamics and provide a discrete model for
applications can be realized and therefore CR research is being analyzing the performance of higher layers entities. Research
actively pursued by academia and industry. CR and wireless on communication technologies requires robust and realistic
communication in general, combines both digital and analog prototyping tools and models before implementation in real
aspects of communication. The RF signal propagating through systems can be realized.
physical environment and the different phenomena affecting it A number of discrete event based simulation platforms
such as fading, scattering, and diffraction etc., are intrinsically exists which have been used extensively for communication
analog and for a large part non-deterministic. On the other networks research. However, the need for a model designed
hand, all processes within a wireless communication node specifically for CR nodes and networks still exists for research
beyond the antenna are intrinsically discrete and processed on link layer and higher entities. This paper presents a new dis-
in bits, bytes, or packets. The research on physical layer crete simulation model for CR ad hoc networks in OMNeT++
and networking has largely remained isolated and researcher called crSimulator. The crSimulator model facilitates CR
of one field usually abstracts the details of the other. This research by providing a component based node architecture
is one of the main reasons why different simulation and which stems from our previous work on a prototype CR ad
prototyping tools are used by researchers working in these hoc network [6]. Our presented model has all the benefits of
domains. Researchers working on signal propagation, effects OMNeT++ object oriented modular concepts and can easily be
of antenna, transceiver, and other physical and hardware issues extended for any discrete component-based nodes and network
generally use MATLAB [3] as a test platform which provides architectures. The physical layer dynamics of CR are captured
thorough simple yet realistic modeling of radio spectrum. Framework, Mixim model, and Veins [5] etc. Mixim model is
Additionally, the model provides components for some of the most widely used model for wireless and ad hoc network
the core functions of CR such as spectrum sensing and re- simulations in OMNeT++. Mixim is a merger of several old
configurable physical and link layers. models catering for mobility, localization, signal propagation,
The rest of the paper is organized as follows. Section and medium access requirements. However, none of the avail-
II presents the related work on simulation models for CR able models has been designed for CR networks, resulting
networks and summarizes their benefits and shortcomings. in research efforts of extending these models. The authors in
The requirements for a CR specific simulation model are [10] present a multi-radio based extension of Mixim model.
highlighted in section III. The details of crSimulator model They modify the physical layer implementation of Mixim
are given in section IV together with the details on its by combining an array of different radio and MAC modules
implementation and modeling concepts. The limitations of the with application layer module to simulate the modern-day
crSimulator model are addressed in section V along with the smartphones. Their implementation essentially combined low
possible extensions from other models. The details of a CR energy consuming radio modules with high energy consuming
specific CSMA MAC protocol are presented in section VI modules to represent multi-radio based wireless communi-
including some preliminary simulation results of a CR ad hoc cation devices. Although the logic of multiple radios with
network. The paper concludes in section VII with a summary different MAC modules applies to CR nodes in an abstract
of the contributions of this paper and future scope of the work. way, their implementation is not suitable for Software Defined
Radio (SDR) based nodes where one wide-band transceiver is
II. R ELATED W ORK assumed to operate on many channels with the help of a SDR
Cognitive radio is relatively new field of research when module. In [11], the authors extend the ConnectionManager
compared with wireless communication or communication module of Mixim model which is responsible for determining
networks in general. The relative freshness of this field is wireless connections between nodes based on their distance, to
one reason why the focus has mainly been laid on the incorporate sub-channel concept. They implement an Iterative
most important issues for CR networks realization which are Water Filling (IWF) algorithm based on their extension. The
mostly related to physical layer and RF signals. However, most specific extension of Mixim model for CR networks
the importance of networking can not be underestimated simulation is presented in [12]. They introduce a CR specific
since the real benefit of a communication system is generally NIC to the Mixim based nodes. Their extension is also based
measured in application performance which highly depends on on multiple controllable radios within a CR node through a
the networking and protocols of communication. A number of CR MAC protocol. The CR MAC protocol together with the
well-known discrete event simulation systems exist including array of static and reconfigurable radios are combined into
NS2, NS3, [4] and OMNeT++ [5] but none of these provide a OMNeT++ compound module called CR-NIC. They also
intrinsic CR specific network simulation models. NS2 and implement the spectrum sensing function through a scanner
OMNeT++ are open source simulators and are widely used module and present a Cognitive Engine (CE) module responsi-
for communication networks research. The lack of intrinsic ble for reconfiguration. Additionally, they implement a couple
support of these tools for wireless communication have driven of CR specific MAC protocols to validate their extension.
researcher to develop models for these simulation platforms One of the main problems with models based on extension
catering for the needs of specific research groups. Cognitive of Mixim is their re-use. Mixim itself is a combination of
radio network simulator is a model developed for NS2 and many earlier models developed for OMNeT++ and some
available online for download [7]. This model is based on of the design choices made at the time of development of
providing an array of NS2 radio modules which can be dynam- those models do not suit the new version and capabilities of
ically configured through reconfiguration API. The provided OMNeT++ simulator.
API can be used to reconfigure transmission parameters of A few models developed from scratch using programming
radio model such as frequency, power, modulation scheme, languages and existing libraries also exist in literature. In [13],
etc. Although this model has been around for many years, its the authors present a C/C++ based simulator for CR research.
adoption in research community is very limited. One of the They implement a modular CR node with a typical TCP/IP
prime reason we believe is the inherent complexity of NS2 protocol stack. They provide the architectural details and give
simulator itself which relies totally on creating OTcl scripts a brief description of all implemented modules. Stemming
for simulations. The new version NS3 aims to reduce the from a project, their platform is not available as open source
complexity of NS2 but the existing models based on NS2 OTcl and hence does not meet any requirements outlined here.
scripts will not work in NS3. NS3 uses C++ programs similar In [14], the authors present another candidate platform for
to OMNeT++ or python scripts to define simulations. CR simulation developed in C++. They use IT++ library
Several studies have advocated the use of OMNeT++ for to develop an infrastructure-based model for CR simulation.
network simulation highlighting its benefits over NS2 [8] [9]. Their developed model does not cater for the requirements
To compensate for the lack of built-in support for simulating of CR ad hoc networks and does not provide a component
wireless networks, several models have been developed for based template for CR nodes. To summarize the state of the
OMNeT++ by different research organizations such as INET art, it can be concluded that there is a genuine need for a CR
specific model that is easier to integrate into any particular the core framework of the model should be abstracted from
network simulation scenario and is extensible. The lack of the developers in order to avoid complexity and facilitate
such a commonly used model not only creates doubts about extensibility. Additionally, the model should be efficient in
the validation of different CR specific protocols but also results execution and should not be a resource sapping entity in the
in duplication of efforts. The available models are either too simulation environment.
complex or based on specific tools which are hard to abstract
into any general CR networking scenario. IV. CR S IMULATOR M ODEL
The crSimulator model is developed for OMNeT++ sim-
III. CR S IMULATION R EQUIREMENTS
ulation platform with an architecture inspired from Mixim
Before going into the details of the proposed crSimulator model and our previous work in [6]. OMNeT++ provides
model, it is important to consider the requirements of a generic several benefits which make it a clear choice for networks
simulation model for CR ad hoc networks. It is also important simulation research [5]. The separation of functionality im-
to highlight some functional requirements for a model intended plemented in C++ from the design of nodes and networks
to serve as a template for different types of simulations in a through NED language, makes OMNeT++ very suitable for
particular domain such as CR networks. developing generic models for networking research. Several
A. Environment Modeling implementations can be developed for example for a single
layer of the protocol stack without changing anything in the
Environment modeling is particularly important since the
architecture of a simulated node. The crSimulator is entirely
performance of a CR is highly dependent on the environment
based on OMNeT++ ver. 4.2.2 and derives some design
in which it operates. Environment modeling includes the rep-
inspiration from Mixim model. This section presents a detailed
resentation of the effects of physical objects such as buildings,
top-down description of crSimulator and its implementation.
trees, cars, etc. The effects of such objects are usually in terms
of improvement or degradation of the signals or packets. A A. Architecture
CR specific model should provide an abstraction of signal The fluctuations of a RF channel in opportunistic commu-
propagation in a simulated physical environment containing nication of CR networks are fundamental for a CR simula-
static and mobile objects. tion model. The crSimulator abstracts the channel dynamics
B. Radio spectrum Modeling through a Spectrum module which is simple yet sufficient for
The representation of radio signals and their propagation CR network simulations. In most communication networks,
characteristics depending upon different transmission parame- the issues of networking are addressed through stacked pro-
ters, environment, and mobility of signal generators/radiators tocols implemented in different layers. Most of the internal
are fundamental to CR and wireless networks simulation. architecture of a node is modeled through the TCP/IP based
For a discrete event simulation model, the continuous/analog layered structured. To model a node, the crSimulator pro-
propagation nature of signal and attenuation effects need to vides a layered structure for implementing communication
be abstracted through modifying the transmitted data packets protocols but also provides additional components responsible
over wireless channels. Additionally, the model should be able for carrying out CR specific tasks such as spectrum sensing.
to treat different types of signals in a different manner taking The overall structure of a basic CR node is shown in figure
into consideration the properties of the radiated signal and the 1. The base CR node is an implementation of a practical
simulated physical environment. node architecture presented in our previous work in [6] and
has been developed using the simple and compound modules
C. Architecture Modeling concept of OMNeT++. The base CR node however is easily
For a simulation model intended to support CR networking extensible by sub-classing the base modules provided by the
research, it must provide support for designing the internal model. In essence, the base CR node can also be used to
architecture of all participating radio entities such as primary model a primary user in the simulation setup. We shall now
and secondary users, base stations, etc. A component based present an overview of the modules shown in figure 1 and
modular architecture is most suitable for designing internal their implementation. For details on the specific purpose of
architecture of nodes. In addition, the model should provide components such as Cognitive Engine and Resource Map
abstract API’s for data and control message exchange among within a CR node architecture, the reader is encouraged to
the internal components of a simulated node. refer to [6].
Network Layer
Base CR Implementation
Cognitive CR MAC Layer
Engine Fig. 2. Module and class hierarchy of layers
Spectrum Physical
Sensor Layer
Data Links
Control Links
RF Spectrum
Fig. 1. Architecture of a base cognitive radio node [6] for CR must provide additional features not required in
legacy wireless networks. Since channel availability is
dynamic, the CR MAC protocol must have a channel
exchange is very useful for simplifying the protocol imple- mobility/handover mechanism and need to interface with
mentation. Contrary to the Mixim implementation however, a spectrum sensor which can provide it with information
the base layer provides inout gates instead of separate input about the activities on all available channels. Addition-
and output gates. The base layer provides ctrlUpper, ctrlLower, ally, when a large number of channel are available for
dataUpper, and dataLower gates which are used for commu- communication, selecting the most appropriate channel
nication with upper and lower layers for control and data in quick time can only be done through an efficient
message exchange respectively. Additionally, the base layer CR specific MAC protocol. Currently, a CSMA based
also provides an inout gate called sclInterface which is used MAC protocol with channel mobility functionality is
for enabling cross-layer design and communication. The base implemented in crSimulator. This protocol is highly con-
layer module does not enforce connectivity of gates by default figurable through many parameters through the config-
and hence the ctrlUpper and dataUpper of application layer uration file. The protocol can work with/without frame
for example can remain unconnected. The base layers do not acknowledgment at the link layer, can sense the used
provide any functionality and have to be extended into CR channel periodically for primary users appearance, and
specific implementation modules as shown in figure 2. At the publish many run-time parameters to other modules such
current stage of the development, the crSimulator provides an as the Resource Map. The user can also control the time
implementation of Application, CR MAC and Physical layers, which the protocol takes to switch communication to a
Spectrum Sensor, and RF spectrum modules. The other mod- new data channel in case of primary user appearance to
ules only provide the necessary functionality to support the model different hardware properties.
existing simulations scenarios in the model. Network layer for • Physical Layer: The physical layer models the hardware
example is implemented to select any random neighbor node of a transceiver and adds the transmission related infor-
as a destination for communication while the transport layer mation to every outgoing data packet on any particular
only pipes the data and control messages. It is understandable channel. These information is used by the RF spectrum
however, that the implementation of algorithms for different module to apply signal propagation abstractions to the
layers be open to the research community and in time will data. The rationale behind having only one physical
be integrated in the model. The details of the most important layer module interfaced to all available channels of RF
functional modules is provided below. spectrum is that of a Software Defined Radio (SDR) in
• Application Layer: The application layer implementa- which a wide-band transceiver is considered to be the
tion allows for simulation of normal and heavy load radio front-end and all the signal processing is done in
scenarios. The application layer can generate bursts of software. This is in contrast to many available models
fixed or random amounts of data for transmission based for wireless simulation where every MAC protocol is
on the settings in the configuration file. In addition, associated with one or many pre-defined NIC modules.
the application layer can collect statistics of successful We believe that SDR based CR nodes should be modeled
and failed communication attempts through the signal- with one radio front-end which can dynamically alter
ing feature introduced in newer versions of OMNeT++ the transmission parameters instead of switching the
simulator. transmission to a new NIC module whenever a change is
• CR MAC Layer: Medium access in CR networks is needed. This design is particularly suitable for a model
most important for achieving the intelligent behavior of for CR simulation since the MAC protocol can be relieved
spectrum selection and mobility. The MAC protocols from dynamically interfacing with many radio front-ends.
RF Spectrum Module
C. Spectrum Sensor Module Ch 1 {channel properties}
Spectrum sensing is fundamental in CR for finding com- Ch 2
munication opportunities and for protecting PUs from in-
terference. The spectrum sensor module actively senses the
.
Ch 3
Ch n
available channels for primary and secondary users’ activities
and updates an internal list of channels state. By default, the Fig. 3. Abstraction of channels into Spectrum module
spectrum sensor modules always keeps the accurate channel
availability information but a level of uncertainty can be
introduced through configuration. The spectrum sensor module modifications to the data packets by RF spectrum module
is tightly interfaced with CR MAC protocol which can query it should be based on accurate propagation models especially
for different types of channel sensing operations. For example, when doing research on physical layer issues. The connection
at the start of transmission, the MAC layer can ask for any management among nodes is left to topology generators in
available channel free for transmission but during transmission OMNeT++ and the user can also create his/her own topologies
the MAC can also ask for sensing only the active data channel and connections. This also implies that crSimulator does not
in order to avoid interference with PUs. The spectrum sensing currently support the mobility of the nodes within simulation
is also very important for modules such as Resource Map environment which is addressed later in the paper.
and Cognitive Engine which are responsible for knowledge
E. Battery & Statistics
aggregation and decisions making respectively. The details of
those modules including the Signaling and Communication The purpose of these modules is evident form their name.
module however, is beyond the scope of this paper and The battery modules is provided for energy efficiency related
interested reader can find more details in [15] [16]. Additional research. It can receive direct signals from all components
configuration of spectrum sensor module includes the pattern within the base CR node and can reduce the abstract battery
of channel sensing, the time consumed in sensing each chan- level depending upon the signal. The statistics module is
nel, and the energy consumed during sensing. The channel used for collection of different parameters from the protocols
sensing pattern is important for example for the research on working in different layers. Both these modules are extensible
adaptive spectrum sensing in CR. and can also be switched off altogether, if not required.
Parameter Value
Simulation Time 20sec
CR Transmission 100% Persistent
Total Data Channels 1-2
Sensing Interval 100ms
Link Layer Acknowledgments Enabled
PU Arrival Rate Variable 0.1-1s
PU Tx Duration 0.5s
Fig. 4. Simulation scenario with two CR nodes and one PU node VI. S IMULATIONS WITH CR S IMULATOR
For the initial use and validation of implemented modules,
this section presents some preliminary simulation results. We
are fixed and all nodes can follow a similar approach to have implemented a CR specific CSMA protocol called CR-
connecting with a network. In CR ad hoc networks however, MAC with spectrum mobility feature. The protocol is tightly
the dynamic channel availability makes it much more difficult integrated with Spectrum Sensor module which enables it to
to reconnect to another segment of a CR ad hoc network. make handovers to new channels when a data channel is
Although mobility introduces high complexity for CR ad lost due to PU appearance. The CRMAC uses a common
hoc networks, it is also difficult to justify ad hoc networks control channel for control traffic between transmitter and
without mobility. The crSimulator therefore, can be extended receiver nodes for example for RTS/CTS handshake. The
for introducing mobile CR nodes. A possible solution could results provided in this section are for a simple network
be to incorporate the modules responsible for node mobility of two CR nodes and one PU node as shown in figure 4.
in Mixim model into crSimulator. This will however, require a The simulations were carried out to evaluate the impact of
considerable programming effort and therefore the decision of PU activity on the achievable CR network throughput and
developing a mobility solution from scratch or incorporating channel handovers. Many parameters can be configured even
mobility from other existing models, needs to be carefully for this simple network setup resulting in many performance
considered. outputs. The parameters chosen for the preliminary evaluation
of crSimulator are presented in table I.
Figure 5 shows the impact of PU transmission on the achiev-
B. Signals and connection management able throughput for CR network with fixed PU transmission
duration and variable arrival rate. The figure shows results of
The connection management in a static ad hoc network two simulation scenarios having one and two data channels
scenario is not a complicated task. In fact, the topology for communication respectively. As evident from figure 5,
generator available in OMNeT++ can create many types of when the PU arrival rate increases, the achievable throughput
static networks with RF spectrum module based connections. of CR network decreases accordingly. In the two channels
Alternative approach to static connections among CR nodes scenario, the CR network can handover the communication
is dynamic connection management through a centralized to the vacant channel when one is occupied by PU and the
module. This approach is used in Mixim model where a drop in throughput is mainly from the handover process. The
global ConnectionManager module creates all the connections throughput is not highly affected by the duration of the PU
between nodes of particular NIC type based on SINR and transmission as it is fixed for each appearance. When the PU
distance among nodes. We did not use such a dynamic is not activated (at point 0 on x-axis), the throughput achieved
connection approach for two main reasons. First, for static ad by CR network is similar in both scenarios representing the
hoc networks, a topology generator can create all the necessary maximum achievable throughput of CRMAC protocol. The
connections among nodes based on their distance. Since the throughput drops considerably in one channel scenario when
nodes do not move, there is a lesser need of keeping track the PU is activated. This is due to the fact that in one channel
of distance among them and the effects on channels due to scenario the throughput not only gets affected by PU arrival
mobility. Second, the RF spectrum module can abstract the rate but also by the PU transmission duration as it has to
channel dynamics between two or more nodes as it can treat wait for the channel to become free again. It should be noted
each individual packet passing through it based on the control that the arrival rate implies the appearance of PU in any of
information in the packet. If mobility of nodes is introduced the available channels with equal probability and considered
however, the static connection management does not work in with respect to previous PU transmission session. In other
OMNeT++ and hence a module similar to ConnectionManager words, when the arrival rate is high the PU transmission
in Mixim has to be introduced. sessions are more frequent. The probability distribution of PU
100 together with an abstraction of radio spectrum. This paper
2 Data Channels 1 Data Channel
also highlighted some of the possible future extensions of this
80
model and presented basic simulation results of a CR MAC
Throughput (Packets/sec)
20 ACKNOWLEDGMENT
This work is being carried out within the scope of the
0
0 0.2 0.4 0.6 0.8 1 International Graduate School on Mobile Communications
PU Arrival Rate (Mobicom) at Ilmenau University of Technology, supported
by the German Research Foundation (GRK1487) and the Carl
Fig. 5. Effect of PU arrival rate on achievable throughput Zeiss Foundation, Germany.
17.5 R EFERENCES
15 [1] S. N. Khan, M. A. Kalil, and A. Mitschele-Thiel, “Distributed spec-
trum map for cognitive radio ad hoc networks,” in Proc. of the 4th
Avg Channel Handovers