• Non ci sono risultati.

Clock Phase Change compensation using Graham Scan

N/A
N/A
Protected

Academic year: 2022

Condividi "Clock Phase Change compensation using Graham Scan"

Copied!
30
0
0

Testo completo

(1)

Clock Phase Change compensation using Graham Scan

Augusto Ciuffoletti

Università di Pisa

Galina Antonova

GE Consumer & Industrial, Multilin

(2)

Problem statement

Ensuring high timing accuracy for Slave clocks built with cheap oscillators requires frequent updates from the Master clock.

Clock Phase Change linear compensation

may significantly reduce updates’ frequency, while maintaining required timing accuracy.

Temperature and aging (non linear)

components of the Clock Phase Change remain to be compensated.

(3)

Graham Scan requirements

The algorithm requires that a Slave clock receives series of timestamped messages from a Master.

Although the message flow should be regular, no strict timeliness is required.

Such messages do not need special privileges, but regularity in the delivery helps.

(4)

Probabilistic issues

The algorithm makes (weak) hypotheses on the distribution of message latency.

The algorithm returns an estimate of the Clock Phase Change, not the “real” value.

Accuracy of such estimate improves for longer series of messages.

The algorithm improves performance of a clock synchronization algorithm, but does not replace it.

(5)

Advantages

Low cost/impact algorithm.

Adequate to a wireless environment: Slave does not transmit thus saves power.

Adequate to a broadcast/multicast environ- ment: one message serves multiple Slaves.

May be sufficient (no additional clock

synchronization needed) for applications that only need to measure time intervals (e.g.

monitoring, accounting, debugging).

(6)

Basic notation

where

ts() - message send and receive timestamps, based on local clock;

- real message latency;

a - a linear component of the Clock Phase Change;

b - a constant component of the Clock Phase Change.

tsrcv

i

−ts snd

i

=

i

a∗ts snd

i

b

i

(7)

Timestamp difference plot

Derived from simulation

(8)

Clock Phase Change Interpolation

• To compute a constant term of Clock Phase Change, two values for index

i

are required, such that two

real message latencies are identical.

• Based on experience two minimal values of message latency in a sample are likely close.

tsrcv

i

−ts snd

i

=

i

a∗ts snd

i

b

(9)

Message latency distribution

Derived from Auckland traces

(10)

Finding the minimals

Points with minimal delay necessarily

correspond to adjacent vertices of the (lower) hull containing a

timestamp difference graph.

Proof: classical, by absurd.

Derived from Auckland traces

(11)

The Graham Scan

@hull->empty;

while <($snd,$rcv)> {

$new=($snd,($rcv-$snd));

while (test($hull(N),$hull(N-1),$new)){ pop @hull } push $new,@hull;

}

the test function test computes and compares the slopes of the segments ($hull(N-1),$hull(N)) and ($hull(N-

1),($snd,$rcv));

the number of elements in $hull grows logarithmically with time.

Summarizing cost per time unit grows logarithmically with time.

(12)

Graham Scan

ti time

A set of points, representing timestamp differences

(13)

Graham Scan

ti time

The convex hull

(14)

Graham Scan

ti1 time

A new point is added to the set

(15)

Graham Scan

ti1 time

The slope to the last point in the hull is computed

slope is negative

(16)

Graham Scan

ti1 time

The point is eliminated from the convex hull

this point popped from convex hull

(17)

Graham Scan

ti1 time

Compute slope to next point

slope is positive

(18)

Graham Scan

ti1 time

New point is pushed in the stack; exit.

(19)

Selecting the minimals

Selection rule:

select edges with

farther sampling time in $hull

rationale:

minimizes worst case error of the estimate

easy to compute

more investigation needed

(20)

Evaluating estimate accuracy

Depends on communication delay distribution

Increases with sample size

May be deceived by relevant non-linear

(temperature driven) Clock Phase Changes

May be deceived by interfering clock adjustments

A simulation enlightens long run aspects of the Clock Phase Change estimation algorithm.

(21)

Simulation basics

A key is our generator of round-trip delays.

Our generator is fast and simulates long range

dependence.

It is tuned on Auckland samples and introduces thermal variations.

Derived from Auckland traces

Our generator

(22)

Results: accuracy after stabilization

120 samples are

generated with a Clock Phase Change of 0.1

parts per thousand (100 times better than a quartz clock) with periodic

thermal shift.

Estimate is read the first time the algorithm

stabilizes (small variation of successive estimates).

Number of experiments

Clock Phase Change estimate

(23)

Results: time to converge

Stabilization occurs when variation of

successive estimates is small.

At 1 ping per second stabilization is reached after 20 minutes.

Number of experiments

Time units (before stabilization)

(24)

Conclusions

Clock Phase Change compensation improves performance of clock

synchronization.

An efficient algorithm may significantly

reduce Master to Slave updates’ frequency, while maintaining required timing accuracy.

Graham Scan algorithm offers an efficient low cost/impact solution.

(25)

Conclusions (continued)

Clock Phase Chance compensation using Graham Scan brings savings in

- Cost (by using cheaper oscillators),

- Utilized bandwidth (by less frequent messages) and

- Power consumption (by using one-way messages).

Temperature/ageing component remains to be compensated.

(26)

References

Moon, Skelley, Towsley “Estimation and Removal of Clock Skew from Network Delay Measurements”, TR98-43, Univ. of

Massachusetts at Amherst.

Cristian “Probabilistic Clock Synchronization”, Distributed Computing, 1989

de Berg, van Kreveld, Overmars, Schwarzkopf Computational Geometry, pag 1-8, Springer 98.

http://search.cpan.org/~augusto/Time-Skew-0.1/Skew.pm

(27)
(28)

Design of a One Way Jitter estimator

One way delay (from previous formula) is:

i−i−1=tsrcvi−tsrcvi−1−1atssndi−tssndi−1

i=tsrcvi−tssndi−a∗tssndib

As a consequence:

Therefore we conclude that only Clock Phase Change is needed to compute one-way drift.

(29)

A tool for OW jitter measurement

The protocol centers around three types of packets:

open: request of authorization to ping;

reply: contains authorization and parameters;

fwd: measurement messages (timestamped).

open

open fwd

reply

source target

(30)

JaMeter: a prototype

JaMeter is a monitoring tool that measures OW jitter both forward and backward.

originally designed to measure asymmetry in the jitter (JA stands for jitter asymmetry);

can produce results either on a dedicated MySql database, or on the stdout;

currently deployed as part of GlueDomains

Riferimenti

Documenti correlati

The output signal constellation diagrams indeed shows the suppression of both phase and amplitude noise compared to the regenerator input.. The main drawback of this strategy is

To reduce the carbon emission associated with the built environment we should aim to mitigate the risk of overheating in existing buildings under current and potential

Thermal Management of Electric Vehicle Batteries Using Heat Pipe and Phase Change Materials.. Muhammad Amin 1,2 , Bambang Ariantara 1,3 , Nandy Putra 1,* , Adjie Fahrizal Sandi

Si prende un bistabile di tipo D sincronizzato sul livello ma come clock gli si applica un segnale con livello alto di durata molto inferiore al livello basso, ovvero un clock di

From him, Alan Apley absorbed an understanding of the pathology and the healing of orthopedic and traumatic lesions, which was to be the sheet anchor of his own clinical work..

Pertanto è importante che la canna fumaria raggiunga la temperatura di esercizio prima di ridurre la regolazione della valvola di tiraggio per limitare la combustione nella stufa

Aoralscan 3 aiuta a snellire e a semplificare la collaborazione tra studi e laboratori consentendo di ottenere lavori di riabilitazione orale efficienti ed efficaci.

In un'abitazione con un buon isolamento è necessario reintegrare l'aria utilizzata dalla combustione. Questo soprattutto per le case con aerazione meccanica. Vi sono diversi modi