WO2022180851A1 - 時刻同期方法、時刻同期プログラムおよび時刻同期システム - Google Patents

時刻同期方法、時刻同期プログラムおよび時刻同期システム Download PDF

Info

Publication number
WO2022180851A1
WO2022180851A1 PCT/JP2021/007564 JP2021007564W WO2022180851A1 WO 2022180851 A1 WO2022180851 A1 WO 2022180851A1 JP 2021007564 W JP2021007564 W JP 2021007564W WO 2022180851 A1 WO2022180851 A1 WO 2022180851A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
time information
network
node
devices
Prior art date
Application number
PCT/JP2021/007564
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 JP2023502011A priority Critical patent/JPWO2022180851A1/ja
Priority to PCT/JP2021/007564 priority patent/WO2022180851A1/ja
Publication of WO2022180851A1 publication Critical patent/WO2022180851A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]

Definitions

  • the present invention relates to a time synchronization method, a time synchronization program, and a time synchronization system for time synchronization of different devices.
  • Ethernet TSN Time-Sensitive Networking
  • Ethernet registered trademark
  • ECHONET Electronic Capital Conservation and Homecare Network
  • in-vehicle devices that are mounted on vehicles and connected to CAN (Controller Area Network)
  • CAN Controller Area Network
  • PCs and servers that are connected to Ethernet
  • household electrical appliances factory equipment that operates by executing a PLC (Programmable Logic Controller) control program, and the like.
  • Patent Documents 1 and 2 below as technologies related to time synchronization via a network.
  • NTP Network Time Protocol
  • clock synchronization is performed by counting the frequency clock and determining whether or not to use the reference time for correcting the time information. stabilize.
  • home appliances and the like are time-synchronized from an external communication network using a home appliance time synchronization protocol according to the ECHONET standard.
  • FIG. 10 is an explanatory diagram of Problem 1 of the conventional technology.
  • FIG. 10 shows a configuration example in which devices B to H are connected to a time server A via a network such as Ethernet.
  • time server A fails as shown in FIG.
  • the devices B to H that are no longer connected to the time server A due to network disconnection or the like cannot synchronize their time.
  • FIG. 11 is an explanatory diagram of Problem 2 of the conventional technology.
  • many networks include not only Ethernet but also slow networks such as CAN.
  • FIG. 11 shows that the devices B, C, and D are connected to the time server A via fast connections such as Ethernet, but the devices E to G are slow connections.
  • the mixed communication methods on the network for example, the Ethernet-connected device and the CAN-connected device use different communication methods, and time synchronization cannot be easily performed.
  • device E is connected to device B, and devices E to H are not directly connected to time server A.
  • device group GP devices B to D
  • devices E to H are not directly connected to the time server A.
  • a time synchronization method of the present invention is a time synchronization method for synchronizing time between a plurality of devices connected to a network, wherein a device as a transmission source is connected for communication via the network. time information including the accuracy of its own clock is transmitted to each of the received destination devices, and the destination device transmits the time information with the highest accuracy of the clock among the plurality of received time information. Selecting the transmission source device, correcting the time based on the time information transmitted by the selected transmission source device, and repeatedly performing processing between devices capable of communicating within the network. .
  • the transmission source device transmits a packet containing the time information in a packet for data transmission to the transmission destination device.
  • the source device is characterized by storing the time information in the header of the packet and transmitting the packet.
  • the transmission source device includes the time information in a packet of data to the transmission destination device and transmits the data packet to the transmission destination device at the transmission timing of the time information, and does not transmit data to the transmission destination device for a certain period of time. In this case, a packet for the time information is generated and transmitted.
  • the network includes a plurality of different communication methods, and the time is synchronized by data communication between the devices using communication methods that allow communication with each other.
  • the network includes in-vehicle communication, and is characterized by synchronizing the time between the devices inside the vehicle, the devices outside the vehicle, and the devices inside the vehicle.
  • the transmission source device sends a request containing the accuracy of the clock, the transmission time of the time information, and the expected arrival time from when the time information is transmitted to when it is received by the transmission destination device.
  • Time information is transmitted, and the transmission destination device calculates the difference between the time of the own clock when receiving the time information transmitted by the selected transmission source device and the expected arrival time. and correcting the time of the clock of the own device based on the difference, and transmitting the time information of the response to the time information of the request to the device of the transmission source, wherein the time information of the response is the time information of the request. and the transmission time of the time information of the response, and the transmission source device receives the time information of the response, and the expected arrival time is updated and held, and the time information is repeatedly transmitted to the communicable transmission destination device.
  • a time synchronization program of the present invention is a time synchronization program for synchronizing the time between a plurality of devices connected to a network, wherein a device of a transmission source is connected to a destination device connected for communication via the network.
  • Said transmission source device which causes each device to transmit time information including the precision of its own clock, and which transmits, to said transmission destination device, the time information with the highest accuracy of said clock out of said plurality of pieces of said time information received. is selected, and the process of correcting the time based on the time information transmitted by the selected transmission source device is repeatedly performed between the devices capable of communicating within the network.
  • the time synchronization system of the present invention is a time synchronization system for synchronizing the time between a plurality of devices connected to a network, wherein the device of the transmission source is the destination of the transmission connected via the network. It has a control unit that transmits time information including the accuracy of its own clock to each device, and the transmission destination device has transmitted the time information with the highest accuracy of the clock among the plurality of received time information.
  • a control unit that selects the transmission source device and adjusts the time based on the time information transmitted by the selected transmission source device, and repeatedly performs processing between devices that can communicate within the network. characterized by
  • FIG. 1 is a diagram illustrating a configuration example of a time synchronization system according to an embodiment
  • FIG. 2 is a diagram illustrating an example of node connection in the time synchronization system according to the embodiment
  • FIG. 3 is a block diagram of a functional example of the time synchronization system according to the embodiment
  • FIG. 4 is a diagram of a hardware configuration example of a node according to the embodiment
  • FIG. 5 is a flowchart illustrating an example of control processing of the time synchronization system according to the embodiment
  • FIG. 6 is a diagram showing exchange of time information used in the embodiment.
  • FIG. 7 is a diagram showing a state of variation due to existing time correction technology.
  • FIG. 1 is a diagram illustrating a configuration example of a time synchronization system according to an embodiment
  • FIG. 2 is a diagram illustrating an example of node connection in the time synchronization system according to the embodiment
  • FIG. 3 is a block diagram of a functional example of the time synchronization system according to the embodiment
  • FIG. 8 is a diagram illustrating a convergence state of time variations due to time synchronization according to the embodiment.
  • FIG. 9A is a diagram showing an example of control between existing devices.
  • FIG. 9B is a diagram illustrating an example of control between devices based on existing time synchronization.
  • 9C is a diagram illustrating an example of control between devices by time synchronization according to the embodiment;
  • FIG. 10 is an explanatory diagram of Problem 1 of the prior art.
  • FIG. 11 is an explanatory diagram of Problem 2 of the prior art.
  • FIG. 1 is a diagram showing a configuration example of a time synchronization system according to an embodiment. As shown in FIG. 1, a plurality of devices 100 for time synchronization are connected for communication with each other via various networks.
  • the smartphone 100a is communicatively connected to the PC 100b via the Internet 111.
  • PC 100b is communicatively connected to control board 100c via Ethernet 112a.
  • PC 100b is communicatively connected to control board 100d via Ethernet 112b.
  • Control board 100d is communicatively connected to control board 100c via Ethernet 112c.
  • the control board 100c is communicatively connected to the control board 100e via the CAN 113.
  • the control board 100 e is communicatively connected to the control board 100 f by serial communication 114 .
  • the PC 100b and the control boards 100c and 100d perform time synchronization on Ethernet based on the IEEE802.1AS communication standard, for example.
  • the time server described in the prior art there is no need to arrange the time server described in the prior art on the system.
  • a specific device for example, a device that can be communicatively connected to the time server such as the PC 100b may be arranged on the system.
  • the time synchronization system of the embodiment has the following features. 1. No time server required. 2. There is no need to obtain the standard time from a time server or the like. 3. Synchronization of time (synchronization of time) is possible even when different communication methods are mixed in the system, or even in a network in which the devices 100 are not directly connected to each other for communication. 4. Time synchronization can be maintained even when the device 100 in the network fails and is lost, or when a new device 100 is connected to the network.
  • FIG. 2 is a diagram showing an example of node connection in the time synchronization system according to the embodiment.
  • the plurality of devices 100 are indicated by nodes AH.
  • the time synchronization system of the embodiment has the following configurations.
  • the solid line indicates a connection with a communication speed higher than a predetermined speed
  • the dotted line indicates a connection with a communication speed lower than the predetermined speed.
  • Each node A to H (equipment 100) on the network sends time information to the other party when normally exchanging data with the other party.
  • the time information includes the following information a to c. a: Own time (node time) b: Accuracy of the clock you own (node accuracy) c: Time (considering transmission delay) when (data) arrives at the other party (estimated time of arrival)
  • the precision of the clock is, for example, the clock precision possessed by the node.
  • the packet when the own node sends a packet without data to the partner node is a time-only packet.
  • each of the nodes A to H can acquire the time information sent from the nodes A to H of the communication-connected partner without actively going to get the time.
  • a node whose power has just been turned on and whose time has not yet been determined receives one or more pieces of time information according to the number of packets sent from other nodes within a certain period of time. to get For example, node E receives packets from each of nodes B, F and H with which it has a direct communication connection.
  • the node E uses the time information of the node B, which has the highest clock accuracy, among the packets received from the nodes B, F, and H as a reference for its own time.
  • Node E returns time information including the elapsed time when the time reaches to node B which has adopted the time information. 4) The node B, which has received the time information, calculates (updates) the time information to be sent to the target node E next time based on the elapsed time from the transmission time of the previously sent packet. This time information is calculated by a method using the estimated arrival time.
  • the node E responds to the node B with time information, and this time information that has responded includes the following d and e.
  • d Transmission time of the time information responded by the destination node E e: Elapsed time from when the transmission source node E receives the time information from the transmission source node B to the transmission time
  • Node E whose time is synchronized can also send time information to nearby nodes B, F, and H connected for communication.
  • the node E receives the time information from the other nodes F, H. can receive. Then, the node E can adjust the time (time synchronization) of its own node E based on the time information received from the other nodes F and H, and can improve resistance to communication failures that occur on unspecified communication paths on the network. Become.
  • node E since the node E synchronizes the time with other nearby nodes B, F, and H, it can synchronize the time even if it does not have a time server on the network. Nodes A to H can be time-synchronized.
  • each of nodes B to H can automatically adopt the time information of the nodes (nodes C to H) with the next accuracy to achieve time synchronization. allows flexible time synchronization that cannot be obtained with Ethernet TSN.
  • FIG. 3 is a block diagram showing a functional example of the time synchronization system according to the embodiment.
  • FIG. 3 shows the devices 100 of a pair of source node B and destination node E, which are time-synchronized.
  • the nodes B, F, and H that are communicatively connected to the destination node E are source nodes.
  • the source node B includes a timer 301, a transmission time acquisition unit 302, a time information processing unit 303, and a communication unit 304.
  • a timer 301 counts time information.
  • the transmission time acquisition unit 302 acquires the transmission time for transmitting the time information to the destination node E based on the time information of the timer 301 .
  • the time information processing unit 303 generates time information to be transmitted to the destination node E.
  • the time information includes a: node time, b: clock accuracy, and c: expected arrival time.
  • the expected arrival time can be calculated as an initial value based on the communication speed of the network between the source node B and the destination node E. can be updated to a more accurate value considering
  • the communication unit 304 communicates with the source node B and the destination node E using a communication method compatible with the network.
  • the time information processing unit 303 when the time information processing unit 303 receives a time information response from the destination node E, it updates the estimated arrival time previously transmitted to the destination node E based on this time information.
  • the returned time information consists of d: the transmission time of the time information transmitted by the destination node E, and e: the elapsed time from when the transmission source node B receives the time information from the transmission source node B to the transmission time.
  • the time information processing unit 303 of the source node B updates and retains the expected arrival time included in the time information for the destination node E.
  • the time information processing unit 303 includes the updated arrival time in the time information when transmitting the time information to the destination node E next time.
  • the destination node E includes a communication unit 311, a reception time acquisition unit 312, a time information processing unit 313, and a timer 314.
  • the communication unit 311 performs communication between the destination node E and the source node B using a communication method compatible with the network.
  • the reception time acquisition unit 312 acquires the time information received from the source node B.
  • the time information processing unit 313 acquires from the timer 314 the reception time at which the time information received from the transmission source node B is received.
  • the time information processing unit 313 determines whether or not to adopt the time information received from the transmission source node B based on the "clock accuracy" of the transmission source node B. corrects the time of its own node E according to .
  • the destination node E receives time information from each of the source nodes B, F, and H directly connected for communication. , selects the transmission source node (node B) with the highest accuracy from among the "accuracies of the
  • the time information processing unit 313 corrects the advance/delay of the time measured by the timer 314 in the own node E in order to synchronize the own node E with the time of the transmission source node B. Also, the time information processing unit 313 transmits time information to the transmission source node B.
  • the time information includes the transmission time of this time information and the elapsed time from the reception of the time information from the transmission source node B to the transmission time.
  • each node has the function of a source node and the function of a destination node. Therefore, one node (equipment 100) has the functions of the source node and the destination node described in FIG.
  • the communication units 304 and 311 in FIG. 3 can be arranged as one function for one node (equipment 100), and the time information processing units 303 and 313 can also be arranged as one function for one node (equipment 100). .
  • FIG. 4 is a diagram showing a hardware configuration example of a node according to the embodiment.
  • the device 100 that constitutes the nodes A to H can be configured with the hardware shown in FIG.
  • the device 100 communicates with a control unit (CPU) 401, a read-only memory (ROM) 402, a random access memory (RAM) 403, an auxiliary storage unit 404 such as a semiconductor memory or a disk drive, etc.
  • An interface (I/F) 405 and an input/output I/F 410 are included.
  • CPU 401 to input/output I/F 410 are connected by a bus 406, respectively.
  • the device 100 may have a display, a keyboard, a mouse, a scanner, and a printer corresponding to device configurations such as a PC, a smartphone, and various boards, and these can be connected via an input/output I/F 410.
  • the device 100 such as a smartphone or a tablet can also use a touch panel that integrates the functions of a display, keyboard, and mouse.
  • the CPU 401 is an arithmetic processing unit that controls the device 100 and, in the embodiment, performs time synchronization.
  • the ROM 402 is a non-volatile memory that stores programs and the like for the device 100 .
  • a RAM 403 is a volatile memory used as a work area when the CPU 401 executes arithmetic processing of a program.
  • the communication I/F 405 serves as an internal interface with the network NW, and performs data input/output with other devices 100 . Specifically, the communication I/F 405 communicates with the other device 100 via various networks NW such as LAN (Local Area Network), CAN, and ECHONET through communication lines.
  • NW Local Area Network
  • CAN Controller Area Network
  • ECHONET ECHONET
  • the network NW includes WiFi (registered trademark), Bluetooth (registered trademark), infrared communication (IrDA), etc., and is capable of wireless/wired communication with other devices 100.
  • WiFi registered trademark
  • Bluetooth registered trademark
  • IrDA infrared communication
  • FIG. 5 is a flowchart showing an example of control processing of the time synchronization system according to the embodiment.
  • FIG. 5 shows, as an example of processing of the device 100 of the source node and the destination node, corresponding to the description of FIG. ) shows an example of control processing executed by
  • the control process on the source node B side will be described. is transmitted (step S502).
  • the time information includes a: node time, b: clock accuracy, and c: expected arrival time.
  • the source node B waits for a reply of the time information from the destination node E, and when the time information is received (step S503), d: transmission time, e: elapsed time included in the replied time information. based on (step S504).
  • the source node B can obtain the expected arrival time in consideration of the propagation delay between the nodes B and E, and can improve the accuracy of the expected arrival time included in the time information to be transmitted to the node E next time.
  • the source node B corresponds to changes over time in the transmission characteristics of the network between nodes B and E and the time synchronization processing time at node E.
  • the expected arrival time can be updated sequentially to improve time synchronization accuracy.
  • the destination node E acquires the reception time of the time information from the timer 314 of the node E (step S512).
  • the destination node E determines whether to adopt the time information received from the source node B (step S513).
  • the destination node E receives time information from each of the nodes B, F, and H that are directly connected for communication.
  • the destination node E compares the "clock accuracy" included in the time information of each of the nodes B, F, and H, and selects the node with the highest "clock accuracy". In the example of FIG. 5, the source Node B is selected.
  • step S513: Yes the destination node E determines that the time information of the source node B is adopted (step S513: Yes), and executes the processing from step S514.
  • step S513: No the destination node E determines not to adopt the time information of the source nodes F and H (step S513: No), and proceeds to the process of step S517.
  • the destination node E calculates the difference between the reception time acquired at step S512 and the expected arrival time included in the clock information (step S514). Then, the destination node E corrects the time (advance/delay) of the clock (timer 314) of the destination node E based on the calculated difference (step S515). For example, the destination node E corrects the time of the clock based on the slew/step correction value of NTP time synchronization (step S516).
  • the destination node E After that, the destination node E returns time information to the source node B (step S517).
  • the reply time information consists of d: transmission time of the time information transmitted by the destination node E, and e: transmission time after the destination node E receives the time information from the transmission source node B. Elapsed time to, and
  • the destination node E transmits the time of its own node E with the highest "clock accuracy" based on the time information received from the directly connected (adjacent) source nodes B, F, and H. It becomes possible to adjust the time in synchronization with the source node B.
  • the node E after performing time synchronization can perform time synchronization of other destination nodes (nodes F and H in the example of FIG. 2) directly connected as the source node E, and the network All nodes A to H can be time-synchronized.
  • directly connected nodes can communicate with each other by a predetermined communication method, by repeating the above process, it is possible to time-synchronize the nodes (devices 100) of the entire network in which various communication methods coexist.
  • FIG. 6 is a diagram showing the exchange of time information used in the embodiment.
  • FIG. 6 shows the source node B and the destination node E (equipment 100).
  • source node B When transmitting predetermined data (packet) to destination node E, source node B includes time information in the packet.
  • the time information may be stored in part of the packet header, or may be stored in a predetermined area of the packet data.
  • the source node B transmits time information (notification data) including the above a: node time (T1), b: clock accuracy, and c: expected time of arrival (ExpectTime) to the destination node E at timing T1. .
  • the destination node E receives the time information (notification data) from the source node B at the timing of time T2.
  • the destination node E uses the received time information (T1+ExpectTime) for time adjustment.
  • the destination node E transmits the above d: the transmission time of the time information transmitted by the destination node E, and e: transmission after the destination node E receives the time information from the source node B. and time information (notification data) including the elapsed time up to the time.
  • the source node B receives the time information (notification data) returned from the destination node E at timing T4.
  • the expected arrival time ES is calculated from the timing of the request and the response.
  • the ES between nodes B and E can be calculated based on the following formula (1). ((T4-T1)-(T3-T2))/2)...(1)
  • the estimated arrival time between the source node B and the destination node E is calculated regardless of whether the destination node E has adjusted the time. For this reason, the destination node E receives the time information transmitted from the source node B, and the difference between the system time (measured by the timer 314) at the time of receiving the time information transmitted from the source node B and the system time at the time of transmission of the responding time information (e : Elapsed time) is included in the time information returned to the source Node B.
  • the source node B transmits (requests) time information, for example, at regular periodic intervals to the destination nodes E, F, and H directly connected for communication, and the destination nodes E, F, and H transmit (request) each request. time information to the source node B (response).
  • the destination node B when transmitting a packet of predetermined data to the destination node E, the destination node B includes time information in the header of the packet to be transmitted, and the destination node E extracts the time information from the received packet. Extract. Further, when the source node B does not transmit data packets to the destination node E for a certain period of time, the source node B generates a packet for time information and transmits it to the destination node E.
  • Destination node E extracts the time information from the received packet.
  • the destination node B can transmit time information to the nodes E, F, and H that are directly connected for communication at predetermined periodic intervals, and time synchronization can be performed at predetermined periodic intervals.
  • the time of the entire network can be synchronized.
  • the deviation (variation) is large, but after a predetermined time (for example, about 20 msec has passed), the time of nodes A to H in the entire network is set to the reference time, for example, the node with the highest "clock accuracy" A” (the standard deviation of the time of each node B to H was minimized).
  • FIG. 7 is a diagram showing the state of variation due to existing time correction technology.
  • the horizontal axis is time, and the vertical axis is each node A to D (equipment 100). It is assumed that node A has the highest clock accuracy, nodes B and C have slightly inferior clock accuracy, and node D has the lowest clock accuracy.
  • FIG. 8 is a diagram showing the state of convergence of time variations due to time synchronization according to the embodiment.
  • FIG. 8(a) shows nodes AD. Time information is exchanged between each of the directly connected nodes A to D, and by performing time synchronization control at regular intervals, the time (time cycle) of each node A to D can be kept within a certain variation, Smooth control without time variations among the nodes A to D is possible.
  • FIG. 9A is a diagram showing an example of control between existing devices.
  • Each device 1 to 4 is connected to a central control unit (sensor) by CAN or the like.
  • the device 1 is an accelerator
  • the device 2 is a brake
  • the device 3 is a steering wheel.
  • the devices 1 to 4 operate individually at a constant cycle and transmit information such as detection (control plan information) to the sensor, but the entire autonomous driving system operates in a random manner. For this reason, existing automatic driving systems have had poor ride comfort such as maneuverability.
  • FIG. 9B is a diagram showing an example of control between devices based on existing time synchronization.
  • FIG. 9A shows an example in which vehicle-mounted sensors and devices 1 to 4 are connected by a network having a time synchronization function such as Ethernet TSN.
  • the transmission side sensor
  • the senor can prevent communication congestion by controlling the timing of data acquisition and the timing of transmitting control plan information to each device 1 to 4 at different times. As a result, smooth control can be achieved and ride comfort can be improved.
  • the network includes a different network (CAN), some devices can only be connected to CAN for communication, and these devices cannot synchronize their time.
  • FIG. 9C is a diagram showing an example of control between devices by time synchronization according to the embodiment.
  • the sensor controls the timing of data acquisition and the timing of transmitting control plan information to each device 1 to 4 at different times to prevent communication congestion. be able to.
  • the time of each device 1-4 can be synchronized.
  • the time synchronization described above can be applied to various systems. For example, it can be applied to the automatic driving described above.
  • a large number of system-on-chips (SoCs), microcomputers, etc. are used in the device 100 mounted on the vehicle for automatic operation, and these operate in cooperation with each other.
  • SoCs system-on-chips
  • SoC etc. determines the behavior of the vehicle based on information such as camera images, vehicle speed, accelerator opening, brake status, steering angle, and obstacle detection by sensors such as radar. .
  • Time synchronization according to the embodiment can be controlled in the vehicle, and a plurality of devices 100 can be time-synchronized without a time server.
  • time synchronization of the embodiment can be applied to FA failure analysis.
  • time synchronization is performed for the equipment 100 that controls the equipment for collecting data for failure analysis based on the image of the failed device and the control log.
  • the data to be collected includes images from a plurality of cameras, an operation log when a failure occurs, and the like.
  • a time server can be dispensed with, and even if a situation occurs in which the network is cut off or some of the devices 100 fail, the time can be synchronized between the remaining devices 100. , can be made into a fault-tolerant system.
  • a time synchronization method for synchronizing time between a plurality of network-connected devices in which a transmission source device is a transmission destination device that is communicatively connected via a network. , and the destination device selects the source device that sent the time information with the highest clock accuracy from among the multiple pieces of time information received, and selects The process of correcting the time based on the time information transmitted by the transmission source device is repeatedly performed between devices that can communicate within the network. As a result, it is possible to synchronize the time with the device with the highest clock precision based on the time information between the devices that are connected to each other for communication.
  • the source device may include the time information in the packet for data transmission to the destination device. This makes it possible to easily transmit time information using packets used between devices that can communicate with each other.
  • the source device may store the time information in the header of the packet and transmit it. This makes it possible to exchange time information easily without affecting data communication between devices.
  • the source device sends the data packet to the destination device with the time information included at the timing of sending the time information. may be generated and transmitted. This makes it possible to perform time synchronization at predetermined periodic intervals while suppressing congestion of packets exchanged between devices as much as possible.
  • the network includes multiple different communication methods, and the time is synchronized by data communication between devices with communication methods that can communicate with each other. In this way, time synchronization is performed between devices of the same communication method, and time synchronization is performed between devices of communication methods that can be communicated, so that it is possible to time synchronize devices of the entire network of different communication methods. .
  • the network may include in-vehicle communication, synchronizing the time between devices inside the vehicle, devices outside the vehicle, and devices inside the vehicle. For example, it is possible to time-synchronize each device such as a control unit, accelerator, brake, and steering provided in a vehicle for automatic driving with devices outside the vehicle, and to time-synchronize without accessing a time server.
  • the source device sends the requested time information including the accuracy of the clock, the transmission time of the time information, and the expected arrival time from when the time information is sent to when it is received by the destination device.
  • the destination device calculates the difference between the time on its own clock when it received the time information sent by the selected source device and the expected arrival time, and based on the difference, the time on its own clock and send the time information of the response to the time information of the request to the sending device, and the time information of the response is the elapsed time from the time when the time information of the request is received until the time information of the response is sent.
  • the transmission source device updates and holds the expected arrival time by receiving the time information of the response, and repeatedly transmits the time information to the destination device with which communication is possible. conduct.
  • This enables time synchronization including the propagation state between the transmission source device and the transmission destination device, and enables accurate time synchronization between devices with different communication methods, communication speeds, processing times, and the like. Also, even if there is a change in communication speed, processing time, etc. over time, time synchronization can be performed in response to this change.
  • the present invention can be similarly applied to a configuration in which a predetermined device is connected to a time server for communication.
  • the present invention can be used in a time synchronization system for synchronizing time between devices connected via a network, and is particularly useful for time synchronization between devices that are communicatively connected via various networks. is.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Electric Clocks (AREA)
  • Computer And Data Communications (AREA)

Abstract

ネットワーク接続された複数のノードA~H間で互いの時刻を同期させる時刻同期方法であって、送信元のノードBは、ネットワークを介して通信接続された送信先のノードC,E,Fに自機の時計の精度を含む時刻情報をそれぞれ送信する。送信先の機器Eは、ノードB,F,Hから受信した複数の時刻情報のうち時計の精度が最も高い時刻情報を送信した送信元のノードBを選択し、選択した送信元のノードBが送信した時刻情報に基づき時刻を修正する。以上の処理は、ネットワーク内で通信可能なノードA~H間で繰り返し行う。

Description

時刻同期方法、時刻同期プログラムおよび時刻同期システム
 この発明は、異なる機器を時刻同期させる時刻同期方法、時刻同期プログラムおよび時刻同期システムに関する。
 イーサネットTSN(Time-Sensitive Networking)等のネットワークの規格では、イーサネット(登録商標)に繋がれた機器間で時刻を同期する方法が規定されている。この時刻同期は、標準時刻を持つ時刻サーバにそれぞれの機器が接続して「時刻サーバ」に時刻を合わせる。
 個々の機器は、イーサネット等に接続されるPCやサーバの他に、車両に搭載されCAN(Controller Area Network)に接続される車載機器、ECHONET(Energy Conservation and HOmecare NETwork)(登録商標)に接続される家電機器、PLC(Programmable Logic Controller)の制御プログラムの実行により動作する工場等の機器、等がある。
 従来、ネットワークを介した時刻同期に関連する技術として、例えば、下記特許文献1,2等がある。特許文献1は、NTP(Network Time Protocol)サーバ装置がクライアント端末装置にNTPをブロードキャストする際、周波数クロックをカウントし、時刻情報の補正に基準時刻を用いるか否かを決定することでクロック同期を安定させる。特許文献2は、ECHONET規格にしたがい、家電機器等を外部の通信網から家電時刻同期プロトコルを用いて時刻同期させる。
特開2018-098711号公報 特開2008-152343号公報
 しかしながら、従来技術では、下記のように、ネットワーク上での各機器の接続状態により、時刻同期を行うことができない機器が生じた。
 図10は、従来技術の問題点1の説明図である。図10には時刻サーバAにイーサネット等のネットワークを介して各機器B~Hが接続された構成例を示す。時刻サーバAを使用した時刻同期の場合において、図10に示すように時刻サーバAが故障すると、各機器B~Hが時刻を時刻サーバAに合わせることができなくなる。また、ネットワークが切断される等して時刻サーバAと繋がらなくなった機器B~Hについても時刻を合わせることができなくなる。
 図11は、従来技術の問題点2の説明図である。通常多くのネットワークでは、イーサネットだけでなくCAN等の遅いネットワークが混在している。図11には、時刻サーバAにはイーサネット等の速い接続で機器B,C,Dが接続されているが、機器E~Gは遅い接続であることを示す。ここで、ネットワーク上での通信方式の混在、例えば、イーサネット接続の機器とCAN接続の機器間は異なる通信方式であり、容易に時刻同期することができない。
 また、図11に示す例では、機器Eは機器Bに接続されており、機器E~Hは直接時刻サーバAには接続されていない。この場合、時刻サーバAに直接接続された機器グループGP(機器B~D)しか時刻同期できず、時刻サーバAに直接接続されていない機器E~Hは時刻同期することができない。
 本発明は、上記課題に鑑み、時刻サーバに接続することなく、ネットワーク上の複数の機器を時刻同期できることを目的とする。
 上記目的を達成するため、本発明の時刻同期方法は、ネットワーク接続された複数の機器間で互いの時刻を同期させる時刻同期方法であって、送信元の機器は、前記ネットワークを介して通信接続された送信先の機器に自機の時計の精度を含む時刻情報をそれぞれ送信し、前記送信先の機器は、受信した複数の前記時刻情報のうち前記時計の精度が最も高い時刻情報を送信した前記送信元の機器を選択し、前記選択した前記送信元の機器が送信した前記時刻情報に基づき時刻を修正する、処理を前記ネットワーク内で通信可能な機器間で繰り返し行う、ことを特徴とする。
 また、前記送信元の機器は、前記送信先の機器へデータ送信するパケットに前記時刻情報を含ませて送信する、ことを特徴とする。
 また、送信元の機器は、前記時刻情報を前記パケットのヘッダに格納して送信する、ことを特徴とする。
 また、前記送信元の機器は、前記時刻情報の送信タイミングで、前記送信先の機器へのデータのパケットに前記時刻情報を含ませて送信し、一定期間前記送信先の機器へデータ送信がない場合、前記時刻情報用のパケットを生成して送信する、ことを特徴とする。
 また、前記ネットワーク内は、複数の異なる通信方式を含み、互いに通信可能な通信方式の前記機器同士のデータ通信により時刻を同期する、ことを特徴とする。
 また、前記ネットワークは、車両内通信を含み、前記車両内の前記機器を前記車両外の前記機器、および前記車両内の前記機器同士、で時刻を同期する、ことを特徴とする。
 また、前記送信元の機器は、前記時計の精度と、前記時刻情報の送信時刻と、前記時刻情報を送信してから前記送信先の機器で受信するまでの到達予想時刻と、を含む要求の時刻情報を送信し、前記送信先の機器は、前記選択した前記送信元の機器が送信した前記時刻情報を受信した際の自機の前記時計の時刻と、前記到達予想時刻との差分を算出し、前記差分に基づき自機の前記時計の時刻を修正し、前記送信元の機器に、前記要求の時刻情報に対する応答の時刻情報を送信し、前記応答の時刻情報は、前記要求の時刻情報を受信した時刻から前記応答の時刻情報を送信するまでの経過時間と、当該応答の時刻情報の送信時刻を含み、前記送信元の機器は、前記応答の時刻情報の受信により、前記到達予想時間を更新保持し、通信可能な前記送信先の機器に対し、前記時刻情報の送信を繰り返し行う、ことを特徴とする。
 また、本発明の時刻同期プログラムは、ネットワーク接続された複数の機器間で互いの時刻を同期させる時刻同期プログラムであって、送信元の機器に、前記ネットワークを介して通信接続された送信先の機器に自機の時計の精度を含む時刻情報をそれぞれ送信させ、前記送信先の機器に、受信した複数の前記時刻情報のうち前記時計の精度が最も高い時刻情報を送信した前記送信元の機器を選択させ、前記選択した前記送信元の機器が送信した前記時刻情報に基づき時刻を修正させる、処理を前記ネットワーク内で通信可能な機器間で繰り返し行わせることを特徴とする。
 また、本発明の時刻同期システムは、ネットワーク接続された複数の機器間で互いの時刻を同期させる時刻同期システムであって、送信元の機器は、前記ネットワークを介して通信接続された送信先の機器に自機の時計の精度を含む時刻情報をそれぞれ送信する制御部を有し、前記送信先の機器は、受信した複数の前記時刻情報のうち前記時計の精度が最も高い時刻情報を送信した前記送信元の機器を選択し、前記選択した前記送信元の機器が送信した前記時刻情報に基づき時刻を修正する、処理を前記ネットワーク内で通信可能な機器間で繰り返し行う制御部を有する、ことを特徴とする。
 上記構成によれば、互いに通信接続された機器同士間で時刻情報に基づき、時刻同期させることができる。また、ネットワーク内で異なる各種の通信方式を含んでも、通信可能な機器同士間で時刻同期することで、ネットワーク全体の機器を時刻同期させることができるようになる。また、時計サーバを配置せずともネットワーク内の機器を時刻同期できるようになる。
 本発明によれば、時刻サーバに接続することなく、ネットワーク上の複数の機器を時刻同期できるという効果を奏する。
図1は、実施の形態にかかる時刻同期システムの構成例を示す図である。 図2は、実施の形態にかかる時刻同期システムのノード接続例を示す図である。 図3は、実施の形態にかかる時刻同期システムの機能例を示すブロック図である。 図4は、実施の形態にかかるノードのハードウェア構成例を示す図である。 図5は、実施の形態にかかる時刻同期システムの制御処理例を示すフローチャートである。 図6は、実施の形態で用いる時刻情報のやり取りを示す図である。 図7は、既存の時刻修正技術によるバラツキ状態を示す図である。 図8は、実施の形態の時刻同期による時刻のバラツキの収束状態を示す図である。 図9Aは、既存の機器間の制御例を示す図である。 図9Bは、既存の時刻同期による機器間の制御例を示す図である。 図9Cは、実施の形態の時刻同期による機器間の制御例を示す図である。 図10は、従来技術の問題点1の説明図である。 図11は、従来技術の問題点2の説明図である。
(実施の形態)
 以下に添付図面を参照して、この発明にかかる時刻同期方法、時刻同期プログラムおよび時刻同期システムの好適な各実施の形態を詳細に説明する。
 図1は、実施の形態にかかる時刻同期システムの構成例を示す図である。図1に示すように、時刻同期を行う複数の機器100は、各種ネットワークにより互いに通信接続されている。
 例えば、機器100は、スマートフォン100aがインターネット111を介してPC100bに通信接続されている。PC100bは、イーサネット112aを介して制御ボード100cに通信接続されている。PC100bは、イーサネット112bを介して制御ボード100dに通信接続されている。制御ボード100dは、イーサネット112cを介して制御ボード100cに通信接続されている。
 制御ボード100cは、CAN113を介して制御ボード100eに通信接続されている。制御ボード100eは、シリアル通信114により制御ボード100fに通信接続されている。
 図1に示した機器100のうち、PC100b,制御ボード100c,100dは、例えばIEEE802.1ASの通信規格に基づきイーサネット上で時刻同期を行う。図1に示すように、実施の形態では、システム上に従来の技術で説明した時刻サーバを配置する必要がない。なお、実施の形態では、特定の機器、例えば、PC100b等の時刻サーバに通信接続可能な機器をシステム上に配置してもよい。
 実施の形態の時刻同期システムは、以下の特徴を有する。
1.時刻サーバを必要としない。
2.標準時刻を時刻サーバ等から取得する必要がない。
3.システム内に異なる通信方式が混在する場合や、機器100同士が直接通信接続されていないネットワークでも時刻の同期(時刻を合わせること)ができる。
4.ネットワーク内の機器100が故障して失われた場合や、新たな機器100がネットワークに接続された場合でも、時刻の同期を維持することができる。
 図2は、実施の形態にかかる時刻同期システムのノード接続例を示す図である。図2では、複数の機器100をノードA~Hで示している。実施の形態の時刻同期システムは、下記の各構成を有する。図中実線はノード間で通信接続された通信速度が所定以上の速い接続であり、点線は通信速度が所定未満の遅い接続を示す。
1.ネットワーク上の各ノードA~H(機器100)は、相手と通常にデータをやり取りする際に相手に時刻情報を送る。時刻情報は、下記a~cの情報を含む。
a:自分の時刻(ノード時刻)
b:自分が持っている時計の精度(ノード精度)
c:相手に(データが)到達した際の(伝送遅延を考慮した)時刻(到達予想時刻)
 時計の精度は、例えば、ノードが持つクロック精度である。実施の形態の時刻同期システムでは、時刻専用のパケットを用いる必要がない。なお、自身のノードがデータなしのパケットを相手のノードに送る際のパケットは、時刻専用のパケットとなる。これにより、各ノードA~Hは、積極的に時刻を取りに行かなくても通信接続された相手のノードA~Hから送られてくる時刻情報を取得できる。
2.時刻同期の概要
1)電源が入ったばかりで、まだ時刻が定まっていないノードは、一定の時間の間で送られてくる他のノードから送信されたパケット数に応じて一つまたは複数の時刻情報を取得する。例えば、ノードEは、直接通信接続されたノードB、F、Hからそれぞれパケットを受け取る。
2)ノードEは、ノードB,F,Hから受け取ったパケットの中から一番「時計の精度が高い」ノードBの時刻情報を自ノードEの時刻の基準とする。
3)ノードEは、時刻情報を採用したノードBに対して、時刻が到達した経過時間を含めた時刻情報を返す。
4)時刻情報を返されたノードBは、先に送ったパケットの送信時刻からの経過時間に基づき、次回対象ノードEに送る時刻情報を計算(更新)する。この時刻情報の演算は、到達予想時刻を用いた方法により行う。
 ここで、ノードEは、ノードBに時刻情報を応答し、この応答した時刻情報は、下記d,eを含む。
d:送信先ノードEが応答する時刻情報の送信時刻
e:送信元ノードEが送信元ノードBから時刻情報を受信した後、送信時刻までの経過時間
5)時刻を同期したノードEについても、通信接続された周辺のノードB,F,Hに時刻情報を送ることができる。
 上記によれば、ノードEは、通信接続されたノードB,F,Hのうち一部のノード(例えば、ノードB)からの時刻情報が途切れた場合でも、他ノードF,Hから時刻情報を受信できる。そして、ノードEは、他ノードF,Hから受信した時刻情報により、自ノードEの時刻合わせ(時刻同期)が行え、ネットワーク上の不特定な通信経路で生じる通信障害に対する耐性を向上できるようになる。
 また、ノードEは、周辺の他のノードB,F,Hに時刻を合わせるため、ネットワーク上に時刻サーバを有さない場合でも、時刻を合わせる(同期する)ことができ、また、システム全体のノードA~Hを時刻同期できるようになる。
 また、精度の高い一つのノード(例えばノードA)が存在し、全てのノードB~Hが精度の高い一つのノードAに直接繋がっているとする。この場合、各ノードB~HはノードAに時刻を合わせることになるので、イーサネットTSNと同様の時刻同期精度が得られる。
 ここで、ノードAに障害が発生した場合でも、各ノードB~Hは、自動的に次の精度のノード(ノードC~H)の時刻情報を採用して時刻同期できるようになり、この点でイーサネットTSNでは得られない柔軟な時刻同期が行えるようになる。
 図3は、実施の形態にかかる時刻同期システムの機能例を示すブロック図である。図3には、時刻同期する一対の送信元ノードBと、送信先ノードEそれぞれの機器100を示した。なお、図1のネットワーク接続例でみると、送信先ノードEに通信接続されているノードB,F,Hが送信元ノードとなる。
 送信元ノードBは、タイマ301、送信時刻取得部302、時刻情報処理部303、通信部304、を含む。タイマ301は、時刻情報を計時する。送信時刻取得部302はタイマ301の計時情報に基づき、送信先ノードEへ時刻情報を送信する送信時刻を取得する。
 時刻情報処理部303は、送信先ノードEに送信する時刻情報を生成する。時刻情報は、上記a:ノード時刻、b:時計の精度、c:到達予想時刻を含む。到達予想時刻は、初期値として送信元ノードB,送信先ノードE間のネットワークの通信速度に基づき算出可能であるが、送信元ノードB,送信先ノードE間での時刻情報のやり取りによって伝搬遅延を考慮したより精度の高い値に更新できる。
 通信部304は、送信元ノードBと送信先ノードEとの間のネットワークに対応した通信方式で互いの通信を行う。
 また、時刻情報処理部303は、送信先ノードEから時刻情報の応答があると、この時刻情報に基づき、前回送信先ノードEに送信した到達予想時刻を更新する。応答された時刻情報は、d:送信先ノードEが送信する時刻情報の送信時刻と、e:送信元ノードBが送信元ノードBから時刻情報を受信した後送信時刻までの経過時間と、を含む。
 送信元ノードBの時刻情報処理部303は、送信先ノードEに対する時刻情報に含まれる到達予想時刻を更新保持しておく。時刻情報処理部303は、更新した到達時刻を次回送信先ノードEに時刻情報を送信する際、時刻情報に含めて送信する。
 送信先ノードEは、通信部311、受信時刻取得部312、時刻情報処理部313、タイマ314、を含む。通信部311は、送信先ノードEと送信元ノードBとの間のネットワークに対応した通信方式で互いの通信を行う。
 受信時刻取得部312は、送信元ノードBから受信した時刻情報を取得する。時刻情報処理部313は、送信元ノードBから受信した時刻情報を受信した受信時刻をタイマ314から取得する。
 時刻情報処理部313は、送信元ノードBから受信した時刻情報の採用の可否を送信元ノードBの「時計の精度」に基づき判定し、採用時には、時刻情報に含まれる到達予想時刻との差に応じて自ノードEの時刻を補正する。
 ここで、送信先ノードEは、直接通信接続された送信元ノードB,F,Hからそれぞれ時刻情報を受信するが、これら送信元ノードB,F,Hから受信した時刻情報に含まれる「時計の精度」のうち最も精度が高い送信元ノード(ノードB)を選択し、自ノードEを送信元ノードBに時刻同期させる。
 そして、時刻情報処理部313は、自ノードEを送信元ノードBの時刻に同期させるため、自ノードEにおけるタイマ314が計時する時刻の進み/遅れを補正する。また、時刻情報処理部313は、送信元ノードBに対し、時刻情報を送信する。時刻情報は、この時刻情報の送信時刻と、送信元ノードBから時刻情報を受信した後送信時刻までの経過時間を含む。
 図3では、便宜上、送信元ノードの機能と送信先ノードの機能を分けて記載した。実際には、各ノード(機器100)は、送信元ノードの機能と送信先ノードの機能とを有している。このため、ある一つのノード(機器100)は、図3に記載した送信元ノードと送信先ノードの機能を有する。また、図3における通信部304,311は、一つのノード(機器100)あたり一つの機能として配置でき、時刻情報処理部303,313についても一つのノード(機器100)で一つの機能として配置できる。
 図4は、実施の形態にかかるノードのハードウェア構成例を示す図である。上記ノードA~Hを構成する機器100は、図4に示すハードウェアで構成できる。図4において、機器100は、それぞれ制御部(CPU)401と、Read-Only Memory(ROM)402と、Random Access Memory(RAM)403と、半導体メモリやディスクドライブ等の補助記憶部404と、通信インタフェース(I/F)405と、入出力I/F410と、を含む。これらCPU401~入出力I/F410は、バス406によってそれぞれ接続されている。
 機器100は、PCやスマートフォン、各種ボード等の装置構成に対応して、ディスプレイ、キーボード、マウス、スキャナ、プリンタを有してもよく、これらは入出力I/F410を介して接続することができる。なお、スマートフォンやタブレット等の機器100では、ディスプレイ、キーボード、マウスの機能を集約したタッチパネルを用いることもできる。
 CPU401は、機器100を統括制御し、実施の形態では、時刻同期を司る演算処理装置である。ROM402は、機器100のプログラム等を記憶する不揮発性メモリである。RAM403は、CPU401によるプログラムの演算処理実行時のワークエリアとして使用される揮発性メモリである。
 通信I/F405は、ネットワークNWと内部のインタフェースを司り、他の機器100との間のデータの入出力を行う。具体的に、通信I/F405は、通信回線を通じてLAN(Local Area Network)、CAN、ECHONET等の各種ネットワークNWを介して他の機器100との間の通信を行う。
 ネットワークNWは、上記の他に、WiFi(登録商標)、Bluetooth(登録商標)、赤外線通信(IrDA)等を含み、他の機器100と無線/有線通信することができる。
 図5は、実施の形態にかかる時刻同期システムの制御処理例を示すフローチャートである。図5には、送信元ノードと送信先ノードの機器100の処理例として、図2の説明に対応して送信元ノードB(100)と、送信先ノードE(100)の各制御部(CPU401)が実行する制御処理例を示す。
 送信元ノードB側の制御処理を説明すると、送信元ノードBは、送信先ノードE(100)に対して時刻情報を送信する際の送信時刻をタイマ301から取得し(ステップS501)、時刻情報を送信する(ステップS502)。時刻情報には、上記a:ノード時刻、b:時計の精度、c:到達予想時刻を含む。
 この後、送信元ノードBは、送信先ノードEからの時刻情報の返答を待ち、時刻情報を受信すると(ステップS503)、返答された時刻情報に含まれるd:送信時刻、e:経過時間とに基づき、保持してあるノードEの到達予想時刻を更新する(ステップS504)。この更新により、送信元ノードBは、ノードB,E間の伝搬遅延を考慮した到達予想時刻を得ることができ、次回ノードEに送信する時刻情報に含まれる到達予想時刻の精度を向上できる。
 送信元ノードBは、上記一連の処理をノードEとの間でやり取りすることで、ノードB,E間のネットワークの伝送特性の経時的な変動や、ノードEでの時刻同期処理時間に相当する到達予想時刻を逐次更新し、時刻同期精度を向上できる。
 次に、送信先ノードE側の制御処理を説明する。送信先ノードEは、送信元ノードBから時刻情報を受信すると(ステップS511)、ノードEのタイマ314から時刻情報の受信時刻を取得する(ステップS512)。
 次に、送信先ノードEは、送信元ノードBから受信した時刻情報の採用判定を行う(ステップS513)。送信先ノードEは、直接通信接続されたノードB,F,Hからそれぞれ時刻情報を受信している。送信先ノードEは、ステップS513において、各ノードB,F,Hそれぞれの時刻情報に含まれる「時計の精度」を対比し、最も「時計の精度」が高いノードを選択する。図5の例では、送信元ノードBを選択している。
 そして、送信先ノードEは、送信元ノードBの時刻情報については採用と判断し(ステップS513:Yes)、ステップS514以下の処理を実行する。一方、送信先ノードEは、送信元ノードF,Hの時刻情報については採用しないと判断し(ステップS513:No)、ステップS517の処理に移行する。
 ステップS514では、送信先ノードEは、ステップS512で取得した受信時刻と、時計情報に含まれる到達予想時刻との差を算出する(ステップS514)。そして、送信先ノードEは、算出した差に基づき、送信先ノードEの時計(タイマ314)の時刻(進み/遅れ)を修正する(ステップS515)。例えば、送信先ノードEは、時計の時刻修正として、NTP時刻同期のslew/step補正値に基づき行う(ステップS516)。
 この後、送信先ノードEは、送信元ノードBへ時刻情報を返答する(ステップS517)。この返答の時刻情報には、返答の時刻情報は、d:送信先ノードEが送信する時刻情報の送信時刻と、e:送信先ノードEが送信元ノードBから時刻情報を受信した後送信時刻までの経過時間と、を含む。
 このように、送信先ノードEは、直接通信接続された(隣接する)送信元ノードB,F,Hから受信した時刻情報に基づき、自ノードEの時刻を最も「時計の精度」が高い送信元ノードBに同期して時刻修正できるようになる。
 また、時刻同期を行った後のノードEは、送信元ノードEとして直接接続された他の送信先ノード(図2の例ではノードF,H)の時刻同期を行うことができ、ネットワーク内の全てのノードA~Hを時刻同期できるようになる。ここで、直接接続されたノード同士は所定の通信方式で通信可能であるため、上記処理を繰り返すことにより、各種通信方式が混在するネットワーク全体のノード(機器100)を時刻同期できる。
 図6は、実施の形態で用いる時刻情報のやり取りを示す図である。図6には、上記送信元ノードBと送信先ノードE(機器100)を示した。送信元ノードBは、送信先ノードEに所定のデータ(パケット)を送信する際、このパケットに時刻情報を含ませて送る。時刻情報は、パケットのヘッダの一部に格納してもよいし、パケットのデータの所定領域を利用してもよい。
 送信元ノードBは、時期T1のタイミングで上記a:ノード時刻(T1)、b:時計の精度、c:到達予想時刻(ExpectTime)を含む時刻情報(通知データ)を送信先ノードEに送信する。
 送信先ノードEは、時期T2のタイミングで送信元ノードBからの時刻情報(通知データ)を受信する。送信先ノードEは、受信した時刻情報(T1+ExpectTime)を時刻修正に利用する。
 この後、送信先ノードEは、時期T3のタイミングで上記d:送信先ノードEが送信する時刻情報の送信時刻と、e:送信先ノードEが送信元ノードBから時刻情報を受信した後送信時刻までの経過時間を含む時刻情報(通知データ)と、を送信元ノードBに応答する。
 送信元ノードBは、時期T4のタイミングで送信先ノードEから応答された時刻情報(通知データ)を受信する。
 上記の到達予想時刻ESは、要求と応答のタイミングから算出する。例えば、ノードB,E間のESは、下記式(1)に基づき算出することができる。
 ((T4-T1)-(T3-T2))/2)…(1)
 ここで、到達予想時刻は、送信先ノードEでの時刻修正の有無に関係なく、送信元ノードBと送信先ノードE間での到達予想時刻を算出する。このため、送信先ノードEは、送信元ノードBから送信された時刻情報を受信時のシステム時刻(タイマ314の計時時刻)と、応答する時刻情報を送信時のシステム時刻との差分(上記e:経過時間)を送信元ノードBへ応答する時刻情報に含める。
 送信元ノードBは、直接通信接続された送信先ノードE,F,Hに対し、例えば、一定の周期間隔で時刻情報を送信(要求)し、送信先ノードE,F,Hは、要求ごとに送信元ノードBに時刻情報を送信(応答)する。
 ここで、送信先ノードBは、送信先ノードEに所定のデータのパケットを送信する際、送信するパケットのヘッダ等に時刻情報を含ませ、送信先ノードEは、受信したパケットから時刻情報を抽出する。また、送信元ノードBは、送信先ノードEに一定期間、データのパケットの送信を行わない場合、時刻情報用のパケットを生成して送信先ノードEに送信する。
 送信先ノードEは、受信したパケットから時刻情報を抽出する。これにより、送信先ノードBは、直接通信接続されたノードE,F,Hに対し所定周期間隔で時刻情報を送信でき、所定周期間隔ごとに時刻同期できるようになる。
 実施の形態によれば、ネットワーク内の各ノードA~Hの「時計の精度」がそれぞれ異なってもネットワーク全体の時刻を同期することができる。時刻同期開始時には、偏差(バラツキ)が大きい状態であるが、所定時間後(例えば、約20msec経過)にネットワーク全体のノードA~Hの時刻を基準時刻、例えば「時計の精度」が最も高いノードA」に同期(各ノードB~Hの時刻の標準偏差が最小化)することができた。
 図7は、既存の時刻修正技術によるバラツキ状態を示す図である。横軸は時間、縦軸は各ノードA~D(機器100)である。ノードAは最もクロック精度が高く、ノードB,Cはややクロック精度が劣り、ノードDは最もクロック精度が低いものとした。
 既存の複数の機器100の時刻修正について、例えばFA(Factory Automation)等では、「周期処理」による時刻同期があり、例えば10msecごとに各機器A~Dが処理を実施している。この「周期処理」では、各ノードA~D間での時刻を同期させるものではないため、ノードA~Dごとに異なるクロック精度により、ノードA~D間でのスムーズな制御ができない場合が生じる。図7の例では、クロック精度が最も低いノードDが一定時間経過すると、他のノード(例えばノードC)と1周期(10msec)分の遅れが生じている。
 図8は、実施の形態の時刻同期による時刻のバラツキの収束状態を示す図である。図8(a)には、ノードA~Dを示す。直接接続された各ノードA~D間で時刻情報をやり取りし、一定周期ごとの時刻同期制御の実施により、各ノードA~Dの時刻(時刻周期)を一定のバラツキ内に収めることができ、各ノードA~D間で時刻バラツキのないスムーズな制御が可能になる。
 また、図8(b)に示すように(実施の形態に相当する構成)、各ノードA~D間で「時計の精度が高い」ノードAを基準として時刻同期を行うことで、図8(a)よりもさらに各ノードB~Dの時計の精度を修正することができる。
(時刻同期による制御の例)
 次に、図9A~図9Cを用いて、既存の機器間の制御、および実施の形態の時刻同期による機器間の制御例を説明する。これらの図では、自動運転の車両の各機器の連携制御に適用した例を示す。
 図9Aは、既存の機器間の制御例を示す図である。CAN等で各機器1~4は、中央制御部(センサ)に接続されている。例えば、機器1はアクセル、機器2はブレーキ、機器3はステアリング、等の自動運転に必要な車載の機器である。
 既存の技術では、機器1~4は、個別に一定周期で動作し、検出等の情報(制御計画情報)をセンサに送信しているが、自動運転のシステム全体ではバラバラに動作している。このため、既存の自動運転システムでは、操縦性等の乗り心地が悪いものとなっていた。
 図9Bは、既存の時刻同期による機器間の制御例を示す図である。図9Aの構成に対し、イーサネットTSN等の時刻同期機能を持つネットワークで車載のセンサ、機器1~4を接続した場合の例を示す。この場合、イーサネットTSNにより厳密な時計を用い送信側(センサ)から一定周期で各機器1~4に制御計画情報を送る。
 例えば、センサは、データ取得のタイミングと、各機器1~4への制御計画情報の送信タイミングとを異なる時期にコントロールして通信の輻輳を防ぐことができる。これにより、スムーズな制御となり乗り心地を改善することができる。しかし、ネットワークに異なるネットワーク(CAN)が含まれる場合、CANしか通信接続できない機器が生じ、この機器は時刻同期できない。
 図9Cは、実施の形態の時刻同期による機器間の制御例を示す図である。実施の形態による時刻同期では、図9B同様に、例えば、センサは、データ取得のタイミングと、各機器1~4への制御計画情報の送信タイミングとを異なる時期にコントロールして通信の輻輳を防ぐことができる。
 さらに、実施の形態による時刻同期では、各機器1~4の時刻を同期させることができる。これにより、実施の形態では、データ送受信の輻輳を抑えながら自動運転システム全体の機器1~4の制御タイミングを一致させた制御が行えるようになり、最もスムーズで気持ちよい(滑らかな)制御による自動運転を行えるようになる。
 以上説明した時刻同期は、各種システムに適用することができる。例えば、上記の自動運転に適用できる。この自動運転の車両に搭載する機器100には、システムオンチップ(SoC)や、マイコン等が多数使用されており、これらが連携して動作する。例えば、カメラによる認識で自動運転を行う場合、SoC等は、カメラ映像、車速、アクセル開度、ブレーキ状態、ステアリング角度、レーダ等のセンサによる障害物検知等の情報を元に車両の挙動を決める。
 そして、複数の機器100が時刻同期を行うことで、ステアリング、アクセル、ブレーキの制御タイミングをそろえ、スムーズな運転を行うことができるようになる(図9C参照)。実施の形態による時刻同期は、車両の中の制御とすることができ、時刻サーバを不要として複数の機器100を時刻同期できる。
 このほか、実施の形態の時刻同期は、FAの故障解析に適用することができる。工場などの現場のシステムで故障が発生した場合、故障した装置の映像と制御ログによる故障解析のためのデータ収集の機器を制御する機器100の時刻同期を行う。機器100として、複数のマイコンと、複数のカメラとを用い、これら機器100間の時刻同期を行うことで、同じタイムスタンプを持ったデータ(情報)を集めることが可能となる。収集するデータは、複数のカメラの映像、故障発生時の動作ログ等である。この適用例においても、時刻サーバを不要にでき、また、ネットワークが遮断されている状況が生じた場合や、一部の機器100が故障した場合でも、残りの機器100の間で時刻同期できるため、障害に強いシステムにできる。
 以上説明した実施の形態によれば、ネットワーク接続された複数の機器間で互いの時刻を同期させる時刻同期方法であって、送信元の機器は、ネットワークを介して通信接続された送信先の機器に自機の時計の精度を含む時刻情報をそれぞれ送信し、送信先の機器は、受信した複数の時刻情報のうち時計の精度が最も高い時刻情報を送信した送信元の機器を選択し、選択した送信元の機器が送信した時刻情報に基づき時刻を修正する、処理をネットワーク内で通信可能な機器間で繰り返し行う。これにより、互いに通信接続された機器同士間の時刻情報に基づき、時計の精度が最も高い機器に時刻同期させることができる。また、ネットワーク内で異なる各種の通信方式を含んでも、通信可能な機器同士間で時刻同期させることで、互いに直接接続されていない機器を含むネットワーク全体の機器を時刻同期させることができるようになる。また、時計サーバを配置せずともネットワーク内の機器を時刻同期できるようになる。また、送信先の機器は、複数の送信元の機器から時刻情報を受信するため、ネットワーク内のある送信元の機器が故障して失われた場合や、新たな機器(送信元の機器および送信先の機器)がネットワークに接続された場合でも、各機器を時刻同期できる。
 また、送信元の機器は、送信先の機器へデータ送信するパケットに時刻情報を含ませて送信してもよい。これにより、互いに通信可能な機器間で用いるパケットを用いて時刻情報を簡単に送信できるようになる。
 また、送信元の機器は、時刻情報を前記パケットのヘッダに格納して送信してもよい。これにより、機器間でのデータ通信に影響することなく、簡単に時刻情報をやり取りできるようになる。
 また、送信元の機器は、時刻情報の送信タイミングで、送信先の機器へのデータのパケットに時刻情報を含ませて送信し、一定期間送信先の機器へデータ送信がない場合、時刻情報用のパケットを生成して送信してもよい。これにより、機器間でやり取りするパケットの輻輳をできるだけ抑制しつつ、所定の周期間隔ごとに時刻同期できるようになる。
 また、ネットワーク内は、複数の異なる通信方式を含み、互いに通信可能な通信方式の機器同士のデータ通信により時刻を同期する。このように、同一の通信方式の機器間で時刻同期を行い、また、通信可能な通信方式の機器間で時刻同期を行うことで、異なる通信方式のネットワーク全体の機器を時刻同期できるようになる。
 また、ネットワークは、車両内通信を含み、車両内の機器を車両外の機器、および車両内の機器同士、で時刻を同期することとしてもよい。例えば、自動運転のための車両が備える制御部、アクセル、ブレーキ、ステアリング等の各機器同士を車両外の機器と時刻同期でき、時刻サーバへのアクセスなしに時刻同期できるようになる。
 また、送信元の機器は、時計の精度と、時刻情報の送信時刻と、時刻情報を送信してから送信先の機器で受信するまでの到達予想時刻と、を含む要求の時刻情報を送信し、送信先の機器は、選択した送信元の機器が送信した時刻情報を受信した際の自機の時計の時刻と、到達予想時刻との差分を算出し、差分に基づき自機の時計の時刻を修正し、送信元の機器に、要求の時刻情報に対する応答の時刻情報を送信し、応答の時刻情報は、要求の時刻情報を受信した時刻から応答の時刻情報を送信するまでの経過時間と、当該応答の時刻情報の送信時刻を含み、送信元の機器は、応答の時刻情報の受信により、到達予想時間を更新保持し、通信可能な送信先の機器に対し、時刻情報の送信を繰り返し行う。これにより、送信元の機器と送信先の機器との間の伝搬状態を含み時刻同期できるようになり、通信方式や通信速度および処理時間等が異なる機器同士を正確に時刻同期できるようになる。また、経時的な通信速度および処理時間等の変動があっても、この変動に対応して時刻同期できるようになる。
 これらのことから、実施の形態によれば、互いに直接通信接続された機器同士間で時刻情報をやり取りして各機器を時刻同期させることができる。また、ネットワーク内で直接通信接続されていない機器や、異なる通信方式で通信する機器を含んでも、通信接続可能な機器同士での時刻同期を伝搬させる形で他の機器についても時刻同期できるようになり、ネットワーク接続内の複数の機器を時刻同期できるようになる。また、時計サーバを配置せずともネットワーク内の機器を時刻同期できるようになる。また、送信先の機器は、複数の送信元の機器から時刻情報を受信するため、ネットワーク内での機器の故障や、新たな機器の追加に柔軟に対応でき、各機器を時刻同期できる。なお、本発明は、所定の機器が時刻サーバに通信接続された構成であっても同様に適用できる。
 以上のように、本発明は、ネットワークを介して接続された機器同士を時刻同期させる時刻同期システムに用いることができ、特に、各種ネットワークを介して互いに通信接続された機器間の時刻同期に有用である。
 100 機器
 301,314 タイマ
 302 送信時刻取得部
 303,313 時刻情報処理部
 304,311 通信部
 312 受信時刻取得部
 314 タイマ
 401 制御部(CPU)
 402 ROM
 403 RAM
 404 補助記憶部
 405 通信インタフェース
 406 バス
 A~H ノード

Claims (9)

  1.  ネットワーク接続された複数の機器間で互いの時刻を同期させる時刻同期方法であって、
     送信元の機器は、
     前記ネットワークを介して通信接続された送信先の機器に自機の時計の精度を含む時刻情報をそれぞれ送信し、
     前記送信先の機器は、
     受信した複数の前記時刻情報のうち前記時計の精度が最も高い時刻情報を送信した前記送信元の機器を選択し、
     前記選択した前記送信元の機器が送信した前記時刻情報に基づき時刻を修正する、
     処理を前記ネットワーク内で通信可能な機器間で繰り返し行う、
     ことを特徴とする時刻同期方法。
  2.  前記送信元の機器は、
     前記送信先の機器へデータ送信するパケットに前記時刻情報を含ませて送信する、
     ことを特徴とする請求項1に記載の時刻同期方法。
  3.  前記送信元の機器は、前記時刻情報を前記パケットのヘッダに格納して送信する、
     ことを特徴とする請求項2に記載の時刻同期方法。
  4.  前記送信元の機器は、
     前記時刻情報の送信タイミングで、前記送信先の機器へのデータのパケットに前記時刻情報を含ませて送信し、
     一定期間前記送信先の機器へデータ送信がない場合、前記時刻情報用のパケットを生成して送信する、
     ことを特徴とする請求項1に記載の時刻同期方法。
  5.  前記ネットワーク内は、複数の異なる通信方式を含み、互いに通信可能な通信方式の前記機器同士のデータ通信により時刻を同期する、
     ことを特徴とする請求項1に記載の時刻同期方法。
  6.  前記ネットワークは、車両内通信を含み、前記車両内の前記機器を前記車両外の前記機器、および前記車両内の前記機器同士、で時刻を同期する、
     ことを特徴とする請求項1に記載の時刻同期方法。
  7.  前記送信元の機器は、
     前記時計の精度と、前記時刻情報の送信時刻と、前記時刻情報を送信してから前記送信先の機器で受信するまでの到達予想時刻と、を含む要求の時刻情報を送信し、
     前記送信先の機器は、
     前記選択した前記送信元の機器が送信した前記時刻情報を受信した際の自機の前記時計の時刻と、前記到達予想時刻との差分を算出し、
     前記差分に基づき自機の前記時計の時刻を修正し、
     前記送信元の機器に、前記要求の時刻情報に対する応答の時刻情報を送信し、
     前記応答の時刻情報は、前記要求の時刻情報を受信した時刻から前記応答の時刻情報を送信するまでの経過時間と、当該応答の時刻情報の送信時刻を含み、
     前記送信元の機器は、
     前記応答の時刻情報の受信により、前記到達予想時間を更新保持し、
     通信可能な前記送信先の機器に対し、前記時刻情報の送信を繰り返し行う、
     ことを特徴とする請求項1~6のいずれか一つに記載の時刻同期方法。
  8.  ネットワーク接続された複数の機器間で互いの時刻を同期させる時刻同期プログラムであって、
     送信元の機器に、
     前記ネットワークを介して通信接続された送信先の機器に自機の時計の精度を含む時刻情報をそれぞれ送信させ、
     前記送信先の機器に、
     受信した複数の前記時刻情報のうち前記時計の精度が最も高い時刻情報を送信した前記送信元の機器を選択させ、
     前記選択した前記送信元の機器が送信した前記時刻情報に基づき時刻を修正させる、
     処理を前記ネットワーク内で通信可能な機器間で繰り返し行わせることを特徴とする時刻同期プログラム。
  9.  ネットワーク接続された複数の機器間で互いの時刻を同期させる時刻同期システムであって、
     送信元の機器は、
     前記ネットワークを介して通信接続された送信先の機器に自機の時計の精度を含む時刻情報をそれぞれ送信する制御部を有し、
     前記送信先の機器は、
     受信した複数の前記時刻情報のうち前記時計の精度が最も高い時刻情報を送信した前記送信元の機器を選択し、
     前記選択した前記送信元の機器が送信した前記時刻情報に基づき時刻を修正する、
     処理を前記ネットワーク内で通信可能な機器間で繰り返し行う制御部を有する、
     ことを特徴とする時刻同期システム。
PCT/JP2021/007564 2021-02-26 2021-02-26 時刻同期方法、時刻同期プログラムおよび時刻同期システム WO2022180851A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2023502011A JPWO2022180851A1 (ja) 2021-02-26 2021-02-26
PCT/JP2021/007564 WO2022180851A1 (ja) 2021-02-26 2021-02-26 時刻同期方法、時刻同期プログラムおよび時刻同期システム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/007564 WO2022180851A1 (ja) 2021-02-26 2021-02-26 時刻同期方法、時刻同期プログラムおよび時刻同期システム

Publications (1)

Publication Number Publication Date
WO2022180851A1 true WO2022180851A1 (ja) 2022-09-01

Family

ID=83048742

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/007564 WO2022180851A1 (ja) 2021-02-26 2021-02-26 時刻同期方法、時刻同期プログラムおよび時刻同期システム

Country Status (2)

Country Link
JP (1) JPWO2022180851A1 (ja)
WO (1) WO2022180851A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001069168A (ja) * 1999-08-27 2001-03-16 Hitachi Information Technology Co Ltd ネットワーク装置
JP2007170867A (ja) * 2005-12-19 2007-07-05 Calsonic Kansei Corp 自動車内時計の同期システム
JP2010109586A (ja) * 2008-10-29 2010-05-13 Oki Networks Co Ltd クロック発生装置、クロック発生方法、通信装置、及び同期クロック伝送システム
WO2013094072A1 (ja) * 2011-12-22 2013-06-27 トヨタ自動車 株式会社 通信システム及び通信方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001069168A (ja) * 1999-08-27 2001-03-16 Hitachi Information Technology Co Ltd ネットワーク装置
JP2007170867A (ja) * 2005-12-19 2007-07-05 Calsonic Kansei Corp 自動車内時計の同期システム
JP2010109586A (ja) * 2008-10-29 2010-05-13 Oki Networks Co Ltd クロック発生装置、クロック発生方法、通信装置、及び同期クロック伝送システム
WO2013094072A1 (ja) * 2011-12-22 2013-06-27 トヨタ自動車 株式会社 通信システム及び通信方法

Also Published As

Publication number Publication date
JPWO2022180851A1 (ja) 2022-09-01

Similar Documents

Publication Publication Date Title
JP4941753B2 (ja) フィールド制御システム
US7343437B2 (en) Synchronization method and control system for the time synchronization of slave units and a synchronizable slave unit
US8913514B2 (en) Communication control unit and communication control system
CN102684992B (zh) 用于在通信网络中进行实时数据传输的方法
EP2541853B1 (en) Synchronized wireless data concentrator for airborne wireless sensor networks
EP2822228B1 (en) Industrial network apparatus and data communication method
US11095382B2 (en) Communication system, communication device and communication method
US9288112B2 (en) Automatic network discovery in precision time protocol networks
CN103716420A (zh) Modbus ASCII从站自动获取站地址方法及从站
US11094187B2 (en) Sum stream for actual states and control signals of a distributed control system
KR102271639B1 (ko) Avb 스트림의 모듈식 배향을 위한 방법 및 디바이스
US11564241B2 (en) Method for operating a radio communication system for an industrial automation system, radio communication system, base station and subscriber station
CN104092790A (zh) 基站主从站通信方法和系统
JP6298524B2 (ja) デバイスのマッチングのための方法、装置およびシステム
CN114338267B (zh) 多管理节点的维护方法、装置、设备、总线网络及介质
WO2022180851A1 (ja) 時刻同期方法、時刻同期プログラムおよび時刻同期システム
US10594551B2 (en) Modular industrial automation device and method for configuring a modular industrial automation device
JP6836692B1 (ja) データ収集管理装置およびデータ収集システム
US8457163B2 (en) Method for data transmission via data networks
US20200213878A1 (en) Method and apparatus for controlling network sensors
WO2020128683A1 (en) A device and method for scheduling data transmission for non-tsn devices over time sensitive networking (tsn)
US10574797B2 (en) Method for configuring a device connected to a field bus
WO2009123202A1 (ja) 監視システム
CN114124616A (zh) 基于epa总线结构的时钟同步优化方法
US11824925B1 (en) Node-to-node network time synchronization

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21927950

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2023502011

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21927950

Country of ref document: EP

Kind code of ref document: A1