Wireless Sensor Network Simulation Frameworks A Tutorial Revie
Wireless Sensor Network Simulation Frameworks A Tutorial Revie
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
1
II. WIRELESS SENSOR NETWORKS: STATE-OF-ART
A. Power Management
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.
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.
B. OMNeT++
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.
E. PiccSIM
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].
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.