This document describes the development of a component-based wireless sensor network simulator. The simulator architecture is composed of nodes, an application simulator, and a world model. Each node is made up of components like a radio, sensors, and battery. The simulator allows for different types of nodes to be defined and created at runtime. Future work includes supporting more node types, implementing a world model, and developing improved battery and sensor models.
Prediction of Wireless Sensor Network and Attack using Machine Learning Techn...
Developing a Component-based Simulator for Wireless Sensor Network
1. Developing a Component-based
Component-
Simulator for Wireless Sensor Network
Project for the course:
Technologies of Information System
Under the supervision of: Prof. Fabio A. Schreiber
Students:
Adnan Faisal (709399)
Lucky Meherunnesa (709400)
Sk. Md. Munir Hassan(709529)
Sk Md M i H (709529) Date: 28 01 08
D t 28-01-08
2. Flow of the presentation 2
•Introduction
•The Simulator Architecture
The
•The Design Document
•Future works
uue o s
•Application demonstration
Corbetta Simone – Giuseppe Landolfi
4. Introduction 4
•In this project we intended to develop a WSN simulator focusing on component based architecture in
which every component has input and output interface through which a component can take input or give
output to the outside world.
•We take a step to develop a wireless sensor network simulator as the improved version of the
previously developed simulators which would pave the way for the wide acceptance and deployment of
se so e o s
sensor networks.
•This simulator has been developed in such a way so that it can support or work with different kinds of
wireless nodes.
•Another additional feature of our simulator is that it can take the definition of a wireless node as a system
parameter at runtime, as a result the simulator is not restricted to a single type of node.
Corbetta Simone – Giuseppe Landolfi
5. WSN and its Simulator 5
•Wireless Sensor Networks (WSNs) consist of small nodes with sensing, computation, and wireless
communications capabilities.
•Networking together hundreds or thousands of cheap micro sensor nodes allow users to accurately
monitor a remote environment by intelligently combining the data from the individual nodes.
•Sensor networks can be used for various app ca o a eas (e g , health, military, home).
Se so e o s ca o a ous application areas (e.g., ea , a y, o e)
•The challenge of developing, debugging, and evaluating complex sensor network applications demand a
new set of tools to aid programmers. Simulators have been developed to fulfill these demands and have
been the subject of intense research in the p
j past decade.
Corbetta Simone – Giuseppe Landolfi
6. The need of another WSN Simulator 6
•By studying some simulation of sensor networks developed in the previous researches such as TOSSIM,
ATEMU and AVRORA we have found a few deficiencies.
•TOSSIM provides a high degree of accuracy but its compilation loses fine grained timing. Also, TOSSIM
can simulate only TinyOS programs.
•ATEMU was the first a d, u
U as e s and, until now, o y instruction-level s u a o that cou d s u a e se so network
o , only s uc o e e simulator a could simulate sensor e o
programs with accuracy down to the clock cycle of each individual node. The cycle-by-cycle
implementation strategy achieves synchronization for free but scales poorly.
•AVRORA outperforms ATEMU in terms of raw p
p performance when run on a state-of-the-art Java virtual
machine, scales to more nodes, and scales well over number of processors available to the simulator.
One limitation of AVRORA is that it does not model clock drift, a phenomenon where nodes may run at
slightly different clock frequencies over time due to manufacturing tolerances, temperature, and battery
p
performance.
Corbetta Simone – Giuseppe Landolfi
7. 7
The Si l t
Th Simulator
Architecture
Corbetta Simone – Giuseppe Landolfi
8. Simulator Top View 8
SIMULATOR MODEL
Environment
WORLD
Aggregation APPLICATION
SIMULATOR
NODE
•World: Describes the world of the sensors. Tells where is water, tree etc. A sensor node may query the
world for different information such as temperature, sound, vibration, pressure, motion or pollutants, at
different locations.
•Application Simulator: The application simulator is the place where the queries are processed.
•Node: Node refers to a y se so node. We have de e oped our s u a o in suc a way so that it ca
ode ode e e s o any sensor ode e a e developed ou simulator such ay a can
support or work with different kinds of wireless nodes.
Corbetta Simone – Giuseppe Landolfi
9. The Meta Model 9
n
COMPONENT
EXECUTE
INTERFACES
STATELESS STATEFUL
INPUT OUTPUT
•A component based model.
•A component can be either stateless (e.g., query executor) or stateful (e.g., battery).
•One component (for example, node) can be composed of one or more other components (for example,
radio component, battery model component etc.)
Corbetta Simone – Giuseppe Landolfi
10. Node Architecture 10
•The node is composed of several
SOFTWARE
NODE components.
•The components of a node are -
APPLICATION Radio, Network communication,
SOFTWARE Application software, Sensor Board,
Software and battery model.
•The radio model has the
responsibility to communicate with
NETWORK
the components which are both
COMMUNICATION BATTERY MODEL
internal and external to the node.
•The network model knows the
physical position of each of the nodes
Input
present in the system
RADIO
•The incoming queries (for example,
Output
SENSOR BOARD
the current temperature in the node)
are processed in the application
software model.
•The battery model mainly deals
with the power consumption and
NETWORK WORLD
power state of the node.
MODEL MODEL
•The sensor board senses
temperature etc. from the outside
world.
Corbetta Simone – Giuseppe Landolfi
11. Base station – Node Relationship 11
Base Station
Node n
Node 1 ...
Node 2
Node 3
•A base station is a node which has more processing power and battery power than all other nodes.
•All the nodes in a sensor network are assigned to exactly one base station to which all other nodes are
connected directly.
•Any query at first comes to the base station.
Any
•The base station dispatches the query to the nodes.
•The results of the queries from the nodes are sent back to the base station.
q
Corbetta Simone – Giuseppe Landolfi
12. Query decomposer – Node Relationship
12
QUERY NODE
DECOMPOSER
QUERY AGGREGATOR
RADIO Query
MODEL Manager
SENSOR
NETWORK MODEL BOARD
POWER
CONSUMPTION
CONSUMPTION
(STATEFUL)
WORLD
DEPLOY
MODEL
•At first a query comes to the Query Decomposer. The query decomposer receives an aggregated query
like “Get the average temperature of all the nodes .
Get nodes”.
•This aggregated query has to be decomposed and sent to each of the nodes of the network. The query
decomposer gets the topology of the network from the Network Model.
•Then the query decomposer sends the decomposed query to each of the nodes
•The results of the query from each of the node are sent back to the Aggregator.
•The aggregator aggregates all the results of the decomposed queries and provides the final result of the
aggregated query.
Corbetta Simone – Giuseppe Landolfi
13. Network as a series of components 13
Node2
Node1 Node3 Node5
World
Node4
•All nodes might not be directly connected to each other (this may be due the range limitation of a node),
but all the nodes must be connected to the world model.
•The world model is connected with the Network model. Therefore, if a node is required to know
information about the physical position of other nodes, it can get the information from the world model as
well.
Corbetta Simone – Giuseppe Landolfi
14. Addressing and routing of nodes 14
•If a node falls in the covering
region of other node, they will be
considered as connected.
NODE
SENSOR
•In the simpler version, this
version
connection will be of no use but in
the later versions, where a routing
APPLICATION
algorithm for the nodes is to be
implemented,
implemented these inter-
inter
RADIO
connections of the nodes will
become useful.
•The nodes are connected to
NODE NODE
each other using the radio model.
SENSOR SENSOR This is quite obvious, as we
consider the radio model as the
interface for both input and output
APPLICATION APPLICATION
of a node.
RADIO RADIO
WORLD
Corbetta Simone – Giuseppe Landolfi
15. Node creation at run time 15
Base Station Parametric node
RADIO
RADIO
FACTORY
•The factory component can create nodes (parametric nodes) at run time.
•This information of creating a node is immediately sent to the base station.
•This is because, the base station has to be connected with this newly created node with the help of the
radio component as soon as possible.
Corbetta Simone – Giuseppe Landolfi
17. Design Document 17
•The classes of our wireless sensor network simulator can be divided into two major packages.
•The first package contains the classes related to the Node Model.
The
•The second package contains the classes related to the Application Simulator.
•The application s u a o uses the node model to c ea e nodes a d s u a es the world o the se so s
e app ca o simulator e ode ode o create odes and simulates e o d of e sensors.
Corbetta Simone – Giuseppe Landolfi
18. Classes of the Node Model 18
Corbetta Simone – Giuseppe Landolfi
19. Class relationships for the Node 19
Model
•When two classes
interact with each
other,
other they do not
interact with each
other directly.
•We introduce another
set of classes (in fact,
they are java
interfaces, not
complete classes).
classes)
•These association
classes/interfaces are
introduced to make the
relationship and
communication among
the classes more
flexible.
flexible
Corbetta Simone – Giuseppe Landolfi
20. The factory class 20
•The factory class has the
responsibility to create nodes
at run time.
•Initial version of the
simulator will contain only
one type of node, which does
not necessarily require the
Factory class. But, later
versions will need the factory
classes to create nodes of
different types at runtime.
Corbetta Simone – Giuseppe Landolfi
21. Sequence diagram – setting the 21
temperature of a node
p
Corbetta Simone – Giuseppe Landolfi
22. Sequence diagram – getting the 22
temperature of a node
p
Corbetta Simone – Giuseppe Landolfi
23. Sequence diagram – setting the 23
charge of a node
g
Corbetta Simone – Giuseppe Landolfi
24. Sequence diagram – getting the 24
charge of a node
g
Corbetta Simone – Giuseppe Landolfi
26. The Application Architecture – 26
High level view
•Model description builder: Can take a
model as input and then builds the initial
model. This model should contain the
description of the nodes to be made.
•Simulator description: Contains the built-
model of the sensor network classes which
has been created by the MDB.
•Management: This component will be
used to manage the application. (e.g., to
start/stop simulation etc.)
•Simulation performer: The simulation
performer performs every step of the
simulator – processing input and sending to
the output interface. To process the input, it
must interact with the Simulator Description.
Corbetta Simone – Giuseppe Landolfi
29. Control flow of the simulator 29
Corbetta Simone – Giuseppe Landolfi
30. Future works 30
•The current version implements only one kind of nodes. It can be extended to different kinds of nodes.
•The current implementation does not make use of the world model. The world model here we use is a
dummy world model.
•A new battery model may be considered to take into account the real battery's discharge behavior. In real
life, when a battery stands idle after a discharge, certain chemical and physical changes take place which
can result in voltage recovery.
•Other models that we might plan to have as part of our future work include better sensor channel models
such as seismic models for generating ground vibrations, fire models, lighting and temperature models
and mobility models.
Corbetta Simone – Giuseppe Landolfi
31. 31
Thank you!
Corbetta Simone – Giuseppe Landolfi