1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

51
1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

Transcript of 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

Page 1: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

1Segal’s Law

A man with a watch knows what time it is.

A man with two watches is never sure.

Page 2: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

2Fasika Assegei

Decentralized Frame Synchronization of a TDMA-based

Wireless Sensor Network

Fasika Assegei

Advisors: Frits van der Wateren – Chess B.V. dr.ir. Peter Smulders – TU/e

Page 3: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

3

This research is ….

DevLab project,

a project to build a WSN for research on protocols, power management, programming models, and security.

What is MyriaNed ?

• Conducted at Chess B.V. in Haarlem , the Netherlands.

• Part of MyriaNed project.

Page 4: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

4

Outline of presentation

Synchronization in Wireless Sensor Networks

What is the flaw with the Median algorithm ?

Proposed algorithms

Simulation Results

Energy consumption

Conclusion and future work

Page 5: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

5

Why synchronization?

TDMA Slots

Data Integration

NTP

Having the same notion of time

Page 6: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

6

Isn’t this a solved problem by now ??? NTP, time broadcasts (GPS, WWVB), high-stability oscillators

(Rubidium, Cesium)

New problems arise in Wireless Sensor Networks Important assumptions no longer hold

(fewer resources -- such as energy, good connectivity, infrastructure, size, and cost -- are available)

Sensor apps have stronger requirements (…but we have to do better than the Internet anyway)

What now ?

Page 7: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

7

Previous works on synchronization of adhoc networks …

Average / Median of the phase errors with the neighbors…..unstable in dynamic networks

Decentralized synchronization using topology as a metric……….higher cost

Interference elimination…..less time and costly

Correlation of a sequence ……high cost

Page 8: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

8

What is done in this research …

Decentralized synchronization

Using estimation

Tolerant to dynamic situations

Energy efficient

Unnecessary synchronization wastes energy, and insufficient synchronization leads to poor performance.

Page 9: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

9

Terms used in …

Phase error Time difference between the clocks

Frequency error The difference in the rates of the

clocks

Clock cycle (clk) The time between adjacent pulses of

the oscillator

Wakeup time The time that the node starts to listen

Sleep Sleep Sleep

Page 10: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

10

Where does the error come from ?

Oscillator characteristics: Accuracy: Difference between ideal frequency and

actual frequency of the oscillator. Stability: Tendency of the oscillator to stay at the same

frequency over time. Caused by different factors like temperature, aging,

noise, …

Network and System Parameters Receive and Transmit Delay: Time duration between

message generation and network injection. Propagation Delay: Time to travel from sender to

receiver. Access Delay: Time to access the channel.

Page 11: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

11

Nodes communicate ……

txguardslot Ttt

1T

Tsync

Synchronization period: The period in which the network can stay synchronized without the application of the synchronization algorithm.

2/guardt 2/guardttxT

Page 12: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

12

)()()( nj

ni

nij ttt io

n

ni

ni tTt )()(

)()()1( ni

ni

ni

ni Ttt

)( )()( nij

ni tf

Representation ……

What is f ???

Page 13: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

13

Median as a method for synchronization

Simple method.

Calculates the Median of the phase errors

Adjusts the offset in the next wakeup time of the node.

With the simplicity, …

Not stable in a highly dynamic networks.

)( iji tmedian for all j neighbors ..

Page 14: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

14

What is the flaw with Median ?

Got message from Node 3

Calculating offset

Got message from Node 10

Page 15: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

15

Node 9 drifted from

its neighbors

A WSN scenario for Median contd.

Algorithms are proposed …..

Less time to synchronize …

Student
Page 16: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

16

Building blocks of a sync protocol…

Synchronization Parameter Space:(max error, lifetime, scope, convergence,

stability,…)

Page 17: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

17

Weighted Measurements

ijtbij ae

1ij

The larger the phase error is, the lower the pre-weight factor it is assigned.

1.0ij

0 Nijt

1 Nijt

if

if

Uses the weighted average of the phase errors

Page 18: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

18

Weighted Measurements Contd.Two scenarios …..

Case I Case II

ijw,1 ij

,ij

Weight factor determination:

5.0)( ijmean

5.0)( ijmean .1ijwwhere

N

j

nijij

ni

ni

ni twTtt

0

)()()()1(

Offset calculation:

Page 19: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

19

)log(),( 21 ii xxf

),)...(,(),,(),,( 332211 nn yxyxyxyx

n

iirS

1

2),( iii xfyr

jkj

kj 1

Least Squares approach ...

Set of n phase errors from n neighbors :

Minimizing the squares of error :

where:

Iteration of parameters:

Model Curve:

Page 20: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

20

Least Squares contd.

Upper bound fits in the guard time ….

Page 21: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

21

Discrete time kalman filter

Kalman filter estimates a process by using a form of feed forward

control

the filter estimates the process state at some time then obtains feedback in the form of noisy measurements.

Time update equations

Measurement Update equations

Dynamic and recursive

Page 22: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

22

1

0lim

HKk

Rk

0lim0

k

PK

k

Kalman Filter Contd.

A - relates the state at the previous time step to the current stateH - relates the current state to the measurementR - process noise covarianceQ - measurement noise covarianceP - estimate error covariance

Page 23: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

23

Simulation setup

Synchronization error : the maximum difference between the clock times in the neighborhood.

clk : Clock cycle

precision : metric to express the performance of the synchronization error

• KF – Kalman Filter

• WM – Weighted Measurements

• LS – Least Squares.

Page 24: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

24

Simulation results

Page 25: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

25

Simulation results contd.

Page 26: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

26

Putting in perspective ….Computing energy cost…

Communicating energy gain…

Page 27: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

27

Putting in perspective …

Tradeoff ?

Comparison of the energy consumption and gain

per RX slot

Page 28: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

28

Active Idle

CPU 3.5mA 0.01mA

Radio 11.3mA(TX) 900nA

Radio 12.3mA(RX) 900nA

Tradeoff? Directly comparing computation/communication energy cost not

possible but: put them into perspective! Energy ratio of “listening for 1 clk ” vs. “computing instruction for 1

clk”: greater than 4 times

Communication is more expensive than computing.

The downside in implementation ……

Page 29: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

29

Conclusion

Decentralized synchronization algorithms for a TDMA-based WSN are proposed using KF, WM and LS.

WM and LS have a very good tolerance in a dynamic Wireless Sensor Network.

KF performs very good in all synchronization space, both in static as well as dynamic environments.

Reducing the communication cost and increasing cost of computing is worthy bait.

Page 30: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

30

To be explored …

Software power minimization techniques to reduce the power consumption of the algorithms.

Implementation of the algorithms on the MyriaNode and further investigation...

Additional tools for frequency error minimization, using the available resources like temperature sensor.

Page 31: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

31

Thank you!

Page 32: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

32

Vraag?

Page 33: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

33

Not a perfect clock …

1)(

1dt

tdC

The nodes clock time is thus bounded as :

where ρ is the maximum clock drift.

Factors affecting ..

• Temperature

• Aging

• Noise

• …

Page 34: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

34

Energy Consumption …..

For 5 clk, an increase in battery life of up to half a year can be obtained.

Battery power : 2400 mAh No of slots: 10

Page 35: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

35

Reducing the duty cycle ……..

xslot TxT 2

T

NTD slot

T

TxND x )2(

T

TxND xn

))(2(

T

ND

)2( A decrease in the duty cycle:

For a performance improvement:

Page 36: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

36

Wireless Sensor Networks: Why different ?

Energy limitation Limited battery life

Dynamic nature of the network, as well as inaccessibility Mobility …

Diverse applications Relative and absolute reference

Cost factor ... Large scale deployment …

Page 37: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

37

Lower bound of synchronization

where n is the number of nodes in the network. This means that synchronization is not only a local

property, in the sense that the clock skew between two nodes depends not only on the distance between the nodes

but also on the size of the network.

))1log()1(8

log(

)1log(

)1(8

n

ndL

Page 38: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

38

What causes the clock to drift ?

The frequency of the clock is given as :

a is the aging factor fe is the environmental factor (temperature..) fr is the noise instability

fo is the nominal frequency

)()()()( 0 tftfttaftf reo

where :

Page 39: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

39

What is synchronization ?

Having the same time of reference and count the same time [either global (UTC) or local (relative)]

Operate a system in unison

Same notion of time

We are synchronized!!!!

Page 40: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

40

Wireless Sensor Networks

Wireless network of low cost sensors. Nodes communicate by broadcasting. Multihop communication needed in order to reach

far-away destinations.

Page 41: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

41

Simulation setup

Mixim Octave

Input

Output

Page 42: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

42

Having no comment after the presentation is unacceptable.

Page 43: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

43

Synchronization Methods- Previously

Centralized synchronization Central reference time Global or Relative

Receiver-Receiver RBS ( Receiver Broadcast Synchronization)

Page 44: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

44

Synchronization Methods- Previously

Decentralized synchronization Estimation of the other’s clock time

Page 45: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

45

Abstraction

Page 46: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

46

Simulation results contd.

Page 47: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

47

Simulation results contd.

Page 48: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

48

Simulation results contd.

Page 49: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

49

Simulation results contd.

Page 50: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

50

Simulation results contd.

Page 51: 1 Segal’s Law A man with a watch knows what time it is. A man with two watches is never sure.

51

Simulation results contd.