TIMESTAMP-FREE SYNCHRONIZATION CLOCK PARAMETER TRACKING METHOD BASED ON EXTENDED KALMAN FILTER

Information

  • Patent Application
  • 20240201728
  • Publication Number
    20240201728
  • Date Filed
    February 18, 2022
    2 years ago
  • Date Published
    June 20, 2024
    6 months ago
Abstract
The present invention relates to a timestamp-free synchronization clock parameter tracking method based on extended Kalman filter, and belongs to the technical field of wireless sensor networks. With a first order Gauss Markov model and a clock model as a state equation, evolution processes of clock skew and instantaneous clock offset is described. Then an observation equation constituted by observation models of timestamp-free synchronization and instantaneous clock offset is established, and clock skew and instantaneous clock offset are jointly tracked by a tracking method based on extended Kalman filter to realize synchronization between a node to be synchronized and a reference clock node. The method can track two time-varying parameters simultaneously by following a network data flow without needing a dedicated synchronization frame to exchange synchronization information, which reduces energy consumption and improves synchronization precision.
Description
FIELD OF INVENTION

The present invention belongs to the technical field of wireless sensor networks, and relates to a timestamp-free synchronization clock parameter tracking method based on extended Kalman filter.


BACKGROUND ART OF THE INVENTION

Because of the advantages such as low power consumption, easy deployment and low price, wireless sensor networks have been widely used, for example, for target tracking, data fusion and deterministic scheduling. The applications require nodes in networks to run on the same time reference, so the time synchronization technology is an important support technology for wireless sensor networks.


Timestamp-free synchronization is a low power synchronization mechanism that can realize synchronization between nodes without the need of exchanging timestamps. Because no time information is transmitted during synchronization and the synchronization function is easy to embed in a network data flow, the synchronization mechanism has received extensive attention. Most of the current timestamp-free synchronization methods are designed based on the assumption that the clock skew parameter remains unchanged, but the clock skew of wireless sensor nodes is nonlinearly time-varying due to the influence of factors such as external environment and life of crystal oscillator. Although some schemes can track the clock skew parameter of timestamp-free synchronization, the estimation of the instantaneous clock offset parameter cannot be realized, which restricts the application of timestamp-free synchronization in actual wireless sensor networks.


DISCLOSURE OF THE INVENTION

In view of this, the purpose of the present invention is to provide a timestamp-free synchronization clock parameter tracking method based on extended Kalman filter. A first order Gauss Markov model and a clock model are used to model time-varying clock offset and skew, and a tracking method based on extended Kalman filter is used to realize joint tracking of timestamp-free synchronization instantaneous clock offset and clock skew. The whole tracking process follows a network data flow without needing a dedicated synchronization frame to transmit timestamp information. A node to be synchronized can realize long-term synchronization with a reference clock node according to the recorded timestamp and the known response time, which saves communication bandwidth and energy and improves synchronization precision.


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


A timestamp-free synchronization clock parameter tracking method based on extended Kalman filter, comprising the following steps:

    • S1: with time-varying parameter models as a state equation, describing evolution processes of clock skew and instantaneous clock offset, wherein the time-varying parameter models are a first order Gauss Markov model and a clock model;
    • S2: establishing an observation equation, and jointly tracking clock skew and instantaneous clock offset by a tracking method based on extended Kalman filter to realize synchronization between a node to be synchronized and a reference clock node, wherein the observation equation is constituted by observation models of timestamp-free synchronization and instantaneous clock offset.


Further, for the state equation in step S1, dynamically changing clock skew is considered as a random variable of which the characteristics are described with the first order Gauss Markov model, and the specific formula is as follows:





ρ[n]=mρ[n−1]+u[n]


wherein ρ[n] represents the clock skew of the node to be synchronized relative to the reference clock node at the nth sampling moment; m represents a coefficient less than and close to 1 and is assumed to be known; and u[n] represents Gaussian driving noise with the mean value of 0 and the variance of σu2;


The clock model is used to describe instantaneous clock offset, and the specific formula is as follows:





θ[n]=θ[n−1]+ρ[n]τ[n]


wherein θ[n] represents the clock offset of the node to be synchronized relative to the reference clock node at the nth sampling moment; and τ[n] represents the sampling interval of a nth sample and is assumed to be a fixed value, i.e., τ[n]=τ0;


The formulas of instantaneous clock offset and clock skew are combined to constitute a matrix form, thus obtaining a state equation as follows:






x[n]=Ax[n−1]+u[n]










wherein



x
[
n
]


=

[




θ
[
n
]






ρ
[
n
]




]


,

A
=



[



1



m


τ
0






0


m



]



and



u
[
n
]


=


[





τ
0



u
[
n
]







u
[
n
]




]

.








Further, the step of establishing an observation equation in step S2 is as follows:


S21: in the ith synchronization round, carrying out timestamp-free exchange between the node to be synchronized and the reference clock node, with the general synchronization formula as follows:





Δi=(1+ρi)[(T4,i−T1,i)−2δ−(νii)]


wherein Δi is the response time of the reference clock node, T1,i and T4,i respectively represent the time for the node to be synchronized to send data packets and the time for the node to be synchronized to receive data packets, δ is a fixed delay of message transmission between two nodes, and νi and ωi are random delays of uplink and downlink during message transmission and modeled as Gaussian distribution with the mean value of 0 and the variances of ε2 and σ2;

    • S22: repeating step S21, subtracting the general formula of the ith round from the general formula of the i+1th round, and assuming clock skew to be unchanged for two consecutive rounds, i.e., ρi+1i, wherein i is an odd number, and the observation model of timestamp-free synchronization is obtained as follows:










Δ

i
+
1


-

Δ
i





Δ
j






=



(

1
+

ρ
i


)

[





S

i
+
1


-

S
i





S
j






-





w

i
+
1


-

w
i







w
j









]




(

















)







wherein









j
=


i
+
1

2


,





i is an odd number, Si=T4,i−T1,i, and wiii;

    • S23: after sampling, obtaining the discrete observation model of timestamp-free synchronization of the node to be synchronized as follows:










S








[
n
]

=



1

1
+


ρ

(
AR
)


[
n
]






Δ


[
n
]


+


w








[
n
]







wherein S′[n] is an observed value at the nth sampling moment, ρ[n] represents clock skew at the nth sampling moment, w′[n] represents observation noise at the nth sampling moment, and Δ′[n]=Δi+1−Δi;

    • S24: the observed value of instantaneous clock offset is comprised of a true value and noise, instantaneous clock offset in the state equation is the true value, and the observation model of instantaneous clock offset is written as: {tilde over (θ)}[n]=θ[n]+υ[n], wherein {tilde over (θ)}[n] is an observed value of instantaneous clock offset, and υ[n] represents Gaussian observation noise with the mean value of 0 and the variance of συ2;


Combining the discrete observation model of timestamp-free synchronization and the observation model of instantaneous clock offset, thus obtaining an observation equation as follows:










R
[
n
]

=



h

(

x
[
n
]

)

+


W
[
n
]



wherein



R
[
n
]



=

[





θ
~

[
n
]







S








[
n
]




]



,











h

(

x
[
n
]

)

=



[




θ
[
n
]








Δ


[
n
]


1
+

ρ
[
n
]






]



and



W
[
n
]


=

[




υ
[
n
]







w








[
n
]




]



;







    • S25: the observed value in the observation equation and a state value of clock skew between nodes have nonlinear relation, so clock parameters are tracked by extended Kalman filter rather than ordinary Kalman filter, the observation equation is linearized before the use of the tracking method based on extended Kalman filter, and the specific steps are as follows

    • S251: carrying out first order Taylor series expansion of













h

(

x
[
n
]

)

=

[




θ
[
n
]








Δ


[
n
]


1
+

ρ
[
n
]






]


;













h

(

x
[
n
]

)




h
(



x
^

[

n




"\[LeftBracketingBar]"


n
-
1



]


)

+



h




x
[
n
]







"\[RightBracketingBar]"




x
[
n
]

=


x
^

[

n




"\[LeftBracketingBar]"


n
-
1



]





(


x
[
n
]

-


x
^

[

n




"\[LeftBracketingBar]"


n
-
1



]


)








    • S252: respectively taking derivatives of θ[n] and ρ[n] by h(x[n]), and solving a Jacobi matrix as follows:













H
[
n
]

=




h




x
[
n
]



=

[



1


0




0




-


Δ


[
n
]




(

1
+

ρ
[
n
]


)

2





]





"\[RightBracketingBar]"




x
[
n
]

=


x
^

[

n




"\[LeftBracketingBar]"


n
-
1



]








    • S253: rewriting the observation equation as follows:









R[n]=H[n]x[n]+W[n]+(h({circumflex over (x)}[n|n−1])−H[n]{circumflex over (x)}[n|n−1]).


Further, the step of jointly tracking clock skew and instantaneous clock offset by a tracking method based on extended Kalman filter in step S2 specifically comprises:


Recording a timestamp of timestamp-free exchange by the node to be synchronized, calculating an observed value according to the timestamp, and jointly tracking instantaneous clock offset and clock skew by the tracking method based on extended Kalman filter in combination with predicted values of state models of clock skew and offset, wherein the formula of extended Kalman filter is as follows:





Prediction: {circumflex over (x)}[n|n−1]=A{circumflex over (x)}[n−1|n−1]





Predicted minimum mean square error: M[n|n−1]=AM[n−1|n−1]AT+Cs


Kalman Gain:








K
[
n
]

=



M
[

n




"\[LeftBracketingBar]"


n
-
1



]




H





T


[
n
]




C
o

+


H
[
n
]



M
[

n




"\[LeftBracketingBar]"


n
-
1



]




H





T


[
n
]










Correction: {circumflex over (x)}[n|n]={circumflex over (x)}[n|n−1]+K[n](R[n]−h({circumflex over (x)}[n|n−1]))





Minimum mean square error: M[n|n]=(I−K[n]H[n])M[n|n−1]


wherein {circumflex over (x)}[n|n−1] represents a predicted value matrix of instantaneous clock offset and clock skew at the nth sampling moment, A is an update coefficient matrix, M[n|n−1] represents a predicted minimum mean square error matrix at the nth sampling moment,









C
s

=

[





τ
0





2




σ
u





2







τ
0



σ
u





2









τ
0



σ
u





2





0



]






represents a covariance matrix of driving noise, K[n] represents a Kalman gain matrix at the nth sampling moment, H[n] represents a Jacobi matrix at the nth sampling moment,









C
o

=

[




σ
υ





2




0




0



σ

ω













2





]






is a covariance matrix of observation noise, {circumflex over (x)}[n|n] represents a corrected value matrix of corrected instantaneous clock offset and clock skew at the nth sampling moment, R[n] represents an observed value matrix at the nth sampling moment, h({circumflex over (x)}[n|n−1]) represents a transformation matrix from state variables to ideal observation of instantaneous clock offset and clock skew at the nth sampling moment, and M[n|n] represents a corrected minimum mean square error matrix at the nth sampling moment.


Further, the joint tracking method of clock skew and instantaneous clock offset of sensor nodes based on extended Kalman filter for timestamp-free exchange comprises the following specific steps:

    • D1: starting a clock parameter tracking process;
    • D2: initializing an extended Kalman filter;
    • D3: carrying out timestamp-free exchange between the node to be synchronized and the reference clock node, and recording the respective time to receive and send data packets;
    • D4: judging whether the number of synchronization rounds is an odd number; if yes, entering flow D5; otherwise, entering flow D6;
    • D5: increasing the number of synchronization rounds by 1, and entering flow D3;
    • D6: calculating the observed value R[n] and the observation matrix H[n] according to the timestamp information and the known response time by the node to be synchronized, predicting a first parameter state vector {circumflex over (x)}[n|n−1] at moment n based on values of clock skew and offset at moment n−1 according to the state equation, and finally calculating the predicted minimum mean square error;
    • D7: calculating Kalman gain according to the observation matrix H[n];
    • D8: calculating corrected values and minimum mean square errors of instantaneous clock offset and clock skew at moment n according to Kalman gain and the observed value R[n];
    • D9: judging whether the number of synchronization rounds reaches a predicted value; if no, entering flow D10; otherwise, entering flow D11;
    • D10: increasing the number of synchronization rounds by 1, and entering flow D3;
    • D11: ending the tracking process of instantaneous clock offset and dynamic clock skew.


The present invention has the following beneficial effects:

    • 1) In the clock parameter tracking process of the present invention, no dedicated synchronization frame is required to exchange timestamp information, the node to be synchronized tracks clock parameters by recording timestamps for receiving and sending data packets, and the synchronization function can be embedded into the existing network flow, which avoids waste of communication bandwidth and reduces energy consumption.
    • 2) Considering dynamic changes of clock offset and skew caused by facts that clock offset and skew cannot be tracked simultaneously in the scenario of timestamp-free synchronization and that node crystal oscillators cannot operate at a stable frequency, the present invention adopts the tracking method based on extended Kalman filter to realize joint tracking of timestamp-free synchronization instantaneous clock offset and clock skew, which improves synchronization precision between nodes and reduces resynchronization frequency.


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 schematic diagram of timestamp-free synchronization of a node to be synchronized and a reference clock node of the present invention;



FIG. 2 is a flow chart of a timestamp-free synchronization clock parameter tracking method based on extended Kalman filter of the present invention;



FIG. 3 is an effect diagram of timestamp-free synchronization instantaneous clock offset tracking based on extended Kalman filter of the present invention;



FIG. 4 is an effect diagram of timestamp-free synchronization clock skew tracking based on extended Kalman filter of the present invention;



FIG. 5 is a performance comparison chart of a timestamp-free synchronization instantaneous clock offset tracking method based on extended Kalman filter of the present invention;



FIG. 6 is a performance comparison chart of a timestamp-free synchronization clock skew tracking method based on extended Kalman filter of the present invention.





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.


Wherein the drawings are only used for exemplary description, are only schematic diagrams rather than physical diagrams, and shall not be understood as a limitation to the present invention. In order to better illustrate the embodiments of the present invention, some components in the drawings may be omitted, scaled up or scaled down, and do not reflect actual product sizes. It should be understandable for those skilled in the art that some well-known structures and description thereof in the drawings may be omitted.


Same or similar reference numerals in the drawings of the embodiments of the present invention refer to same or similar components. It should be understood in the description of the present invention that terms such as “upper”, “lower”, “left”, “right”, “front” and “back” indicate direction or position relationships shown based on the drawings, and are only intended to facilitate the description of the present invention and the simplification of the description rather than to indicate or imply that the indicated device or element must have a specific direction or constructed and operated in a specific direction, and therefore, the terms describing position relationships in the drawings are only used for exemplary description and shall not be understood as a limitation to the present invention; for those ordinary skilled in the art, the meanings of the above terms may be understood according to specific conditions.


With reference to FIG. 1-FIG. 6, FIG. 1 is a schematic diagram of timestamp-free synchronization provided by the present invention, wherein the node R is a reference clock node providing reference time, the node A is a node to be synchronized, which is synchronized with the node R through timestamp-free exchange, and the specific steps are as follows:


In the ith synchronization round, the node A to be synchronized sends data packets containing no timestamp information to the reference clock node R and records the time as T1,j(A), the time when the reference clock node R receives the data packets is recorded as T2,i, and the implementation model of T2,i can be expressed as follows:






T
2,i
=T
1,ii+δ+ωii(T1,i−T1,1+δ+νi)  (1)


wherein θi and ρi respectively represent clock offset and skew between the node A and the node R, δ is a fixed delay in the data packet transmission process, and νi is a random delay in the data packet transmission process and is modeled as independent Gaussian distribution with the mean value of 0 and the variance of ε2.


The reference clock node R waits for a period of fixed response time Δi after receiving the data packets and returns the data packets containing no timestamp at moment T3,i, the node A receives the data packets at moment T4,i, and the implementation model of T3,i can be expressed as follows:






T
3,i
=T
4,ii−δ−ωii(T4,i−T1,1−δ−ωi)  (2)


wherein δ and ωi are respectively a fixed delay and a random delay in the data packet transmission process, and the random delay is modeled as independent Gaussian distribution with the mean value of 0 and the variance of σ2. Formula (1) is subtracted from formula (2) to obtain a general formula as follows:





Δi=(1+ρi)[(T4,i−T1,i)−2δ−(νii)]  (3)


The general formula of the ith round is subtracted from the general formula of the i+1th round, and clock skew is assumed to be unchanged for two consecutive rounds, i.e., ρi+1i, wherein i is an odd number. The observation model of timestamp-free synchronization is obtained as follows:















Δ

i
+
1


-

Δ
i





Δ
j






=



(

1
+

ρ
i


)

[





S

i
+
1


-

S
i





S
j






-





w

i
+
1


-

w
i







W
j





]




(

















)







(
4
)








wherein









j
=


i
+
1

2


,





i is an odd number, Si=T4,i−T1,i, and wiii.


After sampling, the discrete observation model of timestamp-free synchronization of the node to be synchronized A as follows:













S








[
n
]

=



1

1
+

ρ
[
n
]






Δ


[
n
]


+

W
[
n
]






(
5
)








wherein S′[n] is an observed value at the nth sampling moment, ρ[n] represents clock skew at the nth sampling moment, W[n] represents observation noise at the nth sampling moment of the mean value, and Δ′[n]=Δi+1−Δi.


The observed value of instantaneous clock offset is comprised of a true value and noise, offset in the state equation is the true value, and the observation model of instantaneous clock offset can be written as: {tilde over (θ)}[n]=θ[n]+υ[n], wherein {tilde over (θ)}[n] is an observed value of offset, and υ[n] represents Gaussian observation noise with the mean value of 0 and the variance of συ2. The discrete observation model of timestamp-free synchronization and the observation model of instantaneous clock offset are combined, thus obtaining an observation equation as follows:










R
[
n
]

=


h

(

x
[
n
]

)

+

W
[
n
]






(
6
)








wherein







R
[
n
]

=

[





θ
~

[
n
]







S


[
n
]




]


,


h

(

x
[
n
]

)

=

[





θ
[
n
]







Δ


[
n
]





1
+

ρ
[
n
]



]


,





and






W
[
n
]

=


[




υ
[
n
]







ω


[
n
]




]

.





The observed value in the observation equation and a state value of clock skew between nodes have nonlinear relation, so clock parameters are tracked by extended Kalman filter rather than ordinary Kalman filter, the observation equation needs to be linearized before the use of the tracking method based on extended Kalman filter, and the specific steps are as follows:

    • (1): Carrying out first order Taylor series expansion of











h

(

x
[
n
]

)

=

[





θ
[
n
]







Δ


[
n
]





1
+

ρ
[
n
]



]


;




(
7
)











h

(

x
[
n
]

)




h

(


x
ˆ

[

n




"\[LeftBracketingBar]"


n
-
1



]

)

+



h




x
[
n
]






|



x
[
n
]

=


x
^

[

n




"\[LeftBracketingBar]"


n
-
1



]










(


x
[
n
]

-


x
ˆ

[

n




"\[LeftBracketingBar]"


n
-
1



]


)






    • (2): Respectively taking derivatives of θ[n] and ρ[n] by h(x[n]), and solving a Jacobi matrix as follows













H
[
n
]

=




h




x
[
n
]



=


[



1


0




0




-


Δ


[
n
]




(

1
+

ρ
[
n
]


)

2





]



|



x
[
n
]

=


x
^

[

n




"\[LeftBracketingBar]"


n
-
1



]










(
8
)









    • (3): Rewriting the observation equation as follows:









R[n]=H[n]x[n]+W[n]+(h({circumflex over (x)}[n|n−1])−H[n]{circumflex over (x)}[n|n−1])  (9)


Due to the nonlinearity of a crystal oscillator and the influence of phase noise as well as external environment (temperature, humidity, pressure intensity, etc.), clock skew will change randomly with time. To accurately reflect the change of clock skew, the present invention considers clock skew as a random variable and models the variable by the first order Gauss Markov model, and the specific model is as follows:





ρ[n]=mρ[n−1]+u[n]  (10)


wherein ρ[n] represents the clock skew of the node A to be synchronized relative to the reference clock node R at the nth sampling moment; m represents a coefficient less than and close to 1 and is considered known; and u[n] represents Gaussian driving noise with the mean value of 0 and the variance of σu2.


The clock model is used to describe instantaneous clock offset, and the specific model is as follows:





θ[n]=θ[n−1]+ρ[n]τ[n]  (11)


wherein θ[n] represents the clock offset of the node A to be synchronized relative to the reference clock node R at the nth sampling moment; and τ[n] represents the sampling interval of a nth sample and is assumed to be a fixed value, i.e., τ[n]=τ0.


The models of clock skew and offset are combined to constitute a matrix form, thus obtaining a state equation as follows:










x
[
n
]

=


A


x
[

n
-
1

]


+

u
[
n
]






(
12
)








wherein







x
[
n
]

=

[




θ
[
n
]






ρ
[
n
]




]


,






A
=

[



l



m


τ
0






0


m



]






and






u
[
n
]

=


[





τ
0



u
[
n
]







u
[
n
]




]

.





Based on the state equation (12) and the observation equation (9), the present invention uses the tracking method based on extended Kalman filter to jointly track clock skew and offset parameters, and the specific formula is as follows:





Prediction: {circumflex over (x)}[n|n−1]=A{circumflex over (x)}[n−1|n−1]  (13)





Predicted minimum mean square error: M[n|n−1]=AM[n−1|n−1]AT+Cs  (14)


Kalman Gain:









K
[
n
]

=



M
[

n




"\[LeftBracketingBar]"


n
-
1



]




H
T

[
n
]




C
0

+


H
[
n
]



M
[

n




"\[LeftBracketingBar]"


n
-
1



]




H
T

[
n
]








(
15
)








Correction: {circumflex over (x)}[n|n]={circumflex over (x)}[n|n−1]+K[n](R[n]−h({circumflex over (x)}[n|n−1]))  (16)





Minimum mean square error: M[n|n]=(I−K[n]H[n])M[n|n−1]  (17)


In order to verify the effectiveness of the timestamp-free synchronization clock parameter tracking method based on extended Kalman filter provided by the present invention, posterior Cramer-Rao Bounds (PCRBs) of clock skew and instantaneous clock offset are calculated according to the state equation and the observation equation.





var(ρ)≥J[n]11−1  (18)





var(θ)≥J[n]22−1  (19)





wherein:






J[n+1]=(Cs+AJ[n]−1AT)−1+Ex[n+1]{H[n+1]C0−1H[n+1]}  (20)


Embodiment


FIG. 2 is a flow chart of a timestamp-free synchronization time-varying clock parameter tracking method provided by the embodiment of the present invention. The present embodiment provides a joint tracking method of clock skew and instantaneous clock offset of sensor nodes based on extended Kalman filter for timestamp-free exchange, as shown in FIG. 2, comprising the following specific steps:

    • D1: starting a clock parameter tracking process;
    • D2: initializing an extended Kalman filter;
    • D3: carrying out timestamp-free exchange between the node to be synchronized and the reference clock node, and recording the respective time to receive and send data packets;
    • D4: judging whether the number of synchronization rounds is an odd number; if yes, entering flow D5; otherwise, entering flow D6;
    • D5: increasing the number of synchronization rounds by 1, and entering flow D3;
    • D6: calculating the observed value R[n] and the observation matrix H[n] according to the timestamp information and the known response time by the node to be synchronized, predicting a first parameter state vector {circumflex over (x)}[n|n−1] at moment n based on values of clock skew and offset at moment n−1 according to the state equation, and finally calculating the predicted minimum mean square error;
    • D7: calculating Kalman gain according to the observation matrix H[n];
    • D8: calculating corrected values and minimum mean square errors of instantaneous clock offset and clock skew at moment n according to Kalman gain and the observed value R[n];
    • D9: judging whether the number of synchronization rounds reaches a predicted value; if no, entering flow D10; otherwise, entering flow D11;
    • D10: increasing the number of synchronization rounds by 1, and entering flow D3;
    • D11: ending the tracking process of instantaneous clock offset and dynamic clock skew.



FIG. 3-FIG. 6 show diagrams of effects and performance comparison of timestamp-free synchronization clock parameter tracking based on extended Kalman filter provided by the present invention. It can be known from FIG. 3 and FIG. 4 that the tracking method based on extended Kalman filter can effectively track true values of time-varying clock skew and offset in the scenario of timestamp-free synchronization, which proves the reliability of the clock parameter tracking method provided by the present invention. It can be known from FIG. 5 and FIG. 6 that the performance of the tracking method of instantaneous clock offset and clock skew provided by the present invention can reach PCRB.


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 timestamp-free synchronization clock parameter tracking method based on extended Kalman filter, characterized by comprising the following steps: S1: with time-varying parameter models as a state equation, describing evolution processes of clock skew and instantaneous clock offset, wherein the time-varying parameter models are a first order Gauss Markov model and an iterative model of instantaneous clock offset;S2: establishing an observation equation, and jointly tracking clock skew and instantaneous clock offset by a tracking method based on extended Kalman filter to realize synchronization between a node to be synchronized and a reference clock node, wherein the observation equation is constituted by observation models of timestamp-free synchronization and instantaneous clock offset.
  • 2. The timestamp-free synchronization clock parameter tracking method based on extended Kalman filter as claimed in claim 1, characterized in that: for the state equation in step S1, dynamically changing clock skew is considered as a random variable of which the characteristics are described with the first order Gauss Markov model, and the specific formula is as follows: ρ[n]=mρ[n−1]+u[n]wherein ρ[n] represents the clock skew of the node to be synchronized relative to the reference clock node at the nth sampling moment; m represents a coefficient less than and close to 1 and is assumed to be known; and u[n] represents Gaussian driving noise with the mean value of 0 and the variance of σu2;the clock model is used to describe instantaneous clock offset, and the specific formula is as follows: θ[n]=θ[n−1]+ρ[n]τ[n]wherein θ[n] represents the clock offset of the node to be synchronized relative to the reference clock node at the nth sampling moment; and τ[n] represents the sampling interval of a nth sample and is assumed to be a fixed value, i.e., τ[n]=τ0;the formulas of instantaneous clock offset and clock skew are combined to constitute a matrix form, thus obtaining a state equation as follows:
  • 3. The timestamp-free synchronization clock parameter tracking method based on extended Kalman filter as claimed in claim 1, characterized in that: the steps of establishing the observation equation in step S2 are as follows: S21: in the ith synchronization round, carrying out timestamp-free exchange between the node to be synchronized and the reference clock node, with the general synchronization formula as follows: Δi=(1+ρi)[(T4,i−T1,i)−2δ−(νi+ωi)]wherein Δi is the response time of the reference clock node, T1,i and T4,i respectively represent the time for the node to be synchronized to send data packets and the time for the node to be synchronized to receive data packets, δ is a fixed delay of message transmission between two nodes, and νi and ωi are random delays of unlink and downlink during message transmission and modeled as Gaussian distribution with the mean value of 0 and the variances of ε2 and σ2;S22: repeating step S21, subtracting the general formula of the ith round from the general formula of the i+1th round, and assuming clock skew to be unchanged for two consecutive rounds, i.e., ρi+1+ρi, wherein i is an odd number, and the observation model of timestamp-free synchronization is obtained as follows
  • 4. The timestamp-free synchronization clock parameter tracking method based on extended Kalman filter as claimed in claim 3, characterized in that: the step of jointly tracking clock skew and instantaneous clock offset by a tracking method based on extended Kalman filter in step S2 specifically comprises: recording a timestamp of timestamp-free exchange by the node to be synchronized, calculating an observed value according to the timestamp, and jointly tracking instantaneous clock offset and clock skew by the tracking method based on extended Kalman filter in combination with predicted values of state models of clock skew and offset, wherein the formula of extended Kalman filter is as follows: Prediction: {circumflex over (x)}[n|n−1]=A{circumflex over (x)}[n−1|n−1]Predicted minimum mean square error: M[n|n−1]=AM[n−1|n−1]AT+Cs Kalman Gain: K[n]=M[n|n-1]⁢HT[n]Co+H[n]⁢M[n|n-1]⁢HT[n]Correction: {circumflex over (x)}[n|n]={circumflex over (x)}[n|n−1]+K[n](R[n]−h({circumflex over (x)}[n|n−1]))Minimum mean square error: M[n|n]=(I−K[n]H[n])M[n|n−1]wherein {circumflex over (x)}[n|n−1] represents a predicted value matrix of instantaneous clock offset and clock skew at the nth sampling moment, A is an update coefficient matrix, M[n|n−1] represents a predicted minimum mean square error matrix at the nth sampling moment,
  • 5. The timestamp-free synchronization clock parameter tracking method based on extended Kalman filter as claimed in any one of claims 1-4, characterized in that: the method comprises the following specific steps: D1: starting a clock parameter tracking process;D2: initializing an extended Kalman filter;D3: carrying out timestamp-free exchange between the node to be synchronized and the reference clock node, and recording the respective time to receive and send data packets;D4: judging whether the number of synchronization rounds is an odd number; if yes, entering flow D5; otherwise, entering flow D6;D5: increasing the number of synchronization rounds by 1, and entering flow D3;D6: calculating the observed value R[n] and the observation matrix H[n] according to the timestamp information and the known response time by the node to be synchronized, predicting a first parameter state vector {circumflex over (x)}[n|n−1] at moment n based on values of clock skew and offset at moment n−1 according to the state equation, and finally calculating the predicted minimum mean square error;D7: calculating Kalman gain according to the observation matrix H[n];D8: calculating corrected values and minimum mean square errors of instantaneous clock offset and clock skew at moment n according to Kalman gain and the observed value R[n];D9: judging whether the number of synchronization rounds reaches a predicted value; if no, entering flow D10; otherwise, entering flow D11;D10: increasing the number of synchronization rounds by 1, and entering flow D3;D11: ending the tracking process of instantaneous clock offset and dynamic clock skew.
Priority Claims (1)
Number Date Country Kind
202110710014.2 Jun 2021 CN national
PCT Information
Filing Document Filing Date Country Kind
PCT/CN2022/076843 2/18/2022 WO