CN103166730A - Method for synchronizing time in wireless ad hoc network based on protocol of institute of electrical and electronic engineers (IEEE) 1588 - Google Patents

Method for synchronizing time in wireless ad hoc network based on protocol of institute of electrical and electronic engineers (IEEE) 1588 Download PDF

Info

Publication number
CN103166730A
CN103166730A CN2013100805218A CN201310080521A CN103166730A CN 103166730 A CN103166730 A CN 103166730A CN 2013100805218 A CN2013100805218 A CN 2013100805218A CN 201310080521 A CN201310080521 A CN 201310080521A CN 103166730 A CN103166730 A CN 103166730A
Authority
CN
China
Prior art keywords
clock
delay
time
master
offset
Prior art date
Application number
CN2013100805218A
Other languages
Chinese (zh)
Inventor
陈旿
孙建华
张璐
于振兴
侯维苇
洪亮
慕德俊
Original Assignee
西北工业大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西北工业大学 filed Critical 西北工业大学
Priority to CN2013100805218A priority Critical patent/CN103166730A/en
Publication of CN103166730A publication Critical patent/CN103166730A/en

Links

Abstract

The invention discloses a method for synchronizing time in a wireless ad hoc network based on a protocol of an institute of electrical and electronic engineers (IEEE) 1588 and aims to solve the technical problem that the time synchronization accuracy is low by the conventional time synchronization method. According to the technical scheme, the method comprises the following steps of: initializing the whole network to determine a master time node and a slave time node; performing delay measurement on time synchronization communication between the master time node and the slave time node to obtain master-slave communication delay, slave-master communication delay and unidirectional delay between the master time node and the slave time node; performing amplitude limiting filtering on the unidirectional delay in a state of a minimum withdrawn window, and performing filtering estimation on the unidirectional delay subjected to amplitude limiting through a first-order infinite impulse response filter; and calculating time deviation between the master node and the slave, and performing optimal estimation on the time deviation according to a discrete linear Kalman filtering algorithm. By the method, the time deviation stability of the time in the wireless ad hoc network is guaranteed, and the time synchronization accuracy is relatively high.

Description

基于IEEE1588协议的无线自组织网络时钟同步方法技术领域[0001] 本发明涉及一种无线自组织网络时钟同步方法,特别是涉及一种基于IEEE1588协议的无线自组织网络时钟同步方法。 Field-based synchronization method for the wireless ad hoc network clock IEEE1588 protocol [0001] The present invention relates to a wireless ad-hoc network clock synchronization method, particularly to a method for synchronizing a wireless ad hoc network based on the clock of the IEEE1588 protocol. 背景技术[0002] 时钟同步是分布式系统的核心技术之一,分布式网络测控系统的性能很大程度上取决于网络所能提供的时钟同步精度。 [0002] Clock synchronization is one of the key technologies in distributed systems, distributed network monitoring and control system performance is highly dependent on the accuracy of the clock synchronization network can provide. 随着分布式网络测控系统的广泛应用,为了满足网络测控系统对高精度同步时钟的需求,IEEE (Institute of Electrical and ElectronicsEngineers,美国电气和电子工程师协会)在2002年发布了IEEE1588精确时钟同步协议标准(Precision Time Protocol),简称PTP。 With the wide application of distributed network monitoring and control system, in order to meet the network monitoring and control system for high precision clock synchronization requirements, IEEE (Institute of and ElectronicsEngineers, the American Institute of Electrical and Electronics Engineers Electrical) released IEEE1588 precision clock synchronization protocol standards in 2002 (Precision Time Protocol), referred to PTP. 2008 年又制定了新版本的ΙΕΕΕ1588 协议,SPIEEE1588v20[0003] 无线自组织网路(即Ad Hoc网络),是一种特殊的无线移动通信网络。 In 2008 they developed a new version of ΙΕΕΕ1588 agreement, SPIEEE1588v20 [0003] wireless ad hoc network (ie Ad Hoc network), is a special kind of wireless mobile communications network. 它具有不依赖于任何网络基础设施,具有很强的自组织性、鲁棒性和抗毁性等特点,在军事、抢险、救灾及应急通信领域有着广泛的应用前景。 It has not dependent on any network infrastructure, with strong self-organization, robustness and survivability features, it has been widely used in military, rescue, disaster relief and emergency communications. 无线自组织网路作为一种新型的分布式网络测控系统,其应用领域越来越广泛。 Wireless ad hoc network as a new distributed network control system, which is more extensive applications. 时钟同步是无线传感器网络的一项重要支撑技术,网络节点间的协作感知、数据融合、定位技术、能量管理都需要时钟同步的支持,才能正常开展。 Clock synchronization is a collaboration between the perception of a wireless sensor network is an important technical support, network nodes, data fusion, positioning technology, energy management requires clock synchronization support in order to carry out normal. [0004] 在无线自组织网络中,如何实现时钟同步是一个难题。 [0004] In the wireless ad-hoc network, how to achieve the clock synchronization is a problem. 由于节点内部的硬件时钟的老化,时钟都具有一定的误差,但是所有的节点处于分布式的状态,没有固定的基础设施或中心节点来对所有的节点进行有效的时钟同步,因此节点间的本地时间存在有偏差,导致无线自组织网络不能很好的支持实时业务,使得无线自组织网络的应用受到了一定的制约和限制。 Since the internal clock of node hardware aging, some have a clock error, all the nodes in a distributed state, or no fixed infrastructure for efficient central node clock synchronization for all the nodes, the nodes between the local time there is a deviation, resulting in wireless ad hoc network can not be good support real-time business, making use of wireless ad hoc networks subject to certain constraints and limitations. [0005] 将IEEE1588协议应用于无线自组织网络,为无线自组织网络中的设备提供高精度时钟信息,协调各设备之间的动作,将为无线自组织网络的推广应用起到很好的推动作用。 [0005] The IEEE1588 protocol used in wireless self-organizing network, providing high-precision clock information to the wireless ad hoc network equipment, coordination of actions between devices, will promote the use of wireless ad hoc networks played a very good boost effect. [0006] 文献I “公开号是CN102664696A的中国发明专利”公开了一种面向无线传输环境的IEEE1588协议优化系统及其方法,通过主从时钟节点模块、信道调制解调模块、发射天线模块、接收天线模块、功率调整模块、同步处理模块以及信号处理模块的硬件,实现了应用于无线环境中的IEEE1588时钟同步协议。 [0006] Document I "is CN102664696A Publication No. Chinese invention patent," discloses the IEEE1588 protocol optimization system and a method thereof for a wireless transmission environment, by the master node from the clock module, a channel modem module, a transmitting antenna module, receiving the antenna module, power adjustment module, the synchronization processing hardware module and a signal processing module implements used in wireless environment IEEE1588 clock synchronization protocol. [0007] 文献2 “公开号是CN102104475A的中国发明专利”公开了一种基于IEEE1588的同步系统及其同步方法,该方法通过增设主从时钟模块、CPU管理控制模块,构建一个频率可调的时钟计数器实现频率补偿,实现了一个面向无线通信技术领域的同步系统。 [0007] Document 2 "discloses a number of Chinese invention patent CN102104475A" discloses a synchronization method and synchronization system based on IEEE1588, the method from the clock module, CPU control management module, a construct through the addition of adjustable frequency master clock counter achieve frequency compensation to achieve synchronization system for a wireless communications art. [0008] 但文献公开高精度的时钟同步技术都是依靠硬件方式实现,在无线自组织网络中应用实现的硬件和成本开销比较大,并且由于无线网络存在不对称链路,明显与IEEE1588协议正向和反向链路延迟相等的假定相违背,而上述这些专利发明并没有针对性的解决此矛盾。 [0008] However, discloses a highly accurate clock synchronization techniques are hardware-dependent manner, in the wireless ad-hoc network application implemented hardware and cost overhead is relatively large, and the wireless network due to asymmetric links, and positively IEEE1588 protocol forward and reverse link delay equal to the assumed contrary to these patents and the invention is not targeted to solve this contradiction. 发明内容[0009] 为了克服现有时钟同步技术时钟同步精度差的不足,本发明提供一种基于IEEE1588协议的无线自组织网络时钟同步方法。 SUMMARY OF THE INVENTION [0009] In order to overcome the prior art clock synchronization difference is less than the clock synchronization accuracy, the present invention provides a wireless ad-hoc network based on IEEE1588 clock synchronization protocol. 该方法针对无线网络中不对称链路的特点,对IEEE1588时钟同步原理进行了相应的改进。 The method for the asymmetric characteristics of a wireless network link, to the IEEE1588 clock synchronization principle corresponding improvement. 首先进行全网初始化,确定主时钟节点和从时钟节点;进行主从时钟节点间的时钟同步通信时延测量,获得出主从通信时延、从主通信时延以及主从节点间的单向时延;将单向时延进行最小退避窗口下的限幅滤波处理,将限幅处理后的单向时延通过一阶无限冲激响应滤波器进行滤波估计处理;计算主从节点间的时钟偏差,并根据离散线性卡尔曼滤波算法对时钟偏差进行最优化估计;构建基于PI控制器的时钟伺服系统实现从时钟高精度跟踪主时钟。 First, the entire network initialization, determines the master clock and the slave clock node node; master-slave clock synchronous communication between the clock delay measurement nodes, obtained from the master communication delay, the delay from the main communication between the nodes and from the main check delay; unidirectional clipping filtering processing delay at the minimum backoff window, the filtering process is estimated one-way delay after the limiting process by the first order infinite response filter impulse; calculated from the master clock between nodes deviation, and optimizing the estimated linear discrete Kalman filter according to the clock deviation; build highly accurate tracking servo clock from the primary clock system PI controller. 可以保证无线自组织网络下时钟间时钟偏差的稳定性,达到较高的时钟同步精度。 We can guarantee the stability of the wireless ad hoc network clock bias between the clock, to achieve a higher clock synchronization accuracy. [0010] 本发明解决其技术问题所采用的技术方案是:一种基于IEEE1588协议的无线自组织网络时钟同步方法,其特点是包括以下步骤:[0011] 步骤一,全网初始化,确定主时钟节点和从时钟节点;[0012] 步骤二,进行主从时钟节点间的时钟同步通信时延测量,获得出主从通信时延、从主通信时延以及主从节点间的单向时延;[0013] 步骤三,将步骤二中获得的单向时延进行最小退避窗口下的限幅滤波处理,即只允许属于最小退避窗口下的单向时延限幅过滤通过,对于不属于最小退避窗口下单向时延,采用低通滤波进行处理。 [0010] aspect of the present invention to solve the technical problem is: A wireless ad-hoc network based on IEEE1588 clock synchronization protocol, which is characterized by comprising the steps of: [0011] Step a whole network initialization, the master clock is determined node and the slave clock node; [0012] step two, the master clock for synchronous communication between the clock delay measurement nodes, obtained from the master communication delay, and the delay from the main communication between the master node from the one-way delay; [0013] step three, the one-way delay obtained in step two clipping and filtering process is performed at a minimum backoff window, allowing only one-way delay belong to the minimum clipping filtered through a backoff window, does not belong to the minimum backoff the one-way delay window, low-pass filtering process. 判断的依据是单向时延是否小于等于最小退避窗口下的单向时延限幅值;[0014] 所述的最小退避窗口下的单向时延限幅值,由应用层产生数据到形成MAC层封包的时间、最小退避窗口时MAC层等待信道空闲的时间、发送节点物理层发送数据帧的所用时间、数据帧在无线信道中传输所产生的时延、接收方物理层为了完成数据帧的接收所花费的时间、接收方将MAC层封包解封装并提取数据交给相应应用层进程的时延六部分组成。 The basis for judging whether equal to one-way delay less than the minimum limit value the one-way delay backoff window; one-way delay at the minimum limit value of the backoff window [0014], the data generated by the application layer to be formed MAC layer packet time, the minimum backoff window MAC layer waits for the channel idle time, the transmitted data frame transmission node physical layer time, data frame delay wireless channel transmissions generated by the receiver physical layer in order to complete the data frame receiving time it takes, the receiving side decapsulates the MAC layer packet and extracts the data to the appropriate application layer process delay of six parts. [0015] 步骤四,将限幅处理后的单向时延通过一阶无限冲激响应滤波器进行滤波估计处理;所采取的一阶无限冲激响应滤波器的公式如下:[0016] s*y (k)- (s-1)*y (k_l) = [delay (k)+delay (k~l)]/2 (I)[0017] 式中,delay (k)为k时刻经步骤三得到的限幅处理后的单向时延,y (k)为k时刻经过步骤四后得到的单向时延,s为滤波器刚度,取整数。 [0015] Step four, the one-way delay after the limiting process performed by a filtering estimation processing order infinite impulse response filter; a first order infinite impulse response filters taken following formula: [0016] s * y (k) - (s-1) * y (k_l) = [delay (k) + delay (k ~ l)] / 2 (I) [0017] wherein, delay (k) is the time k by step three after the one-way delay obtained clipping process, Y (k) is the k-way delay time obtained after step four, s is the stiffness of the filter, rounded. 通过调整s调整滤波器的截止频率。 S adjustment filter by adjusting the cutoff frequency. 系统刚开始时,S = 1,随着时间增加,逐渐增加S直到最大值。 When the beginning of the system, S = 1, as time increases, S is gradually increased up to a maximum. [0018] 步骤五,计算主从节点间的时钟偏差,并根据离散线性卡尔曼滤波算法实现对时钟偏差的最优化估计。 [0018] Step 5 is calculated from the master clock skew between nodes, and to realize the clock offset estimation according to the optimization of linear discrete Kalman filter algorithm. 其中,实施离散线性卡尔曼滤波估计算法所需要的状态方程和观测方程,如下式:[0019]I offsetik) = Offsetik-1) + As(k) ^ [offee/(k)m = offsetik) + 5d{k)[0020] 式中,当前系统状态为k, offset (k)为主从时钟节点当前状态的时钟偏差状态值,offset (k-Ι)为主从时钟节点上一状态的时钟偏差状态值,offset (k) ■为主从时钟节点当前状态的时钟偏差观测值,△ ε (k)为主从时钟节点当前状态相对于上一状态的时钟源晶振抖动差,Sd(k)为当前状态主从时延相对于单向时延的差值。 Wherein the observation equation and the state equation implemented discrete linear Kalman filter estimation algorithm required, the following formula: [0019] I offsetik) = Offsetik-1) + As (k) ^ [offee / (k) m = offsetik) + 5d {k) [0020] wherein, for the current system state k, offset (k) based clock offset state value from the current state of the clock node, offset (k-Ι) mainly clock bias from a node clock state state value, offset (k) ■ observations based clock offset from the current state of the clock nodes, △ ε (k) from the current state of the main clock source node with respect to clock jitter difference on a crystal state, Sd (k) is the current status of the master delay with respect to a difference from the one-way delay. [0021] 所用离散线性卡尔曼滤波算法方程组如下:[0022] [0021] The linear discrete Kalman filter algorithm with the following equations: [0022]

Figure CN103166730AD00061

[0023] 其中,offset(k|k_l)为上一状态预测的结果,offset (k_l | k_l)为上一状态最优的结果,offset (k I k)为当前状态的最优化估算值,P (k I k-Ι)为offset (k | k_l)对应的协方差,P(k|k)为offset (k I k)对应的协方差,Kg为卡尔曼增益,Q和R分别为过程噪声和测量噪声的方差。 [0023] wherein, offset | a result of the predicted state (k k_l), offset (k_l | k_l) on a state of optimal results, offset (k I k) for the current optimized state estimate, P (k I k-Ι) is offset (k | k_l) corresponding covariance, P (k | k) is the offset (k I k) corresponding to the covariance, Kg is the Kalman gain, Q and R are the process noise and measurement noise variance. [0024] 步骤六,构建基于PI控制器的时钟伺服系统实现从时钟跟踪主时钟。 [0024] Step six, constructed to achieve the master clock from the clock tracking servo system clock PI controller. [0025] 所述的PI控制器由比例P和积分I两个环节构成的闭环控制系统,其中比例项P用来消除输入误差,即主从时钟之间的时间偏移,积分项I用于消除系统的稳态误差,即减少主从时钟的速率差。 [0025] The closed loop control system constituted by the PI controller integral and proportional P I two links, wherein the proportional term P is used to eliminate the input of the error, i.e., from the time offset between the master clock, for the integral term I steady-state error cancellation system, i.e., to reduce the difference between the master and slave clock rate. PI控制器方程式为 PI controller equation is

Figure CN103166730AD00062

[0027] 式中,offset (k)为当前时钟偏差,Ap为比例项P参数,A1为积分项I参数,y(k)为将要调整的时钟滴答频率。 [0027] In the formula, offset (k) for the current clock bias, Ap is a proportional parameter P, A1 is a parameter integral term I, y (k) is the frequency of the tick clock to be adjusted. [0028] 本发明的有益效果是:由于该方法针对无线网络中不对称链路的特点,对IEEE1588时钟同步原理进行了相应的改进。 [0028] Advantageous effects of the present invention is that: since this method asymmetrical features links for wireless networks, IEEE1588 clock synchronization principle of corresponding improvement. 首先进行全网初始化,确定主时钟节点和从时钟节点;进行主从时钟节点间的时钟同步通信时延测量,获得出主从通信时延、从主通信时延以及主从节点间的单向时延;将单向时延进行最小退避窗口下的限幅滤波处理,将限幅处理后的单向时延通过一阶无限冲激响应滤波器进行滤波估计处理;计算主从节点间的时钟偏差,并根据离散线性卡尔曼滤波算法对时钟偏差进行最优化估计;构建基于PI控制器的时钟伺服系统实现从时钟高精度跟踪主时钟。 First, the entire network initialization, determines the master clock and the slave clock node node; master-slave clock synchronous communication between the clock delay measurement nodes, obtained from the master communication delay, the delay from the main communication between the nodes and from the main check delay; unidirectional clipping filtering processing delay at the minimum backoff window, the filtering process is estimated one-way delay after the limiting process by the first order infinite response filter impulse; calculated from the master clock between nodes deviation, and optimizing the estimated linear discrete Kalman filter according to the clock deviation; build highly accurate tracking servo clock from the primary clock system PI controller. 保证了无线自组织网络下时钟间时钟偏差的稳定性,达到了较高的时钟同步精度。 To ensure the stability of the clock skew between the clock wireless ad-hoc network, to achieve a high precision clock synchronization. 附图说明[0029] 图1是本发明方法中时钟同步伺服系统结构图。 BRIEF DESCRIPTION [0029] FIG. 1 is a clock synchronization method of the present invention, the servo system configuration in FIG. [0030] 图2是本发明方法中最小退避窗口下单向时延限幅值的组成图。 [0030] FIG. 2 is a schematic diagram showing a process of the invention the minimum one-way delay backoff window limits the amplitude. 具体实施方式[0031] 下面结合图1、图2对本发明的构思、具体结构及产生的技术效果作进一步说明,以充分了解本发明的目的、特征和效果。 DETAILED DESCRIPTION [0031] below with reference to FIG. 1, FIG. 2 of the inventive concept, the specific structure and technical effect produced is further described to fully understand the objects, features and advantages of the present invention. [0032] 首先主从时钟节点进行通信测量获得主从时延tms和从主时延tsm,经过运算获得主从时钟之间单向时延。 [0032] First, as measured from the master communication node receives the master clock from the delay and tms, obtained through calculation from the main tsm delay between the master clock from the one-way delay. 其次对单向时延进行最小退避窗口下的限幅过滤处理,保障IEEE1588协议适用于无线自组织网络。 Secondly, the one-way delay clipping filtration treatment at a minimum backoff window to protect the IEEE1588 protocol for wireless ad hoc networks. 然后在对时钟偏差的处理中,进行基于离散线性卡尔曼滤波估计的时钟偏差稳定化处理,去除无线自组织网络中时延不稳定导致的测得时钟偏差抖动较大的影响,保障本发明在同步精度和偏移误差上的较高精度。 Then the processing of the clock offset, at a linear Kalman filter based on a discrete estimation of the present invention, the clock bias stabilization treatment to remove the wireless ad-hoc network delay, the instability measured jitter clock offset greater impact, to protect synchronization accuracy and high precision on the offset error. 最后由PI控制器输出调整本地时钟的频率,以实现主从时钟的时钟同步。 Finally, adjust the frequency of the local clock by the PI controller output, in order to achieve clock synchronization from the master clock. [0033] 本发明的基于IEEE1588协议的无线自组织网络时钟同步方法具体步骤如下:[0034] 步骤一,全网初始化,选取最佳主时钟,确定主时钟节点和从时钟节点。 [0033] IEEE1588 protocol based wireless ad-hoc network clock synchronization method of the present invention the following steps: [0034] a step, initializing the whole network, select the best master clock, the master clock is determined from the clock node and the node. 其中,所建立的无线自组织网络中只有一个主时钟节点和若干个从时钟节点;[0035] 步骤二,进行主从时钟节点间的时钟同步通信时延测量,获得出主从通信时延、从主通信时延以及主从节点间的单向时延。 Wherein the wireless ad-hoc network is only established by a master clock from the clock node and a plurality of nodes; [0035] Step two, the master clock for synchronizing the communication between the clock delay measurement nodes, obtained from the master communication delay, and from the master communication delay between the master node from the one-way delay. 通信时延测量包括偏移测量阶段和延迟测量阶段;[0036] 步骤三,将步骤二中获得的单向时延进行最小退避窗口下的限幅滤波处理,即只允许属于最小退避窗口下的单向时延限幅过滤通过,对于不属于最小退避窗口下单向时延,采用低通滤波进行处理。 Communication delay offset measurements comprise measurement phase and the measurement phase delay; [0036] Step three, the one-way delay obtained in step two clipping and filtering process is performed at a minimum backoff window, allowing only the minimum backoff window belongs limiting filtered through a one-way delay, does not belong to the minimum one-way delay backoff window, low-pass filtering process. 所用的判断的依据是单向时延是否小于等于最小退避窗口下的单向时延限幅值;[0037] 所述的最小退避窗口下的单向时延限幅值如图2所示,由发送处理时延、访问时延、传输时延、传播时延、接收时延和接收处理时延组成。 Used is determined based on whether the one-way delay less the minimum one-way delay retraction limit value in the window; the minimum one-way delay of the backoff window [0037] 2 limit value, by the transmission processing delay, access delay, transmission delay, propagation delay, the reception delay and the reception processing delay composition. 其中,发送处理时延表示数据包从应用层到MAC层的发送时延,即应用层产生数据到形成MAC层封包的时间;访问时延表示最小退避窗口时MAC层等待信道空闲的时间,即退避窗口为CWmin时的等待信道空闲的时间;传输时延表示发送节点物理层发送数据帧的所用时间;传播时延表示数据帧在无线信道中传输所产生的时延;接收时延表示接收方物理层为了完成数据帧的接收所花费的时间;接收处理时延表示节点处理数据帧需要的时间,即将MAC层封包解封装、提取数据交给相应应用层进程的时延。 Wherein the processing delay represents transmission packets from the application layer to the MAC layer transmission delay, i.e., the application layer data to the MAC layer packet formation time; access latency represents a waiting MAC layer channel idle time when the minimum backoff window, i.e., waiting for the backoff window CWmin channel during idle time; transmission delay represents the physical layer transmission node transmits data frame by a time; propagation delay represents a delay of the frame data transmitted in a wireless channel generated; represents the receiver receiving delay to complete the physical layer received data frame time spent; reception processing nodes representing processing delay time required for a data frame, i.e. the MAC layer packet decapsulating extract data corresponding to the delay of the application layer process. [0038] 步骤四,将限幅处理后的单向时延通过一阶无限冲激响应滤波器进行滤波估计处理。 [0038] Step four, the one-way delay clipped filtering process by a filter response estimation process order infinite impulse. 所采取的一阶无限冲激响应滤波器的公式如下:[0039] s*y(k) -(s-1)*y(k_l) = [delay(k)+delay(k~l)]/2 (I)[0040] 其中delay(k)为k时刻经步骤三得到的限幅处理后的单向时延,y(k)为k时刻经过步骤四后得到的单向时延,s为滤波器`刚度,取整数。 Equation taken a first order infinite impulse response filter as follows: [0039] s * y (k) - (s-1) * y (k_l) = [delay (k) + delay (k ~ l)] / 2 (I) [0040] wherein delay (k) is a one-way delay after the limiting process at time k obtained by three steps, y (k) for the k-way delay time obtained through the four steps, s is filter `stiffness rounded. 通过调整S,可以调整滤波器的截止频率。 By adjusting S, you can adjust the filter cutoff frequency. 系统刚开始时,S = 1,随着时间增加,逐渐增加S直到最大值。 When the beginning of the system, S = 1, as time increases, S is gradually increased up to a maximum. [0041] 步骤五,计算主从节点间的时钟偏差,并根据离散线性卡尔曼滤波算法对时钟偏差进行最优化估计。 [0041] Step 5 is calculated from the master clock skew between nodes, and the clock deviation estimated based on the discrete optimization algorithm is a linear Kalman filter. 其中,实施离散线性卡尔曼滤波估计算法所需要的状态方程和观测方程,如下式:[0042] j offsei(k) ~ offsei{k -1) + Ae(k) \offset(k)m = offsetik) + δά {¥)[0043] 其中当前系统状态为k, offset (k)为主从时钟节点当前状态的时钟偏差状态值,offset (k-Ι)为主从时钟节点上一状态的时钟偏差状态值,offset (k) «为主从时钟节点当前状态的时钟偏差观测值,△ ε (k)为主从时钟节点当前状态相对于上一状态的时钟源晶振抖动差,Sd(k)为当前状态主从时延相对于单向时延的差值。 Wherein the observation equation and the state equation implemented discrete linear Kalman filter estimation algorithm required, the following formula: [0042] j offsei (k) ~ offsei {k -1) + Ae (k) \ offset (k) m = offsetik ) + δά {¥) [0043] wherein the current system state is k, offset (k) based clock offset state value from the current state of the clock node, offset (k-Ι) based on a clock from a state clock bias node state value, offset (k) «main observations from the current state of the clock skew clock node, △ ε (k) from the current state of the main clock source node with respect to clock jitter difference on a crystal state, Sd (k) is the current status of the master delay with respect to a difference from the one-way delay. [0044] 所用离散线性卡尔曼滤波算法方程组如下:[0045] [0044] The linear discrete Kalman filter algorithm with the following equations: [0045]

Figure CN103166730AD00081

[0046] 其中,offset(k|k_l)为上一状态预测的结果,offset (k_l | k_l)为上一状态最优的结果,offset (k I k)为当前状态的最优化估算值,P (k I k-Ι)为offset (k | k_l)对应的协方差,P(k|k)为offset (k I k)对应的协方差,Kg为卡尔曼增益,Q和R分别为过程噪声和测量噪声的方差。 [0046] wherein, offset | a result of the predicted state (k k_l), offset (k_l | k_l) on a state of optimal results, offset (k I k) for the current optimized state estimate, P (k I k-Ι) is offset (k | k_l) corresponding covariance, P (k | k) is the offset (k I k) corresponding to the covariance, Kg is the Kalman gain, Q and R are the process noise and measurement noise variance. [0047] 步骤六,构建基于PI控制器的时钟伺服系统实现从时钟高精度跟踪主时钟。 [0047] Step 6 Construction for tracking the master clock from the servo system clock precision clock PI controller. [0048] 所述的PI控制器由比例P和积分I两个环节构成的闭环控制系统,其中比例项P用来消除输入误差,即主从时钟之间的时间偏移,积分项I用于消除系统的稳态误差,即减少主从时钟的速率差。 [0048] The closed loop control system constituted by the PI controller integral and proportional P I two links, wherein the proportional term P is used to eliminate the input of the error, i.e., from the time offset between the master clock, for the integral term I steady-state error cancellation system, i.e., to reduce the difference between the master and slave clock rate. PI控制器方程式为 PI controller equation is

Figure CN103166730AD00082

[0050] 其中offset (k)为当前时钟偏差,Ap为比例项P参数,A1为积分项I参数,y(k)为将要调整的时钟滴答频率。 [0050] wherein the offset (k) for the current clock bias, Ap is a proportional parameter P, A1 is a parameter integral term I, y (k) is the frequency of the tick clock to be adjusted. [0051] 本发明所描述的一种基于IEEE1588协议的无线自组织网络时钟同步方法,针对无线网络中不对称链路的特点,对IEEE1588时钟同步原理进行了相应的改进,同时为了维持时钟间时钟偏差的稳定性,采用离散线性卡尔曼滤波算法对时钟偏差进行最优化估计,不依赖于硬件,以纯软件的形式实现了IEEE1588协议在无线自组织网络中的有效应用,并能在同步精度、同步时间及偏移误差上达到较高的指标,同时也使得无线自组织网络的时钟同步硬件开销和成本开销大大节约。 [0051] A according to the present invention is described in wireless ad-hoc network clock synchronization method based on the IEEE1588 protocol, for a wireless network link characteristics of asymmetry, IEEE1588 clock synchronization principle of corresponding improvement, while in order to maintain the clock between the clock bias stability, discrete linear Kalman filter algorithm optimized clock offset estimate, is not dependent on the hardware, to achieve an effective use IEEE1588 protocol in wireless ad-hoc network in the form of a pure software, and can be in synchronization accuracy, the synchronization reach a higher index and the time offset error, but also makes the hardware clock synchronization overhead and overhead costs of wireless ad hoc network significant savings.

Claims (1)

1.一种基于IEEE1588协议的无线自组织网络时钟同步方法,其特征在于包括以下步骤: 步骤一,全网初始化,确定主时钟节点和从时钟节点; 步骤二,进行主从时钟节点间的时钟同步通信时延测量,获得出主从通信时延、从主通信时延以及主从节点间的单向时延; 步骤三,将步骤二中获得的单向时延进行最小退避窗口下的限幅滤波处理,即只允许属于最小退避窗口下的单向时延限幅过滤通过,对于不属于最小退避窗口下单向时延,采用低通滤波进行处理;判断的依据是单向时延是否小于等于最小退避窗口下的单向时延限幅值; 所述的最小退避窗口下的单向时延限幅值,由应用层产生数据到形成MAC层封包的时间、最小退避窗口时MAC层等待信道空闲的时间、发送节点物理层发送数据帧的所用时间、数据帧在无线信道中传输所产生的时延、接收方物理层为 A wireless ad-hoc network IEEE1588 clock synchronization protocol-based method, comprising the steps of: a step, initializing the whole network, and determining node from the master clock node clock; two step, performed between the master clock from the clock node synchronous communication delay measurements, obtained from the master communication delay from the main delay and the communication from the one-way delay between the master node; step three, the one-way delay in step II was carried out under the minimum limit backoff window web filtering process, i.e., allowing only one-way delay clipping window belonging to the minimum backoff filtered through, for backoff window does not belong to the minimum one-way delay, a low pass filtering process; determination is based on whether the one-way delay less the minimum one-way delay retraction limit value in the window; one-way delay at the minimum limit value of the backoff window, the data generated by the application layer to the MAC layer packet formation time, the minimum backoff window MAC layer idle time waiting for a channel, the transmitted data frame transmission time for the physical layer, the data frame transmitted in a wireless channel delay generated, the physical layer of the receiver 完成数据帧的接收所花费的时间、接收方将MAC层封包解封装并提取数据交给相应应用层进程的时延六部分组成; 步骤四,将限幅处理后的单向时延通过一阶无限冲激响应滤波器进行滤波估计处理;所采取的一阶无限冲激响应滤波器的公式如下: s*y(k)-(s-1)*y (k_l) = [delay(k)+delay (k~l)]/2 (I) 式中,delay (k)为k时刻经步骤三得到的限幅处理后的单向时延,y (k)为k时刻经过步骤四后得到的单向时延,s为滤波器刚度,取整数;通过调整s调整滤波器的截止频率;系统刚开始时,s = 1,随着时间增加,逐渐增加s直到最大值; 步骤五,计算主从节点间的时钟偏差,并根据离散线性卡尔曼滤波算法实现对时钟偏差的最优化估计;其中,实施离散线性卡尔曼滤波估计算法所需要的状态方程和观测方程,如下式: Complete received data frame takes, the receiving side decapsulates the MAC layer packet and extract application layer data to the respective process delay of six sections; Step four, the one-way delay clipped by a first order process infinite impulse response filter to filter estimation process; formula taken a first order infinite impulse response filter as follows: s * y (k) - (s-1) * y (k_l) = [delay (k) + delay (k ~ l)] / 2 (I) wherein, delay (k) for the k-way delay time after the limiting process step by three obtained, y (k) at time k is obtained through steps after four way delay, s is the stiffness of the filter, rounded; s adjusted by adjusting the filter cut-off frequency; when the system is started, s = 1, increasing with time, gradually increases until a maximum value s; step five, calculating a main from the clock skew between nodes, and implemented in accordance with the discrete Kalman filter for linear optimization clock bias estimate; wherein the observation equation and the state equation implemented discrete linear Kalman filter estimation algorithm required, the following formula:
Figure CN103166730AC00021
式中,当前系统状态为k,offset (k)为主从时钟节点当前状态的时钟偏差状态值,offset (k-Ι)为主从时钟节点上一状态的时钟偏差状态值,offset (k) «为主从时钟节点当前状态的时钟偏差观测值,△ ε (k)为主从时钟节点当前状态相对于上一状态的时钟源晶振抖动差,Sd(k)为当前状态主从时延相对于单向时延的差值; 所用离散线性卡尔曼滤波算法方程组如下: Wherein, the current system state is k, offset (k) based clock offset state value from the current state of the clock node, offset (k-Ι) based clock offset state value from the state on a clock node, offset (k) «observations based clock offset from the current state of the clock nodes, △ ε (k) from the current state of the main clock jitter difference with respect to node clock source on a crystal state, Sd (k) from the current status of the master delay relative to the difference of the one-way delay; the linear discrete Kalman filter equations as follows:
Figure CN103166730AC00022
式中,offset(k|k_l)为上一状态预测的结果,offset (k_l I k_l)为上一状态最优的结果,offset(k|k)为当前状态的最优化估算值,P(k|k-1)为offset (k | k_l)对应的协方差,P(k|k)为offset (k I k)对应的协方差,Kg为卡尔曼增益,Q和R分别为过程噪声和测量噪声的方差; 步骤六,构建基于PI控制器的时钟伺服系统实现从时钟跟踪主时钟; 所述的PI控制器由比例P和积分I两个环节构成的闭环控制系统,其中比例项P用来消除输入误差,即主从时钟之间的时间偏移,积分项I用于消除系统的稳态误差,即减少主从时钟的速率差;pi控制器方程式为 Where, offset (k | k_l) is the result of a predicted state, offset (k_l I k_l) on a result of the optimal state, offset (k | k) for the current optimized state estimate, P (k | k-1) is offset (k | k_l) corresponding covariance, P (k | k) is the offset (k I k) corresponding to the covariance, Kg is the Kalman gain, Q and R are the process noise and measurement noise variance; step 6 constructed to achieve the master clock from the clock tracking servo system clock based on the PI controller; closed loop control system of the PI controller consisting of P and proportional integral two areas I, wherein the proportional term P used removing the input error, i.e., from the time offset between the master clock, the integral term I for eliminating the static error, i.e., to reduce the difference between the master and slave clock rate; PI controller equation is
Figure CN103166730AC00031
式中,offset (k)为当前时钟偏差,Ap为比例项P参数,A1为积分项I参数,y(k)为将要调整的时钟滴答频率。 Where, offset (k) for the current clock bias, Ap is a proportional parameter P, A1 is a parameter integral term I, y (k) is the frequency of the tick clock to be adjusted.
CN2013100805218A 2013-03-13 2013-03-13 Method for synchronizing time in wireless ad hoc network based on protocol of institute of electrical and electronic engineers (IEEE) 1588 CN103166730A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013100805218A CN103166730A (en) 2013-03-13 2013-03-13 Method for synchronizing time in wireless ad hoc network based on protocol of institute of electrical and electronic engineers (IEEE) 1588

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013100805218A CN103166730A (en) 2013-03-13 2013-03-13 Method for synchronizing time in wireless ad hoc network based on protocol of institute of electrical and electronic engineers (IEEE) 1588

Publications (1)

Publication Number Publication Date
CN103166730A true CN103166730A (en) 2013-06-19

Family

ID=48589488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013100805218A CN103166730A (en) 2013-03-13 2013-03-13 Method for synchronizing time in wireless ad hoc network based on protocol of institute of electrical and electronic engineers (IEEE) 1588

Country Status (1)

Country Link
CN (1) CN103166730A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103945524A (en) * 2014-04-30 2014-07-23 中国科学院上海微系统与信息技术研究所 Distributed wireless sensor network time synchronization method
CN104158647A (en) * 2014-08-26 2014-11-19 太原理工大学 Clock synchronizing method for wireless sensing network
CN104660361A (en) * 2015-02-11 2015-05-27 杨德朝 Filtering method for time synchronization of distributed network
CN105207767A (en) * 2015-10-09 2015-12-30 国网冀北电力有限公司信息通信分公司 Method and device for synchronizing frequencies of PTP master clock and slave clock
CN106685564A (en) * 2016-12-28 2017-05-17 广东大普通信技术有限公司 Phase difference measuring method and device for master clock node and calibration method and device
CN107196724A (en) * 2017-05-05 2017-09-22 深圳市汇川技术股份有限公司 A kind of multirobot control synchronization system and method based on distributed clock
CN107548147A (en) * 2017-08-11 2018-01-05 南京微平衡信息科技有限公司 A kind of wireless self-organization network is without external clock net synchronized algorithm
CN105188126B (en) * 2015-08-04 2019-04-19 西北工业大学 Distributed multihop wireless network clock synchronizing method based on mean field
CN110034839A (en) * 2019-04-22 2019-07-19 北京邮电大学 A kind of telecommunication network time service method
US10383069B2 (en) 2014-03-18 2019-08-13 Smartrek Technologies Inc. Mesh network system and techniques

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104475A (en) * 2011-01-31 2011-06-22 上海交通大学 IEEE 1588-based synchronization system and synchronization method thereof
CN102664696A (en) * 2012-03-29 2012-09-12 上海交通大学 Wireless transmission environment-oriented IEEE1588 protocol optimization system and IEEE1588 protocol optimization method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104475A (en) * 2011-01-31 2011-06-22 上海交通大学 IEEE 1588-based synchronization system and synchronization method thereof
CN102664696A (en) * 2012-03-29 2012-09-12 上海交通大学 Wireless transmission environment-oriented IEEE1588 protocol optimization system and IEEE1588 protocol optimization method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KENDALL CORRELL: "Design Considerations for Software Only Implementations", 《PROC. OF IEEE1588 STANDARD FOR A PRECISION CLOCK SYNCHRONIZATION PROTOCOL FOR NETWORKED MEASUREMENT AND CONTROL SYSTEMS》 *
庄晓燕: "基于卡尔曼滤波器的IEEE 1588时钟同步算法", 《电子测量与仪器学报》 *

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10383069B2 (en) 2014-03-18 2019-08-13 Smartrek Technologies Inc. Mesh network system and techniques
CN103945524B (en) * 2014-04-30 2017-11-10 中国科学院上海微系统与信息技术研究所 Distributed wireless Sensor Network method for synchronizing time
CN103945524A (en) * 2014-04-30 2014-07-23 中国科学院上海微系统与信息技术研究所 Distributed wireless sensor network time synchronization method
CN104158647A (en) * 2014-08-26 2014-11-19 太原理工大学 Clock synchronizing method for wireless sensing network
CN104660361A (en) * 2015-02-11 2015-05-27 杨德朝 Filtering method for time synchronization of distributed network
CN105188126B (en) * 2015-08-04 2019-04-19 西北工业大学 Distributed multihop wireless network clock synchronizing method based on mean field
CN105207767A (en) * 2015-10-09 2015-12-30 国网冀北电力有限公司信息通信分公司 Method and device for synchronizing frequencies of PTP master clock and slave clock
CN105207767B (en) * 2015-10-09 2018-08-24 国网冀北电力有限公司信息通信分公司 A kind of PTP master clocks and the method and device from Frequency Synchronization between clock
CN106685564A (en) * 2016-12-28 2017-05-17 广东大普通信技术有限公司 Phase difference measuring method and device for master clock node and calibration method and device
CN106685564B (en) * 2016-12-28 2018-10-02 深圳市英特瑞半导体科技有限公司 The difference measuring method and device and calibration method and device of master clock node
CN107196724B (en) * 2017-05-05 2019-01-29 深圳市汇川技术股份有限公司 A kind of multirobot control synchronization system and method based on distributed clock
CN107196724A (en) * 2017-05-05 2017-09-22 深圳市汇川技术股份有限公司 A kind of multirobot control synchronization system and method based on distributed clock
CN107548147A (en) * 2017-08-11 2018-01-05 南京微平衡信息科技有限公司 A kind of wireless self-organization network is without external clock net synchronized algorithm
CN110034839A (en) * 2019-04-22 2019-07-19 北京邮电大学 A kind of telecommunication network time service method

Similar Documents

Publication Publication Date Title
JP5350787B2 (en) Time synchronization method and apparatus using time stamp
RU2536178C2 (en) Method and system for precise timing through interaction between communication layers and sublayers for communication systems
Noh et al. A new approach for time synchronization in wireless sensor networks: Pairwise broadcast synchronization
CN100379306C (en) Interface device for connecting dominant base and RRU
Chaudhari et al. On maximum likelihood estimation of clock offset and skew in networks with exponential delays
Serpedin et al. Synchronization in wireless sensor networks: parameter estimation, performance benchmarks, and protocols
US20100034191A1 (en) Method and system for time synchronization in a sensor network
US20100098111A1 (en) Method and system for precise-clock synchronization, and device for precise-clock frequency/time synchronization
JP5318928B2 (en) Node in wireless system and method of synchronizing time and frequency of node
Liu et al. DA-Sync: A Doppler-assisted time-synchronization scheme for mobile underwater sensor networks
US9014282B2 (en) Precision timing in a data over cable service interface specification (DOCSIS) system
Wu et al. Cluster-based consensus time synchronization for wireless sensor networks
WO2007031005A1 (en) Method, ethernet device and ethernet for solving the clock synchronization
CN101416431B (en) Enhanced clock control in packet networks
US20120263220A1 (en) Method, device and system for clock synchronization
CN103718483A (en) Methods of time synchronisation in communications networks
CN1681265B (en) Channel quality estimation method and channel quality estimation apparatus
US8582606B2 (en) Network system with synchronization and method of operation thereof
Song et al. Optimal distributed Kalman filtering fusion with singular covariances of filtering errors and measurement noises
Mahmood et al. Clock synchronization over IEEE 802.11—A survey of methodologies and protocols
CN105099668A (en) Apparatus and method for generating secret key
Aleksic et al. Energy efficiency of femtocell deployment in combined wireless/optical access networks
EP2984893A1 (en) Systems, apparatus and methods using sync beacons in neighbor awareness networking (nan)
EP2544387B1 (en) Methods and devices for performing synchronization and compensating clock drift among communication devices
CN102148652A (en) System and method for measuring network clock synchronization

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)