WO2013020441A1 - Method and device for handling phase transition - Google Patents
Method and device for handling phase transition Download PDFInfo
- Publication number
- WO2013020441A1 WO2013020441A1 PCT/CN2012/078753 CN2012078753W WO2013020441A1 WO 2013020441 A1 WO2013020441 A1 WO 2013020441A1 CN 2012078753 W CN2012078753 W CN 2012078753W WO 2013020441 A1 WO2013020441 A1 WO 2013020441A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- phase
- value
- hopping
- jump
- detected
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
- H04J3/0667—Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
Definitions
- a phase jump processing apparatus comprising: a comparison module configured to compare a detected phase jump value with a phase jump threshold; a correction module, wherein the phase jump When the value does not exceed the phase jump threshold, it is set to perform correction of the time phase.
- the correction module is further configured to: when the phase hopping value exceeds the phase hopping threshold, initiate a phase hopping detection period, and in the phase hopping detection period, in the When the detected phase jump values are positive or negative, the time phase is corrected.
- the correction module is further configured to: when the detected phase jump value includes a positive value and a negative value, the time phase correction is not performed, and the next phase jump detection period is detected.
- the device further includes: an alarm module, configured to set a positive value and a negative value when the phase jump value detected by each of the consecutive predetermined number of phase jump detection periods includes a positive value and a negative value , to issue an alarm.
- an alarm module configured to set a positive value and a negative value when the phase jump value detected by each of the consecutive predetermined number of phase jump detection periods includes a positive value and a negative value , to issue an alarm.
- the device further includes: an alarm module, configured to set a positive value and a negative value when the phase jump value detected by each of the consecutive predetermined number of phase jump detection periods includes a positive value and a negative value , to issue an alarm.
- an alarm module configured to set a positive value and a negative value when the phase jump value detected by each of the consecutive predetermined number of phase jump detection periods includes a positive value and a negative value , to issue an alarm.
- FIG. 4 is a schematic diagram of a processing method of a 1588 time synchronization phase abrupt according to a preferred embodiment of the present invention
- FIG. 5 is a flow chart of a 1588 phase hopping processing method in accordance with a preferred embodiment of the present invention.
- Step S202 comparing the detected phase jump value with the phase jump threshold.
- the threshold of the phase jump may be set to different thresholds according to different situations.
- step S204 when the phase hopping value does not exceed the phase hopping threshold, the time phase is corrected.
- the time phase is corrected by setting the correction condition of the time phase, that is, by comparing the detected phase jump value with the phase jump threshold;
- the phase jump threshold is exceeded, the time phase is corrected, thereby solving the problem of adjusting the time phase deviation in the system, thereby achieving the effect of improving the time phase synchronization quality.
- the threshold for all cases where the threshold is exceeded, it can be considered that the time phase is abrupt due to an error (for example, a hardware cause). Although such a judgment method may cause a certain misjudgment, In the prior art, the method of not judging is still improved to the same level of synchronization quality to a certain extent.
- different sizes can be selected according to actual conditions.
- phase jump value includes a positive value and a negative value
- the time phase correction is not performed, and the next phase jump detection period is entered.
- the phase hopping value detected in each of the consecutive predetermined number of phase hopping detection periods includes positive and negative values
- an alarm can be issued. This makes it easier to handle errors.
- a phase hopping processing device is also provided, which is used to implement the above embodiments and preferred embodiments thereof, and has not been described again, and the following relates to the device.
- Each module is described.
- the term "module" may implement a combination of software and/or hardware of a predetermined function.
- FIG. 3 is a block diagram showing the structure of a processing device for phase jump according to an embodiment of the present invention.
- the device includes a comparison module 30 and a correction module 32.
- the various modules of the device and their functions are described below.
- the comparison module 30 is configured to compare the detected phase hopping value with the phase hopping threshold.
- the correction module 32 is coupled to the comparison module 30 for performing time phase correction if the phase hopping value does not exceed the phase hopping threshold.
- the correction module 32 is further configured to start the phase hopping detection period when the phase hopping value exceeds the phase hopping threshold, and to detect the phase during the phase hopping detection period.
- the time phase is corrected.
- the time phase correction is not performed, and the next step is entered.
- a phase jump detection period is detected.
- the apparatus further includes an alarm module configured to set a positive value and a negative value when the phase jump value detected in each of the consecutive predetermined number of phase jump detection periods includes a positive value and a negative value. , to issue an alarm. This makes the handling of errors more convenient.
- the 1588 synchronization protocol is taken as an example for description.
- the quality of the time synchronization may be greatly degraded.
- the device hardware has a short, even one error, which causes an error time deviation value to occur in the 1588 time calculation, resulting in 1588 Time synchronization phase error correction.
- a phase correction filtering algorithm is employed to avoid time synchronization protocol calculation errors due to various reasons (especially hardware reasons), cause phase jitter problems, and improve the quality of time synchronization.
- 4 is a schematic diagram of a 1588 time synchronization phase abrupt processing method in accordance with a preferred embodiment of the present invention, which is described below in conjunction with FIG.
- the phase hopping table tolerance value is configured, wherein the phase hopping tolerance value is the magnitude of the phase hopping allowed each time.
- Configure the phase transition adjustment period that is, when the phase jump occurs, check whether the phase jump is reasonable. Detects the interval at which the main clock Sync message is sent, ⁇ , and detects the interval at which the main clock 1588 Sync message is sent.
- the product of the phase adjustment period Real-time detection of whether the phase has jumped.
- Step S502 configuring a phase jump tolerance value by using a phase jump parameter configuration module, and configuring a phase jump adjustment period.
- the message detection module detects the transmission frequency of the main clock 1588 Sync message, thereby calculating the phase jump detection period.
- Step S506 inputting the phase deviation calculated by the 1588 protocol to the phase jump period detecting module.
- the phase jump of the 1588 protocol is solved by the filtering algorithm of the phase jump period detecting module.
- phase jump If a phase jump is detected, record whether each transition is a positive or negative transition. When a detection cycle ends, it is judged whether there is both a positive transition and a negative transition in the phase jump. If there is, it is considered that the hardware system is disturbed or has an error, phase fluctuation occurs, and the filtering effect is achieved by not correcting the phase deviation. If there is a positive or negative transition in the detection period, it is proved that the phase deviation does change, that is, the phase correction is performed. With the preferred embodiment, it is possible to prevent the phase jump of 1588 time synchronization due to various reasons (for example, hardware reasons) by filtering, and solve the protection problem of hardware errors, and solve the problem that the 1588 protocol cannot sense the hardware. The error, resulting in a wrong time correction problem.
- modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device so that they may be stored in the storage device by the computing device, or they may be separately fabricated into individual integrated circuit modules, or Multiple modules or steps are made into a single integrated circuit module.
- the invention is not limited to any specific combination of hardware and software.
- the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Electric Clocks (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Disclosed are a method and device for handling a phase transition. The method comprises the following steps: comparing a detected phase transition value with a phase transition threshold value; and, in a case where the phase transition value does not exceed the phase transition threshold value, amending a time phase. The present invention improves the quality of time synchronization.
Description
相位跳变的处理方法及装置 技术领域 本发明涉及通信领域, 具体而言, 涉及一种相位跳变的处理方法及装置。 背景技术 同步协议在通讯网络中得到越来越多的重视和应用, 在使用同步协议同步时, 例 如 IEEE 1588同步协议, 以下以 1588同步协议为例进行说明, 在 1588同步协议中定 义了时间的传递, 网络设备每次接收到同步 (Sync) 报文之后, 都对时间相位进行修 正。 图 1是根据现有技术的 1588同步协议计算时间偏差出现跳变的示意图,图 1示出 了主时钟 (Master Clock) 与从时钟 (Slave Clock)之间的交换, 如果其中的 T1-T4时 间戳的任何一个出现了错误, 根据 1588 协议相位偏差基数按公式, Offset=Tl+Delay-T2, Offset=T4-T3 -Delay, 计算出来的 Offset必然出现偏离实际数值。 由于 1588同步协议对于硬件具有很大的依赖性, 又无法感知硬件的错误处理。因 此,在 1588时间同步的设备受到网络流量突发或者本身硬件原因时,会导致打上的时 间戳存在错误。在这种情况下, 如果仍然使用 1588同步协议计算时间偏差后, 直接修 正时间相位差, 必然造成一个大的相位跳变, 从而降低时间同步质量, 严重的情况下, 会导致使用该相位信息的设备瘫痪。 针对相关技术中存在的上述问题, 目前尚未提出 有效的解决方案。 发明内容 本发明的提供了一种相位跳变的处理方法及装置, 以至少解决上述相关技术中存 在的问题。 根据本发明的一个方面,提供了一种相位跳变的处理方法, 该方法包括如下步骤: 比较检测到的相位跳变值与相位跳变阈值; 在所述相位跳变值不超过所述相位跳变阈 值的情况下, 进行时间相位的修正。 优选地, 在所述相位跳变值超过所述相位跳变阈值的情况下, 所述方法还包括: 启动相位跳变检测周期, 在所述相位跳变检测周期内, 如果所述检测到的相位跳变值 均为正值或者均为负值, 则进行时间相位的修正。
优选地, 在所述相位跳变值超过所述相位跳变阈值的情况下, 所述方法还包括: 如果所述检测到的相位跳变值包括正值和负值, 则不进行时间相位的修正, 进入下一 个相位跳变检测周期。 优选地, 所述方法还包括: 如果连续的预定数量的相位跳变检测周期中的每一个 相位检测周期所检测到的相位跳变值均包括正值和负值, 则进行告警。 优选地, 在所述相位跳变值超过所述相位跳变阈值的情况下, 所述方法还包括: 不进行时间相位的修正。 优选地,所述方法用于网络测量和控制系统的精密时钟同步协议标准 1588同步协 议标准。 根据本发明的另一个方面, 还提供了一种相位跳变的处理装置, 包括: 比较模块, 设置为比较检测到的相位跳变值与相位跳变阈值; 修正模块, 在所述相位跳变值不超 过所述相位跳变阈值的情况下, 设置为进行时间相位的修正。 优选地, 所述修正模块, 还设置为在所述相位跳变值超过所述相位跳变阈值的情 况下, 启动相位跳变检测周期, 并在所述相位跳变检测周期内, 在所述检测到的相位 跳变值均为正值或者均为负值的情况下, 进行时间相位的修正。 优选地, 所述修正模块, 还设置为所述检测到的相位跳变值包括正值和负值的情 况下, 不进行时间相位的修正, 并进入下一个相位跳变检测周期进行检测。 优选地, 所述装置还包括: 告警模块, 设置为在连续的预定数量的相位跳变检测 周期中的每一个相位检测周期所检测到的相位跳变值均包括正值和负值的情况下, 进 行告警。 通过本发明, 在检测到相位跳变时, 通过比较检测到的相位跳变值与相位跳变阈 值; 在相位跳变值不超过相位跳变阈值的情况下, 进行时间相位的修正, 解决了使用 错误的时间戳来修正时间相位差所导致的问题, 进而达到了提高时间相位同步质量的 效果。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中:
图 1是根据相关技术的 1588同步协议计算时间偏差出现跳变的示意图; 图 2是根据本发明实施例的相位跳变的处理方法的流程图; 图 3是根据本发明实施例的相位跳变的处理装置的结构框图; 图 4是根据本发明优选实施例的 1588时间同步相位突变的处理方法的示意图;以 及 图 5是根据本发明优选实施例的 1588相位跳变的处理方法的流程图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 在以下实施例中, 考虑了时间相位的跳变的原因, 包括正常跳变和由于错误所导 致的跳变(例如, 受到网络流量突发或者本身硬件原因), 在本实施例中提供了一种时 间相位跳变的处理方法, 图 2是根据本发明实施例的相位跳变的处理方法的流程图, 如图 2所示, 该流程包括如下步骤 S202和步骤 S204。 步骤 S202, 比较检测到的相位跳变值与相位跳变阈值。 其中, 该相位跳变的阈值 可以根据不同的情况设置为不同的阈值。 步骤 S204, 在相位跳变值不超过相位跳变阈值的情况下, 进行时间相位的修正。 通过上述步骤, 在检测到相位跳变时, 通过设置进行时间相位的修正条件来进行 时间相位的修正, 即, 通过比较检测到的相位跳变值与相位跳变阈值; 在相位跳变值 不超过相位跳变阈值的情况下, 进行时间相位的修正, 从而解决了系统中的时间相位 偏差的调整问题, 进而达到了提高时间相位同步质量的效果。 在上述步骤中, 对于所有超过阈值的情况可以均认为是由于发生了错误 (例如, 硬件原因)而导致的时间相位的突变, 这样的判断方式虽然会产生一定的误判, 但是, 相比于现有技术中的不进行判断的方式,还是在一定程度了提高了时间相同同步质量。 另外, 对于该阈值可以根据实际的情况来选择不同的大小。 对于超过阈值的情况, 不 进行时间相位的修正, 但是考虑到这种情况下, 也有可能不是因为发生错误而导致的 跳变 (即超过阈值并不意味着一定是错误发生, 这种情况也可以通过将阈值调大来避 免)。 因此, 在本实施例中提供了一种较优的实施方式, 在相位跳变值超过相位跳变阈
值的情况下, 可以启动相位跳变检测周期, 在相位跳变检测周期内, 如果检测到的相 位跳变值均为正值或者均为负值, 则进行时间相位的修正。 通过该优选方式, 对于超 过阈值的情况不再统一不进行时间相位的修正, 而是对该情况进行进一步的判断, 从 而进一步提高了时间相位同步的效果。 如果检测到的相位跳变值包括正值和负值, 则 不进行时间相位的修正, 进入下一个相位跳变检测周期。 为了更好地对错误的情况进行处理, 作为一个优选的实施方式, 如果连续的预定 数量的相位跳变检测周期中的每一个相位检测周期所检测到的相位跳变值均包括正值 和负值, 则可以进行告警。 这样就更加便于对错误进行处理。 在本实施例中, 还提供了一种相位跳变的处理装置, 该装置用于实现上述实施例 及其优选的实施方式, 已经进行过说明的不再赘述, 下面对该对该装置涉及的各个模 块进行说明。如以下所使用的,术语"模块"可以实现预定功能的软件和 /或硬件的组合。 尽管以下实施例所描述的系统和方法较佳地以软件来实现, 但是硬件, 或者软件和硬 件的组合的实现也是可能并被构想的。 图 3是根据本发明实施例的相位跳变的处理装置的结构框图, 如图 3所示, 该装 置包括比较模块 30和修正模块 32。 下面对该装置的各个模块及其功能进行说明。 比较模块 30, 设置为比较检测到的相位跳变值与相位跳变阈值。 修正模块 32连 接至比较模块 30, 在相位跳变值不超过相位跳变阈值的情况下, 该模块用于进行时间 相位的修正。 作为一个较优的实施方式, 修正模块 32, 还设置为在相位跳变值超过相位跳变阈 值的情况下, 启动相位跳变检测周期, 并在相位跳变检测周期内, 在检测到的相位跳 变值均为正值或者均为负值的情况下, 进行时间相位的修正; 在检测到的相位跳变值 包括正值和负值的情况下, 不进行时间相位的修正, 并进入下一个相位跳变检测周期 进行检测。 较优的, 该上述装置还包括告警模块, 设置为在连续的预定数量的相位跳变检测 周期中的每一个相位检测周期所检测到的相位跳变值均包括正值和负值的情况下, 进 行告警。 从而使得对错误的处理更加方便。 在下面的优选实施例中, 以 1588同步协议为例进行说明。在本优选实施例中, 考 虑到如果对于任何原因引起的时间相位的跳变在每次收到 Sync报文后均进行修正,则 可能导致时间同步的质量大大下降。例如, 在使用 1588同步的过程中, 设备硬件出现 短暂, 甚至一次错误, 就会导致 1588 时间计算出现一个错误时间偏差值, 从而导致
1588时间同步相位出现错误的修正。 在本优选实施例中, 通过采用一种相位修正滤波 算法来避免由于各种原因 (尤其是硬件原因) 导致的时间同步协议计算错误, 引起相 位抖动的问题, 并提高时间同步的质量。 图 4是根据本发明优选实施例的 1588时间同步相位突变的处理方法的示意图,下 面结合图 4进行说明。 在图 4示出的处理方法中, 首先, 配置相位跳表容忍值, 其中, 相位跳变容忍值就是每次允许的相位跳变的大小。 配置相位跳变调整周期, 即出现相 位跳变时, 检测相位跳变是否合理的周期。 侦测主时钟 Sync报文发送间隔, δΡ, 侦测 主时钟 1588 Sync报文发送间隔。计算相位跳变检测周期值,其中,将主时钟 1588 Sync 报文发送间隔时间乘以相位跳变调整周期, 得到相位突变检测周期值, 即, 相位跳变 检测周期值 =Sync报文发送时间间隔与相位调整周期的乘积。 实时检测相位是否发生 跳变。 在相位发生跳变时, 进入检测周期。 在经过检测周期滤波之后, 进行相位调整。 即, 可以是在 1588时间同步计算完毕之后, 判断相位差是否满足相位跳变容忍值, 如 果满足, 同时之前没有相位跳变记录, 则可直接修正时间相位。 否则开启相位跳变调 整周期检测, 在检测周期内, 记录相位跳变是正跳变还是负跳变, 检测期间不修正相 位偏差值。 在检测周期结束后, 分析相位跳变记录的正负标识, 如果正负标识一致, 则允许相位调整, 否则清除相位跳变正负记录, 进入下一个检测周期。 图 5是根据本发明优选实施例的 1588相位跳变的处理方法的流程图,如图 5所示, 该流程包括以下步骤 S502至步骤 S506。 步骤 S502, 通过相位跳变参数配置模块, 配置相位跳变容忍值, 配置相位跳变调 整周期。 步骤 S504, 通过报文侦测模块, 侦测出主时钟 1588 Sync报文发送频率, 从而计 算出相位跳变检测周期。 步骤 S506, 将 1588协议计算出的相位偏差, 输入到相位跳变周期检测模块。 通 过相位跳变周期检测模块的滤波算法, 解决 1588协议的相位跳变。 在本优选实施例中,还提供了一种 1588相位突变的处理装置, 该装置包括相位跳 变参数配置模块, 报文接收侦测模块和相位跳变周期检测模块, 下面对该装置的各个 模块及其功能进行说明。 相位跳变参数配置模块, 用于配置相位跳变容忍值, 配置相位跳变调整周期, 同 时保持这些配置值。
报文接收侦测模块, 用于侦测主时钟 1588 Sync报文的发送频率, 与相位跳变调 整周期计算, 得出相位跳变调整周期时间值。 相位跳变周期检测模块(用于实现比较模块 30和修正模块 32的功能),用于检测 相位是否发生跳变, 在检测周期内无相位跳变, 则 1588可直接修正相位偏差。如果检 测出相位跳变, 记录每次跳变是正跳变还是负跳变。 当一个检测周期结束, 判断相位 跳变中是否既有正跳变, 又有负跳变。如果有, 则认为硬件系统受到干扰或出现错误, 发生了相位的波动, 通过不修正相位偏差, 达到滤波效果。 如果检测周期内, 出现的 都是正跳变或是负跳变, 证明相位偏差的确发生变化, 即进行相位修正。 通过本优选实施例, 可以通过滤波的方法达到了防止由于各种原因 (例如, 硬件 原因)导致 1588时间同步出现相位跳变, 并且解决了硬件错误的防护问题, 同时解决 了 1588协议无法感知硬件错误, 从而带来错误的时间修正问题。 另外, 由于本优选实 施例及其优选实施方式是在现有的硬件设备基础上实现的,不但没有增加额外的成本, 而且对软件的成本增加也不大,但却有效地解决了 1588时间同步的相位突变问题,提 高了 1588时间同步的质量和安全性。 在另外一个实施例中, 还提供了一种相位跳变的处理软件, 该软件用于执行上述 实施例及优选实施例中描述的技术方案。 在另外一个实施例中, 还提供了一种存储介质, 该存储介质中存储有上述传输时 延控制软件, 该存储介质包括但不限于光盘、 软盘、 硬盘、 可擦写存储器等。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而可以将 它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块, 或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限 制于任何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。
TECHNICAL FIELD The present invention relates to the field of communications, and in particular to a method and apparatus for processing phase jumps. BACKGROUND OF THE INVENTION Synchronization protocols are gaining more and more attention and application in communication networks. When synchronizing using synchronization protocols, such as the IEEE 1588 synchronization protocol, the following describes the 1588 synchronization protocol as an example, and the time is defined in the 1588 synchronization protocol. Pass-through, the network device corrects the time phase each time it receives a Sync message. 1 is a schematic diagram of calculating a time offset hopping according to the 1588 synchronization protocol of the prior art, and FIG. 1 shows an exchange between a master clock and a slave clock, if the T1-T4 time therein Any one of the stamps has an error. According to the 1588 protocol phase deviation base, according to the formula, Offset=Tl+Delay-T2, Offset=T4-T3 -Delay, the calculated Offset must deviate from the actual value. Since the 1588 synchronization protocol has a large dependence on hardware, it cannot sense hardware error handling. Therefore, when the device synchronized at 1588 time is subjected to network traffic burst or its own hardware reason, it may cause an error in the timestamp. In this case, if the time offset is still calculated using the 1588 synchronization protocol, directly correcting the time phase difference will inevitably result in a large phase jump, thereby reducing the quality of the time synchronization. In severe cases, the phase information will be used. Equipment 瘫痪. In view of the above problems existing in the related art, an effective solution has not yet been proposed. SUMMARY OF THE INVENTION The present invention provides a method and apparatus for processing phase jumps to at least solve the problems in the related art described above. According to an aspect of the present invention, a method for processing a phase hopping is provided, the method comprising the steps of: comparing a detected phase hopping value with a phase hopping threshold; and wherein the phase hopping value does not exceed the phase In the case of a jump threshold, the time phase is corrected. Preferably, if the phase hopping value exceeds the phase hopping threshold, the method further includes: starting a phase hopping detection period, if the detected phase is within the phase hopping detection period When the phase jump values are positive or negative, the time phase is corrected. Preferably, in a case that the phase hopping value exceeds the phase hopping threshold, the method further includes: if the detected phase hopping value includes a positive value and a negative value, not performing a time phase Correction, enter the next phase jump detection cycle. Preferably, the method further comprises: if the phase hopping value detected by each of the consecutive predetermined number of phase hopping detection periods includes a positive value and a negative value, performing an alarm. Preferably, in a case that the phase hopping value exceeds the phase hopping threshold, the method further comprises: not performing correction of the time phase. Preferably, the method is for a precision clock synchronization protocol standard 1588 synchronization protocol standard for network measurement and control systems. According to another aspect of the present invention, there is also provided a phase jump processing apparatus, comprising: a comparison module configured to compare a detected phase jump value with a phase jump threshold; a correction module, wherein the phase jump When the value does not exceed the phase jump threshold, it is set to perform correction of the time phase. Preferably, the correction module is further configured to: when the phase hopping value exceeds the phase hopping threshold, initiate a phase hopping detection period, and in the phase hopping detection period, in the When the detected phase jump values are positive or negative, the time phase is corrected. Preferably, the correction module is further configured to: when the detected phase jump value includes a positive value and a negative value, the time phase correction is not performed, and the next phase jump detection period is detected. Preferably, the device further includes: an alarm module, configured to set a positive value and a negative value when the phase jump value detected by each of the consecutive predetermined number of phase jump detection periods includes a positive value and a negative value , to issue an alarm. According to the present invention, when the phase jump is detected, the detected phase jump value and the phase jump threshold are compared; when the phase jump value does not exceed the phase jump threshold, the time phase is corrected, and the solution is solved. The wrong timestamp is used to correct the problem caused by the time phase difference, thereby achieving the effect of improving the quality of the time phase synchronization. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, In the drawing: 1 is a schematic diagram of calculating a time deviation occurrence transition according to the 1588 synchronization protocol of the related art; FIG. 2 is a flowchart of a processing method of phase jump according to an embodiment of the present invention; FIG. 3 is a phase jump according to an embodiment of the present invention. FIG. 4 is a schematic diagram of a processing method of a 1588 time synchronization phase abrupt according to a preferred embodiment of the present invention; and FIG. 5 is a flow chart of a 1588 phase hopping processing method in accordance with a preferred embodiment of the present invention. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. In the following embodiments, the causes of the hopping of the time phase are considered, including normal hopping and hopping due to errors (eg, due to network traffic bursts or hardware reasons), in this embodiment a FIG. 2 is a flowchart of a method for processing a phase jump according to an embodiment of the present invention. As shown in FIG. 2, the flow includes the following steps S202 and S204. Step S202, comparing the detected phase jump value with the phase jump threshold. The threshold of the phase jump may be set to different thresholds according to different situations. In step S204, when the phase hopping value does not exceed the phase hopping threshold, the time phase is corrected. Through the above steps, when the phase jump is detected, the time phase is corrected by setting the correction condition of the time phase, that is, by comparing the detected phase jump value with the phase jump threshold; When the phase jump threshold is exceeded, the time phase is corrected, thereby solving the problem of adjusting the time phase deviation in the system, thereby achieving the effect of improving the time phase synchronization quality. In the above steps, for all cases where the threshold is exceeded, it can be considered that the time phase is abrupt due to an error (for example, a hardware cause). Although such a judgment method may cause a certain misjudgment, In the prior art, the method of not judging is still improved to the same level of synchronization quality to a certain extent. In addition, for the threshold, different sizes can be selected according to actual conditions. For the case where the threshold is exceeded, the time phase correction is not performed, but in this case, it is also possible that the jump is not caused by the occurrence of the error (that is, exceeding the threshold does not mean that the error must occur, and the situation may also be Avoid by turning the threshold up.) Therefore, in this embodiment, a preferred implementation manner is provided, in which the phase jump value exceeds the phase jump threshold In the case of a value, the phase jump detection period can be started, and in the phase jump detection period, if the detected phase jump values are both positive values or negative values, the time phase correction is performed. According to this preferred mode, the correction of the time phase is not performed uniformly for the case where the threshold value is exceeded, but the situation is further determined, thereby further improving the effect of time phase synchronization. If the detected phase jump value includes a positive value and a negative value, the time phase correction is not performed, and the next phase jump detection period is entered. In order to better handle the erroneous situation, as a preferred embodiment, if the phase hopping value detected in each of the consecutive predetermined number of phase hopping detection periods includes positive and negative values, For the value, an alarm can be issued. This makes it easier to handle errors. In this embodiment, a phase hopping processing device is also provided, which is used to implement the above embodiments and preferred embodiments thereof, and has not been described again, and the following relates to the device. Each module is described. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the systems and methods described in the following embodiments are preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated. 3 is a block diagram showing the structure of a processing device for phase jump according to an embodiment of the present invention. As shown in FIG. 3, the device includes a comparison module 30 and a correction module 32. The various modules of the device and their functions are described below. The comparison module 30 is configured to compare the detected phase hopping value with the phase hopping threshold. The correction module 32 is coupled to the comparison module 30 for performing time phase correction if the phase hopping value does not exceed the phase hopping threshold. As a preferred implementation, the correction module 32 is further configured to start the phase hopping detection period when the phase hopping value exceeds the phase hopping threshold, and to detect the phase during the phase hopping detection period. When the hop values are positive or negative, the time phase is corrected. When the detected phase hopping value includes positive and negative values, the time phase correction is not performed, and the next step is entered. A phase jump detection period is detected. Preferably, the apparatus further includes an alarm module configured to set a positive value and a negative value when the phase jump value detected in each of the consecutive predetermined number of phase jump detection periods includes a positive value and a negative value. , to issue an alarm. This makes the handling of errors more convenient. In the following preferred embodiment, the 1588 synchronization protocol is taken as an example for description. In the preferred embodiment, it is contemplated that if the time phase hopping for any cause is corrected after each Sync message is received, the quality of the time synchronization may be greatly degraded. For example, in the process of using 1588 synchronization, the device hardware has a short, even one error, which causes an error time deviation value to occur in the 1588 time calculation, resulting in 1588 Time synchronization phase error correction. In the preferred embodiment, a phase correction filtering algorithm is employed to avoid time synchronization protocol calculation errors due to various reasons (especially hardware reasons), cause phase jitter problems, and improve the quality of time synchronization. 4 is a schematic diagram of a 1588 time synchronization phase abrupt processing method in accordance with a preferred embodiment of the present invention, which is described below in conjunction with FIG. In the processing method shown in FIG. 4, first, the phase hopping table tolerance value is configured, wherein the phase hopping tolerance value is the magnitude of the phase hopping allowed each time. Configure the phase transition adjustment period, that is, when the phase jump occurs, check whether the phase jump is reasonable. Detects the interval at which the main clock Sync message is sent, δΡ, and detects the interval at which the main clock 1588 Sync message is sent. Calculating the phase transition detection period value, wherein the main clock 1588 Sync message transmission interval time is multiplied by the phase hopping adjustment period to obtain a phase abrupt detection period value, that is, the phase hopping detection period value=Sync message transmission interval The product of the phase adjustment period. Real-time detection of whether the phase has jumped. When the phase jumps, the detection cycle is entered. After the detection period is filtered, the phase adjustment is performed. That is, after the 1588 time synchronization calculation is completed, it is determined whether the phase difference satisfies the phase jump tolerance value. If it is satisfied, and there is no phase jump record before, the time phase can be directly corrected. Otherwise, the phase jump adjustment period detection is turned on. During the detection period, whether the phase jump is a positive transition or a negative transition is recorded, and the phase deviation value is not corrected during the detection. After the end of the detection period, analyze the positive and negative signs of the phase jump record. If the positive and negative signs are consistent, the phase adjustment is allowed. Otherwise, the phase jump positive and negative records are cleared and the next detection cycle is entered. FIG. 5 is a flowchart of a processing method of 1588 phase hopping according to a preferred embodiment of the present invention. As shown in FIG. 5, the flow includes the following steps S502 to S506. Step S502, configuring a phase jump tolerance value by using a phase jump parameter configuration module, and configuring a phase jump adjustment period. In step S504, the message detection module detects the transmission frequency of the main clock 1588 Sync message, thereby calculating the phase jump detection period. Step S506, inputting the phase deviation calculated by the 1588 protocol to the phase jump period detecting module. The phase jump of the 1588 protocol is solved by the filtering algorithm of the phase jump period detecting module. In the preferred embodiment, a processing device for 1588 phase mutation is further provided, the device includes a phase hopping parameter configuration module, a message receiving detection module and a phase hopping period detecting module, and each of the devices is The module and its functions are described. The phase jump parameter configuration module is configured to configure the phase jump tolerance value, configure the phase jump adjustment period, and maintain these configuration values. The packet receiving detection module is configured to detect the sending frequency of the main clock 1588 Sync message, and calculate the phase jump adjustment period to obtain the phase jump adjustment period time value. The phase jump period detecting module (for implementing the functions of the comparing module 30 and the correcting module 32) is configured to detect whether the phase is hopping, and if there is no phase jump in the detecting period, the 1588 can directly correct the phase deviation. If a phase jump is detected, record whether each transition is a positive or negative transition. When a detection cycle ends, it is judged whether there is both a positive transition and a negative transition in the phase jump. If there is, it is considered that the hardware system is disturbed or has an error, phase fluctuation occurs, and the filtering effect is achieved by not correcting the phase deviation. If there is a positive or negative transition in the detection period, it is proved that the phase deviation does change, that is, the phase correction is performed. With the preferred embodiment, it is possible to prevent the phase jump of 1588 time synchronization due to various reasons (for example, hardware reasons) by filtering, and solve the protection problem of hardware errors, and solve the problem that the 1588 protocol cannot sense the hardware. The error, resulting in a wrong time correction problem. In addition, since the preferred embodiment and its preferred implementation are implemented on the basis of existing hardware devices, not only does not add additional cost, but also increases the cost of the software, but effectively solves the 1588 time synchronization. The phase mutation problem improves the quality and safety of 1588 time synchronization. In another embodiment, a phase jump processing software is provided for performing the technical solutions described in the above embodiments and preferred embodiments. In another embodiment, a storage medium is provided, in which the above-described transmission delay control software is stored, including but not limited to an optical disk, a floppy disk, a hard disk, a rewritable memory, and the like. Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device so that they may be stored in the storage device by the computing device, or they may be separately fabricated into individual integrated circuit modules, or Multiple modules or steps are made into a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
Claims
1. 一种相位跳变的处理方法, 包括如下步骤: A method for processing a phase jump includes the following steps:
比较检测到的相位跳变值与相位跳变阈值; Comparing the detected phase jump value with the phase jump threshold;
在所述相位跳变值不超过所述相位跳变阈值的情况下, 进行时间相位的修 正。 In the case where the phase hopping value does not exceed the phase hopping threshold, the correction of the time phase is performed.
2. 根据权利要求 1所述的方法, 其中, 在所述相位跳变值超过所述相位跳变阈值 的情况下, 所述方法还包括: The method according to claim 1, wherein, in a case that the phase hopping value exceeds the phase hopping threshold, the method further includes:
启动相位跳变检测周期, 在所述相位跳变检测周期内, 如果所述检测到的 相位跳变值均为正值或者均为负值, 则进行时间相位的修正。 The phase jump detection period is started, and in the phase jump detection period, if the detected phase jump values are positive values or both are negative values, the time phase correction is performed.
3. 根据权利要求 2所述的方法, 其中, 所述方法还包括: 如果所述检测到的相位跳变值包括正值和负值,则不进行时间相位的修正, 进入下一个相位跳变检测周期。 3. The method according to claim 2, wherein the method further comprises: if the detected phase jump value comprises a positive value and a negative value, the time phase correction is not performed, and the next phase transition is entered. Detection period.
4. 根据权利要求 3所述的方法, 其中, 所述方法还包括: 4. The method according to claim 3, wherein the method further comprises:
如果连续的预定数量的相位跳变检测周期中的每一个相位检测周期所检测 到的相位跳变值均包括正值和负值, 则进行告警。 If the phase hopping value detected for each of the successive predetermined number of phase hopping detection periods includes positive and negative values, an alarm is issued.
5. 根据权利要求 1所述的方法, 其中, 在所述相位跳变值超过所述相位跳变阈值 的情况下, 所述方法还包括: 不进行时间相位的修正。 5. The method according to claim 1, wherein, in a case where the phase hopping value exceeds the phase hopping threshold, the method further comprises: not performing correction of a time phase.
6. 根据权利要求 1至 5中任一项所述的方法, 其特征在于, 所述方法应用于电气 和电子工程师协会 IEEE 1588同步协议标准。 The method according to any one of claims 1 to 5, characterized in that the method is applied to the Institute of Electrical and Electronics Engineers IEEE 1588 Synchronization Protocol Standard.
7. 一种相位跳变的处理装置, 包括: 7. A phase jump processing device, comprising:
比较模块, 设置为比较检测到的相位跳变值与相位跳变阈值; 修正模块, 在所述相位跳变值不超过所述相位跳变阈值的情况下, 设置为 进行时间相位的修正。 The comparison module is configured to compare the detected phase hopping value with the phase hopping threshold; and the correction module is configured to perform the correction of the time phase if the phase hopping value does not exceed the phase hopping threshold.
8. 根据权利要求 7所述的装置, 其中, 所述修正模块, 还设置为在所述相位跳变 值超过所述相位跳变阈值的情况下, 启动相位跳变检测周期, 并在所述相位跳
变检测周期内, 在所述检测到的相位跳变值均为正值或者均为负值的情况下, 进行时间相位的修正。 The device according to claim 7, wherein the correction module is further configured to: when the phase hopping value exceeds the phase hopping threshold, initiate a phase hopping detection period, and Phase jump In the variable detection period, when the detected phase jump values are both positive values or negative values, the time phase is corrected.
9. 根据权利要求 8所述的装置, 其中, 所述修正模块, 还设置为所述检测到的相 位跳变值包括正值和负值的情况下, 取消进行时间相位的修正, 并进入下一个 相位跳变检测周期进行检测。 9. The apparatus according to claim 8, wherein the correction module is further configured to cancel the correction of the time phase when the detected phase jump value comprises a positive value and a negative value, and enter the next A phase jump detection period is detected.
10. 根据权利要求 9所述的装置, 其中, 还包括: 10. The device according to claim 9, further comprising:
告警模块, 设置为在连续的预定数量的相位跳变检测周期中的每一个相位 检测周期所检测到的相位跳变值均包括正值和负值的情况下, 进行告警。
The alarm module is configured to perform an alarm when the phase jump values detected by each of the consecutive predetermined number of phase jump detection periods include positive and negative values.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110223727.2A CN102355317B (en) | 2011-08-05 | 2011-08-05 | Processing method of phase jump and apparatus thereof |
CN201110223727.2 | 2011-08-05 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2013020441A1 true WO2013020441A1 (en) | 2013-02-14 |
Family
ID=45578818
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2012/078753 WO2013020441A1 (en) | 2011-08-05 | 2012-07-17 | Method and device for handling phase transition |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN102355317B (en) |
WO (1) | WO2013020441A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102355317B (en) * | 2011-08-05 | 2017-05-10 | 中兴通讯股份有限公司 | Processing method of phase jump and apparatus thereof |
EP2999181B1 (en) | 2013-06-27 | 2017-09-06 | Huawei Technologies Co., Ltd. | Signaling processing method and apparatus, and signal receiver |
CN115102817B (en) * | 2022-08-24 | 2022-12-13 | 鹏城实验室 | Phase jump correction method and related equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1835597A (en) * | 2005-03-17 | 2006-09-20 | 华为技术有限公司 | Method and device of regulating program reference clock |
CN101222288A (en) * | 2008-02-01 | 2008-07-16 | 华为技术有限公司 | IP network transmission method, system and equipment automatically adapting network jitter |
CN101478358A (en) * | 2008-01-02 | 2009-07-08 | 中兴通讯股份有限公司 | Method and device for optimized time synchronization correction |
CN102355317A (en) * | 2011-08-05 | 2012-02-15 | 中兴通讯股份有限公司 | Processing method of phase jump and apparatus thereof |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1825620B1 (en) * | 2004-12-16 | 2009-04-08 | Siemens Aktiengesellschaft | Synchronization module |
-
2011
- 2011-08-05 CN CN201110223727.2A patent/CN102355317B/en active Active
-
2012
- 2012-07-17 WO PCT/CN2012/078753 patent/WO2013020441A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1835597A (en) * | 2005-03-17 | 2006-09-20 | 华为技术有限公司 | Method and device of regulating program reference clock |
CN101478358A (en) * | 2008-01-02 | 2009-07-08 | 中兴通讯股份有限公司 | Method and device for optimized time synchronization correction |
CN101222288A (en) * | 2008-02-01 | 2008-07-16 | 华为技术有限公司 | IP network transmission method, system and equipment automatically adapting network jitter |
CN102355317A (en) * | 2011-08-05 | 2012-02-15 | 中兴通讯股份有限公司 | Processing method of phase jump and apparatus thereof |
Also Published As
Publication number | Publication date |
---|---|
CN102355317A (en) | 2012-02-15 |
CN102355317B (en) | 2017-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2908452A1 (en) | Time synchronization method and device | |
US8762796B2 (en) | Communication device and time synchronization system | |
US10439748B1 (en) | Time correction using extension fields | |
US11251891B2 (en) | Method for identifying an incorrect time stamp of an ethernet message and control unit for a motor vehicle | |
US10158441B1 (en) | Securing time between nodes | |
JP6227714B2 (en) | Method and apparatus for synchronizing a slave clock to a master clock | |
KR101517746B1 (en) | Method for detecting a synchronization failure of a transparent clock and related protection schemes | |
EP2738971A1 (en) | Mehtod and device for clock synchronization | |
WO2014032350A1 (en) | Method and node based on seamless redundant ring network for increasing precision of clock | |
JP6891671B2 (en) | Attack detection device and attack detection method | |
WO2012088843A1 (en) | Method and system for bidirectional forwarding detection | |
WO2017032113A1 (en) | Method and apparatus for measuring time synchronization deviation | |
JP7172043B2 (en) | Attack detection device and attack detection method | |
WO2016054884A1 (en) | Frequency deviation monitoring method, device and computer storage medium | |
WO2012155663A1 (en) | Method and network apparatus for adjusting frequency based on ieee 1588 protocol | |
WO2013020441A1 (en) | Method and device for handling phase transition | |
JP2011035473A (en) | Baud rate error detection circuit and baud rate error detection method | |
WO2014101668A1 (en) | Time synchronization processing method and apparatus | |
FI124040B (en) | Procedure and apparatus for controlling frequency synchronization | |
JP2023506907A (en) | A Method for Validating Sensor Data Validity in Ethernet Onboard Networks | |
EP3166242B1 (en) | Clock synchronization monitoring in an ethernet-based network | |
WO2012071851A1 (en) | Method and apparatus for adjusting bidirectional forwarding detection transmission interval according to network jitter | |
CN102404104B (en) | Adaptive synchronicity method and system based on different delayed time mechanism | |
US8897289B2 (en) | Node system and supervisory node | |
JP2011071869A (en) | Clock synchronizing method and packet communication system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 12821803 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 12821803 Country of ref document: EP Kind code of ref document: A1 |