0% found this document useful (0 votes)
24 views7 pages

Wireless Sensor Network Simulation Frameworks A Tutorial Revie

Uploaded by

R. B.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views7 pages

Wireless Sensor Network Simulation Frameworks A Tutorial Revie

Uploaded by

R. B.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Wireless Sensor Network Simulation Frameworks: A Tutorial Review

MATLAB/Simulink bests the rest.

By Madhupreetha L. Rajaram, Elias Kougianos, Saraju P. Mohanty, and Uma Choppali

A Wireless Sensor Network (WSN) is a distributed set of complete and accurate information, a large number of
sensors deployed to work together for collective sensing and sensor nodes must be deployed in the areas of interest.
possible data processing. A WSN can be used to monitor
environmental behavior and structural integrity in a variety of During the process of sensing and transmitting data, issues
application fields, thus becoming an integral part of consumer such as power management, data collection, time
electronics of smart buildings in smart cities. Due to ever synchronization, communication protocols used and
increasing population growth with limited natural resources
congestion need to be addressed. Various algorithms are
smart cities are expected to be the wave of the future. For
instance, wireless sensor networks are widely used in industrial proposed by researchers to overcome these issues. These
settings with machine monitoring and play an important role algorithms can be verified with a simulation modeling
for monitoring the structural integrity of large buildings and framework or an experimental setup.
bridges. This review paper focuses on existing WSN simulation
frameworks that could be integrated with real-time hardware
prototypes. Various such simulation frameworks are analyzed
and compared, and a suitable simulation environment that
supports specific software packages is determined.

I. INTRODUCTION

A typical sensor is used to sense environmental properties


such as temperature, pressure, stress and vibration in the
form of electrical signals which are then calibrated to
measure the corresponding physical properties [1]. Wireless
sensor networks (WSNs) are collections of such sensors
deployed to sense variations in, and transmit data through, FIGURE 2. Illustration of a WSN for structural health
wireless networks as depicted in Figure 1 [2]. These sensors monitoring.
and sensor networks are an integral part of consumer
electronics used for the development of smart cities, smart One approach to test the design is through an experimental
structures, smart transportation systems, and smart health setup using actual components but it is expensive and rigid
care. for explorative research. On the other hand, a simulation
framework can reduce time and the risks associated with
high cost. However, it is important to select a suitable
simulation environment since there are numerous such
platforms available for wireless sensor network (WSN)
simulation. In this review paper, a comprehensive selection
of WSN simulation frameworks is analyzed paying
particular attention to those packages that can be interfaced
FIGURE 1. Illustration of a wireless sensor network with actual hardware.
(WSN).
This article is organized as follows. Section II reviews
A specific example of usage of a WSN for structural health related works in WSN, and section III introduces various
monitoring is depicted in Figure 2. The collected data wireless sensor frameworks. Section IV and Section V
provide better understanding of the structural materials, provide analysis and comparison of these simulation
capacity of the structure and can also be used to generate frameworks. Finally, Section VI concludes with final
alert warnings during natural calamities. In order to obtain remarks.

1
II. WIRELESS SENSOR NETWORKS: STATE-OF-ART

The advancement of WSNs has led to more accurate


monitoring of structural integrity, data collection and
analysis of observed data. However, the data collection
process is affected by various factors. Different solutions
and algorithms have been proposed by researchers to
improve the performance of the WSN.

A. Power Management

The sensor nodes are powered by a battery source, and the


lifetime of the sensor node is determined by the energy FiGURE 3. A Typical agent structure.
stored in the battery. Hence, the effective use of the
available power is a main challenge faced in sensor data
C. Communication Protocols
collection. An algorithm for selecting the cluster heads for a
group of sensors in order to reduce the power consumption
In order to obtain complete information of the area of
is proposed in [3]. The algorithm was based on random head
interest, a large number of sensor nodes are deployed. When
selection where minimum distance between the nodes was
all these sensor nodes try to communicate with the base
tabulated. Then the node with the minimum hopping
station or sink, data congestion can occur. A new congestion
distance was determined and assigned as the cluster head,
control mechanism is proposed in [6]. In this mechanism,
which reduces the energy required to hop the data over long
the buffer in each node is adjusted based on downstream
distances. An optimizing algorithm for limited buffering
data transmission in order to minimize packet loss. The
and controlled mobile sink is proposed in [4]. The mobile
performance of the algorithm was verified by simulating the
sink that collects the data by moving from one point to
model in MATLAB®.
another increases the wait time, and therefore, can lead to
Data collected at sensor nodes needs to be transmitted to the
buffer overflows. So, an optimization algorithm to reduce
base station or sink. This requires an efficient
wait time is discussed, and the algorithm is implemented in
communication protocol. For this, a sleep scheduling
the OMNeT++ simulator.
algorithm is proposed in order to turn on and off the radios
in [7]. The switching on and off of the radio is defined as a
B. Data Collection contiguous link scheduling problem and simulated in a C++
simulator. A hierarchical routing protocol, which is an
One of the most important operations of the sensor nodes is optimized Low Energy Adaptive Clustering (LEACH)
the data collection. Different data aggregation techniques protocol, has been proposed in [8]. LEACH is a clustering-
have been proposed for efficient data collection. A complete based protocol that aims at reducing the energy based on the
information collection mechanism by deploying an agent in assumption that all nodes have the same amount of energy.
the WSN is proposed in [5]. This agent collaboration In actual practice all nodes do not consume the same
provides a means to coordinate with multiple sensor nodes amount of energy hence, in this algorithm an optimized
to complete data collection, analysis and distributed fault LEACH is proposed. The algorithm allocates time slots for
diagnosis. Different agents are assigned different all the nodes. When the node does not transmit data during
operations, and they coordinate with each other to complete its time slot, then some other node utilizes the vacant slot
the entire task, as shown in Figure 3. The model is for transmission. This reduces the wait time for other nodes,
simulated in a network simulator to verify operation. which results in efficient utilization of the available
resource. The performance of the algorithm was tested in
OMNeT++. A data gathering tree is constructed, and an
energy efficient scheduling algorithm is proposed in [9].
The algorithm aims at reducing the state transitions, and
hence the energy consumption. This algorithm uses a Time

2
division multiple access (TDMA) technique for scheduling. III. WIRELESS SENSOR NETWORKSSIMULATION: SELECTED
The activities of subsets of the sensors are divided into FRAMEWORKS
different groups, and successive time slots are scheduled.
The entire network is divided into different groups, as The behavior of a system can be analyzed analytically,
shown in Figure 4. In the network, each group consists of a experimentally with a simulation mode, or a combination of
parent and children nodes. The children nodes will send these approaches. Analytical methods, however, cannot
data to the parent, and the parent will send information to provide complete details on the impact of power
the sink later within the allotted time slot. The model was consumption and other issues. On the other hand,
simulated in NS2.34 to verify the performance. experimental analysis can provide more accurate
information but this is achieved at a higher cost. Simulation
models serve as the best alternative to understand the
behavior of a system at low cost and in short time. A
simulation model can be designed based on different
algorithms. It is important to determine an algorithm that
best fits the requirements of the WSN.
A wide variety of simulation platforms are available, but
only a few simulators might be applicable for certain
operations. Various software tools are available such as NS-
2, OMNeT++, PAWiS, GloMoSim/QualNet, OPNET,
SENSE, J-Sim, Ptolemy II, Cell-DEVS, NesCT, GTnets,
System C, Prowler, NCTUns2.0, Jist/SWANS, SSFNet,
FIGURE 4. Illustration of a network model. TOSSIM, Atarraya, Avrora, ATEMU, EmStar, SENS,
Shawn, PiccSIM, TrueTime 2.0 in MATLAB®/Simulink®
and native MATLAB®/Simulink® [11, 12]. Each one of
D. Time Synchronization them could be used for different kinds of applications.

The data transmitted to the base station is stamped with time


information to provide details on when the data was sensed. IV. DETAILS OF SELECTED SIMULATION FRAMEWORKS
If each node operates at a different clock time, the time
stamped with data transmission will not be the same for all There are more than 25 WSN frameworks available. Out of
nodes. Hence, it is important to synchronize the time for all all the simulation environments, a few frameworks were
nodes. In [10], an algorithm for time synchronization of short listed and analyzed. The key features considered for
neighboring nodes is proposed based on a Gradient Time the selection of a simulation platform were the following:
Synchronization Protocol (GTSP), as shown in Figure 5, co-simulation with MATLAB®, operating system support,
designed for accurate clock synchronization of neighboring programming language implementation and API, number of
nodes in a network simulator. nodes that could be simultaneously simulated,
documentation, latest version availability, ZigBee® support
and potential issues during installation. Since the objective
is focused on integrating the software model and hardware
prototype, MATLAB® plays an important role in the design.
So, the simulation environment must have capabilities to
communicate with MATLAB®/Simulink® during real time
operation.

A. Network simulator NS-2

FIGURE 5. The Gradient Time Synchronization Protocol Network Simulator (NS-2) is a discrete event, object
(GTSP). oriented, and general purpose network simulator based on
C++ language that can be used to simulate local and wide

3
area networks [11, 12, 13]. It was primarily developed to INET framework and NesCT. NesCT can be used for
operate in Linux-based Operating Systema such as Ubuntu. simulating TinyOS sensor based networks. PAWiS is also
However, it can also be installed in Windows® OS with an OMNeT++ based simulator that captures a wide array of
Cygwin support. For analysis purposes, NS-2 was installed modules, and provides support for mobility and
in Ubuntu. There are three commands that need to be typed environmental dynamics [9]. OMNeT++ is a commercial
in the terminal to install the latest version: (1) sudo apt- software that can be used for educational and research
get install ns2; (2) sudo apt-get install purposes. The modules are written in the Network
nam; and (3) sudo apt-get install xgraph. Description (NED) programming language. Co-simulation
When installation is complete, “ns” can be typed in the of MATLAB® and OMNeT++ can be achieved by
terminal, and a percentage symbol is returned, which converting C/C++ code into objects and compiling these
confirms successful installation of NS-2. A network objects in OMNeT++. However, it does not support
animator (NAM) editor window, as shown in Figure 6, can communication during real time simulation.
be opened by typing “nam” in the terminal. In order to
design a model, a program can be written in the “Tool C. Prowler
Command Language” (TCL) and visualized through the
NAM editor. The performance is reliable for node sizes up Prowler is an event driven wireless sensor network
to 100 nodes and degrades with increased node size. The simulator designed to run on MATLAB® [11]. Simulation
disadvantages of NS-2 are the interdependency between the codes that implement routing protocols and other
modules and that co-simulation with MATLAB® requires applications can be written in the MATLAB® language. This
special framework definitions [14]. Also, in order to framework can be used for optimizing communication
implement the ZigBee® communication protocol, separate protocols [16]. Prowler can be installed in MATLAB® by
patch files must be installed. Even though this network simply adding the directory to the MATLAB® startup path.
simulation can be used for verifying different algorithms, The editor window can be opened by typing “prowler” in
NS-2 cannot be used easily for hardware-software co- the MATLAB® command window. A window, as shown in
simulation in MATLAB® as it requires separate framework Figure 7, appears where the data transferred between the
definitions. nodes can be visualized. Some routing protocols such as
flood 1D, flood 2D, span tree and collision demo can be
verified through Prowler. However, it cannot be used for
developing a customized WSN framework. There is no clear
documentation provided for developing user defined
models, and no new versions have been released recently.
Also, Prowler does not support the ZigBee® protocol.

FIGURE 6. NS- 2 NAM editor window.

B. OMNeT++

OMNeT++ [11, 12, 15] is a modular simulation framework


FIGURE 7. User interface of Prowler.
written in C++ that can be used for simulating ad-hoc
networks. Frameworks developed in OMNeT++ that can be
D. Atarraya
used for WSN analysis include: MiXiM, Mobility
Framework, media access control (MAC) layers, Castalia,

4
Atarraya is an event driven simulator that can be used for Figure 9. The simulator is no longer supported by the
teaching and researching control topology algorithms and developer and the error in the patch could not be rectified.
wireless sensor protocols [17]. It is designed to operate in
the Windows® OS. The simulator can be installed by adding
the directory path to the environmental variable. After
installation, the Atarraya simulation panel, as shown in
Figure 8, can be opened by double clicking the FIGURE 9. PiccSIM- NS-2.34 patch error.
“Atarraya.jar” file. Atarraya is written in Java. The latest
Oracle Java version must be installed for using Atarraya.
The simulation panel consists of a deployment panel, a F. Truetime
protocol selection panel, a visualization panel, a node stats
and a report panel. In the deployment panel, the number of TrueTime is a real-time control system based framework
nodes, location, and size can be selected. The that operates in MATLAB®/Simulink®, as shown in Figure
communication protocol can be selected from the protocol 10 [19]. TrueTime is written in the C++ and MEX
selection panel, and the nodes can be visualized in the languages. TrueTime can be installed in MATLAB® by
visualization panel. The advantages of Atarraya are: it adding its path to the PATH environmental variable and the
supports different topology construction and maintenance; it MATLAB® startup path. In order to compile programs in
allows simulation of initial agent topology with available Truetime, Microsoft Visual Studio must be installed. The
algorithm. In addition, Atarraya supports simple and walk- Truetime package comprises of network blocks such as
based mobility and energy models. On the other hand, the Ethernet, controller area network (CAN), time division
simulator does not support the ZigBee® protocol and cannot multiple access (TDMA) and frequency division multiple
be integrated with MATLAB®/Simulink®. access (FDMA), Round Robin, Switched Ethernet, FlexRay
and PROFINET. It also consists of wireless network blocks
such as WLAN 802.11b and 802.15.4 ZigBee® technology,
as shown in Figure 10. Truetime supports battery power
sources and can act as a stand-alone network interface
block. It allows co-simulation of controller task execution in
real-time, network transmission, and continuous plant
dynamics. The disadvantage with true time is that clear
documentation for programming the kernel blocks is not
available, which made it difficult to use this framework.

FIGURE 8. Atarraya simulation panel.

E. PiccSIM

PiccSIM [18] is a simulation platform for integrated


communication, control design simulation, implementation
FIGURE 10. TrueTime Tool Box or Block Library.
and modeling. This tool kit can be used for co-simulation of
networked control systems (NCS). The main advantage is
that the simulator can be integrated with Simulink® and G. MATLAB®/Simulink®
NS2.34. But two separate computers - one running NS-2.34
and the other running MATLAB® - are required. For MATLAB®/Simulink® [20] is a software package for
analysis, NS-2.34 was installed in a Virtual machine, and numeric computation and analysis that is developed and
MATLAB®/ Simulink® was installed in the host machine. maintained by Mathworks® Inc., The software is flexible
Since NS-2.34 was an older version, some bugs had to be and reliable. Simulink® is a software package for modeling,
rectified before installation. After successfully installing simulating and analyzing dynamic systems. The software
NS-2.34, the PiccSIM-NS-2.34 patch was installed. But the can be installed in the major operating systems such as
patch files corrupted NS2.34 with an error, as shown in Windows®, OS X, and Linux. Simulink® supports a wide

5
variety of toolkits such as digital signal processing toolkit, feature, which promotes integration of real time processors
communication toolkit, control system, and embedded with the simulation model. With Simulink®, customized
controller toolkit. As a result, it enables users to make node communication through the ZigBee protocol can be
customized designs with MATLAB®/Simulink® seamlessly. developed. With the code generation capabilities of
The key advantage of MATLAB®/Simulink® is that all these MATLAB®, the simulation model can be integrated with
toolkits are documented with examples. Another benefit of hardware models easily. As a result, MATLAB®/Simulink®
MATLAB®/Simulink® is the automatic code generation attractive for WSN framework simulations [1, 2].

Table 1. Comparative perspectives of simulation frameworks.


MATLAB®/
Latest Programming Zigbee
Framework OS Compiler Node size Simulink®
Update Language Support
integration
Unix/ Tool Command
C++, JDK ns- 100 nodes
NS-2 Windows with Language Yes Yes
1.6 2.35/2013 Maximum
CYGWIN (TCL)/Otcl
NED (Network
Windows, OS C++11, JDK OMNeT
OMNeT++ Description) - Yes Yes
X, Linux 1.7 or later 4.6/2014
Language
Apple
Xcode
OS that Graphical Based on
version 4.0
Prowler supports V1.25/2004 Programming the type of Yes No
or higher
MATLAB® tool (GUI) application
Windows:
C++, JDK
Windows,
Can
requires GUI 1.3 beta/
Atarraya Java 6 GUI simulate No No
formatting for 2011
1000 nodes
Linux
Apple
Xcode PiccSIM
TCL/Otcl for
Windows, OS version 4.0 Simulink® Similar to
PiccSIM network Yes Yes
X, Linux or higher Version NS-2
modelling
Windows: 1.16 /2013
C++, JDK
Apple
Xcode
version 4.0
TrueTime Graphical
Windows, OS or higher
TrueTime 2.0 beta 7 / Programming Limited Yes Yes
X, Linux Windows:
2012 tool
C++, JDK,
Microsoft
visual studio
Apple
Xcode Code: >
OS X,
MATLAB®/ version 4.0 100 nodes
Windows, R2015a C, C++, Fortran - Yes
Simulink® or higher Simulation:
Linux
Windows: Restricted
C++, JDK

simulating WSNs were analyzed. Specifically, software


V. SUMMARY AND CONCLUSIONS such as NS-2, OMNeT++, Prowler, Atarraya, PiccSIM,
This article focuses on comparing WSN simulation Truetime, and MATLAB®/Simulink® were analyzed in
frameworks that need to be integrated with an actual detail. These simulators were compared and studied
hardware platform. Various frameworks that can be used for thoroughly based on specific criteria. An important design

6
requirement is the co-simulation capability with the real- [3] G. Zhang, G. Liu, W. Chen and C. Yang, “Quantitative Analysis of
Cluster-Head Selection for Wireless Sensor Networks,” in
time processors and the support for the ZigBee network Proceedings of the World Automation Congress (WAC), 2012, pp.
protocol. So, the simulators that did not meet these 277-281.
specifications were eliminated. Finally, it was found that [4] T. Rault, A. Bouabdallah, and Y. Challal, “WSN lifetime
MATLAB®/Simulink® met the most important design optimization through Controlled Sink Mobility and Packet
specifications such as customized node design, ZigBee, and Buffering,” in Proceedings of the Global Information Infrastructure
Symposium, 201, pp. 1-6.
co-simulation with hardware. Hence, MATLAB®/Simulink®
[5] Y. Lei, “Research and Implementation of WSN-based Data
can be effectively used for the framework design and Acquisition and Analysis System Using Agent Collaboration,” in
simulation. Proceedings of the 2nd International Conference on Power
Electronics and Intelligent Transportation System, 2009, pp. 235-237.
ABOUT THE AUTHORS [6] V. Michopoulos, L. Guan, and I. Phillips, “A New Congestion
Control Mechanism for WSNs,” in Proceedings of the 10th IEEE
International Conference on Computer and Information Technology,
M. L. Rajaram ([email protected]) obtained her 2010, pp. 709-714.
Master’s degree in Electrical Engineering Technology from [7] J. Ma, W. Lou, and X.-Y. Li, “Contiguous Link Scheduling for Data
the University of North Texas, USA in Dec. 2015. Aggregation in Wireless Sensor Networks,” IEEE Transactions On
Parallel And Distributed Systems, Vol. 25, No. 7, July 2014, pp.
1691-1701.
Elias Kougianos ([email protected]) is currently an associate
[8] N. Fatima and S. Gambhir, “Op-Leach: An Optimized LEACH
professor in Electrical Engineering Technology at the Method for busty Traffic in WSNs,” in Proceedings of the 4th
University of North Texas. He obtained his Ph.D. in International Conference on Advanced Computing & Communication
electrical engineering from Louisiana State University in Technologies, 2014, pp. 222-229.
1997. He is author or co-author of over 100 peer-reviewed [9] P. Shrivastava and S. B. Pokle, “An Energy Efficient Scheduling
Strategy for Data Collection in Wireless Sensor Networks,” in
journal and conference publications. He is a Senior Member Proceedings of the International Conference on Electronic System,
of IEEE. signal Processing and Computing Tchnologies, 2014, pp. 170-173.
[10] P. Sommer and R. Wattenhofer, “Gradient Clock Synchronization in
Saraju P. Mohanty ([email protected]) is a Professor Wireless Sensor Networks,” in Proceedings of the International
at the Department of Computer Science and Engineering, Conference on Information Processing in Sensor Networks, 2009, pp.
37-48.
University of North Texas, and the director of the
[11] S. A. Madani, J. Kazmi, S. Mahlknecht, “Wireless sensor networks:
NanoSystem Design Laboratory. He obtained his Ph.D. in modeling and simulation,” InTechopen,
computer science and engineering from the University of http://cdn.intechopen.com/pdfs-wm/11548.pdf, Last visited on 14
South Florida in 2003, his master’s degree in systems December 2015.
science and automation from the Indian Institute of Science, [12] Q. I. Ali, “Simulation Framework of Wireless Sensor Networks
(WSN) using MATLAB®/Simulink® Software”,
Bangalore, India, in 1999. He is the author of 200 peer- http://cdn.intechopen.com/pdfs-wm/39337.pdf, Last visited on 14
reviewed journal and conference publications and 3 books. December 2015.
He is an inventor of 4 US patents. He is a Senior Member of [13] The Network Simulator - ns-2, http://www.isi.edu/nsnam/ns/, Last
IEEE and ACM. visited on 14 December 2015.
[14] O. Heimlich, R. Sailer, and L. Budzisz, “NMlab: Cosimulation
Uma Choppali ([email protected]) is currently an Framework for MATLAB® and NS-2,” in Proceedings Second
International Conference on Advances in System Simulation
adjunct faculty at the Department of Engineering (SIMUL), 2010, pp. 152-157.
Technology at the University of North Texas, Denton. She [15] OMNeT++, http://www.omnetpp.org, Last visited on 14 December
obtained a Ph.D. in Material Science and Engineering from 2015.
the University of North Texas in 2006. She holds a master’s [16] G. Simon, P. Volgyesi, M. Marioti, and A. Ledeczi, “Simulation-
degree from the Indian Institute of Technology Bombay, based Optimization of Communication Protocols for Large-Scale
India. She has authored 10 peer-reviewed publications. Wireless Sensor Networks,” in Proceedings of the Aerospace
Conference, 2003, pp. 1339-1346.
[17] Attaraya, http://www.cse.usf.edu/~labrador/Atarraya/, Last visited on
14 December 2015.
REFERENCES
[18] PiccSIM, http://wsn.aalto.fi/en/tools/piccsim, Last visited on 14
[1] S. P. Mohanty, Nanoelectronic Mixed-Signal System Design, December 2015.
McGraw-Hill, 2015, ISBN: 978-0071825719.
[19] TrueTime, http://www.control.lth.se/truetime, Last visited on 14
[2] M. L. Rajaram, “Comparative Analysis and Implementation of High December 2015.
Data Rate Wireless Sensor Network Simulation Frameworks”,
[20] MATALB®/Simulink®, http://www.mathworks.com, Last visited on
Master’s Thesis, Department of Engineering Technology, University
14 December 2015 2015.
of North Texas, Fall 2015.

You might also like