WO2019003320A1 - 通信システム、マスタ装置及びスレーブ装置 - Google Patents
通信システム、マスタ装置及びスレーブ装置 Download PDFInfo
- Publication number
- WO2019003320A1 WO2019003320A1 PCT/JP2017/023645 JP2017023645W WO2019003320A1 WO 2019003320 A1 WO2019003320 A1 WO 2019003320A1 JP 2017023645 W JP2017023645 W JP 2017023645W WO 2019003320 A1 WO2019003320 A1 WO 2019003320A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- time
- transmission
- value
- count value
- slave device
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0673—Clock or time synchronisation among packet nodes using intermediate nodes, e.g. modification of a received timestamp before further transmission to the next packet node, e.g. including internal delay time or residence time into the packet
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B7/00—Radio transmission systems, i.e. using radiation field
- H04B7/14—Relay systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
- H04J3/0667—Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
- H04J3/067—Details of the timestamp structure
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0682—Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/403—Bus networks with centralised control, e.g. polling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L7/00—Arrangements for synchronising receiver with transmitter
- H04L7/04—Speed or phase control by synchronisation signals
- H04L7/041—Speed or phase control by synchronisation signals using special codes as synchronising signal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W56/00—Synchronisation arrangements
- H04W56/004—Synchronisation arrangements compensating for timing error of reception due to propagation delay
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B7/00—Radio transmission systems, i.e. using radiation field
- H04B7/14—Relay systems
- H04B7/15—Active relay systems
- H04B7/155—Ground-based stations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/4026—Bus for use in automation systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L7/00—Arrangements for synchronising receiver with transmitter
- H04L7/0016—Arrangements for synchronising receiver with transmitter correction of synchronization errors
- H04L7/0033—Correction by delay
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W56/00—Synchronisation arrangements
- H04W56/001—Synchronization between nodes
- H04W56/0015—Synchronization between nodes one node acting as a reference for the others
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W56/00—Synchronisation arrangements
- H04W56/004—Synchronisation arrangements compensating for timing error of reception due to propagation delay
- H04W56/005—Synchronisation arrangements compensating for timing error of reception due to propagation delay compensating for timing error by adjustment in the receiver
Definitions
- the present invention relates to a communication system including a master device and a slave device.
- IEEE 1588 and IEEE 802.1AS a master device (hereinafter, also referred to as a grand master device) as a time source transmits a Sync frame in which time information is stored to a slave device. Then, when receiving the Sync frame, the slave device acquires time information of the master device from the Sync frame. Then, the slave device corrects the time of the slave device. By this. The slave device can synchronize to the master device.
- the protocol of IEEE 1588 will be described below with reference to FIG. The following (1) to (9) correspond to (1) to (9) in FIG.
- the grand master device (GM) When transmitting a Sync frame, the grand master device (GM) acquires a time stamp t1 of transmission time (hereinafter simply referred to as transmission time t1), and stores the transmission time t1 in the Sync frame. Then, the grand master device (GM) transmits the Sync frame in which the transmission time t1 is stored to the slave device (S1). In FIG. 14, the Sync frame in which the transmission time t1 is stored is described as Sync (t1). (2) When the slave device (S1) receives the Sync frame from the grand master device (GM), the slave device (S1) acquires a time stamp t2 of the reception time of the Sync frame (hereinafter simply referred to as reception time t2) and holds the reception time t2. .
- reception time t2 the reception time of the Sync frame
- the slave device (S1) extracts the transmission time t1 stored in the Sync frame, and holds the transmission time t1.
- the slave device (S1) transmits a DelayReq frame, which is a propagation delay measurement request frame, to the grand master device (GM).
- the slave device (S1) acquires a time stamp t3 of the transmission time of the DelayReq frame (hereinafter simply referred to as transmission time t3), and holds the transmission time t3.
- the grand master device (GM) receives the DelayReq frame from the slave device (S1).
- the grand master apparatus (GM) acquires a time stamp t4 (hereinafter, simply referred to as reception time t4) of the reception time of the DelayReq frame, and holds the reception time t4.
- the grand master device (GM) stores the reception time t4 in the DelayResp frame which is a propagation delay measurement response frame, and transmits the DelayResp frame in which the reception time t4 is stored to the slave device (S1).
- the DelayResp frame in which the reception time t4 is stored is described as DelayResp (t4).
- the slave device (S1) extracts the reception time t4 stored in the DelayResp frame, and holds the reception time t4.
- the propagation delay time between the grand master device (GM) and the slave device (S1) using the transmission time t1, the reception time t2, the transmission time t3 and the reception time t4 held by the slave device (S1) Is calculated as follows.
- Propagation delay time: D ⁇ (t4 ⁇ t1) + (t2 ⁇ t3) ⁇ / 2 (8)
- the grand master device (GM) acquires a time stamp t_tx of the transmission start time (hereinafter simply referred to as the transmission start time t_tx) at a certain time, stores the transmission start time t_tx in the Sync frame, and stores the slave device (S1). Send to).
- the transmission start time t_tx a time stamp of the transmission start time
- the Sync frame in which the transmission start time t_tx is stored is described as Sync (t_tx).
- time synchronization protocols are applied to time synchronization between devices in a factory automation (FA) system.
- FA factory automation
- IEEE 1588 or IEEE 802.1AS propagation delay is measured periodically, and propagation delay time between devices is periodically updated. Therefore, in IEEE 1588 or IEEE 802.1AS, time correction is performed using the propagation delay time measured at a timing different from the transmission of the Sync frame. At this time, the propagation delay time measured at the time of transmission of the Sync frame may be largely different from the propagation delay time measured at another timing. In this case, since the slave device (S1) can not correct the time correctly, a synchronization deviation occurs between the slave device (S1) and the grand master device (GM).
- Such a synchronization deviation occurs, for example, when a network in which time synchronization is performed using a time synchronization protocol is mixed with a switching hub (hereinafter referred to as a universal hub (HUB)) incompatible with time synchronization as shown in FIG. Do.
- a universal hub (HUB)
- the relay delay time at the universal hub (HUB) is not constant due to the fluctuation of the processing time of the firmware of the universal hub (HUB) and the transmission waiting. Therefore, the slave device (S1) can not accurately measure the propagation delay time.
- the slave device (S1) connected to the grand master device (GM) via the universal hub (HUB) can not accurately calculate the time difference with the grand master device (GM).
- the propagation delay measurement is performed a plurality of times, and it is assumed that the communication with the shortest communication time is the communication without the fluctuation of the propagation delay.
- time synchronization is performed using the propagation delay measurement value in communication which assumes that there is no fluctuation of propagation delay.
- the grand master device (GM) transmits the Sync frame and the slave device (S1) receives the Sync frame.
- the propagation delay time of the signal may be significantly different from the average value of the propagation delay times calculated in advance.
- the slave device (S1) performs time correction of the slave device (S1) below at time 11.
- the time of the grand master device (GM) when the slave device (S1) corrects the time is 17. Therefore, an error of 2 occurs between the time of the slave device (S1) and the time of the grand master device (GM).
- the relay delay of the universal hub (HUB) as the relay device is not constant.
- the main object of the present invention is to solve such problems. More specifically, the main object of the present invention is to realize accurate time synchronization even when the relay delay of the relay apparatus is not constant.
- the communication system is It has a master device and a slave device connected via a relay device whose relay delay is not constant,
- the master device is A master counter which is a free run counter, At the timing of transmitting a time synchronization frame for time synchronization, the current time is acquired as the transmission time of the time synchronization frame, the count value of the master counter is acquired as the transmission count value, and the transmission time and the transmission count value And a transmitter configured to store the time synchronization frame in the time synchronization frame, and transmitting the time synchronization frame to the slave device;
- the slave device is A slave counter which is a free run counter, A receiving unit that receives the time synchronization frame; An acquisition unit that acquires a reception time of the time synchronization frame and a reception count value that is a count value of the slave counter at the reception time; The transmission time, the transmission count value, the reception time, the reception count value, a measurement propagation delay value that is a value of propagation delay obtained from past measurement, and the master counter corresponding
- FIG. 2 is a diagram showing an operation outline of the communication system according to Embodiment 1.
- FIG. 3 shows an example of a time synchronization sequence according to the first embodiment.
- FIG. 2 is a diagram showing an example of a hardware configuration of a grand master device (GM) according to the first embodiment.
- FIG. 2 is a diagram showing an example of a functional configuration of a grand master device (GM) according to the first embodiment.
- FIG. 2 is a diagram showing an example of a hardware configuration of a slave device (S1) according to the first embodiment.
- FIG. 2 shows an example of a functional configuration of a slave device (S1) according to the first embodiment.
- 6 is a flowchart showing a count-up and time measurement flow according to the first embodiment.
- 6 is a flowchart showing a transmission flow of a DelayReq frame according to the first embodiment.
- 5 is a flowchart showing a reception flow of a DelayReq frame and a transmission flow of a DelayResp frame according to the first embodiment.
- 6 is a flowchart showing a reception flow of a DelayResp frame according to the first embodiment.
- 6 is a flowchart showing a transmission flow of Sync frames according to the first embodiment.
- 6 is a flowchart showing a reception flow of Sync frames according to the first embodiment.
- 6 is a flowchart showing a time correction flow according to the first embodiment.
- the figure which shows the subject of the conventional time synchronization system The figure which shows the subject of the conventional time synchronization system.
- FIG. 1 shows an operation outline of the communication system according to the present embodiment.
- the communication system according to the present embodiment includes a grand master device (GM) 10, a slave device (S1) 20, and a universal hub (HUB) 30.
- the grand master device (GM) 10 is a master device.
- the slave device (S1) 20 is a slave device.
- a universal hub (HUB) 30 is a relay device.
- the grand master device (GM) 10 and the slave device (S 1) 20 are connected via a universal hub (HUB) 30.
- the universal hub (HUB) 30 is a switching hub that does not support time synchronization and is the same as the universal hub (HUB) shown in FIGS. 15 and 16.
- the relay delay of the universal hub (HUB) 30 is not constant.
- FIG. 1 it is shown that the relay delay of the universal hub (HUB) 30 fluctuates by + ⁇ from the average relay delay obtained by IEEE 1588 or IEEE 802.1AS. For this reason, it is necessary to obtain the offset value (Offset (N)) by adding the fluctuation width + ⁇ of the relay delay to the average time difference (Offset ave) obtained by IEEE 1588 or IEEE 802.1 AS.
- both the grand master device (GM) 10 and the slave device (S1) 20 respectively hold a free run counter that measures time and a clock that measures time based on the time that the free run counter cuts.
- the free run counter held by the grand master device (GM) 10 is referred to as a master counter.
- the free run counter held by the slave device (S1) 20 is called a slave counter.
- a watch held by the grandmaster device (GM) 10 is referred to as a master watch.
- a watch held by the slave device (S1) 20 is referred to as a slave watch.
- the slave device (S1) 20 corrects the value of the slave clock when the time is distributed from the grand master device (GM) 10.
- the master counter starts counting up immediately after the grandmaster device (GM) 10 is activated. Similarly, the slave counter starts counting up immediately after the slave device (S1) 20 is activated.
- the master counter and slave counter are not changed in counter value by the communication protocol.
- the grand master device (GM) 10 is reset, the master counter is also reset.
- the slave device (S1) 20 is reset, the slave counter is also reset.
- the grand master device (GM) 10 transmits a Sync frame, which is a time synchronization frame, to the slave device (S1) 20.
- the grand master device (GM) 10 acquires the count value of the master counter and the value of the master clock when transmitting the Sync frame, and stores the acquired count value of the master counter and the value of the master clock in the Sync frame.
- the Sync frame storing the count value of the master counter and the value of the master clock is transmitted to the slave device (S1) 20.
- “t 3 (n)” is stored in the Sync frame as the count value of the master counter
- “t sync (N)” is stored in the Sync frame as the value of the master clock.
- the slave device (S1) 20 acquires the count value of the slave counter and the value of the slave clock when receiving the Sync frame.
- the slave device (S1) 20 acquires “t4 (N)” as the count value of the slave counter, and acquires “t rx (N)” as the value of the slave clock.
- the Sync frame which is a time synchronization frame according to the present embodiment, includes the count value of the master counter, which is different from the Sync frame shown in FIG.
- the slave device (S1) 20 transmits a DelayReq frame, which is a propagation delay measurement request, to the grand master device (GM) 10 as in FIG.
- the slave device (S1) 20 holds the count value of the slave counter and the value of the slave clock at the time of transmission of the DelayReq frame.
- the grand master device (GM) 10 holds the count value of the master counter and the value of the master clock when the DelayReq frame is received.
- the grand master device (GM) 10 transmits a DelayResp frame, which is a propagation delay measurement response, to the slave device (S1) 20.
- the grand master device (GM) 10 stores the count value of the master counter at the transmission time point of the DelayResp frame and the value of the master clock in the Delay Resp frame.
- the slave device (S1) 20 holds the count value of the slave counter and the value of the slave clock when the DelayResp frame is received.
- the slave device (S1) 20 holds the count value of the master counter and the value of the master clock stored in the DelayResp frame.
- the DelayReq frame and the DelayResp frame are also different from the DelayReq frame and the DelayResp frame shown in FIG.
- the slave device (S1) 20 repeatedly executes propagation delay measurement (the procedure of (1) to (6) in FIG. 16) with the grand master device (GM) 10. However, as described above, the DelayReq frame and the DelayResp frame transmitted / received in FIG. 2 are different from the DelayReq frame and the DelayResp frame shown in FIG. The slave device (S1) 20 measures the difference between the propagation delay time and the count value of the slave counter and the count value of the master counter in the propagation delay measurement.
- the slave device (S1) 20 calculates the average value of the propagation delay time between the grand master device (GM) 10 and the slave device (S1) 20 based on a plurality of propagation delay measurements in the past (hereinafter, average propagation delay D_ave Get). Also, the slave device (S1) 20 obtains an average value (hereinafter referred to as average count difference C_ave) of the difference between the count value of the slave counter and the count value of the master counter from a plurality of propagation delay measurements in the past.
- average count difference C_ave average count difference
- the average propagation delay D_ave is a value of propagation delay obtained from past propagation delay measurement, and corresponds to a measurement propagation delay value.
- the average count difference C_ave is a difference between the count value of the master counter corresponding to the average propagation delay D_ave and the count value of the slave counter, and corresponds to the delay count difference.
- RC GM_S1 is a ratio of the clock frequency of the grand master device (GM) 10 to the clock frequency of the slave device (S1) 20.
- the method of calculating the clock ratio is the same as that of the IEEE 802.1AS, the description of the method of calculating the clock ratio is omitted here. Further, it is assumed that the clock frequency of the ground master device (GM) 10 is one.
- the time stamp stored in the Sync frame is only the master clock time stamp T_sync, and the master counter time stamp t3 is not stored in the Sync frame.
- the Sync frame according to the present embodiment differs from the Sync frame of IEEE 1588 and IEEE 802.1 AS in that the timestamp t3 of the master counter is stored.
- time stamp T_sync of the master clock stored in the Sync frame is also referred to as transmission time T_sync.
- time stamp t3 of the master counter stored in the Sync frame is also referred to as a transmission count value t3.
- the time stamp T_RX of the slave clock at the time of reception of the Sync frame is also referred to as a reception time T_RX.
- the timestamp t4 of the slave counter at the time of reception of the Sync frame is also referred to as a reception count value t4.
- the relay delay difference ⁇ is a difference between the value of the relay delay by the universal hub (HUB) 30 at the time of relaying the Sync frame and the value of the relay delay included in the average propagation delay D_ave.
- the slave device (S1) 20 calculates the propagation delay D_true in transmission of the Sync frame as follows.
- the slave device (S1) 20 calculates the time difference between the master clock and the slave clock as Offset (N), and corrects the time of the slave clock using the value of Offset (N).
- FIG. 3 shows an example of the hardware configuration of the grand master device (GM) 10 according to the present embodiment.
- FIG. 4 shows an example of the functional configuration of the grand master device (GM) 10 according to the present embodiment.
- the grand master device (GM) 10 according to the present embodiment is a computer.
- the grand master device (GM) 10 includes, as hardware, an input interface 101, a processor 102, an auxiliary storage device 103, a memory 104, an output interface 105, a network interface 111, a network interface 112, and a network port 113. And a network port 114. Further, as shown in FIG. 4, the grand master device (GM) 10 includes, as functional components, a control unit 106, a time management unit 107, a time measurement unit 108, a transmission unit 109, a data arbitration unit 110, and a reception unit 115.
- the auxiliary storage device 103 stores programs for realizing the functions of the control unit 106, the time management unit 107, the time measurement unit 108, the transmission unit 109, the data arbitration unit 110, and the reception unit 115. These programs are loaded from the auxiliary storage device 103 into the memory 104.
- the processor 102 also reads these programs from the memory 104 and executes these programs. Then, the processor 102 performs operations of a control unit 106, a time management unit 107, a time measurement unit 108, a transmission unit 109, a data arbitration unit 110, and a reception unit 115 described later.
- the processor 102 schematically executes a program for realizing the functions of the control unit 106, the time management unit 107, the time measurement unit 108, the transmission unit 109, the data arbitration unit 110, and the reception unit 115. It represents.
- the input interface 101 is used by the user of the grand master device (GM) 10 to input various instructions.
- the memory 104 also stores the above-mentioned transmission time, transmission count value, and the like.
- the output interface 105 is used to output data to an external storage medium of the grand master device (GM) 10.
- the network interface 111 controls transfer of a frame between the network port 113 and the time management unit 107, the time measurement unit 108, or the data arbitration unit 110.
- the network interface 112 controls transfer of a frame between the network port 114 and the time management unit 107, the time measurement unit 108, or the data arbitration unit 110.
- the network port 113 and the network port 114 are physical connection ports with the network.
- the control unit 106 controls the entire grand master device (GM) 10. Specifically, when the receiving unit 115 receives the DelayReq frame, the control unit 106 notifies the time management unit 107 and the time measuring unit 108 of reception of the DelayReq frame. Also, the control unit 106 instructs the time management unit 107, the time measurement unit 108, and the transmission unit 109 to transmit the DelayResp frame. When reception of the DelayReq frame is notified by the reception unit 115, the control unit 106 instructs the time management unit 107, the time measurement unit 108, and the transmission unit 109 to transmit the DelayResp frame.
- control unit 106 instructs the time management unit 107, the time measurement unit 108, and the transmission unit 109 to transmit the Sync frame.
- the control unit 106 controls the time management unit 107, the time measurement unit 108, and the transmission unit 109 to transmit Sync frames when the number of times of execution of the propagation delay measurement (the procedure of (1) to (6) in FIG. Direct transmission of The control unit 106 counts the transmission cycle of the Sync frame, and instructs the time management unit 107, the time measurement unit 108, and the transmission unit 109 to transmit the Sync frame at a designated cycle.
- the time management unit 107 acquires the current time, and notifies the transmission unit 109 of the acquired current time. Further, the time management unit 107 acquires the current time when the transmission of the Sync frame is instructed from the control unit 106, and notifies the transmitting unit 109 of the acquired current time.
- the time measuring unit 108 has a master counter 1080 which is a free run counter.
- the master counter 1080 starts counting up when the grand master device (GM) 10 is activated. Further, the value of the master counter 1080 is reset when the grand master device (GM) 10 is stopped.
- the time measuring unit 108 notifies the time management unit 107 of count up of the master counter 1080 each time the master counter 1080 counts up. Further, when the control unit 106 is notified of the reception of the DelayReq frame, the time measurement unit 108 acquires the current count value of the master counter 1080 and stores the acquired count value in the memory 104.
- the time measurement unit 108 acquires the current count value of the master counter 1080, and notifies the transmission unit 109 of the acquired count value. Also, when instructed by the control unit 106 to transmit a Sync frame, the time measurement unit 108 acquires the current count value of the master counter 1080 and notifies the transmission unit 109 of the acquired count value.
- the transmitting unit 109 generates a DelayResp frame when instructed by the control unit 106 to transmit the DelayResp frame. Also, the transmission unit 109 stores the current time notified from the time management unit 107 in the DelayResp frame. Furthermore, the transmitting unit 109 stores the current count value notified from the time measuring unit 108 in the DelayResp frame. Then, the transmission unit 109 transmits, to the slave device (S1) 20, the DelayResp frame in which the current time and the current count value are stored. More specifically, the transmission unit 109 outputs the DelayResp frame to the data arbitration unit 110. In addition, the transmission unit 109 generates a Sync frame when transmission of the Sync frame is instructed from the control unit 106.
- the transmission unit 109 stores the current time notified from the time management unit 107 in the Sync frame. Furthermore, the transmitting unit 109 stores the current count value notified from the time measuring unit 108 in the Sync frame. Then, the transmission unit 109 transmits, to the slave device (S1) 20, the Sync frame in which the current time and the current count value are stored. More specifically, the transmission unit 109 outputs the Sync frame to the data arbitration unit 110.
- the current time stored in the Sync frame is the aforementioned transmission time. Also, the current count value stored in the Sync frame is the aforementioned transmission count value.
- the data arbitration unit 110 determines the message type, determines whether or not the communication frame received by the network interface 111 or the network interface 112 is normal, and determines the destination. Then, when the received communication frame is a communication frame addressed to the grand master device (GM) 10, the data arbitration unit 110 transfers the communication frame to the reception unit 115. For example, if the received communication frame is a DelayReq frame, the data arbitration unit 110 transfers the DelayReq frame to the receiving unit 115. On the other hand, when the received communication frame is a communication frame addressed to another device, the data arbitration unit 110 performs relay processing. Also, the data arbitration unit 110 outputs the DelayResp frame and the Sync frame output from the transmission unit 109 to the network interface 111 or the network interface 112.
- the receiving unit 115 receives the DelayReq frame transmitted from the slave device (S1) 20. That is, the receiving unit 115 receives the DelayReq frame transferred from the data arbitration unit 110. Also, when the receiving unit 115 receives the DelayReq frame, the receiving unit 115 notifies the control unit 106 of the reception of the DelayReq frame.
- the network interface 111, the network interface 112, the network port 113 and the network port 114 of FIG. 4 are the same as those shown in FIG.
- FIG. 5 shows an example of the hardware configuration of the slave device (S1) 20 according to the present embodiment.
- FIG. 6 shows an example of a functional configuration of the slave device (S1) 20 according to the present embodiment.
- the slave device (S1) 20 according to the present embodiment is a computer.
- the slave device (S1) 20 includes, as hardware, an input interface 201, a processor 202, an auxiliary storage device 203, a memory 204, an output interface 205, a network interface 211, a network interface 212, a network port 213 and A network port 214 is provided. Further, as shown in FIG. 6, the slave device (S1) 20 includes a control unit 206, a time management unit 207, a time measurement unit 208, a transmission unit 209, a data arbitration unit 210, and a reception unit 215 as functional components.
- the auxiliary storage device 203 stores programs for realizing the functions of the control unit 206, time management unit 207, time measurement unit 208, transmission unit 209, data arbitration unit 210, and reception unit 215. These programs are loaded from the auxiliary storage device 203 into the memory 204.
- the processor 202 also reads these programs from the memory 204 and executes these programs. Then, the processor 202 performs operations of a control unit 206, a time management unit 207, a time measurement unit 208, a transmission unit 209, a data arbitration unit 210, and a reception unit 215 described later.
- the processor 202 schematically executes a program for realizing the functions of the control unit 206, the time management unit 207, the time measurement unit 208, the transmission unit 209, the data arbitration unit 210, and the reception unit 215. It represents.
- the input interface 201 is used by the user of the slave device (S1) 20 to input various instructions.
- the memory 204 also stores the transmission time, transmission count value, reception time, reception count value, average count difference C_ave, average propagation delay D_ave, and the like described above.
- the output interface 205 is used to output data to the external storage medium of the slave device (S1) 20.
- the network interface 211 controls transfer of a frame between the network port 213 and the time management unit 207, the time measurement unit 208, or the data arbitration unit 210.
- the network interface 212 controls transfer of a frame between the network port 214 and the time management unit 207, the time measurement unit 208, or the data arbitration unit 210.
- the network port 213 and the network port 214 are
- the control unit 206 controls the entire slave device (S1) 20. Specifically, the control unit 206 instructs the transmission unit 209 to transmit the DelayReq frame. Also, the control unit 206 notifies the time management unit 207 and the time measurement unit 208 of transmission of the DelayReq frame. Also, when the receiving unit 215 receives the DelayResp frame, the control unit 206 notifies the time management unit 207 and the time measuring unit 208 of the reception of the DelayResp frame. Furthermore, when the receiving unit 215 receives the Sync frame, the control unit 206 notifies the time management unit 207 and the time measuring unit 208 of the reception of the Sync frame. The control unit 206 also instructs the time management unit 207 to correct the time.
- the time management unit 207 acquires the current time, and stores the acquired current time in the memory 204. Further, the time management unit 207 acquires the current time when notified of the reception of the Sync frame from the control unit 206, and stores the acquired current time in the memory 204. The current time when the Sync frame is received is the above-mentioned reception time. Also, when time correction is instructed from the control unit 206, the time management unit 207 corrects the time of the slave clock.
- the time management unit 207 includes the transmission time and transmission count value acquired by the reception unit 215, the reception count value acquired by the time measurement unit 208, the reception time, and the average propagation delay D_ave which is a measurement propagation delay value.
- the time of the slave clock is corrected using the average count difference C_ave which is the delay count difference.
- the time management unit 207 calculates the relay delay difference ⁇ based on Equation 3 described above, and calculates the propagation delay D_true based on Equation 4 described above.
- the time management unit 207 calculates Offset (N) based on Equation 5 described above.
- the time management unit 207 corrects the time of the slave clock on the basis of Equation 6 described above.
- the time management unit 207 corresponds to an acquisition unit and a time correction unit.
- the time measuring unit 208 has a slave counter 2080 which is a free run counter.
- the slave counter 2080 starts counting up when the slave device (S1) 20 starts up. Also, the value of the slave counter 2080 is reset when the slave device (S1) 20 stops.
- the time measuring unit 208 notifies the time management unit 207 that the slave counter 2080 has counted up. Further, when notified of the transmission of the DelayReq frame from the control unit 206, the time measuring unit 208 acquires the current count value of the slave counter 2080, and stores the acquired count value in the memory 204.
- the time measuring unit 208 acquires the current count value of the slave counter 2080 when receiving notification of the DelayResp frame from the control unit 206, and stores the acquired count value in the memory 204. Further, when notified of the reception of the Sync frame from the control unit 206, the time measuring unit 208 acquires the current count value of the slave counter 2080, and stores the acquired count value in the memory 204.
- the count value at the time of reception of the Sync frame is the above-mentioned reception count value.
- the time measurement unit 208 and the time management unit 207 correspond to an acquisition unit.
- the transmitting unit 209 generates a DelayReq frame when instructed by the control unit 206 to transmit the DelayReq frame. Then, the transmission unit 209 transmits the DelayReq frame to the grand master device (GM) 10. More specifically, the transmission unit 209 outputs the DelayReq frame to the data arbitration unit 210.
- the data arbitration unit 210 determines the message type, determines whether or not the communication frame received by the network interface 211 or the network interface 212 is normal, and determines the destination. Then, when the received communication frame is a communication frame addressed to the slave device (S1) 20, the data arbitration unit 210 transfers the communication frame to the reception unit 215. For example, if the received communication frame is a DelayResp frame, the data arbitration unit 110 transfers the DelayResp frame to the receiving unit 115. In addition, if the received communication frame is a Sync frame, the data arbitration unit 110 transfers the Sync frame to the receiving unit 115. On the other hand, when the received communication frame is a communication frame addressed to another device, the data arbitration unit 210 performs relay processing. Also, the data arbitration unit 210 outputs the DelayReq frame output from the transmission unit 209 to the network interface 211 or the network interface 212.
- the receiving unit 215 receives the DelayResp frame transmitted from the grand master device (GM) 10. That is, the receiving unit 115 receives the DelayResp frame transferred from the data arbitration unit 210.
- the receiving unit 215 acquires the time and count value stored by the grand master device (GM) 10 from the received DelayResp frame. Then, the reception unit 215 stores the acquired time and count value in the memory 204. Further, when the receiving unit 215 receives the DelayResp frame, the receiving unit 215 notifies the control unit 206 of the reception of the DelayResp frame.
- the receiving unit 215 receives the Sync frame transmitted from the grand master device (GM) 10. That is, the receiving unit 115 receives the Sync frame transferred from the data arbitration unit 210.
- the receiving unit 215 acquires the time (transmission time) and the count value (transmission count value) stored by the grandmaster device (GM) 10 from the received Sync frame. Then, the reception unit 215 stores the acquired transmission time and transmission count value in the memory 204. In addition, when the receiving unit 215 receives the Sync frame, the receiving unit 215 notifies the control unit 206 of the reception of the Sync frame.
- the network interface 211, the network interface 212, the network port 213 and the network port 214 of FIG. 6 are the same as those shown in FIG.
- FIG. 7 shows a count up and time measurement flow.
- the count-up and time measurement flow shown in FIG. 7 is commonly performed by the grand master device (GM) 10 and the slave device (S1) 20.
- FIG. 8 shows the transmission flow of the DelayReq frame by the slave device (S1) 20.
- the control unit 206 waits for the transmission timing of the DelayReq frame to come (step S201).
- the control unit 206 instructs the transmission unit 209 to transmit the DelayReq frame.
- the transmitting unit 209 transmits the DelayReq frame to the grand master device (GM) 10 (step S203). Further, in parallel with the transmission instruction of the DelayReq frame to the transmission unit 209, the control unit 206 notifies the time management unit 207 and the time measurement unit 208 of transmission of the DelayReq frame.
- the time management unit 207 acquires the current time as the transmission time of the DelayReq frame based on the notification from the control unit 206, and stores the acquired current time in the memory 204 (step S204). Further, based on the notification from the control unit 206, the time measurement unit 208 acquires the current count value of the slave counter 2080 as the count value of the slave counter 2080 at the time of transmission of the DelayReq frame, and stores the acquired count value in the memory 204. It stores (step S204).
- FIG. 9 shows the reception flow of the DelayReq frame and the transmission flow of the DelayResp frame by the grand master device (GM) 10.
- the time management unit 107 acquires the reception time of the DelayReq frame (step S303). Further, the time measuring unit 108 acquires the value of the master counter 1080 at the time of receiving the DelayReq frame (step S303). More specifically, the receiving unit 115 notifies the control unit 106 of the reception of the DelayReq frame. The control unit 106 notifies the time management unit 107 and the time measurement unit 108 of the reception of the DelayReq frame.
- the time management unit 107 acquires the current time based on the notification from the control unit 106, and stores the acquired current time in the memory 104. Further, based on the notification from the control unit 106, the time measurement unit 108 acquires the current count value of the master counter 1080, and stores the acquired count value in the memory 104. Also, the transmission unit 109 generates a DelayResp frame (step S304). More specifically, the control unit 106 instructs the time management unit 107, the time measurement unit 108, and the transmission unit 109 to transmit a DelayResp frame. The time management unit 107 acquires the current time, and notifies the transmission unit 109 of the acquired current time.
- the time measurement unit 108 acquires the current count value of the master counter 1080 and notifies the transmission unit 109 of the acquired count value.
- the transmission unit 109 generates a DelayResp frame, and stores the time notified from the time management unit 107 and the count value notified from the time measurement unit 108 in the generated DelayResp frame. Then, the transmission unit 109 transmits the DelayResp frame generated in step S304 to the slave device (S1) 20 (step S305).
- FIG. 10 shows a reception flow of the DelayResp frame by the slave device (S1) 20.
- the time management unit 207 acquires the reception time of the DelayResp frame (step S403). Further, the time measuring unit 208 acquires the value of the slave counter 2080 at the time of receiving the DelayResp frame (step S403). More specifically, the receiving unit 215 notifies the control unit 206 of the reception of the DelayResp frame. The control unit 206 notifies the time management unit 207 and the time measurement unit 208 of the reception of the DelayResp frame.
- the time management unit 207 acquires the current time based on the notification from the control unit 206, and stores the acquired current time in the memory 204. Further, based on the notification from the control unit 206, the time measuring unit 208 acquires the current count value of the slave counter 2080, and stores the acquired count value in the memory 204.
- the reception unit 215 extracts the transmission time of the DelayResp frame and the value of the master counter 1080 at the time of transmission of the DelayResp frame from the DelayResp frame (step S404). Then, the reception unit 215 stores the extracted transmission time and the value of the master counter 1080 in the memory 204.
- step S404 is to be performed after step S403 in FIG. 10, step S403 and step S404 may be performed in parallel.
- FIG. 11 shows the flow of transmission of Sync frames by the grandmaster apparatus (GM) 10.
- the control unit 106 waits for the transmission timing of the Sync frame to arrive (step S501).
- the control unit 106 instructs the time management unit 107, the time measurement unit 108, and the transmission unit 109 to transmit the Sync frame.
- the time management unit 107 acquires the current time, and notifies the transmission unit 109 of the acquired current time (step S503).
- the time measuring unit 108 acquires the current count value of the master counter 1080, and notifies the transmission unit 109 of the acquired count value (step S503).
- the transmitting unit 109 generates a Sync frame, and stores the time notified from the time management unit 107 and the count value notified from the time measuring unit 108 in the generated Sync frame (step S 504). Then, the transmitting unit 109 transmits the Sync frame to the slave device (S1) 20 (step S505).
- FIG. 12 shows the reception flow of the Sync frame by the slave device (S1) 20.
- the time management unit 207 acquires the reception time of the Sync frame (step S603). Further, the time measuring unit 208 acquires the value (reception count value) of the slave counter 2080 at the time of receiving the Sync frame (step S603). More specifically, the receiving unit 215 notifies the control unit 206 of the reception of the Sync frame. The control unit 206 notifies the time management unit 207 and the time measurement unit 208 of the reception of the Sync frame. The time management unit 207 acquires the current time based on the notification from the control unit 206, and stores the acquired current time in the memory 204.
- step S604 is to be performed after step S603, but step S603 and step S604 may be performed in parallel.
- FIG. 13 shows a time correction flow by the slave device (S1) 20.
- the time management unit 207 waits for a time correction instruction from the control unit 206 (step S701).
- time management unit 207 determines whether average propagation delay D_ave and average count difference C_ave exist in memory 204 (step S703). ). If the average propagation delay D_ave and the average count difference C_ave do not exist in the memory 204 (NO in step S703), the process returns to step S701. If the average propagation delay D_ave and the average count difference C_ave exist in the memory 204 (YES in step S703), the time management unit 207 calculates the relay delay difference ⁇ (step S704).
- the time management unit 207 calculates the relay delay difference ⁇ in accordance with Equation 3 described above.
- the time management unit 207 calculates the propagation delay D_true (step S705). Specifically, the time management unit 207 calculates the propagation delay D_true in accordance with Equation 4 described above.
- the time management unit 207 calculates Offset (N) (step S706). Specifically, the time management unit 207 calculates Offset (N) in accordance with Equation 5 described above.
- the time management unit 207 corrects the time of the slave clock using Offset (N) (step S 707). Specifically, the time management unit 207 corrects the time according to Equation 6 described above.
- the processor 102 illustrated in FIG. 3 and the processor 202 illustrated in FIG. 5 are integrated circuits (ICs) that perform processing.
- the processor 102 and the processor 202 are, respectively, a central processing unit (CPU), a digital signal processor (DSP), and the like.
- the memory 104 shown in FIG. 3 and the memory 204 shown in FIG. 5 are each a RAM (Random Access Memory).
- the auxiliary storage device 103 shown in FIG. 3 and the auxiliary storage device 203 shown in FIG. 5 are respectively a ROM (Read Only Memory), a flash memory, an HDD (Hard Disk Drive) and the like.
- the network interface 112, the network interface 211 shown in FIG. 5, and the network interface 212 each include a receiver for receiving data and a transmitter for transmitting data.
- the network interface 111, the network interface 112, the network interface 211, and the network interface 212 are, for example, a communication chip or a NIC (Network Interface Card).
- the auxiliary storage device 103 also stores an OS (Operating System). Then, at least part of the OS is executed by the processor 102.
- the processor 102 executes a program that implements the functions of the control unit 106, the time management unit 107, the time measurement unit 108, the transmission unit 109, the data arbitration unit 110, and the reception unit 115 while executing at least a part of the OS.
- the processor 102 executes the OS to perform task management, memory management, file management, communication control, and the like.
- the auxiliary storage device 203 also stores an OS (Operating System). Then, at least part of the OS is executed by the processor 202.
- the processor 202 executes a program that implements the functions of the control unit 206, the time management unit 207, the time measurement unit 208, the transmission unit 209, the data arbitration unit 210, and the reception unit 215 while executing at least a part of the OS.
- the processor 202 executes the OS, task management, memory management, file management, communication control, and the like are performed.
- At least one of information, data, a signal value, and a variable value indicating the result of processing of control unit 106, time management unit 107, time measurement unit 108, transmission unit 109, data arbitration unit 110, and reception unit 115 It is stored in the storage device 103, the memory 104, the register in the processor 102 and / or the cache memory.
- the programs for realizing the functions of the control unit 106, the time management unit 107, the time measurement unit 108, the transmission unit 109, the data arbitration unit 110, and the reception unit 115 are magnetic disk, flexible disk, optical disk, compact disk, Blu-ray (registration It may be stored in a portable storage medium such as a trademarked disc, a DVD or the like.
- At least one of information, data, signal value, and variable value indicating the result of processing of control unit 206, time management unit 207, time measurement unit 208, transmission unit 209, data arbitration unit 210, and reception unit 215 It is stored in the storage device 203, the memory 204, the register in the processor 202 and / or the cache memory.
- programs for realizing the functions of the control unit 206, time management unit 207, time measurement unit 208, transmission unit 209, data arbitration unit 210, and reception unit 215 are magnetic disk, flexible disk, optical disk, compact disk, Blu-ray (registration It may be stored in a portable storage medium such as a trademarked disc, a DVD or the like.
- GM grand master device
- IC logic integrated circuit
- GA gate array
- ASIC application specific integrated circuit
- FPGA field-programmable gate array
- slave device (S1) 20 may be realized by a processing circuit such as a logic IC, a GA, an ASIC, or an FPGA.
- processing circuit the upper concept of the processor, the memory, the combination of the processor and the memory, and the processing circuit. That is, the processor, the memory, the combination of the processor and the memory, and the processing circuit are specific examples of the "processing circuit".
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
IEEE1588及びIEEE802.1ASでは、時刻源となるマスタ装置(以下、グランドマスタ装置ともいう)がスレーブ装置に時刻情報が格納されたSyncフレームを送信する。そして、スレーブ装置はSyncフレームを受信するとSyncフレームからマスタ装置の時刻情報を取得する。そして、スレーブ装置は、スレーブ装置の時刻を補正する。これにより。スレーブ装置はマスタ装置に同期することができる。
以下、IEEE1588のプロトコルを図14を用いて説明する。なお、以下の(1)~(9)は図14の(1)~(9)に対応する。
(2)スレーブ装置(S1)はグランドマスタ装置(GM)からSyncフレームを受信すると、Syncフレームの受信時刻のタイムスタンプt2(以下、単に受信時刻t2という)を取得し、受信時刻t2を保持する。また、スレーブ装置(S1)はSyncフレームに格納された送信時刻t1を抽出し、送信時刻t1を保持する。
(3)スレーブ装置(S1)はグランドマスタ装置(GM)に伝搬遅延計測要求フレームであるDelayReqフレームを送信する。この時、スレーブ装置(S1)は、DelayReqフレームの送信時刻のタイムスタンプt3(以下、単に送信時刻t3という)を取得し、送信時刻t3を保持する。
(4)グランドマスタ装置(GM)はスレーブ装置(S1)からDelayReqフレームを受信する。また、グランドマスタ装置(GM)はDelayReqフレームの受信時刻のタイムスタンプt4(以下、単に受信時刻t4という)を取得し、受信時刻t4を保持する。
(5)グランドマスタ装置(GM)は受信時刻t4を伝搬遅延計測応答フレームであるDelayRespフレームに格納し、受信時刻t4が格納されたDelayRespフレームをスレーブ装置(S1)に送信する。図14では、受信時刻t4が格納されたDelayRespフレームをDelayResp(t4)と表記している。
(6)スレーブ装置(S1)はDelayRespフレームに格納された受信時刻t4を抽出し、受信時刻t4を保持する。
(7)スレーブ装置(S1)は保持している送信時刻t1、受信時刻t2、送信時刻t3及び受信時刻t4を用いてグランドマスタ装置(GM)とスレーブ装置(S1)との間の伝搬遅延時間を以下にて算出する。
伝搬遅延時間:D={(t4-t1)+(t2-t3)}/2
(8)グランドマスタ装置(GM)はある時刻で、送信開始時刻のタイムスタンプt_tx(以下、単に送信開始時刻t_txという)を取得し、送信開始時刻t_txをSyncフレームに格納してスレーブ装置(S1)に送信する。図14では、送信開始時刻t_txが格納されたSyncフレームをSync(t_tx)と表記している。
(9)スレーブ装置(S1)はSync(t_tx)を受信するとSync(t_tx)の受信時刻のタイムスタンプt_rx(以下、単に受信時刻t_rxという)を取得し、受信時刻t_rxを保持する。更に、スレーブ装置(S1)は保持している送信開始時刻t_tx、受信時刻t_rx、及び上記の(7)で算出した伝搬遅延時間Dから、以下にて、グランドマスタ装置(GM)とスレーブ装置(S1)との時刻差を算出し、算出した時刻差を用いてスレーブ装置(S1)の時刻を補正する。
グランドマスタ装置(GM)との時刻差:Offset=t_tx+D-t_rx
ネットワークに汎用ハブ(HUB)が混在している場合は、汎用ハブ(HUB)のファームウェアの処理時間の揺らぎ、送信待ちにより、汎用ハブ(HUB)での中継遅延時間が一定とならない。このため、スレーブ装置(S1)は正確に伝搬遅延時間を計測することができない。この結果、汎用ハブ(HUB)を介してグランドマスタ装置(GM)接続されたスレーブ装置(S1)はグランドマスタ装置(GM)との時刻差を正確に算出することができない。
しかしながら、この方式では、図15のように、汎用ハブ(HBU)での中継時間の揺らぎにより、グランドマスタ装置(GM)がSyncフレームを送信し、スレーブ装置(S1)がSyncフレームを受信するまでの伝搬遅延時間が予め算出した伝搬遅延時間の平均値と大幅に異なる場合がある。この場合には、スレーブ装置(S1)が補正した時刻はグランドマスタ装置(GM)の時刻から大幅にずれる。
以下、図16を用いて、従来の時刻同期方式の課題を説明する。なお、以下の(1)~(6)は、図16の(1)~(6)に対応する。
(2)グランドマスタ装置(GM)は、時刻11でタイムスタンプt_sync(=11)をSyncフレームに格納し、t_sync(=11)が格納されたSyncフレームをスレーブ装置(S1)に送信する。
(3)汎用ハブ(HUB)でSyncフレームを中継したときの中継遅延時間は3(RT=3)であるとする。
(4)スレーブ装置(S1)は、時刻t_rx=10でSyncフレームを受信する。また、スレーブ装置(S1)は、タイムスタンプt_rx(=10)を取得する。
(5)スレーブ装置(S1)は、タイムスタンプt_sync(=11)、タイムスタンプt_rx(=10)及び最小伝搬遅延時間D_min(=3)を使用してグランドマスタ装置(GM)との時刻差(Offset_GM)を以下にて算出する。
Offset_GM=t_sync+D_min-t_rx
=11+3-10=4
(6)スレーブ装置(S1)は、時刻11で以下にてスレーブ装置(S1)の時刻補正を行う。
Time_c=Time+Offset_GM=11+4=15
このように、従来の時刻同期方式によれば、中継装置である汎用ハブ(HUB)の中継遅延が一定でない場合は、正確な時刻同期を実現することができないという課題がある。
中継遅延が一定でない中継装置を介して接続されるマスタ装置とスレーブ装置とを有し、
前記マスタ装置は、
フリーランカウンタであるマスタカウンタと、
時刻同期のための時刻同期フレームを送信するタイミングで、現在時刻を前記時刻同期フレームの送信時刻として取得し、前記マスタカウンタのカウント値を送信カウント値として取得し、前記送信時刻と前記送信カウント値とを前記時刻同期フレームに格納し、前記時刻同期フレームを前記スレーブ装置に送信する送信部とを有し、
前記スレーブ装置は、
フリーランカウンタであるスレーブカウンタと、
前記時刻同期フレームを受信する受信部と、
前記時刻同期フレームの受信時刻と、前記受信時刻における前記スレーブカウンタのカウント値である受信カウント値とを取得する取得部と、
前記送信時刻と前記送信カウント値と前記受信時刻と前記受信カウント値と、過去の計測から得られた伝搬遅延の値である計測伝搬遅延値と、前記計測伝搬遅延値に対応する前記マスタカウンタのカウント値と前記スレーブカウンタのカウント値とから求められる遅延カウント差とを用いて、前記スレーブ装置の時刻を補正する時刻補正部とを有する。
***概要の説明***
図1は、本実施の形態に係る通信システムの動作概要を示す。
本実施の形態に係る通信システムは、グランドマスタ装置(GM)10、スレーブ装置(S1)20及び汎用ハブ(HUB)30で構成される。
グランドマスタ装置(GM)10は、マスタ装置である。スレーブ装置(S1)20はスレーブ装置である。汎用ハブ(HUB)30は中継装置である。
グランドマスタ装置(GM)10とスレーブ装置(S1)20は汎用ハブ(HUB)30を介して接続されている。
汎用ハブ(HUB)30は、時刻同期非対応のスイッチングハブであり、図15及び図16で示した汎用ハブ(HUB)と同じである。つまり、汎用ハブ(HUB)30の中継遅延は一定ではない。図1では、汎用ハブ(HUB)30の中継遅延が、IEEE1588またはIEEE802.1ASで得られた平均中継遅延から+Δだけ変動していることが示されている。このため、IEEE1588またはIEEE802.1ASで得られた平均時間差(Offset ave)に中継遅延の変動幅+Δを加算して、オフセット値(Offset(N))を得る必要がある。
また、スレーブ装置(S1)20は、グランドマスタ装置(GM)10から時刻が配信されるとスレーブ時計の値を補正する。
マスタカウンタはグランドマスタ装置(GM)10の起動直後にカウントアップを開始する。同様に、スレーブカウンタはスレーブ装置(S1)20の起動直後にカウントアップを開始する。マスタカウンタ及びスレーブカウンタは通信プロトコルによってカウンタ値は変更されない。グランドマスタ装置(GM)10がリセットされるとマスタカウンタもリセットされる。スレーブ装置(S1)20がリセットされるとスレーブカウンタもリセットされる。
グランドマスタ装置(GM)10は、時刻同期フレームであるSyncフレームをスレーブ装置(S1)20に送信する。グランドマスタ装置(GM)10はSyncフレームの送信時にマスタカウンタのカウント値とマスタ時計の値を取得し、取得したマスタカウンタのカウント値とマスタ時計の値をSyncフレームに格納する。そして、マスタカウンタのカウント値とマスタ時計の値が格納されたSyncフレームをスレーブ装置(S1)20に送信する。図1では、マスタカウンタのカウント値として「t3(n)」がSyncフレームに格納され、マスタ時計の値として「t sync(N)」がSyncフレームに格納されている。また、スレーブ装置(S1)20は、Syncフレームの受信時にスレーブカウンタのカウント値とスレーブ時計の値を取得する。図1では、スレーブ装置(S1)20がスレーブカウンタのカウント値として「t4(N)」を取得し、スレーブ時計の値として「t rx(N)」を取得している。
このように、本実施の形態に係る時刻同期フレームであるSyncフレームには、マスタカウンタのカウント値が含まれており、図16に示すSyncフレームとは異なる。
また、図1では図示を省略しているが、図16と同様に、スレーブ装置(S1)20は伝搬遅延計測要求であるDelayReqフレームをグランドマスタ装置(GM)10に送信する。スレーブ装置(S1)20は、DelayReqフレームの送信時点のスレーブカウンタのカウント値とスレーブ時計の値を保持する。グランドマスタ装置(GM)10はDelayReqフレームの受信時点のマスタカウンタのカウント値とマスタ時計の値を保持する。また、グランドマスタ装置(GM)10は、伝搬遅延計測応答であるDelayRespフレームをスレーブ装置(S1)20に送信する。グランドマスタ装置(GM)10は、DelayRespフレームの送信時点のマスタカウンタのカウント値とマスタ時計の値をDelayRespフレームに格納する。スレーブ装置(S1)20は、DelayRespフレームの受信時点のスレーブカウンタのカウント値とスレーブ時計の値を保持する。また、スレーブ装置(S1)20は、DelayRespフレームに格納されたマスタカウンタのカウント値とマスタ時計の値を保持する。
このように、本実施の形態では、DelayReqフレーム及びDelayRespフレームも図16に示すDelayReqフレーム及びDelayRespフレームとは異なる。
なお、以下の(1)~(5)は図2の(1)~(5)に対応する。
スレーブ装置(S1)20は、伝搬遅延計測において、伝搬遅延時間とスレーブカウンタのカウント値とマスタカウンタのカウント値との差を計測する。そして、スレーブ装置(S1)20は、過去の複数の伝搬遅延計測から、グランドマスタ装置(GM)10とスレーブ装置(S1)20との間の伝搬遅延時間の平均値(以下、平均伝搬遅延D_aveという)を得る。また、スレーブ装置(S1)20は、過去の複数の伝搬遅延計測から、スレーブカウンタのカウント値とマスタカウンタのカウント値の差の平均値(以下、平均カウント差C_aveという)を得る。
ここでは、以下の平均伝搬遅延D_aveと平均カウント差C_aveが得られたとする。なお、平均伝搬遅延D_aveは、過去の伝搬遅延計測から得られた伝搬遅延の値であり、計測伝搬遅延値に相当する。また、平均カウント差C_aveは、平均伝搬遅延D_aveに対応するマスタカウンタのカウント値とスレーブカウンタのカウント値との間の差であり、遅延カウント差に相当する。
本実施の形態では、計算を単純にするために、スレーブ装置(S1)20とグランドマスタ装置(GM)10との間のクロック周波数偏差は無視できるほど小さいものとし、RCGM_S1=1と仮定する。クロック比の算出方法は、IEEE802.1ASのものと同じであるため、ここではクロック比の算出方法の説明は省略する。また、グラウンドマスタ装置(GM)10のクロック周波数を1と仮定する。
なお、以下では、Syncフレームに格納されるマスタ時計のタイムスタンプT_syncを送信時刻T_syncともいう。また、Syncフレームに格納されるマスタカウンタのタイムスタンプt3を送信カウント値t3ともいう。
なお、以下では、Syncフレームの受信時点でのスレーブ時計のタイムスタンプT_RXを受信時刻T_RXともいう。また、Syncフレームの受信時点でのスレーブカウンタのタイムスタンプt4を受信カウント値t4ともいう。
(a)まず、スレーブ装置(S1)20は、送信カウント値t3(=1)と受信カウント値t4(=9)との差から平均カウント差C_ave(=6)を減算して、中継遅延差Δを得る。なお、中継遅延差Δは、Syncフレームの中継の際の汎用ハブ(HUB)30による中継遅延の値と平均伝搬遅延D_aveに含まれる中継遅延の値との差である。
Δ=t4×RCGM_S1-t3-C_ave=(9-1-6)=2 式3
(b)次に、スレーブ装置(S1)20は、Syncフレームの送信での伝搬遅延D_trueを以下にて算出する。
D_true=D_ave+Δ*1/グランドマスタ装置のクロック周波数=3+2=5 式4
(a)スレーブ装置(S1)20は、送信時刻T_sync(=11)と、伝搬遅延D_true(=5)と、受信時刻T_RX(=26)を用いて、以下に示すようにOffset(N)を算出する。
Offset(N)=T_sync+D_true-T_RX
=(11+5-26)=-10 式5
(b)また、スレーブ装置(S1)20は、Offset(N)の値を用いて時刻27のタイミングでスレーブ時計の時刻を以下にて補正する。
27+Offset(N)=27-10=17 式6
以上の処理により、グランドマスタ装置(GM)10のマスタ時計の時刻とスレーブ装置(S1)20のスレーブ時計の時刻が同期する。
図3は、本実施の形態に係るグランドマスタ装置(GM)10のハードウェア構成例を示す。
図4は、本実施の形態に係るグランドマスタ装置(GM)10の機能構成例を示す。
本実施の形態に係るグランドマスタ装置(GM)10は、コンピュータである。
また、図4に示すように、グランドマスタ装置(GM)10は、機能構成として、制御部106、時刻管理部107、時間計測部108、送信部109、データ調停部110及び受信部115を備える。
補助記憶装置103には、制御部106、時刻管理部107、時間計測部108、送信部109、データ調停部110及び受信部115の機能を実現するプログラムが記憶されている。
これらプログラムは補助記憶装置103からメモリ104にロードされる。また、プロセッサ102がこれらプログラムをメモリ104から読み出し、これらプログラムを実行する。そして、プロセッサ102は、後述する制御部106、時刻管理部107、時間計測部108、送信部109、データ調停部110及び受信部115の動作を行う。
図3では、プロセッサ102が、制御部106、時刻管理部107、時間計測部108、送信部109、データ調停部110及び受信部115の機能を実現するプログラムを実行している状態を模式的に表している。
入力インタフェース101は、グランドマスタ装置(GM)10のユーザが各種指示を入力するために用いられる。
また、メモリ104には、前述の送信時刻、送信カウント値等が格納される。
出力インタフェース105は、グランドマスタ装置(GM)10の外部記憶媒体にデータを出力するために用いられる。
ネットワークインタフェース111は、ネットワークポート113と時刻管理部107、時間計測部108又はデータ調停部110との間のフレームの転送を制御する。
ネットワークインタフェース112は、ネットワークポート114と時刻管理部107、時間計測部108又はデータ調停部110との間のフレームの転送を制御する。
ネットワークポート113及びネットワークポート114は、ネットワークとの物理的な接続口である。
具体的には、制御部106は、受信部115がDelayReqフレームを受信した際に、DelayReqフレームの受信を時刻管理部107及び時間計測部108に通知する。
また、制御部106は、DelayRespフレームの送信を時刻管理部107、時間計測部108及び送信部109に指示する。
制御部106は、受信部115によりDelayReqフレームの受信が通知された場合に、時刻管理部107、時間計測部108及び送信部109にDelayRespフレームの送信を指示する。
また、制御部106は、Syncフレームの送信を、時刻管理部107、時間計測部108及び送信部109に指示する。制御部106は、伝搬遅延計測(図16の(1)~(6)の手順)の実施回数が設定値を超えた場合に、時刻管理部107、時間計測部108及び送信部109にSyncフレームの送信を指示する。なお、制御部106は、Syncフレームの送信周期をカウントし、指定された周期で時刻管理部107、時間計測部108及び送信部109にSyncフレームの送信を指示する。
例えば、マスタカウンタ1080の動作クロックが125MHzの場合は、マスタカウンタ1080のカウントアップごとに、時刻管理部107は、8ナノ秒(1/125MHz=8ns)単位で時刻を更新する。
また、時刻管理部107は、制御部106からDelayReqフレームの受信が通知された場合に、現在時刻を取得し、取得した現在時刻をメモリ104に格納する。
また、時刻管理部107は、制御部106からDelayRespフレームの送信が指示された際に現在時刻を取得し、取得した現在時刻を送信部109に通知する。
また、時刻管理部107は、制御部106からSyncフレームの送信が指示された際に現在時刻を取得し、取得した現在時刻を送信部109に通知する。
時間計測部108は、マスタカウンタ1080がカウントアップする度に、時刻管理部107にマスタカウンタ1080のカウントアップを通知する。
また、時間計測部108は、制御部106からDelayReqフレームの受信が通知された場合に、マスタカウンタ1080の現在のカウント値を取得し、取得したカウント値をメモリ104に格納する。
また、時間計測部108は、制御部106からDelayRespフレームの送信が指示された際にマスタカウンタ1080の現在のカウント値を取得し、取得したカウント値を送信部109に通知する。
また、時間計測部108は、制御部106からSyncフレームの送信が指示された際にマスタカウンタ1080の現在のカウント値を取得し、取得したカウント値を送信部109に通知する。
また、送信部109は、制御部106からSyncフレームの送信が指示された場合に、Syncフレームを生成する。また、送信部109は、時刻管理部107から通知された現在時刻をSyncフレームに格納する。更に、送信部109は、時間計測部108から通知された現在のカウント値をSyncフレームに格納する。そして、送信部109は、現在時刻と現在のカウント値が格納されたSyncフレームをスレーブ装置(S1)20に送信する。より具体的には、送信部109は、Syncフレームをデータ調停部110に出力する。
なお、Syncフレームに格納される現在時刻は前述の送信時刻である。また、Syncフレームに格納される現在のカウント値は前述の送信カウント値である。
そして、データ調停部110は、受信された通信フレームがグランドマスタ装置(GM)10宛ての通信フレームである場合は、データ調停部110は、当該通信フレームを受信部115に転送する。例えば、データ調停部110は、受信された通信フレームがDelayReqフレームであれば、DelayReqフレームを受信部115に転送する。
一方、受信された通信フレームが他の装置宛ての通信フレームである場合は、データ調停部110は、中継処理を行う。
また、データ調停部110は、送信部109から出力されたDelayRespフレーム及びSyncフレームを、ネットワークインタフェース111又はネットワークインタフェース112に出力する。
また、受信部115は、DelayReqフレームを受信した場合に、制御部106にDelayReqフレームの受信を通知する。
図6は、本実施の形態に係るスレーブ装置(S1)20の機能構成例を示す。
本実施の形態に係るスレーブ装置(S1)20は、コンピュータである。
また、図6に示すように、スレーブ装置(S1)20は、機能構成として、制御部206、時刻管理部207、時間計測部208、送信部209、データ調停部210及び受信部215を備える。
補助記憶装置203には、制御部206、時刻管理部207、時間計測部208、送信部209、データ調停部210及び受信部215の機能を実現するプログラムが記憶されている。
これらプログラムは補助記憶装置203からメモリ204にロードされる。また、プロセッサ202がこれらプログラムをメモリ204から読み出し、これらプログラムを実行する。そして、プロセッサ202は、後述する制御部206、時刻管理部207、時間計測部208、送信部209、データ調停部210及び受信部215の動作を行う。
図5では、プロセッサ202が、制御部206、時刻管理部207、時間計測部208、送信部209、データ調停部210及び受信部215の機能を実現するプログラムを実行している状態を模式的に表している。
入力インタフェース201は、スレーブ装置(S1)20のユーザが各種指示を入力するために用いられる。
また、メモリ204には、前述の送信時刻、送信カウント値、受信時刻、受信カウント値、平均カウント差C_ave、平均伝搬遅延D_ave等が格納される。
出力インタフェース205は、スレーブ装置(S1)20の外部記憶媒体にデータを出力するために用いられる。
ネットワークインタフェース211は、ネットワークポート213と時刻管理部207、時間計測部208又はデータ調停部210との間のフレームの転送を制御する。
ネットワークインタフェース212は、ネットワークポート214と時刻管理部207、時間計測部208又はデータ調停部210との間のフレームの転送を制御する。
ネットワークポート213及びネットワークポート214は、ネットワークとの物理的な接続口である。
具体的には、制御部206は、DelayReqフレームの送信を送信部209に指示する。また、制御部206は、DelayReqフレームの送信を時刻管理部207及び時間計測部208に通知する。
また、制御部206は、受信部215がDelayRespフレームを受信した際に、DelayRespフレームの受信を時刻管理部207及び時間計測部208に通知する。
更に、制御部206は、受信部215がSyncフレームを受信した際に、Syncフレームの受信を時刻管理部207及び時間計測部208に通知する。
また、制御部206は、時刻管理部207に時刻補正の指示を行う。
例えば、スレーブカウンタ2080の動作クロックが125MHzの場合は、スレーブカウンタ2080のカウントアップごとに、時刻管理部207は、8ナノ秒(1/125MHz=8ns)単位で時刻を更新する。
また、時刻管理部207は、制御部206からDelayReqフレームの送信が通知された際に現在時刻を取得し、取得した現在時刻をメモリ204に格納する。
更に、時刻管理部207は、制御部206からDelayRespフレームの受信が通知された際に現在時刻を取得し、取得した現在時刻をメモリ204に格納する。
また、時刻管理部207は、制御部206からSyncフレームの受信が通知された際に現在時刻を取得し、取得した現在時刻をメモリ204に格納する。Syncフレームの受信時の現在時刻は前述の受信時刻である。
また、時刻管理部207は、制御部206から時刻補正が指示された場合に、スレーブ時計の時刻を補正する。
時刻管理部207は、受信部215により取得された送信時刻と送信カウント値と、時間計測部208により取得された受信カウント値と、受信時刻と、計測伝搬遅延値である平均伝搬遅延D_aveと、遅延カウント差である平均カウント差C_aveとを用いて、スレーブ時計の時刻を補正する。具体的には、時刻管理部207は、前述の式3に基づき中継遅延差Δを算出し、前述の式4に基づき伝搬遅延D_trueを算出する。また、時刻管理部207は、前述の式5に基づきOffset(N)を算出する。最終的に、時刻管理部207は前述の式6に基づきスレーブ時計の時刻を補正する。
時刻管理部207は取得部及び時刻補正部に相当する。
時間計測部208は、スレーブカウンタ2080がカウントアップする度に、時刻管理部207にスレーブカウンタ2080のカウントアップを通知する。
また、時間計測部208は、制御部206からDelayReqフレームの送信が通知された際にスレーブカウンタ2080の現在のカウント値を取得し、取得したカウント値をメモリ204に格納する。
更に、時間計測部208は、制御部206からDelayRespフレームの受信が通知された際にスレーブカウンタ2080の現在のカウント値を取得し、取得したカウント値をメモリ204に格納する。
また、時間計測部208は、制御部206からSyncフレームの受信が通知された際にスレーブカウンタ2080の現在のカウント値を取得し、取得したカウント値をメモリ204に格納する。Syncフレームの受信時のカウント値は前述の受信カウント値である。
時間計測部208は時刻管理部207とともに取得部に相当する。
そして、データ調停部210は、受信された通信フレームがスレーブ装置(S1)20宛ての通信フレームである場合は、データ調停部210は、当該通信フレームを受信部215に転送する。例えば、データ調停部110は、受信された通信フレームがDelayRespフレームであれば、DelayRespフレームを受信部115に転送する。また、データ調停部110は、受信された通信フレームがSyncフレームであれば、Syncフレームを受信部115に転送する。
一方、受信された通信フレームが他の装置宛ての通信フレームである場合は、データ調停部210は、中継処理を行う。
また、データ調停部210は、送信部209から出力されたDelayReqフレームを、ネットワークインタフェース211又はネットワークインタフェース212に出力する。
また、受信部215は、DelayRespフレームを受信した場合に、制御部206にDelayRespフレームの受信を通知する。
更に、受信部215は、グランドマスタ装置(GM)10から送信されたSyncフレームを受信する。つまり、受信部115は、データ調停部210から転送されたSyncフレームを受信する。受信部215は、受信したSyncフレームから、グランドマスタ装置(GM)10により格納された時刻(送信時刻)及びカウント値(送信カウント値)を取得する。そして、受信部215は、取得した送信時刻及び送信カウント値をメモリ204に格納する。
また、受信部215は、Syncフレームを受信した場合に、制御部206にSyncフレームの受信を通知する。
図7はカウントアップ及び時刻計測フローを示す。
図7に示すカウントアップ及び時刻計測フローは、グランドマスタ装置(GM)10及びスレーブ装置(S1)20で共通に行われる。
前述したように、マスタカウンタ1080の動作クロックが125MHzの場合は、マスタカウンタ1080のカウントアップごとに、時刻管理部107は、8ナノ秒(1/125MHz=8ns)単位で時刻を更新する。
前述したように、スレーブカウンタ2080の動作クロックが125MHzの場合は、スレーブカウンタ2080のカウントアップごとに、時刻管理部207は、8ナノ秒(1/125MHz=8ns)単位で時刻を更新する。
DelayReqフレームの送信タイミングが到来すると(ステップS202でYES)、制御部206は送信部209にDelayReqフレームの送信を指示する。送信部209は、DelayReqフレームをグランドマスタ装置(GM)10に送信する(ステップS203)。
また、制御部206は、送信部209へのDelayReqフレームの送信指示に並行して時刻管理部207及び時間計測部208にDelayReqフレームの送信を通知する。時刻管理部207は、制御部206からの通知に基づき、現在時刻をDelayReqフレームの送信時刻として取得し、取得した現在時刻をメモリ204に格納する(ステップS204)。また、時間計測部208は、制御部206からの通知に基づき、スレーブカウンタ2080の現在のカウント値をDelayReqフレームの送信時のスレーブカウンタ2080のカウント値として取得し、取得したカウント値をメモリ204に格納する(ステップS204)。
また、送信部109がDelayRespフレームを生成する(ステップS304)。より具体的には、制御部106は時刻管理部107、時間計測部108及び送信部109にDelayRespフレームの送信を指示する。時刻管理部107は現在時刻を取得し、取得した現在時刻を送信部109に通知する。時間計測部108はマスタカウンタ1080の現在のカウント値を取得し、取得したカウント値を送信部109に通知する。送信部109は、DelayRespフレームを生成し、生成したDelayRespフレームに、時刻管理部107から通知された時刻及び時間計測部108から通知されたカウント値を格納する。
そして、送信部109は、ステップS304で生成したDelayRespフレームをスレーブ装置(S1)20に送信する(ステップS305)。
また、受信部215は、DelayRespフレームから、DelayRespフレームの送信時刻とDelayRespフレームの送信時のマスタカウンタ1080の値を抽出する(ステップS404)。そして、受信部215は、抽出した送信時刻とマスタカウンタ1080の値をメモリ204に格納する。
なお、図10では、ステップS403の後にステップS404が行われることになっているが、ステップS403とステップS404とが並行して行われてもよい。
Syncフレームの送信タイミングが到来すると(ステップS502でYES)、制御部106は時刻管理部107、時間計測部108及び送信部109にSyncフレームの送信を指示する。時刻管理部107は、現在時刻を取得し、取得した現在時刻を送信部109に通知する(ステップS503)。また、時間計測部108は、マスタカウンタ1080の現在のカウント値を取得し、取得したカウント値を送信部109に通知する(ステップS503)。
送信部109は、Syncフレームを生成し、生成したSyncフレームに、時刻管理部107から通知された時刻及び時間計測部108から通知されたカウント値を格納する(ステップS504)。
そして、送信部109は、Syncフレームをスレーブ装置(S1)20に送信する(ステップS505)。
また、受信部215は、Syncフレームから、Syncフレームの送信時刻とSyncフレームの送信時のマスタカウンタ1080の値(送信カウント値)を抽出する(ステップS604)。そして、受信部215は、抽出した送信時刻とマスタカウンタ1080の値をメモリ204に格納する。
なお、図12では、ステップS603の後にステップS604が行われることになっているが、ステップS603とステップS604とが並行して行われてもよい。
制御部206から時刻補正が指示された場合(ステップS702でYES)に、時刻管理部207は、メモリ204に平均伝搬遅延D_aveと平均カウント差C_aveとが存在するか否かを判定する(ステップS703)。
メモリ204に平均伝搬遅延D_aveと平均カウント差C_aveが存在していなければ(ステップS703でNO)、処理はステップS701に戻る。
メモリ204に平均伝搬遅延D_aveと平均カウント差C_aveが存在していれば(ステップS703でYES)、時刻管理部207は、中継遅延差Δを算出する(ステップS704)。具体的には、時刻管理部207は、前述の式3に従って、中継遅延差Δを算出する。
次に、時刻管理部207は、伝搬遅延D_trueを算出する(ステップS705)。具体的には、時刻管理部207は、前述の式4に従って、伝搬遅延D_trueを算出する。
次に、時刻管理部207は、Offset(N)を算出する(ステップS706)。具体的には、時刻管理部207は、前述の式5に従って、Offset(N)を算出する。
最後に、時刻管理部207は、Offset(N)を用いてスレーブ時計の時刻を補正する(ステップS707)。具体的には、時刻管理部207は、前述の式6に従って、時刻を補正する。
以上のように、本実施の形態によれば、伝送路での遅延時間の揺らぎにより発生するグランドマスタ装置(GM)10とスレーブ装置(S1)20との間の時刻差を補正することが可能である。つまり、本実施の形態によれば、時刻同期非対応のスイッチングハブをネットワークに混在させても、グランドマスタ装置(GM)10とスレーブ装置(S1)20との間で正確な時刻同期を実現することができる。
最後に、ハードウェア構成の補足説明を行う。
図3に示すプロセッサ102及び図5に示すプロセッサ202は、それぞれ、プロセッシングを行うIC(Integrated Circuit)である。
プロセッサ102及びプロセッサ202は、それぞれ、CPU(Central Processing Unit)、DSP(Digital Signal Processor)等である。
図3に示すメモリ104及び図5に示すメモリ204は、それぞれ、RAM(Random Access Memory)である。
図3に示す補助記憶装置103及び図5に示す補助記憶装置203は、それぞれ、ROM(Read Only Memory)、フラッシュメモリ、HDD(Hard Disk Drive)等である。
図3に示すネットワークインタフェース111、ネットワークインタフェース112、図5に示すネットワークインタフェース211、ネットワークインタフェース212は、それぞれ、データを受信するレシーバー及びデータを送信するトランスミッターを含む。
ネットワークインタフェース111、ネットワークインタフェース112、ネットワークインタフェース211、ネットワークインタフェース212は、それぞれ、例えば、通信チップ又はNIC(Network Interface Card)である。
そして、OSの少なくとも一部がプロセッサ102により実行される。
プロセッサ102はOSの少なくとも一部を実行しながら、制御部106、時刻管理部107、時間計測部108、送信部109、データ調停部110及び受信部115の機能を実現するプログラムを実行する。
プロセッサ102がOSを実行することで、タスク管理、メモリ管理、ファイル管理、通信制御等が行われる。
そして、OSの少なくとも一部がプロセッサ202により実行される。
プロセッサ202はOSの少なくとも一部を実行しながら、制御部206、時刻管理部207、時間計測部208、送信部209、データ調停部210及び受信部215の機能を実現するプログラムを実行する。
プロセッサ202がOSを実行することで、タスク管理、メモリ管理、ファイル管理、通信制御等が行われる。
また、制御部106、時刻管理部107、時間計測部108、送信部109、データ調停部110及び受信部115の機能を実現するプログラムは、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ブルーレイ(登録商標)ディスク、DVD等の可搬記憶媒体に記憶されてもよい。
また、制御部206、時刻管理部207、時間計測部208、送信部209、データ調停部210及び受信部215の機能を実現するプログラムは、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ブルーレイ(登録商標)ディスク、DVD等の可搬記憶媒体に記憶されてもよい。
また、グランドマスタ装置(GM)10は、ロジックIC(Integrated Circuit)、GA(Gate Array)、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)といった処理回路により実現されてもよい。
また、スレーブ装置(S1)20は、ロジックIC、GA、ASIC、FPGAといった処理回路により実現されてもよい。
つまり、プロセッサと、メモリと、プロセッサとメモリの組合せと、処理回路とは、それぞれ「プロセッシングサーキットリー」の具体例である。
Claims (15)
- 中継遅延が一定でない中継装置を介して接続されるマスタ装置とスレーブ装置とを有し、
前記マスタ装置は、
フリーランカウンタであるマスタカウンタと、
時刻同期のための時刻同期フレームを送信するタイミングで、現在時刻を前記時刻同期フレームの送信時刻として取得し、前記マスタカウンタのカウント値を送信カウント値として取得し、前記送信時刻と前記送信カウント値とを前記時刻同期フレームに格納し、前記時刻同期フレームを前記スレーブ装置に送信する送信部とを有し、
前記スレーブ装置は、
フリーランカウンタであるスレーブカウンタと、
前記時刻同期フレームを受信する受信部と、
前記時刻同期フレームの受信時刻と、前記受信時刻における前記スレーブカウンタのカウント値である受信カウント値とを取得する取得部と、
前記送信時刻と前記送信カウント値と前記受信時刻と前記受信カウント値と、過去の計測から得られた伝搬遅延の値である計測伝搬遅延値と、前記計測伝搬遅延値に対応する前記マスタカウンタのカウント値と前記スレーブカウンタのカウント値とから求められる遅延カウント差とを用いて、前記スレーブ装置の時刻を補正する時刻補正部とを有する通信システム。 - 前記時刻補正部は、
前記送信カウント値と前記受信カウント値と前記遅延カウント差とに基づき、前記時刻同期フレームの中継の際の前記中継装置による中継遅延の値と前記計測伝搬遅延値に含まれる中継遅延の値との差を中継遅延差として算出し、
算出した前記中継遅延差を用いて、前記スレーブ装置の時刻を補正する請求項1に記載の通信システム。 - 前記時刻補正部は、
前記中継遅延差と前記計測伝搬遅延値とを用いて、前記時刻同期フレームの送信での伝搬遅延の値を算出し、
算出した前記時刻同期フレームの送信での伝搬遅延の値を用いて、前記スレーブ装置の時刻を補正する請求項2に記載の通信システム。 - 前記時刻補正部は、
算出した前記時刻同期フレームの送信での伝搬遅延の値と前記送信時刻と前記受信時刻とを用いて、前記マスタ装置の時刻と前記スレーブ装置の時刻との差をオフセット値として算出し、
算出した前記オフセット値を用いて、前記スレーブ装置の時刻を補正する請求項1に記載の通信システム。 - 前記時刻補正部は、
前記送信カウント値と前記受信カウント値と前記遅延カウント差と、前記マスタ装置のクロック周波数と前記スレーブ装置のクロック周波数とに基づき、前記中継遅延差を算出する請求項2に記載の通信システム。 - 前記時刻補正部は、
前記計測伝搬遅延値として、過去の複数の計測において得られた複数の伝搬遅延の値の平均値を用いて、前記スレーブ装置の時刻を補正する請求項1に記載の通信システム。 - 前記時刻補正部は、
前記マスタ装置との間でフレームを送受信して計測された前記複数の伝搬遅延の値の平均値を、前記計測伝搬遅延値として用いる請求項6に記載の通信システム。 - 中継遅延が一定でない中継装置を介してスレーブ装置と接続されるマスタ装置であって、
フリーランカウンタであるマスタカウンタと、
時刻同期のための時刻同期フレームを送信するタイミングで、現在時刻を前記時刻同期フレームの送信時刻として取得し、前記マスタカウンタのカウント値を送信カウント値として取得し、前記送信時刻と前記送信カウント値とを前記時刻同期フレームに格納し、前記送信時刻と前記送信カウント値とが格納された前記時刻同期フレームを前記スレーブ装置に送信する送信部とを有するマスタ装置。 - フリーランカウンタであるマスタカウンタを有し、時刻同期のための時刻同期フレームを送信するタイミングで、現在時刻を前記時刻同期フレームの送信時刻として取得し、前記マスタカウンタのカウント値を送信カウント値として取得し、前記送信時刻と前記送信カウント値とを前記時刻同期フレームに格納し、前記送信時刻と前記送信カウント値とが格納された前記時刻同期フレームを送信するマスタ装置と、
中継遅延が一定でない中継装置を介して、接続されているスレーブ装置であって、
フリーランカウンタであるスレーブカウンタと、
前記マスタ装置から送信された前記時刻同期フレームを受信する受信部と、
前記時刻同期フレームの受信時刻と、前記受信時刻における前記スレーブカウンタのカウント値である受信カウント値とを取得する取得部と、
前記送信時刻と前記送信カウント値と前記受信時刻と前記受信カウント値と、過去の計測から得られた伝搬遅延の値である計測伝搬遅延値と、前記計測伝搬遅延値に対応する前記マスタカウンタのカウント値と前記スレーブカウンタのカウント値とから求められる遅延カウント差とを用いて、前記スレーブ装置の時刻を補正する時刻補正部とを有するスレーブ装置。 - 前記時刻補正部は、
前記送信カウント値と前記受信カウント値と前記遅延カウント差とに基づき、前記時刻同期フレームの中継の際の前記中継装置による中継遅延の値と前記計測伝搬遅延値に含まれる中継遅延の値との差を中継遅延差として算出し、
算出した前記中継遅延差を用いて、前記スレーブ装置の時刻を補正する請求項9に記載のスレーブ装置。 - 前記時刻補正部は、
前記中継遅延差と前記計測伝搬遅延値とを用いて、前記時刻同期フレームの送信での伝搬遅延の値を算出し、
算出した前記時刻同期フレームの送信での伝搬遅延の値を用いて、前記スレーブ装置の時刻を補正する請求項10に記載のスレーブ装置。 - 前記時刻補正部は、
算出した前記時刻同期フレームの送信での伝搬遅延の値と前記送信時刻と前記受信時刻とを用いて、前記マスタ装置の時刻と前記スレーブ装置の時刻との差をオフセット値として算出し、
算出した前記オフセット値を用いて、前記スレーブ装置の時刻を補正する請求項9に記載のスレーブ装置。 - 前記時刻補正部は、
前記送信カウント値と前記受信カウント値と前記遅延カウント差と、前記マスタ装置のクロック周波数と前記スレーブ装置のクロック周波数とに基づき、前記中継遅延差を算出する請求項10に記載のスレーブ装置。 - 前記時刻補正部は、
前記計測伝搬遅延値として、過去の複数の計測において得られた複数の伝搬遅延の値の平均値を用いて、前記スレーブ装置の時刻を補正する請求項9に記載のスレーブ装置。 - 前記時刻補正部は、
前記マスタ装置との間でフレームを送受信して計測された前記複数の伝搬遅延の値の平均値を、前記計測伝搬遅延値として用いる請求項14に記載のスレーブ装置。
Priority Applications (7)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020197037223A KR102103698B1 (ko) | 2017-06-27 | 2017-06-27 | 통신 시스템 및 슬레이브 장치 |
DE112017007691.9T DE112017007691T5 (de) | 2017-06-27 | 2017-06-27 | Kommunikationssystem, Master-Einrichtung und Slave-Einrichtung |
CN201780092391.6A CN110800246A (zh) | 2017-06-27 | 2017-06-27 | 通信系统、主装置及从装置 |
US16/607,397 US20210281339A1 (en) | 2017-06-27 | 2017-06-27 | Communication system and slave device |
PCT/JP2017/023645 WO2019003320A1 (ja) | 2017-06-27 | 2017-06-27 | 通信システム、マスタ装置及びスレーブ装置 |
JP2017566875A JP6351889B1 (ja) | 2017-06-27 | 2017-06-27 | 通信システム及びスレーブ装置 |
TW106134693A TWI651945B (zh) | 2017-06-27 | 2017-10-11 | 通訊系統以及從屬裝置 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2017/023645 WO2019003320A1 (ja) | 2017-06-27 | 2017-06-27 | 通信システム、マスタ装置及びスレーブ装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019003320A1 true WO2019003320A1 (ja) | 2019-01-03 |
Family
ID=62779842
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/JP2017/023645 WO2019003320A1 (ja) | 2017-06-27 | 2017-06-27 | 通信システム、マスタ装置及びスレーブ装置 |
Country Status (7)
Country | Link |
---|---|
US (1) | US20210281339A1 (ja) |
JP (1) | JP6351889B1 (ja) |
KR (1) | KR102103698B1 (ja) |
CN (1) | CN110800246A (ja) |
DE (1) | DE112017007691T5 (ja) |
TW (1) | TWI651945B (ja) |
WO (1) | WO2019003320A1 (ja) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021190849A (ja) * | 2020-05-29 | 2021-12-13 | 株式会社タムラ製作所 | 情報通信システム及び情報通信装置 |
WO2022019161A1 (ja) * | 2020-07-22 | 2022-01-27 | 株式会社日立国際電気 | 無線通信システム |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6973427B2 (ja) * | 2019-02-15 | 2021-11-24 | 株式会社安川電機 | 通信システム、通信方法、及びプログラム |
WO2021240783A1 (ja) * | 2020-05-29 | 2021-12-02 | 三菱電機株式会社 | 時刻補正装置、時刻補正方法及び時刻補正プログラム |
JP7243695B2 (ja) * | 2020-08-25 | 2023-03-22 | 横河電機株式会社 | 情報処理装置、情報処理システム、及び情報処理方法 |
CN114285512B (zh) * | 2021-11-17 | 2024-01-23 | 中国电子科技集团公司第五十四研究所 | 通信校时方法、通信系统及通信设备 |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014203449A1 (ja) * | 2013-06-18 | 2014-12-24 | 日本電気株式会社 | 通信システム、通信システムの制御方法、送信装置、及び受信装置 |
JP2017098694A (ja) * | 2015-11-20 | 2017-06-01 | 富士通株式会社 | 通信装置,及びその時刻同期方法 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008262292A (ja) | 2007-04-10 | 2008-10-30 | Hitachi Ltd | サーバおよびローカル端末群の時刻同期方法 |
JP5815155B2 (ja) * | 2013-02-27 | 2015-11-17 | 三菱電機株式会社 | 中継装置、中継方法および中継プログラム |
DE112014006696T5 (de) * | 2014-05-23 | 2017-02-16 | Mitsubishi Electric Corporation | Kommunikationsgerät, Kommunikationsverfahren und Programm |
US10033517B2 (en) * | 2015-03-19 | 2018-07-24 | Mitsubishi Electric Corporation | Communication apparatus and network system |
-
2017
- 2017-06-27 KR KR1020197037223A patent/KR102103698B1/ko active IP Right Grant
- 2017-06-27 DE DE112017007691.9T patent/DE112017007691T5/de not_active Ceased
- 2017-06-27 CN CN201780092391.6A patent/CN110800246A/zh not_active Withdrawn
- 2017-06-27 US US16/607,397 patent/US20210281339A1/en not_active Abandoned
- 2017-06-27 JP JP2017566875A patent/JP6351889B1/ja not_active Expired - Fee Related
- 2017-06-27 WO PCT/JP2017/023645 patent/WO2019003320A1/ja active Application Filing
- 2017-10-11 TW TW106134693A patent/TWI651945B/zh not_active IP Right Cessation
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014203449A1 (ja) * | 2013-06-18 | 2014-12-24 | 日本電気株式会社 | 通信システム、通信システムの制御方法、送信装置、及び受信装置 |
JP2017098694A (ja) * | 2015-11-20 | 2017-06-01 | 富士通株式会社 | 通信装置,及びその時刻同期方法 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2021190849A (ja) * | 2020-05-29 | 2021-12-13 | 株式会社タムラ製作所 | 情報通信システム及び情報通信装置 |
JP7161505B2 (ja) | 2020-05-29 | 2022-10-26 | 株式会社タムラ製作所 | 情報通信システム及び情報通信装置 |
WO2022019161A1 (ja) * | 2020-07-22 | 2022-01-27 | 株式会社日立国際電気 | 無線通信システム |
Also Published As
Publication number | Publication date |
---|---|
TW201906343A (zh) | 2019-02-01 |
KR102103698B1 (ko) | 2020-04-23 |
JP6351889B1 (ja) | 2018-07-04 |
DE112017007691T5 (de) | 2020-03-05 |
JPWO2019003320A1 (ja) | 2019-07-04 |
US20210281339A1 (en) | 2021-09-09 |
CN110800246A (zh) | 2020-02-14 |
KR20200003213A (ko) | 2020-01-08 |
TWI651945B (zh) | 2019-02-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6351889B1 (ja) | 通信システム及びスレーブ装置 | |
KR102031268B1 (ko) | 시간-인식 디바이스들 사이에 시간 정보를 통신하는 방법 및 장치 | |
US8738792B2 (en) | Server time protocol messages and methods | |
EP3202062B1 (en) | Distribution of dynamic accuracy information in a network of ieee 1588 clocks | |
US8370675B2 (en) | Precise clock synchronization | |
JP4931108B2 (ja) | 高精度時刻同期処理装置およびそのプログラム,ならびにネットワーク混雑度警告装置およびそのプログラム | |
EP3553994B1 (en) | Method for exchanging time synchronisation message, and network device | |
US11456849B2 (en) | Method and apparatus for synchronizing different communication ports | |
JP6227888B2 (ja) | 通信システム、同期システム、通信方法 | |
US11609599B2 (en) | Electronic device with multiple processors and synchronization method thereof | |
EP4044466A1 (en) | Synchronization method and device | |
WO2016092243A1 (en) | Method and devices for time transfer using end to end transparent clocks | |
US20170117980A1 (en) | Time synchronization for network device | |
EP3915207A1 (en) | Systems and methods for testing time distribution | |
US20160359609A1 (en) | Communication device, communication system, estimation method, and computer program product | |
WO2020132834A1 (zh) | 一种打戳处理方法及装置 | |
CN112602031B (zh) | 系统间的精确定时 | |
TWI795678B (zh) | 同步裝置和同步方法 | |
TWM498417U (zh) | 可自動校時之電能管理系統 | |
TW201626684A (zh) | 可自動校時之電能管理系統 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
ENP | Entry into the national phase |
Ref document number: 2017566875 Country of ref document: JP Kind code of ref document: A |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17915429 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 20197037223 Country of ref document: KR Kind code of ref document: A |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17915429 Country of ref document: EP Kind code of ref document: A1 |