Method for estimating relative frequency offset of consistent clock synchronization based on weighted median

文档序号:1326565 发布日期:2020-07-14 浏览:20次 中文

阅读说明:本技术 基于加权中值的一致性时钟同步相对频偏估计方法 (Method for estimating relative frequency offset of consistent clock synchronization based on weighted median ) 是由 王恒 陈柳清 龚鹏飞 于 2020-02-25 设计创作,主要内容包括:本发明涉及一种基于加权中值的一致性时钟同步相对频偏估计方法,属于无线传感器网络技术领域。本发明面向通信时延为指数型随机分布的无线传感器网络场景,考虑节点间的相对时钟关系,通过时间戳数据处理得到拉普拉斯变量模型,然后采用加权中值方法估计相对频偏,并且结合平均一致性方法补偿节点的逻辑时钟参数,最后达到网络中节点的逻辑时钟保持同步的效果。本发明提出了两种相对频偏估计方法:基于间隔的加权中值估计方法和基于门限的加权中值估计方法。前者通过寻找时间戳间隔的优化值进行估计,适用于对相对频偏估计精度要求高的场景;后者通过设定门限值,降低了估计方法的存储需求,适用于节点存储资源受限场景。(The invention relates to a method for estimating relative frequency offset of consistency clock synchronization based on a weighted median, belonging to the technical field of wireless sensor networks. The method is oriented to a wireless sensor network scene with communication delay in exponential random distribution, considers the relative clock relationship among nodes, obtains a Laplace variable model through timestamp data processing, then adopts a weighted median method to estimate relative frequency deviation, and combines an average consistency method to compensate the logic clock parameters of the nodes, and finally achieves the effect of keeping the logic clocks of the nodes in the network synchronous. The invention provides two relative frequency offset estimation methods: an interval-based weighted median estimation method and a threshold-based weighted median estimation method. The method comprises the steps that the optimal value of the time stamp interval is searched for to carry out estimation, and the method is suitable for scenes with high requirements on relative frequency offset estimation precision; the latter reduces the storage requirement of the estimation method by setting a threshold value, and is suitable for the scene with limited node storage resources.)

1. A method for estimating relative frequency offset of consistent clock synchronization based on weighted median is characterized in that: performing specific processing on timestamp data among nodes to obtain a Laplace distribution model, estimating relative frequency offset among the nodes by adopting a weighted median method, and updating clock parameters of the nodes by adopting a clock synchronization method based on consistency so that logic clocks of the nodes in a network reach a common global clock; the method specifically comprises the following steps:

s1: suppose that any sensing node i in the network broadcasts a local clock periodicallyAnd synchronous data information, the neighbor node j of the synchronous data information receives and records the current local clock of the neighbor node jThe relative clock relationship between the sending and receiving nodes can be derived:

wherein s isijAnd oijRespectively representing the relative frequency offset and the relative phase offset of node i with respect to node j,indicating a fixed time delay in the transmission of the data packet,representing a random communication delay satisfying an exponential distribution;

s2: after receiving the synchronous clock information, the neighbor node j performs data processing according to the relative relation of the clock data, eliminates the influence of redundant unknown parameters under the consistency synchronization, performs subtraction operation in any two pairs of different timestamp data to obtain the known timestamp data and the parameter s to be estimatedijThe relation of (1):

when the time delay is randomWhen obeying the exponential distribution with the parameter of lambda, the difference value of random time delay can be obtainedObeying a laplacian distribution; thus, when M Laplace variables are generatedIn combination with the probability density function, the likelihood function for the relative frequency offset may be derived as follows:

whereinRepresenting the difference between the local clocks at two different instants of the receiving node j,represents the difference between the local clocks of the two different instants of the sending node i; maximum likelihood of relative frequency deviation obtained by the likelihood functionThen estimating:

this is an L1 norm optimization problem, the optimal solution being a setIs the weighted median of the relative frequency deviationIn a scene with high requirements on relative frequency offset estimation precision, estimating by searching an optimized value of a time stamp interval;

s3: after the relative frequency offset between the nodes is estimated, the logic clock parameters of the nodes are compensated by adopting an average consistency method, the logic clock parameters comprise logic frequency offset compensation and phase offset compensation, and the operations of the relative frequency offset estimation and the clock parameter compensation are periodically repeated until the logic clocks of all the nodes in the network achieve the synchronous effect.

2. The method of claim 1, wherein the method for estimating relative frequency offset of coherent clock synchronization based on weighted median comprises: in step S2, the estimated value of the relative frequency offset based on the weighted median method is a sequenceThe method comprises the following specific steps of (1) enabling a node to have enough storage capacity, storing recorded scenes of all timestamps, and estimating by finding an optimized value of a timestamp interval, wherein the specific steps are as follows:

s21: since the node periodically broadcasts the local clock message, it is assumed that the broadcast period is T; considering that a node receives l synchronous data messages from node i, there are l pairs of time stamp data pairsTime stamp data of nodes are subtracted at intervals vI.e. byThe difference Δ c between the timestamps of the transmitting nodesiWeighted median sequence ═ vTWeight value Δ c ofi(q) constant vT, the estimated value under the weighted median method of relative frequency deviation under interval processing is the sequenceThe median value of (d);

s22: the value of the interval v directly influences the estimation result, a performance limit of relative frequency offset is derived according to the lower limit of the approximate Claramelto, then the maximum value is taken to obtain the optimal value of the interval:

wherein round represents a rounding function; the estimated value of the interval-based weighted median relative frequency offset estimation at the optimal interval is then a sequenceThe median value of (a).

3. The method of claim 1, wherein the method for estimating relative frequency offset of coherent clock synchronization based on weighted median comprises: in step S2, the node needs to store the timestamp data for synchronizationThe synchronization process is carried out more and more; for the scene that the storage capacity of the node is limited and all recorded timestamps cannot be stored, a weighted median relative frequency offset estimation method based on a threshold is considered, and the storage cost is reduced; the node sets a threshold value of the storage amount when the data amount received by the node exceeds the threshold valueWhen the value is obtained, the relative frequency offset is estimated by a weighted median method, then the minimum value and the maximum value in a weighted median sequence are respectively differed with the estimated value, the corresponding timestamp data in the sequence with larger absolute value of interval difference is discarded, and the storage capacity is limited in the threshold range.

Technical Field

The invention belongs to the technical field of wireless sensor networks, and relates to a method for estimating relative frequency offset of consistency clock synchronization based on a weighted median.

Background

Clock synchronization is an important supporting technology of a wireless sensor network, and many applications such as deterministic scheduling, data fusion, energy management and the like need to be operated on the basis of keeping node clocks in the network synchronous. In recent years, in view of the distributed nature of wireless sensor networks, clock synchronization protocols based on consistency have gained wide attention due to their good robustness and scalability.

The consistency clock synchronization protocol proposed earlier can achieve the effect of synchronization under the condition of neglecting the influence of communication delay. However, in the data communication process of an actual wireless sensor network, the communication delay can be divided into a fixed delay and a random delay, wherein the random delay is modeled as a gaussian distribution, an exponential distribution, and the like under different scenarios. If the influence of communication delay is considered, the consistency synchronization protocol proposed earlier cannot complete synchronization convergence. The estimation of the relative frequency offset is a core step in the coherent synchronization protocol, and the estimation value of the relative frequency offset is directly applied to clock parameter compensation, thereby affecting the performance of coherent clock synchronization. Therefore, some recent coherent clock synchronization protocols improve the relative frequency offset estimation method to overcome the problem of synchronization non-convergence under communication delay. However, these coherent clock synchronization protocols rarely consider the composition and distribution model of the time delay, and do not perform synchronization optimization for different scenes, which limits the improvement of synchronization performance.

In view of this, the present invention provides a relative frequency offset estimation method capable of utilizing the distribution characteristics of time delay under exponential random time delay to realize different scene requirements such as higher precision and lower storage capacity, etc., for the problem of consistency synchronization in a wireless sensor network.

Disclosure of Invention

In view of the above, the present invention provides a method for estimating relative frequency offset of coherent clock synchronization based on weighted median, which, for the problem that a coherent clock synchronization mechanism under communication delay does not fully utilize delay information, surrounds a clock data processing optimization method and a laplacian distribution model, considers different requirements of high precision or low storage, estimates relative frequency offset by using a weighted median method, and compensates logical clock parameters by using an average coherence method, thereby achieving the effects of adapting to different scenes and improving clock synchronization precision of a network.

In order to achieve the purpose, the invention provides the following technical scheme:

a method for estimating relative frequency offset of consistent clock synchronization based on weighted median includes: the method specifically comprises the following steps of performing specific processing on timestamp data among nodes to obtain a Laplace distribution model, estimating relative frequency offset among the nodes by adopting a weighted median method, and updating clock parameters of the nodes by adopting a clock synchronization method based on consistency so that logic clocks of the nodes in a network reach a common global clock:

s1: suppose that any sensing node i in the network broadcasts local clock information periodicallyIts neighbor node j receives and records its own current local clockThe relative clock relationship between the sending and receiving nodes can be derived:

wherein s isijAnd oijRespectively representing the relative frequency offset and the relative phase offset of node i with respect to node j,indicating a fixed time delay in the transmission of the data packet,representing a random communication delay satisfying an exponential distribution;

s2: after receiving the synchronous clock information, the neighbor node j performs data processing according to the relative clock relationship, and any two pairs of different timestamp data are subtracted to obtain:

when the time delay is randomWhen obeying the exponential distribution with the parameter of lambda, the difference value of random time delay can be obtainedObeying a laplacian distribution. Thus, when M Laplace variables are generatedIn combination with the probability density function, the likelihood function for the relative frequency offset may be derived as follows:

whereinRepresenting the difference between the local clocks at two different instants of the receiving node j,representing the difference between the local clocks of the sending node i at two different instants. The maximum likelihood estimation of the relative frequency offset can be obtained by the likelihood function:

this is an L1 norm optimization problem, with the optimal value being the setThe weighted median of (a). Thus, an estimate of the relative frequency offsetFinding a set is needed to solveThe weighted median of (a). Firstly, isSimplify the symbols, orderTo the sequenceOrdering so that x[1]<…<x[q]<…<x[M]Wherein x is[q]Representing a sequenceThe q-th smallest number in the sequence, and then find the inequalityThe minimum k that holds is denoted as k*Thus obtaining the estimation value of the relative frequency deviation under the weighting median methodIs composed of

S3: after the relative frequency offset between the nodes is estimated, the logical clock parameters of the nodes are compensated by adopting a consistency method, for example, the frequency offset compensation and the phase offset compensation are updated by adopting an average consistency method. The relative frequency offset estimation and clock parameter compensation operations are repeated periodically until the logic clocks of all nodes in the network achieve the effect of synchronization.

Further, the estimation value of the relative frequency deviation based on the weighted median method is a sequenceAnd then the establishment of the sequence is crucial for the estimation, and different methods are considered to establish the sequence for different scenarios and different requirements. For the scene that the node has enough storage capacity and can store all recorded timestamps, the timestamps are considered to generate data by subtracting at intervals, and the optimal value of the interval of the timestamps is found for carrying out relative frequency offset estimation, so that the design is based on the inter-timestampWeighted median estimation method of interval. For a scene that the storage capacity of the nodes is limited and all recorded timestamps cannot be stored, the storage cost needs to be reduced, the storage capacity of the nodes is considered to have a threshold value, the stored limited data are mutually combined to generate a sequence, and a weighted median method based on the threshold is designed to estimate the relative frequency offset between the nodes.

The weighted median estimation method based on the interval comprises the following specific steps:

s21: since nodes broadcast local clock messages periodically, the period is assumed to be T. Considering that there are l pairs of clock information data between nodes and the time stamp data of the nodes are subtracted at intervals v, i.e.The difference Δ c between the timestamps of the transmitting nodesivT. The weight value in the weighted median set sequence is constant at vT, and the estimation of the relative frequency offset is the sequenceThe median value of (a).

S22: the value of the interval v directly affects the estimation result of the relative frequency offset. For data generated by a particular system model, the different processing methods have a performance bound associated with them. According to the Laplace distribution model of the difference between the linear system model and the time delay, a performance limit PB(s) of the relative frequency deviation is derived by adopting an approximate lower boundary of Cramer-Raoij):

Wherein V is a constant. Since λ, T are constants, the performance bound depends only on the interval v, given that the transmission sequence l of the node is known. For best performance, for PB(s)ij) Taking the minimum value, obtaining the optimal value for the interval:

wherein round represents the rounding functionAnd (4) counting. An estimate of the weighted median based relative frequency offset at the optimum interval is then obtainedIs a sequence ofThe median value of (a).

The specific process of the weighted median estimation method based on the threshold is as follows:

setting a storage threshold value for the node, subtracting any two pairs of timestamp data to generate a relational expression meeting Laplace distribution when the data volume received by the node exceeds the value, then carrying out maximum likelihood estimation according to a joint probability density function, and estimating relative frequency offset by using a weighted median methodThen, the minimum value x in the weighted median sequence is determined[1]And a maximum value x[M]Respectively and the estimated valuesMaking a difference, comparing absolute valuesAndif the former is larger, discard x[1]Corresponding time stamp at the position of the decrementOtherwise discard x[M]Corresponding time stamp at the decremented position in (1)Therefore, the number of the timestamps stored by the nodes under the threshold-based weighted median method is always kept within a certain range.

The invention has the beneficial effects that:

1) the invention considers different components of communication time delay, fully utilizes the distribution characteristic of time delay data, eliminates the influence of other unknown parameters by subtracting the time stamp data to obtain a Laplace distribution model, and adopts a weighted median method to carry out relative frequency offset estimation solving, so that the estimated relative frequency offset is more accurate, and the performance of consistent clock synchronization under the time delay is further improved.

2) The invention has enough storage capacity for the nodes, and considers the interval method for the scene capable of storing all recorded timestamps, the timestamp data information is subtracted in intervals, the performance limit of the estimation method is obtained by approximating the lower bound of the Claramelteon, and the corresponding optimal interval is derived, so that the relative frequency deviation estimation value under the optimal interval is obtained, the calculation complexity of weighted median estimation is reduced, and the estimation precision of the relative frequency deviation can be ensured.

3) The invention also considers the threshold method to deal with the scene that the storage capacity of the node is limited and all recorded timestamps cannot be stored, and the estimation method is designed by utilizing the characteristics of the relative clock relationship and the weighted median sequence of the node, so that the node does not need to store all received clock data, but keeps the amount of the stored clock data within a certain range under the condition of ensuring the synchronization precision as far as possible, and the storage cost is effectively reduced.

Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the means of the instrumentalities and combinations particularly pointed out hereinafter.

Drawings

For the purposes of promoting a better understanding of the objects, aspects and advantages of the invention, reference will now be made to the following detailed description taken in conjunction with the accompanying drawings in which:

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

FIG. 2 is a schematic diagram of a clock synchronization information interaction mechanism between nodes;

fig. 3 is a flowchart of a consistency synchronization method under the weighted median frequency offset estimation method of the present invention.

Detailed Description

The following detailed description of specific embodiments of the invention refers to the accompanying drawings.

Referring to fig. 1 to 3, fig. 1 is a communication topology diagram of a fully distributed wireless sensor network adopted in the present invention, as shown in fig. 1, each node randomly distributed in the network not only periodically broadcasts local clock information, but also receives clock information broadcast by neighboring nodes within its communication range. The interaction topology among nodes in the wireless sensor network can be represented by an undirected graph G ═ (N, E), wherein a vertex set N ═ {1,2, …, N } represents a node in the network, and an edge setRepresenting a reliable communication link. Further with NiWhere (i, j) ∈ E indicates that node j can successfully receive information from node i.

The mechanism for exchanging synchronous clock information between nodes is shown in fig. 2, taking two adjacent nodes as an example, a node i broadcasts local clock information with a period of T as a cycleIts neighbor node j receives the clock message and records its own current local clockBecause of the fixed time delay in the transmission process of the data packetAnd random time delayThen the neighbor nodes establish relative clock relationship according to the known local clock information and the time delay situation,

wherein s isijAnd oijRespectively, representing the relative frequency offset and the relative phase offset of node i with respect to node j. Next, it is necessary to obtain information based on the known clock relationship and timestampEstimating relative frequency offset s between nodesij. By subtracting any two pairs of different time stamp data:

when the time delay is randomWhen obeying the exponential distribution with the parameter of lambda, the difference value of random time delay can be obtainedComplianceThe laplacian distribution of (a). Thus, when M Laplace variables are generatedThen, in combination with the distribution function, the likelihood function for the relative frequency offset can be derived as follows:

whereinThe maximum likelihood estimation of the relative frequency offset can be obtained by the likelihood function:

this is an L1 norm optimization problem, thenFinding a set is needed to solveThe weighted median of (a). First orderTo the sequenceOrdering so that x[1]<…<x[q]<…<x[M]Then find the weightThe minimum k of hold, denoted k*Thus obtaining the estimation value of the relative frequency deviation under the weighting median methodIs composed of

The estimation value of the relative frequency deviation based on the weighted median method is a sequenceAnd thus the establishment of the sequence is very important for the estimation. l pairs of time stamp dataCan produceDifferent combined differences. Aiming at different requirements, two different relative frequency offset estimation methods are designed: an interval-based weighted median estimation method and a threshold-based weighted median estimation method. Front sideThe method carries out estimation by searching for an optimized value of the time stamp interval, needs to store all recorded time stamps, and is suitable for scenes with high requirements on relative frequency offset estimation precision; the latter reduces the storage requirement of the estimation method by setting a threshold value without storing all recorded timestamps, and is suitable for the scene with limited node storage resources.

During synchronization, the amount of synchronization timestamp data received by the node increases with the passage of synchronization time, and the computational complexity of the weighted median estimate increases with the increase of l. Therefore, data generated by subtraction at fixed intervals is considered, the computational complexity is reduced to a certain extent, and the interval processing optimization is carried out on scenes with high estimation accuracy requirements. Since the node broadcasts the local clock message at a period of T. Considering that there are l pairs of clock information data between nodes and the time stamp data of the nodes are subtracted at intervals v, i.e.The difference Δ c between the timestamps of the transmitting nodesivT. The weight value in the weighted median set sequence is constant at vT, and the estimated value of the relative frequency offset is the sequenceThe median value of (a). The value of the interval v directly affects the estimation result. For data generated by a particular system model, the different processing methods have a performance bound associated with them. The effect of the gap value on the performance bound is now observed. According to the Laplace distribution model of the difference between the linear system model and the time delay, a performance limit PB(s) of the relative frequency deviation is derived by adopting an approximate lower boundary of Cramer-Raoij):

Where V is constant and since λ, T are constant and the transmission sequence l of the node is known, the performance limit depends on the interval V. To obtain the best performance, PB(s) is minimizedij) Obtaining an optimal value for the interval:

where round represents a rounding function. Thus, the relative frequency offset estimated by the weighted median method under the optimal interval can be obtainedIs a sequence ofThe median value of (a).

The data volume of the synchronization timestamp received by the nodes is increased along with the increase of the synchronization time, and for a specific scene that the storage capacity of the nodes is limited and all recorded timestamps cannot be stored, the storage cost needs to be reduced, and a weighted median method based on a threshold is designed to estimate the relative frequency offset between the nodes. Firstly, setting a threshold value of memory space for a node, and when the data volume received by the node exceeds the threshold value, firstly, estimating the relative frequency offset by using a weighted median methodThen the minimum value x in the weighted median sequence[1]And a maximum value x[M]Respectively and the estimated valuesMake a difference and compareAndif the former is larger, discard x[1]Corresponding time stamp inOtherwise discard x[M]Corresponding time stamp inThus, node stored time stampsThe number always remains within a limited range.

After the relative frequency offset between the nodes is estimated, the logical clock parameters of the nodes are compensated by adopting a consistency method, for example, the frequency offset compensation and the phase offset compensation are updated by adopting an average consistency method. And periodically repeating the relative frequency offset estimation and the clock parameter compensation operation until the logic clocks of all the nodes in the network achieve the synchronization effect.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于FPGA的小区搜索粗同步的实现方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!