The previous
article
♡Time Synchronization—Introduction to TSN Protocol 802.1AS♡
introduced you to the basic content of the 802.1AS protocol. Based on the time synchronization protocol, time synchronization between the master node and each slave node can be achieved, but how to evaluate the advantages and disadvantages of time synchronization? Woolen cloth? This requires us to analyze through some time synchronization parameters.
This article will use
TSN Systems
' professional TSN network analysis and measurement tools
TSN Box
and
TSN Tools
(TSN Box is the hardware interface of the network, and when used as a TAP (Test Access Point), it can monitor the packets of a single link; TSN Tools It is a software tool for analyzing and visualizing TSN network communication data. ), from the perspective of time synchronization analysis, introduces commonly used time synchronization parameters and the corresponding analyzer tools in TSN Tools software.
Time synchronization mechanism
Before introducing specific time synchronization parameters, let's review the two mechanisms to ensure time synchronization in 802.1AS:
Sync and Pdelay mechanisms
. The former enables the slave node to receive the global master node clock, and the latter enables each node to calculate the delay of adjacent links. The two are combined to achieve time synchronization.
The global master node periodically sends Sync messages, and the subsequent Follow Up message is accompanied by the precise timestamp of the previous Sync message sent; all slave nodes record the precise timestamp of the Sync message received (based on the local clock ), combined with the precise timestamp contained in the subsequent Follow-Up message (based on the global master node clock), the offset of the local clock relative to the global master node clock can be calculated.
The Pdelay mechanism is divided into an initiator and a receiver. Any node can be the initiator or the receiver
. That is to say, the global master node can be the receiver, and the slave node can also be the initiator.
The Pdelay initiator sends a Pdelay_Req message, and the initiator also records the precise timestamp t1 sent; and after receiving the Pdelay_Req message, the Pdelay receiver records the precise timestamp t2 received; then the Pdelay receiver sends a Pdelay_Resp message, where Contains the information t2, and records the precise timestamp t3 sent; then the Pdelay receiving end sends the Pdelay_Resp_Follow_Up message containing the time information of t3, so that the initiating end obtains the four timestamp information of t1, t2, t3 and t4, and can Calculate the average link delay from the originator to the receiver.
TSN Box and TSN Tools
Time synchronization analyzer
TSN Tools is network analysis and visualization software. It can filter and analyze the messages captured by TSN Box and output intuitive charts
. For example, the messages sent periodically by the global master node can be drawn on the same timeline:
The powerful analysis functions of TSN Tools come from the analyzer module, such as its built-in 802.1AS analyzer. The functions of these analyzers are introduced one by one below:
Figure Sync-Follow_Up
Sync-Follow_Up Delay represents the time difference between the Sync and Follow_Up messages received by the TSN Box during a Sync message timing process
, that is, t4-t2. This parameter is used to reflect the stability of the actual Sync-Follow_Up time interval.
The picture below is
the effect of TSN Tools using the Sync-Follow_Up Delay analyzer
:
It can be seen that the Sync-Follow_Up Delay is basically stable at 10ms, with a small amount of fluctuation in the range of -250μs~+750μs.
Inter-Sync Arrival Delay indicates the time interval between two adjacent Sync messages received by the TSN Box
, that is, t6-t2. This parameter reflects the stability of the Sync transmission cycle.
The picture below is the effect of TSN Tools using the Inter-Sync Arrival Delay analyzer:
It can be seen that the Inter-Sync Arrival Delay fluctuates in the range of 131ms±333μs, and individual fluctuation points are around 130ms.
Slave Clock Wander represents the offset of the Slave time base relative to the Master time base.
This
requires both TSN Box and Slave nodes to be synchronized with the Master
; the Slave node sends Reverse-Sync and records the sending timestamp t1', and the TSN Box receives Reverse-Sync and records the receiving timestamp t2'. Since the Tap Delay is small enough and TSN Box has been synchronized with the Master node, so t2' can be considered as the timestamp of the Master time base;
Then the Slave node sends Reverse-Follow_Up, which will contain t1
'
information, and then the Slave node sends a pair of Reverse-Sync and Follow_Up again. At this time, there are four timestamps of t1', t2', t5', and t6' in the TSN Box. , where t1' and t5' are the timestamps under the Slave time base, t2' and t6' are the timestamps under the Master time base. The ratio of the time difference between the two time bases to the Master time base means that the Slave time base is relative to The deviation of the Master clock. Since this deviation is usually relatively small, it is displayed in TSN Tools in the form of nanoseconds of deviation per second:
It can be seen that the Slave Clock Wander fluctuates in the ±100ns range.
Sync Delay represents the difference between the timestamp of the Sync message received by the TSN Box and the Sync sending timestamp contained in the Follow Up message
. It is assumed here that the length of the physical connection harness between the Master and the TSN Box is very small, and the link introduced at this time The delay is approximately nanoseconds, so Sync Delay can reflect the Master node's ability to record and send timestamps.
It can be seen that the Sync Delay is approximately in the range of 840ns±40ns:
Propagation Delay, or Pdelay, is a single link delay
. When only one-way is considered, it is the delay from the originator to the receiving end. When two-way is considered, it is the average value of the two-way delay.
It can be seen that the Propagation Delay is approximately in the range of 2825ns±25ns.
Peer Delay Round Trip means calculating the time difference from when PdelayRequest is sent to when PdelayResponseFollowUp is received
, that is, t6-t1:
Forwarding Delay refers to the delay caused by forwarding messages through a single or multi-level switching device
. One end of the TSN Box needs to receive the message sent from the Master, and the other end needs to receive the forwarded message. The TSN Box compares the two ends to be the same. The reception timestamp of the message is used to calculate the forwarding delay.
This article introduces the functions and usage of each 802.1AS analyzer in TSN Tools, and demonstrates the powerful time synchronization analysis capabilities provided by TSN Box combined with TSN Tools. TSN Box combined with TSN Tools is an effective solution for complex and time-sensitive automotive Ethernet.
As the exclusive partner of TSN Systems in China, Beihui Information
can
provide system-level testing solutions for time-sensitive networks in the next generation E/E architecture, including system design and testing,
with the help of TSN Systems' professional TSN network equipment and analysis software.
, system performance testing and system robustness testing
, etc. In addition, TSN technology workshops are provided, which include interpretation of each sub-protocol within the TSN protocol family, analysis of industry status and trends, and proposing TSN network architecture solutions based on application scenarios, etc., which will effectively help customers embrace the next generation of E/E architecture. Challenges posed by time-sensitive networks.
Note: The picture comes from the TSN Box manual and TSN Tools software.
WeChat ID: Polelink_Info
Beihui Information|Focus on electronic control, new energy, and MES technology
If it looks good, just click "Looking"