In-vehicle device, time synchronization method, and time synchronization program
The in-vehicle device adjusts transmission times based on time differences to maintain consistent data storage and prevent system failures caused by fluctuating reference times in in-vehicle communication systems.
Patent Information
- Application Number
- JP2024534967
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-07-20
- Filing Date
- 2023-06-14
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2043-06-14
AI Technical Summary
Existing in-vehicle communication systems face operational abnormalities due to fluctuations in the reference time transmitted by the grand master, leading to irregular data storage times and potential system failures.
An in-vehicle device with a transmission processing unit that transmits time synchronization information at a predetermined period and a correction unit that adjusts the transmission time based on the time difference between current and previous transmission times, ensuring accurate time synchronization even with fluctuating reference times.
This approach suppresses operational abnormalities by maintaining consistent data storage times and preventing irregularities in the in-vehicle communication system, ensuring normal system operation.
Smart Images

Figure 0007806904000001 
Figure 0007806904000002 
Figure 0007806904000003
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to an in-vehicle device, a time synchronization method, and a time synchronization program. This application claims priority based on Japanese Patent Application No. 2022-115540, filed on July 20, 2022, the disclosure of which is incorporated herein in its entirety. [Background technology]
[0002] Japanese Patent Application Laid-Open Publication No. 2020-167616 (Patent Document 1) discloses a time synchronization system as follows. Specifically, the time synchronization system synchronizes the time of a slave side with a grandmaster clock, and includes a device functioning as a grandmaster, one or more devices functioning as adjacent repeaters, and one or more devices functioning as terminals, all connected via a network. The grandmaster transmits a signal including a clock onto the network, and the terminal corrects its time based on the clock, integrating the time correction amount into a correction integrated value α held by the terminal. If α exceeds a predetermined threshold, the adjacent repeater transmits a grandmaster abnormality notification message onto the network. The adjacent repeater corrects its own time based on the clock, integrating the time correction amount into its own α, and if α exceeds a predetermined threshold and the adjacent repeater receives a grandmaster abnormality notification message from one or more subordinate devices, the adjacent repeater transmits a message onto the network indicating that a grandmaster should be re-determined. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 2020-167616 [Patent Document 2] Japanese Patent Application Publication No. 2020-129778 [Patent Document 3] Japanese Patent Publication No. 2020-126317 [Patent Document 4] Japanese Patent Application Publication No. 2018-112425 [Patent Document 5] Japanese Patent Application Laid-Open No. 2016-5214 [Patent Document 6] Japanese Patent Application Publication No. 2018-196038 Summary of the Invention
[0004] The vehicle-mounted device of the present disclosure includes a transmission processing unit that performs a transmission process at a predetermined transmission period to transmit first time synchronization information and second time synchronization information including the transmission time of the first time synchronization information to another vehicle-mounted device, and a correction unit that performs a correction process to correct the transmission time to be included in the second time synchronization information in the current transmission process to a corrected transmission time, which is the time obtained by adding the transmission period and a value obtained by dividing the time difference, to the previous transmission time, based on the time difference between the current time in the vehicle-mounted device itself and the previous transmission time, which is the transmission time in the previous transmission process.
[0005] One aspect of the present disclosure can be realized not only as an in-vehicle device equipped with such a characteristic processing unit, but also as a semiconductor integrated circuit that realizes part or all of the in-vehicle device, or as a system that includes the in-vehicle device. [Brief explanation of the drawings]
[0006] [Figure 1] FIG. 1 is a diagram showing a configuration of an in-vehicle communication system according to an embodiment of the present disclosure. [Figure 2] FIG. 2 is a diagram illustrating a configuration of a switch device according to an embodiment of the present disclosure. [Figure 3] FIG. 3 is a diagram illustrating a configuration of a master function unit according to an embodiment of the present disclosure. [Figure 4] FIG. 4 is a diagram illustrating a method for updating a propagation delay time by a switch device according to an embodiment of the present disclosure. [Figure 5] FIG. 5 is a diagram illustrating a configuration of an end function unit according to an embodiment of the present disclosure. [Figure 6] FIG. 6 is a diagram illustrating a method for updating a propagation delay time by an end function unit according to an embodiment of the present disclosure. [Figure 7] FIG. 7 is a diagram for explaining a difference in the data storage time in the switch device and the end function unit when the reference time fluctuates in the in-vehicle communication system according to the comparative example. [Figure 8] FIG. 8 is a diagram illustrating an example of a method for correcting the transmission time of a Sync message by the master function unit according to the embodiment of the present disclosure. [Figure 9] FIG. 9 is a diagram illustrating another example of a method for correcting the transmission time of a Sync message by the master function unit according to the embodiment of the present disclosure. [Figure 10] FIG. 10 is a diagram illustrating another example of a method for correcting the transmission time of a Sync message by the master function unit according to the embodiment of the present disclosure. [Figure 11] FIG. 11 is a flowchart defining an operation procedure when the master function unit according to the embodiment of the present disclosure executes a correction process for the transmission time of a Sync message. [Figure 12] FIG. 12 is a diagram illustrating an example of a sequence of time synchronization processing between on-board devices in the on-board communication system according to the embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0007] 2. Description of the Related Art Conventionally, a technique has been developed in which the current time of an in-vehicle device in an in-vehicle communication system is used as a reference time, and other in-vehicle devices in the in-vehicle communication system use the reference time to perform time synchronization.
[0008] [Problem to be solved by this disclosure] The technique described in Patent Document 1 has a problem in that if the reference time transmitted by the grand master fluctuates, other in-vehicle devices that use the reference time for time synchronization will not operate normally.
[0009] The present disclosure has been made to solve the above-mentioned problems, and its purpose is to provide an in-vehicle device, a time synchronization method, and a time synchronization program that can suppress the occurrence of operational abnormalities in an in-vehicle communication system.
[0010] [Effects of this disclosure] According to the present disclosure, it is possible to suppress the occurrence of operational abnormalities in an in-vehicle communication system.
[0011] [Description of the embodiments of the present disclosure] First, the contents of the embodiments of the present disclosure will be listed and described.
[0012] (1) An in-vehicle device according to an embodiment of the present disclosure includes a transmission processing unit that performs a transmission process to transmit first time synchronization information and second time synchronization information including the transmission time of the first time synchronization information to another in-vehicle device at a predetermined transmission period, and a correction unit that performs a correction process to correct the transmission time to be included in the second time synchronization information in the current transmission process to a corrected transmission time, which is the time obtained by adding the transmission period and a value obtained by dividing the time difference to the previous transmission time, based on the time difference between the current time in the in-vehicle device itself and the previous transmission time, which is the transmission time in the previous transmission process.
[0013] In this way, by taking into account the time difference between the current time and the previous transmission time in the device itself, the transmission time included in the second time synchronization information in the current transmission process is corrected. Therefore, even if the current time in the device itself fluctuates, the other device can perform time synchronization using the corrected transmission time, thereby suppressing time discrepancies in the other device, and thus suppressing the occurrence of operational abnormalities in the in-vehicle communication system.
[0014] (2) In the above (1), the correction unit may perform the correction process when the absolute value of the time difference is equal to or greater than a predetermined threshold value.
[0015] With this configuration, it is possible to determine whether or not to perform correction processing for the transmission time included in the second time synchronization information, regardless of whether the time difference is positive or negative.
[0016] (3) In the above (2), the in-vehicle device may further include an acquisition unit that acquires a data storage period, which is the data storage period of the other device, and the threshold value may be determined based on the data storage period acquired by the acquisition unit and the transmission period.
[0017] With this configuration, it is possible to determine whether the time difference between the current time on the device and the time of the previous transmission will cause an abnormality in the data storage process on the other device, and the other device can store data according to a predetermined data storage period.
[0018] (4) In the above (3), the in-vehicle device may further include a transmission period setting unit that changes the transmission period to an adjustment period that is shorter than the data storage period when the data storage period is shorter than the transmission period, and the transmission processing unit may perform the transmission processing at the adjustment period until the corrected transmission time reaches the current time.
[0019] In this way, by configuring the device to adjust the transmission period when the data storage period in the other device is shorter than the transmission period, even if a fluctuation occurs in the current time in the device itself, the other device can perform time synchronization using the corrected transmission time, thereby suppressing time discrepancies in the other device.
[0020] (5) A time synchronization method according to an embodiment of the present disclosure is a time synchronization method for an in-vehicle device, and includes the steps of: performing a transmission process at a predetermined transmission period to transmit first time synchronization information and second time synchronization information including the transmission time of the first time synchronization information to another in-vehicle device; and performing a correction process to correct the transmission time to be included in the second time synchronization information in this transmission process to a corrected transmission time, which is the time obtained by adding the transmission period and a value obtained by dividing the time difference to the previous transmission time, based on the time difference between the current time in the in-vehicle device itself and the previous transmission time, which is the transmission time in the previous transmission process.
[0021] In this way, by taking into account the time difference between the current time and the previous transmission time in the device itself, the transmission time included in the second time synchronization information in the current transmission process is corrected. Therefore, even if the current time in the device itself fluctuates, the other device can perform time synchronization using the corrected transmission time, thereby suppressing time discrepancies in the other device, and thus suppressing the occurrence of operational abnormalities in the in-vehicle communication system.
[0022] (6) A time synchronization program according to an embodiment of the present disclosure is a time synchronization program used in an in-vehicle device, and is a program for causing a computer to function as: a transmission processing unit that performs a transmission process at a predetermined transmission period to transmit first time synchronization information and second time synchronization information including the transmission time of the first time synchronization information to another in-vehicle device; and a correction unit that performs a correction process to correct the transmission time to be included in the second time synchronization information in the current transmission process to a corrected transmission time, which is the time obtained by adding the transmission period and a value obtained by dividing the time difference to the previous transmission time, based on the time difference between the current time in the in-vehicle device itself and the previous transmission time, which is the transmission time in the previous transmission process.
[0023] In this way, by taking into account the time difference between the current time and the previous transmission time in the device itself, the transmission time included in the second time synchronization information in the current transmission process is corrected. Therefore, even if the current time in the device itself fluctuates, the other device can perform time synchronization using the corrected transmission time, thereby suppressing time discrepancies in the other device, and thus suppressing the occurrence of operational abnormalities in the in-vehicle communication system.
[0024] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. In the drawings, identical or corresponding parts are designated by the same reference numerals, and their description will not be repeated. Furthermore, at least some of the embodiments described below may be combined in any manner.
[0025] [In-vehicle communication system] FIG. 1 is a diagram showing a configuration of an in-vehicle communication system according to an embodiment of the present disclosure.
[0026] Referring to FIG. 1, the in-vehicle communication system 301 includes a switch device 111, a master function unit 121, and an end function unit 131.
[0027] The in-vehicle communication system 301 is mounted on a vehicle 1. The switch device 111, the master function unit 121, and the end function unit 131 are examples of in-vehicle devices, such as an ECU (Electronic Control Unit). The switch device 111, the master function unit 121, and the end function unit 131 configure an in-vehicle network 101.
[0028] The switch device 111 is connected to a plurality of in-vehicle devices by, for example, an Ethernet (registered trademark) cable 10, and can communicate with the plurality of in-vehicle devices connected to it.
[0029] More specifically, the switch device 111 performs a relay process to relay information from one in-vehicle device to another in-vehicle device. For example, the switch device 111 receives time synchronization information (hereinafter also referred to as "time synchronization information T") transmitted from the master function unit 121, and transmits the received time synchronization information T to the end function unit 131.
[0030] Between the switch device 111 and the master function unit 121, and between the switch device 111 and the end function unit 131, information is exchanged using, for example, Ethernet frames (hereinafter simply referred to as "frames") that store IP (Internet Protocol) packets.
[0031] The master function unit 121 and the end function unit 131 may be an exterior communication ECU, a sensor, an in-vehicle camera, an autonomous driving processing ECU, an engine control device, an AT (Automatic Transmission) control device, an HEV (Hybrid Electric Vehicle) control device, a brake control device, a chassis control device, a steering control device, and an instrument display control device, etc.
[0032] The master function unit 121 acquires a reference time t0 in the in-vehicle network 101. Here, the reference time t0 is a time generated by the master function unit 121 using, for example, a VCXO (Voltage Controlled Xtal Oscillator) and a counter (not shown). The master function unit 121 functions as a GM (Grand Master).
[0033] The master function unit 121 generates a reference time t0 synchronized with the time of a time notification device, such as a navigation device, based on the time notified from the time notification device.
[0034] More specifically, the time notification device transmits time information indicating its own time to the master function unit 121. Upon receiving the time information from the time notification device, the master function unit 121 updates the value of the counter based on the time information. The master function unit 121 sets the time based on the updated counter value as the current time in the master function unit 121, i.e., the reference time t0.
[0035] The master function unit 121, for example, periodically transmits time synchronization information T to other devices that are other in-vehicle devices. Here, the time synchronization information T is, for example, a Sync message and a follow-up message, which will be described later.
[0036] The switch device 111 performs time synchronization with the master function unit 121 based on the time synchronization information T. More specifically, the switch device 111 calculates the time difference with the master function unit 121 using the time synchronization information T transmitted by the master function unit 121. The switch device 111 corrects its own time using the calculated time difference.
[0037] The end function unit 131 performs time synchronization with the switch device 111 based on the time synchronization information T. More specifically, the end function unit 131 calculates the time difference with the switch device 111 using the time synchronization information T transmitted by the switch device 111. The end function unit 131 corrects its own time using the calculated time difference.
[0038] [Switch device] FIG. 2 is a diagram illustrating a configuration of a switch device according to an embodiment of the present disclosure.
[0039] Referring to FIG. 2, the switch device 111 includes a relay unit 11, a time synchronization unit 12, a storage unit 13, and a plurality of communication ports 14.
[0040] One or both of the relay unit 11 and the time synchronization unit 12 are realized by, for example, a processing circuit including one or more processors. The storage unit 13 is, for example, a non-volatile memory included in the processing circuit. The relay unit 11 includes a switch unit 21 and an information processing unit 22.
[0041] (Relay processing by switch device) The communication port 14 is a terminal to which, for example, an Ethernet cable 10 can be connected. The communication port 14 may also be a terminal of an integrated circuit. Each of the multiple communication ports 14 is connected to one of multiple on-board devices in the on-board network 101 via the Ethernet cable 10. In this example, the communication port 14A is connected to the master function unit 121, and the communication port 14B is connected to the end function unit 131.
[0042] The storage unit 13 stores an address table showing the correspondence between the port number of the communication port 14 and the MAC (Media Access Control) address of the other in-vehicle device connected to the communication port 14 .
[0043] The relay unit 11 relays data between other in-vehicle devices by communicating with the other in-vehicle devices. That is, when the relay unit 11 receives an Ethernet frame transmitted from the master function unit 121 or the end function unit 131 via the corresponding communication port 14, it performs relay processing on the received Ethernet frame.
[0044] More specifically, switch unit 21 in relay unit 11 refers to the address table stored in storage unit 13 and identifies the port number corresponding to the destination MAC address included in the received Ethernet frame. Switch unit 21 then transmits the received Ethernet frame from communication port 14 of the identified port number.
[0045] [Master Function Section] FIG. 3 is a diagram illustrating a configuration of a master function unit according to an embodiment of the present disclosure.
[0046] Referring to FIG. 3, the master function unit 121 includes a communication unit 31, a time synchronization unit 32, a storage unit 33, and a communication port .
[0047] One or both of the communication unit 31 and the time synchronization unit 32 are realized, for example, by a processing circuit including one or more processors. The storage unit 33 is, for example, a non-volatile memory included in the processing circuit. The communication port 34 is, for example, a terminal to which the Ethernet cable 10 can be connected. Note that the communication port 34 may be a terminal of an integrated circuit or the like. The communication port 34 is connected to the switch device 111 via the Ethernet cable 10. The time synchronization unit 32 includes a transmission processing unit 41, a transmission time setting unit 42, and a transmission period setting unit 43.
[0048] FIG. 4 is a diagram illustrating a method for updating a propagation delay time by a switch device according to an embodiment of the present disclosure.
[0049] 2, 3, and 4, the switch device 111 updates the propagation delay time Td1 of data between the master function unit 121 and the switch device 111 by transmitting and receiving time synchronization information T to and from the master function unit 121 in accordance with the IEEE (registered trademark) 802.1 standard, for example. More specifically, the time synchronizer 12 transmits a request message (Pdelay_Req) for requesting time information used to update the propagation delay time Td1 to the master function unit 121 via the relay unit 11 and the communication port 14A.
[0050] The communication unit 31 in the master function unit 121 receives the request message transmitted from the switch device 111 via the communication port 34 and outputs the received request message to the time synchronization unit 32 .
[0051] The transmission processing unit 41 in the time synchronization unit 32 receives a request message from the communication unit 31 and outputs a response message (Pdelay_Resp), which is an example of time synchronization information T, in response to the request message to the communication unit 31. The communication unit 31 transmits the response message received from the time synchronization unit 32 to the switch device 111 via the communication port 34. At this time, the time synchronization unit 32 transmits the response message including the reception time t12 of the request message.
[0052] After transmitting the response message, the transmission processing unit 41 outputs a follow-up message (Pdelay_Resp_Follow_Up) including the transmission time t13 of the response message to the communication unit 31. The communication unit 31 transmits the follow-up message received from the transmission processing unit 41 to the switch device 111 via the communication port 34.
[0053] The information processing unit 22 in the switch device 111 receives the response message and the follow-up message transmitted from the master function unit 121 via the communication port 14A. Then, the information processing unit 22 notifies the time synchronizer 12 of the time t12 included in the response message and the time t13 included in the follow-up message.
[0054] The information processing unit 22 also notifies the time synchronizer 12 of the transmission time t11 of the request message and the reception time t14 of the response message. More specifically, the switch device 111 includes a counter (not shown). The information processing unit 22 notifies the time synchronizer 12 of the count value of the counter at the transmission timing of the request message as the transmission time t11. The information processing unit 22 also notifies the time synchronizer 12 of the count value of the counter at the reception timing of the response message as the reception time t14.
[0055] The time synchronizer 12 calculates a propagation delay time Td1 of data between the master function unit 121 and the switch device 111 based on the times t11, t12, t13, and t14 notified from the information processor 22. Specifically, the time synchronizer 12 calculates the propagation delay time Td1=((t14-t11)-(t13-t12)) / 2. Then, the time synchronizer 12 updates the propagation delay time Td1 stored in the storage unit 13 to the newly calculated propagation delay time Td1.
[0056] (Time correction in switch devices) The transmission processing unit 41 in the master function unit 121 performs a transmission process S to transmit a Sync message, which is an example of first time synchronization information, and a follow-up message, which is an example of second time synchronization information, to other devices at a predetermined transmission period P. Note that the terms "first" and "second" do not imply a priority order.
[0057] More specifically, the transmission processing unit 41 transmits the frame in which the Sync message is stored to the switch device 111 via the communication unit 31 and the communication port 34. The communication unit 31 stores the transmission time tm of the Sync message in the storage unit 33 as a timestamp.
[0058] After transmitting the frame containing the Sync message, the transmission processing unit 41 transmits a frame containing a follow-up message to the switch device 111 via the communication unit 31 and the communication port 34. The follow-up message includes the transmission time tm of the Sync message. Here, it is assumed that the transmission processing unit 41 performs the transmission process S at a transmission period P of 125 milliseconds. The transmission period P is stored in the memory unit 33.
[0059] The time synchronization unit 12 in the switch device 111 receives a frame containing a Sync message and a frame containing a follow-up message transmitted from the master function unit 121 via the communication port 14A and the relay unit 11. Then, the time synchronization unit 12 stores the Sync message contained in the received frame in the storage unit 13, for example.
[0060] Furthermore, the information processing unit 22 in the switch device 111 checks the source of the received frame, for example, by referring to the domain ID included in the message header of the frame.
[0061] In addition, when the information processing unit 22 confirms that it has received a frame containing a Sync message from the master function unit 121, it notifies the time synchronization unit 12 of the count value of the counter at the time of receiving the frame as the reception time tx of the Sync message.
[0062] The time synchronizer 12 performs time synchronization with the master function unit 121 based on the transmission time tm and reception time tx notified from the information processor 22 and the propagation delay time Td1 stored in the memory unit 13. More specifically, the time synchronizer 12 calculates the time difference Tx1=tm-Td1-tx between the time of the master function unit 121 and the time of the switch device 111 based on the transmission time tm, reception time tx, and propagation delay time Td1.
[0063] Then, the time synchronizer 12 uses the calculated time difference Tx1 to correct the time in its own switch device 111. More specifically, the time synchronizer 12 acquires the time obtained by adding the time difference Tx1 to the transmission time tm as the current time in the switch device 111. This establishes time synchronization between the master function unit 121, which is the GM, and the switch device 111.
[0064] [End function part] (Configuration of end function part) FIG. 5 is a diagram illustrating a configuration of an end function unit according to an embodiment of the present disclosure.
[0065] 5, the end function unit 131 includes a communication unit 51, a time synchronization unit 52, a storage unit 53, and a communication port 54. One or both of the communication unit 51 and the time synchronization unit 52 are realized, for example, by a processing circuit including one or more processors. The storage unit 53 is, for example, a non-volatile memory included in the processing circuit. The communication port 54 is, for example, a terminal to which an Ethernet cable 10 can be connected. Note that the communication port 54 may be, for example, a terminal of an integrated circuit. The communication port 54 is connected to the switch device 111 via the Ethernet cable 10.
[0066] (Update of data propagation delay time between switch device and end function unit) The end function unit 131 updates the propagation delay time Td2 of the data between the switch device 111 and the end function unit 131.
[0067] FIG. 6 is a diagram illustrating a method for updating a propagation delay time by an end function unit according to an embodiment of the present disclosure.
[0068] 5 and 6, the time synchronization unit 52 in the end function unit 131, like the time synchronization unit 12 in the switch device 111 shown in Fig. 2, periodically or irregularly updates the propagation delay time Td2 of data between the switch device 111 and the end function unit 131. More specifically, the time synchronization unit 52 transmits a request message to the switch device 111 via the communication unit 51 and the communication port 54, requesting time information used to update the propagation delay time Td2.
[0069] When the information processing unit 22 in the switch device 111 receives the request message transmitted from the end function unit 131 via the communication port 14B, it outputs the request message to the time synchronization unit 12.
[0070] When the time synchronization unit 12 receives a request message from the information processing unit 22, it transmits a response message to the request message to the end function unit 131 via the relay unit 11 and the communication port 14B. At this time, the time synchronization unit 12 transmits the response message including the reception time t22 of the request message.
[0071] After transmitting the response message, the time synchronizer 12 transmits a follow-up message including the transmission time t23 of the response message to the end function unit 131 via the relay unit 11 and the communication port 14B.
[0072] The communication unit 51 in the end function unit 131 receives the response message and the follow-up message transmitted from the switch device 111 via the communication port 54. Then, the communication unit 51 notifies the time synchronization unit 52 of the time t22 included in the response message and the time t23 included in the follow-up message.
[0073] The communication unit 51 also notifies the time synchronization unit 52 of the transmission time t21 of the request message and the reception time t24 of the response message. More specifically, the end function unit 131 includes a counter (not shown). The communication unit 51 notifies the time synchronization unit 52 of the count value of the counter at the transmission timing of the request message as the transmission time t21. The communication unit 51 also notifies the time synchronization unit 52 of the count value of the counter at the reception timing of the response message as the reception time t24.
[0074] The time synchronizer 52 calculates a propagation delay time Td2 of data between the switch device 111 and the end function unit 131 based on the times t21, t22, t23, and t24 notified from the communication unit 51. Specifically, the time synchronizer 52 calculates the propagation delay time Td2=((t24-t21)-(t23-t22)) / 2. Then, the time synchronizer 52 updates the propagation delay time Td2 stored in the storage unit 53 to the newly calculated propagation delay time Td2.
[0075] (Time correction in the end function unit) The time synchronization unit 12 in the switch device 111 periodically or irregularly transmits a Sync message to the end function unit 131. After transmitting the Sync message, the time synchronization unit 12 transmits a follow-up message including the transmission time ty of the Sync message to the end function unit 131.
[0076] The end function unit 131 performs time synchronization based on the Sync message and follow-up message transmitted from the switch device 111. More specifically, the communication unit 51 in the end function unit 131 receives a frame storing the Sync message transmitted from the switch device 111 and a frame storing the follow-up message via the communication port 54. Then, the communication unit 51 checks the sender of the frame by, for example, referencing the domain ID included in the message header portion of the frame storing the received Sync message.
[0077] When the communication unit 51 confirms that it has received a frame containing a Sync message from the master function unit 121, it notifies the time synchronization unit 52 of, for example, the transmission time ty contained in a follow-up message received immediately after the frame. In addition, the communication unit 51 notifies the time synchronization unit 52 of the count value of a counter at the time of reception of the Sync message contained in the frame as the reception time te of the Sync message.
[0078] The time synchronization unit 52 performs time synchronization with the switch device 111 based on the transmission time ty and reception time te notified from the communication unit 51, and the propagation delay time Td2 stored in the storage unit 53. More specifically, the time synchronization unit 52 calculates a time difference Tx2=ty-Td2-te, which is the difference between the time of the switch device 111 and the time of the end function unit 131. The time synchronization unit 52 then corrects the time in its own end function unit 131 using the calculated time difference Tx2. The time synchronization unit 52 acquires the time obtained by adding the time difference Tx2 to the transmission time ty as the current time in the end function unit 131.
[0079] Here, when time synchronization is established between the master function unit 121 and the switch device 111, the transmission time ty included in the follow-up message sent from the switch device 111 to the end function unit 131 is a time synchronized with the master function unit 121. Therefore, the time synchronization unit 52 in the end function unit 131 performs time correction, thereby establishing time synchronization between the end function unit 131 and the switch device 111, and as a result, time synchronization between the end function unit 131 and the master function unit 121 is established.
[0080] [Problem description] Incidentally, in the in-vehicle communication system 301, when time synchronization is normally performed between the in-vehicle devices, the reference time t0 updated by the master function unit 121, which is the GM, may fluctuate for some reason.
[0081] For example, if an abnormality occurs in the process in which the master function unit 121 updates the counter value based on the time information received from the time notification device, the reference time t0 may fluctuate, i.e., shift. The in-vehicle communication system 301 may include multiple master function units 121. Specifically, the in-vehicle communication system 301 may include another master function unit 121 that synchronizes time with a certain master function unit 121 to function as a backup system in case the certain master function unit 121 fails. In this case, if an abnormality occurs in the time synchronization between the multiple master function units 121, the reference time t0 may fluctuate.
[0082] If the reference time t0 fluctuates, there is a possibility that normal operation will not be performed in the switch device 111 and the end function unit 131. For example, if the reference time t0 fluctuates, there is a possibility that the consistency of the data storage times in the switch device 111 and the end function unit 131 will be lost.
[0083] FIG. 7 is a diagram for explaining a difference in the data storage time in the switch device and the end function unit when the reference time fluctuates in the in-vehicle communication system according to the comparative example.
[0084] 7 and Figures 8 to 10 described later, "t1" is the time in the switch device 111, and "t3" is the time in the end function unit 131. Also, in Figure 7 and Figures 8 to 10 described later, "Sync" represents a Sync message, "Follow_UP" represents a follow-up message, and "Sync&Follow_UP" represents that a follow-up message is sent after sending a Sync message. Also, in the following description and in Figure 7 and Figures 8 to 10 described later, "seconds" may be represented as "s" and "milliseconds" may be represented as "ms."
[0085] 7, the period in which the switch device 111 and the end function unit 131 save data (hereinafter also referred to as "data saving period C") is 1 second. The data saving period C is, for example, the saving period for log data.
[0086] 7, the switch device 111 and the end function unit 131 save data every second during the period from 5,000 seconds to 10,000 seconds. Here, it is assumed that after the switch device 111 and the end function unit 131 save data at "t1=10,000 s" and "t3=10,000 s", respectively, the reference time t0 of the master function unit 121 fluctuates by +5 seconds or -5 seconds.
[0087] The reference time t0 when the master function unit 121 performs the transmission process S immediately after the reference time t0 has shifted by +5 seconds is "15:125 s." Also, the reference time t0 when the master function unit 121 performs the transmission process S immediately after the reference time t0 has shifted by -5 seconds is "5:125 s." Therefore, in the example shown in Fig. 7, the transmission time tm included in the follow-up message in the transmission process S immediately after the shift of the reference time t0 is "15:125 s" or "5:125 s."
[0088] When the switch device 111 performs time synchronization based on a follow-up message sent from the master function unit 121, which includes a sending time tm of "15:125 s" or "5:125 s", the time t1 in the switch device 111 itself becomes "15:125 s" or "5:125 s". Because the switch device 111 sends the follow-up message to the end function unit 131, the time t3 in the end function unit 131 also becomes "15:125 s" or "5:125 s". In this case, the next data save time in the switch device 111 and the end function unit 131 will be "16:000 s" or "6:000 s".
[0089] If the reference time t0 fluctuates by +5 seconds, causing the data save time to become "16:000 s," no data will be saved during the period when times t1 and t3 are from 11:000 to 15:000. That is, in each of the switch device 111 and the end function unit 131, the interval from the previous data save time "10:000 s" to the current data save time "16:000 s" becomes 6 seconds, and the data save cycle C deviates from 1 second. This causes the data save times to become irregular.
[0090] Furthermore, if the reference time t0 fluctuates by -5 seconds and the data storage time becomes "6.000s", the data storage times from 6.0000 seconds to 10.000 seconds will overlap in each of the switch device 111 and the end function unit 131, and multiple pieces of data with the same time will be stored, for example.
[0091] In this way, if the consistency of the data storage times in the switch device 111 and the end function unit 131 is lost due to a fluctuation in the reference time t0, there is a possibility that the in-vehicle communication system 301 will not operate normally.
[0092] In contrast, the master function unit 121 according to the embodiment of the present disclosure solves this problem with the following configuration and operation.
[0093] [Send time correction] 3 , the communication unit 31 in the master function unit 121 is an example of an acquisition unit, and acquires the data storage period C of the other devices, the switch device 111 and the end function unit 131. More specifically, the communication unit 31 acquires the data storage period C stored in advance in the storage unit 33, and outputs period information indicating the data storage period C to the time synchronization unit 32.
[0094] The transmission time setting unit 42 in the time synchronization unit 32 is an example of a correction unit, and monitors the time difference Ta=t0-tm1 between a reference time t0 indicating the current time on the device itself and a previous transmission time tm1 which is the transmission time tm included in the follow-up message in the previous transmission process S. The transmission time setting unit 42 in the time synchronization unit 32 performs a correction process to correct the transmission time tm to be included in the follow-up message in the transmission process S based on the time difference Ta.
[0095] More specifically, before the transmission process S is performed, the transmission time setting unit 42 refers to the previous transmission time tm1 in the storage unit 33 and calculates the time difference Ta using the previous transmission time tm1 and the reference time t0. If the absolute value of the time difference Ta is equal to or greater than a predetermined threshold value Th, the transmission time setting unit 42 performs the above-mentioned correction process. The transmission time setting unit 42 includes the corrected transmission time tm in the follow-up message transmitted by the transmission processing unit 41.
[0096] The threshold value Th is determined based on the data storage period C and the transmission period P acquired by the communication unit 31. For example, the transmission time setting unit 42 uses different threshold values Th when the time difference Ta is positive and when the time difference Ta is negative.
[0097] More specifically, the transmission time setting unit 42 performs the above correction process when the time difference Ta is equal to or greater than the data storage period C, for example, 1 second or greater. Also, the transmission time setting unit 42 performs the above correction process when the time difference Ta is equal to or less than (-1 x transmission period P), for example, -125 milliseconds or less.
[0098] FIG. 8 is a diagram illustrating an example of a method for correcting the transmission time of a Sync message by the master function unit according to the embodiment of the present disclosure.
[0099] In the example shown in Fig. 8, similar to Fig. 7, the data storage period C is 1 second and the transmission period P is 125 milliseconds. Fig. 8 shows a case where the reference time t0 fluctuates by +5 seconds immediately after the switch device 111 and the end function unit 131 store data at "time t1=10,000 s" and "time t3=10,000 s", respectively. That is, in Fig. 8, the time difference Ta is +5 seconds. Also in Fig. 8, the next data storage time is "11,000 s".
[0100] 2 and 8, when the time difference Ta is equal to or greater than the data storage period C, the transmission time setting unit 42 acquires a divided time difference Ts, which is a value obtained by dividing the time difference Ta. In the example shown in Fig. 8, the time difference Ta is +5 seconds and the data storage period C is 1 second, so the time difference Ta is equal to or greater than the data storage period C.
[0101] Here, the storage unit 33 has stored in advance, for example, a table D indicating the correspondence between the data storage period C and the division time difference Ts. The transmission time setting unit 42 references table D and acquires the division time difference Ts corresponding to the data storage period C included in the period information received from the communication unit 31. The division time difference Ts is set to a value less than the transmission period P. Here, the division time difference Ts is set to 100 milliseconds. Note that the transmission time setting unit 42 is not limited to a configuration in which it acquires the division time difference Ts by referencing table D stored in the storage unit 33, and may calculate the division time difference Ts using the data storage period C and the transmission period P according to a predetermined arithmetic expression.
[0102] The transmission time setting unit 42 corrects the transmission time tm to be included in the follow-up message in the current transmission process S to a corrected transmission time tm2, which is the time obtained by adding the transmission period P and the division time difference Ts to the previous transmission time tm1. That is, the corrected transmission time tm2 is expressed by the following equation (1). tm2=tm1+P+Ts (1)
[0103] In the transmission process S performed immediately after the reference time t0 has fluctuated by +5 seconds, i.e., when the reference time t0 is "15.125 s," the corrected transmission time tm2 is "10.225 s," which is the time obtained by adding the transmission period P of "125 ms" and the division time difference Ts of "100 ms" to the previous transmission time tm1 of "10.000 s." The transmission time setting unit 42 sets the corrected transmission time tm2 as the transmission time tm to be included in the follow-up message in the transmission process S.
[0104] The switch device 111 performs time synchronization based on the follow-up message including the corrected transmission time tm2 received from the master function unit 121. As a result, the time t1 of the switch device 111 becomes "10.225 s". Furthermore, the end function unit 131 performs time synchronization based on the follow-up message received from the switch device 111. As a result, the time t3 of the end function unit 131 becomes "10.225 s".
[0105] The transmission time setting unit 42 performs the above correction process until the transmission time tm of the Sync message reaches the reference time t0. Here, the transmission time setting unit 42 corrects the transmission time tm to "10:225 s," and then to "10:450 s," "10:675 s," "10:900 s," and "11:125 s," in that order. As a result, the times t1 and t3 of the switch device 111 and the end function unit 131, respectively, change to "10:225 s," then to "10:450 s," "10:675 s," "10:900 s," and "11:125 s," in that order. Therefore, the switch device 111 and the end function unit 131 can save data at "11:000 s," which is between "10:900 s" and "11:125 s," as the timing following the previous data save time of "10:000 s."
[0106] When the transmission time tm of the Sync message reaches the reference time t0, the transmission time setting unit 42 sets the transmission time tm to be included in the follow-up message to the reference time t0. In the example shown in Fig. 8, as a result of the 50th correction process, the transmission time tm to be included in the follow-up message in the current transmission process S becomes "21.250 seconds", which reaches the reference time t0.
[0107] 8 illustrates an example in which the time difference Ta is +5 seconds and the data storage period C is 1 second, and the divided time difference Ts is the value obtained by dividing the time difference Ta by 50, i.e., 100 milliseconds. Note that, if the time difference Ta is +5 seconds and the data storage period C is 2 seconds, the divided time difference Ts may be, for example, the value obtained by dividing the time difference Ta by 25, i.e., 200 ms. In this way, the divided time difference Ts is not limited to 100 milliseconds, and may be a different value depending on the data storage period C.
[0108] FIG. 9 is a diagram illustrating another example of a method for correcting the transmission time of a Sync message by the master function unit according to the embodiment of the present disclosure.
[0109] 9, the data storage period C is 1 second and the transmission period P is 125 milliseconds, similar to FIGS. 7 and 8. FIG. 9 shows a case where the reference time t0 fluctuates by −5 seconds immediately after the switch device 111 and the end function unit 131 store data at “time t1=10,000 s” and “time t3=10,000 s,” respectively. That is, in the example shown in FIG. 9, the time difference Ta is −125 milliseconds or less, so the transmission time setting unit 42 performs a correction process to correct the transmission time tm to be included in the follow-up message in the transmission process S.
[0110] More specifically, the transmission time setting unit 42 refers to table D in the storage unit 33 and acquires the division time difference Ts corresponding to the data storage period C. In the example shown in Fig. 9, the division time difference Ts is, for example, -100 milliseconds.
[0111] Then, the sending time setting unit 42 corrects the sending time tm to be included in the follow-up message in the current sending process S to the corrected sending time tm2.
[0112] In the transmission process S performed immediately after the reference time t0 has fluctuated by -5 seconds, i.e., when the reference time t0 is "5.125 seconds," the corrected transmission time tm2 is "10.025 seconds," which is the time obtained by adding the transmission period P of "125 ms" and the division time difference Ts of "-100 ms" to the previous transmission time tm1 of "10.000 seconds." The transmission time setting unit 42 sets the corrected transmission time tm2 as the transmission time tm to be included in the follow-up message in the transmission process S.
[0113] The switch device 111 performs time synchronization based on the follow-up message including the corrected transmission time tm2 received from the master function unit 121. As a result, the time t1 in the switch device 111 becomes "10.025 s". Furthermore, the end function unit 131 performs time synchronization based on the follow-up message received from the switch device 111. As a result, the time t3 in the end function unit 131 becomes "10.025 s".
[0114] Next, the transmission time setting unit 42 corrects the transmission time tm to "10:050 s", and the time t1 of the switch device 111 and the time t3 of the end function unit 131 become "10:050 s". In this way, through the correction process of the transmission time setting unit 42, the time t1 of the switch device 111 and the time t3 of the end function unit 131 become times later than "10:000 s", which is the save time of the immediately preceding data. Therefore, even if the reference time t0 fluctuates by -5 seconds, the data save times of the switch device 111 and the end function unit 131 do not overlap, and the switch device 111 and the end function unit 131 can save data at "11:000 s", which is the next data save time.
[0115] FIG. 10 is a diagram illustrating another example of a method for correcting the transmission time of a Sync message by the master function unit according to the embodiment of the present disclosure.
[0116] 9, FIG. 10 shows a case where the reference time t0 fluctuates by −5 seconds immediately after the switch device 111 and the end function unit 131 save data at “time t1=10.000 s” and “time t3=10.000 s”, respectively.
[0117] 10, the data storage period C is 100 milliseconds, and the transmission period P before the reference time t0 fluctuates is 125 milliseconds. That is, in the example shown in Fig. 10, the data storage period C is shorter than the transmission period P. In this case, in the correction process of the transmission time setting unit 42, the corrected transmission time obtained by adding the transmission period P and the division time difference Ts to the previous transmission time tm1 may exceed the next data storage time.
[0118] 2 and 10, the transmission cycle setting unit 43 compares the data storage cycle C with the transmission cycle P, and if the data storage cycle C is shorter than the transmission cycle, changes the transmission cycle P to a cycle shorter than the data storage cycle C. In the example shown in FIG. 10, the data storage cycle C is shorter than the transmission cycle P, so the transmission cycle setting unit 43 changes the transmission cycle P from "125 ms" to "62.5 ms." Hereinafter, the transmission cycle P changed by the transmission cycle setting unit 43 will also be referred to as the "adjusted cycle P1."
[0119] The transmission cycle setting unit 43 notifies the adjustment cycle P1 to the transmission processing unit 41 and the transmission time setting unit 42. The transmission processing unit 41 performs the transmission process S at the adjustment cycle P1 notified by the transmission cycle setting unit 43 until the corrected transmission time tm2 reaches the reference time t0.
[0120] The transmission time setting unit 42 corrects the transmission time tm using the adjustment period P1 notified by the transmission period setting unit 43.
[0121] More specifically, the transmission time setting unit 42 refers to table D in the storage unit 33 and acquires the division time difference Ts corresponding to the adjustment period P1. Here, the division time difference Ts is −50 milliseconds.
[0122] The transmission time setting unit 42 corrects the transmission time tm to be included in the follow-up message in the transmission process S immediately after the reference time t0 has fluctuated by -5 seconds, i.e., when the reference time t0 is "5.0625 s," to the corrected transmission time tm2. Here, the corrected transmission time tm2 is "10.0125 s," which is the time obtained by adding the adjustment period P1 of "62.5 ms" and the division time difference Ts of "-50 ms" to the previous transmission time tm1 of "10.000 s." The transmission time setting unit 42 sets the corrected transmission time tm2 as the transmission time tm to be included in the follow-up message in the transmission process S.
[0123] The switch device 111 performs time synchronization based on the follow-up message including the corrected transmission time tm2 received from the master function unit 121. As a result, the time t1 in the switch device 111 becomes "10.0125 s". Furthermore, the end function unit 131 performs time synchronization based on the follow-up message received from the switch device 111. As a result, the time t3 in the end function unit 131 becomes "10.0125 s".
[0124] The transmission time setting unit 42 corrects the transmission time tm to "10.0125 s", and then corrects the transmission time tm to "10.0250 s", so that the time t1 of the switch device 111 and the time t3 of the end function unit 131 become "10.0250 s". Thereafter, the transmission time setting unit 42 corrects the transmission time tm to "10.100 s", so that the time t1 of the switch device 111 and the time t3 of the end function unit 131 become "10.100 s", which is the data save time. Therefore, the switch device 111 and the end function unit 131 can save data at "10.100 s", which is the timing following the previous data save time of "10.000 s".
[0125] On the other hand, if the data storage period C is equal to or greater than the transmission period P, the transmission period setting unit 43 does not change the transmission period P. Note that if it is previously determined in the in-vehicle network 101 that the data storage period C is equal to or greater than the transmission period P, the master function unit 121 does not need to be provided with the transmission period setting unit 43.
[0126] [Operation flow] FIG. 11 is a flowchart defining an operation procedure when the master function unit according to the embodiment of the present disclosure executes a correction process for the transmission time of a Sync message.
[0127] First, the master function unit 121 calculates the time difference Ta between the reference time t0 indicating its own current time and the previous transmission time tm1 (step S1).
[0128] Next, the master function unit 121 compares the absolute value of the time difference Ta with the threshold value Th (step S2).
[0129] If the absolute value of the time difference Ta is equal to or greater than the threshold value Th ("YES" in step S2), the master function unit 121 compares the data storage period C with the transmission period P (step S3).
[0130] If the data storage period C is equal to or greater than the transmission period P ("NO" in step S3), the master function unit 121 does not change the transmission period P and acquires the division time difference Ts. For example, as described above, the master function unit 121 refers to table D in the storage unit 33 and acquires the division time difference Ts corresponding to the data storage period C (step S4).
[0131] Next, the master function unit 121 corrects the sending time tm to be included in the follow-up message in the current sending process S to the corrected sending time tm2. The corrected sending time tm2 is the time obtained by adding the sending period P and the division time difference Ts to the previous sending time tm1, as shown in the above-mentioned formula (1) (step S5).
[0132] Next, the master function unit 121 transmits a Sync message to the switch device 111 (step S6).
[0133] Next, the master function unit 121 transmits a follow-up message including the corrected transmission time tm2 to the switch device 111 (step S7).
[0134] Next, the master function unit 121 saves the transmission time tm of the Sync message, that is, the corrected transmission time tm2 (step S8).
[0135] Next, in the next transmission process S, the master function unit 121 compares the transmission time tm of the Sync message saved in the previous transmission process S with the reference time t0 (step S9).
[0136] If the transmission time tm of the Sync message has reached the reference time t0 ("YES" in step S9), the master function unit 121 sets the transmission time tm to be included in the follow-up message to the reference time t0 (step S10) and transmits the Sync message to the switch device 111 (step S6).
[0137] On the other hand, if the sending time tm has not reached the reference time t0 ("NO" in step S9), the master function unit 121 corrects the sending time tm (step S5).
[0138] Furthermore, if the time difference Ta is less than the threshold value Th ("NO" in step S2), the master function unit 121 sets the transmission time tm to be included in the follow-up message to the reference time t0 (step S10), and transmits a Sync message to the switch device 111 (step S6).
[0139] Furthermore, if the data storage period C is shorter than the transmission period P ("YES" in step S3), the master function unit 121 changes the transmission period P to a period shorter than the data storage period C (step S11) and obtains the division time difference Ts (step S4).
[0140] FIG. 12 is a diagram illustrating an example of a sequence of time synchronization processing between on-board devices in the on-board communication system according to the embodiment of the present disclosure.
[0141] Referring to FIG. 12, first, the master function unit 121 transmits a Sync message to the switch device 111 (step S21).
[0142] Next, the master function unit 121 transmits a follow-up message including the transmission time tm of the Sync message to the switching device 111. The master function unit 121 performs a transmission process S to transmit the Sync message and the follow-up message to the switching device 111 at a transmission period P (step S22).
[0143] Next, the switch device 111 performs time synchronization with the master function unit 121 based on the Sync message and follow-up message received from the master function unit 121 (step S23).
[0144] Next, the switch device 111 transmits the Sync message received from the master function unit 121 to the end function unit 131 (step S24).
[0145] Next, the switch device 111 further includes the reception time of the Sync message in the follow-up message received from the master function unit 121, and transmits the message to the end function unit 131 (step S25).
[0146] Next, the end function unit 131 performs time synchronization with the switch device 111 based on the Sync message and follow-up message received from the switch device 111 (step S26).
[0147] Next, the master function unit 121 monitors the time difference Ta between the reference time t0 and the sending time tm included in the follow-up message in the previous sending process S. If the absolute value of the time difference Ta is equal to or greater than the threshold value Th, the master function unit 121 determines that the reference time t0 has changed (step S27).
[0148] Next, the master function unit 121 compares the data storage period C in the switch device 111 and the end function unit 131 with the transmission period P (step S28).
[0149] Next, if the data storage period C is equal to or greater than the transmission period P ("NO" in step S28), the master function unit 121 does not change the transmission period P and acquires the division time difference Ts. For example, as described above, the master function unit 121 refers to table D in the storage unit 33 and acquires the division time difference Ts corresponding to the data storage period C (step S29).
[0150] Next, the master function unit 121 corrects the sending time tm to be included in the follow-up message in the current sending process S to the corrected sending time tm2. The corrected sending time tm2 is the time obtained by adding the sending period P and the division time difference Ts to the previous sending time tm1, as shown in the above-mentioned formula (1) (step S30).
[0151] The master function unit 121 transmits a Sync message to the switch device 111 (step S31).
[0152] Next, the master function unit 121 transmits a follow-up message including the corrected transmission time tm2 to the switch device 111 (step S32).
[0153] Next, the switch device 111 performs time synchronization with the master function unit 121 based on the Sync message received from the master function unit 121 and the follow-up message including the corrected transmission time tm2 (step S33).
[0154] Next, the switch device 111 transmits the Sync message received from the master function unit 121 to the end function unit 131 (step S34).
[0155] Next, the switch device 111 further includes the reception time of the Sync message in the follow-up message received from the master function unit 121, and transmits this to the end function unit 131 (step S35).
[0156] Next, the end function unit 131 performs time synchronization with the switch device 111 based on the Sync message received from the switch device 111 and the follow-up message including the corrected transmission time tm2 (step S36).
[0157] On the other hand, if the data storage period C is shorter than the transmission period P (“YES” in step S28), the master function unit 121 sets the transmission period P to an adjustment period P1 that is shorter than the data storage period C (step S37), and acquires the division time difference Ts (step S29).
[0158] The above-described embodiments should be considered to be illustrative in all respects and not restrictive. The scope of the present invention is defined by the claims, not by the above description, and is intended to include all modifications within the meaning and scope of the claims.
[0159] Each process (each function) in the above-described embodiments is realized by a processing circuit including one or more processors. The processing circuit may be configured as an integrated circuit or the like that combines one or more memories, various analog circuits, and various digital circuits in addition to the one or more processors. The one or more memories store programs (instructions) that cause the one or more processors to execute each of the processes. The one or more processors may execute each of the processes according to the programs read from the one or more memories, or according to logic circuits pre-designed to execute each of the processes. The processor may be various processors suitable for computer control, such as a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a field programmable gate array (FPGA), and an application-specific integrated circuit (ASIC). Note that the physically separate processors may cooperate with each other to execute each of the processes. For example, the processors mounted on a plurality of physically separated computers may cooperate with each other to execute the above processes via a network such as a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, etc. The program may be installed into the memory from an external server device or the like via the network, or may be distributed in a state stored on a recording medium such as a CD-ROM (Compact Disc Read Only Memory), a DVD-ROM (Digital Versatile Disc Read Only Memory), or a semiconductor memory, and installed into the memory from the recording medium.
[0160] The above description includes the following additional features. [Appendix 1] An in-vehicle device, processing circuitry; The processing circuitry performing a transmission process of transmitting the first time synchronization information and the second time synchronization information including the transmission time of the first time synchronization information to another device that is another in-vehicle device at a predetermined transmission period; The in-vehicle device performs a correction process to correct the transmission time in the current transmission process to a corrected transmission time, which is the previous transmission time plus the transmission period and a value obtained by dividing the time difference, based on the time difference between the current time in the in-vehicle device itself and a previous transmission time, which is the transmission time in the previous transmission process. [Explanation of symbols]
[0161] 1 vehicle 10 Ethernet cables 11 Relay Section 12,32,52 Time synchronization section 13,33,53 Storage section 14, 14A, 14B, 34, 54 communication ports 21 Switch section 22 Information Processing Department 31,51 Communications Department 41 Transmission processing unit 42 Transmission time setting section 43 Transmission period setting section 101 In-vehicle network 111 Switching device 121 Master Function Unit 131 End Function Unit 301 In-Vehicle Communication System
Claims
1. An in-vehicle device, a transmission processing unit that performs a transmission process of transmitting first time synchronization information and second time synchronization information including a transmission time of the first time synchronization information to another device that is another in-vehicle device at a predetermined transmission period; and a correction unit that performs a first correction process in the vehicle-mounted device itself to correct the transmission time to be included in the second time synchronization information in the current transmission process to a corrected transmission time that is a time obtained by adding the transmission period and a divided value obtained by dividing the time difference to the previous transmission time, based on a time difference between a current time that is the transmission time in the current transmission process and a previous transmission time that is the transmission time in the previous transmission process, and that performs a second correction process in the vehicle-mounted device itself, to correct the transmission time to be included in the second time synchronization information in the current transmission process to a time obtained by adding the transmission period and the divided value to the corrected transmission time in the previous transmission process, until the corrected transmission time reaches the current time.
2. The in-vehicle device according to claim 1 , wherein the correction unit performs the first correction process when the absolute value of the time difference is equal to or greater than a predetermined threshold value.
3. The in-vehicle device further an acquisition unit that acquires a data storage period that is a data storage period of the other device; The in-vehicle device according to claim 2 , wherein the threshold value is determined based on the data storage period and the transmission period acquired by the acquisition unit.
4. The in-vehicle device further a transmission period setting unit that, when the data storage period is shorter than the transmission period, changes the transmission period to an adjustment period that is shorter than the data storage period; The in-vehicle device according to claim 3 , wherein the transmission processing unit performs the transmission process at the adjustment period until the corrected transmission time reaches the current time.
5. A time synchronization method for an in-vehicle device, comprising: a step of performing a transmission process of transmitting first time synchronization information and second time synchronization information including a transmission time of the first time synchronization information to another device that is another in-vehicle device at a predetermined transmission period; performing a first correction process in the on-board device, based on a time difference between a current time, which is the transmission time in the current transmission process, and a previous transmission time, which is the transmission time in the previous transmission process, in the on-board device itself, to correct the transmission time to be included in the second time synchronization information in the current transmission process to a corrected transmission time, which is a time obtained by adding the transmission period and a divided value obtained by dividing the time difference to the previous transmission time; a step of performing a second correction process to correct the transmission time to be included in the second time synchronization information in the next transmission process after the transmission process in which the first correction process was performed, to a time obtained by adding the transmission period and the divided value to the corrected transmission time in the previous transmission process, until the corrected transmission time reaches the current time.
6. A time synchronization program for use in an in-vehicle device, Computer, a transmission processing unit that performs a transmission process of transmitting first time synchronization information and second time synchronization information including a transmission time of the first time synchronization information to another device that is another in-vehicle device at a predetermined transmission period; a correction unit that performs a first correction process in the on-board device, based on a time difference between a current time that is the transmission time in the current transmission process and a previous transmission time that is the transmission time in the previous transmission process, to correct the transmission time to be included in the second time synchronization information in the current transmission process to a corrected transmission time that is the time obtained by adding the transmission cycle and a divided value obtained by dividing the time difference to the previous transmission time, and that performs a second correction process in the transmission process after the transmission process in which the first correction process was performed to correct the transmission time to be included in the second time synchronization information to a time obtained by adding the transmission cycle and the divided value to the corrected transmission time in the previous transmission process, until the corrected transmission time reaches the current time; A time synchronization program to function as a
Citation Information
Patent Citations
System time correction method for unix system
JP1999212926A
Network system, on-vehicle system, time synchronization method, node and program
JP2016005214A
Method for system time synchronization
JP2018112425A
In-vehicle communication device, in-vehicle communication system, synchronous processing method, and synchronous processing program
JP2018196038A
Device for vehicle and time synchronization method of device for vehicle
JP2020126317A