CN109976442B - Slave clock information optimization method and device, electronic equipment and storage medium - Google Patents
Slave clock information optimization method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN109976442B CN109976442B CN201910364232.8A CN201910364232A CN109976442B CN 109976442 B CN109976442 B CN 109976442B CN 201910364232 A CN201910364232 A CN 201910364232A CN 109976442 B CN109976442 B CN 109976442B
- Authority
- CN
- China
- Prior art keywords
- information
- clock information
- slave clock
- processing
- master
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 77
- 238000005457 optimization Methods 0.000 title claims description 13
- 238000012545 processing Methods 0.000 claims abstract description 93
- 230000006870 function Effects 0.000 claims description 48
- 239000011159 matrix material Substances 0.000 claims description 29
- 230000008569 process Effects 0.000 claims description 29
- 238000004891 communication Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 12
- 238000005259 measurement Methods 0.000 claims description 9
- 239000013078 crystal Substances 0.000 description 35
- 238000010586 diagram Methods 0.000 description 17
- 230000005540 biological transmission Effects 0.000 description 8
- 238000004088 simulation Methods 0.000 description 7
- 230000010355 oscillation Effects 0.000 description 6
- 230000007246 mechanism Effects 0.000 description 5
- 230000004044 response Effects 0.000 description 5
- 238000001914 filtration Methods 0.000 description 4
- 238000012546 transfer Methods 0.000 description 4
- 230000032683 aging Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000005284 excitation Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 101000802640 Homo sapiens Lactosylceramide 4-alpha-galactosyltransferase Proteins 0.000 description 1
- 102100035838 Lactosylceramide 4-alpha-galactosyltransferase Human genes 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/04—Generating or distributing clock signals or signals derived directly therefrom
- G06F1/12—Synchronisation of different clock signals provided by a plurality of clock generators
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
本发明提供了一种从时钟信息优化方法、装置、电子设备及存储介质,方法包括:步骤A,获取主时钟信息;步骤B,将主时钟信息通过滑模控制器进行处理,得到第一信息;步骤C,将干扰处理后的第一信息经过被控对象函数进行处理,得到第二信息;步骤D,将加噪处理后的第二信息通过卡尔曼滤波器进行处理,得到从时钟信息;步骤E,判断主时钟信息与从时钟信息的偏差是否满足预设条件;步骤F,当主时钟信息与从时钟信息的偏差不满足预设条件时,将主时钟信息与从时钟信息的偏差输入到滑模控制器,执行步骤B‑步骤E,直至主时钟信息与从时钟信息的偏差满足预设条件时,得到目标从时钟信息。本发明降低了主从时钟偏差,实现较为精准的主从时钟同步。
The present invention provides a method, device, electronic device and storage medium for optimizing slave clock information. The method includes: step A, acquiring master clock information; step B, processing the master clock information through a sliding mode controller to obtain first information Step C, the first information after the interference processing is processed through the controlled object function to obtain the second information; Step D, the second information after the noise processing is processed by the Kalman filter to obtain slave clock information; Step E, judging whether the deviation of the master clock information and the slave clock information satisfies the preset condition; Step F, when the deviation of the master clock information and the slave clock information does not meet the preset condition, input the deviation of the master clock information and the slave clock information into the The sliding mode controller performs steps B-step E until the deviation between the master clock information and the slave clock information meets a preset condition, and obtains the target slave clock information. The invention reduces the master-slave clock deviation and realizes relatively accurate master-slave clock synchronization.
Description
技术领域technical field
本发明涉及通信技术领域,特别是涉及一种从时钟信息优化方法、装置、电子设备及存储介质。The present invention relates to the field of communication technologies, and in particular, to a method, device, electronic device and storage medium for optimizing slave clock information.
背景技术Background technique
在2008年,IEEE(Institute of Electrical and Electronics Engineers,美国电气和电子工程师协会)协议组织提出了IEEE1588V2精确时间传送协议,该协议可以实现亚微秒级精度的主从时钟同步,成为业界最热门的时间传递协议。In 2008, the IEEE (Institute of Electrical and Electronics Engineers, American Institute of Electrical and Electronics Engineers) protocol organization proposed the IEEE1588V2 precise time transfer protocol, which can achieve sub-microsecond precision master-slave clock synchronization, becoming the industry's most popular Time Transfer Protocol.
现有技术采用1588协议实现主从时钟同步的方法为,通过从时钟与主时钟快速交换报文,获取时间戳;计算相邻同步周期时间戳的值的相对差值,将该差值作为从时钟相对于主时钟频率的漂移值,通过该漂移值调整从时钟,从而实现主从时钟频率同步。The prior art adopts the 1588 protocol to realize the synchronization of the master and slave clocks as follows: by rapidly exchanging messages between the slave clock and the master clock, time stamps are obtained; The drift value of the clock relative to the master clock frequency, and the slave clock is adjusted by the drift value, so as to realize the synchronization of the master and slave clock frequencies.
发明人发现,现有采用1588协议实现主从时钟同步的方法中,时钟晶振的稳定性严重影响IEEE 1588时钟同步精度。当晶振处于较高的温度的环境下时,晶振的稳定性将大幅度降低,主要表现为从时钟晶振震荡频率发生较大的频率漂移。如果不对这种频率漂移进行及时的修正,随着时间的推移,主从时钟偏差会越来越大。因此,如何降低主从时钟偏差,进而实现较为精准的主从时钟同步仍然是亟待解决的技术问题。The inventor found that, in the existing method for realizing master-slave clock synchronization by using the 1588 protocol, the stability of the clock crystal oscillator seriously affects the IEEE 1588 clock synchronization accuracy. When the crystal oscillator is in a high temperature environment, the stability of the crystal oscillator will be greatly reduced, which is mainly manifested in the large frequency drift of the oscillator frequency of the clock crystal oscillator. If this frequency drift is not corrected in time, the master-slave clock deviation will increase over time. Therefore, how to reduce the deviation of the master-slave clocks to achieve more accurate master-slave clock synchronization is still a technical problem to be solved urgently.
发明内容SUMMARY OF THE INVENTION
本发明实施例的目的在于提供一种从时钟信息优化方法、装置、电子设备及存储介质,以实现降低主从时钟偏差,进而实现较为精准的主从时钟同步。具体技术方案如下:The purpose of the embodiments of the present invention is to provide a method, device, electronic device and storage medium for optimizing slave clock information, so as to reduce the deviation of the master and slave clocks, thereby realizing more accurate synchronization of the master and slave clocks. The specific technical solutions are as follows:
第一方面,本发明实施例公开了一种从时钟信息优化方法,所述方法包括:In a first aspect, an embodiment of the present invention discloses a method for optimizing slave clock information, the method comprising:
步骤A,获取主时钟信息;Step A, acquiring master clock information;
步骤B,将所述主时钟信息通过滑模控制器进行处理,得到第一信息;Step B, the master clock information is processed by the sliding mode controller to obtain the first information;
步骤C,对所述第一信息进行干扰处理,并将干扰处理后的所述第一信息经过被控对象函数进行处理,得到第二信息;所述被控对象函数为所述主时钟信息对应的从时钟信息的函数表达式经过拉普拉斯变换以及离散化得到的函数;Step C, performing interference processing on the first information, and processing the first information after the interference processing through the controlled object function to obtain second information; the controlled object function corresponds to the master clock information. The function expression of the clock information is obtained by Laplace transform and discretization;
步骤D,对所述第二信息进行加噪处理,并将加噪处理后的所述第二信息通过卡尔曼滤波器进行处理,得到从时钟信息;Step D, performing noise processing on the second information, and processing the second information after the noise processing through a Kalman filter to obtain slave clock information;
步骤E,判断所述主时钟信息与所述从时钟信息的偏差是否满足预设条件;Step E, judging whether the deviation of the master clock information and the slave clock information satisfies a preset condition;
步骤F,当所述主时钟信息与所述从时钟信息的偏差不满足所述预设条件时,将所述主时钟信息与所述从时钟信息的偏差输入到所述滑模控制器,执行步骤B-步骤E,直至所述主时钟信息与所述从时钟信息的偏差满足预设条件时,得到目标从时钟信息。Step F, when the deviation between the master clock information and the slave clock information does not meet the preset condition, input the deviation between the master clock information and the slave clock information into the sliding mode controller, and execute Steps B to E, until the deviation between the master clock information and the slave clock information satisfies a preset condition, obtain target slave clock information.
可选地,所述将所述主时钟信息通过滑模控制器进行处理,得到第一信息,包括:Optionally, the processing of the master clock information through a sliding mode controller to obtain the first information includes:
将所述主时钟信息输入到滑模控制器,通过所述滑模控制器的第一公式,得到第一中间值;inputting the master clock information into the sliding mode controller, and obtaining the first intermediate value through the first formula of the sliding mode controller;
通过所述滑模控制器的第二公式,得到第二中间值;Obtain the second intermediate value through the second formula of the sliding mode controller;
通过所述第一中间值及所述第二中间值,得到第三中间值;A third intermediate value is obtained through the first intermediate value and the second intermediate value;
将所述第三中间值输入所述滑模控制器的第三公式,通过所述第三公式得到第一信息。The third intermediate value is input into the third formula of the sliding mode controller, and the first information is obtained through the third formula.
可选地,所述对所述第一信息进行干扰处理,并将干扰处理后的所述第一信息经过被控对象函数进行处理,得到第二信息,包括:Optionally, performing interference processing on the first information, and processing the first information after the interference processing through a controlled object function to obtain second information, including:
对所述第一信息添加预设干扰信息,得到干扰处理后的所述第一信息;adding preset interference information to the first information to obtain the first information after interference processing;
将干扰处理后的所述第一信息经过被控对象函数进行处理,得到第二信息;其中,所述被控对象函数表示为:The first information after the interference processing is processed by the controlled object function to obtain the second information; wherein, the controlled object function is expressed as:
x(k)=Ax(k-1)+B(u(k)+ω(k))x(k)=Ax(k-1)+B(u(k)+ω(k))
y(k)=Cx(k)y(k)=Cx(k)
其中,x(k)表示当前时刻的状态变量;x(k-1)表示上一时刻的状态变量;u(k)表示所述第一信息;ω(k)表示过程噪声;A表示系统矩阵;B表示输入矩阵;表示输出矩阵;y(k)表示所述第二信息。Among them, x(k) represents the state variable of the current moment; x(k-1) represents the state variable of the previous moment; u(k) represents the first information; ω(k) represents the process noise; A represents the system matrix ; B represents the input matrix; represents the output matrix; y(k) represents the second information.
可选地,所述对所述第二信息进行加噪处理,并将加噪处理后的所述第二信息通过卡尔曼滤波器进行处理,得到从时钟信息,包括:Optionally, performing noise processing on the second information, and processing the second information after the noise processing through a Kalman filter to obtain slave clock information, including:
通过预设公式,对所述第二信息进行加噪处理;所述预设公式表示为:The second information is subjected to noise processing by a preset formula; the preset formula is expressed as:
yv(k)=y(k)+v(k)y v (k)=y(k)+v(k)
其中,yv(k)表示加噪处理后的所述第二信息;y(k)表示所述第二信息;v(k)表示测量噪声;Wherein, y v (k) represents the second information after noise processing; y(k) represents the second information; v(k) represents measurement noise;
将加噪处理后的所述第二信息通过卡尔曼滤波器的预设方程组进行计算,得到从时钟信息。The second information after the noise processing is calculated through the preset equation set of the Kalman filter to obtain the slave clock information.
第二方面,本发明实施例公开了一种从时钟信息优化装置,所述装置包括:In a second aspect, an embodiment of the present invention discloses an apparatus for optimizing slave clock information, the apparatus comprising:
主时钟信息获取模块,用于获取主时钟信息;The master clock information acquisition module is used to obtain the master clock information;
第一信息确定模块,用于将所述主时钟信息通过滑模控制器进行处理,得到第一信息;a first information determination module, configured to process the master clock information through a sliding mode controller to obtain first information;
第二信息确定模块,用于对所述第一信息进行干扰处理,并将干扰处理后的所述第一信息经过被控对象函数进行处理,得到第二信息;所述被控对象函数为所述主时钟信息对应的从时钟信息的函数表达式经过拉普拉斯变换以及离散化得到的函数;The second information determination module is configured to perform interference processing on the first information, and process the first information after the interference processing through the controlled object function to obtain second information; the controlled object function is the controlled object function. The function expression of the slave clock information corresponding to the master clock information is obtained through Laplace transform and discretization;
从时钟信息确定模块,用于对所述第二信息进行加噪处理,并将加噪处理后的所述第二信息通过卡尔曼滤波器进行处理,得到从时钟信息;A slave clock information determination module, configured to perform noise processing on the second information, and process the second information after the noise processing through a Kalman filter to obtain slave clock information;
主从时钟偏差判断模块,用于判断所述主时钟信息与所述从时钟信息的偏差是否满足预设条件;a master-slave clock deviation judgment module, configured to judge whether the deviation between the master clock information and the slave clock information satisfies a preset condition;
目标从时钟信息确定模块,用于当所述主时钟信息与所述从时钟信息的偏差不满足所述预设条件时,将所述主时钟信息与所述从时钟信息的偏差输入到所述滑模控制器,返回所述第一信息确定模块继续执行,直至所述主时钟信息与所述从时钟信息的偏差满足预设条件时,得到目标从时钟信息。A target slave clock information determination module, configured to input the deviation between the master clock information and the slave clock information to the The sliding mode controller returns to the first information determination module and continues to execute until the deviation between the master clock information and the slave clock information satisfies a preset condition, and obtains target slave clock information.
可选地,所述第一信息确定模块,包括:Optionally, the first information determination module includes:
第一中间值确定子模块,用于将所述主时钟信息输入到滑模控制器,通过所述滑模控制器的第一公式,得到第一中间值;a first intermediate value determination submodule, configured to input the master clock information to the sliding mode controller, and obtain the first intermediate value through the first formula of the sliding mode controller;
第二中间值确定子模块,用于通过所述滑模控制器的第二公式,得到第二中间值;The second intermediate value determination submodule is configured to obtain the second intermediate value through the second formula of the sliding mode controller;
第三中间值确定子模块,用于通过所述第一中间值及所述第二中间值,得到第三中间值;a third intermediate value determination submodule, configured to obtain a third intermediate value through the first intermediate value and the second intermediate value;
第一信息确定子模块,用于将所述第三中间值输入所述滑模控制器的第三公式,通过所述第三公式得到第一信息。The first information determination sub-module is configured to input the third intermediate value into a third formula of the sliding mode controller, and obtain the first information through the third formula.
可选地,所述第二信息确定模块,包括:Optionally, the second information determination module includes:
干扰处理子模块,用于对所述第一信息添加预设干扰信息,得到干扰处理后的所述第一信息;an interference processing sub-module, configured to add preset interference information to the first information to obtain the first information after interference processing;
第二信息确定子模块,用于将干扰处理后的所述第一信息经过被控对象函数进行处理,得到第二信息;其中,所述被控对象函数表示为:The second information determination sub-module is used to process the first information after the interference processing through the controlled object function to obtain the second information; wherein, the controlled object function is expressed as:
x(k)=Ax(k-1)+B(u(k)+ω(k))x(k)=Ax(k-1)+B(u(k)+ω(k))
y(k)=Cx(k)y(k)=Cx(k)
其中,x(k)表示当前时刻的状态变量;x(k-1)表示上一时刻的状态变量;u(k)表示所述第一信息;ω(k)表示过程噪声;A表示系统矩阵;B表示输入矩阵;表示输出矩阵;y(k)表示所述第二信息。Among them, x(k) represents the state variable of the current moment; x(k-1) represents the state variable of the previous moment; u(k) represents the first information; ω(k) represents the process noise; A represents the system matrix ; B represents the input matrix; represents the output matrix; y(k) represents the second information.
可选地,所述从时钟信息确定模块,包括:Optionally, the slave clock information determination module includes:
加噪处理子模块,用于通过预设公式,对所述第二信息进行加噪处理;所述预设公式表示为:A noise addition processing sub-module, configured to perform noise addition processing on the second information through a preset formula; the preset formula is expressed as:
yv(k)=y(k)+v(k)y v (k)=y(k)+v(k)
其中,yv(k)表示加噪处理后的所述第二信息;y(k)表示所述第二信息;v(k)表示测量噪声;Wherein, y v (k) represents the second information after noise processing; y(k) represents the second information; v(k) represents measurement noise;
从时钟信息确定子模块,用于将加噪处理后的所述第二信息通过卡尔曼滤波器的预设方程组进行计算,得到从时钟信息。The slave clock information determination sub-module is configured to calculate the second information after noise processing through the preset equation set of the Kalman filter to obtain slave clock information.
第三方面,本发明实施例公开了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口、所述存储器通过所述通信总线完成相互间的通信;In a third aspect, an embodiment of the present invention discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Communication;
所述存储器,用于存放计算机程序;the memory for storing computer programs;
所述处理器,用于执行所述存储器上所存放的程序时,实现上述从时钟信息优化方法中任一所述的方法步骤。The processor is configured to implement the method steps described in any one of the above methods for optimizing slave clock information when executing the program stored in the memory.
第四方面,本发明实施例公开了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时,实现上述从时钟信息优化方法中任一所述的方法步骤。In a fourth aspect, an embodiment of the present invention discloses a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above methods for optimizing slave clock information is implemented. a described method step.
在本发明实施例提供的一种从时钟信息优化方法、装置、电子设备及存储介质中,首先利用滑模控制器对从时钟信息与主时钟信息的偏差进行处理,可实现对主从时钟晶振频率漂移进行有效控制和优化,然后采用卡尔曼滤波器对滑模控制器输出信息进行处理,可实现对从时钟晶振抖动和随机误差等外界干扰影响的有效抑制,进而得到从时钟信息与主时钟信息的偏差满足预设条件对应的目标从时钟信息。得到的该目标从时钟信息减小了从时钟晶振震荡频率漂移以及从时钟晶振抖动和随机误差对从时钟信息准确性的影响,进而有效降低了主从时钟偏差,实现了较为精准的主从时钟同步。In a method, device, electronic device, and storage medium for optimizing slave clock information provided by the embodiments of the present invention, first, a sliding mode controller is used to process the deviation between slave clock information and master clock information, so that the master-slave clock crystal oscillator can be optimized. The frequency drift is effectively controlled and optimized, and then the Kalman filter is used to process the output information of the sliding mode controller, which can effectively suppress the influence of external interference such as slave clock crystal oscillator jitter and random error, and then obtain the slave clock information and master clock. The deviation of the information satisfies the target slave clock information corresponding to the preset condition. The obtained target slave clock information reduces the oscillation frequency drift of the slave clock crystal oscillator and the influence of the slave clock crystal oscillator jitter and random error on the accuracy of the slave clock information, thereby effectively reducing the master-slave clock deviation and realizing a relatively accurate master-slave clock. Synchronize.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.
图1为本发明实施例的精确时间协议PTP延时响应机制示意图;1 is a schematic diagram of a PTP delay response mechanism of the Precision Time Protocol according to an embodiment of the present invention;
图2为本发明实施例的一种从时钟信息优化方法流程图;2 is a flowchart of a method for optimizing slave clock information according to an embodiment of the present invention;
图3为本发明实施例的一种从时钟信息优化系统框架图;3 is a frame diagram of a slave clock information optimization system according to an embodiment of the present invention;
图4为本发明实施例的一种从时钟信息优化方法中采用加卡尔曼滤波器与现有技术中未采卡尔曼滤波器处理结果仿真对比图;Fig. 4 is a kind of simulation comparison diagram of the processing result of adopting adding Kalman filter and not adopting Kalman filter in the prior art from the clock information optimization method according to the embodiment of the present invention;
图5为本申请实施例的一种从时钟信息优化方法中采用T=1s的同步周期的仿真结果图;5 is a simulation result diagram of adopting a synchronization period of T=1s in a method for optimizing slave clock information according to an embodiment of the application;
图6为本发明实施例的一种主从时钟信息中主从时钟在不同同步周期下仿真结果对比图;6 is a comparison diagram of simulation results of master-slave clocks in different synchronization periods in master-slave clock information according to an embodiment of the present invention;
图7为本发明实施例的一种从时钟信息优化装置结构示意图;7 is a schematic structural diagram of an apparatus for optimizing slave clock information according to an embodiment of the present invention;
图8为本发明实施例的一种电子设备结构示意图。FIG. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
在1588协议的时间同步研究中,主从时间同步精度与时钟晶振的频率漂移、频率抖动、随机误差都有关系,本申请采用的卡尔曼滤波器与滑模控制器来实现对从时钟的这三个因素控制并优化,从而实现主从时间高精度同步。In the time synchronization research of the 1588 protocol, the master-slave time synchronization accuracy is related to the frequency drift, frequency jitter and random error of the clock crystal oscillator. The Kalman filter and sliding mode controller used in this application are used to realize this synchronization of the slave clock. Three factors are controlled and optimized to achieve high-precision synchronization of master and slave time.
首先介绍协议时间同步原理和影响因素,PTP(Precision Time Protocol,精确时间协议)的精确时钟同步原理,所提出的延时响应机制,主要分为六个步骤。参见图1所示本发明实施例的精确时间协议PTP延时响应机制示意图。在图1中,a为sync同步报文,b为Follow_up跟随报文,c为Delay_req延迟请求报文,d为Delay_resq延迟请求响应报文,Master为主时钟,Slave为从时钟。延迟响应同步机制的报文收发过程如下:First, the principle and influencing factors of protocol time synchronization, the principle of precise clock synchronization of PTP (Precision Time Protocol, Precision Time Protocol), and the proposed delay response mechanism are mainly divided into six steps. Refer to the schematic diagram of the PTP delay response mechanism of the Precision Time Protocol according to the embodiment of the present invention shown in FIG. 1 . In Figure 1, a is the sync synchronization message, b is the Follow_up message, c is the Delay_req delay request message, d is the Delay_resq delay request response message, the Master is the master clock, and the Slave is the slave clock. The packet sending and receiving process of the delayed response synchronization mechanism is as follows:
主时钟周期性的发出sync报文,并记录下sync报文离开主时钟的精确发送时间t1。主时钟将精确发送时间t1封装到Follow_up报文中,发送给从时钟。从时钟记录sync报文到达从时钟的精确时到达时间t2。从时钟发出delay_req报文并且记录下精确发送时间t3。主时钟记录下delay_req报文到达主时钟的精确到达时间t4。主时钟发出携带精确时间戳信息t4的delay_resp报文给从时钟。该机制主从时钟的时间偏差为offset;报文在网络中传输的平均时延为delay;假设同步报文的传输链路的时延是对称的可以得到:The master clock periodically sends out sync packets, and records the precise sending time t1 when the sync packets leave the master clock. The master clock encapsulates the precise sending time t1 into a Follow_up message and sends it to the slave clock. The slave clock records the precise arrival time t2 when the sync message arrives at the slave clock. The delay_req message is sent from the clock and the precise sending time t3 is recorded. The master clock records the precise arrival time t4 at which the delay_req message arrives at the master clock. The master clock sends a delay_resp message carrying the precise timestamp information t4 to the slave clock. The time deviation of the master and slave clocks of this mechanism is offset; the average delay of packet transmission in the network is delay; assuming that the delay of the transmission link of the synchronization packet is symmetrical, we can obtain:
根据上述两式,分别可得到时间偏差offset和平均时延delay。According to the above two formulas, the time offset offset and the average delay delay can be obtained respectively.
1588协议的高精度时钟同步协议是基于理想化情况的,而在实际网络测量和控制系统中,会有很多的影响因素,比如时间戳精确度、传输链路不对称性、网络延时固有抖动、主从时钟晶振漂移与抖动等因素。要实现1588协议的高精度主从时钟同步,影响较大的是传输链路不对称和主从时钟晶振漂移与抖动两个因素。在时间偏差offset和平均时延delay的计算中,就是假设报文在网络中传输链路是对称的,但是在实际网络的传输会经过交换机等设备会导致报文在传输的来回路径时延的不相等问题。申请主要研究主从时钟晶振漂移的影响,因此,此处按照一般的控制变量法,假设报文在网络中的传输链路是对称的。The high-precision clock synchronization protocol of the 1588 protocol is based on an idealized situation. In actual network measurement and control systems, there will be many influencing factors, such as timestamp accuracy, transmission link asymmetry, and inherent jitter in network delay. , Master-slave clock crystal oscillator drift and jitter and other factors. To achieve the high-precision master-slave clock synchronization of the 1588 protocol, the two factors that have a greater impact are the asymmetry of the transmission link and the drift and jitter of the master-slave clock crystal oscillator. In the calculation of time deviation offset and average delay delay, it is assumed that the transmission link of the packet in the network is symmetrical, but in the actual network transmission will pass through switches and other devices, which will cause the packet to be transmitted in the round-trip path delay. Inequality problem. The application mainly studies the influence of the drift of the master and slave clock crystal oscillators. Therefore, according to the general control variable method, it is assumed that the transmission link of the packet in the network is symmetrical.
本申请的一种从时钟信息优化方法,基于滑模控制和卡尔曼滤波器的1588协议时间同步将现阶段研究热点的滑模控制器、卡尔曼滤波器、1588协议有效的有机结合起来,从而实现1588协议更高精度的时间同步。针对主从时钟晶振频率漂移引起的近似线性增长的误差,本申请采用滑模控制实现对其有效的控制与优化;而针对时钟频率抖动和外界干扰等引起的随机误差,本申请采用卡尔曼滤波器实现对随机误差等噪声的滤波,实现有效的抑制。具体方法以下实施例中详细说明。A method for optimizing slave clock information of the present application, based on sliding mode control and Kalman filter 1588 protocol time synchronization, effectively and organically combines sliding mode controller, Kalman filter, and 1588 protocol, which are currently hot research topics, so as to Realize higher-precision time synchronization of 1588 protocol. For the approximately linearly increasing error caused by the frequency drift of the master-slave clock crystal oscillator, the application uses sliding mode control to achieve effective control and optimization; and for the random error caused by clock frequency jitter and external interference, the application uses Kalman filtering. The device realizes the filtering of noise such as random errors and achieves effective suppression. The specific method is described in detail in the following examples.
第一方面,本发明实施例公开了一种从时钟信息优化方法,如图2所示。图2为本发明实施例公开的一种从时钟信息优化方法流程图,方法包括:In a first aspect, an embodiment of the present invention discloses a method for optimizing slave clock information, as shown in FIG. 2 . FIG. 2 is a flowchart of a method for optimizing slave clock information disclosed in an embodiment of the present invention. The method includes:
S201,获取主时钟信息。S201, obtain master clock information.
在申请中,将主时钟信息设为一个标准时钟源,从时钟所表达的时间是本地晶振的震荡频率的时间累积。晶振的震荡频率不仅取决于晶振的材质、切角、形状、老化等固有特性,而且还与其所处的外部环境如温度,湿度,压力等有关。由于环境温度、晶振自身老化等因素的影响,晶振会产生一定的误差并随时间累积,从而导致从时钟与主时钟间产生误差偏移,严重影响同步精度。晶振的自身老化对晶振的频率漂移产生的影响相对缓慢,而环境温度会对晶振产生实时的影响。In the application, the master clock information is set as a standard clock source, and the time expressed by the slave clock is the time accumulation of the oscillation frequency of the local crystal oscillator. The oscillation frequency of the crystal oscillator not only depends on the inherent characteristics of the crystal oscillator's material, cut angle, shape, aging, etc., but also on its external environment such as temperature, humidity, pressure, etc. Due to the influence of factors such as ambient temperature and the aging of the crystal oscillator itself, the crystal oscillator will generate certain errors and accumulate over time, resulting in an error offset between the slave clock and the master clock, which seriously affects the synchronization accuracy. The crystal oscillator's own aging has a relatively slow effect on the crystal oscillator's frequency drift, while the ambient temperature will have a real-time impact on the crystal oscillator.
本步骤中获取主时钟信息,该主时钟信息可为具体的时间,或者为实施人员自定义的初始值。将主时钟信息设为:M(t)=t。In this step, the master clock information is obtained, and the master clock information may be a specific time or an initial value customized by the implementer. Set the master clock information as: M(t)=t.
S202,将主时钟信息通过滑模控制器进行处理,得到第一信息。S202, the master clock information is processed by the sliding mode controller to obtain first information.
本步骤中将主时钟信息输入到滑模控制器,通过基于指数趋近律的滑模控制器首先对时钟晶振频率漂移进行有效控制和优化。输入的主时钟信息可用yd表示。In this step, the master clock information is input to the sliding mode controller, and the frequency drift of the clock crystal oscillator is effectively controlled and optimized through the sliding mode controller based on the exponential reaching law. The input master clock information can be represented by yd.
可选地,S202中将主时钟信息通过滑模控制器进行处理,得到第一信息,包括:Optionally, in S202, the master clock information is processed by the sliding mode controller to obtain the first information, including:
步骤1,将主时钟信息输入到滑模控制器,通过滑模控制器的第一公式,得到第一中间值;
该滑模控制器的第一公式表示为:The first formula of the sliding mode controller is expressed as:
yd (k+1)=2yd (k)-yd (k-1) y d (k+1)=2 y d (k) -y d (k-1)
其中,yd(k)对应于滑模控制器当前输入信息的位置指令,首次输入即为主时钟信息对应的位置指令;yd(k-1)对应于滑模控制器的上一次输入信息的位置指令,在主时钟信息为滑模控制器的首次输入时实施人员可为yd(k-1)设置初始值;yd(k+1)对应于滑模控制器的下一次输入信息的位置指令。Among them, y d (k) corresponds to the position command of the current input information of the sliding mode controller, and the first input is the position command corresponding to the master clock information; y d (k-1) corresponds to the last input information of the sliding mode controller. When the master clock information is the first input of the sliding mode controller, the implementer can set the initial value of y d (k-1); y d (k+1) corresponds to the next input information of the sliding mode controller position command.
通过该第一公式可得到第一中间值yd(k+1)。The first intermediate value y d (k+1) can be obtained by this first formula.
步骤2,通过滑模控制器的第二公式,得到第二中间值;
该滑模控制器的第一公式表示为:The first formula of the sliding mode controller is expressed as:
dyd (k+1)=2dyd (k)-dyd (k-1) dy d (k+1)=2 dy d (k) -dy d (k-1)
其中,dyd(k)对应于滑模控制器当前输入信息的位置指令的变化率;dyd(k-1)对应于滑模控制器的上一次输入信息的位置指令的变化率;dyd(k+1)对应于滑模控制器的下一次输入信息的位置指令的变化率。Among them, dy d (k) corresponds to the change rate of the position command of the current input information of the sliding mode controller; dy d (k-1) corresponds to the change rate of the position command of the last input information of the sliding mode controller; dy d (k+1) corresponds to the rate of change of the position command of the next input information of the sliding mode controller.
通过该第二公式可得到第二中间值yd(k+1)、dyd(k)。The second intermediate values y d (k+1) and dy d (k) can be obtained through the second formula.
步骤3,通过第一中间值及第二中间值,得到第三中间值。Step 3: Obtain a third intermediate value through the first intermediate value and the second intermediate value.
本步骤中计算得到Yd=[yd(k)dyd(k)]T及Yd1=[yd(k+1)dyd(k+1)]T,以及得到切换函数s(k)=Ce(Yd-x)。In this step, Y d =[y d (k)dy d (k)] T and Y d1 =[y d (k+1)dy d (k+1)] T are calculated, and the switching function s(k )=C e (Y d -x).
步骤4,将第三中间值输入滑模控制器的第三公式,通过第三公式得到第一信息。Step 4: Input the third intermediate value into the third formula of the sliding mode controller, and obtain the first information through the third formula.
该滑模控制器的第三公式表示为:The third formula of the sliding mode controller is expressed as:
u(k)=(CeB)-1(CeYd1-CeAx(k)-s(k)-ds(k))u(k)=(C e B) -1 (C e Y d1 -C e Ax(k)-s(k)-ds(k))
其中,u(k)表示通过指数趋近律的滑模控制得到的第一信息;Ce表示滑模控制器系数矩阵,满足Hurwitz条件,Ce=[c 1],c为常数且c>0;B表示输入矩阵;Yd1=[yd(k+1)dyd(k+1)]T;A表示系统矩阵;x(k)表示输入到滑模控制器的信息,第一次为主时钟信息,以后为从时钟信息与主时钟信息的偏差;s(k)表示切换函数,s(k)=Ce(Yd-x);ds(k)=-εTsgn(s(k))-qTs(k),ε表示,T表示报文的同步周期,sgn()表示阶跃函数,q表示指数项系数。Among them, u(k) represents the first information obtained by the sliding mode control of the exponential reaching law; C e represents the sliding mode controller coefficient matrix, which satisfies the Hurwitz condition, C e =[c 1], c is a constant and c>0; B represents the input matrix; Y d1 =[y d (k+1)dy d (k+1)] T ; A represents the system matrix; x(k) represents the information input to the sliding mode controller, the first time Master clock information, and later the deviation between slave clock information and master clock information; s(k) represents the switching function, s(k)=C e (Y d -x); ds(k)=-εTsgn(s(k ))-qTs(k), ε represents, T represents the synchronization period of the message, sgn() represents the step function, and q represents the exponential term coefficient.
S203,对第一信息进行干扰处理,并将干扰处理后的第一信息经过被控对象函数进行处理,得到第二信息;被控对象函数为主时钟信息对应的从时钟信息的函数表达式经过拉普拉斯变换以及离散化得到的函数。S203, performing interference processing on the first information, and processing the first information after the interference processing through the controlled object function to obtain second information; the controlled object function corresponds to the function expression of the slave clock information corresponding to the master clock information through The Laplace transform and the discretized function.
本步骤的被控对象函数是由状态和输入导致输出变化的过程,通过被控对象函数将滑模控制器输出的信息进行优化处理,得到第二信息。The controlled object function in this step is a process in which the output changes due to the state and input, and the information output by the sliding mode controller is optimized through the controlled object function to obtain the second information.
被控对象的传递函数由从时钟信息的函数表达式进行拉普拉斯变换则并离散化得到的。The transfer function of the controlled object is obtained by performing Laplace transform from the functional expression of the clock information and discretizing it.
从时钟信息的函数表达式为: The functional expression of the slave clock information is:
其中,为受温度影响从时钟信号的频率偏移率,u(t)为产生的随机误差。in, is the frequency offset rate of the slave clock signal affected by temperature, and u(t) is the random error generated.
将从时钟信息的函数表达式进行拉普拉斯变换则可得到滑模控制器系统的被控对象传递函数, The controlled object transfer function of the sliding mode controller system can be obtained by performing Laplace transform from the functional expression of the clock information,
其中,s、S2表示通过拉普拉斯变换后的变量;按照上述公式进行离散采样,例如采用取样时间Ts为0.001s,将上述公式离散为本申请的被控对象函数。Among them, s and S 2 represent the variables after Laplace transformation; discrete sampling is performed according to the above formula, for example, the sampling time Ts is 0.001s, and the above formula is discretized as the controlled object function of the application.
可选地,S203中对第一信息进行干扰处理,并将干扰处理后的第一信息经过被控对象函数进行处理,得到第二信息,包括:Optionally, in S203, interference processing is performed on the first information, and the first information after the interference processing is processed through the controlled object function to obtain second information, including:
步骤a,对第一信息添加预设干扰信息,得到干扰处理后的第一信息。Step a, adding preset interference information to the first information to obtain first information after interference processing.
本步骤中,对第一信息添加预设干扰信息w,则干扰处理后的第一信息可表示为u(k)=u(k)+wn(k)。In this step, the preset interference information w is added to the first information, and the first information after interference processing can be expressed as u(k)=u(k)+wn(k).
步骤b,将干扰处理后的第一信息经过被控对象函数进行处理,得到第二信息;其中,被控对象函数表示为:Step b, the first information after the interference processing is processed by the controlled object function to obtain the second information; wherein, the controlled object function is expressed as:
x(k)=Ax(k-1)+B(u(k)+ω(k))x(k)=Ax(k-1)+B(u(k)+ω(k))
y(k)=Cx(k)y(k)=Cx(k)
其中,x(k)表示当前时刻的状态变量;x(k-1)表示上一时刻的状态变量;u(k)表示第一信息;ω(k)表示过程噪声;A表示系统矩阵;B表示输入矩阵;C表示输出矩阵;y(k)表示第二信息。Among them, x(k) represents the state variable of the current moment; x(k-1) represents the state variable of the previous moment; u(k) represents the first information; ω(k) represents the process noise; A represents the system matrix; B represents the input matrix; C represents the output matrix; y(k) represents the second information.
S204,对第二信息进行加噪处理,并将加噪处理后的第二信息通过卡尔曼滤波器进行处理,得到从时钟信。S204 , performing noise addition processing on the second information, and processing the second information after the noise addition processing through a Kalman filter to obtain a slave clock signal.
本步骤通过卡尔曼滤波实现对时钟晶振抖动和随机误差等外界干扰影响的有效抑制。In this step, Kalman filtering is used to effectively suppress the influence of external disturbances such as clock crystal oscillator jitter and random errors.
可选地,S204中对第二信息进行加噪处理,并将加噪处理后的第二信息通过卡尔曼滤波器进行处理,得到从时钟信息,包括:Optionally, in S204, noise processing is performed on the second information, and the second information after the noise processing is processed by a Kalman filter to obtain slave clock information, including:
步骤1),通过预设公式,对第二信息进行加噪处理;预设公式表示为:Step 1), performing noise processing on the second information through a preset formula; the preset formula is expressed as:
yv(k)=y(k)+v(k)y v (k)=y(k)+v(k)
其中,yv(k)表示加噪处理后的第二信息;y(k)表示第二信息;v(k)表示测量噪声。Wherein, y v (k) represents the second information after noise processing; y(k) represents the second information; v(k) represents the measurement noise.
步骤2),将加噪处理后的第二信息通过卡尔曼滤波器的预设方程组进行计算,得到从时钟信息。Step 2), calculating the second information after the noise addition processing through the preset equation system of the Kalman filter to obtain the slave clock information.
该卡尔曼滤波器的预设方程组表示为:The preset equation system for this Kalman filter is expressed as:
x(k)=Ax(k-1)+Mn(k)(yv(k)-CAx(k-1))x(k)=Ax(k-1)+M n (k)(y v (k)-CAx(k-1))
ye(k)=Cx(k)y e (k)=Cx(k)
其中,Mn(k)表示混合因子或残余的增益;A表示系统矩阵;B表示输入变量的矩阵;C表示输出矩阵;P(k)表示后验估计协方差;表示k时刻的先验估计协方差的中间计算结果;R表示;P(k-1)表示;Q表示过程激励噪声协方差;x(k)表示卡尔曼滤波器的当前时刻状态方程;yv(k)表示加噪处理后的第二信息;x(k-1)表示卡尔曼滤波器的上一时刻状态方程;ye(k)表示输出的从时钟信息,在形式上可用ye表示。Among them, M n (k) represents the gain of mixing factor or residual; A represents the system matrix; B represents the matrix of input variables; C represents the output matrix; P(k) represents the posterior estimated covariance; Represents the intermediate calculation result of the prior estimated covariance at time k; R represents; P(k-1) represents; Q represents the process excitation noise covariance; x(k) represents the current state equation of the Kalman filter; y v (k) represents the second information after noise processing; x(k-1) represents the state equation of the Kalman filter at the last moment; y e (k) represents the output slave clock information, which can be represented by ye in form.
S205,判断主时钟信息与从时钟信息的偏差是否满足预设条件。S205: Determine whether the deviation between the master clock information and the slave clock information satisfies a preset condition.
本发明实施例中,预设条件为趋近于零的预设数值,具体数值由实施人员设定。本步骤中判断从时钟信息与主时钟信息的偏差是否等于或小于阈值。即为判断主时钟yd-ye的差值是否等于或小于阈值。yd-ye的差值在物理上的含义为上的主从时钟之间的时间偏差offset:In the embodiment of the present invention, the preset condition is a preset value close to zero, and the specific value is set by the implementer. In this step, it is judged whether the deviation between the slave clock information and the master clock information is equal to or less than a threshold. That is to judge whether the difference between the master clocks yd-ye is equal to or smaller than the threshold. The physical meaning of the difference between yd-ye is the time offset offset between the master and slave clocks:
S206,当主时钟信息与从时钟信息的偏差不满足预设条件时,将主时钟信息与从时钟信息的偏差输入到滑模控制器,执行S202-S205,直至主时钟信息与从时钟信息的偏差满足预设条件时,得到目标从时钟信息。S206, when the deviation between the master clock information and the slave clock information does not meet the preset condition, input the deviation between the master clock information and the slave clock information to the sliding mode controller, and execute S202-S205 until the deviation between the master clock information and the slave clock information is reached When the preset conditions are met, the target slave clock information is obtained.
当上述S205中判断yd-ye的差值大于阈值时,将yd-ye的差值在输入到的滑模控制器,继续执行S202-S205,直到yd-ye的差值等于或小于阈值时结束。将此时对应的从时钟信息作为目标从时钟信息,说明此时优化了频率偏移率和随机误差对从时钟准确性的影响,此时的目标从时钟信息较为准确,进而较为准确的实现了主从时钟同步。When it is determined in the above S205 that the difference between yd and ye is greater than the threshold, the difference between yd and ye is input to the sliding mode controller, and the execution of S202 to S205 is continued until the difference between yd and ye is equal to or less than the threshold. . Taking the corresponding slave clock information at this time as the target slave clock information, it shows that the influence of the frequency offset rate and random error on the accuracy of the slave clock is optimized at this time. Master and slave clock synchronization.
在本发明实施例提供的一种从时钟信息优化方法中,首先利用滑模控制器对从时钟信息与主时钟信息的偏差进行处理,可实现对主从时钟晶振频率漂移进行有效控制和优化,然后采用卡尔曼滤波器对滑模控制器输出信息进行处理,可实现对从时钟晶振抖动和随机误差等外界干扰影响的有效抑制,进而得到从时钟信息与主时钟信息的偏差满足预设条件对应的目标从时钟信息。得到的该目标从时钟信息减小了从时钟晶振震荡频率漂移以及从时钟晶振抖动和随机误差对从时钟信息准确性的影响,进而有效降低了主从时钟偏差,实现了较为精准的主从时钟同步。In a method for optimizing slave clock information provided by an embodiment of the present invention, first, a sliding mode controller is used to process the deviation between the slave clock information and the master clock information, so as to effectively control and optimize the frequency drift of the master and slave clock crystal oscillators. Then the Kalman filter is used to process the output information of the sliding mode controller, which can effectively suppress the influence of external interference such as slave clock crystal oscillator jitter and random error, and then obtain the corresponding deviation between the slave clock information and the master clock information that meets the preset conditions. The target slave clock information. The obtained target slave clock information reduces the oscillation frequency drift of the slave clock crystal oscillator and the influence of the slave clock crystal oscillator jitter and random error on the accuracy of the slave clock information, thereby effectively reducing the master-slave clock deviation and realizing a more accurate master-slave clock. Synchronize.
为了更好的说明本发明的一种从时钟信息优化方法,可有如图3所示的本发明实施例的一种从时钟信息优化系统框架图。In order to better illustrate a method for optimizing slave clock information of the present invention, there may be a frame diagram of a system for optimizing slave clock information according to an embodiment of the present invention as shown in FIG. 3 .
在本发明实施例中,首先将主时钟信息yd输入到滑模控制器,通过该滑模控制器进行处理,得到第一信息;对第一信息加入控制干扰w,并将加入控制干扰后第一信息经过被控对象函数进行处理,得到第二信息;对从被控对象函数处理后的第二信息加入测量噪声v,将加入测量噪声v后的第二信息输入到卡尔曼滤波器;通过卡尔曼滤波器对信息进行处理,输出得到从时钟信息ye;计算yd-ye的差值,判断yd-ye的差值是否满足预设条件,当yd-ye的差值不满足预设条件时,将yd-ye的差值输入到滑模控制器,重复执行上述步骤,直至yd-ye的差值预设条件时,将此时ye的值作为目标从时钟信息。In the embodiment of the present invention, firstly, the master clock information yd is input to the sliding mode controller, and the first information is obtained by processing by the sliding mode controller; the control disturbance w is added to the first information, and the first information after the control disturbance is added. The first information is processed by the controlled object function to obtain the second information; the measurement noise v is added to the second information processed from the controlled object function, and the second information after adding the measurement noise v is input into the Kalman filter; The Kalman filter processes the information, and outputs the slave clock information ye; calculates the difference between yd-ye and determines whether the difference between yd-ye meets the preset conditions, and when the difference between yd-ye does not meet the preset conditions , input the difference of yd-ye to the sliding mode controller, and repeat the above steps until the preset condition of the difference of yd-ye is reached, and the value of ye at this time is used as the target slave clock information.
以下可采用simulink仿真说明本发明实施例的优点。The advantages of the embodiments of the present invention may be described below by using simulink simulation.
针对本申请的一种从时钟信息优化方法,可设置系统矩阵输入矩阵输入矩阵C=[1 0];传输矩阵D=0;白噪声信号ω(k)为[-0.8 0.8];白噪声信号v(k)为[-0.001 0.001],卡尔曼滤波器中过程激励噪声协方差Q=10;观察噪声协方差R=10;滑模控制器中,系数矩阵Ce中的常数c=25;趋近切换面的速率ε=130;指数项系数q=280;设置初始的主时钟信息与从时钟信息的偏差为0.000001s;主时钟信息与从时钟信息的偏差阈值为10us;将主时钟信息与从时钟信息的偏差offset加卡尔曼滤波器与未加时卡尔曼滤波器的结果进行对比,该比较图可参见图4。图4为本发明实施例的一种从时钟信息优化方法中采用加卡尔曼滤波器与现有技术中未采卡尔曼滤波器处理结果仿真对比图。图4中offset1表示本申请的加卡尔曼滤波器的结果,offset2表示现有技术未加卡尔曼滤波器即自然状态下的结果。Aiming at a method for optimizing slave clock information of the present application, a system matrix can be set input matrix Input matrix C=[1 0]; transmission matrix D=0; white noise signal ω(k) is [-0.8 0.8]; white noise signal v(k) is [-0.001 0.001], the process excitation in Kalman filter Noise covariance Q=10; observation noise covariance R=10; in sliding mode controller, constant c=25 in coefficient matrix C e ; rate of approaching switching surface ε=130; exponential term coefficient q=280; setting The deviation between the initial master clock information and the slave clock information is 0.000001s; the deviation threshold between the master clock information and the slave clock information is 10us; the offset between the master clock information and the slave clock information is added with Kalman filter and Kalman without time addition. The results of the filters are compared, and the comparison diagram can be seen in Figure 4. FIG. 4 is a simulation comparison diagram of a processing result of a slave clock information optimization method using a Kalman filter and a Kalman filter not used in the prior art according to an embodiment of the present invention. In FIG. 4 , offset1 represents the result of adding the Kalman filter of the present application, and offset2 represents the result in the natural state without adding the Kalman filter in the prior art.
从图4中可知,当未将主从时钟进行同步时,时间偏差近似成线性增长,并伴随着微小的抖动,但是进过卡尔曼滤波器过滤之后,曲线明显变得光滑,抖动更加的小了,时间偏差的抖动得到显著的抑制。由此可见,本申请采用卡尔曼滤波器对提高1588协议的主从时间同步精度有一定的作用。It can be seen from Figure 4 that when the master and slave clocks are not synchronized, the time deviation increases approximately linearly and is accompanied by a small jitter, but after filtering through the Kalman filter, the curve becomes obviously smoother, and the jitter is even smaller , the jitter of the time deviation is significantly suppressed. It can be seen that the Kalman filter used in this application has a certain effect on improving the master-slave time synchronization accuracy of the 1588 protocol.
当采用T=1s的同步周期时,通过本申请的一种从时钟信息优化方法的结果图可参见图5。图5为本申请实施例的一种从时钟信息优化方法中采用T=1s的同步周期的仿真结果图。When a synchronization period of T=1s is used, the result diagram of a method for optimizing slave clock information according to the present application can be seen in FIG. 5 . FIG. 5 is a simulation result diagram of adopting a synchronization period of T=1s in a method for optimizing slave clock information according to an embodiment of the present application.
从图5中可知,本申请的从时钟信息优化方法中经过卡尔曼滤波器和滑模控制器的处理,主从时间偏差offset不仅由时钟频率漂移引起的近似线性增长的部分得到有效的抑制与优化,而且由从时钟频率抖动引起的随机误差也得到很好的控制,使得offset在5s内快速收敛到一个极小值附近,曲线变得更加的光滑,并且保持很大程度的稳定。由此可见,本申请的从时钟信息优化方法中,通过滑模控制器和卡尔曼滤波器实现对1588协议的主从时间同步精度提高的方案有很大的实用性和可行性。It can be seen from Fig. 5 that, in the slave clock information optimization method of the present application, through the processing of Kalman filter and sliding mode controller, the master-slave time offset offset is not only effectively suppressed by the approximate linear increase caused by clock frequency drift and Optimization, and the random error caused by the jitter of the slave clock frequency is also well controlled, so that the offset quickly converges to a minimum value within 5s, the curve becomes smoother, and remains largely stable. It can be seen that, in the slave clock information optimization method of the present application, the scheme of improving the master-slave time synchronization accuracy of the 1588 protocol through the sliding mode controller and the Kalman filter has great practicability and feasibility.
将三种不同同步周期(T1=0.1s,T2=0.5s,T3=1.0s)的主从时钟信息采用本申请的从时钟信息优化方法进行处理,可得到图6所示的结果比较图。图6为本发明实施例的一种主从时钟信息中主从时钟在不同同步周期下仿真结果对比图。The master-slave clock information of three different synchronization periods (T1=0.1s, T2=0.5s, T3=1.0s) is processed by using the slave clock information optimization method of the present application, and the result comparison diagram shown in FIG. 6 can be obtained. FIG. 6 is a comparison diagram of simulation results of master-slave clocks in different synchronization periods in master-slave clock information according to an embodiment of the present invention.
从图6中可知,当同步周期T3=1s时,大约在5s内快速收敛;当T2=0.5s时,大约在3s内快速收敛;当T1=0.1s时,大约在2s内快速收敛。也就是说,随着报文同步周期的不断减小,主从时间偏差收敛的越快,同时时间同步的精度也更高。本申请的从时钟信息优化方法,基于卡尔曼滤波器和滑模控制器对不同同步周期的信号都能够有效调控从时钟速率,使其快速跟随上主时钟,达到更好的时间同步精度,从而实现1588协议不同主从时钟同步周期的控制与优化,提高时间同步的精度,使得满足5G(5G network,第五代移动通信网络)对时间同步纳秒级的要求。It can be seen from Fig. 6 that when the synchronization period T3=1s, it converges rapidly within about 5s; when T2=0.5s, it converges rapidly within about 3s; when T1=0.1s, it converges rapidly within about 2s. That is to say, with the continuous reduction of the packet synchronization period, the faster the master-slave time offset converges, and the higher the time synchronization accuracy is. The slave clock information optimization method of the present application, based on the Kalman filter and the sliding mode controller, can effectively control the rate of the slave clock for signals of different synchronization periods, so that it can quickly follow the master clock and achieve better time synchronization accuracy, thereby Realize the control and optimization of different master-slave clock synchronization cycles of the 1588 protocol, improve the accuracy of time synchronization, and meet the nanosecond-level requirements of 5G (5G network, fifth-generation mobile communication network) for time synchronization.
第二方面,本发明实施例公开了一种从时钟信息优化装置,可参见图7。图7为本发明实施例的一种从时钟信息优化装置结构示意图,装置包括:In a second aspect, an embodiment of the present invention discloses an apparatus for optimizing slave clock information, as shown in FIG. 7 . 7 is a schematic structural diagram of an apparatus for optimizing slave clock information according to an embodiment of the present invention, and the apparatus includes:
主时钟信息获取模块701,用于获取主时钟信息;a master clock
第一信息确定模块702,用于将主时钟信息通过滑模控制器进行处理,得到第一信息;a first
第二信息确定模块703,用于对第一信息进行干扰处理,并将干扰处理后的第一信息经过被控对象函数进行处理,得到第二信息;被控对象函数为主时钟信息对应的从时钟信息的函数表达式经过拉普拉斯变换以及离散化得到的函数;The second
从时钟信息确定模块704,用于对第二信息进行加噪处理,并将加噪处理后的第二信息通过卡尔曼滤波器进行处理,得到从时钟信息;The slave clock
主从时钟偏差判断模块705,用于判断主时钟信息与从时钟信息的偏差是否满足预设条件;The master-slave clock
目标从时钟信息确定模块706,用于当主时钟信息与从时钟信息的偏差不满足预设条件时,将主时钟信息与从时钟信息的偏差输入到滑模控制器,返回第一信息确定模块继续执行,直至主时钟信息与从时钟信息的偏差满足预设条件时,得到目标从时钟信息。The target slave clock
可选地,在本发明的从时钟信息优化装置的一种实施例中,第一信息确定模块702,包括:Optionally, in an embodiment of the apparatus for optimizing slave clock information of the present invention, the first
第一中间值确定子模块,用于将主时钟信息输入到滑模控制器,通过滑模控制器的第一公式,得到第一中间值;The first intermediate value determination submodule is used to input the master clock information to the sliding mode controller, and obtain the first intermediate value through the first formula of the sliding mode controller;
第二中间值确定子模块,用于通过滑模控制器的第二公式,得到第二中间值;The second intermediate value determination submodule is used to obtain the second intermediate value through the second formula of the sliding mode controller;
第三中间值确定子模块,用于通过第一中间值及第二中间值,得到第三中间值;The third intermediate value determination submodule is used to obtain the third intermediate value through the first intermediate value and the second intermediate value;
第一信息确定子模块,用于将第三中间值输入滑模控制器的第三公式,通过第三公式得到第一信息。The first information determination sub-module is configured to input the third intermediate value into the third formula of the sliding mode controller, and obtain the first information through the third formula.
可选地,在本发明的从时钟信息优化装置的一种实施例中,第二信息确定模块703,包括:Optionally, in an embodiment of the apparatus for optimizing slave clock information of the present invention, the second
干扰处理子模块,用于对第一信息添加预设干扰信息,得到干扰处理后的第一信息;an interference processing sub-module, configured to add preset interference information to the first information to obtain the first information after interference processing;
第二信息确定子模块,用于将干扰处理后的第一信息经过被控对象函数进行处理,得到第二信息;其中,被控对象函数表示为:The second information determination sub-module is used to process the first information after the interference processing through the controlled object function to obtain the second information; wherein, the controlled object function is expressed as:
x(k)=Ax(k-1)+B(u(k)+ω(k))x(k)=Ax(k-1)+B(u(k)+ω(k))
y(k)=Cx(k)y(k)=Cx(k)
其中,x(k)表示当前时刻的状态变量;x(k-1)表示上一时刻的状态变量;u(k)表示第一信息;ω(k)表示过程噪声;A表示系统矩阵;B表示输入矩阵;表示输出矩阵;y(k)表示第二信息。Among them, x(k) represents the state variable of the current moment; x(k-1) represents the state variable of the previous moment; u(k) represents the first information; ω(k) represents the process noise; A represents the system matrix; B represents the input matrix; represents the output matrix; y(k) represents the second information.
可选地,在本发明的从时钟信息优化装置的一种实施例中,从时钟信息确定模块704,包括:Optionally, in an embodiment of the apparatus for optimizing slave clock information of the present invention, the slave clock
加噪处理子模块,用于通过预设公式,对第二信息进行加噪处理;预设公式表示为:The noise addition processing sub-module is used to perform noise addition processing on the second information through a preset formula; the preset formula is expressed as:
yv(k)=y(k)+v(k)y v (k)=y(k)+v(k)
其中,yv(k)表示加噪处理后的第二信息;y(k)表示第二信息;v(k)表示测量噪声;Wherein, y v (k) represents the second information after noise processing; y(k) represents the second information; v(k) represents the measurement noise;
从时钟信息确定子模块,用于将加噪处理后的第二信息通过卡尔曼滤波器的预设方程组进行计算,得到从时钟信息。The slave clock information determination sub-module is used for calculating the second information after the noise addition processing through the preset equation set of the Kalman filter to obtain the slave clock information.
第三方面,本发明实施例公开了一种电子设备,如图8所示。图8为本发明实施例的一种电子设备结构示意图,包括处理器801、通信接口802、存储器803和通信总线804,其中,处理器801、通信接口802、存储器803通过通信总线804完成相互间的通信;In a third aspect, an embodiment of the present invention discloses an electronic device, as shown in FIG. 8 . 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, including a
存储器803,用于存放计算机程序;a
处理器801,用于执行存储器803上所存放的程序时,实现上述从时钟信息优化方法中任一的方法步骤。The
上述电子设备提到的通信总线804可以是外设部件互连标准(PeripheralComponent Interconnect,PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,EISA)总线等。该通信总线804可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The
通信接口802用于上述电子设备与其他设备之间的通信。The
存储器803可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器803还可以是至少一个位于远离前述处理器801的存储装置。The
上述的处理器801可以是通用处理器,包括中央处理器(Central ProcessingUnit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(DigitalSignal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned
在本发明实施例提供的一种电子设备中,首先利用滑模控制器对从时钟信息与主时钟信息的偏差进行处理,可实现对主从时钟晶振频率漂移进行有效控制和优化,然后采用卡尔曼滤波器对滑模控制器输出信息进行处理,可实现对从时钟晶振抖动和随机误差等外界干扰影响的有效抑制,进而得到从时钟信息与主时钟信息的偏差满足预设条件对应的目标从时钟信息。得到的该目标从时钟信息减小了从时钟晶振震荡频率漂移以及从时钟晶振抖动和随机误差对从时钟信息准确性的影响,进而有效降低了主从时钟偏差,实现了较为精准的主从时钟同步。In an electronic device provided by an embodiment of the present invention, a sliding mode controller is used to first process the deviation between the slave clock information and the master clock information, so as to effectively control and optimize the frequency drift of the crystal oscillator of the master and slave clocks, and then use Karl The Mann filter processes the output information of the sliding mode controller, which can effectively suppress the influence of external interference such as slave clock crystal oscillator jitter and random error, and then obtain the target slave clock corresponding to the deviation between the slave clock information and the master clock information meeting the preset conditions. clock information. The obtained target slave clock information reduces the oscillation frequency drift of the slave clock crystal oscillator and the influence of the slave clock crystal oscillator jitter and random error on the accuracy of the slave clock information, thereby effectively reducing the master-slave clock deviation and realizing a relatively accurate master-slave clock. Synchronize.
第四方面,本发明实施例公开了一种计算机可读存储介质,计算机可读存储介质内存储有计算机程序,计算机程序被处理器执行时,实现上述从时钟信息优化方法中任一的方法步骤。In a fourth aspect, an embodiment of the present invention discloses a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above-mentioned methods for optimizing slave clock information is implemented. .
在本发明实施例提供的一种计算机可读存储介质中,首先利用滑模控制器对从时钟信息与主时钟信息的偏差进行处理,可实现对主从时钟晶振频率漂移进行有效控制和优化,然后采用卡尔曼滤波器对滑模控制器输出信息进行处理,可实现对从时钟晶振抖动和随机误差等外界干扰影响的有效抑制,进而得到从时钟信息与主时钟信息的偏差满足预设条件对应的目标从时钟信息。得到的该目标从时钟信息减小了从时钟晶振震荡频率漂移以及从时钟晶振抖动和随机误差对从时钟信息准确性的影响,进而有效降低了主从时钟偏差,实现了较为精准的主从时钟同步。In the computer-readable storage medium provided by the embodiment of the present invention, the deviation between the slave clock information and the master clock information is first processed by the sliding mode controller, so that the frequency drift of the master and slave clock crystal oscillators can be effectively controlled and optimized, Then the Kalman filter is used to process the output information of the sliding mode controller, which can effectively suppress the influence of external interference such as slave clock crystal oscillator jitter and random error, and then obtain the corresponding deviation between the slave clock information and the master clock information that meets the preset conditions. The target slave clock information. The obtained target slave clock information reduces the oscillation frequency drift of the slave clock crystal oscillator and the influence of the slave clock crystal oscillator jitter and random error on the accuracy of the slave clock information, thereby effectively reducing the master-slave clock deviation and realizing a relatively accurate master-slave clock. Synchronize.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本发明实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the present invention result in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. Computer instructions may be stored on or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center over a wire (e.g. coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) to another website site, computer, server, or data center. A computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media. Useful media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), among others.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article, or device that includes the element.
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、电子设备及存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. Especially, for the embodiments of the apparatus, electronic equipment and storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for related parts.
以上仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910364232.8A CN109976442B (en) | 2019-04-30 | 2019-04-30 | Slave clock information optimization method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910364232.8A CN109976442B (en) | 2019-04-30 | 2019-04-30 | Slave clock information optimization method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109976442A CN109976442A (en) | 2019-07-05 |
CN109976442B true CN109976442B (en) | 2020-07-28 |
Family
ID=67087500
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910364232.8A Active CN109976442B (en) | 2019-04-30 | 2019-04-30 | Slave clock information optimization method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109976442B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113835467B (en) * | 2021-09-26 | 2024-03-29 | 深圳市杰普特光电股份有限公司 | Clock synchronization system, method, electronic equipment and storage medium |
CN117516901B (en) * | 2023-11-06 | 2024-05-31 | 北京通泰恒盛科技有限责任公司 | Clock synchronization method and system for fan blade monitoring based on inertial navigation technology |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201681266U (en) * | 2010-05-31 | 2010-12-22 | 向洪莉 | Clock |
CN102857315A (en) * | 2011-06-29 | 2013-01-02 | 中兴通讯股份有限公司 | Method and system for serving slave clocks by master clock |
CN109212285A (en) * | 2018-11-29 | 2019-01-15 | 中电科西北集团有限公司 | Outfield simulator |
CN109546660A (en) * | 2018-11-22 | 2019-03-29 | 中国航空综合技术研究所 | Active power filter circuit and control method based on neural network sliding mode control strategy |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104392136B (en) * | 2014-11-28 | 2017-12-19 | 东南大学 | A kind of high accuracy data fusion method towards high dynamic LDPC code robust measure |
US20170108612A1 (en) * | 2015-10-15 | 2017-04-20 | King Saud University | Inertial system for gravity difference measurement |
CN205725536U (en) * | 2016-04-22 | 2016-11-23 | 湖南工业大学 | An Adjacent Cross-Coupled Synchronous Control System Based on Sliding Mode Variable Structure |
CN108501944A (en) * | 2018-05-14 | 2018-09-07 | 吕杉 | Automotive tyre explosion safety stable control method |
-
2019
- 2019-04-30 CN CN201910364232.8A patent/CN109976442B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201681266U (en) * | 2010-05-31 | 2010-12-22 | 向洪莉 | Clock |
CN102857315A (en) * | 2011-06-29 | 2013-01-02 | 中兴通讯股份有限公司 | Method and system for serving slave clocks by master clock |
CN109546660A (en) * | 2018-11-22 | 2019-03-29 | 中国航空综合技术研究所 | Active power filter circuit and control method based on neural network sliding mode control strategy |
CN109212285A (en) * | 2018-11-29 | 2019-01-15 | 中电科西北集团有限公司 | Outfield simulator |
Also Published As
Publication number | Publication date |
---|---|
CN109976442A (en) | 2019-07-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109547146B (en) | Wireless clock synchronization method and device based on ultra-wideband wireless communication | |
CN111416617B (en) | Clock synchronization method and device and electronic equipment | |
US20210152676A1 (en) | Computer network packet transmission timing | |
RU2632406C2 (en) | Synchronization control for unmatched signal receiver | |
EP2787664B1 (en) | Time synchronization method and apparatus | |
US10594424B2 (en) | Time synchronization slave apparatus capable of adjusting time synchronization period, and method of determining time synchronization period | |
Park et al. | Synchronization improvement of distributed clocks in EtherCAT networks | |
CN109976442B (en) | Slave clock information optimization method and device, electronic equipment and storage medium | |
US11424902B2 (en) | System and method for synchronizing nodes in a network device | |
CN114095109A (en) | A clock synchronization method, device, equipment and storage medium | |
US11757614B2 (en) | Accurate timestamp correction | |
US11853116B2 (en) | Clock error-bound tracker | |
CN110636536A (en) | A frequency calibration method and device | |
CN108631897B (en) | A kind of correcting time in network method and device | |
US11736264B1 (en) | Adaptive correction of network device clock timing errors | |
CN111464254B (en) | Clock synchronization method and device and electronic equipment | |
CN117792558B (en) | Method, apparatus, device and medium for integrating high precision time | |
WO2020059137A1 (en) | Communication device, communication system, communication method, and communication program | |
US10042384B2 (en) | System and methods for computer clock synchronization without frequency error estimation | |
CN113315596B (en) | Time synchronization method and device in packet-switched network | |
CN111614428B (en) | Method and device for improving synchronization precision among multiple clocks | |
CN115733572A (en) | Clock synchronization method based on precise time protocol, electronic device and storage medium | |
CN115459897B (en) | Step length synchronous calibration method and device in power real-time simulation and related equipment | |
CN109412733A (en) | The mean filter method that EtherCAT synchronised clock is adjusted | |
Song et al. | Design of IEEE 802.1 AS time synchronization system based on FPGA |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |