TIME SYNCHRONIZATION IN A REAL-TIME NETWORK
20220150305 · 2022-05-12
Assignee
Inventors
Cpc classification
H04J3/0673
ELECTRICITY
International classification
Abstract
In order to synchronize the respective local network time of participants of a real-time network, wherein the participants are connected to one another via ports, the participants transmit, preferably cyclically, synchronization packets to connected participants, wherein one participant of the real-time network is designated as the synchronization master, and using the synchronization packets, the local network time of the other participants is synchronized with the local network time of the synchronization master.
Claims
1. A method for synchronizing respective local network time of participants of a real-time network, wherein the participants are connected to one another via ports and the participants each transmit, preferably cyclically, synchronization packets to connected participants, wherein a participant of the real-time network is designated as a synchronization master, wherein using the synchronization packets the local network time of the other participants is synchronized with the local network time of the synchronization master, the method comprising: using the synchronization packets starting from the synchronization master along a synchronization path, synchronizing the local network time of the participants along the synchronization path with the local network time of the synchronization master; wherein the participants, at the time a synchronization packet is sent, transmit a time stamp of their local time with the synchronization packet, and wherein the participants calculate for a port, via which the synchronization packet is received, a difference time from a difference between the time stamp received in the synchronization packet and a time stamp of their local time when receiving the relevant synchronization packet, and synchronizing the local network time of the participants using the difference time.
2. The method according to claim 1, wherein the participants each cyclically transmit the synchronization packets to the connected participants.
3. The method according to claim 1, wherein the participants transmit with the synchronization packet, a network time deviation for each of one of their other ports, and wherein the participants calculate the network time deviation of the ports via which a synchronization packet is received, in each case from a sum of the calculated difference time and of the network time deviation received in the synchronization packet.
4. The method according to claim 3, wherein, starting from the synchronization master, the synchronization path extending via the additional participants is specified, and wherein the local network time of the further participants along the synchronization path is synchronized with the local network time of the synchronization master.
5. The method according to claim 4, wherein the synchronization master in each case transmits a specified network time deviation with the synchronization packet along the synchronization path, wherein, for ports via which no synchronization packet is received, a network time deviation of zero is specified, and wherein the participants calculate their local network time from a difference between their local time and the network time deviation of the port arranged opposite to the synchronization path.
6. The method according to claim 3, wherein the participants correct the network time deviation of the ports, via which a synchronization packet is received by a signal propagation time of the received synchronization packet.
7. The method according to claim 6, wherein the participants each transmit the difference time of the ports via which the respective synchronization packet is sent with the synchronization packet, wherein the participants calculate the signal propagation time of the received synchronization packet from the difference time received with the synchronization packet and the difference time of the port via which the synchronization packet is received.
8. The method according to claim 7, wherein the participants calculate the signal propagation time of the received synchronization packet from half a difference of the difference time received with the synchronization packet and a difference time of the port via which the synchronization packet is received.
9. The method according to claim 3, wherein the participants calculate a network time deviation difference, in each case from an instantaneous network time deviation in an instantaneous cycle and a network time deviation from a previous cycle, wherein the calculated network time deviation difference is added to a current network time deviation in the instantaneous cycle in order to obtain a corrected network time deviation difference, and wherein the corrected network time deviation difference replaces the original instantaneous network time deviation.
10. The method according to claim 3, wherein the participants calculate and filter a network time deviation difference, in each case from an instantaneous network time deviation in an instantaneous cycle and a network time deviation from a previous cycle, wherein the calculated and filtered network time deviation difference is added to a current network time deviation in the instantaneous cycle in order to obtain a corrected network time deviation difference, and wherein the corrected network time deviation difference replaces the original instantaneous network time deviation.
11. The method according to claim 1, wherein the difference time is filtered in each case.
12. The method according to claim 11, wherein the difference time is filtered using a filter with an exponential smoothing function.
13. The method according to claim 1, wherein, when the specified synchronization master ceases, another participant is specified as a new synchronization master.
14. The method according to claim 1, wherein the participants of the real-time network are linearly connected to one another.
15. The method according to claim 1, wherein the participants each have two ports.
16. The method according to claim 1, wherein the synchronization packets are transmitted in ISO-OSI layer 2.
17. The method according to claim 1, wherein the real-time network represents a serial real-time network, which participants are connected to one another via switches.
18. A real-time network comprising: a number of participants, which are connected to one another via ports, wherein the participants are configured to send synchronization packets to connected participants and wherein one of the number of participants is designatable as a synchronization master and the other participants are configurable using the synchronization packets to synchronize their local network time with the local network time of the synchronization master; the number of participants being located along a synchronization path to use the synchronization packets starting from the synchronization master, to synchronize the local network time of the participants along the synchronization path with the local network time of the synchronization master, wherein the number of participants, at a time a synchronization packet is sent, transmit a time stamp of their local time with the synchronization packet, and wherein the participants are configured to calculate, via which the synchronization packet is received, a difference time for a port, from a difference between the time stamp received in the synchronization packet and a time stamp of their local time when receiving the relevant synchronization packet, and wherein the local network time of the participants is synchronized using the difference time.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The present invention is described in greater detail below with reference to
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
DETAILED DESCRIPTION
[0040] The particulars shown herein are by way of example and for purposes of illustrative discussion of the embodiments of the present invention only and are presented in the cause of providing what is believed to be the most useful and readily understood description of the principles and conceptual aspects of the present invention. In this regard, no attempt is made to show structural details of the present invention in more detail than is necessary for the fundamental understanding of the present invention, the description taken with the drawings making apparent to those skilled in the art how the several forms of the present invention may be embodied in practice.
[0041] In
[0042] If participants are linearly connected to one another in a real-time network, this means that a participant at one end of the linear real-time network is connected to another participant only via one port, whereas the other port (or the other ports) is/are occupied. A participant at another end of the linear real-time network is likewise only connected to another participant via one port, whereas the other port (or the other ports) is/are not occupied. The participants that are arranged in a linear real-time network between the participants arranged at the end, are each connected to other participants via two ports.
[0043] In
[0044] The participants 11, 12, 13 are configured in such a way that they exchange synchronization packets D1[2], D2[1], D2[2], D3[1] with their adjacent participants. The first participant 11 transmits a data packet D1[2] via its second port 11[2] to the second participant 12, which receives the data packet D1[2] at its first port 12[1]. The second participant 12 transmits a data packet D2[1] via its first port 12[1] to the first participant 11, which receives the data packet D2[1] at its second port 11[2]. The second participant 12 also transmits a data packet D2[2] to the third participant 13, which receives the data packet D2[2] at its first port 13[1]. The third participant 13 transmits a data packet D3[1] via its first port 13[1] to the second participant 12, which receives the data packet D3[1] at its second port 12[1].
[0045] According to the invention, one of the participants 11, 12, 13 is now designated as the synchronization master SM.
[0046] A synchronization path S via the other participants 11, 12, 13 of the real-time network 1 is preferably specified starting from the synchronization master SM. In
[0047] If the real-time network 1 from
[0048] According to the invention, the local network time tn1, tn2, tn3 of the participants located along the synchronization path S is synchronized using the synchronization packets D1[2], D2[1], D2[2], D3[1] with the local network time tn1, tn2, tn3 of the synchronization master SM, starting from the synchronization master SM and along the synchronization path S.
[0049] This means that in
[0050] In
[0051]
[0052] Participants 11, 12, 13 preferably calculate for the ports 11[2], 12[1], 12[2], 13[1] via which a synchronization packet D1[2], D2[1], D2[2], D3[1] is received, in each case a difference time td1[2], td2[1], td2[2], td3[1], whereupon the local network time tn1, tn2, tn3 of the participants 11, 12, 13 using the difference times td1[2], td2[1], td2[2], td3[1] is synchronized. For this purpose, a time stamp of their local time t1, t2, t3 is formed by the participants 11, 12, 13 at the point in time the respective synchronization packet D1[2], D2[1], D2[2], D3[1] is sent, and is transmitted with the synchronization packet D1[2], D2[1], D2[2], D3[1]. The participants 11, 12, 13 also form a time stamp of their local time t1, t2, t3 at the point in time the respective synchronization packet D1[2], D2[1], D2[2], D3[1] is received. To ascertain the difference time td1[2], td2[1], td2[2], td3[1] of a port 11[2], 12[1], 12[2], 13[1], the difference between the time stamp, which is formed when a synchronization packet D1[2], D2[1], D2[2], D3[1] is received and the time stamp which is received with this synchronization packet D1[2], D2[1], D2[2], D3[1] is calculated.
[0053] For the real-time network according to
[0054] Likewise, the second participant 12 transmits a time stamp of its local time t2 to the first participant 11 with the data packet D2[1] and a time stamp of its local time to the third participant 13 with the data packet D2[2]. Upon receipt of the data packet D2[1], the first participant 11 ascertains a time stamp of its local time t1 and calculates its difference time td1[2] at the second port 11[2] from the difference between these time stamps: td1[2]=t1−t2. The third participant 13 ascertains upon receipt of the data packet D2[2] a time stamp of its local time t3 and calculates its difference time td3[1] for the first port 13[1] from the difference between these time stamps: td3[1]=t3−t2.
[0055] Likewise, the third participant 13 transmits a time stamp of its local time t3 to the second participant 12 with the data packet D3[1]. The second participant 12 ascertains upon receipt of the data packet D3[1] a time stamp of its local time t2 and calculates its difference time td2[2] for the second port 12[2] from the difference between these time stamps: td2[2]=t2−t3.
[0056] No difference time td1[1] td3[2] is formed for ports via which no synchronization packet is received. In
[0057] The participants 11, 12, 13 preferably transmit in each case with the synchronization packet D1[2], D2[1], D2[2], D3[1] a network time deviation td10[1], td20[1], td20[2], td30[2] of another port of the participant 11, 12, 13. A participant 11, 12, 13, if it has two ports 11[1], 11[2], 12[1], 12[2], 13[1], 13[2], transmits in each case via a port 11[1], 11[2], 12[1], 12[2], 13[1], 13[2] the network time deviation of the (exactly one) other port 11[1], 11[2], 12[1], 12[2], 13[1], 13[2]. If a participant 11, 12, 13 has more than two ports, it is specified (for example, in advance) from which ports to which ports the network time deviation is forwarded. This assignment of the ports of a participant may take place in one direction or in both directions. If a synchronization path S is known, the synchronization path S may then specify from which ports to which ports the network time deviation is forwarded. It may be provided that the network time deviation is forwarded only in the direction of the synchronization path S, or forwarded in accordance with the port assignment of the synchronization path S without taking the direction into account (i.e., in the direction of the synchronization path S and opposite the direction of the synchronization path S).
[0058] This means, viewed along the synchronization path S, that the first participant 11 with the data packet D1[2] transmits a network time deviation td10[1] of its first port 11[1] to the second participant 12 via the second port 11[2] and the second participant 12 with the data packet D2[2] transmits a network time deviation td20[1] of its first port 12[1] to the third participant 13 via its second port 12[2].
[0059] In addition, the third participant 13 may transmit a network time discrepancy td30[2] of its second port 13[2] to the second participant 12 with the data packet D3[1] via the first port 13[1] opposite to the synchronization path S, and the second participant 12 with the data packet D2[1] may transmit a network time deviation td20[2] of its second port 12[2] to the first participant 11 via its first port 12[1]. For a better illustration, however, only one transmission of the network time deviation in the direction of the synchronization path S is considered below.
[0060] However, in order to determine the network time deviation td10[2], td20[1], td20[2], td30[1] of a port 11[2], 12[1], 12[2], 13[1] via which a synchronization packet D2[1], D1[2], D3[1], D2[2] is received, the former is obtained from the already calculated difference time td1[2], td2[1], td2[2], td3[1] and in turn from a network time deviation td10[2], td20[1], td20[2], td30[1] received in the synchronization packet D2[1], D1[2], D3[1], D2[2].
[0061] To start the calculation of the network time deviation td10[1], td20[1], td20[2], td30[2], initial values, preferably zero, may initially be specified for the network time deviation td10[1], td10[2], td20[1], td20[2], td30[1], td30[2].
[0062] For ports 11[1], 13[2] via which no synchronization packet is received, a network time deviation td10[1], td30[2] of zero may be specified.
[0063] For
[0064] The second participant 12 thus receives the network time deviation td10[1] with the first data packet D1[2] at its first port 12[1] and uses the difference time td2[1] of its first port 12[1] to calculate the network time deviation td20[1]=td10[1] +td2[1] of the first port 12[1]. This network time deviation td20[1] of the first port 12[1] is transmitted to the third participant 13 in the data packet D2[2] via the other, second port 12[2]. The third participant 13 receives the data packet D2[2] at its first port 13[1] and uses the difference time td3[1] of the first port 13[1] to calculate the network time deviation td30[1] of the first port 13[1] as td30[1]=td20[1]+td3[1].
[0065] In the step of calculating the local network time tn1, tn2, tn3 of the participants 11, 12, 13, the synchronization path S is advantageously taken into account. In this way, the network time tn1, tn2, tn3 of the participants 11, 12, 13 is calculated from the difference between their local time t1, t2, t3 and the network time deviation (in
[0066] In
[0067] In
[0068] By selecting the synchronization path S, the participants 11, 12, 13 are specified, starting from which port 11[1], 11[2], 12[1], 12[2], 13[1], 13[2] they are to calculate the local network time tn1, tn3, wherein in each case the port 11[1], 11[2], 12[1], 12[2], 13[1], 13[2] opposite to the synchronization path S is selected. The second participant 12 is the synchronization master SM, which is why, using the synchronization packet D2[1], D2[2], it transmits a specified network time deviation td20[1], td20[2] along the synchronization path (S), i.e., via the ports 12[1], 12[2]. Thus, the second participant 12 is specified the network time deviation td20[1]=td20[2], preferably zero, for the ports 12[1], 12[2].
[0069] For the second participant 12, therefore, the difference times td2[1], td2[2] of ports 12[1], 12[2] are also not taken into account (the network time deviations td20[1] td20[2] are already specified), but rather, the local network time tn2 is calculated directly from the difference between the local time t2 and the specified network time deviation td20: tn2=t2−td20.
[0070] Due to the specified synchronization path S, the first participant 11 takes into account the network time deviation td10[2] of the second port 11[2] when calculating its local network time tn1 (since its second port 11[2] is opposite the synchronization path S): tn1=t1−td10[2]. Similarly, when calculating its local network time tn3, the third participant 13 takes into account the network time deviation td30[1] of the first port 13[1] (since its first port 13[1] is opposite the synchronization path S): tn3=t3−td30[1].
[0071] The local network time tn1, tn3 of the first and third participants 11, 13 is thus synchronized with the local network time tn2 of the second participant 12.
[0072] The (specified) network time deviation td20 of the second participant 12 (synchronization master SM) describes, as mentioned, the difference between its local time t2 and the global network time.
[0073] Participants 11, 12, 13 preferably correct their network time deviations td10[1], td10[2], td20[1], td20[2], td30[1], td30[2] each by a signal delay time tt1[2], tt2[1], tt2[2], tt3[1]. This can be done by transmitting in each case the difference time td1[2], td2[1], td2[2], td3[1] in the synchronization packet D1[2], D2[1], D2[2], D3[1] of the port 11[2], 12[1], 12[2], 13[1], via which the synchronization packet D1[2], D2[1], D2[2], D3[1] is sent (not shown in the figures). Participants 11, 12, 13 calculate their signal propagation time tt1[2], tt2[1], tt2[3], tt3[2] at a port 11[2], 12[1], 12[2], 13[1] from half the difference between the difference time td1[2], td2[1], td2[2], td3[1] received at this port 11[2], 12[1], 12[2], 13[1] in the synchronization packet D1[2], D2[1], D2[2], D3[1] and the difference time td1[2], td2[1], td2[2], td3[1] ascertained for this port. This occurs on the assumption that the transfer time between adjacent participants 11, 12, 13 is in each case identical to one another.
[0074] For the real-time network 1 according to
[0075] The second participant 12 transmits its time difference td2[2] in the data packet D2[2] and receives the time difference td3[1] of the third participant 13 in the data packet D2[1]. The signal propagation time tt2[2] at its port 12[2] then results from tt2[2]=(td2[2]+td3[1])/2. The second participant is thus able to correct the network time deviation td20[2] of its port 12[2] by the signal propagation time tt2[2]: td20[2]=td20[2]−tt2[2]. The third participant 13 calculates its signal propagation time tt3[1] at its port 13[1] according to tt3[1]=(td3[1]+td2[2])/2, with which it is able to calculate the network time deviation td30[1] of its port 13[1] by the signal transit time tt3[1]: td30[1]=td30[1]−tt3[1].
[0076] The difference times td1[2], td2[1], td2[2], td3[1] are preferably filtered in each case after they have been ascertained in order to minimize jitter and quantization effects. A filter with an exponential smoothing function is preferably used for this purpose. It is also possible to filter difference times td1[2], td2[1], td2[2], td3[1], corrected by signal propagation times tt1[2], tt2[1], tt2[2], tt3[1],
[0077] The transmission of the synchronization packets D1[2], D2[1], D2[2], D3[1] between the participants and the associated synchronization of the network time tn1, tn2, tn3 of the participants 11, 12, 13 each requires a certain period of time. Since the counters of participants 11, 12, 13, which are each used to determine the local times t1, t2, t3, count at different speeds due to oscillator tolerances, the network times tn1, tn2, tn3 of participants 11, 12, 13 (which are derived of course from the local times t1, t2, z3 of the participants 11, 12, 13) may drift apart between the synchronization points in time. In the case of a line topology of participants 11, 12, 13, this is especially pronounced due to the chained forwarding of the synchronization packets D1[2], D2[1], D2[2], D3[1]. A difference between the current network time deviation td10[1], td20[1], td20[2], td30[2] in the current cycle n and the network time deviation td10[1], td20[1], td20[2], td30[2] is preferably calculated in each case from a previous cycle (for example, from the immediately preceding cycle n−1), which results in a network time deviation difference that describes the drift. Since the deviations in the counting speeds of the counters may change over time, multiple measurements of the network time deviation difference is advantageous. The network time deviation difference is preferably determined in each synchronization cycle.
[0078] The network time deviation difference may be filtered, which results in a filtered network time deviation difference. If this filtered network time deviation difference is added to the instantaneous network time deviation in the instantaneous cycle n, a compensated network time deviation results, which may be used instead of the original network time deviation td10[1], td20[1], td20[2], td30[2] to compensate for deviations of the synchronized network time due to oscillator tolerances. By filtering the network time deviation difference, the accuracy of the compensated network time deviation may even exceed the measurement resolution if the network time deviation is monotonic and the network time deviation difference is at least approximately constant. The accuracy may be increased, in particular, if the inertia of the change in frequency is greater than the filter length, which is still the case with large filter lengths as well, since the change in frequency is only caused by temperature changes and aging processes and these processes are very slow.
[0079] It is noted that the foregoing examples have been provided merely for the purpose of explanation and are in no way to be construed as limiting of the present invention. While the present invention has been described with reference to an exemplary embodiment, it is understood that the words which have been used herein are words of description and illustration, rather than words of limitation. Changes may be made, within the purview of the appended claims, as presently stated and as amended, without departing from the scope and spirit of the present invention in its aspects. Although the present invention has been described herein with reference to particular means, materials and embodiments, the present invention is not intended to be limited to the particulars disclosed herein; rather, the present invention extends to all functionally equivalent structures, methods and uses, such as are within the scope of the appended claims.