Upload
pravin-gareta
View
227
Download
0
Embed Size (px)
Citation preview
8/8/2019 S-mac Simulation 3rd Review
1/18
S-MAC Simulation in NS2
Prepared By:
Pravin Gareta(08BEC156)
Malav Mehta(08BEC159)
Guided By:
Prof. Sachin Gajjar
Based on IEEE Paper An Energy Efficient Mac Protocol for Wireless sensor Network
Wei Ye, John Heidemann, Deborah Estrin
8/8/2019 S-mac Simulation 3rd Review
2/18
Changes Made for NS2
If your NS release is 2.30 and above then it isnot problem for running the s-mac program
If your ns version is 2.29 and below then you
have to download a cmu-trace.cc file from thehttp://www.isi.edu/ilense/software/smac/cmu-
trace.cc
Put this file into these path : ns-2/trace/cmu-
trace.cc
These file is for the detailed trace analysis of the
program
8/8/2019 S-mac Simulation 3rd Review
3/18
S-MAC Parameter Settings
8/8/2019 S-mac Simulation 3rd Review
4/18
Common Settings For Simulation
Topology : In this simulation we have used a 2
node toplogy one is source and another is sink
Traffic pattern: We attached the UDP agentand CBR Traffic source to the source node.
Comparison : In this simulation we have
compare the IEEE 802.11 and S-MAC protocol
Both are same except S-MAC having the some
differences from 802.11
8/8/2019 S-mac Simulation 3rd Review
5/18
Basic Features of S-MAC
Listen and Sleep Periodically according to the
schedule
Both Physical and Virtual Carrier Sense Overhearing Avoidance
RTS/CTS Mechanism
Synchronization Algorithm
Neighbor discovery
8/8/2019 S-mac Simulation 3rd Review
6/18
S-MAC Trace Format
First field indicate event type :
Send(s)
Receive(r)
Drop(d)
Forward(f)
Time Event
8/8/2019 S-mac Simulation 3rd Review
7/18
Id of the node on which event takes place
Layer where these event happen
AGT(Agent)
RTR(Router)
IFQ(Interface Queue)
MAC(mac)
Fifth field is reserved for special event
6th field indicate global sequence number for
packet
7th represented by packet type Here CBR
represents that it is data source generated by
CBR Traffic source.
8/8/2019 S-mac Simulation 3rd Review
8/18
The ninth field including three numbers in
brackets concerns MAC layer information.Originally, there will be four numbers in thebrackets. But S-MAC revises this format. Thefirst number is the duration field of this packet.
In Fig. the duration field of this RTS packet is0.11 s, which is the remaining time reserved forthe coming transmission. The second numberstands for the MAC address of the receiver of
this packet, and the third number for thesender.
The above nine fields are common for all traces
if S-MAC is employed.
8/8/2019 S-mac Simulation 3rd Review
9/18
Measurement of Energy Consumption
First we run the s-mac program
Then run the 802.11 program
Form the trace file we compare the ideal energy
of both
Because for s-mac periodic sleep and listen is
employed so, obviously energy consumption of
s-mac is low compared to the 802.11
The Gnuplot of these are below:
8/8/2019 S-mac Simulation 3rd Review
10/18
8/8/2019 S-mac Simulation 3rd Review
11/18
Measurement of delay vs. energy
consumption
Here we change the duty cycle of the program
We take first duty cycle 10%
For the second case we have taken it 20%
So, basically we changed the listen period of
the program
We get the result that as a listen time is smallenergy consumption is less and delay is more
8/8/2019 S-mac Simulation 3rd Review
12/18
8/8/2019 S-mac Simulation 3rd Review
13/18
Traffic Variation vs. energy
consumption
Here for the traffic variation we change the
CBR traffic interval from 0.001 to 10s.
Here 0.001s is high traffic case and 10s is thelow traffic case.
We see that for s-mac there is o such variation
for high or low traffic means s-mac will adjust
its sleep period according to the situation
While for 802.11 energy consumption is large.
8/8/2019 S-mac Simulation 3rd Review
14/18
8/8/2019 S-mac Simulation 3rd Review
15/18
Energy consumption at Intermediate
node
Here we design a 5 node topology
2 node are sender and 2 node are sink and 1
is router. Here we also taken the 2 cases like high traffic
load and less traffic load
For s-mac variation of energy consumption isvery less while for 802.11 it is large variation
See the graph
8/8/2019 S-mac Simulation 3rd Review
16/18
8/8/2019 S-mac Simulation 3rd Review
17/18
Conclusion
Upto our 3rd review we have try to understand
s-mac basics as good as we can. We also
simulate the s-mac in the ns2 for these also
we have to refer IEEE paper. We have done the
work as good as we can. At last We are
thankful to Prof. Sachin Gajjar for his valuable
support and guidance throughout thesemester.
8/8/2019 S-mac Simulation 3rd Review
18/18
THANK YOU!!