05488010

6
Towards Master-less WSN Clock Synchronization with a Light Communication Protocol D. Fontanelli, D. Macii DISI – Dipartimento di Ingegneria e Scienza dell’Informazione University of Trento Via Sommarive 14, 38100, Trento, Italy Email: {fontanelli,macii}@disi.unitn.it  Abstract—Time synch roni zati on of Wir eles s Senso r Network (WSN) nodes is ess ent ial in those applic ati ons re qui rin g dis - tributed task scheduling or data aggregation and fusion. In this paper, a new synchronization procedure based on a distributed Prop ortio nal Integ ral (PI) cons ensus contr olle r is desc ribe d. Compared to other simila r soluti ons, the proposed approach kee ps int o ac count the eff ec t of ran dom commun ica tio n and processing delays and it is expected to have lower communication overhead. Also, it is designed to avoid the election of any xed time refere nce node, thus potent iall y impr ovin g the robu stnes s of the whole synchronization procedure. Some simulation results show that the proced ur e works cor re ctl y even in dif fer ent network trafc conditions.  Keywords —Time sync hroni zatio n, wire less senso r netwo rks, linear control, distributed measurement systems. I. I NTRODUCTION Ti me synch roniz ation of networked device s has been an active research topic for several years, due to the need for co- ordinating the activities of distributed systems over a common time scale. In general, two clocks are referred to as synchro- nized if they have the same epoch (i.e., the same time scale origin) and the difference between the time values related to the same event lies within specied uncertainty boundaries [1]. In Wi reles s Senso r Netwo rks (WSNs ) time synch roniz ation is essential to run data aggregation and fusion algorithms, to sched ule differen t monit oring threads , or to prolon g batte ry life time through smar t duty-c yclin g techn iques [2], [3], [4]. As known , tradi tiona l synch roniza tion technique s for wire d net wor ks suc h as the Network Ti me Protocol (NTP) and the Precision Time Protocol (PTP) are usually considered to be excessively heavy for low-cost WSN devices. Conversely, modera te computational burd en and reduc ed netwo rk traf c are basi c requi remen ts for WSN synch roniz ation protocol s. Usually, these protocols rely on a preset or elected time refer- ence node (sometimes dened as synchronization master). For instance, in the Reference Broadcast Synchronization (RBS) protocol one node broadcasts one or multiple radio beacons to its neighbors that in turn time-stamp the incoming messages. Afterwards, all nodes send the time-stamp values associated with each received beacon to all the others. Such values are used by each node to compute the relative time offsets and the relative clock drift rates between any pair of devices [5]. In the Timing-sync Protocol for Sensor Networks (TPSN) a spanning tree is built and the clocks of the child nodes are corrected on the basis of the time of the respective parents, the root of the tree being the time reference for the whole network [6]. The Flooding T ime Synch r onizati on Pr otocol (FTSP ) oods the WSN with mes sages contai ning the global time of the elec ted synchr oniza tion master . Each node recor ds its local time as soon as a synchronization message is received. When the number of collected global time/local time pairs is large enough, each node computes the drift rate of its clock with respect to the master using linear regression [7]. A common probl em to all soluti ons based on a gi ven ref- erence node is that if this device fails, a new one should be congured or elected as synchronization master. Since election and topology reconstruction procedures may be quite complex and time-con sumin g, in this paper we pres ent a master- less synchronization policy in which every node periodically disci- plines the clocks of the neighbor WSN nodes. This approach is based on a proportional and integral (PI) distributed consensus controller similar to that described in [8]. In [9] it is indeed pro ved that this controll er is abl e to dri ve the WSN clocks towards a common average time scale with good convergence speed . Unfort unatel y, it also require s that each node knows the time measured by all the oth er WSN devic es at every moment, which is not realistic in practice. In order to reduce the massive trafc that freque nt beaco n broadc asting would cause , a bidir ecti onal gossi p commun icat ion algorithm was event ual ly use d and combined wit h the PI contro lle r [10]. Nevertheless, also in this case several practical issues affecting the real performance of the algorithm (e.g., the effect of the communication and processing latencies) are not considered. In [11], [12] authors propose a double conse nsus algorit hm that is able to compensate iteratively both clock offsets and drift rates in WSNs with time –var ying topology . Howe ver , the number of messages exchanged among nodes is relatively high since each node has to estimate the frequency offset of any other node of the network. Moreover, not all uncertainty sources have been properly analyzed. Compared to the solu- tions mentioned above, the approach described in this paper has lower communication overhead and it keeps into account the effect of random communication latencies and processing delays. Also, it is robust to heavy data trafc conditions. 978-1-4244-2833-5/10/ $25.00 ©2010 IEEE

Transcript of 05488010

Page 1: 05488010

8/6/2019 05488010

http://slidepdf.com/reader/full/05488010 1/6

Towards Master-less WSN Clock Synchronization

with a Light Communication Protocol

D. Fontanelli, D. MaciiDISI – Dipartimento di Ingegneria e Scienza dell’Informazione

University of Trento

Via Sommarive 14, 38100, Trento, Italy

Email: {fontanelli,macii}@disi.unitn.it

 Abstract—Time synchronization of Wireless Sensor Network(WSN) nodes is essential in those applications requiring dis-tributed task scheduling or data aggregation and fusion. In thispaper, a new synchronization procedure based on a distributedProportional Integral (PI) consensus controller is described.Compared to other similar solutions, the proposed approachkeeps into account the effect of random communication andprocessing delays and it is expected to have lower communicationoverhead. Also, it is designed to avoid the election of any fixed

time reference node, thus potentially improving the robustnessof the whole synchronization procedure. Some simulation resultsshow that the procedure works correctly even in differentnetwork traffic conditions.

 Keywords—Time synchronization, wireless sensor networks,linear control, distributed measurement systems.

I. INTRODUCTION

Time synchronization of networked devices has been an

active research topic for several years, due to the need for co-

ordinating the activities of distributed systems over a common

time scale. In general, two clocks are referred to as synchro-nized  if they have the same epoch (i.e., the same time scale

origin) and the difference between the time values related to

the same event lies within specified uncertainty boundaries [1].

In Wireless Sensor Networks (WSNs) time synchronization

is essential to run data aggregation and fusion algorithms, to

schedule different monitoring threads, or to prolong battery

lifetime through smart duty-cycling techniques [2], [3], [4].

As known, traditional synchronization techniques for wired

networks such as the Network Time Protocol (NTP) and

the Precision Time Protocol (PTP) are usually considered to

be excessively heavy for low-cost WSN devices. Conversely,

moderate computational burden and reduced network traffic

are basic requirements for WSN synchronization protocols.Usually, these protocols rely on a preset or elected time refer-

ence node (sometimes defined as synchronization master). For

instance, in the Reference Broadcast Synchronization (RBS)

protocol one node broadcasts one or multiple radio beacons

to its neighbors that in turn time-stamp the incoming messages.

Afterwards, all nodes send the time-stamp values associated

with each received beacon to all the others. Such values are

used by each node to compute the relative time offsets and the

relative clock drift rates between any pair of devices [5]. In the

Timing-sync Protocol for Sensor Networks (TPSN) a spanning

tree is built and the clocks of the child nodes are corrected

on the basis of the time of the respective parents, the root of 

the tree being the time reference for the whole network [6].

The Flooding Time Synchronization Protocol (FTSP) floods

the WSN with messages containing the global time of the

elected synchronization master. Each node records its local

time as soon as a synchronization message is received. Whenthe number of collected global time/local time pairs is large

enough, each node computes the drift rate of its clock with

respect to the master using linear regression [7].

A common problem to all solutions based on a given ref-

erence node is that if this device fails, a new one should be

configured or elected as synchronization master. Since election

and topology reconstruction procedures may be quite complex

and time-consuming, in this paper we present a master-less

synchronization policy in which every node periodically disci-

plines the clocks of the neighbor WSN nodes. This approach is

based on a proportional and integral (PI) distributed consensus

controller similar to that described in [8]. In [9] it is indeed

proved that this controller is able to drive the WSN clockstowards a common average time scale with good convergence

speed. Unfortunately, it also requires that each node knows

the time measured by all the other WSN devices at every

moment, which is not realistic in practice. In order to reduce

the massive traffic that frequent beacon broadcasting would

cause, a bidirectional gossip communication algorithm was

eventually used and combined with the PI controller [10].

Nevertheless, also in this case several practical issues affecting

the real performance of the algorithm (e.g., the effect of the

communication and processing latencies) are not considered.

In [11], [12] authors propose a double consensus algorithm

that is able to compensate iteratively both clock offsets and

drift rates in WSNs with time–varying topology. However,the number of messages exchanged among nodes is relatively

high since each node has to estimate the frequency offset of 

any other node of the network. Moreover, not all uncertainty

sources have been properly analyzed. Compared to the solu-

tions mentioned above, the approach described in this paper

has lower communication overhead and it keeps into account

the effect of random communication latencies and processing

delays. Also, it is robust to heavy data traffic conditions.

978-1-4244-2833-5/10/$25.00 ©2010 IEEE

Page 2: 05488010

8/6/2019 05488010

http://slidepdf.com/reader/full/05488010 2/6

I I . MODEL DESCRIPTION

As shown in [13], the clocks or timers of a WSN consisting

of  n devices can be modeled as a simple discrete–time linear

system, i.e.

x(t + 1) = x(t) + d(t), (1)

where t ∈ N0 represents the number of clock ticks over an

ideal time scale, x ∈ Rn is the column vector containing

the clock values of all WSN nodes (namely the state of the

system) and d ∈ Rn is the vector of the actual time increments

occurring during the t−th tick. Each element of  d includes

the systematic frequency offset and the jitter affecting every

local oscillator as well as the quantization noise due to the

finite clock resolution. Normally, the clock values tend to

diverge because the mean values of the element of  d differ

from node to node and they are not stationary over time.

However, if a proper distributed controller is used to discipline

the WSN clocks, they converge towards a common time scale.

In particular, if a PI consensus controller like the one described

in [8] is applied, the overall system composed by (1) and the

controller can be modeled as follows:

x(t + 1) = x(t) + d(t) + u(t)

y(t + 1) = y(t) − αK x(t) (2)

u(t) = y(t) − K x(t)

where u ∈ Rn is the output vector of the controllers correcting

node clocks, y ∈ Rn is the state vector of the controller,

the matrix K  and the coefficient α result from the consensus

theory [8], and

x(t) =

x(t)+η(t) if a new synchronization occurs

0 if no synchronization occurs(3)

is the controller input. Notice that the controller may switch

between two different configurations. The first one corre-sponds to the case when at time t each node knows the

time values of the other nodes (e.g., because a new set of 

clock values has just been received). Of course, such clock 

values are affected by communication latencies and time-

stamping uncertainty. In (3) these uncertainty contributions are

represented by the vector η ∈ Rn.

The second configuration instead corresponds to the case

when no clock values are transferred between nodes, namely

between two subsequent synchronization events. In [13], it is

shown that if  γ k is the time interval, measured in clock ticks,

between the k–th and the (k + 1)–th synchronization events

the closed–loop matrix of the system (2) after γ k + 1 ticks is

Aclγk=

I n − [1 + αγ k]K  (γ k + 1)I n

−αK I n

, (4)

where γ k, α and K  are the degrees of freedom for controller

design. In fact, the convergence speed, the noise sensitivity

as well as the stability of the whole system depend on these

parameters. For instance, if  α ∈ (0, 1), K  is symmetric and

K 1 = 0 with 1 = [1, 1, . . . , 1]T , a variety of solutions

exists which trade convergence speed for noise robustness [14].

Observe that this approach does not require the election of 

any reference node or synchronization master. However, the

symmetric assumption on K  makes the actual implementation

of the distributed controller quite demanding in terms of traffic,

because it implies that each node needs to know the time

measured by all the other devices, before correcting each clock 

with a new value of the controller output. As a consequence,

the number of broadcasted time-stamped messages grows

linearly with n. Moreover, both the probability of sensing

the channel busy and the probability of packet collision

also increase, thus causing longer end-to-end communication

delays which in turn affect both synchronization uncertainty

and robustness. Therefore, in order to reduce the number

of messages per synchronization event, the matrix K  should

contain a large number of zeros. In fact, if the element (i, j) of 

K  is equal to 0, the element xj(t) does not affect the controller

input of the i–th node. As a consequence, transferring the clock 

value of node j to node i is unnecessary. In the next Section,

we will show a possible criterion to choose K  according to

this basic idea and we will prove that the closed–loop system

is still asymptotically stable.

III. CONTROLLER DESIGN

With the aim of limiting the number of messages per

synchronization event, any WSN node should adjust its local

clock on the basis of the time information received from a

single device only. Assume that a round-robin transmission

policy is used and that each node is able to reach any other

device of the network within one hop. If, for instance, the

m–th node transmits its own clock value to the others, the

consensus matrix K  in the interval between the k–th and the

(k + 1)–th synchronization events can be defined as

K m=

1 − ρ · · · 0 ρ − 1 0 · · · 00 · · · 0 ρ − 1 0 · · · 0...

. . ....

. . . 00 · · · 1 − ρ ρ − 1 0 · · · 00 · · · ρ − 1 1 − ρ 0 · · · 00 · · · 0 ρ − 1 1 − ρ · · · 0...

. . ....

. . . 00 · · · 0 ρ − 1 0 · · · 00 · · · 0 ρ − 1 0 · · · 1 − ρ

, (5)

where ρ is a design parameter which determines the weight

of the received time value in the correction of the clock of 

the receiving node. In fact, the m–th column of (5) describes

how the information broadcasted by the transmitting node is

used by all the other nodes of the network, while the diagonalelements define the way in which each node utilizes its own

measured clock value. Notice that the computation of the

controller can be easily distributed among the various nodes

of the network. Indeed, by plugging (5) into Equations (2),

each node j, with j = m, needs just to weigh its own timer

value by 1 − ρ and the clock from node m by ρ − 1.

The m–th row of (5) deserves some attention. Since the

m–th node is broadcasting its clock value over the network 

and only one transmission for each synchronization period

Page 3: 05488010

8/6/2019 05488010

http://slidepdf.com/reader/full/05488010 3/6

of length γ k + 1 is allowed, node m does not receive any

time information for 2(γ k + 1) ticks. This implies that the

m–th controller in (2) is not properly updated, since a fixed

interval of  γ k + 1 ticks has been hypothesized between two

successive controller updates. To solve this problem, node m

should re-use the clock value received just before the previous

synchronization event (e.g., from node m − 1). However, this

value should be corrected in order to include the time elapsed

from the time when the message from node m − 1 was

received. Both the corrected value referred to the (m − 1)–th

node and the local clock value are the inputs to the controller

of node m.

  A. Convergence Analysis

The network nodes are considered synchronized, if there

exists a finite time t and two values b1, b2 ∈ R such that

xi(t) − (b1t + b2) ≤ ε for t ≥ t and for ∀i = 1, . . . , n. The

clock synchronization tolerance ε can not be smaller than timer

resolution. In [13] the convergence of  x(t) towards (b1t +b2)1 has been proved casting the convergence proof into a

stability problem and using three fundamental properties of 

K : K  = K T , K > 0 and the fact that K 1 = 0 . For the matrix

in (5), symmetricity does not hold, while the other properties

are preserved providing ρ ∈ [0, 1].

Similar results can be derived for the problem at hand.

Indeed, the fact that the transmitting node changes at each

iteration turns the averaging consensus problem presented

in [13], [10], for which the communication links are supposed

to be bidirectional, into a leader–follower problem [15], [16]:

the transmitting node leads all the other follower nodes of the

network. Convergence towards a common time scale is again

provided using stability analysis tools. Indeed, approximating

the drift rate d(t) as a time invariant and considering thefollowing variable q(t) = y(t) + d(t), the overall system

state is given by z(t) = [x(t)T , q(t)T ]T . After some simple

algebraic manipulations, one gets z(t+1) = Aclγkz(t), which

is simply z(t + δt) = Aδtclγk

z(t) if  δt consecutive steps are

considered.

Recalling the definition of synchronization given previously,

the network nodes are synchronized if limt→+∞x(t) = (b1t+b2)1. If  z(0) = [x(0)T , q(0)T ]T  represents the initial state

of the network clocks, the nodes are synchronized if  ∀t ≥t, z(t) ≈ [(b1t + b2)1T , b11

T ]T , with an uncertainty ε. In

matrix terms, assuming that Aclγkis stable, such a steady

state condition is expressed as(b1t + b2)1

b11

≈ z(t) = Aclγk

z(t − 1) = Atclγk

z(0), (6)

where ∀t ≥ t.

In order to prove that condition (6) holds true in the

presented case, we start with a simplified case in which

the controller is a proportional controller rather than a PI

controller, i.e., α = 0. δt refers to the round–robin scheduling

scheme, which lasts n steps. The closed loop matrix Anclγk

is

then equal toni=1(I −K i) (γ k + 1)

nj=2

ni=j(I −K i)+ I 

0 I 

. (7)

Notice that each term (I − K i) is a stochastic matrix provided

that ρ ∈ [0, 1]. Hence,

ni=1(I  − K i) is still a stochastic

matrix [17]. It then follows that we can replace each product

with a stochastic matrix S  p. If the round–robin scheme iscompleted l times, we have

z(ln) = (Anclγk

)lz(0).

It follows that the proportional master–less clock synchroniza-

tion algorithm is able to remove clock offsets right after the

synchronization event but it does not affect the drift rates.

Indeed, if we consider the first row of (7), we have

x(ln) = (S  p)lx(0)+(γ k+1)

ln

j=2

S j

+ I 

(y(0)+d(0)).

For a sufficiently large l, S l

 p

tends towards a matrix whose

rows are all equal, with positive entries [18]. Hence, (S  p)lx(0)is a vector whose entries are the same. However, the difference

in the frequency offsets for the initial condition implies that

some residual error exists between the clock values. Notice

that from the second row of (7), y(ln) +d(ln) = y(0)+d(0).

As a consequence, the master–less proportional controller

solves the synchronization problem if and only if  yi(0) +di(0) = yj(0) + dj(0).

Let us now choose α ≥ 0. In such a case the matrix in (7)

will be more complicated since more terms are added on the

second row. However, such additional elements are a function

of  α and K m and their powers. If  0 < α < γ  −1k and given

that the matrices K m are stable ∀m, it can be shown that fora sufficiently large number l, the closed loop matrix tends to

Alnclγk

=

E 1 B

0 E 2

,

where E i have, again, all the rows equal with positive entries,

and the structure of  B is similar to the rightmost element of 

the first row of (7). Therefore, the sum of frequency offsets and

system inputs converge to a common value regardless of their

initial condition, i.e., [yi(ln) + di(ln)] = E 2[yi(0) + di(0)] =b11. As a consequence, the clocks timers will converge to a

common time scale, as desired. It is worthwhile to note that

the value b1 very much depends on the sequence of consensus

matrices and on the values α and ρ.In order to prove the correctness of the proposed method,

a proof of the stability of the sequence of closed loop matri-

ces (4) is needed when the consensus matrices (5) switch due

the round–robin schedule. Trivially, it is sufficient to compute

the matrix Anclγk

as a function of ρ and α. By suitably choosing

the eigenvalues inside the unit circle, the matrix Anclγk

is stable.

A solution does always exist if  0 < α < γ −1k and ρ ∈ (0, 1).

Finally, notice that α is directly related to the convergence

rate of the clock frequency offsets towards a common value:

Page 4: 05488010

8/6/2019 05488010

http://slidepdf.com/reader/full/05488010 4/6

the larger α, the faster the convergence. However, a faster

convergence implies a higher noise sensitivity, which may

lead to undesirable effects. A more rigorous analysis of the

robustness of the proposed method with respect to possible

random uncertainty contributions will be the subject of future

work.

IV. IMPLEMENTATION AND COMMUNICATION DETAILS

In this section the steps of the synchronization protocol

based on the distributed PI controller described in Sections II

and III are presented. In the following, we will assume that

all WSN nodes as well as the local oscillators have the same

features. Also, without loss of generality, we will assume that

every WSN node can reach any other device within one hop

and that the synchronization interval is constant, i.e. γ k = γ ,

∀k ∈ N. In a first approximation, the nominal value of the

synchronization interval (expressed in clock ticks) should meet

the following condition:

γ >> max 1

2|ν max| , 3σx

2|ν max| , (8)

where ⌈·⌉ is the operator rounding the corresponding argument

to the closest larger integer, σx is the standard uncertainty

associated with (3) expressed in ticks, ±ν max is the worst-

case relative frequency offset of the local oscillators driving

the WSN clocks. The two expressions in the rightmost term of 

(8) represent the minimum time intervals after which the time

error due to the native oscillator drifts is equal to 1 tick and

to 3σx, respectively. In fact, if the synchronization interval is

not long enough, the random uncertainty sources prevail over

the systematic drift rates, thus deteriorating the performance

of the PI controller.

The communication protocol supporting the implementationof the controller described in Sections II and III is straight-

forward. If the static round–robin scheme described in Sec-

tions III is used, when the k-th synchronization interval

expires, the node with identifier (ID) equal to

m =

mod(k, n) mod(k, n) = 0n mod(k, n) = 0

(9)

broadcasts two messages to all its neighbors, i.e. a synchro-

nization packet (SP) and a follow-up packet (FU) after a short

time interval. The other WSN nodes record the reception

times of both packets as soon as they are received. Both

packets contain the same fields, namely the sender ID, the

synchronization interval and a local clock value. However, animportant difference exists between SP and FU. The clock 

value stored in SP is the time-stamp appended at the MAC

layer, while the synchronization packet is being transmitted.

Therefore, it does not include the propagation time as well

as the time spent to transmit the fields that are typically

used to encapsulate any MAC Protocol Data Unit (MPDU)

at the physical layer. Conversely, the FU contains the clock 

value of node m which is captured as soon as the last

bit of the previous SP is sent. A similar approach is also

recommended in the standard IEEE 1588, whenever high-

accuracy synchronization is required [1]. The main advantage

of the SP/FU approach is that the difference between the clock 

value stored in FU and the time when the corresponding SP

is received by every node i = m represents a very accurate

estimate of the temporal offset between clocks m and i.

The measurement uncertainty contributions are indeed related

to the time-stamping mechanisms and the SP propagation

delay only. However, the propagation delay in short range

WSNs is in the order of some ns, i.e. negligible compared

to the resolution of a typical WSN clock. As a consequence,

estimating the propagation latency through delay request and

acknowledgment messages between nodes i and m (as it is

commonly done in PTP) is unnecessary. This greatly reduces

the amount of synchronization-related traffic. Using the SP/FU

approach is also beneficial in terms of robustness. In fact, the

probability that one of the WSN nodes does not receive any

packet is much lower than the probability of missing either

SP or FU. Depending on which packet is received by node i,

three possible situation may occur.

1) If both FU and SP are received (default case), then theelements xm(t) and xi(t) of (3) are set equal to the

clock value stored in FU and the recorded receiving

time-stamp of SP, respectively.

2) If FU is received but SP is lost, then the FU clock value

is assigned to xm(t) and the recorded receiving time-

stamp of FU is assigned to xi(t).

3) Finally, if SP is received but FU is lost, then the SP

sending and receiving time-stamps are used for xm(t)and xi(t), respectively.

The other elements of  xj(t) of (3) for j = i, m are unused

so they can be set equal to 0. Of course, if both packets are

lost nothing happens and the clock of node i is corrected by

the state of the controller as it is done in the interval betweentwo subsequent synchronization events.

V. SIMULATION RESULTS

The proposed approach has been validated through some

simulations in MatlabTM. The virtual WSN consists of a

variable number of parametric nodes having a nominal bit rate

of 250 kbit/s. The clock of each node is supposed to be driven

by a crystal oscillator (XO) running at f 0 = 32768 Hz with

frequency offsets in the range ±30 ppm and short–term jitter

in the order of about 2 ns rms over 1 s. In order to include the

effect of the communication latencies, a Carrier Sense Multiple

Access scheme with Collision Avoidance (CSMA/CA) based

on the standard IEEE 802.15.4 has been implemented [19].Also, the influence of different traffic conditions has been

simulated using the model proposed in [20]. The simulation

results reported in this Section refer to n = 5 and γ  = 6s. In fact, this value is approximately 10 times larger than

the lower bound given by (8). The design parameters of the

PI controller are α = 1.0 · 10−6 and ρ = 0.7, because

these values assure system stability and a reasonable trade-off 

between convergence speed and synchronization uncertainty,

in accordance with what it is stated in Section III.

Page 5: 05488010

8/6/2019 05488010

http://slidepdf.com/reader/full/05488010 5/6

0 100 200 300 400 500 600−0.025

−0.02

−0.015

−0.01

−0.005

0

0.005

0.01

0.015

0.02

0.025

Time [s]

   T   i  m  e  o   f   f  s  e   t  s   [  s   ]

(a)

0 100 200 300 400 500 600−0.025

−0.02

−0.015

−0.01

−0.005

0

0.005

0.01

0.015

0.02

0.025

Time [s]

   T

   i  m  e  o   f   f  s  e   t  s   [  s   ]

(b)

Fig. 1. Time offsets of the WSN clocks before and after applying thesynchronization protocol when all clocks are initially set equal to 0.

Fig. 1(a) and 1(b) show the time offsets of the WSN clocks

with respect to the ideal time before and after applying the

synchronization protocol under negligible traffic conditions.In this case all clocks are initially set equal to 0. While in

Fig. 1(a) the free-running clocks tend to diverge, in Fig. 1(b)

all clocks converge to the same time scale. The corresponding

standard uncertainty is in the order of 15 ticks, i.e. 450

µs, which is reasonable, especially in consideration of the

extremely small amount of traffic, i.e. just 20 SP and 20 FU

sent by every node over 10 minutes.

In Fig. 2(a) and 2(b) the time error patterns of the WSN clocks

are plotted again as a function of time, under the assumption

that the initial temporal offsets lie in the interval [0, 1] s. In

Fig. 2(a) the standard protocol described Section IV is used,

whereas in Fig. 2(b) a preliminary compensation of the initial

clock offset is performed. Notice that in the latter case wehave a much faster convergence and comparable accuracy.

Fig. 3 shows the average standard synchronization uncertainty

as a function of the mean traffic rate offered to the channel.

The offered traffic is a Poisson process including the com-

bination of both new and retransmitted packets. The mean

offered traffic rate is defined as the ratio between the average

number of packets and the transmission time [20]. Observe

that the synchronization uncertainty tends to be constant and

much smaller than 1 ms in low traffic conditions; it is a few

0 20 40 60 80 100 120 140 160 180 2000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Time [s]

   T   i  m  e  o   f   f  s  e   t  s   [  s   ]

(a)

0 20 40 60 80 100 120 140 160 180 2000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Time [s]

   T   i  m  e  o   f   f  s  e   t  s   [  s   ]

(b)

Fig. 2. Time error patterns of the WSN clocks when the initial clock offsetslie in [0, 1] s. In (a) the standard protocol described in Section IV is used,whereas in (b) a preliminary compensation of the initial offsets is performed.

ms when the traffic is moderate and it grows up to some

tens of ms in case of congestion. In spite of this loss of 

accuracy due to multiple retransmission attempts and dropped

packets, the whole procedure still converges, thus confirming

the robustness of the master-less approach.

V I . CONCLUSIONS

In this paper the problem of WSN clock synchronization

is tackled by using a distributed PI consensus controller.

The proposed technique has three main advantages. First, it

works without the election of any synchronization master.

Second, it is scalable, as it is independent of the number

of network nodes. Third, it can be implemented easily andit requires a very small number of synchronization messages

circulating in the network. Simulation results show that the

proposed approach exhibits good performance in terms of 

stability, accuracy, convergence speed and robustness to packet

loss and variable traffic conditions. Further research work has

to be done to minimize the impact of random uncertainty

contributions on controller outputs. Also, the behavior of the

algorithm in the case of WSNs with partial visibility between

nodes needs to be investigated properly.

Page 6: 05488010

8/6/2019 05488010

http://slidepdf.com/reader/full/05488010 6/6

10−7

10−6

10−5

10−4

10−3

10−2

10−1

100

0

2

4

6

8

10

12

14

16

18

Mean offered traffic rate

   S  y  n  c   h  r  o

  n   i  z  a   t   i  o  n  u  n  c  e  r   t  a   i  n   t  y   [  m  s   ]

Fig. 3. Average standard synchronization uncertainty as a function of themean offered traffic rate.

ACKNOWLEDGMENTS

The research presented in this paper is part of the FP-7 EU

project Control of Heterogeneous Automation Systems (CHAT)

– EC contract IST-2008-224428. Some research activities were

developed by one of the authors at the University of Califor-nia, Berkeley, USA, within the Fulbright Research Scholar

Exchange Program.

REFERENCES

[1] IEEE 1588:2008, Precision clock synchronization protocol for net-worked measurement and control systems, New York, USA, July 2008.

[2] D. Fontanelli, L. Palopoli, and R. Passerone, “Convergence of distributedWSN algorithms: The Wake-Up scattering problem,” in Proc. of Hybrid Systems: Computation and Control, R. Majumdar and P. Tabuada, Eds.San Francisco: Springer-Verlag Berlin Heidelberg, April 13–15 2009,pp. 180–193.

[3] D. Fontanelli, L. Palopoli, R. Passerone, D. Macii, and D. Petri,“Lifetime and Coverage Maximization in Wireless Sensor Networks,” inProc. IFAC Workshop on Estimation and Control of Networked Systems,

Venice, Italy, 24-26 September 2009.[4] D. Macii, A. Ageev, and A. Somov, “Power Consumption Reduction in

Wireless Sensor Networks through Optimal Synchronization,” in Proc. International Instrumentation and Measurement Technology Conference(I2MTC), Singapore, May 2009, pp. 1346–1351.

[5] J. Elson, L. Girod, and D. Estrin, “Fine–grained network time syn-cronization using reference broadcasts,” in Proc. of Symposium on

Operating Systems Design and Implementation, 2002, pp. 147–163.[6] S. Ganeriwal, R. Kumar, and M. B. Srivastava, “Timing–sync protocol

for sensor networks,” in Proc. of the 1st ACM Conference on Embedded 

  Networked Sensor Systems (SenSys), Los Angeles, California, USA,November 2003, pp. 138–149.

[7] M. Maroti, B. Kusy, G. Simon, and A. Ldeczi, “The flooding time syn-chronization protocol,” in Proc. of the 2nd ACM Conference Embedded 

 Networked Sensor Systems, Baltimore, Maryland, USA, November 2004,pp. 39–49.

[8] R. Olfati-Saber, J. Fax, and R. Murray, “Consensus and cooperation

in networked multi–agent systems,” Proc. of IEEE , vol. 95, no. 1, pp.215–233, January 2007.

[9] R. Carli, A. Chiuso, L. Schenato, and S. Zampieri, “A PI consensuscontroller for networked clocks synchronization,” in Proc. of 17th IFAC World Congress, Seoul (Korea), July 2008.

[10] S. Bolognani, R. Carli, and S. Zampieri, “A PI consensus controllerwith gossip communication for clock synchronization in wireless sensorsnetworks,” in Proc. IFAC Workshop on Estimation and Control of 

  Networked Systems, Venice, Italy, 24-26 September 2009.

[11] L. Schenato and G. Gamba, “A distributed consensus protocol for clock synchronization in wireless sensor network,” in Proc. of IEEE Conf. on

 Decision and Control, New Orleans, LA, USA, 12-14 December 2007,pp. 2289–2294.

[12] L. Schenato and F. Fiorentin, “Average TimeSynch: a consensus-basedprotocol for time synchronization in wireless sensor networks,” in Proc.

  IFAC Workshop on Estimation and Control of Networked Systems,Venice, Italy, 24-26 September 2009.

[13] D. Fontanelli, D. Macii, and D. Petri, “A flexible linear control algorithmfor wireless sensor networks synchronization,” in Proc. IEEE Intl.

  Instrumentation and Measurement Technology Conference (I2MTC),Singapore, May 5-7 2009, pp. 384–389.

[14] D. Fontanelli and D. Petri, “An Algorithm for WSN Clock Synchro-nization: Uncertainty and Convergence Rate Trade Off,” in Proc. IEEE 

  Intl. Workshop on Advanced Methods for Uncertainty Estimation in Measurement (AMUEM), Bucharest, Romania, 6-7 July 2009, pp. 74–79.

[15] A. Jadbabaie, J. Lin, and A. Morse, “Coordination of groups of mobileautonomous agents using nearest neighbor rules,” IEEE Trans. on

 Automatic Control, vol. 48, no. 6, pp. 988–1001, 2003.[16] W. Ren and R. Beard, “Consensus seeking in multiagent systems under

dynamically changing interaction topologies,” IEEE Trans. on Automatic

Control, vol. 50, no. 5, pp. 655–661, 2005.[17] S. Boyd, A. Ghosh, B. Prabhakar, and D. Shah, “Randomized gossip

algorithms,” IEEE Trans. on Information Theory/ACM Transactions on

 Networking, vol. 6, no. 52, pp. 2508–2530, 2006.[18] R. Olfati-Saber, J. Fax, and R. Murray, “ConsensusandCooperationin

NetworkedMulti-AgentSystems,” Proceedings of the IEEE , vol. 95,no. 1, pp. 215–233, 2007.

[19] IEEE 802.15.4:2006, Standard for Information Technology - Telecom-munications and information exchange between systems - Local and metropolitan area networks - specific requirement. Part 15.4: Wireless

 Medium Access Control (MAC) and Physical Layer (PHY) Specifications  for Low-Rate Wireless Personal Area Networks (WPANs), New York,USA, September 2006.

[20] L. Kleinrock and F. A. Tobagi, “Packet Switching in Radio Channels:Part I-Carrier Sense Multiple-Access Modes and Their Throughput-Delay Characteristics,” IEEE Trans. on Communications, vol. COM-23,no. 2, pp. 1400–1416, December 1975.