IEEE 1588 synchronization method

By obtaining timestamp information and using Kalman filtering and neuron PI control to adjust the slave clock frequency, the problem of reduced synchronization accuracy caused by network jitter in the IEEE 1588 protocol is solved, and accurate synchronization of the master and slave clocks is achieved.

CN120658336APending Publication Date: 2025-09-16XIANGTAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510059658.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The IEEE 1588 precision time synchronization protocol is susceptible to network transmission delay jitter in the industrial field, resulting in reduced master-slave clock synchronization accuracy.

Method used

The timestamp information is obtained through the interaction of master and slave clock messages, the master and slave clock deviations are calculated and the Kalman filter algorithm is used for optimal estimation. The slave clock frequency is adjusted by combining the threshold and neuron PI control to achieve precise synchronization of the master and slave clocks.

Benefits of technology

The synchronization accuracy of the master and slave clocks is improved, the impact of network transmission delay jitter on the synchronization accuracy is reduced, and accurate synchronization of the master and slave clocks is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658336A_ABST
    Figure CN120658336A_ABST
Patent Text Reader

Abstract

The invention discloses an IEEE (Institute of Electrical and Electronic Engineers) 1588 synchronization method, which comprises the following steps of: calculating master-slave clock skew through message interaction, calculating an optimal estimated value of the master-slave clock skew by using a Kalman filtering algorithm to serve as a threshold value, comparing the master-slave time skew with the optimal estimated value, and filtering and correcting the master-slave time skew to obtain filtered clock skew. And then inputting to a single-neuron PI controller, calculating to obtain a frequency compensation value of the slave clock, and adjusting the frequency and the phase by the slave clock according to the frequency compensation value to realize synchronization of the master clock and the slave clock. According to the method, the problem of overlarge synchronization deviation in the 1588 protocol can be effectively solved, and more reliable and accurate clock synchronization is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Ethernet precision time synchronization, and more particularly to an IEEE 1588 synchronization method. Background Art

[0002] IEEE 1588 stands for Precision Clock Synchronization Protocol for Networked Measurement and Control Systems. Its purpose is to maintain time synchronization between different nodes in Ethernet networks. The IEEE 1588 precision time synchronization protocol boasts advantages such as ease of operation and portability, making it widely used across various industrial sectors. However, clock synchronization systems are highly susceptible to interference from network transmission delay jitter, which can cause significant jitter in the master-slave clock deviation and, in turn, reduce synchronization accuracy. Therefore, this paper proposes an IEEE 1588 synchronization method to reduce the impact of network transmission delay jitter on synchronization accuracy and achieve precise master-slave clock synchronization. Summary of the Invention

[0003] The present invention aims to improve the master-slave clock synchronization accuracy and provides an IEEE 1588 synchronization method, which specifically includes the following steps:

[0004] (1) Through the interaction of the master clock and the slave clock message, the slave clock obtains the four timestamp information of t1, t2, t3, and t4. The slave clock calculates the master-slave clock deviation offset(t) at time t and calculates the average master-slave clock deviation Average_offset. Average_offset is the average value of the master-slave clock deviation in the previous N moments, and the unit is ns.

[0005] (2) Use the Kalman filter algorithm to calculate the optimal estimate x(t|t) of the master-slave clock offset (t) at time t, in nanoseconds.

[0006] (3) The absolute value of the optimal estimate |x(t|t)| serves as a threshold, and the absolute value of the master-slave clock offset |offset(t)| is compared with it. When |offset(t)| is less than or equal to the threshold, the filtered clock offset offset_f(t) = offset(t), in nanoseconds.

[0007] When |offset(t)| is greater than the threshold, if the clock deviation value is positive (offset(t)≥0), then offset_f(t)=Average_offset; if the clock deviation value is negative (offset(t)<0), then offset_f(t)=-Average_offset;

[0008] (4) Based on offset_f(t), the frequency compensation value u(t) and the frequency compensation increment Δu(t) are calculated in ns. The slave clock adjusts the slave clock frequency and phase based on u(t) and Δu(t) to achieve precise synchronization between the master and slave clocks.

[0009] In the above-mentioned IEEE 1588 synchronization method, step (1) is specifically implemented as follows:

[0010]

[0011] The unit is ns.

[0012] In the IEEE 1588 synchronization method described above, in step (2), the optimal estimated value x(t|t) at time t obtained using the Kalman filter algorithm is specifically implemented as follows:

[0013] x(t|t-1)=A·x(t-1|t-1)

[0014] P(t|t-1)=A·P(t-1|t-1)·A T +Q

[0015] Kg(t)=P(t|t-1)·H T / (H·P(t|t-1)·H T +R)

[0016] P(t|t)=(I-Kg(t)·H)·P(t|t-1)

[0017] x(t|t)=x(t|t-1)+Kg(t)·(z(t)-H·x(t|t-1))

[0018] Where x(t|t-1) represents the predicted value at time t, x(t|t) represents the optimal estimate at time t, z(t) represents the measured value at time t, R is the measurement noise covariance, Q is the process noise covariance, P(t|t-1) is the prior error covariance matrix, and P(t|t) is the posterior error covariance matrix, all in ns; A is the state transfer matrix, H is the observation matrix, and H T is the transposed matrix of H, I is the identity matrix, Kg(t) represents the Kalman gain at time t, 0 <Kg(t)<1;

[0019] In the above-mentioned IEEE 1588 synchronization method, the step (4) is specifically implemented as follows:

[0020]

[0021] u(t) is the frequency compensation value of the slave clock at time t, Δu(t) is the frequency compensation increment of the slave clock at time t, both in nanoseconds (ns). w'1(t) and w'2(t) are the weighting factors at time t, where 0 < w'1(t), w'2(t) < 1, and K(t) is the neuron proportionality coefficient at time t, where 0 < K(t) < 1. Description of the Drawings

[0022] Figure 1 Flowchart of the clock synchronization method of the present invention

[0023] Figure 2 Schematic diagram of clock synchronization of the IEEE 1588 protocol Detailed Implementation Manner

[0024] To better illustrate the present invention, the following further explains the present invention in conjunction with the drawings in the specification.

[0025] Figure 1 Flowchart of the clock synchronization method of the present invention, and the specific implementation is as follows:

[0026] (1) Through the interaction of master clock and slave clock messages, as Figure 2 shown, the slave clock obtains four timestamp information t1, t2, t3, t4, calculates the master-slave clock deviation offset(t) at time t, and calculates the average master-slave clock deviation Average_offset. Average_offset is the average value of the master-slave clock deviations in the previous N moments, both in nanoseconds (ns);

[0027]

[0028] (2) Use the Kalman filter algorithm for the master-slave clock deviation offset(t) to obtain the optimal estimated value x(t|t) at time t, in nanoseconds (ns), and the specific implementation is as follows:

[0029] x(t|t - 1) = A · x(t - 1|t - 1)

[0030] P(t|t - 1) = A · P(t - 1|t - 1) · A T + Q <00000​​​​​​​​​​​​

[0034] Among them, x(t|t - 1) represents the predicted value at time t, x(t|t) represents the optimal estimated value at time t, z(t) represents the measured value at time t, R is the measurement noise covariance, Q is the process noise covariance, P(t|t - 1) is the prior error covariance matrix, and P(t|t) is the posterior error covariance matrix, with the unit of ns; A is the state transition matrix, H is the observation matrix, and H T is the transpose matrix of H, I is the identity matrix, Kg(t) represents the Kalman gain at time t, and 0 < Kg(t) < 1;

[0035] (3) The absolute value |x(t|t)| of the optimal estimated value serves as the threshold, and the absolute value |offset(t)| of the master-slave clock deviation is compared with it:

[0036] When |offset(t)| ≤ |x(t|t)|, the filtered clock deviation offset_f(t) = offset(t), with the unit of ns;

[0037] When |offset(t)| > |x(t|t)|, if the clock deviation value is positive (offset(t) ≥ 0), then offset_f(t) = Average_offset; if the clock deviation value is negative (offset(t) < 0), then offset_f(t) = -Average_offset, with the unit of ns; <*

[0038] (4) According to offset_f(t), calculate the frequency compensation value u(t) and the frequency compensation increment Δu(t), with the unit of ns. The specific implementation is as follows:

[0039] The filtered deviation value offset_f(t) is used as the input value of the single-neuron PI control, and the proportional input x1(t) and the integral input x2(t) are calculated, with the unit of ns. The specific implementation is as follows:

[0040]

[0041] Update the weighted coefficient w' i (t) at time t through the supervised Hebb learning rule, where 0 < w'1(t), w'2(t) < 1. The specific implementation is as follows:

[0042]

[0043] Among them, w1(t) and w2(t) are intermediate parameters, and η p 、η i are the learning rates of proportional and integral respectively, where 0 < η p 、η i<1, where λ is the inertia coefficient, 0 < λ < 1; u(t - 1) is the frequency compensation value at the slave clock time t - 1, with the unit of ns;

[0044] Then update the neuron ratio coefficient K(t) at time t, 0 < K(t) < 1. The specific implementation is as follows:

[0045] K(t) = K(t - 1) + ΔK(t)

[0046] where ΔK(t) is the increment of the neuron ratio coefficient at time t. The specific implementation is as follows:

[0047]

[0048] where, T v is an intermediate parameter, 0.025 ≤ C ≤ 0.05, 0.05 ≤ L ≤ 0.1, and sign() is the sign function.

[0049] where, Δoffset_f(t) = offset_f(t) - offset_f(t - 1)

[0050] Δ 2 offset_f(t) = offset_f(t) - 2·offset_f(t - 1) + offset_f(t - 2), and the units are all ns;

[0051] Through the above equations, substitute them into the following formula for calculation to obtain the slave clock frequency adjustment amount u(t):

[0052]

[0053] where, u(t) is the frequency compensation value calculated at the slave clock time t, u(t - 1) is the frequency compensation value calculated at the slave clock time t - 1, and Δu(t) is the frequency compensation increment at the slave clock time t, and the units are all ns.

Claims

1. An IEEE 1588 synchronization method, characterized in that: It includes the following steps: (1) Through the interaction of master clock and slave clock messages, the slave clock obtains four timestamp information of t1, t2, t3, and t4. The slave clock calculates the master-slave clock deviation offset(t) at time t, and calculates the average master-slave clock deviation Average_offset. Average_offset is the average value of the master-slave clock deviations at the previous N moments, and the unit is ns; (2) Use the Kalman filtering algorithm for the master-slave clock deviation offset(t) to obtain the optimal estimated value x(t|t) at time t, and the unit is ns; (3) The absolute value |x(t|t)| of the optimal estimated value serves as a threshold, and it is compared with the absolute value |offset(t)| of the master-slave clock deviation. When |offset(t)| is less than or equal to this threshold, the filtered clock deviation offset_f(t) = offset(t), and the unit is ns; When |offset(t)| is greater than this threshold, if the clock deviation value is positive (offset(t)≥0), then offset_f(t) = Average_offset; if the clock deviation value is negative (offset(t)<0), then offset_f(t) = -Average_offset; (4) According to offset_f(t), calculate the frequency compensation value u(t) and the frequency compensation increment Δu(t), and the unit is ns. The slave clock adjusts the slave clock frequency and phase according to u(t) and Δu(t) to achieve accurate synchronization of the master and slave clocks.

2. The IEEE 1588 synchronization method according to claim 1, wherein in step (1), The specific implementation is as follows: The unit of all of them is ns.

3. The IEEE 1588 synchronization method according to claim 1, wherein in step (2), The specific implementation is as follows: x(t|t - 1) = A·x(t - 1|t - 1) P(t|t-1)=A·P(t-1|t-1)·A T +Q Kg(t)=P(t|t-1)·H T / (H·P(t|t-1)·H T +R) P(t|t) = (I - Kg(t)·H)·P(t|t - 1) x(t|t) = x(t|t - 1) + Kg(t)·(z(t) - H·x(t|t - 1)) Where x(t|t-1) represents the predicted value at time t, x(t|t) represents the optimal estimate at time t, z(t) represents the measured value at time t, R is the measurement noise covariance, Q is the process noise covariance, P(t|t-1) is the prior error covariance matrix, and P(t|t) is the posterior error covariance matrix, all in ns; A is the state transfer matrix, H is the observation matrix, and H T is the transposed matrix of H, I is the identity matrix, Kg(t) represents the Kalman gain at time t, 0 <Kg(t)<1。 4. The IEEE 1588 synchronization method according to claim 1, wherein the step (4) is characterized in that: The specific implementation is as follows: u(t) is the frequency compensation value of the slave clock at time t, Δu(t) is the frequency compensation increment of the slave clock at time t, and the unit of both is ns. w'1(t) and w'2(t) are the weighting coefficients at time t, 0 < w'1(t), w'2(t) < 1, and K(t) is the neuron ratio coefficient at time t, 0 < K(t) < 1.