Disclosure of Invention
In order to accurately measure the path delay in the time synchronization network, the invention aims to provide a method for accurately measuring the path delay in the time synchronization network, which can provide high-precision path delay measurement service for the time synchronization network.
The invention aims at realizing the following technical scheme:
a high-precision path delay measuring method suitable for a time synchronization network comprises the following steps:
After the network equipment is electrified, the master clock takes the current moment as the dispatch moment, encapsulates the current dispatch moment into a synchronous measurement frame, and dispatches the synchronous measurement frame to the slave clock in the network;
step two, the slave clock receives the synchronous measurement frame sent by the master clock, carries out solidification treatment on the synchronous measurement frame, then extracts the current dispatch time of the master clock in the synchronous measurement frame, corrects the time of the clock of the slave clock to be the accumulated value of the current dispatch time and the maximum transmission delay of the master clock at the solidification time of the synchronous measurement frame;
The master clock encapsulates the following dispatch time into a following synchronous measurement frame, and dispatches the following synchronous measurement frame to the slave clock in the network by taking the following dispatch time as a dispatch time point;
and step four, receiving a following synchronous measurement frame sent by the master clock from the clock, solidifying the following synchronous measurement frame to obtain the solidifying moment of the following synchronous measurement frame, comparing the solidifying moment of the following synchronous measurement frame with the expected solidifying moment, and calculating to obtain the path correction factor.
Preferably, the desired curing timeThe method comprises the following steps:
Wherein, The MD transmits the synchronization measurement frame to any other synchronization clock in the time synchronization network until the synchronization clock receiving the synchronization measurement frame completes the solidification operation of the synchronization measurement frame, and the transparent clock in the synchronization measurement frame accumulates to a maximum value.
Preferably, the following dispatch timeThe method comprises the following steps:
Wherein, The MD is the maximum value of the accumulation of transparent clocks in the synchronization measurement frame after the slave clock finishes the solidification operation of the synchronization measurement frame, which is the time when the synchronization measurement frame is dispatched for the master clock.
Preferably, the method for measuring the high-precision path delay suitable for the time synchronization network further comprises the steps that the slave clock uses the path correction factor to correct the current time of the local clock to finish time synchronization operation, or the slave clock stores the path correction factor, and in the subsequent time synchronization operation, the transparent clock value of the synchronization frame sent by the master clock is corrected, and then solidification operation is carried out to realize accurate measurement of the path delay.
The invention has the beneficial effects that:
(1) The invention fully considers the network time synchronization characteristic, and the provided path delay measuring method is suitable for the switched network connected by various topologies such as star, ring and the like.
(2) The method for measuring the path delay provided by the invention can realize high-precision unidirectional path delay measurement, avoid the introduction of unequal delay and uncertain fixed delay in the path transmission process of a synchronous measurement frame, and improve the precision of time synchronization.
(3) The invention considers the difference between the off-line measurement value and the on-line measurement value of the network hardware fixed delay, and proposes to measure the path delay in an on-line mode, thereby realizing accurate measurement of the path delay and improving the time precision.
(4) The path delay measurement method provided by the invention is based on the existing hardware equipment and software calculation operation, does not need to introduce an additional high-precision hardware clock and a measurement device, and reduces the cost of the hardware equipment required by path delay measurement.
(5) The path delay measuring method provided by the invention can be used in combination with the existing time synchronization method, can accurately measure the path delay on line, and can also be independently used as the time synchronization method to be applied to the time synchronization network.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples.
In this embodiment, a time synchronization network is illustrated in fig. 1, and a high-precision clock source synchronization clock capable of time-synchronizing other clocks in the time synchronization network is referred to as a master clock for short. And a synchronous clock for receiving the synchronous frame from the master clock and performing time synchronization operation according to the time synchronization information of the master clock contained in the synchronous frame, which is called a slave clock.
The master clock measures the one-way path delay between the master clock and the slave clocks by sending a synchronization measurement frame and a follow synchronization measurement frame to all the slave clocks, wherein the synchronization measurement frame and the follow synchronization measurement frame both belong to the synchronization frame.
The timing accuracy of the master clock should be higher than the timing accuracy of the remaining slave clocks within the time synchronized network, typically the total number of master clocks is at least 2 or more.
In the physical topology of the time synchronization network, the time synchronization network comprises a plurality of master clocks and slave clocks, wherein the master clocks are denoted by SD={M1,M2,M3,...,Mn,S1,S2,S3,…,Sm},M1 in a collective form, M 2 is denoted by a second master clock in the SD, M 3 is denoted by a third master clock in the SD, M n is denoted by a last master clock in the SD, for convenience of explanation, the embodiment uses M p to denote any one of the master clocks in the SD, S 1 is denoted by a first slave clock in the SD, S 2 is denoted by a second slave clock in the SD, S 3 is denoted by a third slave clock in the SD, S q is denoted by a last slave clock in the SD, and for convenience of explanation, the embodiment uses S q to denote any one of the slave clocks in the SD.
With reference to SAE AS6802 standard protocol, dispatch timeRefers to the time at which a master clock dispatches a sync measurement frame to a slave clock.
The definition of the maximum transmission delay MD may refer to the maximum transmission delay of SAE AS6802 standard protocol. Any one of the synchronous clocks in the time synchronous network transmits the synchronous frame to any other synchronous clock until the synchronous clock receiving the synchronous frame completes the solidification operation of the synchronous frame, and the maximum value of the accumulation of the transparent clock in the synchronous frame is called maximum transmission delay MD.
Following the dispensing momentRefers to a master clock at the dispatch timeAfter that, the time with the length of MD is passed, and the time following the synchronization measurement frame is distributed to a slave clock. The following dispatch time
A synchronization node in the clock synchronization network may perform transparent clock mechanism operations on the synchronization frames with reference to SAE AS6802 standard protocol.
Synchronous measurement frame with reference to SAE AS6802 standard or IEEE 1588Refers to the time of dispatch including the time of dispatch sent from the master clock M p to the slave clock S q And a data frame of transparent clock information. Synchronous measurement frameThe upper corner mark in (a) represents the synchronous measurement frame, M p before the lower corner mark arrow represents the identity of the master clock of the sending end of the synchronous measurement frame, and S q after the lower corner mark arrow represents the identity of the slave clock of the receiving end of the synchronous measurement frame.
For example, the number of the cells to be processed,Representing the synchronization measurement frame sent by the master clock M 1 to the slave clock S 1.
With reference to SAE AS6802 standard or IEEE 1588, following a synchronization measurement frameRefers to the inclusion following dispatch time sent by the master clock M p to the slave clock S q And a data frame of transparent clock information. Synchronous measurement frameThe upper corner mark in (a) represents the identity of the master clock of the transmitting end of the synchronous measurement frame following the synchronous measurement frame, M p before the lower corner mark arrow, and S q after the lower corner mark arrow represents the identity of the slave clock of the receiving end of the synchronous measurement frame.
For example, the number of the cells to be processed,Representing a follow-up synchronization measurement frame sent by the master node M 1 to the slave clock S 1.
The slave clock S q measures the frame for synchronization from the master clock M p according to the SAE AS6802 standardSolidifying to obtain synchronous measurement frameThe curing time of (2) is recorded asCuring timeThe upper corner mark S in (a) represents a synchronous measurement frame, M p before the lower corner mark arrow represents the identity of the master clock of the sending end of the synchronous measurement frame, and S q after the lower corner mark arrow represents the identity of the slave clock of the receiving end of the synchronous measurement frame.
For example, the number of the cells to be processed,Representing a synchronization measurement frame transmitted from the slave clock S 1 to the master clock M 1 And (3) curing the obtained cured product.
The slave clock S q follows the synchronization measurement frame from the master clock M p according to the SAE AS6802 standardCuring to obtain following synchronous measurement frameThe curing time of (2) is recorded asCuring timeThe upper corner mark F in (a) represents the identity of the master clock of the transmitting end of the following synchronous measurement frame, the M p before the lower corner mark arrow represents the identity of the slave clock of the receiving end of the following synchronous measurement frame, and the S q after the lower corner mark arrow represents the identity of the slave clock of the receiving end of the following synchronous measurement frame.
For example, the number of the cells to be processed,Representing a follow-up synchronization measurement frame from the slave clock S 1 to the master clock M 1 And (3) curing the obtained cured product.
Transmitting the following synchronization measurement frame to the slave clock S q at the master clock M p The following synchronization measurement frameIs recorded as the expected curing time of (2)The expected curing time The upper corner mark F in (a) indicates that the synchronization measurement frame is followed.
For example, the number of the cells to be processed,Follow-up synchronization measurement frame representing transmission of master clock M 1 to slave clock S 1 Is used for the curing time.
Path correction factorRefers to the slave clock calculating the preset following synchronous measurement frameThe difference between the expected curing time and the curing time, i.ePath correction factorThe lower corner mark S q in (a) represents the identity of the slave clock of the receiving end, and the upper corner mark M p represents the identity of the master clock of the transmitting end.
Referring to fig. 3, a process of a high-precision path delay measurement method suitable for a time-synchronized network includes the steps of:
After the network equipment is electrified, the master clock takes the current time as the dispatch time, and encapsulates the current dispatch time into a synchronous measurement frame, and dispatches the synchronous measurement frame to the slave clock in the network.
In the present embodiment, after time synchronizing the network device, the master clock M p starts the path delay measurement, and distributes the synchronization measurement frameInto the slave clock S q. For example, the time synchronization network is composed of 4 synchronization clocks as shown in fig. 1, including 1 master clock and 3 slave clocks.
Referring to fig. 1 and 2, after power-up, the master clock M 1 takes the current time as the dispatch timeWill be at the current timeEncapsulation into synchronous measurement framesTransmitting a synchronization measurement frame to the slave clock S 1
Similarly, after power-up, the master clock M 1 takes the current time as the dispatch timeWill be at the current timeEncapsulation into synchronous measurement framesTransmitting a synchronization measurement frame to the slave clock S 2
Similarly, after power-up, the master clock M 1 takes the current time as the dispatch timeWill be at the current timeEncapsulation into synchronous measurement framesTransmitting a synchronization measurement frame to the slave clock S 3
And secondly, receiving a synchronous measurement frame sent by the master clock from the slave clock, solidifying the synchronous measurement frame, extracting the current dispatch time of the master clock in the synchronous measurement frame, correcting the time of the clock of the slave clock to be the accumulated value of the current dispatch time and the maximum transmission delay of the master clock at the solidification time of the synchronous measurement frame, and setting the expected solidification time following the synchronous measurement frame from the slave clock. The method can be concretely divided into the following steps:
Step 201, the slave clock receives the synchronous measurement frame sent by the master clock, and carries out solidification treatment on the synchronous measurement frame.
Specifically, the slave clock S q receives the synchronization measurement frame from the master clock M p Performing solidifying, i.e. extracting synchronous measurement frames from clock S q Transparent clock information carried in the data frame is processed according to a curing method in SAE AS6802 standard to obtain the synchronous measurement frameIs set at the curing time of (2)
For example, see fig. 1 and 2, the slave clock S 1 receives the synchronization measurement frame from the master clock M 1 For the synchronous measurement frameSolidifying to obtain synchronous measurement frameIs set at the curing time of (2)
Similarly, the slave clock S 2 receives the synchronous measurement frame from the master clock M 1 For the synchronous measurement frameSolidifying to obtain synchronous measurement frameIs set at the curing time of (2)
Similarly, the slave clock S 3 receives the synchronous measurement frame from the master clock M 1 For the synchronous measurement frameSolidifying to obtain synchronous measurement frameIs set at the curing time of (2)
Step 202, extracting the current dispatch time of the synchronous measurement frame sent by the master clock from the clock, and correcting the time of the clock of the slave clock to be the accumulated value of the current dispatch time and the maximum transmission delay of the master clock at the solidification time of the synchronous measurement frame.
Specifically, the slave clock S q receives the synchronization measurement frame from the master clock M p Extracting synchronization measurement framesThe current dispatch time in (3)At the solidification time of the synchronous measurement frameThe slave clock correcting the time of its own clock to the accumulated value of the current dispatch time of the master clock and the maximum transmission delay, i.e.
For example, see fig. 1 and 2, the slave clock S 1 receives the synchronization measurement frame from the master clock M 1 Extracting synchronization measurement framesThe current dispatch time in (3)At the solidification time of the synchronous measurement frameThe slave clock S 1 corrects the time of its own clock to the sum of the current dispatch time of the master clock and the maximum transmission delay, i.e
Similarly, the slave clock S 2 receives the synchronous measurement frame from the master clock M 1 Extracting synchronization measurement framesThe current dispatch time in (3)At the solidification time of the synchronous measurement frameThe slave clock S 2 corrects the time of its own clock to the sum of the current dispatch time of the master clock and the maximum transmission delay, i.e
Similarly, the slave clock S 3 receives the synchronous measurement frame from the master clock M 1 Extracting synchronization measurement framesThe current dispatch time in (3)At the solidification time of the synchronous measurement frameThe slave clock S 3 corrects the time of its own clock to the sum of the current dispatch time of the master clock and the maximum transmission delay, i.e
Step 203, setting the expected curing time following the synchronization measurement frame from the clock.
Specifically, the slave clock S q sets the current dispatch point of the master clock M p An accumulated value of 2 times of the maximum transmission delay is set to follow the expected solidification time of the synchronous measurement frameI.e.
For example, as shown in fig. 1 and 2, the slave clock S 1 transmits the current dispatch time of the master clock M 1 An accumulated value of 2 times of the maximum transmission delay is set to follow the expected solidification time of the synchronous measurement frameI.e.
Similarly, the slave clock S 2 sends the current dispatch point of the master clock M 1 An accumulated value of 2 times of the maximum transmission delay is set to follow the expected solidification time of the synchronous measurement frameI.e.
Similarly, the slave clock S 3 sends the current dispatch point of the master clock M 1 An accumulated value of 2 times of the maximum transmission delay is set to follow the expected solidification time of the synchronous measurement frameI.e.
And step three, the master clock packages the following dispatch time into the following synchronous measurement frame, and dispatches the following synchronous measurement frame to the slave clock in the network by taking the following dispatch time as the dispatch time point.
Specifically, in the present invention, the master clock M p will follow the dispatch timeEncapsulation to follow-up synchronization measurement frameIn order to follow the dispatch timeFor dispatch time points, dispatch follow-up synchronization measurement framesTo the slave clock S q.
For example, referring to FIGS. 1 and 2, the master clock M 1 will follow the dispatch timeEncapsulation to follow-up synchronization measurement frameIn order to follow the dispatch timeFor dispatch time points, dispatch follow-up synchronization measurement framesTo a slave clock S 1;
similarly, the master clock M 1 will follow the dispatch time Encapsulation to follow-up synchronization measurement frameIn order to follow the dispatch timeFor dispatch time points, dispatch follow-up synchronization measurement framesTo a slave clock S 2;
similarly, the master clock M 1 will follow the dispatch time Encapsulation to follow-up synchronization measurement frameIn order to follow the dispatch timeFor dispatch time points, dispatch follow-up synchronization measurement framesTo the slave clock S 3.
And step four, receiving a following synchronous measurement frame sent by the master clock from the clock, solidifying the following synchronous measurement frame to obtain the solidifying moment of the following synchronous measurement frame, comparing the solidifying moment of the following synchronous measurement frame with the expected solidifying moment, and calculating to obtain the path correction factor.
Specifically, the slave clock S q follows the synchronization measurement frame sent from the master clock M p Performing solidifying, i.e. extracting synchronous measurement frames from clock S q Transparent clock information carried in the data frame is processed according to a curing method in SAE AS6802 standard to obtain the following synchronous measurement frameIs set at the curing time of (2)And with the expected curing time preset by the selfComparing and calculating to obtain path correction factorI.e.The slave clock can use the path correction factor to correct the current time of the local clock to finish time synchronization operation, or can store the path correction factor, in the subsequent time synchronization operation, correct the transparent clock value of the synchronization frame sent by the master clock, then execute solidification operation, realize accurate measurement of path delay and improve time synchronization accuracy.
For example, see fig. 1 and 2, the slave clock S 1 transmits a following synchronization measurement frame to the master clock M 1 Curing to obtain the following synchronous measurement frameIs set at the curing time of (2)And with the expected curing time preset by the selfComparing and calculating to obtain path correction factorI.e.
Similarly, the slave clock S 2 transmits a following synchronous measurement frame to the master clock M 1 Curing to obtain the following synchronous measurement frameIs set at the curing time of (2)And with the expected curing time preset by the selfComparing and calculating to obtain path correction factorI.e.
Similarly, the slave clock S 3 transmits a following synchronous measurement frame to the master clock M 1 Curing to obtain the following synchronous measurement frameIs set at the curing time of (2)And with the expected curing time preset by the selfComparing and calculating to obtain path correction factorI.e.
In this embodiment, the paths between all the synchronous clocks of the time synchronization network in the first to fourth steps are measured, so that the path correction factor can be obtained finally, and the transparent clock value used for correcting the unidirectional path delay between the master clock and the slave clock in the subsequent time synchronization is used to improve the precision of the time synchronization.
The high-precision path delay measurement method suitable for the time synchronization network in the embodiment is used for accurately measuring the unidirectional path delay between a master clock and a slave clock. In a time-synchronized network, a measurement operation may be initiated by a master clock, with accurate measurements of the one-way path delay between the master clock and each slave clock within the network. In addition, the path delay measurement method provided by the embodiment is also suitable for precisely measuring the unidirectional path delay between the slave clock and the master clock, and the slave clock can initiate the measurement operation.
The high-precision path delay measuring method suitable for the time synchronization network can be used in combination with the existing time synchronization method, can accurately measure the path delay on line, and can also be independently used as the time synchronization method to be applied to the time synchronization network.
It will be understood that equivalents and modifications will occur to those skilled in the art in light of the present invention and their spirit, and all such modifications and substitutions are intended to be included within the scope of the present invention as defined in the following claims.