JP7622386B2 - Time synchronization method, time synchronization method - Google Patents
Time synchronization method, time synchronization method Download PDFInfo
- Publication number
- JP7622386B2 JP7622386B2 JP2020159213A JP2020159213A JP7622386B2 JP 7622386 B2 JP7622386 B2 JP 7622386B2 JP 2020159213 A JP2020159213 A JP 2020159213A JP 2020159213 A JP2020159213 A JP 2020159213A JP 7622386 B2 JP7622386 B2 JP 7622386B2
- Authority
- JP
- Japan
- Prior art keywords
- time
- master
- synchronization
- ring
- slave
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 48
- 230000005540 biological transmission Effects 0.000 claims description 50
- 230000001360 synchronised effect Effects 0.000 claims description 25
- 235000008694 Humulus lupulus Nutrition 0.000 claims description 22
- 230000007704 transition Effects 0.000 claims description 19
- 238000005259 measurement Methods 0.000 claims description 15
- 230000008569 process Effects 0.000 description 22
- 238000010586 diagram Methods 0.000 description 15
- 238000012545 processing Methods 0.000 description 13
- 239000000523 sample Substances 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 5
- 238000009499 grossing Methods 0.000 description 5
- 230000007246 mechanism Effects 0.000 description 5
- 230000000903 blocking effect Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 4
- 230000001934 delay Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- ODCKICSDIPVTRM-UHFFFAOYSA-N [4-[2-hydroxy-3-(propan-2-ylazaniumyl)propoxy]naphthalen-1-yl] sulfate Chemical compound C1=CC=C2C(OCC(O)CNC(C)C)=CC=C(OS(O)(=O)=O)C2=C1 ODCKICSDIPVTRM-UHFFFAOYSA-N 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000003111 delayed effect Effects 0.000 description 2
- 230000006866 deterioration Effects 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 229930091051 Arenine Natural products 0.000 description 1
- 241000287828 Gallus gallus Species 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 230000000087 stabilizing effect Effects 0.000 description 1
Images
Landscapes
- Synchronisation In Digital Transmission Systems (AREA)
Description
本発明は、通信分野におけるノード間の時刻同期に関する。 The present invention relates to time synchronization between nodes in the communications field.
IEEE1588に規定するPTP(Precision Time Protocol)は、基本的にマスター:スレーブの二点のノード間における時刻同期を図っている(特許文献1,非特許文献1参照)。
The Precision Time Protocol (PTP) defined in IEEE 1588 basically aims to synchronize time between two nodes, a master and a slave (see
PTPによる時刻同期は、マスター・スレーブ間における1対1の処理で同期を取るので、トポロジー制約が無いことが利点な反面、スレーブの台数が増加するに従ってマスターへのトラフィック集中が問題となる。 Time synchronization using PTP is achieved through one-to-one processing between the master and slave, so while the advantage is that there are no topology constraints, as the number of slaves increases, traffic concentration on the master becomes an issue.
また、PTPによる時刻同期は、マスター・スレーブの二点間における往路・復路の伝送遅延が同一であることを前提としているが、一般的なイーサネット(登録商標)網では、かかる前提の成立は保証されず、時刻同期の品質が不安定となり易い。 In addition, time synchronization using PTP is based on the premise that the transmission delays on the outbound and inbound routes between the master and slave are identical, but in a typical Ethernet (registered trademark) network, this premise is not guaranteed to hold true, making the quality of time synchronization prone to instability.
(1)時刻同期の基本的な考え方
図1中のマスタークロックとスレーブクロックとは、マスター・スレーブに内蔵されたクロック(時計)を示し、両クロックの偏差を「Δt」とする。ここではマスタークロックを基準時計とするため、偏差「Δt」はスレーブクロック側の「誤差」といえる。
(1) Basic concept of time synchronization The master clock and slave clock in Figure 1 refer to the clocks built into the master and slave, and the deviation between the two clocks is "Δt." Since the master clock is used as the reference clock, the deviation "Δt" can be considered an "error" on the slave clock side.
例えばマスタークロックの時刻を「T」・スレーブクロックの時刻を「T´」とすれば、「T´=T+Δt」と表すことができる。また、「Δt>0」の場合にはスレーブクロックの時刻が進み、「Δt<0」の場合にはスレーブクロックの時刻が遅れていることとなる。 For example, if the time of the master clock is "T" and the time of the slave clock is "T'", then it can be expressed as "T' = T + Δt". Furthermore, if "Δt > 0", the time of the slave clock is advanced, and if "Δt < 0", the time of the slave clock is delayed.
したがって、「時刻同期」は「Δt=0(0に限りなく近づける)」ことを意味する。このときスレーブが、自身のクロックの「Δt」を求めることができれば、その分の時刻の進み/遅れを補正することでマスタークロックと同期することが可能となる。 Therefore, "time synchronization" means "Δt = 0 (as close as possible to 0)." If the slave can calculate the "Δt" of its own clock, it can synchronize with the master clock by correcting the time advance/delay accordingly.
(2)従来の時刻同期
図2に示す従来の時刻同期方法では、マスターからスレーブに同期用メッセージ「SYNCメッセージ」を送信する。このメッセージには、送信時刻T1が打刻されている。
(2) Conventional Time Synchronization In the conventional time synchronization method shown in Fig. 2, a synchronization message "SYNC message" is transmitted from the master to the slave. This message is stamped with the transmission time T1.
「SYNCメッセージ」を受信したスレーブは、同メッセージの受信時刻「T´」を自らのスレーブクロックで計測する。このとき「SYNCメッセージ」の伝搬時間が要求精度に比べて十分に小さければ、「Δt」は式(1)のように算出される。 The slave that receives the "SYNC message" measures the reception time "T'" of the message using its own slave clock. If the propagation time of the "SYNC message" is sufficiently short compared to the required accuracy, then "Δt" is calculated as shown in formula (1).
ただし、「SYNCメッセージ」送信時刻を打刻するには、ある程度高度なハードウェア(HW)が必要となる。そこで、前記ハードウェアを持たないノードの場合には、図3に示すように、送信時刻を後追いの「FOLLOW-UPメッセージ」で通知する。 However, to stamp the sending time of a "SYNC message," a fairly advanced hardware (HW) is required. Therefore, in the case of a node that does not have the above hardware, the sending time is notified by a following "FOLLOW-UP message," as shown in Figure 3.
(3)伝送遅延の問題
前述した従来の時刻同期は、「SYNCメッセージ」の伝搬時間が要求精度に比べて十分に小さいことを前提条件とする。図4は、かかる前提条件が満たされない場合を示している。
(3) Problem of Transmission Delay The above-mentioned conventional time synchronization is based on the premise that the propagation time of the "SYNC message" is sufficiently small compared to the required accuracy. Figure 4 shows a case where such a prerequisite is not met.
図3中のマスター・スレーブ間の伝送遅延「D1≠0」とするならば、式(1)には伝送遅延成分D1が余分に含まれているので、式(2)の方程式に示すように、余分な成分(D1)を差分することで等式が成立する。 If the transmission delay between the master and slave in Figure 3 is "D1 ≠ 0", then equation (1) contains an extra transmission delay component D1, so the equality is established by subtracting the extra component (D1), as shown in equation (2).
このとき「Δt」を求めるには「D1」の値が必要である。「D1」の値は、「T´2-T´1」なため、式(3)となる。この式(3)は右辺に変数の「Δt」が残る。 In this case, the value of "D1" is required to calculate "Δt". The value of "D1" is "T'2 - T'1", so we get equation (3). In equation (3), the variable "Δt" remains on the right-hand side.
その結果、「Δt」を計算するには正しい「D1」の値が必要だが、「D1」の値を算出するには「Δt」が必要となる。これは「鶏と卵」のパラドックスといえる。すなわち、数学的観点からすれば、二つの変数の値を確定するには二本の方程式を必要とするが、一つしか方程式を立てられない状態であり、解が求められない問題が生じる。 As a result, the correct value of "D1" is needed to calculate "Δt", but "Δt" is needed to calculate the value of "D1". This can be called the "chicken and egg" paradox. In other words, from a mathematical point of view, two equations are needed to determine the values of two variables, but only one equation can be formulated, resulting in a problem that cannot be solved.
(4)PTPの解決方法
PTPでは、前記問題を解決するため、「伝送遅延が往路・復路で同じ」と仮定し、図5の処理を実行する。ここでは従来の時刻同期方法に次の処理が追加されている。
・スレーブは、マスターに対して「DELAY REQメッセージ」を送信する。このメッセージの送信時刻「T´3」を自身のスレーブクロックで測定する。
・「DELAY REQメッセージ」を受信したマスターは、その受信時刻「T4」をスレーブに「DELAY RES」メッセージとして返信する。この返信を受信したスレーブは、同メッセージの時刻「T4」を入手する。
(4) Solution of PTP In order to solve the above problem, PTP assumes that "the transmission delay is the same on the outbound and inbound routes" and executes the process shown in Fig. 5. Here, the following process is added to the conventional time synchronization method.
The slave transmits a "DELAY REQ message" to the master and measures the transmission time of this message, "T'3", using its own slave clock.
The master that receives the "DELAY REQ message" replies to the slave with the reception time "T4" as a "DELAY RES" message. The slave that receives this reply obtains the time "T4" of the same message.
その結果、「Δt=T4-T´3-D2」の新たな方程式を立てることが可能となる。これにより「未知変数×2」・「方程式×2」となり、伝送遅延「D1=D2=D」を前提に偏差「Δt」を求めている。 As a result, it is possible to set up a new equation: "Δt = T4 - T'3 - D2". This results in "2 unknown variables" and "2 equations", and the deviation "Δt" is found based on the transmission delay "D1 = D2 = D".
具体的に偏差「Δt」の算出方法を説明すれば、まず「D1」と「D2」とは、式(4)(5)の通りであることは明らかである。 To explain in detail how the deviation "Δt" is calculated, it is clear that "D1" and "D2" are as shown in equations (4) and (5).
つぎにマスタークロック・スレーブクロックの偏差「Δt」の定義(T´=T+Δt)から式(6)(7)が成立する。 Next, equations (6) and (7) hold based on the definition of the deviation "Δt" between the master clock and slave clock (T' = T + Δt).
そうすると式(6)(7)を式(4)(5)に代入すれば、式(8)(9)が成立する。 Then, by substituting equations (6) and (7) into equations (4) and (5), equations (8) and (9) are obtained.
ここで伝送遅延「D1=D2=D」が前提なため、式(10)が成立する。 Here, since the transmission delay "D1 = D2 = D" is assumed, equation (10) holds.
式(10)の値を「D」とすれば、式(8)(9)は式(11)(12)と表すことができる。 If the value of equation (10) is "D", equations (8) and (9) can be expressed as equations (11) and (12).
「式(12)-式(11)」を評価すると、左辺の「D」が相殺され、「Δt」について解くと、式(13)が得られる。スレーブは、この偏差「Δt」に基づき自身のクロックを補正することでマスターとの時刻同期を図っている。 When "Equation (12) - Equation (11)" is evaluated, "D" on the left side cancels out, and when solving for "Δt", we obtain Equation (13). The slave synchronizes its time with the master by correcting its own clock based on this deviation "Δt".
前述のようにPTPでは、伝送遅延「D1=D2=D」を前提に偏差「Δt」を求めている。しかしながら、イーサネットにおいて、ノード間の往路・復路の伝送遅延が同一であることは保証されず、また期待することもできない。 As mentioned above, PTP calculates the deviation "Δt" based on the assumption that the transmission delay is "D1 = D2 = D." However, in Ethernet, it is not guaranteed, nor can it be expected, that the transmission delays on the outbound and inbound paths between nodes will be the same.
イーサネットにおける伝送遅延の変動は、主にイーサネットスイッチの転送処理に起因して生じる。すなわち、PTPパケットがイーサネットスイッチを通過する際、転送先ポートに送信中のパケットが存在する否かによって変動を受ける。 Fluctuations in transmission delays in Ethernet are mainly caused by the forwarding process of Ethernet switches. In other words, when a PTP packet passes through an Ethernet switch, it fluctuates depending on whether or not there is a packet being sent to the destination port.
転送先ポートに送信中のパケットが存在しなければ、送信待ちが発生せずに転送される。一方、転送先ポートに送信中のパケットが存在すれば、該パケットが完全に送出されるまで後続のパケットは待機状態を強いられる。これはパケットに優先度が設定されていても同じである。 If there is no packet being sent to the destination port, the packet will be forwarded without waiting to be sent. On the other hand, if there is a packet being sent to the destination port, subsequent packets will be forced to wait until the packet is completely sent. This is true even if a priority is set for the packet.
したがって、転送先ポートに先行パケットが存在するか否か(あるいは先行パケットの長さ)に応じて伝送遅延に変動が生じ、往路・復路で伝送遅延が同一となることは期待できない。PTPでは、このような突発的な誤差(先行パケットの有無)の混入が本質的に回避できないので、移動平均などの平滑化機構を実装する必要が生じる。この平滑化機能により突発的に混入した誤差を前後の測定値で平坦に均すことは可能であるが、その代償として時刻同期にかかる時間が増大するおそれがある。 Therefore, the transmission delay varies depending on whether or not a preceding packet is present at the destination port (or the length of the preceding packet), and it cannot be expected that the transmission delay will be the same on the outbound and return journeys. Since PTP essentially cannot avoid the inclusion of such sudden errors (the presence or absence of a preceding packet), it is necessary to implement a smoothing mechanism such as a moving average. This smoothing function can smooth out the suddenly introduced errors between the previous and following measured values, but the trade-off is that the time required for time synchronization may increase.
そもそもPTPが往路・復路の伝送遅延が同一であることを前提としなければならないのは、前述のパラドックスを根本原因とする。すなわち、マスタークロック・スレーブクロック間の誤差を計算するために、その二つのクロックで時間差を測定しなければならないこと自体に矛盾が潜んでいる。 The fundamental reason why PTP must assume that the transmission delays on the outbound and inbound routes are the same is the paradox mentioned above. In other words, there is a contradiction inherent in the fact that the time difference between a master clock and a slave clock must be measured in order to calculate the error between the two clocks.
本発明は、このような従来の問題を解決するためになされ、ノード間の往復の伝送遅延が同一であることが保証されていない状況下において、伝送遅延をマスター・スレーブのそれぞれのクロックではなく、マスタークロックのみで計測することで時刻同期の品質の安定化を図ることを解決課題としている。 The present invention was made to solve such problems in the past, and aims to stabilize the quality of time synchronization by measuring the transmission delay only with the master clock, rather than with the master and slave clocks, in a situation where it is not guaranteed that the round-trip transmission delay between nodes is the same.
(1)本発明の一態様は、リング型ネットワーク上のスレーブ群をマスターに時刻同期させる方式であって、
前記マスターの送信した同期用メッセージを、前記各スレーブが順次に転送・中継した後に前記マスターで受信することで前記ネットワーク上を周回させ、
前記マスターのクロックで計測された前記同期用メッセージの送信時刻および受信時刻に基づき前記同期用メッセージの伝送遅延を算出し、
前記伝送遅延を用いて前記スレーブのクロックと前記マスターのクロックとの誤差を算出し、算出された誤差に基づき前記スレーブのクロックを補正することを特徴としている。
(1) One aspect of the present invention is a method for time-synchronizing a group of slaves on a ring network with a master, comprising:
The synchronization message transmitted by the master is transferred and relayed by each of the slaves in sequence, and then received by the master, thereby circulating the message on the network;
Calculating a transmission delay of the synchronization message based on a transmission time and a reception time of the synchronization message measured by the master clock;
The clock error between the slave and the master is calculated using the transmission delay, and the slave clock is corrected based on the calculated error.
(2)本発明の他の態様は、リング型ネットワーク上のスレーブ群をマスターに時刻同期させる方法であって、
前記マスターの送信した同期用メッセージを、前記各スレーブが順次に転送・中継した後に前記マスターで受信することで前記ネットワーク上を周回させるステップと、
前記マスターの内蔵時計で計測された前記同期用メッセージの送信時刻および受信時刻に基づき前記同期用メッセージの伝送遅延を算出するステップと、
前記伝送遅延を用いて前記スレーブの内蔵時計と前記マスターの内蔵時計との誤差を算出し、算出された誤差に基づき前記スレーブの内蔵時計を補正して前記マスターの内蔵時計と同期するステップと、を有することを特徴としている。
(2) Another aspect of the present invention is a method for time-synchronizing a group of slaves on a ring network with a master, comprising the steps of:
a step of circulating the synchronization message transmitted by the master on the network by each of the slaves sequentially forwarding and relaying the synchronization message and then receiving the synchronization message by the master;
calculating a transmission delay of the synchronization message based on a transmission time and a reception time of the synchronization message measured by an internal clock of the master;
using the transmission delay to calculate an error between the built-in clock of the slave and the built-in clock of the master, and correcting the built-in clock of the slave based on the calculated error to synchronize with the built-in clock of the master.
本発明によれば、ノード間の往復の伝送遅延が同一であることが保証されていない状況下において、伝送遅延をマスター・スレーブのそれぞれのクロックではなく、マスターのクロックのみで計測するため、時刻同期の品質の安定化を図ることができる。 According to the present invention, in a situation where it is not guaranteed that the round-trip transmission delay between nodes is the same, the transmission delay is measured using only the master clock, not the master and slave clocks, thereby stabilizing the quality of time synchronization.
以下、本発明の実施形態に係る時刻同期方式(方法)を説明する。この時刻同期方式(方法)は、リング型の接続形態(トポロジー)に限定することで従来問題の元凶、即ち「伝送遅延を誤差のある二つのクロック(マスタークロック・スレーブクロック)で測定する」事態の回避を図っている。 The following describes a time synchronization method (method) according to an embodiment of the present invention. This time synchronization method (method) aims to avoid the root cause of the conventional problem, that is, "measuring transmission delay with two clocks (master clock and slave clock) with errors," by limiting it to a ring-type connection form (topology).
これにより既存技術(PTP)よりも効率的で確実性の高い時刻同期を提供でき、特にTSN(Time Sensitive Networking)への適用が好適となる。 This provides more efficient and reliable time synchronization than existing technology (PTP), making it particularly suitable for use in Time Sensitive Networking (TSN).
具体的には前記時刻同期方式は、リング型ネットワーク(リング型LAN,リングトポロジー,系:以下、リングと省略する。)の円環状の伝送路で使用され、該ネットワーク上に存在するマスターノードが自身のリングポート(リングに接続される二つのポート)の一方から「SYNCメッセージ」を隣接するスレーブに送信する。 Specifically, the time synchronization method is used on the circular transmission path of a ring network (ring type LAN, ring topology, system: hereafter abbreviated as ring), and a master node on the network transmits a "SYNC message" from one of its ring ports (two ports connected to the ring) to an adjacent slave.
そして、「SYNCメッセージ」を受信したスレーブが隣接するスレーブに順次にハードウェア転送(HW転送)することで「SYNCメッセージ」をリングに周回させ、マスターの他方のリングポートで受信する。これによりリングを一周するのにかかる伝送遅延は、マスターノードのグランドマスタークロックだけで測定することができ、スレーブクロックとのクロック間誤差が入り込む余地が無くなる。 Then, the slave that receives the "SYNC message" forwards it to the adjacent slaves in turn via hardware forwarding (HW forwarding), causing the "SYNC message" to circulate around the ring, where it is received by the other ring port of the master. This means that the transmission delay it takes to go around the ring can be measured using only the grandmaster clock of the master node, leaving no room for clock errors with the slave clock.
また、伝送遅延変動がない場合の周回遅延をあらかじめ測定し、運用時に許容範囲を越えて遅延した「SYNCメッセージ」の破棄を指示することで誤った時刻同期を回避し、同期精度の劣化の軽減を図っている。 In addition, the round trip delay when there is no transmission delay variation is measured in advance, and "SYNC messages" that are delayed beyond the allowable range during operation are discarded to avoid incorrect time synchronization and reduce deterioration of synchronization accuracy.
≪ネットワーク構成≫
図6および図7に基づき前記時刻同期方式の実施例のネットワーク構成を説明する。図6および図7中の10はリングを示し、マスターノード(以下、マスターと省略する。)1と、スレーブノード(以下、スレーブと省略する。)1a~1iと、が円環状の伝送路に通信可能に接続されている。
<Network configuration>
The network configuration of the embodiment of the time synchronization method will be described with reference to Figures 6 and 7. In Figures 6 and 7, 10 indicates a ring, in which a master node (hereinafter abbreviated as master) 1 and slave nodes (hereinafter abbreviated as slaves) 1a to 1i are communicatively connected to a circular transmission path.
このリング10では、図1に示すように、マスター1が定期的に「SYNCメッセージ」7を送信し、リング10上を周回させる。また、「SYNCメッセージ」7の周回後にマスター1は、「FOLLOW-UPメッセージ」8を送信し、リング10上を周回させる。この二つのメッセージ7,8の周回によって1回の同期処理単位を構成する。
As shown in Figure 1, in this
マスター1による「SYNCメッセージ」7および「FOLLOW-UPメッセージ」8の送信は、双方向であることが望ましいが、単方向であってもよい。また、周回(ループ)の終端箇所はマスター1となり、マスター1は一般トラフィックが無限巡回しないようにスイッチング動作を構成する。
The transmission of the "SYNC message" 7 and "FOLLOW-UP message" 8 by
これは「STP」で言うところの「ブロッキングポート」に該当するが、リングポートをブロッキング状態にすると前記各メッセージ7,8も不通になるので、他の手法で実現する。
This corresponds to what is called a "blocking port" in "STP," but since putting the ring port into a blocking state would also block the
≪マスター1・スレーブ1a~1iの構成≫
図8および図9に基づきマスター1・スレーブ1a~1iの構成を説明する。マスター1・スレーブ1a~1iは、共に一般的なPTP対応のスイッチングハブ(スイッチ)と同類の構造を有している。
<
The configuration of the
すなわち、リング10のシンクロリングプロトコルを実行するCPU2と、パケットを転送するスイッチエンジン3と、同期対象のクロック(内蔵時計)4と、「SYNCメッセージ」の送受信を検知し、その時刻を記録するタイムスタンプレジスター5a,5bと、リング10に接続されるイーサネットポートで構成されるリングポート6a,6bとを備えている。
That is, it is equipped with a
ただし、マスター1のスイッチエンジン3は、一般パケットの無限巡回を防止する観点からVLAN(Virtual LAN),ACL(Access Control List)などの既存の仕組みを応用する。
However, the
なお、タイムスタンプレジスター5a,5bについてPTPでは「SYNCメッセージ」7に直接打刻する機能も使用されるが、本実施例では必ず「FOLLOW-UPメッセージ」8の送信が必要なため、前記直接打刻は不要である。 Note that, in PTP, the timestamp registers 5a and 5b also have a function for directly stamping the "SYNC message" 7, but in this embodiment, the "FOLLOW-UP message" 8 must be sent, so this direct stamping is not necessary.
≪フレーム構成≫
図10(a)~(d)に基づき実施例の時刻同期処理に必要な「SYNCメッセージ」7および「FOLLOW-UPメッセージ」8の構成例を説明する。
<Frame composition>
An example of the configuration of the "SYNC message" 7 and the "FOLLOW-UP message" 8 required for the time synchronization process of the embodiment will be described with reference to FIGS.
具体的には両メッセージ7,8は、共に図10(a)に示すイーサネットフレームにより構成されている。図10(b)(c)は、両メッセージ7,8のイーサネットペイロード「PAYLOAD」のフィールドを示している。表1は、前記フィールドのメッセージフォーマットを示している。
Specifically, both
また、「FOLLOW-UPメッセージ」8の「FLAGS」には、図7(d)に示すフラグがセットされる。表2は、図7(d)のフラグの詳細を示している。 Furthermore, the flags shown in FIG. 7(d) are set in the "FLAGS" of the "FOLLOW-UP message" 8. Table 2 shows the details of the flags in FIG. 7(d).
≪動作処理≫
本実施例のリング全体の動作として、図11に示すように、(1)キャリブレーションモード,(2)同期モード,(3)通常動作モードが用意されている。
<<Operation Processing>>
As shown in FIG. 11, the operation of the entire ring in this embodiment includes three modes: (1) calibration mode, (2) synchronization mode, and (3) normal operation mode.
すなわち、キャリブレーションモードでリングの特性を測定し、測定の結果に基づき同期モードで時刻同期を取り、通常動作モードに遷移して時刻同期の状態を維持しつつ一般トラフィックの通行を開始する。 That is, the ring characteristics are measured in calibration mode, time synchronization is achieved in synchronous mode based on the measurement results, and then the system transitions to normal operation mode to allow general traffic to pass while maintaining the time synchronization state.
時刻同期の状態を維持するため、通常動作モードにおいても同期モードで行っていた時刻同期の処理を継続する。この両者の違いは、一般トラフィックをリング上に流入させるか否かのみである。 To maintain time synchronization, the time synchronization process that was performed in synchronous mode continues even in normal operation mode. The only difference between the two is whether or not general traffic is allowed to flow onto the ring.
通常動作モードにおいて、一般トラフィックの影響で時刻同期の同期品質の維持が困難となった場合には、一時的に同期モードにフォールバックして時刻同期を取り直し、改めて通常動作モードに遷移して一般トラフィックの通行を再開することができる。 In normal operation mode, if it becomes difficult to maintain the quality of time synchronization due to the influence of general traffic, it is possible to temporarily fall back to synchronous mode to re-establish time synchronization, and then transition back to normal operation mode to resume the passage of general traffic.
[キャリブレーションモード]
キャリブレーションモードでは、一般トラフィックがリング内に流入しないように設定した上で、リングの特性を測定する。
[Calibration Mode]
In the calibration mode, the ring characteristics are measured after setting the ring so that general traffic does not flow into the ring.
一般トラフィックの流入を防止する方法としては、
・STPブロッキングステートにて遮蔽する
・VLANでリングポートを隔離する
・ACLで一般パケットを選別する
・一般ポートをシャットダウンする
・一般ポートのLANケーブルを抜く
など多様な実装が想定できる。
Methods for preventing the inflow of general traffic include:
A variety of implementations are possible, such as blocking in an STP blocking state, isolating the ring port using a VLAN, filtering out general packets using an ACL, shutting down the general port, and unplugging the LAN cable from the general port.
キャリブレーションモードでは、以下の二つを測定項目とする。
・測定項目1:リング周回時間Tr
・測定項目2:スレーブ位置H
(1)測定項目1:リング周回時間Tr
キャリブレーションモードにおいては、一般トラフィックをリング10上から完全に排除する。したがって、スイッチにおける転送遅延時間は最短かつ無変動であることが合理的に期待される。以下、リング周回時間Trの測定処理ステップ(S01~S06)を説明する。
S01:「SYNCメッセージ」7の送信
マスター1は、リングポート6aから「SYNCメッセージ」7を隣接するスレーブ1aに送信する。表3は、「SYNCメッセージ」7のイーサネットペイロードのフィールドへの記載内容を示している。ここで「F」は「FLAGS(フラグ)」を示している。
In the calibration mode, the following two items are measured:
Measurement item 1: Ring lap time Tr
Measurement item 2: Slave position H
(1) Measurement item 1: Ring rotation time Tr
In the calibration mode, general traffic is completely removed from the
S01: Sending the "SYNC message" 7 The
「SYNCメッセージ」7がマスター1のリングポート6aを通過する際、タイムスタンプレジスター5aにより送信時刻が記録される。
PTPでは、送信時刻を「SYNCメッセージ」7に直接打刻する機能を用いる場合があるものの、前述のように本実施例では「FOLLOW-UPメッセージ」8の送信を必須とするため、前記直接打刻の機能は必要ない。すなわち、マスター1は、「SYNCメッセージ」7の送信時刻を同レジスター5aから取り出して記録する。ここで記録された時刻の値を「T1」とする。
When the "SYNC message" 7 passes through the
In PTP, a function for directly stamping the transmission time on the "SYNC message" 7 may be used, but as described above, in this embodiment, the transmission of the "FOLLOW-UP message" 8 is essential, so the direct stamping function is not necessary. In other words, the
S02:「SYNCメッセージ」7の中継
スレーブ1aは、マスター1の送信した「SYNCメッセージ」7を受信し、さらにスイッチエンジン3によってネイバーのスレーブ1bにハードウェア転送で中継する。この中継をスレーブ1b~1iが順次に繰り返し、同メッセージ7をリング10上に周回させる。
S02: Relay of the "SYNC message" 7
すなわち、各スレーブ1a~1iは、一方のリングポート6aで受信した「SYNCメッセージ」7を加工せずに対向のリングポート6bから送信する。これはマルチキャストフレームに対するフラッディング動作であり、一般的なスイッチエンジンであれば、実行することができる。
In other words, each
このときリングポート6aにおいて、タイムスタンプレジスター5aが「SYNCメッセージ」7の通過時刻を記録する。ここで記録された時刻をスレーブ1a~1iごとに「Ta~Ti」とする。この「Ta~Ti」の値は、後述する「FOLLOW-UPメッセージ」8の受信時に参照される。
At this time, in the
「SYNCメッセージ」7は、各スレーブ1a~1iのCPU2にミラーリング(複製)される。一般的なスイッチエンジンは、予約マルチキャストパケットをCPU2でキャッチする機能を持つので、CPU2でこれを受信することは容易に実現できる。
The "SYNC message" 7 is mirrored (replicated) to the
「SYNCメッセージ」7をCPU2でキャッチすれば、各スレーブ1a~1iは、同メッセージ7記載の「QUIETビット」および「QUIET TIMER」を参照し、これに従ってリングポート6a,6b上にトラフィックが発生しないように自身を設定する。なお、一般トラフィックの流入のみならず、自身のCPUからの送信も停止するものとする。
When the "SYNC message" 7 is caught by
S03:「SYNCメッセージ」7の帰還
S02の中継により「SYNCメッセージ」7は、リング上を一周(周回)し、最終的にはマスター1の対向側リングポート6bで受信される。このときタイムスタンプレジスター5bが受信時刻を記録する。ここで記録された時刻の値を「T2」とする。
S03: Return of the "SYNC message" 7: The "SYNC message" 7 goes around the ring by the relay in S02, and is finally received by the opposing
その結果、マスター1は、S01でタイムスタンプレジスター5aにより記録された送信時刻T1と、タイムスタンプレジスター5bにより記録された受信時刻T2に基づきリング周回時間Trを式(14)のように計算できる。
As a result,
式(14)中の「T1」および「T2」は、いずれもマスター1のクロック4により測定した値である。したがって、式(14)で算出されるリング周回時間Trについては、マスター1・スレーブ1a~1i間のクロック間の偏差による計算誤差が発生する余地がない。
Both "T1" and "T2" in formula (14) are values measured by the
S04:「FOLLOW-UPメッセージ」8の送信
マスター1は、S03のリング周回時間Trの計算後にリングポート6aから隣接するスレーブ1aに「FOLLOW-UPメッセージ」8を送信する。
S04: Transmission of the "FOLLOW-UP message" 8 After calculating the ring rotation time Tr in S03, the
表4は、「FOLLOW-UPメッセージ」8のイーサネットペイロードのフィールドへの記載内容を示している。ここで「F」は「FLAGS(フラグ)」を示している。なお、キャリブレーションモードでは、クロック4の同期は実行しないので、フラグ「SYNC_FAIL」を常に「1」にセットする。
Table 4 shows the contents written in the Ethernet payload field of the "FOLLOW-UP message" 8. Here, "F" stands for "FLAGS." Note that in calibration mode,
S05:「FOLLOW-UPメッセージ」8の中継・帰還
スレーブ1aは、「SYNCメッセージ」7と同様に「FOLLOW-UPメッセージ」8を受信し、自身のCPU2でこれをキャッチしてネイバーのスレーブ1bに転送中継する。この動作処理をスレーブ1b~1iが順次に繰り返し、同メッセージ8をリング10上に周回させ、周回後にマスター1が受信する。
S05: Relay and return of the "FOLLOW-UP message" 8
このとき各スレーブ1a~1iは、「FOLLOW-UPメッセージ」8の「SYNC_FAIL」フラグを参照し、これが「1」であることを検出して前回受信した「SYNCメッセージ」7の受信時刻を破棄する。なお、キャリブレーションモードでは時刻同期を開始することがないので、「SYNC_FAIL」フラグの値にかかわらず、「SYNCメッセージ」7の受信時刻を破棄してもよい。
At this time, each
そして、「SYNCメッセージ」7の受信時刻の破棄条件を論理式展開すれば、「(SYNC_FAIL)||(MODE=CALIBRATION)」となる。ここで「||」は論理和を表している。 Then, if we logically expand the discard condition for the reception time of the "SYNC message" 7, we get "(SYNC_FAIL) || (MODE = CALIBRATION)." Here, "||" represents a logical sum.
S06:繰り返し測定
本実施例では、S01~S05のステップによりリング周回時間Trを測定する。このとき一般トラフィックの流入を遮断しているので、測定値は正しいと期待できるが、更なる精度向上のため、図12に示すように、前記測定を所定回数繰り返す。
S06: Repeated measurements In this embodiment, the ring rotation time Tr is measured by steps S01 to S05. Since the inflow of general traffic is blocked at this time, the measured value is expected to be correct, but to further improve accuracy, the measurement is repeated a predetermined number of times as shown in FIG.
図12では、最短時間「Tmin」を左の裾野とし、極めて微小な幅を持つ分布の山が得られている。 In Figure 12, the shortest time "Tmin" is at the left base, and a distribution peak with an extremely small width is obtained.
この山の横幅「σ」は、要求される同期精度に比べて十分に小さくなければならない。これが成立しないような劣悪なスイッチエンジンでは、本実施例の方式を実現できない。 The width of this peak, "σ", must be sufficiently small compared to the required synchronization accuracy. If this is not the case with a poor switching engine, the method of this embodiment cannot be realized.
この山の頂点のX座標値を標準リング周回時間「Tstd」と定義する。標準リング周回時間「Tstd」は、「SYNCメッセージ」7が転送される際に送信待ちを受けずにリング10を一周するのにかかる時間といえる。
The X-coordinate value of the peak of this mountain is defined as the standard ring orbit time "Tstd." The standard ring orbit time "Tstd" can be said to be the time it takes for a "SYNC message" 7 to go around the
標準リング周回時間「Tstd」が求まるまでは、キャリブレーションモードを継続する。測定回数は、スイッチエンジンの品質やトポロジーの規模、ネットワーク管理者の考え方や過去の経験に応じて定めることができる。なお、リング10のネットワーク構成が変化した場合にはキャリブレーションをやり直すこととする。
The calibration mode continues until the standard ring orbit time "Tstd" is determined. The number of measurements can be determined based on the quality of the switch engine, the scale of the topology, the network administrator's thinking, and past experience. Note that if the network configuration of
(2)測定項目2:スレーブ位置H
キャリブレーションモードにおいては、標準リング周回時間「Tstd」の測定とは別に、リング10上の各スレーブ1a~1iの位置測定も実施する。ここで、スレーブ1a~1iの位置は、マスター1から各スレーブ1a~1iへ至るまでに経過するホップ数である。
(2) Measurement item 2: Slave position H
In the calibration mode, in addition to measuring the standard ring orbit time "Tstd", the position of each of the
図6および図7に例示したネットワーク構成を反時計回りに評価した場合には、
・スレーブ1a=1ホップ(マスター1から1台目)
・スレーブ1b=2ホップ(同2台目)
・スレーブ1c=3ホップ(同3台目)
・スレーブ1d=4ホップ(同4台目)
・スレーブ1e=5ホップ(同5台目)
・スレーブ1f=6ホップ(同6台目)
・スレーブ1g=7ホップ(同7台目)
・スレーブ1h=8ホップ(同8台目)
・スレーブ1i=9ホップ(同9台目)
一方、時計回りに評価した場合には、
・スレーブ1i=1ホップ(マスター1から1台目)
・スレーブ1h=2ホップ(同2台目)
・スレーブ1g=3ホップ(同3台目)
・スレーブ1f=4ホップ(同4台目)
・スレーブ1e=5ホップ(同5台目)
・スレーブ1d=6ホップ(同6台目)
・スレーブ1c=7ホップ(同7台目)
・スレーブ1b=8ホップ(同8台目)
・スレーブ1a=9ホップ(同9台目)
となる。
When the network configurations illustrated in FIGS. 6 and 7 are evaluated counterclockwise,
・
・
・
・
・
・
・
・
・
On the other hand, if you evaluate it clockwise,
・
・
・
・
・
・
・
・
・
It becomes.
各スレーブ1a~1iは、自らの位置(ホップ数)を知っておく必要がある。また、マスター1は、スレーブ1a~1iの位置を知る必要はないが、各スレーブ1a~1iに自らの位置を検出させるために、図10(a)(e)に示す「PROBEメッセージ」9をリングポート6a,6bの一方から送信する。
Each
表5は、「PROBEメッセージ」9のイーサネットペイロードのフィールドへの記載内容を示している。 Table 5 shows the contents of the Ethernet payload fields of the "PROBE message" 9.
「PROBEメッセージ」9は、他のメッセージとは異なり、送信先イーサネットアドレスを「01:80:C2:00:00:00」とする。これは「BPDU」といわれるフレームであり、フラッディングされずにCPU2によってのみ受信される。すなわち、リング10上の各スレーブ1a~1iのCPU2によるバケツリレーで転送される。
The "PROBE message" 9 differs from other messages in that the destination Ethernet address is "01:80:C2:00:00:00". This is a frame called a "BPDU", and is not flooded but is only received by
「PROBEメッセージ」9を受信したスレーブ1a~1iは、図10(e)中の「NODES」フィールドの値を1加算した値を自身の位置(マスター1からのホップ数)として記録する。ここで記録された値を「H」とする。
すなわち、スレーブ1a~1iは、ホップ数Hを「NODES」フィールドに上書きしてネイバーに転送する。これにより「NODES」フィールドの値は、各スレーブ1a~1iを通過するごとに1ずつ増加する。
このバケツリレーを繰り返すことで、全てのスレーブ1a~1iが自身の位置を把握できる。この測量は、リング10の時計回り・反時計回りのそれぞれについて実行する。ただし、前記両メッセージ7,8がどちらか1方向に限定されている場合には、その方向についてのみ実施すればよい。
「PROBEメッセージ」9は、最終的にはマスター1のリングポート6a,6bの他方に受信されて帰還する。このとき同メッセージ9に記載された「NODES」フィールドの値が、リング10上のスレーブ1a~1iの総数となり、これを「N」とする。
マスター1は、「N」の値を、前記各メッセージ7,8の「NODES」フィールドに記載してリング10の全体に広告する。「N」の測定後、マスター1・スレーブ1a~1iは、以下の検算を行う。なお、以下に示す「N’」・「H’」は、それぞれ反時計回りの「N」・「H」の値を示している。
(マスター1の検算)
マスター1は、時計回り・反時計回りでノード数「N」・「N’」が一致する否か、即ち式(15)が成立するか否かを確認する。
The
That is, the
By repeating this bucket brigade, all
The "PROBE message" 9 is ultimately received and returned to the other of the
The
(
(スレーブ1a~1iの検算)
スレーブ1a~1iは、時計回りと半時計周りでの位置H,H’の和がノード数Nと一致するか否か、即ち式(16)が成立するか否かを確認する。
(Verification of
The
前記検算がエラーとなった場合、即ち式(15)(16)が不成立の場合にはスレーブ1a~1iの位置測定をやり直すものとする。
If the above calculation results in an error, i.e., if equations (15) and (16) do not hold, the position measurement of
[同期モード]
(1)キャリブレーションモードで標準リンク周回時間「Tstd」とノード数「N」が定まれば、同期モードに遷移する(図11中のDONE遷移)。
[Synchronous mode]
(1) When the standard link circulation time "Tstd" and the number of nodes "N" are determined in the calibration mode, a transition to the synchronous mode is made (DONE transition in FIG. 11).
動作モードを遷移させる権限は、マスター1のみが有している。すなわち、マスター1は自らの決定を前記各メッセージ7,8の「MODE」フィールドに記載してリング10の全体に広告する。
同期モードにおいても、キャリブレーションモードと同様に前記両メッセージ7,8による処理を定期的に実行する。この実行頻度は、要求精度やリングの規模、あるいはネットワーク管理者の考え方に応じて設定されるものとする。
ただし、同期モードは、両メッセージ7,8の「SYNC_FAIL」フラグの決定方法がキャリブレーションモードと相違する。すなわち、キャリブレーションモードでは「SYNC_FAIL」フラグを常に「1」としていた。これに対して同期モードにおいては、以下の評価に従って「SYNC_FAIL」フラグの値を調整する。
(A)定期的に前記両メッセージ7,8による処理を実行し、その都度リング周回時間「Tr」を式(14)で計算する。
(B)各リング周回時間「Tr」の超過遅延「Trx」を式(17)から計算する。
Only the
In the synchronous mode, similarly to the calibration mode, the processes using the two
However, the synchronous mode differs from the calibration mode in the method of determining the "SYNC_FAIL" flags in both
(A) Periodically execute the processes using both
(B) Calculate the excess delay "Trx" of each ring round time "Tr" from equation (17).
超過遅延「Trx」の値は、「SYNCメッセージ」7がスイッチで転送される際に、先行送信中のフレームの影響で待機を強いられた時間の総計である。
(C)超過遅延時間「Trx」が負の値になった場合には、キャリブレーションモードで得られた標準リング周回時間「Tstd」が不正確と考えられるので、キャリブレーションモードにフォールバックする((図11中のBREAK遷移)。
(5)超過遅延時間「Trx」が正の値になった場合には、要求精度に基づいて決められる足切りライン設定と比較する。この比較の結果、以下のように「SYNC_FAIL」フラグを決定する。
・足切りライン未満である場合:「SYNC_FAIL」フラグを「0」とする。
・足切りライン以上である場合:「SYNC_FAIL」フラグを「1」とする。
The value of the excess delay "Trx" is the total time that the "SYNC message" 7 is forced to wait due to the influence of a preceding frame being transmitted when it is forwarded by the switch.
(C) If the excess delay time "Trx" becomes a negative value, the standard ring rotation time "Tstd" obtained in the calibration mode is considered to be inaccurate, so fall back to the calibration mode ((BREAK transition in FIG. 11).
(5) When the excess delay time "Trx" becomes a positive value, it is compared with a cutoff line setting determined based on the required accuracy. As a result of this comparison, the "SYNC_FAIL" flag is determined as follows:
If the result is below the cutoff line: the "SYNC_FAIL" flag is set to "0".
If the result is above the cutoff line: the "SYNC_FAIL" flag is set to "1".
これにより直近の「SYNCメッセージ」7がリング10を周回する際に、リング10上のどこかで許容できない水準の遅延が生じたか否かを確実に検出することができる。
This makes it possible to reliably detect whether an unacceptable level of delay occurred anywhere on the
また、前記検出の結果をリング10上に広告することで、直近の「SYNCメッセージ」7の受信時刻を破棄させ、同期品質の劣化を防止することが可能となる。このような「SYNC_FAIL」フラグの調整を除き、マスター1はキャリブレーションモードと同じ処理を実行する。
In addition, by advertising the detection results on the
(2)スレーブ1a~1iは、「SYNC_FAIL」フラグ「1」の場合には、キャリブレーションモードと同じ動作処理を実行する。一方、「SYNC_FAIL」フラグ「0」の場合には、以下の動作処理を実行する。
(2) If the "SYNC_FAIL" flag is "1", the
すなわち、「SYNC_FAIL」フラグ「0」の「FOLLOW―UPメッセージ」7を受信したスレーブ1a~1iは、自身のクロック4の誤差(偏差)「Δt」を計算する。
That is, when a
ここでは「FOLLOW―UPメッセージ」7に記載された「SYNC_TIMESTAMP」を「T1」,スレーブ1a~1iが自身のクロック4で測定した直近の「SYNCメッセージ」7の受信時刻を「Ts」とする。この場合に誤差「Δt」は、式(18)で表すことができる。
Here, the "SYNC_TIMESTAMP" written in the "FOLLOW-UP message" 7 is "T1", and the reception time of the most recent "SYNC message" 7 measured by each of the
式(18)中の「DS」は、「SYNCメッセージ」7がマスター1から当該スレーブ1a~1iに伝搬するのにかかった時間を示している。この段階の式(18)の評価式はPTPと同じであり、「DS」の求め方が相違する。
"D S " in formula (18) indicates the time it takes for the "SYNC message" 7 to propagate from the
本実施例における「DS」の計算方法と根拠を説明すれば、まず直近の「SYNCメッセージ」7がリング10を一周するのにかかった周回時間「Tr」は、「FOLLOW-UPメッセージ」8の「LAP_DELAY」フィールドに記載されている。この周回時間「Tr」は、式(19)に示すように、標準リング周回時間「Tstd」に超過遅延「Trx」が付加された値といえる。
To explain the calculation method and basis of "D S " in this embodiment, first, the round trip time "Tr" that it took for the most recent "SYNC message" 7 to go around the
つぎに前述のように超過遅延時間「Trx」は、マスター1によって高精度に測定されている。また、「SYNC_FAIL」フラグ「0」の場合は、超過遅延時間「Trx」は、要求精度に比べて十分に小さいことが確認されている。
Next, as mentioned above, the excess delay time "Trx" is measured with high accuracy by
そうすると要求精度のオーダーからみれば、超過遅延時間「Trx」は「0」に近似(「Trx≒0」)し、式(20)が成立する。 In this case, from the perspective of the required order of accuracy, the excess delay time "Trx" approximates "0" ("Trx ≒ 0"), and equation (20) holds.
さらに標準リンク周回時間「Tstd」の値は、キャリブレーションモードにおいてスイッチエンジン3の遅延ゼロ、かつ無変動の場合にかかる時間として算出されている。そのため、1ホップごとに生じる遅延「Dhop」は、各スレーブ1a~1iで均等と推定でき、式(21)に示すように、近似する。
Furthermore, the standard link round trip time "Tstd" is calculated as the time required when the delay of the
式(21)中の「N」はリング10上のスレーブ1a~1iの総数を示している。「N」の値は、前記両メッセージ7,8の「NODES」フィールドに記載されているため、常に読み出すことができる。
In equation (21), "N" indicates the total number of
このときスレーブ1a~1iは、マスター1から自身に至るまでのホップ数Hを「PROBEメッセージ」9により把握している。このホップ数Hの値を用いれば、「SYNCメッセージ」7がマスター1からスレーブ1a~1iに到着するまでに経過した時間「DS」は、式(22)のように計算することができる。
At this time, the
そして、式(18)(22)から式(23)が求められる。 Then, equation (23) can be obtained from equations (18) and (22).
以上から誤差「Δt」は、式(24)の計算式で求められることができる。 From the above, the error "Δt" can be calculated using formula (24).
その結果、スレーブ1a~1iは、式(25)に示すように、誤差「Δt」を自身のクロック4から差し引くことでマスター1との時刻同期をとることができる。
As a result,
PTPにおいては、突発的な誤差の混入による影響を緩和するため、移動平均等の何らかの平滑化機構の実装が必要となる。これに対して本実施例では混入した誤差「Δt」はマスター1による測定で正確に測定され、また要求精度を超過する遅延が生じた同期行程を「SYNC_FAIL」フラグ「1」のときに確実に破棄することができる。したがって、本実施例によれば、平滑化機構を必要とせず、一回の同期行程でほぼ完全な時刻同期の状態を得ることができる。
In PTP, in order to mitigate the effects of sudden errors, it is necessary to implement some sort of smoothing mechanism, such as a moving average. In contrast, in this embodiment, the error "Δt" that has been mixed in is accurately measured by
もっとも、確実な時刻同期の状態を得るためにはネットワーク管理者が設定した条件をクリアするまでは、同期モードの状態を維持することが好ましい。例えば通常動作モードへの遷移条件の例としては、
・同期行程が3回連続で成功
・3分間ほど同期行程を繰り返し、「SYNC_FAIL」フラグ「1」の場合の回数が事前設定の値未満
などの安全基準を設けることが好ましい。
However, in order to obtain a reliable time synchronization state, it is preferable to maintain the synchronous mode state until the conditions set by the network administrator are met. For example, examples of conditions for transitioning to the normal operation mode are as follows:
- The synchronization process is successful three times in a row. - It is preferable to set a safety standard such as repeating the synchronization process for about three minutes and making sure that the number of times the "SYNC_FAIL" flag is "1" is less than a preset value.
この安全基準は、スイッチエンジン3の品質、リング10の規模、ネットワーク管理者の考え方に応じて定めればよい。この安全基準を満たした場合に通常動作モードに遷移する(図11中のSYNCED遷移)。
This safety standard can be determined based on the quality of the
≪通常動作モード≫
同期モードにおいて時刻同期が成立した場合には、前述のSYNCED遷移により通常動作モードに移行する。
<Normal operation mode>
When time synchronization is established in the synchronous mode, the above-mentioned SYNCED transition causes a transition to the normal operation mode.
通常動作モードにおいても、マスター1・スレーブ1a~1iは、前記両メッセージ7,8による処理を定期的に実行する。この実行頻度は、要求精度やリングの規模、ネットワーク管理者の考え方に応じて定めることができる。
Even in normal operation mode, the
マスター1は、自身が送信する前記両メッセージ7,8の「MODE」フィールドに通常動作モードを表す整数値を設定し、通常動作モードに移行したことをリング10の全体に広告する。
このときマスター1および通常動作モードの移行を検知したスレーブ1a~1iは、一般トラフィックがリング10上を通行できるようにスイッチエンジン3を設定変更する。これにより一般トラフィックと回線を共有しつつ、時刻同期を維持する体制が成立する。
At this time, the
≪動作モードのフォールバック≫
三つの動作モード(キャリブレーションモード、同期モード、通常動作モード)では、前記両メッセージ7,8による処理を継続的に実施する点で同じであるが、同期工程の実施/一般トラフィックの流入許可の点で相違する。
<<Fallback operation mode>>
The three operation modes (calibration mode, synchronization mode, normal operation mode) are the same in that the processing using both
通常は、「キャリブレーションモード→同期モード→通常動作モード」の順に一方通行の状態遷移となる。ただし、キャリブレーション不良/時刻同期の不良によるキャリブレーションモードへのフォールバック遷移も想定される。このキャリブレーションまで戻る遷移条件(図11中のBREAK)として、以下が挙げられる。
(1)ネットワーク構成が変化した場合
(2)リング周回時間Trの超過遅延「Trx」が負の値として求まった場合
通常動作モードから同期モードに戻る遷移条件(RESYNC)は、後述する同期品質の維持に黄色信号が点灯した場合が想定される。
Normally, the state transition is one-way in the order of "calibration mode → synchronization mode → normal operation mode". However, a fallback transition to the calibration mode due to a calibration failure/time synchronization failure is also assumed. The transition conditions to return to this calibration (BREAK in FIG. 11) are as follows:
(1) When the network configuration has changed. (2) When the excess delay "Trx" of the ring rotation time Tr is found to be a negative value. The transition condition (RESYNC) from the normal operation mode back to the synchronization mode is assumed to be when a yellow light turns on to maintain the synchronization quality, as described below.
≪時刻同期の品質の観測≫
本実施例では、時刻同期の品質を観測するための対策を提案する。この観測結果に基づき同期モードへのフォールバック条件をネットワーク管理者が定義することが好ましい。
<Observation of time synchronization quality>
In this embodiment, we propose a measure to monitor the quality of time synchronization. It is preferable that the network administrator defines the fallback conditions to the synchronous mode based on the results of this monitoring.
(1)連続的な失敗
定期的に実施する前記両メッセージ7,8による処理を連続して失敗した場合、失敗回数に応じて同期モードにフォールバックさせる。
(1) Consecutive Failures If the processes using the two
例えば、ネットワーク管理者がこれを3回に設定したと仮定する。マスター1は、前記両メッセージ7,8による処理が失敗して「SYNC_FAIL」を「1」とする。この場合に失敗カウンターCに「1」を加算する。一方、前記両メッセージ7,8による処理が成功した場合には失敗カウンターCを「0」に戻す。
For example, let us assume that the network administrator has set this to three times.
そして、前記両メッセージ7,8による処理を実行するたびに「失敗カウンターC≧3」が成立するか否かを確認し、成立すれば同期モードに遷移する。このとき次回以降にマスター1の送信する前記両メッセージ7,8の「MODES」フィールドを同期モードとし、リング10の全体にこれを広告する。
Each time the process is performed using both
(2)連続失敗時間
前記両メッセージ7,8による処理が最後に成功した時から現在までの経過時間が事前設定の閾値を超えた場合に同期モードにフォールバックさせる。
(2) Continuous Failure Time If the elapsed time from the last successful processing of both the
(3)誤差補正量
前述のように前記両メッセージ7,8による処理によりスレーブ1a~1iはその都度、誤差「Δt」を計算し、これを補正する。ただし、スレーブ1a~1iは、誤差「Δt」が同期不良を示唆する値となれば、同期モードに遷移するようにマスター1に要求する。
(3) Error Correction Amount As described above, the
同期不良と判定する基準としては、
・誤差「Δt」が、事前設定の閾値以上となった場合
・誤差「Δt」の値が、前回よりも閾値以上の割合(%)で変動した場合
・誤差「Δt」が「0」の値を継続している場合
などが想定される。
The criteria for determining poor synchronization are as follows:
- When the error "Δt" exceeds a preset threshold value - When the value of the error "Δt" has changed by a percentage (%) that is greater than or equal to the threshold value compared to the previous time - When the error "Δt" continues to have a value of "0" etc. are possible cases.
といったようなものが考えられる。 Things like these are possible.
このような基準を単体または複合で組み合わせてフォールバック条件をネットワーク管理者が構成することで時刻同期の品質を安定させることができる。 Network administrators can configure fallback conditions by combining these criteria, either individually or in combination, to stabilize the quality of time synchronization.
≪作用効果≫
本実施例によれば、以下の作用効果を得ることができる。
<Action and effect>
According to this embodiment, the following advantageous effects can be obtained.
(1)手続きの簡素化によるCPU2,ネットワーク帯域の負荷軽減
既存技術(PTP)では、マスター1/スレーブ1a~1i間でメッセージの二往復が必要であった。これに対して本実施例では、マスター1からの一方通行のメッセージ送信でよく、マスター1のCPU2およびネットワーク帯域の負荷を軽減することができる。
(1) Reduction of the load on the
例えば、図6及び図7のネットワーク構成によれば、スレーブ1a~1iは9台なため、従来技術によれば1回の同期工程で生じるマスター1の処理単位は、以下のようになる(1個のメッセージを1単位とする。)。
・1個の「SYNCメッセージ」7の送信(マルチキャストにてネットワーク全体にフラッディング)
・9個の「DELAY_REQメッセージ」をスレーブ1a~1iから受信
・9個の「DELAY_RESメッセージ」をスレーブ1a~1iに返信
・計19単位(「FOLLOW-UPメッセージ」8を行う場合には20単位)
が必要となる。
For example, in the network configurations of FIGS. 6 and 7, there are nine
Sending one "SYNC message" 7 (flooding the entire network via multicast)
Receives 9 "DELAY_REQ messages" from
is required.
これに対して本実施例では、
・1個の「SYNCメッセージ」7の送信(マルチキャストにてリング10の全体にフラッディング)
・1個の「FOLLOW―UPメッセージ」8の送信(マルチキャストにてリング10の全体にフラッディング)
・計2単位で済む。
In contrast, in this embodiment,
Sending one "SYNC message" 7 (flooding the
Sending one "FOLLOW-UP message" 8 (flooding the
・Only 2 units in total are required.
特に従来技術では、スレーブの台数に比例してマスター1の処理単位が増加する。これに対して本実施例では、スレーブの台数に係わらず常に2単位で済むこととなる。
In particular, in conventional technology, the processing unit of
(2)時刻同期の品質の安定化
既存技術では1回の同期行程ごとに同期精度が変動を受けやすい。これに対して本実施例によれば、リング周回時間Trを高精度で測定できるため、誤差「Δt」の大きい同期工程を確実に破棄させることができ、時刻同期の品質維持が容易である。すなわち、処理構造が単純なため、同期精度に大きな変動を生じることがなく、この点で時刻同期の精度を安定化させることができる。
(2) Stabilization of the quality of time synchronization In the existing technology, the synchronization accuracy is easily affected by fluctuations in each synchronization process. In contrast, according to the present embodiment, the ring orbit time Tr can be measured with high accuracy, so that a synchronization process with a large error "Δt" can be reliably discarded, and the quality of time synchronization can be easily maintained. In other words, since the processing structure is simple, there is no large fluctuation in the synchronization accuracy, and in this respect, the accuracy of time synchronization can be stabilized.
(3)短時間で同期できる
既存技術では、平滑化機構を導入することにより、同期状態するために必要な時間が長くなる。これに対して本実施例では、理論上は1回で同期を成功させることができ、同期状態までの時間を最短化することが可能である。
(3) Synchronization in a short time In the existing technology, the introduction of a smoothing mechanism increases the time required to achieve a synchronized state. In contrast, in the present embodiment, in theory, synchronization can be successfully achieved in one try, making it possible to minimize the time required to achieve a synchronized state.
1…マスターノード(マスター)
1a~1i…スレーブノード(スレーブ)
2…CPU
3…スイッチエンジン
4…クロック(内蔵時計)
5a,5b…タイムスタンプレジスター
6a,6b…リングポート
7…SYNCメッセージ(同期メッセージ)
8…FOLLOW-UPメッセージ(後追い通知)
9…PROBEメッセージ
10…リング型ネットワーク
1…Masternode (Master)
1a to 1i: slave nodes (slave)
2. CPU
3...
5a, 5b...
8...FOLLOW-UP message (follow-up notification)
9...
Claims (7)
前記リング型ネットワーク上のスレーブ群をマスターに時刻同期させる方式であって、
前記キャリブレーションモードにおいて、
一般トラフィックが流入しない設定下で、前記マスターの送信した同期用メッセージを前記各スレーブが順次に転送・中継した後に前記マスターで受信するリング周回を複数回にわたって実行し、
前記マスターは、前記各リング周回のリング周回時間を測定し、測定されたリング周回時間群から要求精度に応じた最短時間を標準リング周回時間として算出し、
前記同期モードにおいて、
前記マスターは、前記キャリブレーションモードと同様に前記同期用メッセージを定期的に周回させ、
前記定期的に周回される前記同期用メッセージのリング周回時間と、前記標準リング周回時間との差分を超過遅延時間として算出し、
前記超過遅延時間が事前設定の許容水準を超えていれば前記各スレーブに広告する一方、
前記各スレーブは、前記広告に応じて前記マスターのクロックで計測された前記同期用メッセージの送信時刻および受信時刻に基づき前記同期用メッセージの伝送遅延を算出し、
前記伝送遅延を用いて前記スレーブのクロックと前記マスターのクロックとの誤差を算出し、算出された誤差に基づき前記スレーブのクロックを補正する
ことを特徴とする時刻同期方式。 By executing a calibration mode for measuring the characteristics of the ring network and a synchronization mode based on the results of the measurement,
A method for time-synchronizing a group of slaves on the ring network with a master, comprising:
In the calibration mode,
Under a setting where general traffic does not flow in, a synchronization message transmitted by the master is sequentially forwarded and relayed by each of the slaves, and then the message is received by the master . This ring circulates multiple times,
the master measures a ring orbit time for each of the rings, and calculates a standard ring orbit time based on the measured ring orbit times and a minimum time according to a required accuracy;
In the synchronous mode,
The master periodically circulates the synchronization message in the same manner as in the calibration mode,
Calculating an excess delay time as a difference between a ring rotation time of the periodically circulated synchronization message and the standard ring rotation time;
If the excess delay time exceeds a preset tolerance level, the excess delay time is notified to each of the slaves.
Each of the slaves calculates a transmission delay of the synchronization message based on a transmission time and a reception time of the synchronization message measured by a clock of the master in response to the advertisement ;
a clock error between the slave and the master clock is calculated using the transmission delay, and the slave clock is corrected based on the calculated error.
前記同期モードにおいて、前記リング周回時間を用いて前記スレーブ1台あたりの通過遅延時間を推定し、
前記推定の結果に前記ホップ数を乗算することで各スレーブまでの伝送遅延を算出する
ことを特徴とする請求項1記載の時刻同期方式。 In the calibration mode, the master calculates the number of hops from the master to each of the slaves,
In the synchronous mode, a transit delay time per slave is estimated using the ring circulation time;
2. The time synchronization method according to claim 1 , wherein the transmission delay to each slave is calculated by multiplying the result of the estimation by the number of hops.
前記広告により、
前記超過遅延時間の生じた前記同期用メッセージの受信時刻を破棄させることを特徴とする請求項1または2記載の時刻同期方式。 In the synchronous mode, the master
By the advertisement,
3. The time synchronization system according to claim 1, wherein the reception time of the synchronization message in which the excessive delay time occurs is discarded.
前記ホップ数を前記スレーブに知らせるメッセージを送信することを特徴とする請求項2記載の時刻同期方式。 In the synchronization mode, the master notifies the slave of the circulation time of the synchronization message in a trailing manner;
3. The time synchronization system according to claim 2 , wherein a message is transmitted to inform the slave of the number of hops.
前記リング型ネットワーク上のスレーブ群をマスターに時刻同期させる方法であって、
前記キャリブレーションモードは、
一般トラフィックが流入しない設定下で、前記マスターの送信した同期用メッセージを前記各スレーブが順次に転送・中継した後に前記マスターで受信するリング周回を複数回にわたって実行するステップと、
前記マスターが、前記各リング周回のリング周回時間を測定し、測定されたリング周回時間群から要求精度に応じた最短時間を標準リング周回時間として算出するステップと、
を有し、
前記同期モードは、
前記マスターが、前記キャリブレーションモードと同様に前記同期用メッセージを定期的に周回させるステップと、
前記定期的に周回される前記同期用メッセージのリング周回時間と、前記標準リング周回時間との差分を超過遅延時間として算出するステップと、
前記超過遅延時間が事前設定の許容水準を超えていれば前記各スレーブに広告するステップと、
前記各スレーブが、前記広告に応じて前記マスターのクロックで計測された前記同期用メッセージの送信時刻および受信時刻に基づき前記同期用メッセージの伝送遅延を算出するステップと、
前記伝送遅延を用いて前記スレーブのクロックと前記マスターのクロックとの誤差を算出し、算出された誤差に基づき前記スレーブのクロックを補正するステップと、
を有することを特徴とする時刻同期方法。 By executing a calibration mode for measuring the characteristics of the ring network and a synchronization mode based on the results of the measurement,
A method for time-synchronizing a group of slaves on the ring network with a master, comprising the steps of:
The calibration mode includes:
A step of performing a ring rotation a plurality of times in which the synchronization message transmitted by the master is sequentially forwarded and relayed by each of the slaves under a setting that does not allow general traffic to flow, and the synchronization message is then received by the master;
a step of the master measuring a ring orbit time for each of the rings and calculating a shortest time according to a required accuracy from a group of the measured ring orbit times as a standard ring orbit time;
having
The synchronous mode is
the master periodically circulates the synchronization message in the same manner as in the calibration mode;
calculating a difference between a ring rotation time of the periodically circulated synchronization message and the standard ring rotation time as an excess delay time;
notifying each of the slaves if the excess delay time exceeds a preset tolerance level;
each of the slaves calculates a transmission delay of the synchronization message based on a transmission time and a reception time of the synchronization message measured by a clock of the master in response to the advertisement ;
calculating an error between the clock of the slave and the clock of the master using the transmission delay, and correcting the clock of the slave based on the calculated error;
A time synchronization method comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020159213A JP7622386B2 (en) | 2020-09-24 | 2020-09-24 | Time synchronization method, time synchronization method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020159213A JP7622386B2 (en) | 2020-09-24 | 2020-09-24 | Time synchronization method, time synchronization method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2022052785A JP2022052785A (en) | 2022-04-05 |
| JP7622386B2 true JP7622386B2 (en) | 2025-01-28 |
Family
ID=80963157
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2020159213A Active JP7622386B2 (en) | 2020-09-24 | 2020-09-24 | Time synchronization method, time synchronization method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7622386B2 (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2008123272A1 (en) | 2007-03-28 | 2008-10-16 | Kabushiki Kaisha Yaskawa Denki | Communication device, synchronized communication system, and synchronized communication method |
| WO2008129593A1 (en) | 2007-04-04 | 2008-10-30 | Mitsubishi Electric Corporation | Communication system, management apparatus, communication apparatus and computer program |
| JP2013146006A (en) | 2012-01-16 | 2013-07-25 | Nec Corp | Communication system, communication system control method, master device, maser device control method, master device control program, slave device, slave device control method, and slave device control program |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH05167589A (en) * | 1991-12-16 | 1993-07-02 | Hitachi Cable Ltd | Time control system for lan |
-
2020
- 2020-09-24 JP JP2020159213A patent/JP7622386B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2008123272A1 (en) | 2007-03-28 | 2008-10-16 | Kabushiki Kaisha Yaskawa Denki | Communication device, synchronized communication system, and synchronized communication method |
| WO2008129593A1 (en) | 2007-04-04 | 2008-10-30 | Mitsubishi Electric Corporation | Communication system, management apparatus, communication apparatus and computer program |
| JP2013146006A (en) | 2012-01-16 | 2013-07-25 | Nec Corp | Communication system, communication system control method, master device, maser device control method, master device control program, slave device, slave device control method, and slave device control program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2022052785A (en) | 2022-04-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11496235B2 (en) | Symmetric path/link over LAG interface using LLDP for time synchronization between two nodes using PTP | |
| US8953645B2 (en) | Communication system, communication apparatus and time synchronization method | |
| US8995473B2 (en) | Ring based precise time data network clock phase adjustments | |
| JP6009672B2 (en) | Method for synchronizing distribution clocks with a high precision time protocol in a communication network | |
| US9491041B2 (en) | Ethernet chain protection switching | |
| KR100962227B1 (en) | Wireless communication system and method | |
| JP2009065579A (en) | Time synchronizing system, time synchronizing method, node, and program | |
| JP5915379B2 (en) | Transmission apparatus and transmission method | |
| US8837532B2 (en) | Frame transmission device and synchronization method | |
| US9749073B2 (en) | Clock recovery in a packet based network | |
| CN107667491B (en) | Enhance the method, apparatus and computer-readable medium of the synchronization in computer network | |
| US9651984B2 (en) | Feed-forward time transfer mechanism for time synchronization | |
| Haxhibeqiri et al. | Enabling TSN over IEEE 802.11: Low-overhead time synchronization for Wi-Fi clients | |
| CN113395261B (en) | Method, equipment and medium for spanning tree protocol fast convergence in MLAG environment | |
| CN101616163A (en) | Precision time transfer protocol message processing method and device | |
| WO2014032350A1 (en) | Method and node based on seamless redundant ring network for increasing precision of clock | |
| Lévesque et al. | Improving the PTP synchronization accuracy under asymmetric delay conditions | |
| Mizrahi | Slave diversity: Using multiple paths to improve the accuracy of clock synchronization protocols | |
| JP7622386B2 (en) | Time synchronization method, time synchronization method | |
| US8861552B2 (en) | Fault-tolerant self-stabilizing distributed clock synchronization protocol for arbitrary digraphs | |
| CN102404104B (en) | Adaptive synchronicity method and system based on different delayed time mechanism | |
| Komes et al. | IEEE 1588 for redundant ethernet networks | |
| CN116112113A (en) | A method and system for implementing dual time plane synchronization enhancement architecture | |
| US12273263B1 (en) | Systems and methods for enabling precision time protocol over a link aggregation group using link aggregation control protocol parameters | |
| Ye et al. | A low overhead time slot synchronization mechanism for wireless ad hoc network |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230221 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20240214 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240305 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240402 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240730 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240920 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20241217 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20241230 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7622386 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |