Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is...

26
Application Cost based Modification of SMAC Surjya Ray WCNG University of Rochester 1

Transcript of Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is...

Page 1: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Application Cost based Modification of SMAC

Surjya RayWCNGUniversity of Rochester

1

Page 2: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Motivation

SMAC as a MAC Protocol

Application Cost and SMAC

Results and Tradeoffs

Future Work

Outline

2

Page 3: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Incorporating the idea of Application Coststo MAC protocols to get improvedperformance (increase in network lifetimeetc.).

Motivation

3

Page 4: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

What is Sensor MAC ?

Sensor MAC or SMAC : MAC protocol designed specifically for Wireless Sensor Networks.

It was designed to increase the network lifetime by minimizing:

Collision

Overhearing

Idle Listening

Control Packet Overhead

Sensor MAC

4

Page 5: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

SMAC: essentially nothing but 802.11

SMAC is basically 802.11 with a sleep-wake cycle.

In 802.11, nodes never sleep.

Due to the nature of WSNs, nodes are idle most of the time. So nodes sleep and wake periodically in SMAC to conserve energy.

Sensor MAC

Listen ListenSleep SleepSleep

5

Page 6: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

SMAC : A closer look

The main features of SMAC are:Periodic Listen and Sleep - Usually nodes are idle for long intervals in WSNs.- Periodic sleep-wake cycle reduces Idle Listening.- A complete cycle of listen and sleep is called a frame.

(For a 50% duty cycle)

[1]

SMAC : Features

6

Page 7: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Synchronization and Virtual Clusters

- All nodes are free to choose their own sleep-wakeschedules.

- Generally, neighboring nodes synchronizes together.

This prevents excess control overhead.

- A group of nodes which synchronize together, formvirtual clusters.

- This synchronization is done by means of SYNC packets.

[1]

SMAC : Features

7

Page 8: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

- Nodes exchange their schedules by periodically broadcasting a SYNC packet to their immediate neighbors.

- However all neighboring nodes may not have the same schedule.

Neighboring nodes A and B have different schedules. They synchronize withnodes C and D respectively. If node A wants to talk to node B, it waits until B islistening.

SMAC : Features

C A B D

8

Page 9: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Collision Avoidance

- Like 802.11, SMAC employs both virtual and physical carrier sense.

- It has RTS/CTS for hidden terminal problem and NAV for virtual carrier sense.

- There is backoff and retry in case a collision is detected.

- Broadcast packets are sent without RTS/CTS/ACK.

- Unicast packets follow the sequence of RTS/CTS/DATA/ACK between the sender and the receiver

SMAC : Features

9

Page 10: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

- After the successful exchange of RTS and CTS, the two nodes will use their normal sleep time for data packet transmission.

They do not follow their sleep schedules until they finish the transmission.

SMAC : Features

Listen Sleep

RTS

CTS

DataSender:

Receiver:

10

Page 11: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Maintaining Synchronization

- Each ‘listen’ interval is divided into synctime_ and datatime_ .

SMAC : Features

Listen ( listentime_) Sleep (sleeptime_)

For SYNC For RTS /CTS

SYNC RTS Data

CTS

synctime_ datatime_

Sender:

Receiver:

11

Page 12: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

- At boot-up time, each node listens for a fixed amountof time . Then it sends out a SYNC with its own chosenschedule.

- A node suppresses sending out of a SYNC if it receives aSYNC from a neighbor. It then follows the neighbor’sschedule.

- SYNC is for maintaining loose synchronization as theclock drift is very small compared to the listentime_.

(listentime of 0.5 s is about 104 times the clock drift)

SMAC : Features

12

Page 13: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

In S-MAC, all nodes have same duty cycle. It does nottake into consideration which nodes have higherapplication cost than the others.

Application Cost and SMAC

13

Page 14: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Nodes now have High, Medium and Low Application Cost.When a node N has no data to send, it may sleep in the datatime_ withprobability

Application Cost and SMAC

Sleep SleepSleep Datatime_ Datatime_

H

L

L

M

L

M

M

MM

M

M

L

M

LM

H

, { , , }iP Application Cost i H M L

14

Page 15: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Still, the scheme may not sustain a connected network all the time. So generalizing the scheme:

We now consider a range of application costs; not justhigh, low and medium. When a node has no data to send,the probability of it sleeping in the datatime_ is:

Application Cost and SMAC

,i iP A where Ai = Application Cost of ith node

15

Page 16: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

In any datatime_,

Probability of sending data = Pdata

Probability of having no data to send = Pno-data =1- Pdata

When there is no data to send,

Probability the node will sleep= Psleep

where Ai is the ith node’s application cost

Thus,

Probability of sleeping in any datatime_

(Disjoint Events)

Increase In Lifetime:

iA

no data sleepP P

16

Page 17: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Average number of cycles or frames in a lifetime =x

Time of a frame in seconds =t

For the original SMAC protocol,

average lifetime=xt.

If the modified SMAC is used,

then no. of datatime_s in which a particular node will sleep

Now,

Thus sleeping in datatime_s will add an extra cycles to the lifetime.

Increase In Lifetime:

. no data sleepx P P

2_ _3

datatime listentime

. no data sleepx P P2 .

3 no data sleepx P P

17

Page 18: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Total lifetime in cycles =

However, the node can also sleep in some of the cycles in the 2nd term thereby saving some more cycles.

Thus the total lifetime is actually a G.P.:

Total lifetime in cycles

Increase In Lifetime:

2 .3 no data sleepx x P P

2

2

2 2. ...3 3

2 21 ...3 3

1. .............................(1)

213

no data sleep no data sleep

no data sleep no data sleep

no data sleep

x x P P x P P

x P P P P

xP P

18

Page 19: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

The simulation was done with the S-MAC code inbuilt in ns 2.33.

The simulation was done with:

-50 randomly distributed nodes,

- area of 800m x 800m,

-Energy of 70 joules /node,

-single hop with no routing.

5 randomly generated scenarios were used for simulation. Therewere 5 sources of data in this network which sends data to othernodes randomly, in each of these runs.

Each scenario is tested 10 times with both unmodified SMACprotocol and the modified SMAC protocol and the results wereaveraged.

Simulation Setup:

19

Page 20: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

The modified SMAC showed anaverage increase in networklifetime by about 12%.

These results are valid for a dutycycle of 50% and Psleep between12% to 25%.

If we put Psleep =0.18, Pno-data=0.90

in equation (1), we get the averagenumber of cycles in a lifetime as1.12x. This means a 12% increase inlifetime. This is in agreement withthe simulated results.

Results: Average Lifetime

20

Page 21: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Since the average lifetime increases, the nodes are beingable to send and receive data for a longer period of time.Hence total number of received packets increases.On the average, total number of received packets increaseby about 12%.

Results: Packets Received

21

Page 22: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

There is a trade off to increased lifetimeand received data packets.

Although the average lifetime and totalno. of received packets increase, theeffective throughput decreases in somecases. This happens when packets aresent to nodes which are sleeping.

Trade-off

22

Page 23: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

The whole idea of Application cost based sleepingworks best with some routing protocol on top of theMAC.

Receiver-based forwarding, a geographic routingprotocol may be an ideal candidate for this.

Also, with the routing protocol running with theMAC, it would be interesting to look into parameterslike Average Latency/packet etc.

Future Directions

23

Page 24: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Any Questions?

24

Page 25: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

References

[1] W. Ye, J. Heidemann, and D. Estrin, Medium Access Control With Coordinated Adaptive Sleeping for Wireless Sensor Networks

25

Page 26: Application Cost based Modification of SMAC · SMAC: essentially nothing but 802.11 SMAC is basically 802.11 with a sleep-wake cycle. In 802.11, nodes never sleep. Due to the nature

Thank You!

26