Академический Документы
Профессиональный Документы
Культура Документы
actually keep on doing the research work by real sensor nodes can drive our simulation in a pre-
integrating a small number of real sensor nodes deployed virtual WSN. Additionally, topology layouts
and a large number of virtual sensor nodes and algorithms of virtual WSN are customizable and
generated from the simulator. work as user-defined plug-ins, both of which can
The integration of a simulation environment and a easily match the corresponding topology and
physical testbed brings three major challenges: algorithms of real WSN testbed. As a major
Sensor node simulation. Normally, a number of contribution of this research work, NetTopo is released
heterogeneous sensor devices can be used for as open source software on the SourceForge. Currently,
building a WSN testbed. The integrated platform it has been implemented with more than eighty java
should not be oriented to simulate only a specific classes and more than 11,000 Java lines source codes.
kind of sensor device, which means that the Users can freely download the latest version of
heterogeneous problem requires the integrated NetTopo by accessing the website on [4].
platform to be flexible enough to simulate any The rest of the paper is organized as follows:
new sensor device. Section 2 positions our work with respect to the related
Testbed visualization. Sensor nodes are generally work. Section 3 illustrates NetTopo architecture and
small in size and do not have user interfaces like some design issues in detail. Section 4 presents two
displays or keyboards. This makes it difficult to case studies provided in NetTopo as examples. Section
track the communication states, debug algorithms 5 concludes this paper and describes the future work.
and measure the performance. On the other hand,
the communication topology in testbed is 2. Related work
invisible, but researchers need to see the
communication topology for analyzing their A large number of sensor network simulators have
research algorithms. For example, when been proposed by researchers till today. Generally,
implementing a new routing algorithm in the these simulators can be classified into the following
testbed, the actual routing path is expected to be three major categories based on complexity:
visible for researchers. Algorithm level. Simulators [5-7] focus on the
Interaction between the simulated WSN and logic, data structure and presentation of the
testbed. The simulated WSN and the physical algorithms. AlgoSensim [5] analyzes specific
testbed may need to exchange information, e.g. algorithms in WSNs, e.g. localization, distributed
routing packets. Their horizontal interconnection, routing, flooding, etc. Shawn [6] is targeted to
communication, interaction, and collaboration are simulate the effect caused by a phenomenon,
all emerging difficult problems that need to be improve scalability and support free choice of the
addressed. implementation model. Sinalgo [7] offers a
In this paper, we present an extensible integrated message passing view of the network, which
framework of simulation and visualization called captures well the view of actual network devices.
NetTopo to assist the investigation of routing Packet level. Simulators [8-11] implement the
algorithms for WSNs. With respect to the simulation Data Link and Physical Layers in a typical OSI
module, users can easily define a large number of on- network stack. The most popular and widely used
demand initial parameters of sensor nodes, e.g. network simulator ns-2 [8] is not originally
residential energy, transmission bandwidth, and radio targeted to WSNs but IP networks. SensorSim [9]
radius. Users also can define and extend the internal is an extension to ns-2 which provides battery
processing behavior of sensor nodes, such as energy models, radio propagation models and sensor
consumption, bandwidth managemen. It allows users channel models. J-Sim [10] adopts loosely-
to simulate extremely large scale heterogeneous coupled, component-based programming model,
networks. On the subject of the visualization module, it and it supports real-time process-driven
works as a plug-in component in charge of visualizing simulation. GloMoSim [11] is designed using the
WSN testbed’s connection states, topology and sensed parallel discrete-event simulation capability
data. These two modules paint the virtual sensor nodes provided by PARSEC.
and links on the same canvas which is an integration Instruction level. Simulators [12-14] model the
point for centralized visualization. Since the sensor CPU execution at the level of instructions or even
node attributes and internal operations are user cycles. They are often regarded as emulators.
definable, this feature guarantees that the simulated They compute the power of a particular sensor’s
virtual nodes have the same properties with those of hardware platform in WSNs. TOSSIM [12]
real sensor nodes. The sensed data captured from the
Digital Enterprise Research Institute (DERI) Technical Report 2008-July-31
simulates the TinyOS network stack at the bit integration as well as the unique features due to the
level. Atemu [13] is an emulator that can run careful design.
nodes with distinct applications at the same time.
Avrova [14] is a Java-based emulator used for 3.1. Modular components
programs written for the AVR microcontroller
produced by Atmel and the Mica2 sensor nodes. From the high-level point of view, NetTopo
It is clear that none of these simulators has consists of both simulation and visualization
considered to integrate with real WSN testbed. This frameworks. These two frameworks are not just simply
point clearly distinguishes NetTopo from them. placed together and do their own jobs which means
In terms of visualization of real WSN testbed, there they need to interact with each other and
is much less related work. Octopus [15] is an open- access/manipulate some common components and
source visualization and control tool for sensor resources. For the purpose of focusing on the
networks in the TinyOS 2.x environment. It provides integration issues of these two, we design the modular
users with a graphical user interface (GUI) for viewing component based NetTopo architecture, which is
the live sensor network topology and allows the user to flexible enough for new components to be added and
control the behavior of one or many sensor nodes. It is incorporated in the future. The basic architecture of
very tightly coupled to the TinyOS. The Surge NetTopo is illustrated in Figure 1.
Network Viewer [16] and the Mote-VIEW Monitoring Main Control and Utility are two components
Software [17] are Crossbow’s products to visualize involved and accessed in all layers. Main Control is
WSNs. They are capable of logging wireless sensor the core component working as a coordinator in charge
data to a database and to analyze and plot sensor of the interactions of other components, the
readings. They are specifically designed to support corresponding data communication, etc. It can be
only Crossbow’s sensor nodes, thus they are not regarded as an adaptor between input and output
extensible. SpyGlass [18] visualizes WSNs and related interfaces of other components and enables them to
information using a flexible multi-layer mechanism work smoothly. Utility provides some basic and useful
that renders the information on a canvas. TinyViz [12] services, e.g., defined application exceptions, format
is a GUI tool of TOSSIM package of TinyOS. It verification, number transforms, dialogue wrappers.
visualizes sensor readings, LED states and radio links These functions are normally invoked by other
and allows direct interaction with running TOSSIM components statically.
simulations. But these interactions are often ad-hoc, as File Manager, which handles all related file
well as laborious and difficult to reproduce. Also, it is operations, is for the purpose of data persistence such
tightly coupled to the TinyOS software. as logging runtime information, recording statistical
In short, most of existing visualization tools support results, keeping references of virtual sensor nodes. Log
only a single type of sensor networks and are highly information and statistical results are recorded as
coupled to the TinyOS. However, NetTopo is targeting character streams into human readable format.
at the visualization and control of WSN testbeds where References of virtual sensor nodes are stored as
heterogeneous devices are used, e.g., wireless camera, serialized format in order for the inner structure of
Bluetooth based body monitoring sensor devices. and node to be easily recovered and reused. All these
these devices are generally not using TinyOS. references are encapsulated in Virtual WSN component.
Virtual WSN works like a runtime sensor nodes
repository that also declares several interfaces by
which other components can add new virtual nodes,
delete particular nodes, retrieve the same type of nodes
and their derived children, etc.
Node, Topology and Algorithm components are
designed as highly extensible modules that can be
Figure 1. NetTopo Architecture regarded as plug-ins. Node represents a virtual sensor
node. Virtual sensor nodes do not have fixed properties
3. NetTopo architecture or structures. For example, sensor nodes can have very
different sensing attributes: temperature, humidity,
In this section, we describe the modular sound, vibration, pressure, motion, pollutants, etc. To
components of NetTopo, their relationship and the allow users to create their own virtual sensor nodes, we
interactions in terms of simulation, visualization and declare an abstract interface named VNode, which
Digital Enterprise Research Institute (DERI) Technical Report 2008-July-31
defines several methods representing a real sensor visualization respectively. The structure difference
node’s actions. Any specific node that wishes to run on between these two components is that simulator is a
the simulator must implement the VNode interface. If built-in of NetTopo whereas visualizer is loaded as a
all sensor nodes obey the strict APIs defined in VNode, plug-in. This is because real sensor devices are
it will be feasible to simply change any node inner heterogeneous. Different accessing interfaces
structure without having to modify other components. (wrappers) are needed for different devices, e.g. the
Topology stands for the topology to be deployed in HTTP protocol based connection is used for getting
Virtual WSN, which describes the relationship and image streams from wireless camera through Wi-Fi
possible connections between virtual sensor nodes. and socket connection is used for getting CrossBow
Network topology can be the various shapes: line, sensor data. The common components they all utilize
circle, triangle, quadrilateral, tree and so on. Users can include Virtual WSN, Painter, Node, Configuration
flexibly implement any needed specific sophisticated and GUI. Using these shared resources sometimes can
network topology. Algorithm represents an algorithm cause synchronization problem, e.g., when both
to be applied in the Virtual WSN. The algorithm can be Simulator and Visualizer components need to add new
any routing, clustering, scheduling, controlling sensor nodes in the graphical display canvas. The
algorithm, etc. Users can freely implement their working principles and inner interaction of both
needed algorithms for their specific studies. components are explained in the next subsection.
request. The Main Control component directly triggered by a particular menu action or window
forwards the task to the Algorithm component and closing. This simple scenario only focuses on the
wait for the results. Then, the Algorithm component visualization of testbed, in which visualization and
searches the Virtual WSN and gets the references of simulation components are running concurrently, but
the starting virtual sensor nodes. In Virtual WSN, the they actually do not interact with each other because
nodes cooperatively behave according to the specified no common virtual sensor nodes are used by both
algorithm, and then return the results, e.g. searched components. A further example of interaction between
routing paths. The Main Control component notifies both components is presented in following case study.
the Painter component to paint the results on the GUI
after receiving the results from the Algorithm 3.3. Features of NetTopo
component to which simulation task was ever passed. Features of NetTopo that are integrated in the
For the sake of simplicity, this scenario does not current version can be classified in the following four
describe the following interactions that are actually categories.
included in the NetTopo implementation: reading the 1) Platform independent.
configuration, recording log information on GUI, NetTopo is implemented in Java language, which
producing statistical results by using the File makes it portable between different operating
Manager and notifying the user any possible runtime systems. Built upon Standard Widget Toolkit
exceptions. (SWT), the graphical user interface has a local
Visualization is driven by user’s action as well. operating system look and feel.
However, the Visualizer component works as a thread 2) Extensibility.
that shares some common components with the Configurable sensor nodes with defined attributes.
Simulator component including GUI, Main Control, Users can define their own virtual sensor nodes
Painter and Configuration. Sometimes, the Virtual with expected attributes. Then new type of nodes
WSN, Node and File Manager can also be involved. will be loaded as a plug-in which provides an
This depends on the different implementations of extra choice when users plan to deploy a WSN.
Visualizer for different specific real sensor devices. Customizable sensor network topology layout.
Another difference from the Simulator component is Users can define their own topology based on the
that the Visualizer component is loaded only when the API described in the Topology component. This
Main Control component needs it. is helpful when users focus on studying a
particular topology of the network.
User-defined algorithms and functions. An
algorithm could be composed of several functions,
each of which acts for a particular purpose. User
can debug a single function or add a new function
without influencing others in the same algorithm.
Device based wrappers for visualization. A
wrapper is used to get information from sensor
devices. To visualize different hardware devices,
users can create different wrappers to set up the
connections for extracting data and device
information.
Integrating with GSN middleware. GSN [3] is a
sensor network middleware developed by us. It
Figure 4. Component interaction in the visualization provides a large number of wrappers (currently
more than 25 wrappers) for extracting data from
The Figure 4 shows a particular scenario of heterogeneous sensor devices. This can help to
components interaction in visualization. Once the reduce the workload to implement new wrappers
Visualizer thread is created, it runs concurrently with for some GSN supported sensor devices.
the Simulator thread. It then works in a loop to update 3) Flexibility.
the testbed information on GUI e.g. logging and Single node deployment. Users can manually
painting added sensor nodes and connections, choose to deploy a single node in a given location.
refreshing sensed data of each node, etc. until users This is useful for a slight modification to the
manually interrupt this thread. The interruption can be
Digital Enterprise Research Institute (DERI) Technical Report 2008-July-31
virtual WSN or placement for a single sink node to further import them into Microsoft Office
or source node. Excel to get the graphical results, e.g. curve.
Single node movement. Users can manually move 4. Case studies
any single node to any place in the WSN field
(graphical display canvas) after deploying the To demonstrate the usability of the NetTopo, in this
sensor nodes. This is useful for updating some section, we present two case studies on simulation and
specific sensor node’s location, e.g. move the visualization respectively as user examples. In terms of
sink node for several tests. the simulation, two routing algorithms are
Random multi-node deployment. Users can implemented and compared based on the statistical
choose to randomly deploy a specified number of output. They are Two-Phase geographical Greedy
sensor nodes. The random seed can be the current Forwarding (TPGF) [19] and Greedy Perimeter
time point of the running computer (for Stateless Routing (GPSR) [20]. As for visualization, a
irreproducible deployment) or any specified network composed of Crossbow Company’s xbow
integer (for reproducible deployment). sensor nodes is visualized. Additionally, these xbow
Specific multi-node deployment. Users can choose sensor nodes are considered as source nodes in a pre-
to deploy a specified number of sensor nodes deployed virtual WSN: when the sensed temperature
based on pre-defined topologies to form some value of any real xbow node goes up over a threshold,
special shapes, e.g., line, grid, circle, tree. For which means an event is detected, it then automatically
example, users can deploy a circle of nodes by starts a simulation for exploring one/multiple routing
specifying the location of the circle center, radius paths in the virtual WSN.
and node number.
Repeated node deployment. Users can repeatedly 4.1. Simulation of two routing algorithms
deploy different kind of sensor nodes in the
Virtual WSN. This allows the deployment of Users who do simulation of testing an algorithm not
heterogeneous sensor networks. only expect to see visual results on the canvas but also
4) Practicability. need to gather some related statistic information that
Data persistence for virtual WSNs. The network can be used to analyze the algorithm performance. For
deployment state can be saved in a specific type example, users need to know that by applying an
of file using “.wsn” as the postfix. Users can base algorithm, the source node does find a routing path to
on these files to reuse the deployed sensor the sink node that is visually painted on the canvas.
network or share these files with other Additionally, users want to know how many paths can
researchers to discussion a common problem. be searched by repeatedly using the same algorithm in
This feature is enabled by implementing several the WSN, and how many hops each path has. However,
file operations, such as file saving, creating, providing such information of a single test on a
opening. specific WSN deployment is not enough, because to
Snapshot for virtual WSN. Users can capture a evaluate the algorithm performance, users generally
snapshot for a virtual WSN and save it as “.bmp” need to simulate the same algorithm for many times
picture. This feature allows users to further while changing several different input parameters to
analyze the simulation results and use the saved get the more convincible average results. Following
picture for sharing or writing papers. the above example, users also want to know the
Node manipulation. Users can delete specified average paths number by applying the same algorithm
nodes, view the current properties of the nodes, in 100 simulations with different random network
modify the property values of a node before deployment. And users even want to know the
starting a simulation, search a node by its ID and variation of the paths number along with the variation
disable nodes or kill nodes in a specified region of value of input parameters such as network size,
to make a hole in the WSN or make an irregular node number, transmission radius. If repeating the
WSN field. These functions aim to provide users simulation manually for 100 times is a tedious work,
an easy-to-use environment. then doing the simulation for 1000000 times manually
Recording of simulation results. NetTopo can is a totally unacceptable task. NetTopo provides an
save the simulation results in a specific type of easy way for users to configure their input parameters
file using “.report” as the postfix. Users can use for the purpose of simulating the same algorithm for
normal text editor software to open it and read the many times, all of which vary in cared parameters.
simulation result. The simulation results are
formulated into a unified format that allows users
Digital Enterprise Research Institute (DERI) Technical Report 2008-July-31
Two famous geographical routing algorithms TPGF length after applying optimization. The GPSR-GG
and GPSR are implemented in NetTopo as examples. means the average path length on the GG planar graph
When applying them respectively in the network layer [20] and the GPSR-RNG means the average path
of WSN, different performance could be compared in length on the RNG planar graph [20]. It is easy to see
various aspects. The major measurement metrics which the impact on the average path length of both GPSR
are mainly concentrated include the searched average and TPGF routing algorithms when using different
number of paths by repeatedly using this same transmission radius of sensor nodes for simulation.
algorithm in the WSN and the average path length
from the source node to the sink node. We would like 4.2. CrossBow sensor network visualization
to know the variation of these two metrics in the case
of different conditions in terms of network density and XbowNet is a WSN composed of Crossbow
transmission radius of sensor nodes. Company xbow sensor nodes. Figure 6 shows the
In order to simplify this case study, the network size whole network structure and flow of sensed data. Sink
is fixed in 600 × 400 (1 pixel on the canvas is and xbow nodes are hardware. Gateway is an
considered as 1 meter). For each fixed number of intermediate computer on which the corresponding
sensor nodes (network density) and transmission radius software driver called xServe is installed for the
(network degree), the average number of paths and the purpose of converting sensed data into XML stream
average path length are computed from 100 simulation and providing a TCP/IP service on port 9005. NetTopo
results using 100 different random seeds for network could be located on gateway or another computer that
deployment. Then, we change the node number and can communicate with the gateway.
transmission radius to obtain a different value. By
gathering all these average values together, lots of
chart and figures can be drawn to reflect the execution
performance of the algorithms.
[10] http://www.j-sim.org/
[11] http://pcl.cs.ucla.edu/projects/glomosim/
[12] http://www.cs.berkeley.edu/~pal/research/tossim.html
[13] http://www.hynet.umd.edu/research/atemu/
Figure 7. The basic 3D visualization model in NetTopo
[14] http://compilers.cs.ucla.edu/avrora/
We have built a basic 3D visualization model for
the smart home/office scenario in NetTopo as Figure 7 [15] http://csserver.ucd.ie/~rjurdak/Octopus.htm
shows. As the future implementation work, we will
[16] http://www.cmt-gmbh.de/surge_network_viewer.htm
further implement this 3D visualization model and
integrate NetTopo with some existing 3D game engine [17] http://www.xbow.com/Products/
to provide a better visualization environment.
All in all, currently NetTopo gets the first step into [18] C. Buschmann, D. Pfisterer, S. Fischer, S.P. Fekete, A.
the door of the whole vision where network simulators, Kröller, “SpyGlass: A Wireless Sensor Network Visualizer”,
visualizors and real physical testbeds are expected to in ACM SIGBED Review. Vol. 2, No. 1, 2005.
be integrated to test and validate algorithms, protocols
and applications. [19] L. Shu, Z. Zhou, M. Hauswirth, D. Phuoc, P. Yu, L.
Zhang, "Transmitting Streaming Data in Wireless
Multimedia Sensor Networks with Holes", in Proceedings of
6. Acknowledgement the Sixth International Conference on Mobile and Ubiquitous
Multimedia (MUM 2007), December 12-14, 2007. Oulu,
The work presented in this paper was supported by Finland.
the Lion project supported by Science Foundation
Ireland under grant no. SFI/02/CE1/I131. [20] B. Karp, H.T. Kung, “GPSR: greedy perimeter stateless
routing for wireless networks”, in Proceedings of the Annual
International Conference on Mobile Computing and
7. Reference Networking (MobiCom 2000), Boston, USA, August.