of 25 /25
Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Embed Size (px)

Citation preview

Page 1: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Clock Synchronization in Sensor Networks for Civil Security

Farnaz Moradi Asrin Javaheri

Page 2: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Outline Wireless sensor networks Surveillance Applications Clock synchronization Synchronization algorithms

RBS FTSP

Implementation Performance Evaluation Fault tolerance Security Demonstration Conclusion

Page 3: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Wireless Sensor Networks

Consist a set of small sensor devices

Sensor nodes are deployed in an ad hoc fashion

Used for sensing a physical phenomenon

Communication using wireless radio channels

Nodes are constrained in memory, computational power, battery lifetime, …

Sensing

Communication

Processing

Page 4: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Surveillance Applications Transport Applications:

Airports, Harbours, Borders, Railways and Roadways Public Places:

Banks, Supermarkets, Homes, Parking Lots, Hospitals, Bridges

Law Enforcement and Military: Forensic Applications, Intrusion detection, Target tracking,

Remote Surveillance Environmental Monitoring:

Habitat Monitoring, Forrest Fire Monitoring

Page 5: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Surveillance Scenario

Page 6: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Clock and Time

System clock counts oscillations of a quartz crystal

Clock offset: difference between the time reported by a clock and the real time Nodes started at different times

Clock Skew: difference in the frequencies of the clock and the perfect clock Different frequency of the oscillators Frequency change of the clocks over time due to

temperature, aging, …

Page 7: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Why do we need Time Synchronization?

“A man with a watch knows what time it is. A man with two watches is never sure.”

-Segal’s Law

Time synchronization is a basic middleware service of wireless sensor networks

Time synchronization is required for: Events with timestamps: Mobile object tracking Ordering of collected sensor data/events Delay measurements for distance/location estimation TDMA radio scheduling Detection of duplicate events Coordination of wake-up and sleep times (for energy efficiency)

Page 8: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Errors in Clock Synchronization

0 1 t=2 3 4 5 6

0 1 2 3 t=4 5 6

0 1 2 3 4 5 t=6

6 7 t=8 9 10 11

3 4 5 6 t=7 8 9

0 1 2 3 4 5 t=6

Result Result

Page 9: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Clock Synchronization Algorithms Design approaches:

Leader-based clock synchronization Reference broadcast clock synchronization Averaging-based clock synchronization Converge to max clock synchronization …

Protocol classifications: Continuous On-demand (post-facto synchronization)

Trade-off between energy efficiency and fine-grained synchronization

Page 10: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Flooding Time Synchronization Protocol (FTSP)

Leader-based synchronization (sender-receiver) MAC Layer time-stamping Fine-grained time synchronization

Receiver i Receiver jSender

Synchronization Packet

T—Timestamp Packet

t2— Timestamp arrival

t1—Packet arrival

Calculate Global TimeCalculate Global Time

t2— Timestamp arrival

t1—Packet arrival

Page 11: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Reference Broadcast Synchronization (RBS)

Receiver – Receiver based approach Fine-grained time synchronization Can be implemented in a distributed manner

Receiver i Receiver jSender

Beacon Packet

t2—Packet reception interrupt

t1—Packet arrival

t3—Timestamp packett2—Packet reception interrupt

t1—Packet arrival

t3—Timestamp packet

Asynchronous Exchange of Timestamps

Page 12: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Implementation MSB-430

Texas Instrument MSP430 microcontroller Chipcon CC1020 transceiver 32.768 kHz quartz clock

4 nodes used for experiments in a single-hop network

Contiki Operating System Hybrid model of even-driven systems and preemptive

multi-threading systems (using proto-threads)

Rime communication stack Designed for low-power radios wireless sensor

networks

Page 13: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Experiments

FTSP Synchronizer node

periodically broadcasts a message containing the global time

Other nodes timestamp message’s arrival

Nodes calculate their offset and skew with the synchronizer using least square linear regression

An external node periodically broadcasts a query message

All nodes report their estimated global time

0 69 138207276345414483552621690759828897

-5

0

5

10

15

20

25

30

35Offsets between two neighbouring

nodes

Local OffsetGlobal Offset

Time (s)

Cry

sta

l ti

cks

Page 14: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Experiments

RBS Each node periodically

broadcasts a beacon Other nodes timestamp the

beacon’s arrival Receiver nodes exchange the

stored beacon arrival time with each other

Each node calculates the offset and skew with every neighbor using linear regression

An external node broadcasts a query message

All nodes report their estimated global time

0 200 400 600 800 1000 1200 1400

-5

0

5

10

15

20

25

30

35Offsets between two neighbouring

nodes

Local Offset

Time (s)

Cry

sta

l ti

cks

Page 15: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Performance Evaluation

0 1 2 3 4 5 6 7 80

5

10

15

20

25

30

35

40Synchronization Absolute Error

RBSFTSP

Absolute Error Range (ticks)

Pe

rce

nta

ge

(%)

Page 16: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Fault Tolerance Nodes gets lost

(Unattained environments)

Harsh environments Batteries run out Adversarial attacks

(Sensor nodes can be physically captured or destroyed)

Important requirement for time synchronization services:

Robustness to node and communication failures

Page 17: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

FTSP No message collisions (in single-hop network)

Single point of failure Synchronizer node

Distributed Leader Election Designating a single node as the synchronizer

After start-up In case of leader failure

Node with smallest ID will be selected as the leader Guarantees that there will be only one leader in the

network at any time

Page 18: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

RBS No single point of failure (completely

distributed)

Message collision Exchange messages (42~70%)

Collision Avoidance Random back-off (19~38%) TDMA-based scheduling (0~0.004% )

Nodes transmit one after the other using their dedicated time slot1 2 3 4 5 6 7 8 9 …

Beacon Slot 1 Slot 2 Slot 3 Beacon Slot 1 Slot 2 Slot 3 Beacon …

Round 1 Round 2 …

Page 19: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

ComparisonProtocol Node Failure

ToleranceMessage Collision

Overall Complexity

Basic RBS (with one beacon sender)

Low High Medium

RBS (with all nodes sending beacons)

High High High

RBS with random back-off High Medium High

RBS with TDMA using local time High Low High

RBS with TDMA using global time High Very Low High

Basic FTSP Low None Low

FTSP with leader election High Medium Medium

Page 20: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Security Threats to Time Synchronization

Main Goal: convincing nodes that their neighbours' clocks are at a different time than they actually are

Forging/modifying messages

Denial of Service

Pulse-delay attacks

Sybil attacks

Compromising nodes

Time = 2

Time = 5

Time = 5

Delay…

Replay message

Modify message

Jam signals

Time = 5I am node 3Time = 10

I am node 6Time = 4ATTACK

Time = x

Page 21: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Secure Clock Synchronization Algorithm

Secure synchronization protocol Masks attacks by adversaries Guarantees automatic recovery after arbitrary

failures Tolerates message collisions and message losses

Self-stabilizing algorithm for secure clock synchronization Masks pulse-delay attacks in presence of captured

nodes Guarantees efficient communication overheads

with high probability

Page 22: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Demonstration

MSB-430 Core Module

PIR SensorPower Supply

Page 23: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Conclusion Fine-grained clock synchronization is crucial for

applications that depend on global notation of time Surveillance applications: Target tracking, …

The required precision can be achieved by employing distributed approaches Reference broadcast synchronization (RBS)

Synchronization should be robust and fault tolerance Leader election to tolerate node failures TDMA-based scheduling to tolerate message collisions

Attacks against clock synchronization can lead to erroneous application outputs Secure and self-stabilizing synchronization

Page 24: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Future Work Optimizing the period of sending

synchronization messages Comparing precision against the bandwidth

used for synchronization messages and energy consumption

Extending the robust algorithms to larger networks

Testing the secure algorithm in presence of attacks

Page 25: Clock Synchronization in Sensor Networks for Civil Security Farnaz Moradi Asrin Javaheri

Thank YouQuestions