Consistent clock synchronization frequency offset estimation method based on sequential least squares

Information

  • Patent Grant
  • 12127143
  • Patent Number
    12,127,143
  • Date Filed
    Tuesday, June 15, 2021
    3 years ago
  • Date Issued
    Tuesday, October 22, 2024
    a month ago
Abstract
The present invention relates to a consensus-based clock synchronization skew estimation method based on sequential least squares, and belongs to the technical field of wireless sensor networks. The method is to establish a relationship model of clock information and time delay between nodes with respect to a bounded random communication time delay scenario subject to arbitrary distribution, fully consider all clock information received by a node from a neighbor, build a clock parameter estimation model and a cost function based on a least squares principle, iteratively estimate relative clock skew by a sequential least squares method, and update logical clock parameters of nodes by a consensus-based clock synchronization method, so as to achieve global clock consistency of all nodes in a network in a completely distributed way. The present invention improves accuracy of relative skew estimation, effectively reduces storage overhead of the nodes, and improves robustness of a consensus-based synchronization algorithm against communication time delay.
Description
FIELD OF INVENTION

The present invention belongs to the technical field of wireless sensor networks, and relates to a consensus-based clock synchronization skew estimation method based on sequential least squares.


BACKGROUND

Wireless sensor networks are a kind of typical distributed wireless communication networks. Due to functions such as information collection, data processing and wireless communication, the wireless sensor networks have very important theoretical significance and application value in the fields of environmental monitoring, medical treatment & health, industrial production, dangerous environment, etc. Time synchronization is an important prerequisite for effective application of the wireless sensor networks, and a plurality of applications such as protocol running, TDMA scheduling, energy management and target location need to be run on the basis of keeping time of nodes in a network synchronous. As a core for cooperative control research of a multi-agent system, a consensus-based synchronization protocol is an effective method for solving a problem of cooperative control of a distributed network. Introducing a consensus theory into clock synchronization of a wireless sensor network can improve robustness and expansibility of a synchronization method. Therefore, researching a clock synchronization method based on consensus to solve a problem of distributed synchronization has a good development prospect.


In a practical wireless sensor network scenario, random communication time delay in clock synchronization is usually unavoidable. The random communication time delay can be modeled as Gaussian distribution, exponential distribution and gamma distribution for different applications. Considering presence of communication time delay, early proposed consensus-based clock synchronization methods which ignore influence of time delay cannot effectively guarantee convergence of synchronization between network nodes. Relative skew estimation plays an important role in a clock synchronization method, because an estimated value thereof can be directly used in logical clock parameter compensation, thus influencing synchronization accuracy and convergence performance of a clock synchronization algorithm. In recent years, some consensus-based clock synchronization algorithms have suppressed influence of communication time delay on clock parameter estimation and consensus synchronization by improving relative skew estimation methods, thus effectively solving a problem that synchronization cannot be converged in the presence of time delay. However, such consensus-based clock synchronization methods have two limitations: first, due to limitation of a specific type of random time delay distribution, the methods cannot be applied to an actual network environment with variable time delay; second, the skew estimation methods used are relatively simple, so clock information received by the nodes cannot be fully utilized to estimate a more accurate skew, and performance of time synchronization is also limited.


Therefore, a novel relative skew estimation method which can solve a problem of consensus-based clock synchronization in wireless sensor networks and has low storage requirements and high estimation accuracy in an arbitrary bounded random communication time delay scenario is urgently needed.


DISCLOSURE OF THE INVENTION

In view of this, the purpose of the present invention is to provide a consensus-based clock synchronization skew estimation method based on sequential least squares. Aiming at problems that consensus-based time synchronization cannot be converged in the presence of arbitrary random communication time delay and clock information is not fully utilized in skew estimation, concentrating on an efficient and practical data processing optimization method, and considering high synchronization accuracy and low node storage requirements, relative skew is estimated by a sequential least squares method, and estimation results are applied to a clock synchronization method based on consensus to perform logical clock parameter compensation, so that convergence performance of a consensus-based time synchronization method in the presence of time delay is effectively guaranteed, and effects of adapting to different types of delay scenarios and improving synchronization accuracy of an entire network can be achieved at the same time.


To achieve the above purpose, the present invention provides following technical solution:


A consensus-based clock synchronization frequency offset estimation method based on sequential least squares, which is to establish a relationship model of clock information and time delay between nodes with respect to a bounded random communication time delay scenario subject to arbitrary distribution, fully consider all clock information received by a node from a neighbor, build a clock parameter estimation model and a cost function based on a least squares principle, iteratively estimate a relative skew by a sequential least squares method, and update logical clock parameters of nodes by a consensus-based clock synchronization method, so as to achieve global clock consensus of all nodes in a network in a completely distributed way. The method comprises the following specific steps:

    • S1: Establishing a relationship model of clock information and time delay between nodes with respect to a bounded random communication time delay scenario subject to arbitrary distribution;
    • S2: Establishing a relative relationship of any set of local clock information according to a communication time delay relationship;
    • S3: Building a clock parameter estimation model and a cost function based on a least squares principle according to the relative relationship of the clock information;
    • S4: Iteratively estimating a relative skew by a sequential least squares method, and updating logical clock parameters of nodes by a consensus-based clock synchronization method; after the relative skew between nodes are estimated, periodically repeating operations of estimating a relative skew and updating logical clock parameters until logical clocks of the nodes in an entire network are synchronized.


Further, in step S1, a relationship model of clock information and time delay between nodes is established, specifically comprising: assuming that any sensor node i in a network periodically broadcasts a local clock τi(tki) and relevant synchronization clock information at an interval T, and a neighbor node j thereof receives and records a local clock τj(tkid) thereof at a receiving moment to obtain a communication time delay relationship between nodes under real time scale:

dij(tkid)=tkid−tki


Where dij(tkid) represents random communication time delay subject to arbitrary distribution, which is non-negative and has an upper bound of constant Dd.


Further, in step S2, a relative relationship of any set of local clock information is established according to a communication time delay relationship, specifically comprising: after the neighbor node j receives n+1 pieces of synchronization clock information from the node i, obtaining n+1 sets of local clock observed values {τi(tki), τj(tkid)}k=0n, and establishing the relative relationship of any set of local clock information according to the communication time delay relationship:

τj(tkid)=αijτi(tki)+βijjdij(tkid)


Where αij and βij respectively represent a relative skew and a relative offset of the node i relative to the node j, and αj represents a local clock skew of the node j.


Further, in step S3, a clock parameter estimation model and a cost function based on a least squares principle are built, specifically comprising: processing communication time delay items according to the relative relationship of the clock information in order to reduce influence of time delay on parameter estimation and clock synchronization, and considering a time delay part in a formula of the relative relationship of the local clock information as an error function:

eij(tkid)=τj(tkid)−αijτi(tki)−βij


Extending the error function to all local clock observations, and then processing an error by a least squares principle, so as to obtain the following cost function J(αij, βij) containing the clock parameters αij and βij:







J

(


α
ij

,

β
ij


)

=




k
=
0

n



(



τ
j

(

t
k
id

)

-


α
ij




τ
i

(

t
k
i

)


-

β
ij


)

2






Obtaining estimations of the relative skew and the relative offset by minimizing the cost function.


Further, in step S4, relative skew estimation based on a least squares principle is a value obtained by minimizing the cost function J(αij, βij), the cost function contains all clock information received and recorded, and as time synchronization progresses, more and more clock information {τi(tki), τj(tkid)} needs to be stored by the nodes. A sensor node with a limited storage capacity will not have enough memory space to keep all the clock information; in this scenario, a relative clock skew is iteratively estimated by a sequential least squares method, so as to effectively reduce storage overhead of the sensor node, specifically comprising following steps:


S41: In a first round of synchronization, receiving and storing, by the node j, two sets of clock information {τi(t0i), τj(t0id)} and {τi(t1i), τj(t1id)}, and obtaining estimated values {circumflex over (α)}ij(1) and {circumflex over (β)}ij(1) in the first round of synchronization directly by a standard least squares method:









α
ˆ

ij

(
1
)

=




τ
j

(

t
1
id

)

-


τ
j

(

t
0
id

)


T










β
ˆ

ij

(
1
)

=


τ
j

(

t
0
id

)





In addition, to start a process of iteratively estimating clock parameters, setting a covariance matrix in the first round of synchronization to be:

Σ(1)=(HT(1)H(1))−1


Where H(1)=[h(0) h(1)]T, h(0)=[τi(t0i)1]T and h(1)=[τi(t1i)1]T;


S42: For a mth (m=2, 3, 4, . . . , n) round of synchronization, storing, by the node j, only clock information {τi(tmi), τj(tmid)} received in the current round, estimated values {circumflex over (α)}ij(m−1) and {circumflex over (β)}ij(m−1) of the clock parameters calculated in a previous round, and a covariance matrix Σ(m−1) generated in the previous round, and then iteratively estimating a relative skew and a relative offset in the current round of synchronization by the sequential least squares method;

{circumflex over (θ)}(m)={circumflex over (θ)}(m−1)+K(m)(τj(tmid)−hT(m){circumflex over (θ)}(m−1))  Estimation updating:







Gain


updating
:


K

(
m
)


=



Σ

(

m
-
1

)



h

(
m
)



1
+



h
T

(
m
)



Σ

(

m
-
1

)



h

(
m
)









Σ(m)=(I2−K(m)hT(m))Σ(m−1)  Covariance updating:


Where {circumflex over (θ)}(m) represents the estimated values of the clock parameters in the mth round, i.e., {circumflex over (θ)}(m)=[{circumflex over (α)}ij(m) {circumflex over (β)}ij(m)]T, h(m)=[τi(tmi) 1]T, K(m) represents a gain matrix in the mth round, Σ(m) represents a covariance matrix of the mth round of parameter estimation, and I2 is a second-order unit matrix. Thus it can be seen that, according to the skew estimation method based on sequential least squares, the node only needs to store the clock information of the current round of synchronization and the estimated information obtained from the previous round.


Further, in step S4, the logical clock parameters include: logical skew compensation and logical offset compensation.


The present invention has the following beneficial effects:

    • 1) In the present invention, bounded communication time delay subject to an arbitrary distribution type is considered, a clock information model is established based on a time delay relationship between nodes, and a relative skew is estimated by a sequential least squares method suitable for any distribution, therefore robustness of consensus-based clock synchronization against multiple types of time delay is improved.
    • 2) In the present invention, all clock information is processed directly based on a least squares principle, a cost function is built according to relationship of each pair of clock information, and a more accurate estimated value of relative skew is obtained by minimizing the cost function that contains all clock information, therefore convergence performance of consensus-based clock synchronization is effectively guaranteed.
    • 3) In the present invention, special consideration is taken to using the sequential least squares method to cope with the scenario that a node has a limited storage capacity and cannot store all the clock information recorded, relative clock relationship of nodes and iterable calculation characteristic of a standard least squares method are utilized, so that the node does not need to store all clock information received in each round of synchronization estimation, but only needs to store the clock information received in the current round of synchronization, relevant estimated values in the previous round of synchronization, and the covariance matrix calculated in the previous round, and storage and calculation overhead of the node can be effectively reduced on the premise of obtaining high-accuracy clock parameter estimations.


Other advantages, objectives and features of the present invention will be illustrated in the following description to some extent, and will be apparent to those skilled in the art based on the following investigation and research to some extent, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description.





DESCRIPTION OF THE DRAWINGS

To enable the purpose, the technical solution and the advantages of the present invention to be more clear, the present invention will be preferably described in detail below in combination with the drawings, wherein:



FIG. 1 is a diagram showing a communication topology of a distributed wireless sensor network;



FIG. 2 is a schematic diagram of clock synchronization information exchange between nodes under time delay;



FIG. 3 is a flow chart of a consistent synchronization method according to a skew estimation method based on sequential least squares in an embodiment.





DETAILED DESCRIPTION OF THE INVENTION

Embodiments of the present invention are described below through specific embodiments. Those skilled in the art can understand other advantages and effects of the present invention easily through the disclosure of the description. The present invention can also be implemented or applied through additional different specific embodiments. All details in the description can be modified or changed based on different perspectives and applications without departing from the spirit of the present invention. It should be noted that the figures provided in the following embodiments only exemplarily explain the basic conception of the present invention, and if there is no conflict, the following embodiments and the features in the embodiments can be mutually combined.


Referring to FIGS. 1-3, FIG. 1 is a diagram showing a communication topology of a distributed wireless sensor network considered in the present invention. As shown in FIG. 1, each sensor node randomly distributed in a network periodically broadcasts local clock information, and receives clock information broadcast by other nodes within a communication range thereof at the same time. A communication topology of the wireless sensor network can be represented as a strongly connected directed graph custom character(N,E), where N={1, 2, . . . , N} represents a set of senor nodes in the network, and E⊆N×N represents a set of reliable communication links. In addition, Ni={j|(i,j)∈E, i≠j} is used to represent a set of all neighbor nodes within a communication range of a node i, where (i,j)∈E represents that a node j can successfully receive clock synchronization information from the node i.



FIG. 2 represents a process of clock synchronization information exchange between nodes under time delay. The schematic diagram takes synchronization exchange of two adjacent nodes i and j on a local time scale and a real time scale as an example, the node i periodically transmits local clock information τi(tki) at an interval T, and the neighbor node j thereof receives the clock information from the node i, saves the information immediately and records a current local clock τj(tkid) thereof. For a kth round of clock information transmission, communication time delay between the nodes i and j is modeled as a difference between a sending moment tki of the node i on the real time scale and a receiving moment tkid of the node j on the real time scale:

dij(tkid)=tkid−tki


Where dij(tkid) is considered as a positive random variable with an upper bound of a fixed value Dd, and the upper bound is usually set to be a maximum measurable round-trip time. Thus, the neighbor node j establishes a relative relationship of a clock information pair {τi(tki), τj(tkid)} according to the time delay model:

τj(tkid)=αijτi(tki)+βijjdij(tkid)


Where αij and βij respectively represent a relative skew and a relative offset of the node i relative to the node j, and αj represents a local clock skew of the node j. In order to reduce influence of time delay on relative skew estimation, a time delay part in a formula of a clock relationship is regarded as an error function eij(tkid):

eij(tkid)=αjdij(tkid)=τj(tkid)−αijτi(tki)−βij


The error function is extended to n+1 pairs of clock information recorded, and a cost function J(αij, βij) can be obtained by using a standard least squares method to synchronously process corresponding errors of all the clock information:







J

(


α
ij

,

β
ij


)

=




k
=
0

n



(



τ
j

(

t
k
id

)

-


α
ij




τ
i

(

t
k
i

)


-

β
ij


)

2






Then is a process of minimizing the cost function to obtain estimated values of parameters, which is to obtain a partial derivative of J(αij, βij) with respect to unknown parameters αij and βij first, let an expression result of the partial derivative obtained be zero, and put two partial derivative equations and a periodic broadcast moment τi(tki)=kT together to obtain estimations {circumflex over (α)}ij and {circumflex over (β)}ij:









α
ˆ

ij

(
n
)

=



1

2





k
=
0

n


k



τ
j

(

t
k
id

)




-

6

n





k
=
0

n



τ
j

(

t
k
id

)





T


n

(

n
+
1

)



(

n
+
2

)












β
ˆ

ij

(
n
)

=






k
=
0

n



τ
j

(

t
k

j

d


)


-




α
ˆ

ij

(
n
)






k
=
0

n



τ
j

(

t
k
i

)





n
+
1






As all the recorded clock information is taken into account, the obtained relative skew estimation {circumflex over (α)}ij has a relatively high accuracy, which can effectively ensure convergence performance of a consensus-based clock synchronization algorithm in the presence of communication time delay when applied to the algorithm.


It can be seen from an expression of the relative skew estimation derived by the standard least squares method that the node needs to store all the recorded clock information for parameter estimation, and amount of calculation is relatively complicated. Obviously, as the number of rounds of synchronization increases, the amount of synchronization clock information received will increase; for a scenario that a sensor node has limited storage capacity and calculation capability and cannot store all the recorded clock information, it is necessary to take special consideration to reduce storage overhead and design a completely equivalent sequential least squares estimation method. As the cost function contains two parameters which need to be estimated, at least two pieces of clock information are needed as initialization points of estimation; at the same time, the parameters to be estimated are denoted as a vector θ=[αij βij]T for the convenience of using during sequential least squares estimation. In a first round of synchronization, the node j needs to record two pieces of clock information {τi(t0i), τj(t0id)} and {τi(t1i), τj(t1id)}, then the obtained expressions {circumflex over (α)}ij(n) and {circumflex over (β)}ij(n) are processed by the standard least squares method, and estimated values of the parameters in the first round of synchronization can be calculated:








θ
^

(
1
)

=


[





τ
j

(

t
1
id

)

-


τ
j

(

t
0
id

)


T





τ
j

(

t
0
id

)


]

T





Where {circumflex over (θ)}(1)[{circumflex over (α)}ij(1) {circumflex over (β)}ij(1)]T represents the estimated values of the clock parameters in the first round. Whereas in a mth (m=2, 3, 4, . . . , n) round of synchronization, the node j only needs to store clock information {τi(tmi), τj(tmid)} received in the current round, estimated values {circumflex over (α)}ij(m−1) and {circumflex over (β)}ij(m−1) calculated in a previous round, and a covariance matrix used in an iterative estimation process, and a relative skew and a relative offset in the current round are iteratively estimated by the sequential least squares method:

{circumflex over (θ)}(m)={circumflex over (θ)}(m−1)+K(m)(τj(tmid)−hT(m){circumflex over (θ)}(m−1))  Estimation updating:







Gain


updating
:


K

(
m
)


=



Σ

(

m
-
1

)



h

(
m
)



1
+



h
T

(
m
)



Σ

(

m
-
1

)



h

(
m
)









Σ(n)=(I2−K(n)hT(n))Σ(n−1)  Covariance updating:


Where {circumflex over (θ)}(m)=[{circumflex over (α)}ij(m) {circumflex over (β)}ij(m)]T represents the estimated values of the clock parameters in the mth round, h(m)=[τi(tmi) 1]T, K(m) represents a gain matrix in the mth round, τ(m) represents a covariance matrix of the mth round of parameter estimation, and I2 is a second-order unit matrix. In addition, to start a process of iteratively estimating clock parameters, a covariance matrix in the first round is given as τ(1)=(HT(1)H(1))−1, where H(1)=[h(0) h(1)]T. Thus it can be seen obviously that, when the relative skew is estimated by the sequential least squares method, the node only needs to store a small amount of clock information and relevant iteration information.


Embodiment 1


FIG. 3 is a flow chart of a consistent clock synchronization skew estimation method based on sequential least squares in an embodiment. This embodiment provides a relative skew estimation method based on sequential least squares used for average consensus synchronization, as shown in FIG. 3, specifically comprising following steps:

    • m1: Starting a clock synchronization process.
    • m2-m4: Initializing clock synchronization parameters including a relative skew and a relative offset, setting a synchronization broadcast cycle, determining, by a node, whether a periodic broadcast condition is met, if so, broadcasting clock synchronization messages thereof, otherwise waiting until the broadcast condition is met.
    • m5-m6: Receiving, by a neighbor node, synchronization clock information, recording a local clock value thereof at a receiving moment, and establishing a relative clock relationship between nodes in the presence of communication time delay by the clock information of the current round.
    • m7: Processing a time delay part in the clock relationship by the neighbor node, and building an error function and a cost function by minimizing influence of time delay on relative skew estimation.
    • m8: In case of a first round of synchronization, estimating, by the node, the relative skew and the relative offset in the first round of synchronization according to the cost function and the recorded clock information, and calculating a covariance matrix in the first round of synchronization iteration; in case of a (m>1)th round of synchronization, iteratively estimating, by the node, the relative skew in the current round of synchronization using a sequential least squares method according to the clock information received in the current round and the estimated information stored in a previous round of synchronization.
    • m9: Updating logical clock parameter compensation, mainly including logical skew compensation and logical offset compensation, by a synchronization protocol based on average consensus.
    • m10-m11: Judging whether a synchronization termination condition is met by logical clocks of all nodes in a network, including whether a logical skew error is consensus, whether a logical offset error is maintained within a relatively low range, and whether a logical clock error is within an acceptable range; ending if a desired synchronization effect is achieved; otherwise, monitoring clock synchronization information, and updating the synchronization processes such as relative skew estimation and logical clock parameter compensation, until the synchronization termination condition is met.


After the relative skew between nodes is estimated, applying the relative offset to a consensus synchronization method to compensate logical clock parameters of nodes, such as skew compensation and offset compensation based on an average consensus protocol. Periodically repeating the processes of relative skew estimation, logical offset compensation and logical offset compensation until the logical clocks of all nodes in a distributed network are synchronized.


Finally, it should be noted that the above embodiments are only used for describing, rather than limiting the technical solution of the present invention. Although the present invention is described in detail with reference to the preferred embodiments, those ordinary skilled in the art shall understand that the technical solution of the present invention can be amended or equivalently replaced without departing from the purpose and the scope of the technical solution. The amendment or equivalent replacement shall be covered within the scope of the claims of the present invention.

Claims
  • 1. A consensus-based clock synchronization relative skew estimation method based on sequential least squares, characterized in that the method specifically comprises following steps: S1: establishing a relationship model of clock information and time delay between nodes with respect to a bounded random communication time delay scenario subject to arbitrary distribution;S2: establishing a relative relationship of any set of local clock information according to a communication time delay relationship;S3: building a clock parameter estimation model and a cost function based on a least squares principle according to the relative relationship of the clock information;S4: iteratively estimating relative clock skew by a sequential least squares method, and updating logical clock parameters of nodes by an consensus-based clock synchronization method; after the relative skews between nodes are estimated, periodically repeating operations of estimating a relative skew and updating logical clock parameters until logical clocks of the nodes in an entire network are synchronized.
  • 2. The consensus-based clock synchronization skew estimation method as claimed in claim 1, characterized in that: in step S1, a relationship model of clock information and time delay between nodes is established, specifically comprising: assuming that any sensor node i in a network periodically broadcasts a local clock τi(tki) and relevant synchronization clock information at an interval T, and a neighbor node j thereof receives and records a local clock τj(tkid) thereof at a receiving moment to obtain a communication time delay relationship between nodes under real time scale: dij(tkid)=tkid−tki where dij(tkid) represents random communication time delay subject to arbitrary distribution, which is non-negative and has an upper bound of constant Dd.
  • 3. The consensus-based clock synchronization skew estimation method as claimed in claim 2, characterized in that: in step S2, a relative relationship of any set of local clock information is established according to a communication time delay relationship, specifically comprising: after the neighbor node j receives n+1 pieces of synchronization clock information from the node i, obtaining n+1 sets of local clock observed values {τi(tki), τj(tkid)}k=0n, and establishing the relative relationship of any set of local clock information according to the communication time delay relationship: τj(tkid)=αijτi(tki)+βijαjdij(tkid)where αij and βij respectively represent a relative skew and a relative offset of the node i relative to the node j, and αj represents a local clock skew of the node j.
  • 4. The consensus-based clock synchronization skew estimation method as claimed in claim 3, characterized in that: in step S3, a clock parameter estimation model and a cost function based on a least squares principle are built, specifically comprising: processing communication time delay items according to the relative relationship of the clock information, and considering a time delay part in a formula of the relative relationship of the local clock information as an error function: eij(tkid)=τj(tkid)−αijτi(tki)−βij extending the error function to all local clock observations, and then processing an error by a least squares principle, so as to obtain the following cost function J(αij, βij) containing the clock parameters αij and βij:
  • 5. The consensus-based clock synchronization skew estimation method as claimed in claim 4, characterized in that: in step S4, a relative clock skew is iteratively estimated by a sequential least squares method, specifically comprising following steps: S41: in a first round of synchronization, receiving and storing, by the node j, two sets of clock information {τi(t0i), τj(t0id)} and {τi(t1i), τj(t1id)}, and obtaining estimated values {circumflex over (α)}ij(1) and {circumflex over (β)}ij(1) in the first round of synchronization directly by a standard least squares method:
  • 6. The consensus-based clock synchronization skew estimation method as claimed in claim 1, characterized in that: in step S4, the logical clock parameters include: logical skew compensation and logical offset compensation.
Priority Claims (1)
Number Date Country Kind
202110506223.5 May 2021 CN national
PCT Information
Filing Document Filing Date Country Kind
PCT/CN2021/099979 6/15/2021 WO
Publishing Document Publishing Date Country Kind
WO2022/236916 11/17/2022 WO A
US Referenced Citations (2)
Number Name Date Kind
20160330012 Liu Nov 2016 A1
20170286675 Shin Oct 2017 A1
Related Publications (1)
Number Date Country
20240163821 A1 May 2024 US