Scuola Superiore Sant’Anna
Simulazione di protocolli RT perReti di Sensori Wireless in ambiente NS-2
Giuseppe Lipari, Paolo Pagano
3 novembre 2006 Paolo Pagano (ReTiS, SSSA Pisa) 2“Sen
sori
wir
eles
s ed
inte
graz
ione
di s
iste
ma
per
appl
icaz
ioni
ubi
que
in a
mbi
to o
sped
alie
ro”
Rational for this new Paradigm
• Networks are becoming faster and software complexity in a node higher, thus increasing the vagueness of simulation because of assumption of events within a node occuring in zero time;
• To reduce the gap and errors between a simulation and the final implementation;
• To simulate applications which need a very high level of accuracy in timing: need to consider detailed time usage within and outside a node;
• Ability to simulate homogeneous as well as hetrogeneous environments by using the appropriate CPU-OS combination profile at various nodes.
3 novembre 2006 Paolo Pagano (ReTiS, SSSA Pisa) 3“Sen
sori
wir
eles
s ed
inte
graz
ione
di s
iste
ma
per
appl
icaz
ioni
ubi
que
in a
mbi
to o
sped
alie
ro”
Project phylosophy
• Integrate existing simulators– Network Simulator of Choice: NS-2 (USC-ISI, UCLA, UCB);– OS Simulator of Choice: RTSim (ReTiS Lab, Sant’ Anna).
http://rtsim.sssup.it/http://www.isi.edu/nsnam/ns/
3 novembre 2006 Paolo Pagano (ReTiS, SSSA Pisa) 4“Sen
sori
wir
eles
s ed
inte
graz
ione
di s
iste
ma
per
appl
icaz
ioni
ubi
que
in a
mbi
to o
sped
alie
ro”
NS-2 Architecture
• Application:– Standard network applications like FTP,
Telnet or various Traffic Generators like CBR, Exponential ...
• Agent:– Represent endpoints where network-
layer packets are constructed or consumed, and are used in implementing protocols;
• Node:– Represents a basic node in the network.
Can be configured to adopt various routing, MAC, LL, and PHY layer protocols.
3 novembre 2006 Paolo Pagano (ReTiS, SSSA Pisa) 5“Sen
sori
wir
eles
s ed
inte
graz
ione
di s
iste
ma
per
appl
icaz
ioni
ubi
que
in a
mbi
to o
sped
alie
ro”
Expectations from new Architecture
• Simulation Time Accountancy for latency in:
–Periodic and Aperiodic Task Set–Interrupt processing
• Ability to use existing NS-2 agents, MAC and PHY layers already provided in the standard distribution:
–802.15.4-based WPANs supported starting from NS 2.29.
• Transparency:–no major change in NS-2 user interface;–user provided by APIs accessible through the TCL front-end.
• Support for heterogeneous environments i.e. ability to simulate different CPU as well as OS profiles on various nodes in a simulation.
3 novembre 2006 Paolo Pagano (ReTiS, SSSA Pisa) 6“Sen
sori
wir
eles
s ed
inte
graz
ione
di s
iste
ma
per
appl
icaz
ioni
ubi
que
in a
mbi
to o
sped
alie
ro”
The new Library added to NS-2
• Implement RTSim Task Scheduler as an Application in NS-2 Framework– Simple and easy to do– Minor modification to RTLib
• Simulate different scheduling policies (FIFO, FP, EDF, ...)
3 novembre 2006 Paolo Pagano (ReTiS, SSSA Pisa) 7“Sen
sori
wir
eles
s ed
inte
graz
ione
di s
iste
ma
per
appl
icaz
ioni
ubi
que
in a
mbi
to o
sped
alie
ro”
Kernel instructions
• The RT-Application is now in charge of: – scheduling packet
transmission;– handle packet reception.
• Send and Receive instructions have been added to RTSim;
• FCFS (~TinyOS) and FP scheduling policies are simulated.
Figures refer to FCFS scheduling policy.
3 novembre 2006 Paolo Pagano (ReTiS, SSSA Pisa) 8“Sen
sori
wir
eles
s ed
inte
graz
ione
di s
iste
ma
per
appl
icaz
ioni
ubi
que
in a
mbi
to o
sped
alie
ro”
Computation and Network Load
• Simulate from light to heavy load in the node through a set of Dummy Periodic Tasks: – tuning the number of tasks;– tuning the task parameters (C,T,U) to obtain different
loads.
• Calculating the total delay (source to destination) as a function of the packet and checking the impact of the scheduling policies in time sensitive applications;
• Network load tuned acting on transmission schedules and concurrent access.
3 novembre 2006 Paolo Pagano (ReTiS, SSSA Pisa) 9“Sen
sori
wir
eles
s ed
inte
graz
ione
di s
iste
ma
per
appl
icaz
ioni
ubi
que
in a
mbi
to o
sped
alie
ro”
Network Scenarios (1)
• Starting from simple scenarios:– 4 nodes located at the
edges of a square communicating to a sink placed at the center of mass; no hidden terminal;no network structure (single cluster); no routing; the sink plays the role of WPAN coordinator.
• To re-obtain the governing laws of RT-computing. Screenshot of the Network
AniMator (NAM)
3 novembre 2006 Paolo Pagano (ReTiS, SSSA Pisa) 10“Sen
sori
wir
eles
s ed
inte
graz
ione
di s
iste
ma
per
appl
icaz
ioni
ubi
que
in a
mbi
to o
sped
alie
ro”
Network Scenarios (2)
• Complicating the picture:– Introducing routing paths
and data streams;– Nodes connecting different
clusters fetch and forward the readings coming from other clusters.
• How do RT-issues influence the reactivity of such nodes?
Screenshot of the Network AniMator (NAM)
3 novembre 2006 Paolo Pagano (ReTiS, SSSA Pisa) 11“Sen
sori
wir
eles
s ed
inte
graz
ione
di s
iste
ma
per
appl
icaz
ioni
ubi
que
in a
mbi
to o
sped
alie
ro”
t [s]
Selection of relevant metrics
• By simulation we evaluate:– the maximum, mean and
minimum latency observed in sending and receiving the packets;
– the time propagation through the sender and recipient network stacks (including re-transmissions done at low layers);
– the packet probability of being delivered.
• Applications can be sensitive to one, more or all these metrics.
3 novembre 2006 Paolo Pagano (ReTiS, SSSA Pisa) 12“Sen
sori
wir
eles
s ed
inte
graz
ione
di s
iste
ma
per
appl
icaz
ioni
ubi
que
in a
mbi
to o
sped
alie
ro”
Outlook and Conclusions
• NS-2 and RTSim have been integrated to take into account RT-issues in wireless telecommunications;
• In WSNs these issues play a role whenever any QoS must be guaranteed by the nodes;
• Simple and more complicated scenarios are being simulated to evaluate selected metrics;
• FCFS and FP scheduling policies have been implemented and are being compared within certain network and CPU load conditions;
• results are coming...