CN111083776A - TTE time synchronization method based on 1588 and AS6802 protocol - Google Patents

TTE time synchronization method based on 1588 and AS6802 protocol Download PDF

Info

Publication number
CN111083776A
CN111083776A CN201911235633.XA CN201911235633A CN111083776A CN 111083776 A CN111083776 A CN 111083776A CN 201911235633 A CN201911235633 A CN 201911235633A CN 111083776 A CN111083776 A CN 111083776A
Authority
CN
China
Prior art keywords
time
tte
protocol
synchronization
clock
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.)
Granted
Application number
CN201911235633.XA
Other languages
Chinese (zh)
Other versions
CN111083776B (en
Inventor
邱智亮
周凌飞
潘伟涛
狄昕涛
张洪斌
曹家亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xidian University
Original Assignee
Xidian University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xidian University filed Critical Xidian University
Priority to CN201911235633.XA priority Critical patent/CN111083776B/en
Publication of CN111083776A publication Critical patent/CN111083776A/en
Application granted granted Critical
Publication of CN111083776B publication Critical patent/CN111083776B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/003Arrangements to increase tolerance to errors in transmission or reception timing

Abstract

The invention provides a time synchronization method of TTE based on 1588 and AS6802 protocols, aiming at realizing time synchronization with high adaptability and high stability among network devices in the TTE. The method comprises the following implementation steps: the network equipment measures the link time delay between each adjacent port in the time-triggered Ethernet TTE; dividing network equipment in the TTE based on a 1588 protocol; master clock device to each slave device SjBroadcasting a synchronization frame; each slave device SjRealizing periodic global time synchronization with master clock equipment based on a 1588 protocol; dividing the network equipment in TTE' based on AS6802 protocol; each synchronization master SMgPre-synchronizing with the compression host based on an AS6802 protocol; each synchronization master SMgAnd obtaining the TTE time synchronization result with the compression host based on the AS6802 protocol.

Description

TTE time synchronization method based on 1588 and AS6802 protocol
Technical Field
The invention belongs to the technical field of communication, and relates to a Time Triggered Ethernet (TTE) time synchronization method, in particular to a Time Triggered Ethernet (TTE) time synchronization method based on a 1588 protocol and an AS6802 protocol, which is used for improving the adaptability and stability of time synchronization among network devices in the TTE.
Background
A Time-Triggered Ethernet (TTE) is an Ethernet network based on the Time-Triggered protocol. The TTE comprises at least two network devices, each of which comprises at least two ports. Data interaction is completed among the network devices through mutual receiving and sending of Time-trigger (TT) services and Event-trigger (ET) services. Each network device needs to adjust its own local time through time synchronization operation, so as to realize time unification among each network device in the TTE, and complete the TT service periodic transceiving according to a time unified scheduling table. The idea of implementing time synchronization among network devices in the TTE is to perform interaction of specific synchronization frames among the network devices to obtain time nodes required for synchronization, and then correct local time of the network devices according to the time nodes, so that the local time of all the network devices is the same. Therefore, the time synchronization of each network device in the TTE needs to have both high adaptability and high stability. The adaptability of time synchronization is influenced by the time format of absolute synchronization, and all network equipment needs to keep the same Greenwich mean time; the stability of time synchronization is limited by the difference in start time between different network devices and the fault tolerance of the network devices.
In order to improve the adaptability of time synchronization between various network devices of the TTE, a typical time synchronization method in the prior art is a TTE time synchronization method based on 1588 protocol. The 1588 synchronization method is based on an IEEE1588v2 precision clock synchronization protocol, and realizes time synchronization of sub-microsecond level deviation through synchronization frame interaction of a master clock device and a slave device, but is greatly limited by the quality of a master clock, so that the stability of time synchronization is poor, for example: a patent document "a centralized method for achieving 1588 time synchronization on a distributed system" (application date: 2017, 10, 24, application number: 2017104426971, application publication number: CN 107294634A) applied by Beacon communication science and technology corporation discloses a centralized method for achieving 1588 time synchronization on a distributed system. The method comprises the following specific steps: the master clock node sends a synchronous message carrying t1 and t1' -t 1, the t1' is the time when the same-node line card sends the synchronous message, the slave clock node receives the synchronous message, the t2' and the t2 are marked, and the correction delay value of the synchronous message is calculated; the slave clock node sends a delay request message carrying t3 and t3' -t 3, t3' is the time when the same-node line card sends the delay request message, the master clock node receives the delay request message, prints t4' and t4, calculates a delay request message correction delay value, and inserts t4 into a delay response message to send the delay response message to the slave clock node, the slave clock node acquires all timestamps and two correction delay values, time synchronization with less development and debugging workload is completed through a time synchronization algorithm, but when the master clock device fails, the problem that all network devices cannot schedule TT services according to correct Greenwich mean time is caused, and the stability of time synchronization is low.
In order to improve the stability of time synchronization between TTE network devices, a typical time synchronization method in the prior art is a TTE time synchronization method based on an AS6802 protocol. The AS6802 synchronization method is based on the standard of saias 6802(Society of Automotive Engineers) of the american Society of Automotive engineering, realizes high-precision time synchronization by protocol control frame interaction between a compression host and a synchronization host, and the compression host can accommodate a certain number of fault synchronization hosts, so that the stability of time synchronization is high, but only relative time synchronization can be performed, and all network devices cannot reach greenwich mean time unification, so that the adaptability of time synchronization is low, for example: the patent document applied by the research of the Xian microelectronic technology discloses a dynamic clock compression method for a time-triggered network (application date: 2017, 11 and 17 months, application number: 2017104534637, application publication number: CN 107359952A). The method comprises the following specific steps: 1) the exchange controller carries out solidification operation on the synchronous frames sent by each terminal and restores the clock solidification points of each synchronous frame; storing the restored clock solidification points to a solidification point storage module, setting storage identification in a solidification information storage area of the solidification point storage module, providing clock solidification point information corresponding to the identification to a compression function when the storage identification is effective, and generating an effective pulse at the x-th solidification point moment when a local clock is equal to the stored x-th solidification point for collection of the solidification points of the compression function; 2) after the effective pulse appears at the moment of the first solidification point, the current compression function starts to open a collection window to collect the solidification points; 3) the compression function sorts the collected solidification points; 4) after the sequencing is finished, the compression function calculates the relative clock deviation of the network, and further calculates the network clock compression point, thereby realizing the high-precision clock synchronization. However, the AS6802 synchronization method can only achieve relative time synchronization of periodic cycles, and thus the method still has the problem of low time synchronization adaptability of TTE after time synchronization based on the AS6802 protocol is completed.
In summary, the prior art cannot achieve time synchronization with both high adaptability and high stability.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, provides a TTE time synchronization method based on 1588 and AS6802 protocols, and solves the problem that the time synchronization of network equipment in the conventional TTE cannot have both high adaptability and high stability.
In order to achieve the purpose, the invention adopts the following technical steps:
(1) the network device measures the link delay between each adjacent port in the time-triggered Ethernet TTE:
(1a) let TTE contain M network devices A1,A2,...,Ak,...,AMM is more than or equal to 2, and each network device comprises at least two ports;
(1b) network device AkThrough the port to andkeach network device a in the neighborhoodk1,Ak2,...,Aki,...,AknPort broadcast flag 88f70202 while preserving the broadcast time point tkWherein n is more than or equal to 1;
(1c) network device Ak1,Ak2,...,Aki,...,AknEach A of (1)kiSaving a time point t 'at which to receive a peer to peer delayed request frame'kiAnd a predetermined time point for transmitting the peer-to-peer delay response frame is set
Figure BDA0002304811020000031
And t'kiDifference value Y ofkiAs AkiLocal logic delay of, then, YkiWriting into the modified field of the peer-to-peer delayed response frame, and finally
Figure BDA0002304811020000032
Time passes through AkiWill be written with YkiSends the peer-to-peer delay response frame to network device akA port of (a);
(1d) network device AkSave receiving written YkiTime point of peer-to-peer delay response frame
Figure BDA0002304811020000033
And according to
Figure BDA0002304811020000034
YkiAnd tkCalculation of AkPort and network device akiLink delay D between portski
(2) Network equipment in the TTE is divided based on a 1588 protocol:
according to the attribute of the first priority of the optimal master clock of the master clock device in the 1588 protocol, the network device with the minimum first priority of the optimal master clock in the TTE is used as the master clock device, and the rest M-1 network devices are used as slave devices S1,S2,...,Sj,...,SM-1
(3) Master clock device to each slave device SjBroadcasting a synchronization frame:
the master clock device will preset the time point T of the broadcast synchronization frameSyncWriting the timestamp field of the synchronization frame with the mark 88f70002, and taking W milliseconds as the synchronization period of the 1588 protocol at TSyncTime of day through master clock device port to each slaveBelonging to the equipment SjPort broadcast of (2) is written with TSyncW is more than or equal to 1;
(4) each slave device SjThe method comprises the following steps of realizing periodic global time synchronization with master clock equipment based on a 1588 protocol:
(4a) each slave device SjSave receiving written TSyncTime point of the synchronous frame
Figure BDA0002304811020000035
At the same time to write with TSyncThe synchronous frame data field is analyzed to obtain TSyncAnd residence time TRD
(4b) Each slave device SjAccording to TSync
Figure BDA0002304811020000049
TRDAnd SjPort and SjLink delay D between ports of adjacent network devicesjCalculating SjTime offset from master clock device
Figure BDA0002304811020000041
(4c) Each slave device SjBy meeting the requirements of 1588 protocol for sub-microsecond synchronization accuracy
Figure BDA0002304811020000042
Through the correction of at least three continuous 1588 protocol synchronization periods, the Greenwich mean time of the self is adjusted to be the same as that of the main clock equipment, and S is realizedjSynchronizing with the periodic global time of the master clock equipment to obtain a time triggered Ethernet TTE' with the same Greenwich mean time;
(5) dividing the network equipment in TTE' based on AS6802 protocol:
according to the requirements of AS6802 protocol for different functions of network devices, one network device is selected from TTE' AS a compression host, and the other M-1 network devices are used AS synchronization hosts SM1,SM2,...,SMg,...,SMM-1
(6) Each synchronization master SMgPre-synchronizing with the compressed host based on an AS6802 protocol:
(6a) at SjGreenwich mean time point for completing periodic global time synchronization with master clock device, each synchronization master SMgSending cold start frames in AS6802 protocol to ports of compressed hosts through the ports
Figure BDA0002304811020000043
(6b) The compression host receives the first one
Figure BDA0002304811020000044
At greenwich time point of, through a port to each SMgPort broadcast of
Figure BDA0002304811020000045
Respective Cold Start frame F'CS
(6c) Each synchronization master SMgF 'was obtained'CSThen, sending the cold start response frame in the AS6802 protocol to the port of the compressed host through the port
Figure BDA0002304811020000046
(6d) The compression host receives the first one
Figure BDA0002304811020000047
At greenwich time point of, through a port to each SMgPort broadcast of
Figure BDA0002304811020000048
Corresponding Cold Start response frame F'CAMeanwhile, based on a clock format specified by an AS6802 protocol, taking the 0 th clock AS a starting point and the R th clock AS an end point, and continuously performing cycle counting of the local clock, wherein R is more than or equal to 124999;
(6e) each synchronization master SMgIs receiving F'CABased on the clock format specified by AS6802 protocol, at 0 thTaking the R-th clock as an end point, continuously performing cycle counting of the local clock to realize pre-synchronization with the compression host, wherein R is more than or equal to 124999;
(7) each synchronization master SMgAnd obtaining a TTE time synchronization result based on an AS6802 protocol with the compression host:
(7a) each synchronization master SMgAt the start point of each local clock count, sending an integration frame in the AS6802 protocol through the port to the port of the compressed host
Figure BDA0002304811020000051
(7b) The compressed host saves each integrated frame
Figure BDA0002304811020000052
Point in time of arrival
Figure BDA0002304811020000053
At the same time to
Figure BDA0002304811020000054
The data field is analyzed to obtain a transparent clock value
Figure BDA0002304811020000055
Based on the curing function of AS6802 protocol, the upper limit T of transmission delay preset by TTEmax
Figure BDA0002304811020000056
And
Figure BDA0002304811020000057
according to receiving M-1
Figure BDA0002304811020000058
Calculating each from front to back order
Figure BDA0002304811020000059
Corresponding curing time points to obtain a set T consisting of M-1 curing time pointsc,Tc={Tc1,Tc2,...,Tcx,...,Tc(M-1)Where T iscxRepresents the x-th curing time point;
(7c) the compression host is based on the compression function of AS6802 protocol and passes through Tc1E th curing time point TceAnd M-e curing time points Tc(M-e)Calculating a compression time correction value TsAnd will Tc1And TsIs used as a compression time point, and a dispatch time point T ' preset by TTE ' is used as a compression time point when the cycle count of the local clock reaches the compression time point 'scmAdjusting the local clock count value as a reference to obtain a global time base of the TTE ', wherein e is a synchronous host SM which is preset by the TTE' and allows errors to occurgNumber, and e ∈ [1, M-1);
(7d) when the cycle count of the local clock reaches the sending time preset by TTE', the compression host sends the SM to each synchronous host through the portgPort of (2) broadcasts aggregate frame F'IN
(7e) Each synchronization master SMgKeep integrated frame F'INPoint in time of arrival
Figure BDA00023048110200000510
Simultaneously to F'INThe data field is analyzed to obtain a transparent clock value TtcsAnd based on the curing function of AS6802 protocol, by Tmax、TtcsAnd
Figure BDA00023048110200000511
calculating the curing time point
Figure BDA00023048110200000512
Then the TTE 'preset pre-receiving time point and the TTE' preset pre-receiving time point are compared with
Figure BDA00023048110200000513
The difference of (a) is taken as a clock difference value;
(7f) each synchronization master SMgCounting arrivals at local clock cycles
Figure BDA00023048110200000514
Time, preset scheduling time point T 'by TTE'ssmBased on the reference, the local clock count value is adjusted according to the clock difference value to realize time synchronization with the compression host, namely M network devices A in TTE1,A2,...,Ak,...,AMTime synchronization of (2).
Compared with the prior art, the invention has the following advantages:
firstly, because the invention adopts the scheme that each network device of TTE starts to perform presynchronization based on AS6802 protocol when realizing periodical global time synchronization based on 1588 protocol and finally obtains TTE time synchronization result, the invention realizes absolute time synchronization while achieving relative time synchronization, namely, realizes one-to-one correspondence between ideal global time base under the condition of AS6802 relative synchronization and Greenwich mean time under the state of 1588 absolute synchronization, solves the problem of low adaptability of TTE time synchronization when performing AS6802 synchronization in the prior art, and greatly reduces the SM (synchronization master) of each synchronization master SM (synchronization master) in TTEgThe start time difference of AS6802 pre-synchronization is carried out, so that the stability of TTE time synchronization is remarkably improved;
secondly, after each network device in the TTE is adopted to realize the periodical global time synchronization based on the 1588 protocol, each synchronization host SMgAt the beginning of each local clock count, sending an integrated frame to the compressed host
Figure BDA0002304811020000061
According to the technical scheme, when the 1588 is out of synchronization from a synchronous state, the network equipment can schedule the TT service according to the normally synchronous AS6802 time, so that the transmission of the TT service among the network equipment cannot be interrupted by the time synchronization recovery process of the 1588, the problem that all the network equipment cannot schedule the TT service according to correct Greenwich mean time due to failure of the main clock equipment in the prior art is solved, the effect of improving the time synchronization fault tolerance rate of TTE is achieved, and the stability of time synchronization is further improved.
Drawings
FIG. 1 is a flow chart of an implementation of the present invention.
Detailed Description
The invention is described in further detail below with reference to the figures and the specific embodiments.
Referring to fig. 1, the present invention includes the steps of:
step 1) the network device measures the link time delay between each adjacent port in the time-triggered Ethernet TTE:
step 1a) setting TTE to contain M network devices A1,A2,...,Ak,...,AMM is more than or equal to 2, and each network device comprises at least two ports; in the embodiment of the present invention, let M be 5, and each network device includes four ports.
Step 1b) network device AkThrough the port to andkeach network device a in the neighborhoodk1,Ak2,...,Aki,...,AknPort broadcast flag 88f70202 while preserving the broadcast time point tkWherein n is more than or equal to 1; n < 1 means network device AkThere is no adjacent network device, and in the embodiment of the present invention, n is 4.
Step 1c) network device Ak1,Ak2,...,Aki,...,AknEach A of (1)kiSaving a time point t 'at which to receive a peer to peer delayed request frame'kiAnd a predetermined time point for transmitting the peer-to-peer delay response frame is set
Figure BDA0002304811020000071
And t'kiDifference value Y ofkiAs AkiLocal logic delay of, then, YkiWriting into the modified field of the peer-to-peer delayed response frame, and finally
Figure BDA0002304811020000072
Time passes through AkiWill be written with YkiSends the peer-to-peer delay response frame to network device akThe port of (2).
Step 1d) network device AkSave receiving written YkiTime point of peer-to-peer delay response frame
Figure BDA0002304811020000073
And according to
Figure BDA0002304811020000074
YkiAnd tkCalculation of AkPort and network device akiLink delay D between portski(ii) a The calculation formula is
Figure BDA0002304811020000075
Step 2) network equipment in the TTE is divided based on a 1588 protocol:
according to the attribute of the first priority of the optimal master clock of the master clock device in the 1588 protocol, the network device with the minimum first priority of the optimal master clock in the TTE is used as the master clock device, and the rest M-1 network devices are used as slave devices S1,S2,...,Sj,...,SM-1
Step 3) master clock device to each slave device SjBroadcasting a synchronization frame:
the master clock device will preset the time point T of the broadcast synchronization frameSyncWriting the timestamp field of the synchronization frame with the mark 88f70002, and taking W milliseconds as the synchronization period of the 1588 protocol at TSyncTime of day through master clock device port to each slave device SjPort broadcast of (2) is written with TSyncW is more than or equal to 1; since W < 1 is not practical and wastes too much bandwidth, in the embodiment of the present invention, W is 1000.
Step 4) Each Slave device SjThe method comprises the following steps of realizing periodic global time synchronization with master clock equipment based on a 1588 protocol:
step 4a) Each Slave device SjSave receiving written TSyncTime point of the synchronous frame
Figure BDA0002304811020000076
At the same time to write with TSyncThe synchronous frame data field is analyzed to obtain TSyncAnd residence time TRD(ii) a To write with TSyncThe analysis of the synchronous frame data field means that T is written inSyncExtracting T from the time stamp field of the synchronous frame data fieldSyncWhile extracting the retention time T from the correction fieldRD
Step 4b) Each Slave device SjAccording to TSync
Figure BDA0002304811020000077
TRDAnd SjPort and SjLink delay D between ports of adjacent network devicesjCalculating SjTime offset from master clock device
Figure BDA0002304811020000081
The calculation formula is
Figure BDA0002304811020000082
Step 4c) Each Slave device SjBy meeting the requirements of 1588 protocol for sub-microsecond synchronization accuracy
Figure BDA0002304811020000083
Through the correction of at least three continuous 1588 protocol synchronization periods, the Greenwich mean time of the self is adjusted to be the same as that of the main clock equipment, and S is realizedjSynchronizing with the periodic global time of the master clock equipment to obtain a time triggered Ethernet TTE' with the same Greenwich mean time; the adjustment of own Greenwich mean that the Greenwich mean time is adjusted
Figure BDA0002304811020000084
And SjAdding the Greenwich mean time of SjThe greenwich time of the master clock device is consistent with the greenwich time of the master clock device.
Step 5) dividing the network equipment in TTE' based on AS6802 protocol:
according to the requirements of AS6802 protocol for different functions of network devices, one network device is selected from TTE' AS a compression host, and the other M-1 network devices are used AS synchronization hosts SM1,SM2,...,SMg,...,SMM-1(ii) a In order to enable each synchronous host to perform protocol control frame interaction with the compression host, the embodiment of the invention selects one network device with the most adjacent network devices in the TTE' as the compression host.
Step 6) Each Sync Master SMgPre-synchronizing with the compressed host based on an AS6802 protocol:
step 6a) at SjGreenwich mean time point for completing periodic global time synchronization with master clock device, each synchronization master SMgSending cold start frames in AS6802 protocol to ports of compressed hosts through the ports
Figure BDA0002304811020000085
Step 6b) the compressed host receives the first one
Figure BDA0002304811020000086
At greenwich time point of, through a port to each SMgPort broadcast of
Figure BDA0002304811020000087
Respective Cold Start frame F'CS
Step 6c) Each Sync Master SMgF 'was obtained'CSThen, sending the cold start response frame in the AS6802 protocol to the port of the compressed host through the port
Figure BDA0002304811020000088
Step 6d) the compressed host receives the first one
Figure BDA0002304811020000089
At greenwich time point of, through a port to each SMgPort broadcast of
Figure BDA00023048110200000810
Corresponding Cold Start response frame F'CAWhile being specified based on the AS6802 protocolThe clock format, taking the 0 th clock as a starting point and the R th clock as an end point, continuously performing cycle counting of the local clock, wherein R is more than or equal to 124999; in the present embodiment, R is 249999.
Step 6e) Each Sync Master SMgIs receiving F'CABased on a clock format specified by an AS6802 protocol, the Greenwich mean time point continuously performs cycle counting of a local clock by taking a 0 th clock AS a starting point and an R th clock AS an end point to realize presynchronization with a compression host, wherein R is more than or equal to 124999; in the present embodiment, R is 249999.
Step 7) Each Sync Master SMgAnd obtaining a TTE time synchronization result based on an AS6802 protocol with the compression host:
step 7a) Each Sync Master SMgAt the start point of each local clock count, sending an integration frame in the AS6802 protocol through the port to the port of the compressed host
Figure BDA0002304811020000091
Step 7b) the compressed host saves each integrated frame
Figure BDA0002304811020000092
Point in time of arrival
Figure BDA0002304811020000093
At the same time to
Figure BDA0002304811020000094
The data field is analyzed to obtain a transparent clock value
Figure BDA0002304811020000095
Based on the curing function of AS6802 protocol, the upper limit T of transmission delay preset by TTEmax
Figure BDA0002304811020000096
And
Figure BDA0002304811020000097
according to receiving M-1
Figure BDA0002304811020000098
Calculating each from front to back order
Figure BDA0002304811020000099
Corresponding curing time points to obtain a set T consisting of M-1 curing time pointsc,Tc={Tc1,Tc2,...,Tcx,...,Tc(M-1)Where T iscxRepresents the x-th curing time point; the calculation formula is
Figure BDA00023048110200000910
Step 7c) compressing the compression function of the host based on AS6802 protocol, passing Tc1E th curing time point TceAnd M-e curing time points Tc(M-e)Calculating a compression time correction value TsAnd will Tc1And TsIs used as a compression time point, and a dispatch time point T ' preset by TTE ' is used as a compression time point when the cycle count of the local clock reaches the compression time point 'scmAdjusting the local clock count value as a reference to obtain a global time base of the TTE ', wherein e is a synchronous host SM which is preset by the TTE' and allows errors to occurgNumber, and e ∈ [1, M-1); adjusting the local clock count value means that if the local clock count value is equal to T'scmDifferent, the local clock count value is modified to T'scmSince e must be smaller than SMgThe maximum number of the time points can realize time synchronization, in the embodiment of the invention, e is equal to 2, and T is calculatedsThe calculation formula is Ts=[(Tce-Tc1)+(Tc(M-e)-Tc1)]/2。
Step 7d), when the cycle count of the local clock reaches the sending time preset by TTE', the compressed host sends the SM to each synchronous host through the portgPort of (2) broadcasts aggregate frame F'IN
Step 7e) Each Sync Master SMgKeep integrated frame F'INPoint in time of arrival
Figure BDA0002304811020000101
Simultaneously to F'INThe data field is analyzed to obtain a transparent clock value TtcsAnd based on the curing function of AS6802 protocol, by Tmax、TtcsAnd
Figure BDA0002304811020000102
calculating the curing time point
Figure BDA0002304811020000103
Then the TTE 'preset pre-receiving time point and the TTE' preset pre-receiving time point are compared with
Figure BDA0002304811020000104
The difference of (a) is taken as a clock difference value;
Figure BDA0002304811020000105
the calculation formula is
Figure BDA0002304811020000106
Step 7f) Each Sync Master SMgCounting arrivals at local clock cycles
Figure BDA0002304811020000107
Time, preset scheduling time point T 'by TTE'ssmBased on the reference, the local clock count value is adjusted according to the clock difference value to realize time synchronization with the compression host, namely M network devices A in TTE1,A2,...,Ak,...,AMTime synchronization of (2); the adjustment of the local clock count value according to the clock difference value is that the clock difference value is added to the local clock count value so that the local clock count value is T'ssmThe same is true.

Claims (6)

1. A TTE time synchronization method based on 1588 and AS6802 protocol is characterized by comprising the following steps:
(1) the network device measures the link delay between each adjacent port in the time-triggered Ethernet TTE:
(1a) let TTE contain M networksDevice A1,A2,...,Ak,...,AMM is more than or equal to 2, and each network device comprises at least two ports;
(1b) network device AkThrough the port to andkeach network device a in the neighborhoodk1,Ak2,...,Aki,...,AknPort broadcast flag 88f70202 while preserving the broadcast time point tkWherein n is more than or equal to 1;
(1c) network device Ak1,Ak2,...,Aki,...,AknEach A of (1)kiSaving a time point t 'at which to receive a peer to peer delayed request frame'kiAnd a predetermined time point for transmitting the peer-to-peer delay response frame is set
Figure FDA0002304811010000011
And t'kiDifference value Y ofkiAs AkiLocal logic delay of, then, YkiWriting into the modified field of the peer-to-peer delayed response frame, and finally
Figure FDA0002304811010000012
Time passes through AkiWill be written with YkiSends the peer-to-peer delay response frame to network device akA port of (a);
(1d) network device AkSave receiving written YkiTime point of peer-to-peer delay response frame
Figure FDA0002304811010000013
And according to
Figure FDA0002304811010000014
YkiAnd tkCalculation of AkPort and network device akiLink delay D between portski
(2) Network equipment in the TTE is divided based on a 1588 protocol:
according to the attribute of the first priority of the optimal master clock of the master clock equipment in the 1588 protocol, the most important one in TTE is sentThe network equipment with the best master clock and the first priority as the master clock equipment, and the rest M-1 network equipment as the slave equipment S1,S2,...,Sj,...,SM-1
(3) Master clock device to each slave device SjBroadcasting a synchronization frame:
the master clock device will preset the time point T of the broadcast synchronization frameSyncWriting the timestamp field of the synchronization frame with the mark 88f70002, and taking W milliseconds as the synchronization period of the 1588 protocol at TSyncTime of day through master clock device port to each slave device SjPort broadcast of (2) is written with TSyncW is more than or equal to 1;
(4) each slave device SjThe method comprises the following steps of realizing periodic global time synchronization with master clock equipment based on a 1588 protocol:
(4a) each slave device SjSave receiving written TSyncTime point of the synchronous frame
Figure FDA0002304811010000021
At the same time to write with TSyncThe synchronous frame data field is analyzed to obtain TSyncAnd residence time TRD
(4b) Each slave device SjAccording to TSync
Figure FDA0002304811010000022
TRDAnd SjPort and SjLink delay D between ports of adjacent network devicesjCalculating SjTime offset from master clock device
Figure FDA0002304811010000023
(4c) Each slave device SjBy meeting the requirements of 1588 protocol for sub-microsecond synchronization accuracy
Figure FDA0002304811010000024
Passing through at least three 1588 protocol synchronization periodsThe correction of (1) adjusts the Greenwich mean time of the self to be the same as the Greenwich mean time of the main clock equipment, and realizes SjSynchronizing with the periodic global time of the master clock equipment to obtain a time triggered Ethernet TTE' with the same Greenwich mean time;
(5) dividing the network equipment in TTE' based on AS6802 protocol:
according to the requirements of AS6802 protocol for different functions of network devices, one network device is selected from TTE' AS a compression host, and the other M-1 network devices are used AS synchronization hosts SM1,SM2,...,SMg,...,SMM-1
(6) Each synchronization master SMgPre-synchronizing with the compressed host based on an AS6802 protocol:
(6a) at SjGreenwich mean time point for completing periodic global time synchronization with master clock device, each synchronization master SMgSending cold start frames in AS6802 protocol to ports of compressed hosts through the ports
Figure FDA0002304811010000025
(6b) The compression host receives the first one
Figure FDA0002304811010000026
At greenwich time point of, through a port to each SMgPort broadcast of
Figure FDA0002304811010000027
Respective Cold Start frame F'CS
(6c) Each synchronization master SMgF 'was obtained'CSThen, sending the cold start response frame in the AS6802 protocol to the port of the compressed host through the port
Figure FDA0002304811010000028
(6d) The compression host receives the first one
Figure FDA0002304811010000029
At greenwich time point of, through a port to each SMgPort broadcast of
Figure FDA00023048110100000210
Corresponding Cold Start response frame F'CAMeanwhile, based on a clock format specified by an AS6802 protocol, taking the 0 th clock AS a starting point and the R th clock AS an end point, and continuously performing cycle counting of the local clock, wherein R is more than or equal to 124999;
(6e) each synchronization master SMgIs receiving F'CABased on a clock format specified by an AS6802 protocol, the Greenwich mean time point continuously performs cycle counting of a local clock by taking a 0 th clock AS a starting point and an R th clock AS an end point to realize presynchronization with a compression host, wherein R is more than or equal to 124999;
(7) each synchronization master SMgAnd obtaining a TTE time synchronization result based on an AS6802 protocol with the compression host:
(7a) each synchronization master SMgAt the start point of each local clock count, sending an integration frame in the AS6802 protocol through the port to the port of the compressed host
Figure FDA0002304811010000031
(7b) The compressed host saves each integrated frame
Figure FDA0002304811010000032
Point in time of arrival
Figure FDA0002304811010000033
At the same time to
Figure FDA0002304811010000034
The data field is analyzed to obtain a transparent clock value
Figure FDA0002304811010000035
And passes TTE 'based on a curing function of AS6802 protocol'Preset upper limit of transmission delay Tmax
Figure FDA0002304811010000036
And
Figure FDA0002304811010000037
according to receiving M-1
Figure FDA0002304811010000038
Calculating each from front to back order
Figure FDA0002304811010000039
Corresponding curing time points to obtain a set T consisting of M-1 curing time pointsc,Tc={Tc1,Tc2,...,Tcx,...,Tc(M-1)Where T iscxRepresents the x-th curing time point;
(7c) the compression host is based on the compression function of AS6802 protocol and passes through Tc1E th curing time point TceAnd M-e curing time points Tc(M-e)Calculating a compression time correction value TsAnd will Tc1And TsIs used as a compression time point, and a dispatch time point T ' preset by TTE ' is used as a compression time point when the cycle count of the local clock reaches the compression time point 'scmAdjusting the local clock count value as a reference to obtain a global time base of the TTE ', wherein e is a synchronous host SM which is preset by the TTE' and allows errors to occurgNumber, and e ∈ [1, M-1);
(7d) when the cycle count of the local clock reaches the sending time preset by TTE', the compression host sends the SM to each synchronous host through the portgPort of (2) broadcasts aggregate frame F'IN
(7e) Each synchronization master SMgKeep integrated frame F'INPoint in time of arrival
Figure FDA00023048110100000310
Simultaneously to F'INThe data field is analyzed to obtain a transparent clock value TtcsAnd based on the curing function of AS6802 protocol, by Tmax、TtcsAnd
Figure FDA00023048110100000311
calculating the curing time point
Figure FDA00023048110100000312
Then the TTE 'preset pre-receiving time point and the TTE' preset pre-receiving time point are compared with
Figure FDA00023048110100000313
The difference of (a) is taken as a clock difference value;
(7f) each synchronization master SMgCounting arrivals at local clock cycles
Figure FDA00023048110100000411
Time, preset scheduling time point T 'by TTE'ssmBased on the reference, the local clock count value is adjusted according to the clock difference value to realize time synchronization with the compression host, namely M network devices A in TTE1,A2,...,Ak,...,AMTime synchronization of (2).
2. The method for synchronizing TTE time based on 1588 and AS6802 protocol AS claimed in claim 1, wherein A is said in step (1d)kPort and network device akiLink delay D between portskiThe calculation formula is as follows:
Figure FDA0002304811010000041
wherein, tkIndicating a transmission time point, Y, of a peer-to-peer delay request framekiRepresents network device AkiThe local logical time delay of the network element,
Figure FDA0002304811010000042
indicating a reception time point of the peer delay response frame.
3. The method for synchronizing TTE time based on 1588 and AS6802 protocol AS claimed in claim 1, wherein S in step (4b)jTime offset from master clock device
Figure FDA0002304811010000043
The calculation formula is as follows:
Figure FDA0002304811010000044
wherein the content of the first and second substances,
Figure FDA0002304811010000045
indicating the point in time of reception of the synchronization frame, TSyncIndicating the transmission time point of the synchronization frame, DjIndicating a slave device SjPort and SjLink delay, T, between ports of adjacent network devicesRDThe retention time is shown.
4. The method for synchronizing TTE time based on 1588 and AS6802 protocol AS claimed in claim 1, wherein said xth solidification time point T of step (7b)cxThe calculation formula is as follows:
Figure FDA0002304811010000046
wherein, TmaxRepresents the TTE' preset upper limit of the transmission delay,
Figure FDA0002304811010000047
representing each integrated frame
Figure FDA0002304811010000048
The transparent clock value of (a) is,
Figure FDA0002304811010000049
represent each one
Figure FDA00023048110100000410
The arrival time of (c).
5. The method for synchronizing TTE time according to claim 1 based on 1588 and AS6802 protocols, wherein said compression time modification value T in step (7c)sThe calculation formula is as follows:
Ts=[(Tce-Tc1)+(Tc(M-e)-Tc1)]/2
wherein, Tc1Denotes the first curing time point, TceDenotes the e-th curing time point, Tc(M-e)The M-e curing time points are indicated.
6. The method for synchronizing TTE time based on 1588 and AS6802 protocol AS claimed in claim 1, wherein said solidifying point of time in step (7e)
Figure FDA0002304811010000051
The calculation formula is as follows:
Figure FDA0002304811010000052
wherein, TmaxRepresenting TTE' a preset upper limit of transmission delay, TtcsDenotes integrated Fram F'INThe transparent clock value of (a) is,
Figure FDA0002304811010000053
is represented by F'INThe arrival time of (c).
CN201911235633.XA 2019-12-05 2019-12-05 TTE time synchronization method based on 1588 and AS6802 protocol Active CN111083776B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911235633.XA CN111083776B (en) 2019-12-05 2019-12-05 TTE time synchronization method based on 1588 and AS6802 protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911235633.XA CN111083776B (en) 2019-12-05 2019-12-05 TTE time synchronization method based on 1588 and AS6802 protocol

Publications (2)

Publication Number Publication Date
CN111083776A true CN111083776A (en) 2020-04-28
CN111083776B CN111083776B (en) 2021-09-03

Family

ID=70313061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911235633.XA Active CN111083776B (en) 2019-12-05 2019-12-05 TTE time synchronization method based on 1588 and AS6802 protocol

Country Status (1)

Country Link
CN (1) CN111083776B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112600804A (en) * 2020-12-04 2021-04-02 陕西电器研究所 Method for implementing compression algorithm in time-triggered Ethernet
CN113114590A (en) * 2021-03-05 2021-07-13 西安电子科技大学 AS6802 synchronous frame transparent transmission system and method in TTE switch

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103368721A (en) * 2013-07-23 2013-10-23 电子科技大学 Computing method for transparent clock in time-triggered Ethernet
WO2015184483A1 (en) * 2014-06-06 2015-12-10 Fts Computertechnik Gmbh Method for deterministic wireless transfer of time-controlled real-time messages in a distributed real-time system
CN105553598A (en) * 2016-01-10 2016-05-04 北京航空航天大学 Time-triggered Ethernet (TTE) clock compensation method based on M estimation robust regression
CN106059701A (en) * 2016-08-17 2016-10-26 北京航空航天大学 Device for testing clock synchronization correction value of time-triggered Ethernet by capturing protocol control frame
CN107508648A (en) * 2017-06-26 2017-12-22 清华大学 Time triggered Ethernet substep time synchronized strategy based on functions of the equipments classification
CN108429595A (en) * 2018-01-21 2018-08-21 西安电子科技大学 Switching equipment clock synchronization apparatus and method based on AS6802 standards
CN109617705A (en) * 2017-10-04 2019-04-12 Tttech 电脑技术股份公司 Method and apparatus for configuring real-time network
CN110460597A (en) * 2019-08-08 2019-11-15 成都光航信科技有限公司 A kind of control frame precommpression method based on AS6802 agreement

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103368721A (en) * 2013-07-23 2013-10-23 电子科技大学 Computing method for transparent clock in time-triggered Ethernet
WO2015184483A1 (en) * 2014-06-06 2015-12-10 Fts Computertechnik Gmbh Method for deterministic wireless transfer of time-controlled real-time messages in a distributed real-time system
CN105553598A (en) * 2016-01-10 2016-05-04 北京航空航天大学 Time-triggered Ethernet (TTE) clock compensation method based on M estimation robust regression
CN106059701A (en) * 2016-08-17 2016-10-26 北京航空航天大学 Device for testing clock synchronization correction value of time-triggered Ethernet by capturing protocol control frame
CN107508648A (en) * 2017-06-26 2017-12-22 清华大学 Time triggered Ethernet substep time synchronized strategy based on functions of the equipments classification
CN109617705A (en) * 2017-10-04 2019-04-12 Tttech 电脑技术股份公司 Method and apparatus for configuring real-time network
CN108429595A (en) * 2018-01-21 2018-08-21 西安电子科技大学 Switching equipment clock synchronization apparatus and method based on AS6802 standards
CN110460597A (en) * 2019-08-08 2019-11-15 成都光航信科技有限公司 A kind of control frame precommpression method based on AS6802 agreement

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
周俊: "基于时间触发以太网的AS6802时间同步协议的设计与实现", 《中国优秀硕士学位论文全文数据库(电子期刊)》 *
罗泽雄等: "基于TTE端系统的时钟同步设计与实现", 《航空电子技术》 *
赵琪等: "基于IEEE 1588协议的时间触发以太网同步算法", 《计算机工程》 *
陈金凤等: "IEEE1588V2透明时钟研究与实现", 《宇航计测技术》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112600804A (en) * 2020-12-04 2021-04-02 陕西电器研究所 Method for implementing compression algorithm in time-triggered Ethernet
CN112600804B (en) * 2020-12-04 2022-08-19 陕西电器研究所 Method for realizing compression algorithm in time-triggered Ethernet
CN113114590A (en) * 2021-03-05 2021-07-13 西安电子科技大学 AS6802 synchronous frame transparent transmission system and method in TTE switch

Also Published As

Publication number Publication date
CN111083776B (en) 2021-09-03

Similar Documents

Publication Publication Date Title
CN101977104B (en) IEEE1588 based accurate clock synchronization protocol system and synchronization method thereof
CN108650051B (en) The clock synchronization apparatus and method of general devices at full hardware single step 1588
CN100359956C (en) Method for implementing synchronization and distance finding in wireless communication system and implementing apparatus thereof
CN101547083B (en) Time synchronizer, time synchronization system and time synchronization method
CN101594673B (en) Method and system for processing 1588 time stamp in distribution mode
CN111083776B (en) TTE time synchronization method based on 1588 and AS6802 protocol
EP2515501A1 (en) Media clock negotiation
CN109074723B (en) Time synchronization method, sensor embedded terminal and sensor network system
CN101729180A (en) Method and system for synchronizing precision clocks, and precision clock frequency/time synchronizing device
CN102769504B (en) A kind of 1588 systems and realize synchronous method
CN103051406A (en) Clock synchronization method and system in 1588-2008 protocol
WO2015196685A1 (en) Clock synchronization method and apparatus
CN101951312A (en) E1 link-based bidirectional time-frequency synchronous transmission method and master-slave device
CN102447553A (en) Realizing device of accurate time synchronization protocol
CN107579793A (en) The optimization method of time synchronized, device and equipment between a kind of communication network device
CN113422665B (en) Method and system for realizing time synchronization of vehicle-mounted system based on IPC mechanism
WO2011029310A1 (en) Method and device for enabling boundary clock in the cascade base station
CN111740800B (en) Multi-precision clock synchronization method based on SDN framework 5G intelligent node
CN101247169A (en) Method, system and equipment for implementing time synchronization in communication network
CN103546273B (en) Frequency synchronism device and method based on PTP frames
CN109921871A (en) A kind of method for synchronizing time, device and network system
CN110113127B (en) Method and system for transmitting time based on 1588 protocol
CN111478863B (en) Switch system and network port time synchronization method thereof
CN100493047C (en) Method for synchronously implementing web tube total web clock
CN102342051A (en) Method for synchronizing clocks by separated transmissions of first and second data via at least one timing distribution protocol, and associated system and module

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