WO2022003865A1 - 時刻同期装置、時刻同期システム、時刻同期方法及びプログラム - Google Patents

時刻同期装置、時刻同期システム、時刻同期方法及びプログラム Download PDF

Info

Publication number
WO2022003865A1
WO2022003865A1 PCT/JP2020/025827 JP2020025827W WO2022003865A1 WO 2022003865 A1 WO2022003865 A1 WO 2022003865A1 JP 2020025827 W JP2020025827 W JP 2020025827W WO 2022003865 A1 WO2022003865 A1 WO 2022003865A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
synchronization
information
unit
slave device
Prior art date
Application number
PCT/JP2020/025827
Other languages
English (en)
French (fr)
Inventor
磊 李
宇志 市村
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to JP2020567628A priority Critical patent/JP6869447B1/ja
Priority to CN202080102456.2A priority patent/CN115735351A/zh
Priority to DE112020007374.2T priority patent/DE112020007374T5/de
Priority to US17/924,116 priority patent/US20230179312A1/en
Priority to PCT/JP2020/025827 priority patent/WO2022003865A1/ja
Publication of WO2022003865A1 publication Critical patent/WO2022003865A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/12Synchronisation of different clock signals provided by a plurality of clock generators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0673Clock 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

Definitions

  • This disclosure relates to a time synchronization device, a time synchronization system, a time synchronization method and a program.
  • a time synchronization system that synchronizes the time of devices in a network is used in various industries such as finance, manufacturing, and telecommunications. Further, it is known that PTP (Precision Time Protocol) defined in IEEE (Institute of Electrical and Electronics Engineers) 1588 is used in such a time synchronization system.
  • PTP is a standard for the grand master clock (GMC, Gland Master Clock), that is, a slave that receives a message transmitted by the so-called grand master synchronizes with the time of the grand master.
  • GMC Grand Master Clock
  • a device having a highly accurate time in the network functions as a grand master, and a device other than the grand master functions as a slave.
  • the slaves if the network is large, one of the slaves functions as a boundary clock (BC, Boundary Clock), and the boundary clock relays the message received from the grand master to the other slaves connected. do.
  • BC Boundary Clock
  • Patent Document 1 describes a base band unit provided in a radio base station, a packet transfer network including a plurality of switch devices, and a reference time for the packet transfer network.
  • a wireless communication system having a ground master as a supply source is disclosed.
  • the switch device functions as a boundary clock, and a reference time is supplied from the grand master to the baseband unit via eight switch devices.
  • the base band unit is based on a predetermined upper limit value of the time error with respect to the reference time of the grand master, the number of switch devices passing from the grand master, and the time error of each switch device on the route. The permissible amount of time error in is calculated.
  • Patent Document 1 exemplifies a case where the time error of each switch device on the path is the same at 50 ns.
  • the same switch device is used to have the same time synchronization accuracy.
  • the owner is different for each switch device.
  • the accuracy of time synchronization may differ depending on the manufacturer and specifications of the switch device.
  • the time synchronization timing is set for each switch device, and when the time synchronization timing is set for each switch device, the switch device Even if the baseband unit corrects the time, the error between the corrected time and the reference time may increase.
  • the second switch device when the second switch device corrects the time by transmitting and receiving a message from the first switch device and the time synchronization timing is set for each switch device, the second switch device is used.
  • the first switch device may correct the time while the switch device is sending and receiving messages to and from the first switch device.
  • the message received by the second switch device may include information about the time before correction and information about the time after correction of the first switch device, and the second switch is based on this information.
  • the device corrects the time, there is a problem that the error between the corrected time and the reference time becomes large.
  • the present disclosure has been made in view of the above circumstances, and an object thereof is to reduce a time error.
  • the time synchronization device is connected to a time holding device that holds the time, and the time holding device is in accordance with the PTP (Precision Time Protocol) of the IEEE (Institute of Electrical and Electronics Engineers) 1588 standard. Synchronize the time with the time holding device together with other time synchronization devices that are not connected to.
  • the time synchronization device includes a synchronization information transmission unit, a request information reception unit, a response information transmission unit, and a time correction unit.
  • the synchronization information transmission unit transmits synchronization information regarding time synchronization to another time synchronization device.
  • the request information receiving unit receives the request information transmitted from another time synchronization device after the synchronization information transmitting unit transmits the synchronization information.
  • the response information transmitting unit transmits the response information to the request information received by the request information receiving unit to another time synchronization device.
  • the time correction unit starts from the time specified when the information is transmitted / received to / from the time holding device in a period different from the period from when the synchronization information transmitting unit transmits the synchronization information to when the request information receiving unit receives the request information.
  • the time is corrected based on the calculated propagation delay time with the time holding device.
  • the time synchronization device does not correct the time during the period from the transmission of the synchronization information to the other time synchronization device to the reception of the request information from the other time synchronization device. Therefore, even if the time synchronization device and the other time synchronization device set the time synchronization timing separately, the other time synchronization device may cause an error in the propagation delay time calculated in the relevant period. Can be prevented. Therefore, the time error of the other time synchronization device is reduced compared to the time synchronization device that corrects the time during the period from the transmission of the synchronization information to the other time synchronization device to the reception of the request information from the other time synchronization device. can.
  • FIG. 1 An overall explanatory view of the time synchronization system according to the embodiment of the present disclosure.
  • the figure which shows the functional structure of the time synchronization system which concerns on this embodiment. A block diagram showing a hardware configuration of a first slave device and a second slave device according to the present embodiment.
  • Timing chart showing an example of sending and receiving messages in a conventional time synchronization system The figure which shows the example of the change of the time error in the conventional time synchronization system.
  • the time synchronization system is a system that synchronizes the time of the slave device as an example of the time synchronization device connected to the master device as an example of the time holding device according to PTP with the time of the master device. ..
  • a message as an example of time information is transmitted and received between the master device and the slave device, and the slave device calculates the propagation delay time of the message with the master device and sets the time. To correct.
  • the master device transmits a Sync message (SyncMessage) and a Follow_Up message (FollowUpMessage) as an example of synchronization information related to time synchronization to the slave device in this order.
  • the Follow_Up message contains information that can specify the first time T1, which is the time when the Sync message is transmitted.
  • the slave device receives the Sync message and identifies the second time T2, and then receives the Follow_Up message to specify the first time T1.
  • the slave device is the time when the Delay_Req message (DelayRequestMessage) as an example of the request information requesting the information used for calculating the propagation delay time based on the synchronization information is transmitted to the master device. Specify the time T3.
  • the master device receives the Delay_Req message, identifies the received fourth time T4, and then transmits a Delay_Resp message (Delay Response message) as an example of the response information to the request information to the slave device.
  • the Delay_Resp message contains information that can identify the fourth time T4, which is the time when the Delay_Req message was transmitted.
  • the slave device receives the Delay_Resp message and identifies the fourth time T4. Then, the slave device calculates the propagation delay time from the specified first time T1, second time T2, third time T3, and fourth time T4, and corrects the time.
  • the propagation delay time is d and the time correction amount is ct
  • the propagation delay time d is calculated using the formula shown in (1) below, and the time correction amount ct is the following (2). ) Is calculated using the formula shown in).
  • FIG. 1 is an overall explanatory view of a time synchronization system according to an embodiment of the present disclosure.
  • the time synchronization system 100 includes a master device 200 as an example of a time holding device.
  • the time synchronization system 100 includes a first slave device 300 as an example of the time synchronization device connected to the master device 200 and as an example of the first time synchronization device.
  • the time synchronization system 100 is an example of another time synchronization device connected to the first slave device 300 without being connected to the master device 200, and the second slave device 400 as an example of the second time synchronization device. Be prepared.
  • the master device 200, the first slave device 300, and the second slave device 400 can transmit and receive data via a LAN (Local Area Network).
  • the master device 200 includes a master port 201
  • the first slave device 300 includes a slave port 301 and a master port 302
  • the second slave device 400 includes a slave port 401 and a master port 402.
  • the master device 200 is capable of transmitting and receiving data related to time synchronization with the first slave device 300 by connecting the master port 201 to the slave port 301 of the first slave device 300 via a LAN. ..
  • the master port 302 is connected to the slave port 401 of the second slave device 400 via the LAN, so that data can be transmitted and received to and from the second slave device 400. It is possible.
  • the master device 200 is, for example, a computer that functions as a grand master in PTP, and holds the highest quality clock as a reference time in the time synchronization system 100.
  • the master device 200 is not limited to the grand master as long as the reference time is held in the PTP, and may be, for example, a computer that functions as a boundary clock that does not have an error from the reference time of the grand master.
  • the master device 200 transmits a Sync message and a Follow_Up message to the first slave device 300 in this order.
  • the master device 200 transmits the Delay_Resp message to the first slave device 300.
  • FIG. 2 is a diagram showing a functional configuration of the time synchronization system according to the present embodiment.
  • the first slave device 300 and the second slave device 400 are computers that function as boundary clocks in PTP, for example.
  • the first slave device 300 includes a first time information receiving unit 310 as an example of a time information receiving unit that receives time information based on a reference time transmitted from the master device 200.
  • the first slave device 300 has a first time correction unit 320 as an example of a time correction unit that corrects the time, and a first time information as an example of a time information transmission unit that transmits time information to the second slave device 400.
  • a transmission unit 330 is provided.
  • the first time information receiving unit 310 receives the first synchronization information receiving unit 311 as an example of the synchronization information receiving unit for receiving the synchronization information transmitted from the master device 200, and the response information transmitted from the master device 200.
  • a first response information receiving unit 312 is provided as an example of the information receiving unit.
  • the first time information receiving unit 310 includes a first request information receiving unit 313 as an example of a request information receiving unit that receives the request information transmitted from the second slave device 400.
  • the first time information transmission unit 330 includes a first request information transmission unit 331 as an example of a request information transmission unit that transmits request information to the master device 200. Further, the first time information transmission unit 330 is a response that transmits the first synchronization information transmission unit 332 as an example of the synchronization information transmission unit that transmits the synchronization information to the second slave device 400, and the response information to the second slave device 400.
  • a first response information transmission unit 333 is provided as an example of the information transmission unit.
  • the first synchronization information receiving unit 311 receives the Sync message and the Follow_Up message transmitted from the master device 200. Further, the first request information transmission unit 331 transmits a Delay_Req message to the master device 200. Further, the first response information receiving unit 312 receives the Delay_Resp message transmitted from the master device 200. Further, the first synchronization information transmission unit 332 transmits a Sync message and a Follow_Up message to the second slave device 400. Further, the first request information receiving unit 313 receives the Delay_Req message transmitted from the second slave device 400. Further, the first response information transmission unit 333 transmits the Delay_Resp message to the second slave device 400.
  • the first time correction unit 320 is from the times Ta1 to Ta4 specified when a message is transmitted to and received from the master device 200 by the first synchronization information receiving unit 311, the first request information transmitting unit 331, and the first response information receiving unit 312. The time is corrected based on the calculated propagation delay time d with the master device 200. Specifically, the first time correction unit 320 starts the time correction from the timing when the first response information receiving unit 312 completes the reception of the Delay_Resp message, and first, the first time correction unit 320 starts the first synchronization.
  • the information receiving unit 311 identifies the second time Ta2 at which the Sync message is received.
  • the first time correction unit 320 identifies the first time Ta1 to which the master device 200 has transmitted the Sync message from the Follow_Up message received by the first synchronization information receiving unit 311.
  • the first time correction unit 320 identifies the third time Ta3 in which the first request information transmission unit 331 has transmitted the Delay_Req message to the master device 200.
  • the first time correction unit 320 identifies the fourth time Ta4 in which the master device 200 receives the Delay_Req message from the Delay_Resp message received by the first response information receiving unit 312.
  • the correction amount ct is calculated using the mathematical formula shown in (2), and the time is corrected based on the calculated correction amount ct.
  • the first synchronization information transmission unit 332 has synchronization information based on the time corrected between the time when the first time correction unit 320 corrects the time and the time when the first synchronization information reception unit 311 receives new synchronization information. To send. For example, the first synchronization information transmission unit 332 starts transmitting synchronization information from the timing when the first time correction unit 320 completes the time correction. Specifically, the first synchronization information transmission unit 332 starts transmitting the Sync message at the timing when the first time correction unit 320 completes the time correction.
  • the first time correction unit 320 may correct the time during the period from the transmission of the Sync message by the first synchronization information transmission unit 332 to the reception of the Delay_Req message by the first request information reception unit 313. Can not.
  • the first slave device 300 turns on the flag for prohibiting time correction during the period from the transmission of the Sync message to the reception of the Delay_Req message, and while the flag is on, the first time correction is performed.
  • the unit 320 may not correct the time.
  • the second slave device 400 has a second time information receiving unit 410 as an example of a time information receiving unit that receives time information transmitted from the first slave device 300, and a second slave device 400 as an example of a time correcting unit that corrects the time.
  • a time correction unit 420 is provided.
  • the second slave device 400 includes a second time information transmission unit 430 as an example of a time information transmission unit that transmits time information.
  • the second time information receiving unit 410 is the response information transmitted from the second synchronization information receiving unit 411 and the first slave device 300 as an example of the synchronization information receiving unit that receives the synchronization information transmitted from the first slave device 300.
  • a second response information receiving unit 412 is provided as an example of the response information receiving unit for receiving the above.
  • the second time information receiving unit 410 is an example of a request information receiving unit that receives request information transmitted from the third slave device when a third slave device (not shown) is connected to the second slave device 400.
  • the second request information receiving unit 413 is provided.
  • the second time information transmission unit 430 includes a second request information transmission unit 431 as an example of the request information transmission unit that transmits the request information to the first slave device 300. Further, the second time information transmission unit 430 responds to the second synchronization information transmission unit 432 as an example of the synchronization information transmission unit that transmits synchronization information to the third slave device when the third slave device is connected. A second response information transmission unit 433 is provided as an example of the response information transmission unit that transmits information to the third slave device.
  • the second synchronization information receiving unit 411 receives the Sync message and the Follow_Up message transmitted by the first synchronization information transmitting unit 332. Further, the second request information transmission unit 431 transmits a Day_Req message to the first request information reception unit 313. Further, the second response information receiving unit 412 receives the Delay_Resp message transmitted by the first response information transmitting unit 333. Further, the second synchronization information transmission unit 432 transmits a Sync message and a Follow_Up message to the third slave device. Further, the second request information receiving unit 413 receives the Delay_Req message transmitted from the third slave device. Further, the second response information transmission unit 433 transmits a Delay_Resp message to the third slave device.
  • the second time correction unit 420 includes the first slave device 300 and the message by the second synchronization information reception unit 411, the second request information transmission unit 431, and the second response information reception unit 412.
  • the time is corrected based on the propagation delay time d with the first slave device 300 calculated from the times Tb1 to Tb4 specified when the time is transmitted / received.
  • the second time correction unit 420 starts the time correction from the timing when the second response information receiving unit 412 completes the reception of the Delay_Resp message, and first, the second time correction unit 420 starts the second synchronization.
  • the information receiving unit 411 identifies the second time Tb2 at which the Sync message is received.
  • the second time correction unit 420 identifies the first time Tb1 in which the first synchronization information transmission unit 332 transmits the Sync message from the Follow_Up message received by the second synchronization information reception unit 411.
  • the second time correction unit 420 identifies the third time Tb3 in which the second request information transmission unit 431 transmits the Delay_Req message to the first request information reception unit 313.
  • the second time correction unit 420 identifies the fourth time Tb4 from which the second response information receiving unit 412 received the Day_Req message from the Delay_Resp message received by the second response information receiving unit 412.
  • the propagation delay time d is calculated, the correction amount ct is calculated using the mathematical formula shown in (2) above, and the time is corrected based on the calculated correction amount ct.
  • the second synchronization information transmission unit 432 corrects the time by the second time correction unit 420 in the same manner as the first synchronization information transmission unit 332.
  • the synchronization information based on the corrected time is transmitted from the time until the second synchronization information receiving unit 411 receives the new synchronization information.
  • the second synchronization information transmission unit 432 starts transmitting synchronization information from the timing when the second time correction unit 420 completes the time correction.
  • the second synchronization information transmission unit 432 starts transmitting the Sync message at the timing when the second time correction unit 420 completes the time correction.
  • the second synchronization information transmission unit 432 transmits a Sync message. The time cannot be corrected during the period from that time until the second request information receiving unit 413 receives the Delay_Req message.
  • FIG. 3 is a block diagram showing a hardware configuration of the first slave device and the second slave device according to the present embodiment.
  • the first slave device 300 and the second slave device 400 shown in FIGS. 1 and 2 are configured by the hardware shown in FIG.
  • the first slave device 300 includes a control unit 51, a main storage unit 52, an external storage unit 53, and a transmission / reception unit 54.
  • the second slave device 400 includes a control unit 51, a main storage unit 52, an external storage unit 53, and a transmission / reception unit 54, similarly to the first slave device 300.
  • the master device 200 may include a control unit 51, a main storage unit 52, an external storage unit 53, and a transmission / reception unit 54, similarly to the first slave device 300 and the second slave device 400. ..
  • the control unit 51 executes the process according to the control program 59.
  • the control unit 51 includes a CPU (Central Processing Unit).
  • the control unit 51 functions as a first time correction unit 320 included in the first slave device 300 according to the control program 59. Further, the control unit 51 functions as a second time correction unit 420 included in the second slave device 400 according to the control program 59.
  • the main storage unit 52 loads the control program 59 and is used as a work area of the control unit 51.
  • the main storage unit 52 includes a RAM (Random-AccessMemory).
  • the external storage unit 53 stores the control program 59 in advance.
  • the external storage unit 53 supplies the data stored in this program to the control unit 51 according to the instruction of the control unit 51, and stores the data supplied from the control unit 51.
  • the external storage unit 53 includes a non-volatile memory such as a flash memory, an HDD (Hard Disk Drive), and an SSD (Solid State Dive).
  • the transmission / reception unit 54 transmits / receives information.
  • the transmission / reception unit 54 includes information communication components such as a network termination device and a wireless communication device connected to the network.
  • the transmission / reception unit 54 includes a first time information reception unit 310, a first synchronization information reception unit 311, a first response information reception unit 312, a first request information reception unit 313, and a first time information transmission unit included in the first slave device 300. It functions as 330, the first request information transmission unit 331, the first synchronization information transmission unit 332, and the first response information transmission unit 333.
  • the transmission / reception unit 54 includes a second time information receiving unit 410, a second synchronization information receiving unit 411, a second response information receiving unit 412, a second request information receiving unit 413, and a second time information included in the second slave device 400. It functions as a transmission unit 430, a second request information transmission unit 431, a second synchronization information transmission unit 432, and a second response information transmission unit 433.
  • the main storage unit 52, the external storage unit 53, and the transmission / reception unit 54 are all connected to the control unit 51 via the internal bus 50. Further, in the second slave device 400, similarly to the first slave device 300, the main storage unit 52, the external storage unit 53, and the transmission / reception unit 54 are all connected to the control unit 51 via the internal bus 50.
  • the control unit 51 uses the main storage unit 52, the external storage unit 53, and the transmission / reception unit 54 as resources, so that the first time information receiving unit 310 and the first synchronization information Receiving unit 311, 1st response information receiving unit 312, 1st request information receiving unit 313, 1st time correction unit 320, 1st time information transmitting unit 330, 1st request information transmitting unit 331, 1st synchronized information transmitting unit 332 ,
  • the function of the first response information transmission unit 333 is realized.
  • the first slave device 300 executes the first time information receiving step as an example of the time information receiving step performed by the first time information receiving unit 310.
  • the first slave device 300 is an example of a first synchronization information receiving step as an example of a synchronization information receiving step performed by the first synchronization information receiving unit 311 and a response information receiving step performed by the first response information receiving unit 312.
  • the first response information receiving step and the first request information receiving step as an example of the request information receiving step performed by the first request information receiving unit 313 are executed.
  • the first slave device 300 executes the first time correction step as an example of the time correction step performed by the first time correction unit 320.
  • the first slave device 300 executes the first time information transmission step as an example of the time information transmission step performed by the first time information transmission unit 330.
  • the first slave device 300 is an example of a first request information transmission step as an example of a request information transmission step performed by the first request information transmission unit 331 and a synchronization information transmission step performed by the first synchronization information transmission unit 332.
  • the first response information transmission step as an example of the response information transmission step performed by the first synchronization information transmission step and the first response information transmission unit 333 is executed.
  • the control unit 51 uses the main storage unit 52, the external storage unit 53, and the transmission / reception unit 54 as resources, so that the second time information receiving unit 410, the second synchronization information receiving unit 411, and the second slave device 400 are used.
  • the function of the transmission unit 433 is realized.
  • the second slave device 400 executes the first time information receiving step as an example of the time information receiving step performed by the second time information receiving unit 410.
  • the second slave device 400 is an example of a second synchronization information receiving step as an example of a synchronization information receiving step performed by the second synchronization information receiving unit 411 and a response information receiving step performed by the second response information receiving unit 412.
  • the second response information receiving step and the second request information receiving step as an example of the request information receiving step performed by the second request information receiving unit 413 are executed.
  • the second slave device 400 executes the second time correction step as an example of the time correction step performed by the second time correction unit 320.
  • the second slave device 400 executes the second time information transmission step as an example of the time information transmission step performed by the second time information transmission unit 430.
  • the second slave device 400 is an example of a second request information transmission step as an example of a request information transmission step performed by the second request information transmission unit 431 and a synchronization information transmission step performed by the second synchronization information transmission unit 432.
  • the second response information transmission step is executed as an example of the second synchronization information transmission step and the response information transmission step performed by the second response information transmission unit 433.
  • the operation unit may include information input components such as a keyboard, a mouse, a touch panel, and operation buttons.
  • the first slave device 300 and the second slave device 400 do not require a display unit for displaying input / output data, such a display unit may be provided.
  • the display unit may include a display device such as an LCD (Liquid Crystal Display) or an organic EL (Electro-Luminescence) display.
  • FIG. 4 is a flowchart showing the flow of the first time synchronization process according to the present embodiment.
  • the first slave device 300 determines whether or not the first synchronization information receiving unit 311 has received the Sync message and the Follow_Up message from the master device 200 (step S101).
  • the first slave device 300 repeats the process of step S101 until the first synchronization information receiving unit 311 receives the Sync message and the Follow_Up message.
  • the first request information transmission unit 331 transmits the Delay_Req message to the master device 200 (step S102).
  • the first slave device 300 determines whether or not the first response information receiving unit 312 has received the Delay_Resp message from the master device 200 (step S103).
  • the first slave device 300 repeats the process of step S103 until the first response information receiving unit 312 receives the Delay_Resp message.
  • the first time correction unit 320 uses the first time Ta1, the second time Ta2, the third time Ta3, and the fourth time Ta4 specified by the transmission / reception of the message. And start the time correction (step S104).
  • the first slave device 300 determines whether or not the time correction is completed by the first time correction unit 320 (step S105). When the time correction is not completed (step S105; N), the first slave device 300 repeats the process of step S105 until the first time correction unit 320 completes the time correction. On the other hand, when the time correction is completed (step S105; Y), the first synchronization information transmission unit 332 transmits the Sync message and the Follow_Up message to the second slave device 400 in this order (step S106).
  • the first slave device 300 determines whether or not the first request information receiving unit 313 has received the Delay_Req message from the second slave device 400 (step S107).
  • the first slave device 300 repeats the process of step S107 until the first request information receiving unit 313 receives the Delay_Req message from the second slave device 400.
  • the first response information transmission unit 333 transmits the Delay_Resp message to the second slave device 400 (step S108), and ends the first time synchronization process.
  • FIG. 5 is a flowchart showing the flow of the second time synchronization process according to the present embodiment.
  • the second slave device 400 determines whether or not the second synchronization information receiving unit 411 has received the Sync message and the Follow_Up message from the first slave device 300 (step S201).
  • the second slave device 400 repeats the process of step S201 until the second synchronization information receiving unit 411 receives the Sync message and the Follow_Up message.
  • the second request information transmission unit 431 transmits the Delay_Req message to the first slave device 300 (step S202).
  • the second slave device 400 determines whether or not the second response information receiving unit 412 has received the Delay_Resp message from the first slave device 300 (step S203).
  • the second slave device 400 repeats the process of step S203 until the second response information receiving unit 412 receives the Delay_Resp message.
  • the second time correction unit 420 uses the first time Tb1, the second time Tb2, the third time Tb3, and the fourth time Tb4 specified by the transmission / reception of the message. And start the time correction (step S204).
  • the second slave device 400 determines whether or not the time correction is completed by the second time correction unit 420 (step S205). When the time correction is not completed (step S205; N), the second slave device 400 repeats the process of step S205 until the second time correction unit 420 completes the time correction. On the other hand, when the time correction is completed (step S205; Y), the second slave device 400 ends the second time synchronization process if the third slave device is not connected.
  • the second slave device 400 executes the same processing as the processing of steps S106 to S108 of the first time synchronization processing if the third slave device is connected, and synchronizes with the second time. End the process. Specifically, the second synchronization information transmission unit 432 transmits a Sync message and a Follow_Up message to the third slave device in this order. Then, when the second request information receiving unit 413 receives the Delay_Req message from the third slave device, the second response information transmitting unit 433 transmits the Delay_Resp message to the third slave device and ends the second time synchronization process. ..
  • FIG. 6 is a timing chart showing an example of sending and receiving messages in the time synchronization system according to the present embodiment.
  • the master device 200, the first slave device 300, and the second slave device 400 send and receive messages, and the first slave device 300 and the second slave device 400 set the time.
  • the timing for correcting the above will be described.
  • the master device 200 transmits a Sync message to the first slave device 300 at the first time Ta1, and the first slave device 300 receives the Sync message at the second time Ta2.
  • the master device 200 transmits a Follow_Up message capable of specifying the first time Ta1 to the first slave device 300 after transmitting the Sync message, and the first slave device 300 receives the Follow_Up message to specify the first time Ta1. do.
  • the first slave device 300 After receiving the Follow_Up message, the first slave device 300 sends a Delay_Req message to the master device 200 at the third time Ta3, and the master device 200 receives the Delay_Req message at the fourth time Ta4. Further, the master device 200 transmits a Delay_Resp message capable of specifying the fourth time Ta4 after receiving the Delay_Req message to the first slave device 300, and the first slave device 300 receives the Delay_Resp message to specify the fourth time T4. do.
  • the first slave device 300 measures the first time Ta1, the second time Ta2, the third time Ta3, and the fourth time Ta4 in the period from the transmission of the Sync message to the reception of the Delay_Req message by the master device 200.
  • the propagation delay time d can be calculated by receiving the Delay_Resp message that can specify the fourth time Ta4.
  • the period from the transmission of the Sync message to the reception of the Delay_Req message by the master device 200 will be described as a propagation delay measurement period between the first slave device 300 and the master device 200.
  • the first slave device 300 After the propagation delay measurement period with the master device 200 has elapsed and the Delivery_Resp message is received, the first slave device 300 measures the first time Ta1 and the second time Ta2 using the mathematical formula shown in (1) above. The propagation delay time d is calculated from the third time Ta3 and the fourth time Ta4. Further, the first slave device 300 calculates the correction amount ct from the propagation delay time d calculated by using the mathematical formula shown in (2) above, and corrects the time based on the calculated correction amount ct.
  • the period from the start of calculation of the propagation delay time d by the first slave device 300 to the correction of the time will be described as the time correction period of the first slave device 300.
  • the first slave device 300 sends a Sync message to the second slave device 400 at the first time Tb1, and the second slave device 400 receives the Sync message at the second time Tb2 and delays propagation. Start the measurement period. Further, the first slave device 300 transmits a Follow_Up message capable of specifying the first time Tb1 to the second slave device 400 after transmitting the Sync message, and the second slave device 400 receives the Follow_Up message and receives the Follow_Up message to the first time Tb1. To identify. Further, the second slave device 400 transmits a Delay_Req message to the first slave device 300 at the third time Tb3 after receiving the Follow_Up message, and the first slave device 300 receives the Delay_Req message at the fourth time Tb4.
  • the first slave device 300 After receiving the Delay_Req message, the first slave device 300 sends a Delay_Resp message capable of specifying the fourth time Tb4 to the second slave device 400, and the second slave device 400 receives the Delay_Resp message and sets the fourth time Tb4. Specify and end the propagation delay measurement period.
  • the first slave device 300 sets a new time in the period from the transmission of the Sync message to the reception of the Delay_Req message, that is, in the propagation delay measurement period between the first slave device 300 and the second slave device 400. Correction is prohibited.
  • the period from the transmission of the Sync message by the first slave device 300 to the reception of the Delay_Req message may be described as the time correction prohibition period of the first slave device 300.
  • the second slave device 400 After the propagation delay measurement period with the first slave device 300 has elapsed and the Delay_Resp message is received, the second slave device 400 starts the time correction period and measures using the mathematical formula shown in (1) above.
  • the propagation delay time d is calculated from the 1st time Tb1, the 2nd time Tb2, the 3rd time Tb3, and the 4th time Tb4.
  • the second slave device 400 calculates the correction amount ct from the propagation delay time d calculated by using the mathematical formula shown in (2) above, corrects the time based on the calculated correction amount ct, and corrects the time for the time correction period. To finish.
  • the first slave device 300 is connected between the master device 200 that holds the reference time and the second slave device 400. Time synchronization with the master device 200 is performed together with the second slave device 400 according to PTP.
  • the first synchronization information transmission unit 332 transmits the Sync message and the Follow_Up message to the second slave device 400 in this order.
  • the first request information receiving unit 313 receives the Delay_Req message transmitted from the second slave device 400 after the first synchronization information transmitting unit 332 transmits the Follow_Up message.
  • the first response information transmitting unit 333 transmits a Delay_Resp message for the Delay_Req message received by the first request information receiving unit 313 to the second slave device 400.
  • the first time correction unit 320 in a period different from the propagation delay measurement period from the transmission of the Sync message by the first synchronization information transmission unit 332 to the reception of the Delay_Req message by the first request information reception unit 313.
  • the time is corrected based on the propagation delay time d between the master device 200 and the master device 200 calculated from the times Ta1 to Ta4 specified when the message is transmitted and received.
  • the period from the transmission of the Sync message to the first slave device 300 or the second slave device 400 to the reception of the Delay_Req message from the second slave device 400 that is, with the second slave device 400.
  • the first slave device 300 does not correct the time during the propagation delay measurement period. Therefore, even if the first slave device 300 and the second slave device 400 set the timing of time synchronization separately, an error occurs in the propagation delay time calculated in the period in the second slave device 400. Can be prevented. Therefore, the time of the second slave device 400 is higher than that of the time synchronization system that corrects the time during the period from when the first slave device sends a Sync message to the second slave device to when the Day_Req message is received from the second slave device. The error can be reduced.
  • the IEEE 1588 standard does not specify the timing at which the boundary clock executes time correction and the timing at which a message is transmitted to the slave device to which the boundary clock is connected. Therefore, the conventional time synchronization system that performs time synchronization according to PTP has a problem that the accuracy of time synchronization differs depending on the slave device that functions as the boundary clock, for example, because the manufacturer, specifications, and the like are different. For example, in a conventional time synchronization system, a propagation delay measurement period between the first slave device and the second slave device is measured while the first slave device functioning as a boundary clock sends and receives a message to and from the second slave device. There is a possibility that the first slave device sends and receives a message to and from the master device to correct the time.
  • FIG. 7 is a timing chart showing an example of sending and receiving messages in a conventional time synchronization system.
  • a conventional time synchronization system consider a case where the first slave device sends a Sync message and a Follow_Up message to the second slave device, and then receives a Day_Resp message from the master device.
  • the time correction may be completed before the first slave device receives the Delay_Req message from the second slave device.
  • the first slave device sends a Follow_Up message that can specify the first time Tb1 based on the time before correction, and then sends a Delay_Resp message that can specify the fourth time Tb4 based on the corrected time.
  • the first slave device completes the time correction during the propagation delay measurement period with the second slave device, and the second slave device is the first based on the time before the correction of the first slave device.
  • the time is corrected using the time Tb1 and the fourth time Tb4 based on the corrected time.
  • FIG. 8 is a diagram showing an example of a change in time error in a conventional time synchronization system. Note that FIG. 8 illustrates the change in the time difference between the first slave device and the master device by the alternate long and short dash line, and illustrates the change in the time difference between the second slave apparatus and the master apparatus by the alternate long and short dash line.
  • the first slave device sends a Follow_Up message capable of specifying the first time Tb1 based on the time before correction after transmitting the Sync message at the eleventh timing t11.
  • the second slave device receives the Sync message at the twelfth timing t12 and identifies the second time Tb2, and then receives the Follow_Up message to specify the first time Tb1.
  • the first slave device starts the time correction at the thirteenth timing t13 and completes the time correction at the fourteenth timing t14.
  • the second slave device transmits a Delay_Req message to the first slave device at the fifteenth timing t15 to specify the third time Tb3.
  • the first slave device receives the Delay_Req message at the 16th timing t16, and sends a Delay_Resp message capable of specifying the fourth time Tb4 based on the corrected time at the 17th timing t17 to the second slave device.
  • the second slave device receives the Delay_Resp message at the 18th timing t18, completes the measurement from the first time Tb1 to the fourth time Tb4, starts the time correction, and corrects the time at the 19th timing t19. Complete.
  • the time difference ⁇ remains when the time is corrected in the second slave device.
  • the propagation delay time d' is set to (3) below. It is a value calculated using the formula shown, and the time difference ⁇ is a value calculated using the formula shown in (4) below.
  • FIG. 9 is a diagram showing an example of a change in time error in the time synchronization system according to the present embodiment.
  • FIG. 9 exemplifies the change in the time difference between the first slave device and the master device by the alternate long and short dash line, and the change in the time difference between the second slave device and the master apparatus is illustrated by the alternate long and short dash line. Illustrate.
  • the second slave device 400 corrects the time using the first time Tb1 and the fourth time Tb4 based on the corrected time of the first slave device 300. It is carried out. Specifically, as shown in FIG.
  • the first slave device 300 starts the time correction at the 21st timing t21, completes the time correction at the 22nd timing t22, and transmits a Sync message. Later, a Follow_Up message capable of identifying the first time Tb1 based on the corrected time is transmitted to the second slave device 400.
  • the second slave device 400 receives the Sync message at the 23rd timing t23 and identifies the second time Tb2, and then receives the Follow_Up message to specify the first time Tb1.
  • the second slave device 400 transmits a Delay_Req message to the first slave device 300 at the 24th timing t24 to specify the third time Tb3.
  • the first slave device 300 receives the Delay_Req message at the 25th timing t25, and transmits the Delay_Resp message capable of specifying the fourth time Tb4 based on the corrected time at the 26th timing t26 to the second slave device 400. do.
  • the second slave device 400 receives the Delay_Resp message at the 27th timing t27, completes the measurement from the first time Tb1 to the fourth time Tb4, starts the time correction, and corrects the time at the 28th timing t28. To complete.
  • the time synchronization system 100 solves the above-mentioned problems in the conventional time synchronization system.
  • the propagation delay measurement period with the second slave device 400 is a time correction prohibition period, for example, time correction is performed.
  • the prohibition flag is turned on, and the first time correction unit 320 is controlled so that the time cannot be corrected.
  • the time correction prohibition period is the propagation delay measurement period with the second slave device 400, that is, the Sync message is transmitted to the first slave device 300 or the second slave device 400, and then the Delay_Req message is sent.
  • the period from the second slave device 400 to reception is set, but the period is not limited to this.
  • the first slave device 300 or the Sync message is transmitted to the second slave device 400, the Delay_Req message is received from the second slave device 400, and then the Delay_Resp message is transmitted to the second slave device 400. It may be between.
  • the first synchronization information transmission unit 332 transmits a Sync message to the second slave device 400 from the timing when the first time correction unit 320 completes the time correction.
  • the propagation delay measurement period with the second slave device 400 can be started from the timing when the first slave device 300 completes the time correction, and the second slave device 400 after the correction of the first slave device 300.
  • the propagation delay time can be calculated based on the time of and the time can be corrected. Further, by doing so, a time error with the master device 200 occurs in the second slave device 400 as compared with the time synchronization system in which transmission of the Sync message to the slave device is not started from the timing when the time correction is completed. You can reduce the period of time you spend.
  • the first synchronization information transmission unit 332 may start transmitting a Sync message to the second slave device 400 after a predetermined period has elapsed after the first time correction unit 320 completes the time correction. .. Further, for example, the first synchronization information transmission unit 332 may start transmitting a Sync message to the second slave device 400 before the first time correction unit 320 starts the time correction.
  • FIG. 10 is a timing chart showing an example of sending and receiving a message in a time synchronization system according to a modified example of the present embodiment.
  • the Sync message may be transmitted to the second slave device 400 before the first slave device 300 sends the Delay_Req message to the master device 200.
  • the first slave device 300 sends a Sync message to the second slave device 400, then sends a Delay_Req message to the master device 200, then sends a Follow_Up message to the second slave device 400, and the master device 200 sends a Day_Resp message.
  • the Delay_Req message may be received from the second slave device 400. In this case, as shown in FIG.
  • the time until the Delivery_Req message is received from the second slave device 400 is the propagation delay measurement period between the first slave device 300 and the second slave device 400, that is, the time of the first slave device 300. It will be a correction prohibition period. Therefore, the first slave device 300 does not start the time correction even if the Day_Resp message is received from the master device 200, and the time is set after the period has elapsed after receiving the Day_Req message from the second slave device 400. The correction may be started.
  • the first time correction unit 320 starts the time correction from the timing when the first response information receiving unit 312 completes the reception of the Delay_Resp message.
  • a time error with the master device 200 occurs in the first slave device 300 as compared with the time synchronization system in which the time correction is not started from the timing when the reception of the Delay_Resp message is completed in the first slave device. You can reduce the period of time you spend. Further, by doing so, the first slave device 300 receives a new Sync message from the master device 200 rather than the time synchronization system that does not start the time correction from the timing when the reception of the Delay_Resp message is completed in the first slave device.
  • the time correction is completed at a timing earlier than the time synchronization system that does not start the time correction from the timing when the reception of the Delay_Resp message is completed in the first slave device, and the time correction is completed based on the corrected time.
  • the propagation delay measurement period with the second slave device 400 can be started. As a result, it is possible to reduce the period in which the time error between the second slave device 400 and the master device 200 occurs.
  • the first time correction unit 320 may start the time correction after a predetermined period has elapsed from the completion of the reception of the Delay_Resp message by the first response information receiving unit 312.
  • the second time correction unit 420 starts the time correction from the timing when the second response information receiving unit 412 completes the reception of the Delay_Resp message.
  • a time error with the master device 200 occurs in the second slave device 400 as compared with the time synchronization system in which the time correction is not started from the timing when the reception of the Delay_Resp message is completed in the second slave device.
  • the second slave device 400 receives a new Sync message from the first slave device 300 as compared with the time synchronization system in which the time correction is not started from the timing when the reception of the Delay_Resp message is completed in the second slave device.
  • the time correction is completed at a timing earlier than the time synchronization system that does not start the time correction from the timing when the reception of the Delay_Resp message is completed in the second slave device, and the second slave device 400 is used.
  • the propagation delay measurement period with the third slave device can be started based on the corrected time. As a result, it is possible to reduce the period in which the time error with the master device 200 occurs in the third slave device.
  • the second time correction unit 420 may start the time correction after a predetermined period has elapsed after the second response information receiving unit 412 completes the reception of the Delay_Resp message.
  • the Sync message is transmitted to the third slave device from the timing when the second slave device 400 completes the time correction.
  • this is not limited as long as the second slave device 400 does not correct the time during the propagation delay measurement period with the third slave device.
  • the second synchronization information transmission unit 432 may start transmitting a Sync message to the third slave device after a predetermined period has elapsed after the second time correction unit 420 completes the time correction.
  • the synchronization information is transmitted by the so-called Two-Step method in which the Follow_Up message capable of specifying the first time T1 at which the Sync message is transmitted is transmitted, but the synchronization information is not limited to this. ..
  • synchronization information may be transmitted by a so-called One-Step method in which a Sync message capable of specifying the first time T1 as a transmission time is transmitted and a Follow_Up message is not transmitted.
  • the first slave device 300 as an example of the time synchronization device is connected to the master device 200, but the connection destination of the first slave device 300 is the master device as long as it is a time holding device. Not limited to 200.
  • the first slave device 300 may be connected to a higher-level slave device as an example of the time holding device.
  • the upper slave device is a slave device in which the number of relays of the boundary clock to the ground master is smaller than that of the first slave device 300. Therefore, the higher-level slave device needs to be a computer that functions as a boundary clock in, for example, PTP, like the first slave device 300 and the second slave device 400.
  • the time holding device is not limited to the master device 200 that functions as a ground master, and may be a higher-level slave device that functions as a boundary clock.
  • the connection destination of the first slave device 300 is a higher-level slave device, the time of the higher-level slave device is not corrected during the propagation delay measurement period with the first slave device 300, as in the case of the first slave device 300. If it is configured, it exhibits the effects of the present disclosure.
  • the LAN network is configured by a line connection in which the master device 200, the first slave device 300, the second slave device 400, the third slave device, ... Are connected in a line shape.
  • the form of the network is not limited.
  • it may be a ring connection in which the master device 200 and a plurality of slave devices including the first slave device 300 and the second slave device 400 are connected in a ring shape.
  • it may be a tree connection in which a plurality of slave devices are connected in a tree shape with the master device 200 as the root.
  • it may be a bus connection connecting the master device 200 and a plurality of slave devices to one bus line, or a star connection connecting to one hub.
  • a mesh connection may be used in which the master device 200 and a plurality of slave devices are connected in a mesh shape.
  • the slave device directly connected to the master device 200 is referred to as the first slave device 300
  • the slave device directly connected to the first slave device 300 without being directly connected to the master device 200 is defined as the first slave device 300.
  • the second slave device 400 is used, the effects of the present disclosure can be obtained.
  • the central part for processing the first slave device 300 and the second slave device 400 including the control unit 51, the main storage unit 52, the external storage unit 53, the transmission / reception unit 54, the internal bus 50, etc. is a dedicated system. Regardless, it can be realized by using a normal computer system.
  • a computer program for executing the above operation is stored and distributed in a computer-readable recording medium such as a flexible disk or DVD-ROM (Read-Only Memory), and the computer program is distributed to the computer.
  • the first slave device 300 and the second slave device 400 that execute the above processing may be configured. Further, even if the computer program is stored in a storage device of a server device on a communication network such as the Internet and downloaded by a normal computer system, the first slave device 300 and the second slave device 400 may be configured. good.
  • the functions of the first slave device 300 and the second slave device 400 are realized by sharing the OS (operating system) and the application program, or when the functions are realized by the cooperation between the OS and the application program, the application. Only the program part may be stored in the recording medium or the storage device.
  • the computer program may be posted on a bulletin board system (BBS, Bulletin Board System) on a communication network, and the computer program may be provided via the network. Then, the above processing may be executed by starting this computer program and executing it in the same manner as other application programs under the control of the OS.
  • BSS bulletin board System
  • 2 Response information receiving unit 413 2nd request information receiving unit, 420 2nd time correction unit, 430 2nd time information transmitting unit, 431 2nd request information transmitting unit, 432 2nd synchronization information transmitting unit, 433 2nd response information Transmitter.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Electric Clocks (AREA)

Abstract

第1スレーブ装置(300)は、基準時刻を保持するマスタ装置(200)と第2スレーブ装置(400)との間に接続され、PTPに従って第2スレーブ装置(400)とともにマスタ装置(200)との時刻同期を行う。第1同期情報送信部(332)は、第2スレーブ装置(400)にSyncメッセージ、Follow_Upメッセージを送信し、第1要求情報受信部(313)は、第2スレーブ装置(400)からDelay_Reqメッセージを受信し、第1応答情報送信部(333)は、Delay_Respメッセージを第2スレーブ装置(400)に送信する。第1時刻補正部(320)は、Syncメッセージの送信からDelay_Reqメッセージの受信までの期間とは異なる期間においてマスタ装置(200)とメッセージを送受信したときに特定した時刻から算出されるマスタ装置(200)との伝搬遅延時間に基づいて時刻を補正する。

Description

時刻同期装置、時刻同期システム、時刻同期方法及びプログラム
 本開示は、時刻同期装置、時刻同期システム、時刻同期方法及びプログラムに関する。
 ネットワーク内の装置の時刻を同期させる時刻同期システムは、金融業、製造業、通信業等の様々な産業において利用されている。また、このような時刻同期システムにおいて、IEEE(Institute of Electrical and Electronics Engineers)1588に規定されているPTP(Precision Time Protocol)が用いられていることが知られている。PTPは、グランドマスタクロック(GMC, Gland Master Clock)、所謂グランドマスタが送信したメッセージを受信したスレーブがグランドマスタの時刻と同期する規格である。PTPでは、ネットワーク内において高精度な時刻を持つ装置がグランドマスタとして機能し、グランドマスタ以外の装置がスレーブとして機能する。また、PTPでは、ネットワークが大規模であれば何れかのスレーブがバウンダリークロック(BC, Boundary Clock)として機能し、バウンダリークロックは、グランドマスタから受信したメッセージを接続された他のスレーブに中継する。
 このようなPTPを用いた時刻同期システムの一例として、特許文献1には、無線基地局に設けられたベースバンドユニットと、複数のスイッチ装置を含むパケット転送ネットワークと、パケット転送ネットワークに対する基準時刻の供給源であるグランドマスタとを有する無線通信システムが開示されている。特許文献1では、スイッチ装置はバウンダリークロックとして機能しており、グランドマスタから8台のスイッチ装置を経由してベースバンドユニットに基準時刻が供給される。また、特許文献1では、グランドマスタの基準時刻に対する時刻の誤差の予め定めた上限値、グランドマスタから経由するスイッチ装置の台数及び経路上のスイッチ装置毎の時刻の誤差に基づいて、ベースバンドユニットにおける時刻の誤差の許容量を算出している。なお、特許文献1では、経路上のスイッチ装置毎の時刻の誤差が50nsで同一となる場合が例示されている。
特開2018-088646号公報
 特許文献1に記載の無線通信システムでは、同一のスイッチ装置を用いて時刻同期の精度を同一としていると考えられるが、例えば、インターネットを用いる時刻同期システムでは、スイッチ装置毎に所有者が異なり、スイッチ装置のメーカ、仕様等が異なることで時刻同期の精度も異なることがある。時刻同期の精度が異なる複数種類のスイッチ装置を用いる場合、スイッチ装置毎に時刻同期のタイミングが設定されている可能姓が高く、スイッチ装置毎に時刻同期のタイミングが設定されているときには、スイッチ装置やベースバンドユニットが時刻を補正しても補正した時刻と基準時刻との誤差が大きくなる可能姓がある。例えば、第1のスイッチ装置から第2のスイッチ装置がメッセージを送受信することで第2のスイッチ装置が時刻を補正する場合においてスイッチ装置毎に時刻同期のタイミングが設定されているときには、第2のスイッチ装置が第1のスイッチ装置とメッセージを送受信しているときに第1のスイッチ装置が時刻を補正する可能性がある。この場合、第2のスイッチ装置が受信したメッセージに第1のスイッチ装置の補正前の時刻に関する情報と補正後の時刻に関する情報とが含まれることがあり、これらの情報に基づいて第2のスイッチ装置が時刻を補正すると、補正した時刻と基準時刻との誤差が大きくなる問題がある。
 本開示は、上述のような事情に鑑みてなされたものであり、時刻の誤差を低減することを目的とする。
 上記目的を達成するため、本開示に係る時刻同期装置は、時刻を保持する時刻保持装置に接続され、IEEE(Institute of Electrical and Electronics Engineers)1588規格のPTP(Precision Time Protocol)に従って前記時刻保持装置に接続されていない他の時刻同期装置とともに時刻保持装置との時刻同期を行う。時刻同期装置は、同期情報送信部と、要求情報受信部と、応答情報送信部と、時刻補正部とを備える。同期情報送信部は、時刻同期に関する同期情報を他の時刻同期装置に送信する。要求情報受信部は、同期情報送信部が同期情報を送信した後に他の時刻同期装置から送信された要求情報を受信する。応答情報送信部は、要求情報受信部が受信した要求情報に対する応答情報を他の時刻同期装置に送信する。時刻補正部は、同期情報送信部が同期情報を送信してから要求情報受信部が要求情報を受信するまでの期間とは異なる期間において、時刻保持装置と情報を送受信したときに特定した時刻から算出される時刻保持装置との伝搬遅延時間に基づいて時刻を補正する。
 本開示によれば、他の時刻同期装置に同期情報を送信してから要求情報を他の時刻同期装置から受信するまでの期間に時刻同期装置が時刻を補正しない。このため、時刻同期装置と他の時刻同期装置とが別々に時刻同期のタイミングを設定していたとしても、他の時刻同期装置では、当該期間において算出した伝搬遅延時間に誤差が発生することを防止できる。したがって、他の時刻同期装置に同期情報を送信してから要求情報を他の時刻同期装置から受信するまでの期間に時刻を補正する時刻同期装置よりも他の時刻同期装置の時刻の誤差を低減できる。
本開示の実施の形態に係る時刻同期システムの全体説明図 本実施の形態に係る時刻同期システムの機能構成を示す図 本実施の形態に係る第1スレーブ装置及び第2スレーブ装置のハードウェア構成を示すブロック図 本実施の形態に係る第1時刻同期処理の流れを示すフローチャート 本実施の形態に係る第2時刻同期処理の流れを示すフローチャート 本実施の形態に係る時刻同期システムにおけるメッセージの送受信の例を示すタイミングチャート 従来の時刻同期システムにおけるメッセージの送受信の例を示すタイミングチャート 従来の時刻同期システムにおける時刻の誤差の変化の例を示す図 本実施の形態に係る時刻同期システムにおける時刻の誤差の変化の例を示す図 本実施の形態の変更例に係る時刻同期システムにおけるメッセージの送受信の例を示すタイミングチャート
 以下に、本開示を実施するための形態に係る時刻同期装置、時刻同期システム、時刻同期方法及びプログラムについて図面を参照して詳細に説明する。なお、図中同一または相当する部分には同じ符号を付す。
 本開示の実施の形態に係る時刻同期システムは、PTPに従って時刻保持装置の一例としてのマスタ装置に接続された時刻同期装置の一例としてのスレーブ装置の時刻をマスタ装置の時刻と同期させるシステムである。なお、PTPに従って時刻同期を行う時刻同期システムでは、マスタ装置とスレーブ装置との間で時刻情報の一例としてのメッセージを送受信し、スレーブ装置がマスタ装置とのメッセージの伝搬遅延時間を算出して時刻を補正する。
 具体的には、先ず、マスタ装置は、時刻同期に関する同期情報の一例としてのSyncメッセージ(Sync Message)、Follow_Upメッセージ(Follow Up Message)の順にスレーブ装置に送信する。なお、Follow_Upメッセージには、Syncメッセージを送信した時刻である第1時刻T1を特定可能な情報が含まれている。次に、スレーブ装置は、Syncメッセージを受信して受信した第2時刻T2を特定した後、Follow_Upメッセージを受信して第1時刻T1を特定する。次に、スレーブ装置は、同期情報に基づいて伝搬遅延時間の算出に用いる情報を要求する要求情報の一例としてのDelay_Reqメッセージ(Delay Request Message)をマスタ装置に送信して送信した時刻である第3時刻T3を特定する。次に、マスタ装置は、Delay_Reqメッセージを受信して受信した第4時刻T4を特定した後、要求情報に対する応答情報の一例としてのDelay_Respメッセージ(Delay Response message)をスレーブ装置に送信する。なお、Delay_Respメッセージには、Delay_Reqメッセージを送信した時刻である第4時刻T4を特定可能な情報が含まれている。次に、スレーブ装置は、Delay_Respメッセージを受信して第4時刻T4を特定する。そして、スレーブ装置は、特定した第1時刻T1、第2時刻T2、第3時刻T3、第4時刻T4から伝搬遅延時間を算出し、時刻を補正する。なお、伝搬遅延時間をdとし、時刻の補正量をtcとした場合、伝搬遅延時間dは、以下の(1)に示す数式を用いて算出され、時刻の補正量tcは、以下の(2)に示す数式を用いて算出される。
d={(T4-T1)-(T3-T2)}/2  …(1)
tc=T1+d               …(2)
 このため、以下に説明する本実施の形態に係る時刻同期システムにおいても同様に、マスタ装置とスレーブ装置との間でメッセージが送受信され、スレーブ装置においてマスタ装置とのメッセージの伝搬遅延時間が算出されて時刻が補正される。
 図1は、本開示の実施の形態に係る時刻同期システムの全体説明図である。
 本実施の形態に係る時刻同期システム100は、図1に示すように、時刻保持装置の一例としてのマスタ装置200を備える。また、時刻同期システム100は、マスタ装置200に接続された時刻同期装置の一例であって第1時刻同期装置の一例としての第1スレーブ装置300を備える。また、時刻同期システム100は、マスタ装置200に接続されずに第1スレーブ装置300に接続された他の時刻同期装置の一例であって第2時刻同期装置の一例としての第2スレーブ装置400を備える。
 マスタ装置200、第1スレーブ装置300、第2スレーブ装置400は、LAN(Local Area Network)を介してデータの送受信が可能となっている。具体的には、マスタ装置200は、マスターポート201を備え、第1スレーブ装置300は、スレーブポート301及びマスターポート302を備え、第2スレーブ装置400は、スレーブポート401及びマスターポート402を備える。そして、マスタ装置200は、マスターポート201がLANを介して第1スレーブ装置300のスレーブポート301と接続されることで、第1スレーブ装置300との時刻同期に関するデータの送受信が可能となっている。また、第1スレーブ装置300もマスタ装置200と同様に、マスターポート302がLANを介して第2スレーブ装置400のスレーブポート401と接続されることで、第2スレーブ装置400とのデータの送受信が可能となっている。
 マスタ装置200は、例えば、PTPにおいてグランドマスタとして機能するコンピュータであり、時刻同期システム100において基準時刻として最高品質のクロックを保持する。なお、マスタ装置200は、PTPにおいて基準時刻を保持している限りにおいてグランドマスタに限定されず、例えば、グランドマスタの基準時刻との誤差がないバウンダリークロックとして機能するコンピュータであってもよい。具体的には、先ず、マスタ装置200は、Syncメッセージ、Follow_Upメッセージの順に第1スレーブ装置300に送信する。そして、マスタ装置200は、第1スレーブ装置300からDelay_Reqメッセージを受信した後、Delay_Respメッセージを第1スレーブ装置300に送信する。
 図2は、本実施の形態に係る時刻同期システムの機能構成を示す図である。
 第1スレーブ装置300及び第2スレーブ装置400は、例えば、PTPにおいてバウンダリークロックとして機能するコンピュータである。図2に示すように、第1スレーブ装置300は、マスタ装置200から送信された基準時刻に基づく時刻情報を受信する時刻情報受信部の一例としての第1時刻情報受信部310を備える。また、第1スレーブ装置300は、時刻を補正する時刻補正部の一例としての第1時刻補正部320、時刻情報を第2スレーブ装置400に送信する時刻情報送信部の一例としての第1時刻情報送信部330を備える。
 第1時刻情報受信部310は、マスタ装置200から送信された同期情報を受信する同期情報受信部の一例としての第1同期情報受信部311、マスタ装置200から送信された応答情報を受信する応答情報受信部の一例としての第1応答情報受信部312を備える。また、第1時刻情報受信部310は、第2スレーブ装置400から送信された要求情報を受信する要求情報受信部の一例としての第1要求情報受信部313を備える。
 第1時刻情報送信部330は、要求情報をマスタ装置200に送信する要求情報送信部の一例としての第1要求情報送信部331を備える。また、第1時刻情報送信部330は、同期情報を第2スレーブ装置400に送信する同期情報送信部の一例としての第1同期情報送信部332、応答情報を第2スレーブ装置400に送信する応答情報送信部の一例としての第1応答情報送信部333を備える。
 具体的には、第1同期情報受信部311は、マスタ装置200から送信されたSyncメッセージ及びFollow_Upメッセージを受信する。また、第1要求情報送信部331は、Delay_Reqメッセージをマスタ装置200に送信する。また、第1応答情報受信部312は、マスタ装置200から送信されたDelay_Respメッセージを受信する。また、第1同期情報送信部332は、Syncメッセージ及びFollow_Upメッセージを第2スレーブ装置400に送信する。また、第1要求情報受信部313は、第2スレーブ装置400から送信されたDelay_Reqメッセージを受信する。また、第1応答情報送信部333は、Delay_Respメッセージを第2スレーブ装置400に送信する。
 第1時刻補正部320は、第1同期情報受信部311と第1要求情報送信部331と第1応答情報受信部312とによってマスタ装置200とメッセージを送受信したときに特定した時刻Ta1~Ta4から算出されるマスタ装置200との伝搬遅延時間dに基づいて時刻を補正する。具体的には、第1時刻補正部320は、第1応答情報受信部312がDelay_Respメッセージの受信を完了したタイミングから時刻の補正を開始し、先ず、第1時刻補正部320は、第1同期情報受信部311がSyncメッセージを受信した第2時刻Ta2を特定する。次に、第1時刻補正部320は、第1同期情報受信部311が受信したFollow_Upメッセージからマスタ装置200がSyncメッセージを送信した第1時刻Ta1を特定する。次に、第1時刻補正部320は、第1要求情報送信部331がDelay_Reqメッセージをマスタ装置200に送信した第3時刻Ta3を特定する。次に、第1時刻補正部320は、第1応答情報受信部312が受信したDelay_Respメッセージからマスタ装置200がDelay_Reqメッセージを受信した第4時刻Ta4を特定する。そして、第1時刻補正部320は、T1=Ta1、T2=Ta2、T3=Ta3、T4=Ta4とすることで、上述した(1)に示す数式を用いて伝搬遅延時間dを算出し、上述した(2)に示す数式を用いて補正量tcを算出し、算出した補正量tcに基づいて時刻を補正する。
 なお、第1同期情報送信部332は、第1時刻補正部320が時刻を補正してから第1同期情報受信部311が新たな同期情報を受信するまでの間に補正した時刻に基づく同期情報を送信する。例えば、第1同期情報送信部332は、第1時刻補正部320が時刻の補正を完了したタイミングから同期情報の送信を開始する。具体的には、第1同期情報送信部332は、第1時刻補正部320が時刻の補正を完了したタイミングにSyncメッセージの送信を開始する。
 また、第1時刻補正部320は、第1同期情報送信部332がSyncメッセージを送信してから第1要求情報受信部313がDelay_Reqメッセージを受信するまでの期間において、時刻の補正を行うことができない。例えば、第1スレーブ装置300は、Syncメッセージを送信してからDelay_Reqメッセージを受信するまでの期間において、時刻の補正を禁止するフラグをオンにし、フラグがオンになっている間、第1時刻補正部320が時刻の補正を行わないようにしてもよい。
 第2スレーブ装置400は、第1スレーブ装置300から送信された時刻情報を受信する時刻情報受信部の一例としての第2時刻情報受信部410、時刻を補正する時刻補正部の一例としての第2時刻補正部420を備える。また、第2スレーブ装置400は、時刻情報を送信する時刻情報送信部の一例としての第2時刻情報送信部430を備える。
 第2時刻情報受信部410は、第1スレーブ装置300から送信された同期情報を受信する同期情報受信部の一例としての第2同期情報受信部411、第1スレーブ装置300から送信された応答情報を受信する応答情報受信部の一例としての第2応答情報受信部412を備える。また、第2時刻情報受信部410は、第2スレーブ装置400に図示しない第3スレーブ装置が接続されているときに、第3スレーブ装置から送信された要求情報を受信する要求情報受信部の一例としての第2要求情報受信部413を備える。
 第2時刻情報送信部430は、要求情報を第1スレーブ装置300に送信する要求情報送信部の一例としての第2要求情報送信部431を備える。また、第2時刻情報送信部430は、第3スレーブ装置が接続されているときに、同期情報を第3スレーブ装置に送信する同期情報送信部の一例としての第2同期情報送信部432、応答情報を第3スレーブ装置に送信する応答情報送信部の一例としての第2応答情報送信部433を備える。
 具体的には、第2同期情報受信部411は、第1同期情報送信部332が送信したSyncメッセージ及びFollow_Upメッセージを受信する。また、第2要求情報送信部431は、Delay_Reqメッセージを第1要求情報受信部313に送信する。また、第2応答情報受信部412は、第1応答情報送信部333が送信したDelay_Respメッセージを受信する。また、第2同期情報送信部432は、Syncメッセージ及びFollow_Upメッセージを第3スレーブ装置に送信する。また、第2要求情報受信部413は、第3スレーブ装置から送信されたDelay_Reqメッセージを受信する。また、第2応答情報送信部433は、Delay_Respメッセージを第3スレーブ装置に送信する。
 第2時刻補正部420は、第1時刻補正部320と同様に、第2同期情報受信部411と第2要求情報送信部431と第2応答情報受信部412とによって第1スレーブ装置300とメッセージを送受信したときに特定した時刻Tb1~Tb4から算出される第1スレーブ装置300との伝搬遅延時間dとに基づいて時刻を補正する。具体的には、第2時刻補正部420は、第2応答情報受信部412がDelay_Respメッセージの受信を完了したタイミングから時刻の補正を開始し、先ず、第2時刻補正部420は、第2同期情報受信部411がSyncメッセージを受信した第2時刻Tb2を特定する。次に、第2時刻補正部420は、第2同期情報受信部411が受信したFollow_Upメッセージから第1同期情報送信部332がSyncメッセージを送信した第1時刻Tb1を特定する。次に、第2時刻補正部420は、第2要求情報送信部431がDelay_Reqメッセージを第1要求情報受信部313に送信した第3時刻Tb3を特定する。次に、第2時刻補正部420は、第2応答情報受信部412が受信したDelay_Respメッセージから第2応答情報受信部412がDelay_Reqメッセージを受信した第4時刻Tb4を特定する。そして、第2時刻補正部420は、第1時刻補正部320と同様に、T1=Tb1、T2=Tb2、T3=Tb3、T4=Tb4とすることで、上述した(1)に示す数式を用いて伝搬遅延時間dを算出し、上述した(2)に示す数式を用いて補正量tcを算出し、算出した補正量tcに基づいて時刻を補正する。
 なお、第2同期情報送信部432は、第2スレーブ装置400に第3スレーブ装置が接続されている場合、第1同期情報送信部332と同様に、第2時刻補正部420が時刻を補正してから第2同期情報受信部411が新たな同期情報を受信するまでの間に補正した時刻に基づく同期情報を送信する。例えば、第2同期情報送信部432は、第2時刻補正部420が時刻の補正を完了したタイミングから同期情報の送信を開始する。具体的には、第2同期情報送信部432は、第2時刻補正部420が時刻の補正を完了したタイミングにSyncメッセージの送信を開始する。
 また、第2時刻補正部420は、第1時刻補正部320と同様に、例えば、時刻の補正を禁止するフラグがオンになっていることにより、第2同期情報送信部432がSyncメッセージを送信してから第2要求情報受信部413がDelay_Reqメッセージを受信するまでの期間において、時刻の補正が行うことができない。
 図3は、本実施の形態に係る第1スレーブ装置及び第2スレーブ装置のハードウェア構成を示すブロック図である。
 図1、図2に示す第1スレーブ装置300及び第2スレーブ装置400は、図3に示すハードウェアによって構成されている。第1スレーブ装置300は、制御部51、主記憶部52、外部記憶部53、送受信部54を備える。また、第2スレーブ装置400は、第1スレーブ装置300と同様に、制御部51、主記憶部52、外部記憶部53、送受信部54を備える。なお、図示は省略するが、マスタ装置200は、第1スレーブ装置300及び第2スレーブ装置400と同様に、制御部51、主記憶部52、外部記憶部53、送受信部54を備えてもよい。
 制御部51は、制御プログラム59に従って処理を実行する。制御部51は、CPU(Central Processing Unit)を備える。制御部51は、制御プログラム59に従って、第1スレーブ装置300が備える第1時刻補正部320として機能する。また、制御部51は、制御プログラム59に従って、第2スレーブ装置400が備える第2時刻補正部420として機能する。
 主記憶部52は、制御プログラム59をロードし、制御部51の作業領域として用いられる。主記憶部52は、RAM(Random-Access Memory)を備える。
 外部記憶部53は、制御プログラム59を予め記憶する。外部記憶部53は、制御部51の指示に従って、このプログラムが記憶するデータを制御部51に供給し、制御部51から供給されたデータを記憶する。外部記憶部53は、フラッシュメモリ、HDD(Hard Disk Drive)、SSD(Solid State Dive)等の不揮発性メモリを備える。
 送受信部54は、情報を送受信する。送受信部54は、ネットワークに接続する網終端装置、無線通信装置等の情報通信部品を備える。送受信部54は、第1スレーブ装置300が備える第1時刻情報受信部310、第1同期情報受信部311、第1応答情報受信部312、第1要求情報受信部313、第1時刻情報送信部330、第1要求情報送信部331、第1同期情報送信部332、第1応答情報送信部333として機能する。また、送受信部54は、第2スレーブ装置400が備える第2時刻情報受信部410、第2同期情報受信部411、第2応答情報受信部412、第2要求情報受信部413、第2時刻情報送信部430、第2要求情報送信部431、第2同期情報送信部432、第2応答情報送信部433として機能する。
 第1スレーブ装置300では、主記憶部52、外部記憶部53及び送受信部54はいずれも内部バス50を介して制御部51に接続されている。また、第2スレーブ装置400では、第1スレーブ装置300と同様に、主記憶部52、外部記憶部53及び送受信部54はいずれも内部バス50を介して制御部51に接続されている。
 図1、図2に示す第1スレーブ装置300は、制御部51が主記憶部52、外部記憶部53及び送受信部54を資源として用いることによって、第1時刻情報受信部310、第1同期情報受信部311、第1応答情報受信部312、第1要求情報受信部313、第1時刻補正部320、第1時刻情報送信部330、第1要求情報送信部331、第1同期情報送信部332、第1応答情報送信部333の機能を実現する。例えば、第1スレーブ装置300は、第1時刻情報受信部310が行う時刻情報受信ステップの一例としての第1時刻情報受信ステップを実行する。また、第1スレーブ装置300は、第1同期情報受信部311が行う同期情報受信ステップの一例としての第1同期情報受信ステップ、第1応答情報受信部312が行う応答情報受信ステップの一例としての第1応答情報受信ステップ、第1要求情報受信部313が行う要求情報受信ステップの一例としての第1要求情報受信ステップを実行する。また、第1スレーブ装置300は、第1時刻補正部320が行う時刻補正ステップの一例としての第1時刻補正ステップを実行する。また、第1スレーブ装置300は、第1時刻情報送信部330が行う時刻情報送信ステップの一例としての第1時刻情報送信ステップを実行する。また、第1スレーブ装置300は、第1要求情報送信部331が行う要求情報送信ステップの一例としての第1要求情報送信ステップ、第1同期情報送信部332が行う同期情報送信ステップの一例としての第1同期情報送信ステップ、第1応答情報送信部333が行う応答情報送信ステップの一例としての第1応答情報送信ステップを実行する。
 また、第2スレーブ装置400は、制御部51が主記憶部52、外部記憶部53及び送受信部54を資源として用いることによって、第2時刻情報受信部410、第2同期情報受信部411、第2応答情報受信部412、第2要求情報受信部413、第2時刻補正部420、第2時刻情報送信部430、第2要求情報送信部431、第2同期情報送信部432、第2応答情報送信部433の機能を実現する。例えば、第2スレーブ装置400は、第2時刻情報受信部410が行う時刻情報受信ステップの一例としての第1時刻情報受信ステップを実行する。また、第2スレーブ装置400は、第2同期情報受信部411が行う同期情報受信ステップの一例としての第2同期情報受信ステップ、第2応答情報受信部412が行う応答情報受信ステップの一例としての第2応答情報受信ステップ、第2要求情報受信部413が行う要求情報受信ステップの一例としての第2要求情報受信ステップを実行する。また、第2スレーブ装置400は、第2時刻補正部320が行う時刻補正ステップの一例としての第2時刻補正ステップを実行する。また、第2スレーブ装置400は、第2時刻情報送信部430が行う時刻情報送信ステップの一例としての第2時刻情報送信ステップを実行する。また、第2スレーブ装置400は、第2要求情報送信部431が行う要求情報送信ステップの一例としての第2要求情報送信ステップ、第2同期情報送信部432が行う同期情報送信ステップの一例としての第2同期情報送信ステップ、第2応答情報送信部433が行う応答情報送信ステップの一例としての第2応答情報送信ステップを実行する。
 なお、第1スレーブ装置300及び第2スレーブ装置400では、データの入出力を送受信部54で行っており、入力されたデータを制御部51に供給する操作部は不要であるが、このような操作部を備えてもよい。この場合、操作部は、キーボード、マウス、タッチパネル、操作ボタン等の情報入力部品を備えてもよい。
 なお、第1スレーブ装置300及び第2スレーブ装置400では、入出力されるデータを表示する表示部は不要であるが、このような表示部を備えてもよい。この場合、表示部は、LCD(Liquid Crystal Display)、有機EL(Electro-Luminescence)ディスプレイ等の表示装置を備えてもよい。
 図4は、本実施の形態に係る第1時刻同期処理の流れを示すフローチャートである。
 次に、図4に示すフローチャートを用いて第1スレーブ装置300がマスタ装置200の時刻と同期する動作について説明する。先ず、図4に示すように、第1スレーブ装置300は、第1同期情報受信部311がマスタ装置200からSyncメッセージ及びFollow_Upメッセージを受信したか否かを判定する(ステップS101)。Syncメッセージ及びFollow_Upメッセージを受信していない場合(ステップS101;N)、第1スレーブ装置300は、第1同期情報受信部311がSyncメッセージ及びFollow_Upメッセージを受信するまでステップS101の処理を繰り返す。一方、Syncメッセージ及びFollow_Upメッセージを受信した場合(ステップS101;Y)、第1要求情報送信部331は、マスタ装置200にDelay_Reqメッセージを送信する(ステップS102)。
 Delay_Reqメッセージ送信後、第1スレーブ装置300は、第1応答情報受信部312がマスタ装置200からDelay_Respメッセージを受信したか否かを判定する(ステップS103)。Delay_Respメッセージを受信していない場合(ステップS103;N)、第1スレーブ装置300は、第1応答情報受信部312がDelay_Respメッセージを受信するまでステップS103の処理を繰り返す。一方、Delay_Respメッセージを受信した場合(ステップS103;Y)、第1時刻補正部320は、メッセージの送受信によって特定した第1時刻Ta1、第2時刻Ta2、第3時刻Ta3、第4時刻Ta4を用いて時刻の補正を開始する(ステップS104)。時刻補正開始後、第1スレーブ装置300は、第1時刻補正部320が時刻の補正が完了したか否かを判定する(ステップS105)。時刻の補正が完了していない場合(ステップS105;N)、第1スレーブ装置300は、第1時刻補正部320が時刻の補正が完了するまでステップS105の処理を繰り返す。一方、時刻の補正が完了した場合(ステップS105;Y)、第1同期情報送信部332は、第2スレーブ装置400にSyncメッセージ、Follow_Upメッセージの順に送信する(ステップS106)。
 Follow_Upメッセージ送信後、第1スレーブ装置300は、第1要求情報受信部313が第2スレーブ装置400からDelay_Reqメッセージを受信したか否かを判定する(ステップS107)。Delay_Reqメッセージを受信していない場合(ステップS107;N)、第1スレーブ装置300は、第1要求情報受信部313が第2スレーブ装置400からDelay_Reqメッセージを受信するまでステップS107の処理を繰り返す。一方、Delay_Reqメッセージを受信した場合(ステップS107;Y)、第1応答情報送信部333は、第2スレーブ装置400にDelay_Respメッセージを送信し(ステップS108)、第1時刻同期処理を終了する。
 図5は、本実施の形態に係る第2時刻同期処理の流れを示すフローチャートである。
 次に、図5に示すフローチャートを用いて第2スレーブ装置400が第1スレーブ装置300を経由してマスタ装置200の時刻と同期する動作について説明する。先ず、図5に示すように、第2スレーブ装置400は、第2同期情報受信部411が第1スレーブ装置300からSyncメッセージ及びFollow_Upメッセージを受信したか否かを判定する(ステップS201)。Syncメッセージ及びFollow_Upメッセージを受信していない場合(ステップS201;N)、第2スレーブ装置400は、第2同期情報受信部411がSyncメッセージ及びFollow_Upメッセージを受信するまでステップS201の処理を繰り返す。一方、Syncメッセージ及びFollow_Upメッセージを受信した場合(ステップS201;Y)、第2要求情報送信部431は、第1スレーブ装置300にDelay_Reqメッセージを送信する(ステップS202)。
 Delay_Reqメッセージ送信後、第2スレーブ装置400は、第2応答情報受信部412が第1スレーブ装置300からDelay_Respメッセージを受信したか否かを判定する(ステップS203)。Delay_Respメッセージを受信していない場合(ステップS203;N)、第2スレーブ装置400は、第2応答情報受信部412がDelay_Respメッセージを受信するまでステップS203の処理を繰り返す。一方、Delay_Respメッセージを受信した場合(ステップS203;Y)、第2時刻補正部420は、メッセージの送受信によって特定した第1時刻Tb1、第2時刻Tb2、第3時刻Tb3、第4時刻Tb4を用いて時刻の補正を開始する(ステップS204)。時刻補正開始後、第2スレーブ装置400は、第2時刻補正部420が時刻の補正が完了したか否かを判定する(ステップS205)。時刻の補正が完了していない場合(ステップS205;N)、第2スレーブ装置400は、第2時刻補正部420が時刻の補正が完了するまでステップS205の処理を繰り返す。一方、時刻の補正が完了した場合(ステップS205;Y)、第2スレーブ装置400は、第3スレーブ装置が接続されていなければ、第2時刻同期処理を終了する。
 なお、図示は省略するが、第2スレーブ装置400は、第3スレーブ装置が接続されていれば、第1時刻同期処理のステップS106~S108の処理と同様の処理を実行し、第2時刻同期処理を終了する。具体的には、第2同期情報送信部432は、第3スレーブ装置にSyncメッセージ、Follow_Upメッセージの順に送信する。そして、第2要求情報受信部413が第3スレーブ装置からDelay_Reqメッセージを受信した場合、第2応答情報送信部433は、第3スレーブ装置にDelay_Respメッセージを送信し、第2時刻同期処理を終了する。
 図6は、本実施の形態に係る時刻同期システムにおけるメッセージの送受信の例を示すタイミングチャートである。
 次に、図6に示すタイミングチャートを用いて時刻同期システムにおいてマスタ装置200、第1スレーブ装置300、第2スレーブ装置400がメッセージを送受信して第1スレーブ装置300および第2スレーブ装置400が時刻を補正するタイミングについて説明する。図6に示すように、マスタ装置200は、第1時刻Ta1においてSyncメッセージを第1スレーブ装置300に送信し、第1スレーブ装置300は、第2時刻Ta2においてSyncメッセージを受信する。また、マスタ装置200は、Syncメッセージ送信後に第1時刻Ta1を特定可能なFollow_Upメッセージを第1スレーブ装置300に送信し、第1スレーブ装置300は、Follow_Upメッセージを受信して第1時刻Ta1を特定する。
 Follow_Upメッセージ受信後、第1スレーブ装置300は、第3時刻Ta3においてDelay_Reqメッセージをマスタ装置200に送信し、マスタ装置200は、第4時刻Ta4においてDelay_Reqメッセージを受信する。また、マスタ装置200は、Delay_Reqメッセージ受信後に第4時刻Ta4を特定可能なDelay_Respメッセージを第1スレーブ装置300に送信し、第1スレーブ装置300は、Delay_Respメッセージを受信して第4時刻T4を特定する。
 よって、第1スレーブ装置300は、マスタ装置200がSyncメッセージを送信してからDelay_Reqメッセージを受信するまでの期間において第1時刻Ta1、第2時刻Ta2、第3時刻Ta3、第4時刻Ta4を測定することになり、最終的に第4時刻Ta4を特定可能なDelay_Respメッセージを受信することで伝搬遅延時間dが算出できる。以下、マスタ装置200がSyncメッセージを送信してからDelay_Reqメッセージを受信するまでの期間を第1スレーブ装置300とマスタ装置200との伝搬遅延測定期間として説明する。
 マスタ装置200との伝搬遅延測定期間が経過してDelay_Respメッセージを受信した後、第1スレーブ装置300は、上述した(1)に示す数式を用いて測定した第1時刻Ta1、第2時刻Ta2、第3時刻Ta3、第4時刻Ta4から伝搬遅延時間dを算出する。また、第1スレーブ装置300は、上述した(2)に示す数式を用いて算出した伝搬遅延時間dから補正量tcを算出し、算出した補正量tcに基づいて時刻を補正する。以下、第1スレーブ装置300が伝搬遅延時間dの算出を開始してから時刻を補正するまでの期間を第1スレーブ装置300の時刻補正期間として説明する。
 時刻補正期間経過後、第1スレーブ装置300は、第1時刻Tb1においてSyncメッセージを第2スレーブ装置400に送信し、第2スレーブ装置400は、第2時刻Tb2においてSyncメッセージを受信して伝搬遅延測定期間を開始する。また、第1スレーブ装置300は、Syncメッセージ送信後に第1時刻Tb1を特定可能なFollow_Upメッセージを第2スレーブ装置400に送信し、第2スレーブ装置400は、Follow_Upメッセージを受信して第1時刻Tb1を特定する。また、第2スレーブ装置400は、Follow_Upメッセージ受信後の第3時刻Tb3においてDelay_Reqメッセージを第1スレーブ装置300に送信し、第1スレーブ装置300は、第4時刻Tb4においてDelay_Reqメッセージを受信する。
 Delay_Reqメッセージ受信後、第1スレーブ装置300は、第4時刻Tb4を特定可能なDelay_Respメッセージを第2スレーブ装置400に送信し、第2スレーブ装置400は、Delay_Respメッセージを受信して第4時刻Tb4を特定して伝搬遅延測定期間を終了する。なお、第1スレーブ装置300は、Syncメッセージを送信してからDelay_Reqメッセージを受信するまでの期間、すなわち、第1スレーブ装置300と第2スレーブ装置400との伝搬遅延測定期間において、新たに時刻を補正することが禁止される。以下、第1スレーブ装置300がSyncメッセージを送信してからDelay_Reqメッセージを受信するまでの期間を第1スレーブ装置300の時刻補正禁止期間と説明することがある。
 第1スレーブ装置300との伝搬遅延測定期間が経過してDelay_Respメッセージを受信した後、第2スレーブ装置400は、時刻補正期間を開始して上述した(1)に示す数式を用いて測定した第1時刻Tb1、第2時刻Tb2、第3時刻Tb3、第4時刻Tb4から伝搬遅延時間dを算出する。そして、第2スレーブ装置400は、上述した(2)に示す数式を用いて算出した伝搬遅延時間dから補正量tcを算出し、算出した補正量tcに基づいて時刻を補正して時刻補正期間を終了する。
 以上説明したように、本実施の形態に係る時刻同期システム100によれば、第1スレーブ装置300は、基準時刻を保持するマスタ装置200と第2スレーブ装置400との間に接続されており、PTPに従って第2スレーブ装置400とともにマスタ装置200との時刻同期を行う。
第1同期情報送信部332は、第2スレーブ装置400にSyncメッセージ、Follow_Upメッセージの順に送信する。また、第1要求情報受信部313は、第1同期情報送信部332がFollow_Upメッセージを送信した後に第2スレーブ装置400から送信されたDelay_Reqメッセージを受信する。また、第1応答情報送信部333は、第1要求情報受信部313が受信したDelay_Reqメッセージに対するDelay_Respメッセージを第2スレーブ装置400に送信する。そして、第1時刻補正部320は、第1同期情報送信部332がSyncメッセージを送信してから第1要求情報受信部313がDelay_Reqメッセージを受信するまでの伝搬遅延測定期間とは異なる期間において、マスタ装置200とメッセージを送受信したときに特定した時刻Ta1~Ta4から算出されるマスタ装置200との伝搬遅延時間dに基づいて時刻を補正する。
 このようにすることで、第1スレーブ装置300か第2スレーブ装置400にSyncメッセージを送信してからDelay_Reqメッセージを第2スレーブ装置400から受信するまでの期間、すなわち、第2スレーブ装置400との伝搬遅延測定期間において第1スレーブ装置300が時刻を補正しない。このため、第1スレーブ装置300と第2スレーブ装置400とが別々に時刻同期のタイミングを設定していたとしても、第2スレーブ装置400では、当該期間において算出した伝搬遅延時間に誤差が発生することを防止できる。したがって、第1スレーブ装置が第2スレーブ装置にSyncメッセージを送信してからDelay_Reqメッセージを第2スレーブ装置から受信するまでの期間に時刻を補正する時刻同期システムよりも第2スレーブ装置400の時刻の誤差を低減できる。
 ここで、IEEE1588規格では、バウンダリークロックが時刻の補正を実行するタイミングと、バウンダリークロックが接続されたスレーブ装置にメッセージを送信するタイミングとについて規定していない。このため、PTPに従って時刻同期を行う従来の時刻同期システムは、バウンダリークロックとして機能するスレーブ装置毎に、例えば、メーカ、仕様等が異なることで、時刻同期の精度が異なる問題がある。例えば、従来の時刻同期システムでは、バウンダリークロックとして機能する第1スレーブ装置が第2スレーブ装置とメッセージを送受信している間、すなわち、第1スレーブ装置と第2スレーブ装置との伝搬遅延測定期間中に第1スレーブ装置がマスタ装置とメッセージを送受信して時刻を補正する可能性がある。
 図7は、従来の時刻同期システムにおけるメッセージの送受信の例を示すタイミングチャートである。
 例えば、図7に示すように、従来の時刻同期システムにおいて、第1スレーブ装置が第2スレーブ装置にSyncメッセージ、Follow_Upメッセージを送信した後にマスタ装置からDelay_Respメッセージを受信する場合について考える。この場合、第1スレーブ装置が第2スレーブ装置からDelay_Reqメッセージを受信する前に時刻の補正を完了する場合がある。この場合、第1スレーブ装置は、補正前の時刻に基づく第1時刻Tb1を特定可能なFollow_Upメッセージを送信した後に補正後の時刻に基づく第4時刻Tb4を特定可能なDelay_Respメッセージを送信することになる。この結果、第1スレーブ装置は、第2スレーブ装置との伝搬遅延測定期間中に時刻の補正を完了することになり、第2スレーブ装置は、第1スレーブ装置の補正前の時刻に基づく第1時刻Tb1及び補正後の時刻に基づく第4時刻Tb4を用いて時刻の補正を行うことになる。
 図8は、従来の時刻同期システムにおける時刻の誤差の変化の例を示す図である。なお、図8は、第1スレーブ装置とマスタ装置との時刻差の変化を1点鎖線で例示し、第2スレーブ装置とマスタ装置との時刻差の変化を2点鎖線で例示している。
 この場合、図8に示すように、先ず、第1スレーブ装置は、第11タイミングt11においてSyncメッセージを送信した後に補正前の時刻に基づく第1時刻Tb1を特定可能なFollow_Upメッセージを第2スレーブ装置に送信する。次に、第2スレーブ装置は、第12タイミングt12においてSyncメッセージを受信し第2時刻Tb2を特定した後、Follow_Upメッセージを受信し第1時刻Tb1を特定する。
 次に、第1スレーブ装置は、第13タイミングt13において時刻の補正を開始し、第14タイミングt14において時刻の補正を完了する。次に、第2スレーブ装置は、第15タイミングt15においてDelay_Reqメッセージを第1スレーブ装置に送信して第3時刻Tb3を特定する。次に、第1スレーブ装置は、第16タイミングt16においてDelay_Reqメッセージを受信し、第17タイミングt17において補正後の時刻に基づく第4時刻Tb4を特定可能なDelay_Respメッセージを第2スレーブ装置に送信する。次に、第2スレーブ装置は、第18タイミングt18においてDelay_Respメッセージを受信し第1時刻Tb1から第4時刻Tb4の測定を完了して時刻の補正を開始し、第19タイミングt19において時刻の補正を完了する。
 この結果、図8に示すように、第1スレーブ装置で時刻の補正を行いマスタ装置との時刻差が0にリセットされても、第2スレーブ装置では時刻の補正を行うと時刻差βが残ってしまう問題がある。なお、第1スレーブ装置とマスタ装置との補正前の時刻差をα、補正後に時刻差βが残ってしまう伝搬遅延時間をd′とすると、伝搬遅延時間d′は、以下の(3)に示す数式を用いて算出される値であり、時刻差βは、以下の(4)に示す数式を用いて算出される値である。
d′={(Tb4+α-Tb1)-(Tb3-Tb2)}/2=d+α/2  …(3)
β=d′-d=α/2                         …(4)
 図9は、本実施の形態に係る時刻同期システムにおける時刻の誤差の変化の例を示す図である。なお、図9は図8と同様に、第1スレーブ装置とマスタ装置との時刻差の変化を1点鎖線で例示し、第2スレーブ装置とマスタ装置との時刻差の変化を2点鎖線で例示している。
 これに対して、本実施の形態に係る時刻同期システム100では、第2スレーブ装置400が第1スレーブ装置300の補正後の時刻に基づく第1時刻Tb1及び第4時刻Tb4を用いて時刻の補正を行っている。具体的には、図9に示すように、先ず、第1スレーブ装置300は、第21タイミングt21において時刻の補正を開始し、第22タイミングt22において時刻の補正を完了し、Syncメッセージを送信した後に補正後の時刻に基づく第1時刻Tb1を特定可能なFollow_Upメッセージを第2スレーブ装置400に送信する。
 次に、第2スレーブ装置400は、第23タイミングt23においてSyncメッセージを受信し第2時刻Tb2を特定した後、Follow_Upメッセージを受信し第1時刻Tb1を特定する。次に、第2スレーブ装置400は、第24タイミングt24においてDelay_Reqメッセージを第1スレーブ装置300に送信して第3時刻Tb3を特定する。次に、第1スレーブ装置300は、第25タイミングt25においてDelay_Reqメッセージを受信し、第26タイミングt26において補正後の時刻に基づく第4時刻Tb4を特定可能なDelay_Respメッセージを第2スレーブ装置400に送信する。次に、第2スレーブ装置400は、第27タイミングt27においてDelay_Respメッセージを受信し第1時刻Tb1から第4時刻Tb4の測定を完了して時刻の補正を開始し、第28タイミングt28において時刻の補正を完了する。
 この結果、図9に示すように、第1スレーブ装置300で時刻の補正を行いマスタ装置200との時刻差が0にリセットされれば、第2スレーブ装置400でも時刻の補正を行うことでマスタ装置200との時刻差が0にリセットされる。
 この結果、本実施の形態に係る時刻同期システム100は、上述した従来の時刻同期システムにおける問題を解決している。
 特に、本実施の形態に係る時刻同期システム100によれば、第1スレーブ装置300において、第2スレーブ装置400との伝搬遅延測定期間が時刻補正禁止期間となっており、例えば、時刻の補正を禁止するフラグをオンにして、第1時刻補正部320が時刻を補正することができないように制御している。
 このようにすることで、第2スレーブ装置400との伝搬遅延測定期間中に第1スレーブ装置300が時刻を補正することを確実に防止できる。
 なお、本実施の形態では、時刻補正禁止期間は、第2スレーブ装置400との伝搬遅延測定期間、すなわち、第1スレーブ装置300か第2スレーブ装置400にSyncメッセージを送信してからDelay_Reqメッセージを第2スレーブ装置400から受信するまでの期間としたが、これに限定されない。例えば、時刻補正禁止期間は、第1スレーブ装置300かSyncメッセージを第2スレーブ装置400に送信してからDelay_Reqメッセージを第2スレーブ装置400から受信した後にDelay_Respメッセージを第2スレーブ装置400に送信するまでの間としてもよい。
 また、本実施の形態に係る時刻同期システム100によれば、第1同期情報送信部332は、第1時刻補正部320が時刻の補正を完了したタイミングから第2スレーブ装置400にSyncメッセージの送信を開始する。
 このようにすることで、第1スレーブ装置300が時刻の補正を完了したタイミングから第2スレーブ装置400との伝搬遅延測定期間を開始でき、第2スレーブ装置400が第1スレーブ装置300の補正後の時刻に基づいて伝搬遅延時間を算出して時刻を補正できる。また、このようにすることで、時刻の補正を完了したタイミングからスレーブ装置にSyncメッセージの送信を開始しない時刻同期システムよりも第2スレーブ装置400においてマスタ装置200との時刻の誤差が発生している期間を低減できる。
 なお、本実施の形態のように、第1スレーブ装置300が時刻の補正を完了したタイミングから第2スレーブ装置400にSyncメッセージの送信を開始することが好ましいが、第2スレーブ装置400との伝搬遅延測定期間に第1スレーブ装置300が時刻の補正を行わない限りにおいてこれに限定されない。例えば、第1同期情報送信部332は、第1時刻補正部320が時刻の補正を完了してから予め定めた期間が経過した後に第2スレーブ装置400にSyncメッセージの送信を開始してもよい。また、例えば、第1同期情報送信部332は、第1時刻補正部320が時刻の補正を開始する前に第2スレーブ装置400にSyncメッセージの送信を開始してもよい。
 図10は、従本実施の形態の変更例に係る時刻同期システムにおけるメッセージの送受信の例を示すタイミングチャートである。
 例えば、図10に示すように、第1スレーブ装置300がマスタ装置200にDelay_Reqメッセージを送信する前に第2スレーブ装置400にSyncメッセージを送信してもよい。この場合、第1スレーブ装置300は、第2スレーブ装置400にSyncメッセージを送信した後にマスタ装置200にDelay_Reqメッセージを送信してから第2スレーブ装置400にFollow_Upメッセージを送信し、マスタ装置200からDelay_Respメッセージを受信してから第2スレーブ装置400からDelay_Reqメッセージを受信する場合がある。この場合、図10に示すように、第2スレーブ装置400からDelay_Reqメッセージを受信するまでが第1スレーブ装置300と第2スレーブ装置400との伝搬遅延測定期間、すなわち、第1スレーブ装置300の時刻補正禁止期間となる。このため、第1スレーブ装置300は、マスタ装置200からDelay_Respメッセージを受信しても時刻の補正を開始せず、第2スレーブ装置400からDelay_Reqメッセージを受信して当該期間が経過してから時刻の補正を開始してもよい。
 また、本実施の形態に係る時刻同期システム100によれば、第1時刻補正部320は、第1応答情報受信部312がDelay_Respメッセージの受信を完了したタイミングから時刻の補正を開始する。
 このようにすることで、第1スレーブ装置においてDelay_Respメッセージの受信を完了したタイミングから時刻の補正を開始しない時刻同期システムよりも第1スレーブ装置300においてマスタ装置200との時刻の誤差が発生している期間を低減できる。また、このようにすることで、第1スレーブ装置においてDelay_Respメッセージの受信を完了したタイミングから時刻の補正を開始しない時刻同期システムよりも第1スレーブ装置300がマスタ装置200から新たなSyncメッセージを受信する前に時刻の補正を完了し易くなる。また、このようにすることで、第1スレーブ装置においてDelay_Respメッセージの受信を完了したタイミングから時刻の補正を開始しない時刻同期システムよりも早いタイミングで時刻の補正を完了し、補正した時刻に基づいて第2スレーブ装置400との伝搬遅延測定期間を開始できる。この結果、第2スレーブ装置400においてマスタ装置200との時刻の誤差が発生している期間を低減できる。
 なお、本実施の形態のように、第1スレーブ装置300においてDelay_Respメッセージの受信を完了したタイミングから時刻の補正を開始することが好ましいが、第2スレーブ装置400との伝搬遅延測定期間に第1スレーブ装置300が時刻の補正を行わない限りにおいてこれに限定されない。例えば、第1時刻補正部320は、第1応答情報受信部312がDelay_Respメッセージの受信を完了してから予め定めた期間が経過した後に時刻の補正を開始してもよい。
 また、本実施の形態に係る時刻同期システム100によれば、第2時刻補正部420は、第2応答情報受信部412がDelay_Respメッセージの受信を完了したタイミングから時刻の補正を開始する。
 このようにすることで、第2スレーブ装置においてDelay_Respメッセージの受信を完了したタイミングから時刻の補正を開始しない時刻同期システムよりも第2スレーブ装置400においてマスタ装置200との時刻の誤差が発生している期間を低減できる。また、このようにすることで、第2スレーブ装置においてDelay_Respメッセージの受信を完了したタイミングから時刻の補正を開始しない時刻同期システムよりも第2スレーブ装置400が第1スレーブ装置300から新たなSyncメッセージを受信する前に時刻の補正を完了し易くなる。また、このようにすることで、第2スレーブ装置においてDelay_Respメッセージの受信を完了したタイミングから時刻の補正を開始しない時刻同期システムよりも早いタイミングで時刻の補正を完了し、第2スレーブ装置400に第3スレーブ装置が接続されている場合には、補正した時刻に基づいて第3スレーブ装置との伝搬遅延測定期間を開始することができる。この結果、第3スレーブ装置においてマスタ装置200との時刻の誤差が発生している期間を低減できる。
 なお、本実施の形態のように、第2スレーブ装置400においてDelay_Respメッセージの受信を完了したタイミングから時刻の補正を開始することが好ましいが、第3スレーブ装置との伝搬遅延測定期間に第2スレーブ装置400が時刻の補正を行わない限りにおいてこれに限定されない。例えば、第2時刻補正部420は、第2応答情報受信部412がDelay_Respメッセージの受信を完了してから予め定めた期間が経過した後に時刻の補正を開始してもよい。
 なお、本実施の形態のように、第2スレーブ装置400に第3スレーブ装置が接続されている場合、第2スレーブ装置400が時刻の補正を完了したタイミングから第3スレーブ装置にSyncメッセージの送信を開始することが好ましいが、第3スレーブ装置との伝搬遅延測定期間に第2スレーブ装置400が時刻の補正を行わない限りにおいてこれに限定されない。例えば、第2同期情報送信部432は、第2時刻補正部420が時刻の補正を完了してから予め定めた期間が経過した後に第3スレーブ装置にSyncメッセージの送信を開始してもよい。
 なお、本実施の形態では、Syncメッセージを送信した後に、Syncメッセージを送信した第1時刻T1を特定可能なFollow_Upメッセージを送信する所謂Two-Step方式で同期情報を送信したが、これに限定されない。例えば、送信時刻としての第1時刻T1を特定可能なSyncメッセージを送信してFollow_Upメッセージを送信しない所謂One-Step方式で同期情報を送信してもよい。
 なお、本実施の形態では、時刻同期装置の一例としての第1スレーブ装置300がマスタ装置200に接続されているが、第1スレーブ装置300の接続先は、時刻保持装置である限りにおいてマスタ装置200に限定されない。例えば、第1スレーブ装置300が時刻保持装置の一例としての上位のスレーブ装置に接続されていてもよい。ここで、上位のスレーブ装置とは、第1スレーブ装置300よりもグランドマスタまでのバウンダリークロックの中継台数が少ないスレーブ装置である。このため、上位のスレーブ装置は、第1スレーブ装置300及び第2スレーブ装置400と同様に、例えば、PTPにおいてバウンダリークロックとして機能するコンピュータである必要がある。すなわち、時刻保持装置は、グランドマスタとして機能するマスタ装置200に限定されず、バウンダリークロックとして機能する上位のスレーブ装置であってもよい。なお、第1スレーブ装置300の接続先を上位のスレーブ装置とした場合、上位のスレーブ装置についても第1スレーブ装置300と同様に、第1スレーブ装置300との伝搬遅延測定期間において時刻を補正しない構成であれば、本開示の作用効果を奏する。
 なお、本実施の形態では、マスタ装置200、第1スレーブ装置300、第2スレーブ装置400、第3スレーブ装置、…をライン状に接続したライン接続でLANのネットワークを構成しているが、LANのネットワークの形態については限定されない。例えば、マスタ装置200と、第1スレーブ装置300及び第2スレーブ装置400を含む複数のスレーブ装置とをリング状に接続するリング接続であってもよい。また、例えば、マスタ装置200をルートとするツリー状に複数のスレーブ装置を接続するツリー接続であってもよい。また、例えば、マスタ装置200と複数のスレーブ装置とを1本のバスラインに接続するバス接続であってもよく、1台のハブに接続するスター接続であってもよい。また、例えば、マスタ装置200と複数のスレーブ装置とをメッシュ状に接続するメッシュ接続であってもよい。これらの場合であっても、マスタ装置200と直接接続されているスレーブ装置を第1スレーブ装置300とし、マスタ装置200と直接接続されずに第1スレーブ装置300と直接接続されているスレーブ装置を第2スレーブ装置400とすれば本開示の作用効果を奏することができる。
 なお、制御部51、主記憶部52、外部記憶部53、送受信部54、内部バス50等を備える第1スレーブ装置300及び第2スレーブ装置400の処理を行う中心となる部分は、専用のシステムによらず、通常のコンピュータシステムを用いて実現可能である。例えば、前記の動作を実行するためのコンピュータプログラムを、コンピュータが読み取り可能な記録媒体、例えば、フレキシブルディスク、DVD-ROM(Read-Only Memory)等に格納して配布し、当該コンピュータプログラムをコンピュータにインストールすることにより、上記の処理を実行する第1スレーブ装置300及び第2スレーブ装置400を構成してもよい。また、インターネットなどの通信ネットワーク上のサーバ装置が有する記憶装置に当該コンピュータプログラムを格納しておき、通常のコンピュータシステムがダウンロードすることで第1スレーブ装置300及び第2スレーブ装置400を構成してもよい。
 また、第1スレーブ装置300及び第2スレーブ装置400の機能を、OS(オペレーティングシステム)とアプリケーションプログラムの分担により実現する場合、または、OSとアプリケーションプログラムとの協働により実現する場合には、アプリケーションプログラム部分のみを記録媒体や記憶装置に格納してもよい。
 また、搬送波にコンピュータプログラムを重畳し、通信ネットワークを介して提供することも可能である。例えば、通信ネットワーク上の掲示板(BBS, Bulletin Board System)に前記コンピュータプログラムを掲示し、ネットワークを介して前記コンピュータプログラムを提供してもよい。そして、このコンピュータプログラムを起動し、OSの制御下で、他のアプリケーションプログラムと同様に実行することにより、前記の処理を実行してもよい。
 本開示は、本開示の広義の精神と範囲を逸脱することなく、様々な実施形態及び変形が可能とされるものである。また、上述した実施形態は、本開示を説明するためのものであり、本開示の範囲を限定するものではない。つまり、本開示の範囲は、実施形態ではなく、請求の範囲によって示される。そして、請求の範囲内及びそれと同等の開示の意義の範囲内で施される様々な変形が、本開示の範囲内とみなされる。
50 内部バス、51 制御部、52 主記憶部、53 外部記憶部、54 送受信部、59 制御プログラム、100 時刻同期システム、200 マスタ装置、201,302,402 マスターポート、300 第1スレーブ装置、301,401 スレーブポート、310 第1時刻情報受信部、311 第1同期情報受信部、312 第1応答情報受信部、313 第1要求情報受信部、320 第1時刻補正部、330 第1時刻情報送信部、331 第1要求情報送信部、332 第1同期情報送信部、333 第1応答情報送信部、400 第2スレーブ装置、410 第2時刻情報受信部、411 第2同期情報受信部、412 第2応答情報受信部、413 第2要求情報受信部、420 第2時刻補正部、430 第2時刻情報送信部、431 第2要求情報送信部、432 第2同期情報送信部、433 第2応答情報送信部。

Claims (7)

  1.  時刻を保持する時刻保持装置に接続され、IEEE(Institute of Electrical and Electronics Engineers)1588規格のPTP(Precision Time Protocol)に従って前記時刻保持装置に接続されていない他の時刻同期装置とともに前記時刻保持装置との時刻同期を行う時刻同期装置であって、
     時刻同期に関する同期情報を前記他の時刻同期装置に送信する同期情報送信部と、
     前記同期情報送信部が前記同期情報を送信した後に前記他の時刻同期装置から送信された前記同期情報に基づく要求情報を受信する要求情報受信部と、
     前記要求情報受信部が受信した前記要求情報に対する応答情報を前記他の時刻同期装置に送信する応答情報送信部と、
     前記同期情報送信部が前記同期情報を送信してから前記要求情報受信部が前記要求情報を受信するまでの期間とは異なる期間において、前記時刻保持装置と情報を送受信したときに特定した時刻から算出される前記時刻保持装置との伝搬遅延時間に基づいて時刻を補正する時刻補正部と、
     を備える時刻同期装置。
  2.  前記時刻保持装置から送信された前記同期情報を受信する同期情報受信部と、
     前記同期情報受信部が受信した前記同期情報に基づく前記要求情報を前記時刻保持装置に送信する要求情報送信部と、
     前記要求情報を受信した前記時刻保持装置から送信された前記応答情報を受信する応答情報受信部とを更に備え、
     前記時刻補正部は、前記同期情報送信部が前記同期情報を送信してから前記要求情報受信部が前記要求情報を受信するまでの期間に前記応答情報受信部が前記応答情報を受信した場合、前記要求情報受信部が前記要求情報の受信を完了した後に時刻の補正を開始する、
     請求項1に記載の時刻同期装置。
  3.  前記同期情報送信部は、前記時刻補正部が時刻の補正を完了したタイミングから前記同期情報の送信を開始する、
     請求項1又は2に記載の時刻同期装置。
  4.  時刻を保持する時刻保持装置と、前記時刻保持装置に接続された第1時刻同期装置と、前記第1時刻同期装置に接続された第2時刻同期装置とを備え、前記第1時刻同期装置及び前記第2時刻同期装置が前記時刻保持装置との時刻同期を行う時刻同期システムであって、
     前記第1時刻同期装置は、
      前記時刻保持装置から送信された時刻同期に関する同期情報を受信する第1同期情報受信部と、
      前記第1同期情報受信部が受信した前記同期情報に基づく要求情報を前記時刻保持装置に送信する第1要求情報送信部と、
      前記要求情報を受信した前記時刻保持装置から送信された応答情報を受信する第1応答情報受信部と、
      前記第1同期情報受信部と前記第1要求情報送信部と前記第1応答情報受信部とによって前記時刻保持装置と情報を送受信したときに特定した時刻から算出される前記時刻保持装置との伝搬遅延時間に基づいて時刻を補正する第1時刻補正部と、
      前記同期情報を前記第2時刻同期装置に送信する第1同期情報送信部と、
      前記第1同期情報送信部が前記同期情報を送信した後に前記第2時刻同期装置から送信された前記要求情報を受信する第1要求情報受信部と、
      前記第1要求情報受信部が受信した前記要求情報に対する前記応答情報を前記第2時刻同期装置に送信する第1応答情報送信部と、
     を備え、
     前記第2時刻同期装置は、
      前記第1同期情報送信部が送信した前記同期情報を受信する第2同期情報受信部と、
      前記第2同期情報受信部が受信した前記同期情報に基づく前記要求情報を前記第1時刻同期装置に送信する第2要求情報送信部と、
      前記第1応答情報送信部が送信した前記応答情報を受信する第2応答情報受信部と、
      前記第2同期情報受信部と前記第2要求情報送信部と前記第2応答情報受信部とによって前記第1時刻同期装置と情報を送受信したときに特定した時刻から算出される前記第1時刻同期装置との伝搬遅延時間に基づいて時刻を補正する第2時刻補正部と、
     を備え、
     前記第1時刻同期装置は、前記第1同期情報送信部が前記同期情報を送信してから前記第1要求情報受信部が前記要求情報を受信するまでの期間において、時刻の補正を行わない、
     時刻同期システム。
  5.  前記第2時刻補正部は、前記第2応答情報受信部が前記応答情報の受信を完了したタイミングから時刻の補正を開始する、
     請求項4に記載の時刻同期システム。
  6.  時刻を保持する時刻保持装置と接続されずに前記時刻保持装置との時刻同期を行う他の時刻同期装置に時刻同期に関する同期情報を送信する同期情報送信ステップと、
     前記同期情報送信ステップで前記同期情報を送信した後に前記他の時刻同期装置から送信された前記同期情報に基づく要求情報を受信する要求情報受信ステップと、
     前記要求情報受信ステップで受信した前記要求情報に対する応答情報を前記他の時刻同期装置に送信する応答情報送信ステップと、
     前記同期情報送信ステップで前記同期情報を送信してから前記要求情報受信ステップで前記要求情報を受信するまでの期間とは異なる期間において、前記時刻保持装置と情報を送受信したときに特定した時刻から算出される前記時刻保持装置との伝搬遅延時間に基づいて時刻を補正する時刻補正ステップと、
     を行う時刻同期方法。
  7.  コンピュータを、
     時刻を保持する時刻保持装置と接続されずに前記時刻保持装置との時刻同期を行う他の時刻同期装置に時刻同期に関する同期情報を送信する同期情報送信部、
     前記同期情報送信部が前記同期情報を送信した後に前記他の時刻同期装置から送信された前記同期情報に基づく要求情報を受信する要求情報受信部、
     前記要求情報受信部が受信した前記要求情報に対する応答情報を前記他の時刻同期装置に送信する応答情報送信部、
     前記同期情報送信部が前記同期情報を送信してから前記要求情報受信部が前記要求情報を受信するまでの期間とは異なる期間において、前記時刻保持装置と情報を送受信したときに特定した時刻から算出される前記時刻保持装置との伝搬遅延時間に基づいて時刻を補正する時刻補正部、
     として機能させるプログラム。
PCT/JP2020/025827 2020-07-01 2020-07-01 時刻同期装置、時刻同期システム、時刻同期方法及びプログラム WO2022003865A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2020567628A JP6869447B1 (ja) 2020-07-01 2020-07-01 時刻同期装置、時刻同期システム、時刻同期方法及びプログラム
CN202080102456.2A CN115735351A (zh) 2020-07-01 2020-07-01 时刻同步装置、时刻同步系统、时刻同步方法及程序
DE112020007374.2T DE112020007374T5 (de) 2020-07-01 2020-07-01 Zeitsynchronisationsvorrichtung, Zeitsynchronisationssystem, Zeitsynchronisationsverfahren und Programm
US17/924,116 US20230179312A1 (en) 2020-07-01 2020-07-01 Time synchronization device, time synchronization system, and recording medium
PCT/JP2020/025827 WO2022003865A1 (ja) 2020-07-01 2020-07-01 時刻同期装置、時刻同期システム、時刻同期方法及びプログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2020/025827 WO2022003865A1 (ja) 2020-07-01 2020-07-01 時刻同期装置、時刻同期システム、時刻同期方法及びプログラム

Publications (1)

Publication Number Publication Date
WO2022003865A1 true WO2022003865A1 (ja) 2022-01-06

Family

ID=75801837

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/025827 WO2022003865A1 (ja) 2020-07-01 2020-07-01 時刻同期装置、時刻同期システム、時刻同期方法及びプログラム

Country Status (5)

Country Link
US (1) US20230179312A1 (ja)
JP (1) JP6869447B1 (ja)
CN (1) CN115735351A (ja)
DE (1) DE112020007374T5 (ja)
WO (1) WO2022003865A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110002251A1 (en) * 2007-07-12 2011-01-06 Shin Chang Sub Time synchronization and routing method in wireless sensor network, and apparatus for enabling the method
JP2017118397A (ja) * 2015-12-25 2017-06-29 株式会社デンソー 無線通信システムおよび無線通信端末

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9012853B2 (en) * 2010-05-13 2015-04-21 Flir Detection, Inc. Radiation measurement using timing-over-ethernet protocol
US9106353B2 (en) * 2011-12-13 2015-08-11 Jds Uniphase Corporation Time synchronization for network testing equipment
KR101542016B1 (ko) * 2014-09-17 2015-08-05 성균관대학교산학협력단 차량 내 이종 네트워크 도메인들 간의 동기화 게이트웨이 장치 및 동기화 방법
JP2018088646A (ja) 2016-11-29 2018-06-07 富士通株式会社 時刻同期装置及び時刻同期方法
WO2021166239A1 (ja) * 2020-02-21 2021-08-26 三菱電機株式会社 インタフェース変換装置、制御回路、記憶媒体および異常検知方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110002251A1 (en) * 2007-07-12 2011-01-06 Shin Chang Sub Time synchronization and routing method in wireless sensor network, and apparatus for enabling the method
JP2017118397A (ja) * 2015-12-25 2017-06-29 株式会社デンソー 無線通信システムおよび無線通信端末

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JOAO REIS ; NUNO BORGES CARVALHO: "Synchronization and syntonization of wireless sensor networks", WIRELESS SENSORS AND SENSOR NETWORKS (WISNET), 2013 IEEE TOPICAL CONFERENCE ON, IEEE, 20 January 2013 (2013-01-20), pages 151 - 153, XP032351279, ISBN: 978-1-4673-3104-3, DOI: 10.1109/WiSNet.2013.6488664 *

Also Published As

Publication number Publication date
US20230179312A1 (en) 2023-06-08
CN115735351A (zh) 2023-03-03
DE112020007374T5 (de) 2023-05-04
JPWO2022003865A1 (ja) 2022-01-06
JP6869447B1 (ja) 2021-05-12

Similar Documents

Publication Publication Date Title
CN110176973B (zh) 时钟同步的方法、系统、计算机设备和存储介质
US10594424B2 (en) Time synchronization slave apparatus capable of adjusting time synchronization period, and method of determining time synchronization period
CN115080495B (zh) 一种标准外设扩展接口设备的时间同步方法及系统
CN114586297A (zh) 一种同步方法及设备
US20150318939A1 (en) Relay device, relay method, and relay program
WO2022003865A1 (ja) 時刻同期装置、時刻同期システム、時刻同期方法及びプログラム
JP6707209B1 (ja) 時刻同期システム、マスタ装置、スレーブ装置およびプログラム
JP4744199B2 (ja) 時刻補正方法および時刻補正装置
US20200125579A1 (en) Technologies for achieving synchronized overclocking setting on multiple computing devices
US20210152322A1 (en) Communication apparatus, communication system, communication method, and computer readable medium
WO2016065642A1 (zh) 一种同步装置及方法
JP4961589B2 (ja) ネットワークシステムおよびスレーブ同期方法
CN105577310A (zh) 一种时间触发网络中任务分区与通信调度的同步方法
CN114390042B (zh) 工业通信方法、工业通信系统、设备和存储介质
WO2022185589A1 (ja) 情報処理装置、方法およびプログラム
CN113204516A (zh) 处理器时间同步的方法和装置
EP3963762B1 (en) Method and apparatus for switching clock sources
CN113259039A (zh) 时间同步方法、装置、计算机设备和存储介质
JP6310758B2 (ja) 時刻同期装置および方法
US11294421B2 (en) Precision timing between systems
CN111638749A (zh) 一种仿真系统同步方法、仿真设备及系统
US20230198651A1 (en) Method for synchronizing time in multiple time domains, and apparatus implementing the same method
US20230198650A1 (en) Method for synchronizing time in multiple time domains, and apparatus implementing the same method
WO2020059138A1 (ja) 通信装置、通信システム、通信方法および通信プログラム
JP2010183270A (ja) 通信制御回路、通信ノード、通信システム、並びに通信制御方法及びプログラム

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2020567628

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: 20943342

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20943342

Country of ref document: EP

Kind code of ref document: A1