Time synchronization method, time synchronization program, and time synchronization system
Devices synchronize time by exchanging information on clock accuracy and expected arrival time, selecting the most accurate source, and correcting their time accordingly, addressing network connection issues and varying communication methods to achieve robust time synchronization.
Patent Information
- Application Number
- JP2023502011
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-02-26
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2041-02-26
AI Technical Summary
Existing time synchronization methods fail to synchronize the time of devices due to network connection issues, such as network disconnection or the presence of different communication methods, leading to incomplete time synchronization across devices.
A time synchronization method that allows devices to exchange time information including clock accuracy, transmission time, and expected arrival time, enabling devices to select the source with the highest clock accuracy and correct their time based on this information, even in networks with varying communication methods, without relying on a central time server.
Enables time synchronization across multiple devices within a network, even in the presence of different communication methods and network failures, ensuring accurate time synchronization without the need for a central time server.
Smart Images

Figure 0007604753000001 
Figure 0007604753000002 
Figure 0007604753000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a time synchronization method, a time synchronization program, and a time synchronization system for time-synchronizing different devices. [Background technology]
[0002] Network standards such as Ethernet TSN (Time-Sensitive Networking) stipulate a method for synchronizing time between devices connected to an Ethernet. In this time synchronization, each device connects to a time server that has standard time and adjusts its time to the "time server."
[0003] Individual devices include PCs and servers connected to Ethernet, as well as in-vehicle devices installed in vehicles and connected to a CAN (Controller Area Network), home appliances connected to ECHONET (Energy Conservation and HOmecare NETwork) (registered trademark), and factory equipment that operates by executing a control program in a PLC (Programmable Logic Controller).
[0004] Conventionally, there are technologies related to time synchronization via a network, such as those described in the following Patent Documents 1 and 2. Patent Document 1 stabilizes clock synchronization by counting a frequency clock when a Network Time Protocol (NTP) server device broadcasts NTP to client terminal devices and determines whether or not to use a reference time to correct time information. Patent Document 2 synchronizes the time of home appliances and the like from an external communication network using the home appliance time synchronization protocol in accordance with the ECHONET standard. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2018-098711 A [Patent Document 2] JP 2008-152343 A Summary of the Invention [Problem to be solved by the invention]
[0006] However, in the conventional technology, some devices were unable to perform time synchronization depending on the connection state of each device on the network, as described below.
[0007] Fig. 10 is an explanatory diagram of problem 1 of the conventional technology. Fig. 10 shows an example of a configuration in which devices B to H are connected to a time server A via a network such as Ethernet. In the case of time synchronization using time server A, if time server A breaks down as shown in Fig. 10, devices B to H will no longer be able to synchronize their times with time server A. In addition, devices B to H that are no longer connected to time server A due to a network disconnection or the like will also no longer be able to synchronize their times.
[0008] FIG. 11 is an explanatory diagram of problem 2 of the prior art. Usually, many networks contain not only Ethernet but also slow networks such as CAN. FIG. 11 shows that devices B, C, and D are connected to time server A via a fast connection such as Ethernet, but devices E to G are connected via a slower connection. Here, the mixture of communication methods on the network, for example, devices connected via Ethernet and devices connected via CAN use different communication methods, and time synchronization cannot be easily achieved.
[0009] 11, device E is connected to device B, and devices E to H are not directly connected to time server A. In this case, only the device group GP (devices B to D) directly connected to time server A can perform time synchronization, and devices E to H that are not directly connected to time server A cannot perform time synchronization.
[0010] In view of the above-mentioned problems, an object of the present invention is to enable time synchronization among multiple devices on a network without connecting to a time server. [Means for solving the problem]
[0011] In order to achieve the above object, the time synchronization method of the present invention is a method for synchronizing the times of a plurality of devices connected to a network, in which a source device transmits time information including the accuracy of its own clock to a destination device connected for communication via the network, and the destination device selects the source device which transmitted the time information with the highest accuracy of the clock from among the plurality of pieces of time information it received, and corrects the time based on the time information transmitted by the selected source device, and this process is repeated among devices which can communicate within the network. the source device transmits requested time information including the accuracy of the clock, the transmission time of the time information, and an estimated arrival time from the transmission of the time information until the reception at the destination device, the destination device calculates a difference between the time of the clock of the destination device when the destination device receives the time information transmitted by the selected source device and the estimated arrival time, corrects the time of the clock of the destination device based on the difference, and transmits response time information to the source device in response to the request time information, the response time information including the elapsed time from the reception of the request time information until the transmission of the response time information and the transmission time of the response time information, the source device updates and holds the estimated arrival time upon receiving the response time information, and repeatedly transmits the time information to the destination device with which it can communicate. It is characterized by:
[0012] The source device transmits the time information to the destination device by including it in a packet for data transmission.
[0013] The source device stores the time information in the header of the packet and transmits the packet.
[0015] The network may include a plurality of different communication methods, and time may be synchronized by data communication between devices using communication methods that allow communication with each other.
[0016] The network also includes in-vehicle communication, and synchronizes time between the devices inside the vehicle and the devices outside the vehicle, and between the devices inside the vehicle and each other.
[0018] A time synchronization program of the present invention is a time synchronization program for synchronizing the times of a plurality of devices connected to a network, the program causing a source device to transmit time information including the accuracy of its own clock to a destination device connected for communication via the network, causing the destination device to select the source device which transmitted the time information having the highest accuracy of the clock from among the plurality of pieces of time information received, and correcting the time based on the time information transmitted by the selected source device, and causing this process to be repeatedly performed among devices capable of communicating within the network. causing the source device to transmit requested time information including the accuracy of the clock, the transmission time of the time information, and an estimated arrival time from the transmission of the time information until it is received by the destination device; causing the destination device to calculate a difference between the time of its own clock when it receives the time information transmitted by the selected source device and the estimated arrival time, and correcting the time of its own clock based on the difference; causing the source device to transmit response time information to the requested time information, the response time information including the elapsed time from the reception of the request time information to the transmission of the response time information and the transmission time of the response time information; causing the source device to update and hold the estimated arrival time upon reception of the response time information; and causing the destination device to repeatedly transmit the time information to the destination device with which communication is possible. It is characterized by:
[0019] The time synchronization system of the present invention is a time synchronization system for synchronizing the times of a plurality of devices connected to a network, in which a source device has a control unit that transmits time information including the accuracy of its own clock to a destination device connected for communication via the network, and the destination device selects the source device that transmitted the time information with the highest accuracy of the clock from among the plurality of received time information, and corrects the time based on the time information transmitted by the selected source device, and the control unit repeats this process between devices that can communicate within the network. a control unit of the source device transmits requested time information including the accuracy of the clock, the transmission time of the time information, and an estimated arrival time from the transmission of the time information until it is received by the destination device; a control unit of the destination device calculates a difference between the time of the clock of the destination device when it receives the time information transmitted by the selected source device and the estimated arrival time, corrects the time of the clock of the destination device based on the difference, and transmits response time information to the source device in response to the request time information, the response time information including the elapsed time from the reception of the request time information to the transmission of the response time information and the transmission time of the response time information; and a control unit of the source device updates and holds the estimated arrival time upon receiving the response time information, and repeatedly transmits the time information to the destination device with which communication is possible. It is characterized by:
[0020] According to the above configuration, it is possible to synchronize the time between devices that are connected to each other for communication based on the time information. Even if the network includes various different communication methods, it is possible to synchronize the time of the devices in the entire network by synchronizing the time between devices that can communicate with each other. It is also possible to synchronize the time of the devices in the network without disposing a clock server. Effect of the Invention
[0021] According to the present invention, it is possible to advantageously synchronize the times of a plurality of devices on a network without connecting to a time server. [Brief description of the drawings]
[0022] [Figure 1] FIG. 1 is a diagram illustrating an example of a configuration of a time synchronization system according to an embodiment. [Diagram 2] FIG. 2 is a diagram illustrating an example of node connections in the time synchronization system according to the embodiment. [Diagram 3] FIG. 3 is a block diagram of an example of functions of the time synchronization system according to the embodiment. [Figure 4] FIG. 4 is a diagram illustrating an example of a hardware configuration of a node according to the embodiment. [Diagram 5] FIG. 5 is a flowchart of an example of a control process of the time synchronization system according to the embodiment. [Figure 6] FIG. 6 is a diagram showing the exchange of time information used in the embodiment. [Figure 7] FIG. 7 is a diagram showing the variation that occurs when using existing time adjustment techniques. [Figure 8] FIG. 8 is a diagram illustrating a convergence state of time variations due to time synchronization according to the embodiment. [Figure 9A] FIG. 9A is a diagram showing an example of control between existing devices. [Figure 9B] FIG. 9B is a diagram showing an example of control between devices based on existing time synchronization. [Figure 9C] FIG. 9C is a diagram illustrating an example of control between devices based on time synchronization according to the embodiment. [Figure 10] FIG. 10 is an explanatory diagram of problem 1 of the prior art. [Figure 11] FIG. 11 is an explanatory diagram of problem 2 of the prior art. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0023] (Embodiment) Preferred embodiments of a time synchronization method, a time synchronization program, and a time synchronization system according to the present invention will be described in detail below with reference to the accompanying drawings.
[0024] Fig. 1 is a diagram showing an example of the configuration of a time synchronization system according to an embodiment. As shown in Fig. 1, a plurality of devices 100 that perform time synchronization are communicatively connected to each other via various networks.
[0025] For example, in the device 100, a smartphone 100a is communicatively connected to a PC 100b via the Internet 111. The PC 100b is communicatively connected to a control board 100c via an Ethernet 112a. The PC 100b is communicatively connected to a control board 100d via an Ethernet 112b. The control board 100d is communicatively connected to the control board 100c via an Ethernet 112c.
[0026] The control board 100c is communicatively connected to the control board 100e via a CAN 113. The control board 100e is communicatively connected to the control board 100f by a serial communication 114.
[0027] Among the devices 100 shown in Fig. 1, the PC 100b and the control boards 100c and 100d perform time synchronization on the Ethernet based on the communication standard of, for example, IEEE802.1AS. As shown in Fig. 1, in the embodiment, it is not necessary to place a time server described in the prior art on the system. Note that in the embodiment, a specific device, for example, a device capable of communicating with a time server such as the PC 100b, may be placed on the system.
[0028] The time synchronization system according to the embodiment has the following features. 1. No time server is required. 2. There is no need to obtain standard time from a time server, etc. 3. Time synchronization (time matching) is possible even when different communication methods are mixed within a system or when the devices 100 are not directly connected to each other in a network. 4. Even if a device 100 in the network breaks down and is lost, or if a new device 100 is connected to the network, time synchronization can be maintained.
[0029] Fig. 2 is a diagram showing an example of node connections in a time synchronization system according to an embodiment. In Fig. 2, multiple devices 100 are shown as nodes A to H. The time synchronization system according to the embodiment has the following configurations. In the figure, solid lines indicate fast connections between nodes with a communication speed equal to or higher than a predetermined speed, and dotted lines indicate slow connections with a communication speed lower than a predetermined speed.
[0030] 1. Each of the nodes A to H (devices 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: Your time (node time) b: The accuracy of your own clock (node accuracy) c: The time (taking into account transmission delays) when the data arrives at the other end (estimated arrival time)
[0031] The accuracy of the clock is, for example, the accuracy of the clock that the node has. In the time synchronization system of the embodiment, it is not necessary to use a packet dedicated to time. When a node sends a packet without data to a partner node, the packet is a packet dedicated to time. This allows each node A to H to obtain time information sent from the partner nodes A to H with which it is connected in communication, without having to actively go and get the time.
[0032] 2. Overview of time synchronization 1) A node that has just been turned on and has not yet determined its time acquires one or more pieces of time information according to the number of packets sent from other nodes within a certain period of time. For example, node E receives packets from nodes B, F, and H that are directly connected to it.
[0033] 2) Node E uses the time information from node B, which has the most accurate clock among the packets received from nodes B, F, and H, as the basis for its own time.
[0034] 3) Node E returns the time information, including the elapsed time until the time was reached, to node B, which adopted the time information. 4) Node B, which has received the time information, calculates (updates) the time information to be sent next to target node E, based on the time elapsed since the transmission time of the previous packet. This calculation of time information is performed using a method that uses the expected arrival time.
[0035] Here, node E responds with time information to node B, and this responded time information includes the following d and e. d: Transmission time of the time information responded by destination node E e: The time elapsed from when source node E received the time information from source node B until the transmission time
[0036] 5) Node E, which has synchronized its time, can also send time information to the surrounding nodes B, F, and H with which it is connected for communication.
[0037] According to the above, even if time information from some of the communicatively connected nodes B, F, and H (for example, node B) is interrupted, node E can receive time information from the other nodes F and H. Then, node E can adjust the time of its own node E (time synchronization) using the time information received from the other nodes F and H, thereby improving the resistance to communication failures that occur on unspecified communication paths on the network.
[0038] In addition, because node E synchronizes its time with other nearby nodes B, F, and H, it can synchronize its time even if there is no time server on the network, and it can also synchronize the time of nodes A to H throughout the system.
[0039] Also, assume that there is one highly accurate node (for example, node A) and all nodes B to H are directly connected to this highly accurate node A. In this case, each of nodes B to H will synchronize their time with node A, achieving time synchronization accuracy similar to that of Ethernet TSN.
[0040] Here, even if a failure occurs in node A, each of nodes B to H will be able to automatically adopt the time information of the node with the next highest accuracy (nodes C to H) to synchronize time, which provides flexible time synchronization that cannot be achieved with Ethernet TSN.
[0041] Fig. 3 is a block diagram showing an example of the functions of a time synchronization system according to an embodiment. Fig. 3 shows devices 100 of a pair of time-synchronized source node B and destination node E. In the network connection example of Fig. 1, nodes B, F, and H that are communicatively connected to destination node E are source nodes.
[0042] 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. The timer 301 measures time information. The transmission time acquisition unit 302 acquires a transmission time for transmitting time information to the destination node E based on the measured time information of the timer 301.
[0043] The time information processing unit 303 generates time information to be transmitted to the destination node E. The time information includes the above 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, but can be updated to a more accurate value that takes into account propagation delays by exchanging time information between the source node B and the destination node E.
[0044] The communication unit 304 communicates between the source node B and the destination node E in a communication method compatible with the network between them.
[0045] Furthermore, when the time information processing unit 303 receives a response of time information from the destination node E, it updates, based on this time information, the predicted arrival time previously transmitted to the destination node E. The responded time information includes: d: the transmission time of the time information transmitted by the destination node E; and e: the elapsed time from when the source node B received the time information from the source node B until the transmission time.
[0046] The time information processing unit 303 of the source node B updates and holds the predicted arrival time included in the time information for the destination node E. The next time that the time information processing unit 303 transmits time information to the destination node E, it includes the updated arrival time in the time information and transmits it.
[0047] 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 communicates with the destination node E and the source node B using a communication method compatible with the network between them.
[0048] 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 source node B was received.
[0049] The time information processing unit 313 determines whether or not to adopt the time information received from the source node B based on the "clock accuracy" of the source node B, and if adopted, corrects the time of its own node E according to the difference from the predicted arrival time contained in the time information.
[0050] Here, destination node E receives time information from each of source nodes B, F, and H with which it is directly connected in communication, and selects the source node (node B) with the highest clock accuracy contained in the time information received from source nodes B, F, and H, and synchronizes its own node E with the time of source node B.
[0051] Then, the time information processing unit 313 corrects the advance / delay of the time measured by the timer 314 in the node E in order to synchronize the node E with the time of the source node B. The time information processing unit 313 also transmits time information to the source node B. The time information includes the transmission time of this time information and the elapsed time from when the time information was received from the source node B until the transmission time.
[0052] In Fig. 3, for convenience, the functions of the source node and the destination node are shown separately. In reality, each node (device 100) has the functions of the source node and the destination node. Therefore, a given node (device 100) has the functions of the source node and the destination node shown in Fig. 3. Also, the communication units 304, 311 in Fig. 3 can be arranged as one function per node (device 100), and the time information processing units 303, 313 can also be arranged as one function per node (device 100).
[0053] Fig. 4 is a diagram showing an example of a hardware configuration of a node according to an embodiment. The devices 100 constituting the above-mentioned nodes A to H can be configured with the hardware shown in Fig. 4. In Fig. 4, each of the devices 100 includes 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, a communication interface (I / F) 405, and an input / output I / F 410. The CPU 401 to the input / output I / F 410 are connected to each other via a bus 406.
[0054] The device 100 may have a display, keyboard, mouse, scanner, and printer in accordance with the device configuration of a PC, smartphone, various boards, and the like, which can be connected via the input / output I / F 410. Note that the device 100, such as a smartphone or tablet, can also use a touch panel that integrates the functions of a display, keyboard, and mouse.
[0055] The CPU 401 is an arithmetic processing device that controls the device 100 and, in this embodiment, is responsible for time synchronization. The ROM 402 is a non-volatile memory that stores programs and the like of the device 100. The RAM 403 is a volatile memory that is used as a work area when the CPU 401 executes arithmetic processing of the programs.
[0056] The communication I / F 405 manages an internal interface with the network NW, and inputs and outputs data between the other devices 100. Specifically, the communication I / F 405 communicates with the other devices 100 via various networks NW such as a LAN (Local Area Network), a CAN, and an ECHONET through a communication line.
[0057] In addition to the above, the network NW may include WiFi (registered trademark), Bluetooth (registered trademark), infrared communication (IrDA), etc., and can communicate with other devices 100 wirelessly / wired.
[0058] Fig. 5 is a flowchart showing an example of control processing of the time synchronization system according to the embodiment. Fig. 5 shows an example of control processing executed by each control unit (CPU 401) of the source node B (100) and the destination node E (100) in correspondence with the description of Fig. 2 as an example of processing of the source node and the destination node devices 100.
[0059] The control process on the source node B side will be described. The source node B acquires the transmission time when transmitting the time information to the destination node E (100) from the timer 301 (step S501), and transmits the time information (step S502). The time information includes the above a: node time, b: clock accuracy, and c: expected arrival time.
[0060] Thereafter, the source node B waits for a response of time information from the destination node E, and upon receiving the time information (step S503), it updates the stored predicted arrival time at node E based on d: transmission time and e: elapsed time included in the returned time information (step S504). This update enables the source node B to obtain a predicted arrival time that takes into account the propagation delay between nodes B and E, and improves the accuracy of the predicted arrival time included in the time information to be transmitted to node E next time.
[0061] By exchanging the above series of processes with node E, the source node B can successively update the estimated arrival time, which corresponds to the time synchronization processing time at node E and the fluctuation over time of the transmission characteristics of the network between nodes B and E, thereby improving the accuracy of time synchronization.
[0062] Next, a description will be given of the control process on the side of destination node E. When destination node E receives time information from source node B (step S511), it acquires the reception time of the time information from timer 314 of node E (step S512).
[0063] Next, destination node E decides whether to accept the time information received from source node B (step S513). Destination node E receives time information from nodes B, F, and H that are directly connected to it. In step S513, destination node E compares the "clock accuracy" included in the time information of each of nodes B, F, and H, and selects the node with the highest "clock accuracy." In the example of FIG. 5, destination node B is selected.
[0064] Then, destination node E decides to adopt the time information of source node B (step S513: Yes), and executes the processes of step S514 and after. On the other hand, destination node E decides not to adopt the time information of source nodes F and H (step S513: No), and proceeds to the process of step S517.
[0065] In step S514, the destination node E calculates the difference between the reception time acquired in step S512 and the expected arrival time included in the clock information (step S514). Then, the destination node E corrects the time (advance / lag) 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 the NTP time synchronization (step S516).
[0066] Thereafter, the destination node E returns the time information to the source node B (step S517). The time information in the response includes: d: the transmission time of the time information transmitted by the destination node E; and e: the elapsed time from when the destination node E received the time information from the source node B until the transmission time.
[0067] In this way, destination node E can synchronize its own time with source node B, which has the highest "clock accuracy," and correct the time based on the time information received from directly connected (adjacent) source nodes B, F, and H.
[0068] Furthermore, after performing time synchronization, node E can perform time synchronization with other destination nodes (nodes F and H in the example of FIG. 2) directly connected as source node E, and all nodes A to H in the network can be time synchronized. Here, since directly connected nodes can communicate with each other using a predetermined communication method, by repeating the above process, it is possible to time synchronize the nodes (devices 100) in the entire network in which various communication methods are mixed.
[0069] Fig. 6 is a diagram showing the exchange of time information used in the embodiment. Fig. 6 shows the source node B and destination node E (device 100). When the source node B transmits predetermined data (packet) to the destination node E, it includes time information in the packet and sends it. The time information may be stored in a part of the packet header, or may use a predetermined area of the packet data.
[0070] The source node B transmits time information (notification data) including the above a: node time (T1), b: clock accuracy, and c: expected arrival time (ExpectTime) to the destination node E at the timing of time T1.
[0071] At time T2, destination node E receives the time information (notification data) from source node B. Destination node E uses the received time information (T1+ExpectTime) to correct the time.
[0072] After this, at timing T3, destination node E responds to source node B with the above d: the transmission time of the time information transmitted by destination node E, and e: time information (notification data) including the elapsed time from when destination node E received the time information from source node B to the transmission time.
[0073] The source node B receives the time information (notification data) sent back from the destination node E at the timing of time T4.
[0074] The estimated arrival time ES is calculated from the timing of the request and response. For example, the estimated arrival time ES between nodes B and E can be calculated based on the following formula (1). ((T4-T1)-(T3-T2)) / 2)…(1)
[0075] Here, the predicted arrival time is calculated between source node B and destination node E, regardless of whether or not the time has been corrected at destination node E. For this reason, destination node E includes in the time information it responds to source node B the difference between the system time at the time of receiving the time information transmitted from source node B (the time measured by timer 314) and the system time at the time of transmitting the time information it responds to (e: elapsed time above).
[0076] The source node B transmits (requests) time information to the destination nodes E, F, and H with which it is directly connected in communication, for example at regular periodic intervals, and the destination nodes E, F, and H transmit (respond) time information to the source node B for each request.
[0077] Here, when the destination node B transmits a packet of predetermined data to the destination node E, it 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. Also, when the source node B does not transmit a packet of data to the destination node E for a certain period of time, it generates a packet for time information and transmits it to the destination node E.
[0078] Destination node E extracts the time information from the received packet. This enables destination node B to transmit time information at regular intervals to nodes E, F, and H that are directly connected in communication with it, enabling time synchronization at regular intervals.
[0079] According to the embodiment, even if the "clock accuracy" of each of the nodes A to H in the network is different, the time of the entire network can be synchronized. At the start of time synchronization, there is a large deviation (variation), but after a certain time (e.g., about 20 msec has passed), the time of the nodes A to H in the entire network can be synchronized to a reference time, for example, node A, which has the highest "clock accuracy" (the standard deviation of the time of each of the nodes B to H is minimized).
[0080] Figure 7 is a diagram showing the variation caused by existing time correction techniques. The horizontal axis is time, and the vertical axis is each of nodes A to D (devices 100). Node A has the highest clock accuracy, nodes B and C have slightly poorer clock accuracy, and node D has the lowest clock accuracy.
[0081] Regarding time adjustment for multiple existing devices 100, for example in FA (Factory Automation), there is time synchronization by "periodic processing", where each device A to D performs processing, for example, every 10 msec. This "periodic processing" does not synchronize the time between each of the nodes A to D, so there are cases where smooth control between the nodes A to D is not possible due to the different clock accuracy of each of the nodes A to D. In the example of Figure 7, node D, which has the lowest clock accuracy, is delayed by one cycle (10 msec) from other nodes (for example, node C) after a certain period of time has passed.
[0082] Fig. 8 is a diagram showing the convergence state of time variation due to time synchronization in the embodiment. Fig. 8(a) shows nodes A to D. By exchanging time information between the directly connected nodes A to D and implementing time synchronization control at regular intervals, the time (time cycle) of each of the nodes A to D can be kept within a certain variation, enabling smooth control without time variation between the nodes A to D.
[0083] Furthermore, as shown in FIG. 8(b) (a configuration corresponding to an embodiment), by performing time synchronization between nodes A to D using node A, which has "high clock accuracy," as a reference, it is possible to correct the clock accuracy of nodes B to D even more than in FIG. 8(a).
[0084] (Example of control by time synchronization) Next, an example of control between existing devices and control between devices by time synchronization according to the embodiment will be described with reference to Figures 9A to 9C. These figures show an example in which the present invention is applied to cooperative control of devices in an autonomous driving vehicle.
[0085] 9A is a diagram showing an example of control between existing devices. Devices 1 to 4 are connected to a central control unit (sensor) by CAN or the like. For example, device 1 is an accelerator, device 2 is a brake, device 3 is a steering wheel, and other in-vehicle devices necessary for autonomous driving.
[0086] In the existing technology, devices 1 to 4 operate individually at a fixed cycle and transmit detection information (control plan information) to a sensor, but they operate independently in the entire autonomous driving system. For this reason, the existing autonomous driving system has poor maneuverability and ride comfort.
[0087] Fig. 9B is a diagram showing an example of control between devices using existing time synchronization. In contrast to the configuration in Fig. 9A, this shows an example in which an in-vehicle sensor and devices 1 to 4 are connected by a network with a time synchronization function such as Ethernet TSN. In this case, a precise clock is used by Ethernet TSN to send control plan information from the sending side (sensor) to each of the devices 1 to 4 at regular intervals.
[0088] For example, the sensor can prevent communication congestion by controlling the timing of data acquisition and the timing of transmission of control plan information to each device 1 to 4 at different times. This allows smoother control and improves ride comfort. However, if the network includes a different network (CAN), some devices can only communicate via CAN, and these devices cannot be time-synchronized.
[0089] 9C is a diagram showing an example of control between devices by time synchronization according to an embodiment. In the time synchronization according to the embodiment, as in FIG. 9B, for example, a sensor can control the timing of data acquisition and the timing of transmission of control plan information to each of devices 1 to 4 at different times to prevent communication congestion.
[0090] Furthermore, in the time synchronization according to the embodiment, it is possible to synchronize the time of each of the devices 1 to 4. As a result, in the embodiment, it is possible to perform control that synchronizes the control timing of the devices 1 to 4 of the entire autonomous driving system while suppressing congestion in data transmission and reception, and it is possible to perform autonomous driving with the smoothest and most comfortable (smooth) control.
[0091] The time synchronization described above can be applied to various systems. For example, it can be applied to the above-mentioned autonomous driving. The device 100 mounted on this autonomous driving vehicle uses a large number of system-on-chips (SoCs), microcomputers, etc., which operate in cooperation with each other. For example, when autonomous driving is performed by recognition using a camera, the SoC etc. decides the behavior of the vehicle based on information such as the camera image, vehicle speed, accelerator opening, brake state, steering angle, and obstacle detection by sensors such as radar.
[0092] By synchronizing the time of the multiple devices 100, the control timing of the steering, accelerator, and brakes can be aligned, enabling smooth driving (see FIG. 9C). The time synchronization according to the embodiment can be controlled within the vehicle, and the multiple devices 100 can be time-synchronized without the need for a time server.
[0093] In addition, the time synchronization of the embodiment can be applied to failure analysis of FA. When a failure occurs in a system on-site such as a factory, time synchronization is performed on the device 100 that controls the device for collecting data for failure analysis using the video and control log of the failed device. By using multiple microcomputers and multiple cameras as the device 100 and performing time synchronization between these devices 100, it becomes possible to collect data (information) with the same time stamp. The collected data includes video from multiple cameras, operation logs at the time of failure, etc. In this application example, a time server can be eliminated, and even if a situation occurs in which the network is cut off or some of the devices 100 fail, time synchronization can be performed between the remaining devices 100, making the system resistant to failures.
[0094] According to the embodiment described above, in the time synchronization method for synchronizing the time among a plurality of devices connected to a network, a source device transmits time information including the accuracy of its own clock to a destination device connected to the network through communication, and the destination device selects a source device that transmits the most accurate time information among the received plurality of pieces of time information, and corrects the time based on the time information transmitted by the selected source device. This process is repeated among devices that can communicate within the network. As a result, the time can be synchronized with the device with the most accurate clock based on the time information between the devices connected to each other through communication. Furthermore, even if the network includes various different communication methods, by synchronizing the time between the devices that can communicate with each other, it becomes possible to synchronize the time of the entire network including devices that are not directly connected to each other. Furthermore, it becomes possible to synchronize the time of the devices within the network without disposing a clock server. Furthermore, since the destination device receives time information from a plurality of source devices, even if a source device in the network breaks down and is lost, or if a new device (the source device and the destination device) is connected to the network, each device can be time synchronized.
[0095] In addition, the source device may include time information in a packet for data transmission to the destination device, thereby making it possible to easily transmit time information using packets used between devices that can communicate with each other.
[0096] Furthermore, the source device may store time information in the header of the packet before transmitting it, which allows time information to be easily exchanged between devices without affecting data communication between the devices.
[0097] In addition, the source device may include time information in a data packet to the destination device at the timing of transmitting the time information, and if no data is transmitted to the destination device for a certain period of time, generate and transmit a packet for the time information. This makes it possible to synchronize the time at a predetermined periodic interval while minimizing congestion of packets exchanged between devices.
[0098] The network also includes multiple different communication methods, and time is synchronized by data communication between devices that can communicate with each other using the communication methods. In this way, time synchronization is performed between devices using the same communication method, and also between devices using communication methods that can communicate with each other, making it possible to synchronize the time of devices across the entire network using different communication methods.
[0099] The network may also include in-vehicle communication, and may synchronize the time between devices inside the vehicle and devices outside the vehicle, and between devices inside the vehicle. For example, devices such as a control unit, accelerator, brake, and steering wheel equipped in an autonomous driving vehicle can be synchronized with devices outside the vehicle, and time synchronization can be achieved without accessing a time server.
[0100] The source device transmits requested time information including the accuracy of the clock, the transmission time of the time information, and the expected arrival time from the transmission of the time information to the reception by the destination device, and the destination device calculates the difference between the time of its own clock when it receives the time information transmitted by the selected source device and the expected arrival time, corrects the time of its own clock based on the difference, and transmits response time information to the source device in response to the requested time information, and the response time information includes the elapsed time from the time of receiving the requested time information to the time of transmission of the response time information and the transmission time of the response time information, and the source device updates and holds the expected arrival time by receiving the response time information, and repeatedly transmits the time information to the destination device with which it can communicate. This enables time synchronization including the propagation state between the source device and the destination device, and enables accurate time synchronization between devices with different communication methods, communication speeds, processing times, etc. Furthermore, even if there is a change in the communication speed and processing time over time, time synchronization can be performed in response to this change.
[0101] From these, according to the embodiment, the devices directly connected to each other can exchange time information to synchronize the time of each device. Furthermore, even if the device includes devices that are not directly connected to each other in the network or devices that communicate using different communication methods, the time synchronization between the devices that can be connected to each other can be propagated to other devices, and multiple devices in the network connection can be time synchronized. Furthermore, the devices in the network can be time synchronized without disposing a clock server. Furthermore, since the destination device receives time information from multiple source devices, it can flexibly respond to device failures and the addition of new devices in the network, and each device can be time synchronized. Note that the present invention can be similarly applied to a configuration in which a specific device is connected to a time server for communication. [Industrial Applicability]
[0102] As described above, the present invention can be used in a time synchronization system that synchronizes the time between devices connected via a network, and is particularly useful for time synchronization between devices that are connected to each other and communicate with each other via various networks. [Explanation of symbols]
[0103] 100 equipment 301,314 Timer 302 Transmission time acquisition unit 303,313 Time information processing section 304,311 Communications Department 312 Reception time acquisition unit 314 Timer 401 Control Unit (CPU) 402 ROM 403 RAM 404 Auxiliary storage 405 Communication Interface 406 Bus A~H Nodes
Claims
1. A time synchronization method for synchronizing the times of a plurality of devices connected to a network, comprising the steps of: The sending device is Transmitting time information including the accuracy of the clock of the device to each of the destination devices communicatively connected via the network; The destination device is Selecting the source device that has transmitted the time information having the highest clock accuracy from among the plurality of received time information; correcting the time based on the time information transmitted by the selected source device; The process is repeated among devices capable of communicating within the network; The source device is Transmitting requested time information including the accuracy of the clock, the transmission time of the time information, and an expected arrival time from when the time information is transmitted until when the time information is received by the destination device; The destination device is calculating a difference between the time of the clock of the device itself when the time information transmitted from the selected transmission source device is received and the predicted arrival time; correcting the time on the clock of the own device based on the difference; Transmitting time information in response to the time information of the request to the source device; the time information of the response includes an elapsed time from the time the time information of the request was received to the time the time information of the response was transmitted, and a transmission time of the time information of the response; The source device is Upon receiving the time information of the response, the expected arrival time is updated and stored; repeatedly transmitting the time information to the destination device with which communication is possible; A time synchronization method comprising:
2. The source device is transmitting the time information to the destination device by including it in a packet for data transmission; The time synchronization method according to claim 1 .
3. the source device stores the time information in a header of the packet and transmits the packet; The time synchronization method according to claim 2 .
4. The source device, transmitting the time information included in a packet of data to the destination device at a timing to transmit the time information; if no data is transmitted to the destination device for a certain period of time, a packet for the time information is generated and transmitted; The time synchronization method according to claim 1 .
5. The network includes a plurality of different communication methods, and time is synchronized by data communication between the devices of the communication methods that can communicate with each other. The time synchronization method according to claim 1 .
6. The network includes in-vehicle communication, and synchronizes time between the devices in the vehicle and the devices outside the vehicle, and between the devices in the vehicle and each other. The time synchronization method according to claim 1 .
7. A time synchronization program for synchronizing the times of multiple devices connected to a network, comprising: On the sending device, transmitting time information including the accuracy of the clock of the device to each of the destination devices communicatively connected via the network; The destination device, selecting the source device that has transmitted the time information having the highest clock accuracy from among the plurality of pieces of time information received; correcting the time based on the time information transmitted by the selected source device; Repeating the process among devices that can communicate within the network; The source device, transmitting 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 transmitted until when it is received by the destination device; The destination device, calculating a difference between the time of the clock of the device itself when the time information transmitted from the selected transmission source device is received and the predicted arrival time; correcting the time on the clock of the own device based on the difference; causing the source device to transmit time information in response to the time information of the request; the time information of the response includes an elapsed time from the time the time information of the request was received to the time the time information of the response was transmitted, and a transmission time of the time information of the response; The source device, Upon receiving the time information of the response, the predicted arrival time is updated and stored; causing the communication destination device to repeatedly transmit the time information; A time synchronization program comprising:
8. A time synchronization system for synchronizing the times of multiple devices connected to a network, comprising: The sending device is a control unit for transmitting time information including the accuracy of a clock of the device to each of destination devices connected in communication with the device via the network; The destination device is Selecting the source device that has transmitted the time information having the highest clock accuracy from among the plurality of received time information; correcting the time based on the time information transmitted by the selected source device; A control unit that repeatedly performs processing among devices that can communicate within the network, The control unit of the source device Transmitting requested time information including the accuracy of the clock, the transmission time of the time information, and an expected arrival time from when the time information is transmitted until when the time information is received by the destination device; The control unit of the destination device calculating a difference between the time of the clock of the device itself when the time information transmitted from the selected transmission source device is received and the predicted arrival time; correcting the time on the clock of the own device based on the difference; Transmitting time information in response to the time information of the request to the source device; the time information of the response includes an elapsed time from the time the time information of the request was received to the time the time information of the response was transmitted, and a transmission time of the time information of the response; The control unit of the source device Upon receiving the time information of the response, the expected arrival time is updated and stored; repeatedly transmitting the time information to the destination device with which communication is possible; A time synchronization system comprising:
Citation Information
Patent Citations
Network device
JP2001069168A
In-vehicle clock synchronization system
JP2007170867A
Home electric appliance controller and home electric appliance control method
JP2008152343A
Clock generator, clock generation method, communication device and synchronous clock transmission system
JP2010109586A
Time synchronization system, client terminal device, time synchronization method, and time synchronization program
JP2018098711A
